diff --git a/src/features/global/cards/utils/addCardForm.ts b/src/features/global/cards/utils/addCardForm.ts index 1dd6adb..a4092a2 100644 --- a/src/features/global/cards/utils/addCardForm.ts +++ b/src/features/global/cards/utils/addCardForm.ts @@ -8,12 +8,12 @@ export const AddCardForm = () => { task: '', description: '', partId: 0, - workingDays: null, + workingDays: '', dods: '', assignees: [], }, validate: { - workingDays: (value) => (value === null || value <= 0 ? 'You must work at least 0.5 days' : null), + workingDays: (value) => (value === null || value === '' || parseFloat(value) <= 0 ? 'You must work at least 0.5 days' : null), } }); }; \ No newline at end of file diff --git a/src/store/api/types/queryParams.ts b/src/store/api/types/queryParams.ts index faa3dd3..ee544f3 100644 --- a/src/store/api/types/queryParams.ts +++ b/src/store/api/types/queryParams.ts @@ -37,7 +37,7 @@ export interface CreateCard { asWho: string, task: string, description: string, - workingDays: number | null, + workingDays: number | string, dods: string, partId: number, assignees: string[];