summaryrefslogtreecommitdiff
path: root/src-migrate
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-10-18 16:11:17 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-10-18 16:11:17 +0700
commit87ffd2fa7edc240693ddd81401ef23c5cd1bbb3e (patch)
tree11aa10d3a811584f44a0c791fad8b517a4d819a2 /src-migrate
parentae0f75d48261ba2057dc0dd4492708f1e6e06522 (diff)
<iman> update fix kontak person
Diffstat (limited to 'src-migrate')
-rw-r--r--src-migrate/modules/register/stores/usePengajuanTempoStore.ts2
-rw-r--r--src-migrate/types/tempo.ts1
-rw-r--r--src-migrate/validations/tempo.ts6
3 files changed, 9 insertions, 0 deletions
diff --git a/src-migrate/modules/register/stores/usePengajuanTempoStore.ts b/src-migrate/modules/register/stores/usePengajuanTempoStore.ts
index 247f62dd..7f1bcbb0 100644
--- a/src-migrate/modules/register/stores/usePengajuanTempoStore.ts
+++ b/src-migrate/modules/register/stores/usePengajuanTempoStore.ts
@@ -116,6 +116,7 @@ export const usePengajuanTempoStoreKontakPerson = create<
financeMobile: '',
financeName: '',
financeEmail: '',
+ purchasingMobile: '',
},
updateFormKontakPerson: (name, value) =>
set((state) => ({
@@ -151,6 +152,7 @@ export const usePengajuanTempoStoreKontakPerson = create<
financeName: '',
financeMobile: '',
financeEmail: '',
+ purchasingMobile: '',
},
}),
}));
diff --git a/src-migrate/types/tempo.ts b/src-migrate/types/tempo.ts
index fc920c05..85680cba 100644
--- a/src-migrate/types/tempo.ts
+++ b/src-migrate/types/tempo.ts
@@ -27,6 +27,7 @@ export type tempoPropsKontakPerson = {
financeMobile: string;
financeEmail: string;
financeName: string;
+ purchasingMobile: string;
};
export type TempoApiProps = OdooApiRes<TempoProps>;
diff --git a/src-migrate/validations/tempo.ts b/src-migrate/validations/tempo.ts
index 45cc8cd2..756bb722 100644
--- a/src-migrate/validations/tempo.ts
+++ b/src-migrate/validations/tempo.ts
@@ -41,6 +41,12 @@ export const TempoSchemaKontakPerson = z.object({
.refine((val) => /^\d{10,12}$/.test(val), {
message: 'Format nomor telepon tidak valid, contoh: 081234567890',
}),
+ purchasingMobile: z
+ .string()
+ .min(1, { message: 'Nomor telepon harus diisi' })
+ .refine((val) => /^\d{10,12}$/.test(val), {
+ message: 'Format nomor telepon tidak valid, contoh: 081234567890',
+ }),
direkturEmail: z
.string()
.min(1, { message: 'Email harus diisi' })