Skip to content

Commit

Permalink
Restore feature flag
Browse files Browse the repository at this point in the history
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
  • Loading branch information
TG1999 committed Mar 25, 2024
1 parent ad8e8b8 commit a9c3c3c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/services/taskRequestApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type AddOrUpdateMutationQuery = {
description: string | undefined;
proposedStartDate: number | string;
proposedDeadline: number | string;
markdownEnabled: boolean;
markdownEnabled?: boolean;
};

type AddOrUpdateMutationQueryRes = {
Expand Down
14 changes: 12 additions & 2 deletions src/components/issues/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,26 @@ const Card: FC<IssueCardProps> = ({ issue }) => {
};

const handleCreateTaskRequest = async (data: TaskRequestData) => {
const requestData = {
interface RequestData {
externalIssueUrl: string;
externalIssueHtmlUrl: string;
userId: string | undefined;
requestType: string;
proposedStartDate: string | number;
proposedDeadline: string | number;
description: string | undefined;
markdownEnabled?: boolean; // Optional property
}
const requestData: RequestData = {
externalIssueUrl: issue.url,
externalIssueHtmlUrl: issue.html_url,
userId: userData?.id,
requestType: TASK_REQUEST_TYPES.CREATION,
proposedStartDate: data.startedOn,
proposedDeadline: data.endsOn,
description: data.description,
markdownEnabled: dev === 'true',
};
if (dev === 'true') requestData.markdownEnabled = true;
if (!requestData.description) delete requestData.description;
try {
const response = await addOrUpdateTaskRequest(requestData).unwrap();
Expand Down

0 comments on commit a9c3c3c

Please sign in to comment.