fix(dashboard): resolve tutorial QA notes (clips 2–6)
- settings/company: show success toast on save (2.1) - inspection templates: add explicit Save button (2.6) - parts: label price fields with AED currency (3.1) - service groups: add parts/services picker to packages (3.3) - vehicles: add insurance (has_insurance + insurance type) field (4.2) - appointments: add calendar view with list/calendar toggle (5.1) - job card check-in: require department (5.4) - job card payments: refresh job card/invoice queries so PAID shows (5.6) - vendors: add phone + address fields (6.1) - bill payments: surface real vendor/employee validation errors (6.4) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -151,15 +151,12 @@ export function SettingsForm() {
|
||||
}, [data]) // eslint-disable-line react-hooks/exhaustive-deps
|
||||
|
||||
const { mutate, error, isPending } = useFormMutation(form, {
|
||||
mutationFn: (values: SettingsFormValues) => {
|
||||
const payload = mapFormToPayload(values)
|
||||
const promise = api.settings.update(payload)
|
||||
toast.promise(promise, {
|
||||
loading: "Saving settings...",
|
||||
success: "Settings saved successfully",
|
||||
error: "Failed to save settings",
|
||||
})
|
||||
return promise
|
||||
mutationFn: (values: SettingsFormValues) => api.settings.update(mapFormToPayload(values)),
|
||||
onSuccess: () => {
|
||||
toast.success("Settings saved successfully")
|
||||
},
|
||||
onError: () => {
|
||||
toast.error("Failed to save settings")
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user