fix(dashboard): resolve Asma tester-reported UI issues
- 3.1 currency: replace hardcoded $ with AED <Money/> in item & job-card price cells - 5.1 calendar: /calendars now renders the month calendar (was redirect to list) - 7.2 nav: remove dead Time Clocks / Time Sheets links (no routes, 404) - 5.4 check-in: enforce required department at schema level - 5.6 payments received: add invoice picker so the invoice is marked Paid - 5.2 share link: forward ws workspace param from the public inspection page Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
0171daea38
commit
11d920ba6a
@@ -38,6 +38,16 @@ const checkInSchema = z.object({
|
||||
department: z.object({ value: z.any(), label: z.string() }).nullable().optional(),
|
||||
delivery_date: z.string().optional(),
|
||||
delivery_time: z.string().optional(),
|
||||
}).superRefine((values, ctx) => {
|
||||
// Department is marked required in the UI (asterisk); enforce it at the
|
||||
// schema level so the form cannot be submitted without one.
|
||||
if (!values.department) {
|
||||
ctx.addIssue({
|
||||
code: z.ZodIssueCode.custom,
|
||||
path: ["department"],
|
||||
message: "Department is required",
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
type CheckInFormValues = z.infer<typeof checkInSchema>
|
||||
|
||||
Reference in New Issue
Block a user