diff --git a/web/components/custom-attributes/attribute-display/checkbox.tsx b/web/components/custom-attributes/attribute-display/checkbox.tsx index bb998467d..c341e49f1 100644 --- a/web/components/custom-attributes/attribute-display/checkbox.tsx +++ b/web/components/custom-attributes/attribute-display/checkbox.tsx @@ -5,8 +5,6 @@ import { ICustomAttribute } from "types"; type Props = { attributeDetails: ICustomAttribute; - issueId: string; - projectId: string; value: boolean; onChange: (val: boolean) => void; }; diff --git a/web/components/custom-attributes/attribute-display/date-time.tsx b/web/components/custom-attributes/attribute-display/date-time.tsx index ce9082266..426cba067 100644 --- a/web/components/custom-attributes/attribute-display/date-time.tsx +++ b/web/components/custom-attributes/attribute-display/date-time.tsx @@ -6,8 +6,6 @@ import { ICustomAttribute } from "types"; type Props = { attributeDetails: ICustomAttribute; className?: string; - issueId: string; - projectId: string; value: Date | undefined; onChange: (val: Date | null) => void; }; diff --git a/web/components/custom-attributes/attribute-display/email.tsx b/web/components/custom-attributes/attribute-display/email.tsx index 507674704..397080b3e 100644 --- a/web/components/custom-attributes/attribute-display/email.tsx +++ b/web/components/custom-attributes/attribute-display/email.tsx @@ -7,8 +7,6 @@ import { ICustomAttribute } from "types"; type Props = { attributeDetails: ICustomAttribute; - issueId: string; - projectId: string; value: string | undefined; onChange: (val: string) => void; }; diff --git a/web/components/custom-attributes/attribute-display/file.tsx b/web/components/custom-attributes/attribute-display/file.tsx index e36f92e29..26404ce56 100644 --- a/web/components/custom-attributes/attribute-display/file.tsx +++ b/web/components/custom-attributes/attribute-display/file.tsx @@ -22,8 +22,6 @@ import { MAX_FILE_SIZE } from "constants/workspace"; type Props = { attributeDetails: ICustomAttribute; className?: string; - issueId: string; - projectId: string; value: string | undefined; onChange: (val: string | undefined) => void; }; diff --git a/web/components/custom-attributes/attribute-display/number.tsx b/web/components/custom-attributes/attribute-display/number.tsx index fb50e2672..58e3667a0 100644 --- a/web/components/custom-attributes/attribute-display/number.tsx +++ b/web/components/custom-attributes/attribute-display/number.tsx @@ -9,8 +9,6 @@ import { ICustomAttribute } from "types"; type Props = { attributeDetails: ICustomAttribute; - issueId: string; - projectId: string; value: number | undefined; onChange: (val: number | undefined) => void; }; diff --git a/web/components/custom-attributes/attribute-display/relation.tsx b/web/components/custom-attributes/attribute-display/relation.tsx index 672bb2fd8..a8be14a90 100644 --- a/web/components/custom-attributes/attribute-display/relation.tsx +++ b/web/components/custom-attributes/attribute-display/relation.tsx @@ -24,7 +24,6 @@ import { CYCLES_LIST, MODULE_LIST } from "constants/fetch-keys"; type Props = { attributeDetails: ICustomAttribute; className?: string; - issueId: string; projectId: string; value: string | undefined; onChange: (val: string | undefined) => void; diff --git a/web/components/custom-attributes/attribute-display/select.tsx b/web/components/custom-attributes/attribute-display/select.tsx index 42e11588d..f066b7f32 100644 --- a/web/components/custom-attributes/attribute-display/select.tsx +++ b/web/components/custom-attributes/attribute-display/select.tsx @@ -12,9 +12,7 @@ import { ICustomAttribute } from "types"; type Props = { attributeDetails: ICustomAttribute; className?: string; - issueId: string; onChange: (val: string | string[] | undefined) => void; - projectId: string; } & ( | { multiple?: false; diff --git a/web/components/custom-attributes/attribute-display/text.tsx b/web/components/custom-attributes/attribute-display/text.tsx index 8f620eb0f..1f04af5e0 100644 --- a/web/components/custom-attributes/attribute-display/text.tsx +++ b/web/components/custom-attributes/attribute-display/text.tsx @@ -7,8 +7,6 @@ import { ICustomAttribute } from "types"; type Props = { attributeDetails: ICustomAttribute; - issueId: string; - projectId: string; value: string | undefined; onChange: (val: string) => void; }; diff --git a/web/components/custom-attributes/attribute-display/url.tsx b/web/components/custom-attributes/attribute-display/url.tsx index 0116b119b..eefb586ee 100644 --- a/web/components/custom-attributes/attribute-display/url.tsx +++ b/web/components/custom-attributes/attribute-display/url.tsx @@ -7,8 +7,6 @@ import { ICustomAttribute } from "types"; type Props = { attributeDetails: ICustomAttribute; - issueId: string; - projectId: string; value: string | undefined; onChange: (val: string) => void; }; diff --git a/web/components/custom-attributes/attributes-list/issue-modal/checkboxes.tsx b/web/components/custom-attributes/attributes-list/issue-modal/checkboxes.tsx index f3bbe4f13..40642672a 100644 --- a/web/components/custom-attributes/attributes-list/issue-modal/checkboxes.tsx +++ b/web/components/custom-attributes/attributes-list/issue-modal/checkboxes.tsx @@ -33,9 +33,7 @@ export const CustomAttributesCheckboxes: React.FC = observer((props) => {
onChange(attribute.id, [`${val}`])} - projectId={projectId} value={values[attribute.id]?.[0] === "true" ? true : false} />
diff --git a/web/components/custom-attributes/attributes-list/issue-modal/select-fields.tsx b/web/components/custom-attributes/attributes-list/issue-modal/select-fields.tsx index 864431bd9..afec9e487 100644 --- a/web/components/custom-attributes/attributes-list/issue-modal/select-fields.tsx +++ b/web/components/custom-attributes/attributes-list/issue-modal/select-fields.tsx @@ -47,9 +47,7 @@ export const CustomAttributesSelectFields: React.FC = observer((props) => onChange(attribute.id, val ? [val.toISOString()] : undefined)} - projectId={projectId} value={values[attribute.id]?.[0] ? new Date(values[attribute.id]?.[0]) : undefined} /> )} @@ -57,9 +55,7 @@ export const CustomAttributesSelectFields: React.FC = observer((props) => onChange(attribute.id, val)} - projectId={projectId} value={values[attribute.id]?.[0]} /> )} @@ -67,9 +63,7 @@ export const CustomAttributesSelectFields: React.FC = observer((props) => onChange(attribute.id, val)} - projectId={projectId} value={values[attribute.id] ?? []} multiple /> @@ -78,7 +72,6 @@ export const CustomAttributesSelectFields: React.FC = observer((props) => onChange(attribute.id, val)} projectId={projectId} value={values[attribute.id]?.[0]} @@ -88,9 +81,7 @@ export const CustomAttributesSelectFields: React.FC = observer((props) => onChange(attribute.id, val)} - projectId={projectId} value={values[attribute.id]?.[0]} multiple={false} /> diff --git a/web/components/custom-attributes/attributes-list/peek-overview-custom-attributes-list.tsx b/web/components/custom-attributes/attributes-list/peek-overview-custom-attributes-list.tsx index 1751c317e..589656d91 100644 --- a/web/components/custom-attributes/attributes-list/peek-overview-custom-attributes-list.tsx +++ b/web/components/custom-attributes/attributes-list/peek-overview-custom-attributes-list.tsx @@ -125,9 +125,7 @@ export const PeekOverviewCustomAttributesList: React.FC = observer( {attribute.type === "checkbox" && ( handleAttributeUpdate(attribute.id, [`${val}`])} - projectId={issue.project} value={ attributeValue ? attributeValue?.[0]?.value === "true" @@ -140,40 +138,32 @@ export const PeekOverviewCustomAttributesList: React.FC = observer( {attribute.type === "datetime" && ( { handleAttributeUpdate(attribute.id, val ? [val.toISOString()] : undefined); }} - projectId={issue.project} value={attributeValue ? new Date(attributeValue?.[0]?.value ?? "") : undefined} /> )} {attribute.type === "email" && ( { handleAttributeUpdate(attribute.id, val && val !== "" ? [val] : undefined); }} - projectId={issue.project} value={attributeValue ? attributeValue?.[0]?.value : undefined} /> )} {attribute.type === "file" && ( handleAttributeUpdate(attribute.id, val)} - projectId={issue.project} value={attributeValue ? attributeValue?.[0]?.value : undefined} /> )} {attribute.type === "multi_select" && ( handleAttributeUpdate(attribute.id, val)} - projectId={issue.project} value={Array.isArray(attributeValue) ? attributeValue.map((v) => v.value) : []} multiple /> @@ -181,11 +171,9 @@ export const PeekOverviewCustomAttributesList: React.FC = observer( {attribute.type === "number" && ( { handleAttributeUpdate(attribute.id, val ? [val.toString()] : undefined); }} - projectId={issue.project} value={ attributeValue ? parseInt(attributeValue?.[0]?.value ?? "0", 10) : undefined } @@ -194,7 +182,6 @@ export const PeekOverviewCustomAttributesList: React.FC = observer( {attribute.type === "relation" && ( handleAttributeUpdate(attribute.id, val)} projectId={issue.project} value={attributeValue ? attributeValue?.[0]?.value : undefined} @@ -203,9 +190,7 @@ export const PeekOverviewCustomAttributesList: React.FC = observer( {attribute.type === "select" && ( handleAttributeUpdate(attribute.id, val)} - projectId={issue.project} value={attributeValue ? attributeValue?.[0]?.value : undefined} multiple={false} /> @@ -213,22 +198,18 @@ export const PeekOverviewCustomAttributesList: React.FC = observer( {attribute.type === "text" && ( handleAttributeUpdate(attribute.id, val && val !== "" ? [val] : undefined) } - projectId={issue.project} value={attributeValue ? attributeValue?.[0].value : undefined} /> )} {attribute.type === "url" && ( handleAttributeUpdate(attribute.id, val && val !== "" ? [val] : undefined) } - projectId={issue.project} value={attributeValue ? attributeValue?.[0]?.value : undefined} /> )} diff --git a/web/components/custom-attributes/attributes-list/sidebar-custom-attributes-list.tsx b/web/components/custom-attributes/attributes-list/sidebar-custom-attributes-list.tsx index 93fa6c042..16497d290 100644 --- a/web/components/custom-attributes/attributes-list/sidebar-custom-attributes-list.tsx +++ b/web/components/custom-attributes/attributes-list/sidebar-custom-attributes-list.tsx @@ -124,9 +124,7 @@ export const SidebarCustomAttributesList: React.FC = observer(({ issue, p {attribute.type === "checkbox" && ( handleAttributeUpdate(attribute.id, [`${val}`])} - projectId={issue.project} value={ attributeValue ? (attributeValue?.[0]?.value === "true" ? true : false) : false } @@ -135,40 +133,32 @@ export const SidebarCustomAttributesList: React.FC = observer(({ issue, p {attribute.type === "datetime" && ( { handleAttributeUpdate(attribute.id, val ? [val.toISOString()] : undefined); }} - projectId={issue.project} value={attributeValue ? new Date(attributeValue?.[0]?.value ?? "") : undefined} /> )} {attribute.type === "email" && ( { handleAttributeUpdate(attribute.id, val && val !== "" ? [val] : undefined); }} - projectId={issue.project} value={attributeValue ? attributeValue?.[0]?.value : undefined} /> )} {attribute.type === "file" && ( handleAttributeUpdate(attribute.id, val)} - projectId={issue.project} value={attributeValue ? attributeValue?.[0]?.value : undefined} /> )} {attribute.type === "multi_select" && ( handleAttributeUpdate(attribute.id, val)} - projectId={issue.project} value={Array.isArray(attributeValue) ? attributeValue.map((v) => v.value) : []} multiple /> @@ -176,11 +166,9 @@ export const SidebarCustomAttributesList: React.FC = observer(({ issue, p {attribute.type === "number" && ( { handleAttributeUpdate(attribute.id, val ? [val.toString()] : undefined); }} - projectId={issue.project} value={ attributeValue ? parseInt(attributeValue?.[0]?.value ?? "0", 10) : undefined } @@ -189,7 +177,6 @@ export const SidebarCustomAttributesList: React.FC = observer(({ issue, p {attribute.type === "relation" && ( handleAttributeUpdate(attribute.id, val)} projectId={issue.project} value={attributeValue ? attributeValue?.[0]?.value : undefined} @@ -198,9 +185,7 @@ export const SidebarCustomAttributesList: React.FC = observer(({ issue, p {attribute.type === "select" && ( handleAttributeUpdate(attribute.id, val)} - projectId={issue.project} value={attributeValue ? attributeValue?.[0]?.value : undefined} multiple={false} /> @@ -208,22 +193,18 @@ export const SidebarCustomAttributesList: React.FC = observer(({ issue, p {attribute.type === "text" && ( handleAttributeUpdate(attribute.id, val && val !== "" ? [val] : undefined) } - projectId={issue.project} value={attributeValue ? attributeValue?.[0].value : undefined} /> )} {attribute.type === "url" && ( handleAttributeUpdate(attribute.id, val && val !== "" ? [val] : undefined) } - projectId={issue.project} value={attributeValue ? attributeValue?.[0]?.value : undefined} /> )}