Skip to content

Commit

Permalink
🔨 remove position field for 10-code (use drag and drop for position)
Browse files Browse the repository at this point in the history
  • Loading branch information
casperiv0 committed Dec 19, 2021
1 parent 23ce74d commit adc0ab7
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions packages/client/src/components/admin/values/ManageValueModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@ const DEPARTMENT_TYPES = Object.values(DepartmentType).map((v) => ({
value: v,
}));

const POSITION_VALUES = new Array(50).fill(0).map((_, idx) => ({
value: String(idx + 1),
label: String(idx + 1),
}));

export const ManageValueModal = ({ onCreate, onUpdate, clType: dlType, type, value }: Props) => {
const { state, execute } = useFetch();
const { isOpen, closeModal } = useModal();
Expand Down Expand Up @@ -115,8 +110,6 @@ export const ManageValueModal = ({ onCreate, onUpdate, clType: dlType, type, val
as: typeof value?.value === "string" ? "" : value && "as" in value ? value.as : "",
shouldDo:
typeof value?.value === "string" ? "" : value && "shouldDo" in value ? value.shouldDo : "",
position:
typeof value?.value === "string" ? "" : value && "position" in value ? value.position : "",
departmentId:
typeof value?.value === "string"
? ""
Expand Down Expand Up @@ -220,15 +213,6 @@ export const ManageValueModal = ({ onCreate, onUpdate, clType: dlType, type, val
/>
</FormField>

<FormField label="Position">
<Select
values={POSITION_VALUES}
name="position"
onChange={handleChange}
value={String(values.position)}
/>
</FormField>

<FormField errorMessage={errors.color as string} label="Color (#HEX)">
<div className={`flex ${values.showPicker ? "items-start" : ""}`}>
{values.showPicker ? (
Expand Down

0 comments on commit adc0ab7

Please sign in to comment.