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:
2026-06-04 11:39:07 +04:00
co-authored by Claude Opus 4.8
parent c71b5a19ed
commit fdce301495
14 changed files with 562 additions and 39 deletions
@@ -87,6 +87,10 @@ export function JobCardCheckInDialog({
})
const handleSubmit = async (values: CheckInFormValues) => {
if (!values.department) {
form.setError("department", { message: "Department is required" })
return
}
try {
await api.jobCards.checkIn(jobCardId, {
check_in_date: values.check_in_date || undefined,
@@ -131,6 +135,7 @@ export function JobCardCheckInDialog({
name="department"
label="Department"
placeholder="Select department"
required
queryKey={[DEPARTMENT_ROUTES.INDEX]}
listFn={() => api.departments.list()}
mapOption={(op:any)=> ({value: op.id, label: op.name})}
@@ -1,5 +1,6 @@
"use client"
import { useQueryClient } from "@tanstack/react-query"
import { CrudResource } from "@/shared/data-view/resource-page"
import { ColumnHeader } from "@/shared/data-view/table-view"
import FormDialog from "@/shared/components/form-dialog"
@@ -22,6 +23,7 @@ import { Money } from "@/shared/components/money"
export default function JobCardPaymentsReceived() {
const jobCard = useJobCard()
const queryClient = useQueryClient()
const [hasOpened, setHasOpened] = useState(false)
return (
@@ -60,7 +62,12 @@ export default function JobCardPaymentsReceived() {
invoiceCustomer={jobCard?.customer as any}
lockJobCard
lockCustomer
onSuccess={invalidateQuery}
onSuccess={() => {
// Refresh the payments list AND the job card / invoice
// queries so the PAID status reflects the new payment.
invalidateQuery()
queryClient.invalidateQueries()
}}
/>
)}
</FormDialog>