From f0914e957be3dd73b69388e028505c7ce1361e9e Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Fri, 7 Mar 2025 16:31:30 +0700 Subject: update code --- src-migrate/validations/tempo.ts | 11 ++ src/lib/pengajuan-tempo/component/Pengiriman.jsx | 169 ++++++++++++----------- 2 files changed, 97 insertions(+), 83 deletions(-) diff --git a/src-migrate/validations/tempo.ts b/src-migrate/validations/tempo.ts index 469f351d..dad26c5a 100644 --- a/src-migrate/validations/tempo.ts +++ b/src-migrate/validations/tempo.ts @@ -75,6 +75,17 @@ export const TempoSchemaKontakPerson = z message: 'Email Finance tidak boleh sama dengan Email Purchasing', path: ['financeEmail'], } + ) + .refine( + (data) => + !data.direkturEmail || + (data.direkturEmail !== data.financeEmail && + data.direkturEmail !== data.purchasingEmail), + { + message: + 'Email Direktur tidak boleh sama dengan Email Finance atau Purchasing', + path: ['direkturEmail'], + } ); export const TempoSchemaPengiriman = z.object({ PICTittle: z.string().min(1, { message: 'Tittle harus dipilih' }), diff --git a/src/lib/pengajuan-tempo/component/Pengiriman.jsx b/src/lib/pengajuan-tempo/component/Pengiriman.jsx index ae8b1c78..52376f61 100644 --- a/src/lib/pengajuan-tempo/component/Pengiriman.jsx +++ b/src/lib/pengajuan-tempo/component/Pengiriman.jsx @@ -355,7 +355,6 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { validatePengiriman(); } }; - console.log('formPengiriman', formPengiriman); const isFormValid = useMemo( () => Object.keys(errorsPengiriman).length === 0, [errorsPengiriman] @@ -1411,6 +1410,48 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { +
+
+ + + Format: pdf, jpeg, jpg, png. max file size 2MB + +
+
+
+ + + + {formPengiriman?.dokumenProsedur?.name} + +
+ {chekValid && ( +
+ {errorsPengiriman.dokumenProsedur} +
+ )} +
+
+
-
-
- - - Format: pdf, jpeg, jpg, png. max file size 2MB - -
-
-
- - - - {formPengiriman?.dokumenProsedur?.name} - -
- {chekValid && ( -
- {errorsPengiriman.dokumenProsedur} -
- )} -
-
+ @@ -2140,6 +2141,48 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { +
+
+ +
+
+
+ + + + {formPengiriman?.dokumenProsedur?.name} + +
+ {chekValid && ( +
+ {errorsPengiriman.dokumenProsedur} +
+ )} + + Format: pdf, jpeg, jpg, png. max file size 2MB + +
+
+
-
-
- -
-
-
- - - - {formPengiriman?.dokumenProsedur?.name} - -
- {chekValid && ( -
- {errorsPengiriman.dokumenProsedur} -
- )} - - Format: pdf, jpeg, jpg, png. max file size 2MB - -
-
+ -- cgit v1.2.3