update client and client adresses pages also create branch pages and role pages and update some pages to be batter

This commit is contained in:
m7amedez5511
2026-06-30 11:18:49 +03:00
parent 0847bd23ee
commit eaae6810bd
49 changed files with 2559 additions and 3001 deletions

View File

@@ -12,6 +12,7 @@ import {
type UpdateClientFormValues,
} from "@/src/validations/client.validator";
import type { Client } from "@/src/types/client";
import { Schema } from "yup";
// ── Styles ─────────────────────────────────────────────────────────────────
const S = {
@@ -70,7 +71,7 @@ export function ClientFormModal({ editClient, onClose, onSubmit }: ClientFormMod
setError,
formState: { errors, isSubmitting },
} = useForm<CreateClientFormValues | UpdateClientFormValues>({
resolver: yupResolver(schema) as never, // FIX 1 applied here
resolver: yupResolver(Schema) as never, // FIX 1 applied here
defaultValues: {
name: editClient?.name ?? "",
email: editClient?.email ?? "",