Skip to content

Commit

Permalink
Merge pull request #121 from uwblueprint/jacob/populate-task-list
Browse files Browse the repository at this point in the history
Jacob-Kathleen/populate task list
  • Loading branch information
jeessh authored Nov 16, 2024
2 parents c642cb0 + 8c1aaa2 commit 610fd05
Show file tree
Hide file tree
Showing 10 changed files with 509 additions and 218 deletions.
6 changes: 6 additions & 0 deletions backend/services/implementations/taskService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ class TaskService implements ITaskService {

async deleteTaskById(taskId: number): Promise<TaskDTO> {
try {
await prisma.taskAssigned.deleteMany({
where: {
taskId,
},
});

const deletedTask = await prisma.task.delete({
where: {
id: taskId,
Expand Down
5 changes: 5 additions & 0 deletions backend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3637,6 +3637,11 @@ fs.realpath@^1.0.0:
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=

[email protected]:
version "2.3.3"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==

fsevents@^2.3.2, fsevents@~2.3.1:
version "2.3.2"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/APIClients/Queries/TaskQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const GET_TASK_BY_ID = gql`
`;

export const GET_TASKS_BY_TYPE = gql`
query getTaskById($type: TaskType!) {
query getTasksByType($type: TaskType!) {
getTasksByType(type: $type) {
id
type
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/common/CommonTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import ChevronRightOutlinedIcon from "@mui/icons-material/ChevronRightOutlined";
import KeyboardArrowUpOutlinedIcon from "@mui/icons-material/KeyboardArrowUpOutlined";
import KeyboardArrowDownOutlinedIcon from "@mui/icons-material/KeyboardArrowDownOutlined";

type TableTypes = string | number | boolean | Date;
type TableTypes = string | number | boolean | Date | string[];

export type ColumnInfoTypes = { header: string; key: string };

Expand Down
10 changes: 6 additions & 4 deletions frontend/src/components/common/FormField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const FormField = ({
leftElement,
}: {
label: string;
value: string;
value: string | number | undefined;
type?: string;
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
onBlur?: () => void;
Expand All @@ -42,9 +42,11 @@ const FormField = ({
}) => (
<Flex flexDir="column" flex="1">
<FormControl isRequired={required}>
<FormLabel mb="5px" color="gray.main" fontWeight="700">
{label}
</FormLabel>
{label && (
<FormLabel mb="5px" color="gray.main" fontWeight="700">
{label}
</FormLabel>
)}
<InputGroup>
{leftElement && (
<InputLeftElement height="34px" pointerEvents="none" color="black">
Expand Down
Loading

0 comments on commit 610fd05

Please sign in to comment.