mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE): Refactor array formatting and improve code readability
This commit is contained in:
@@ -687,7 +687,11 @@ const UniformityTable = () => {
|
||||
const response = await UniformityApi.getAllFetcher(url);
|
||||
|
||||
return isResponseSuccess(response) ? response.data : null;
|
||||
}, [filterProjectFlockKandangId, tableFilterState.start_date, tableFilterState.end_date]);
|
||||
}, [
|
||||
filterProjectFlockKandangId,
|
||||
tableFilterState.start_date,
|
||||
tableFilterState.end_date,
|
||||
]);
|
||||
|
||||
const handleExportExcel = useCallback(async () => {
|
||||
setIsExcelExportLoading(true);
|
||||
@@ -1241,7 +1245,9 @@ const UniformityTable = () => {
|
||||
placeholder='Tanggal Mulai'
|
||||
value={filterFormik.values.start_date}
|
||||
errorMessage={filterFormik.errors.start_date}
|
||||
onChange={(e) => filterFormik.setFieldValue('start_date', e.target.value)}
|
||||
onChange={(e) =>
|
||||
filterFormik.setFieldValue('start_date', e.target.value)
|
||||
}
|
||||
isError={
|
||||
filterFormik.touched.start_date &&
|
||||
Boolean(filterFormik.errors.start_date)
|
||||
@@ -1253,7 +1259,9 @@ const UniformityTable = () => {
|
||||
placeholder='Tanggal Akhir'
|
||||
value={filterFormik.values.end_date}
|
||||
errorMessage={filterFormik.errors.end_date}
|
||||
onChange={(e) => filterFormik.setFieldValue('end_date', e.target.value)}
|
||||
onChange={(e) =>
|
||||
filterFormik.setFieldValue('end_date', e.target.value)
|
||||
}
|
||||
isError={
|
||||
filterFormik.touched.end_date &&
|
||||
Boolean(filterFormik.errors.end_date)
|
||||
|
||||
@@ -234,7 +234,6 @@ const HppPerKandangTab = ({ tabId }: HppPerKandangTabProps) => {
|
||||
);
|
||||
}, [formik.values.show_unrecorded, showUnrecordedOptions]);
|
||||
|
||||
|
||||
// ===== DATA FETCHING =====
|
||||
const { data: hppPerKandang, isLoading } = useSWR(
|
||||
isSubmitted
|
||||
|
||||
Reference in New Issue
Block a user