Skip to content

Commit 6865106

Browse files
authored
[PlatformAdmin] Fix polling stations validation on edit (#892)
* fix: make dropdown menus scrollable * fix: truncate overflowing table columns * Squashed commit of the following: commit 742f250 Author: imdeaconu <imdeaconu@gmail.com> Date: Wed Sep 11 19:54:55 2024 +0300 add read notification checkmark commit ea11fa0 Author: imdeaconu <imdeaconu@gmail.com> Date: Wed Sep 11 19:54:30 2024 +0300 add read notification column * Squashed commit of the following: commit d8833dc Author: imdeaconu <imdeaconu@gmail.com> Date: Fri Sep 13 13:29:31 2024 +0300 WIP: add selector functionality commit 3608c0e Author: imdeaconu <imdeaconu@gmail.com> Date: Fri Sep 13 10:00:05 2024 +0300 WIP: create new tags input * chore: remove unused import * chore: delete duplicated / unused classes * feature: add searching to MonitoringObserversTagFilter * chore: update config files * Revert "[NGO Admin] Rewrite the tag selector component (#675)" This reverts commit 2ad0e90. * Merge branch 'main' of https://github.com/commitglobal/votemonitor into commitglobal-main * WIP: rename prop for alternative filter key in Observer Tags and add it to the Push Message form * WIP: fix push messages receipients query not invalidating after edits * invalidate targeted observers query after a morning observer is added * fix validation error when editing polling stations that have less than 5 levels
1 parent d5cad64 commit 6865106

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

web/src/common/types.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -312,11 +312,10 @@ export const importPollingStationSchema = z
312312
.object({
313313
id: z.string().default(() => crypto.randomUUID()),
314314
level1: z.string().min(1, 'Level 1 is required'),
315-
level2: z.string().optional(),
316-
level3: z.string().optional(),
317-
level4: z.string().optional(),
318-
level5: z.string().optional(),
319-
315+
level2: z.string().optional().catch(''),
316+
level3: z.string().optional().catch(''),
317+
level4: z.string().optional().catch(''),
318+
level5: z.string().optional().catch(''),
320319
address: z.string().min(1, 'Address is required'),
321320
number: z.string().min(1, 'Number is required'),
322321
displayOrder: z.coerce.number().catch(0),

0 commit comments

Comments
 (0)