From a54cfb861ae043e091ba5e367ee8fa52aa007911 Mon Sep 17 00:00:00 2001 From: lukman Date: Thu, 26 Sep 2024 14:17:11 +0800 Subject: [PATCH] style : update style --- .../ui/navbar_create_division_calender.tsx | 78 ++++++--- .../calender/ui/update_division_calender.tsx | 75 ++++++--- .../document/ui/drawer_cut_documents.tsx | 12 +- .../ui/drawer_menu_document_division.tsx | 158 ++++++++++-------- .../document/ui/drawer_share_document.tsx | 71 ++++---- .../document/ui/navbar_document_division.tsx | 35 ++-- .../project/ui/list_file_detail_project.tsx | 3 + 7 files changed, 251 insertions(+), 181 deletions(-) diff --git a/src/module/calender/ui/navbar_create_division_calender.tsx b/src/module/calender/ui/navbar_create_division_calender.tsx index 522ecca..911f119 100644 --- a/src/module/calender/ui/navbar_create_division_calender.tsx +++ b/src/module/calender/ui/navbar_create_division_calender.tsx @@ -208,7 +208,6 @@ export default function NavbarCreateDivisionCalender() { data={[ { value: 'once', label: 'Acara 1 Kali' }, { value: 'daily', label: 'Setiap Hari' }, - // { value: 'weekdays', label: 'Hari Kerja (Sen - Jum)' }, { value: 'weekly', label: 'Mingguan' }, { value: 'monthly', label: 'Bulanan' }, { value: 'yearly', label: 'Tahunan' }, @@ -226,31 +225,60 @@ export default function NavbarCreateDivisionCalender() { ) } /> - { - setData({ ...isData, repeatValue: String(event.currentTarget.value) }) - setTouched({ ...touched, repeatValue: false }) + {isData.repeatEventTyper == "once" ? + setTouched({ ...touched, repeatValue: true })} - // TODO :: NANTI DIPERBAIKI - error={ - touched.repeatValue && ( - isData.repeatValue == "" ? "Jumlah pengulangan tidak boleh kosong" : "" - // || Number(isData.repeatValue) <= 0 ? "Jumlah pengulangan tidak boleh 0" : "" - ) - } - /> + type='number' + required + label="Jumlah pengulangan" + size="md" + disabled + placeholder='Jumlah pengulangan' + value={isData.repeatValue} + onChange={(event) => { + setData({ ...isData, repeatValue: String(event.currentTarget.value) }) + setTouched({ ...touched, repeatValue: false }) + }} + onBlur={() => setTouched({ ...touched, repeatValue: true })} + // TODO :: NANTI DIPERBAIKI + error={ + touched.repeatValue && ( + isData.repeatValue == "" ? "Jumlah pengulangan tidak boleh kosong" : "" + // || Number(isData.repeatValue) <= 0 ? "Jumlah pengulangan tidak boleh 0" : "" + ) + } + /> + : + { + setData({ ...isData, repeatValue: String(event.currentTarget.value) }) + setTouched({ ...touched, repeatValue: false }) + }} + onBlur={() => setTouched({ ...touched, repeatValue: true })} + // TODO :: NANTI DIPERBAIKI + error={ + touched.repeatValue && ( + isData.repeatValue == "" ? "Jumlah pengulangan tidak boleh kosong" : "" + // || Number(isData.repeatValue) <= 0 ? "Jumlah pengulangan tidak boleh 0" : "" + ) + } + /> + }