mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 21:41:57 +00:00
refactor(FE): Refactor UI and improve conditional rendering in closing
pages
This commit is contained in:
@@ -224,15 +224,28 @@ const OverheadClosingTable = ({
|
||||
>
|
||||
{isLoadingOverhead ? (
|
||||
<OverheadClosingSkeleton columns={columns} />
|
||||
) : !isResponseSuccess(overhead) ||
|
||||
(!kandangId && overhead.data?.overheads.length === 0) ||
|
||||
(kandangId && !isResponseSuccess(overheadKandang)) ? (
|
||||
) : !isResponseSuccess(overhead) ? (
|
||||
<OverheadClosingSkeleton
|
||||
columns={columns}
|
||||
iconName='heroicons:chart-bar'
|
||||
title='Data Overhead Tidak Ditemukan'
|
||||
subtitle='Tidak ada data overhead untuk periode ini.'
|
||||
/>
|
||||
) : kandangId && !isResponseSuccess(overheadKandang) ? (
|
||||
<OverheadClosingSkeleton
|
||||
columns={columns}
|
||||
iconName='heroicons:chart-bar'
|
||||
title='Data Overhead Tidak Ditemukan'
|
||||
subtitle='Tidak ada data overhead untuk periode ini.'
|
||||
/>
|
||||
) : (!kandangId && overhead.data?.overheads.length === 0) ||
|
||||
(kandangId &&
|
||||
isResponseSuccess(overheadKandang) &&
|
||||
overheadKandang.data?.overheads.length === 0) ? (
|
||||
<OverheadClosingSkeleton
|
||||
columns={columns}
|
||||
iconName='heroicons:chart-bar'
|
||||
/>
|
||||
) : (
|
||||
<Table<Overhead>
|
||||
data={
|
||||
|
||||
Reference in New Issue
Block a user