mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 23:35:45 +00:00
refactor(FE): Refactor skeleton components to remove default columns
This commit is contained in:
@@ -210,27 +210,27 @@ const OverheadClosingTable = ({
|
||||
|
||||
return (
|
||||
<>
|
||||
{isLoadingOverhead ? (
|
||||
<OverheadClosingSkeleton columns={columns} />
|
||||
) : !isResponseSuccess(overhead) ||
|
||||
(!kandangId && overhead.data?.overheads.length === 0) ||
|
||||
(kandangId && !isResponseSuccess(overheadKandang)) ? (
|
||||
<OverheadClosingSkeleton
|
||||
columns={columns}
|
||||
iconName='heroicons:chart-bar'
|
||||
title='Data Overhead Tidak Ditemukan'
|
||||
subtitle='Tidak ada data overhead untuk periode ini.'
|
||||
/>
|
||||
) : (
|
||||
<Card
|
||||
title='Pengeluaran Overhead'
|
||||
collapsible
|
||||
defaultCollapsed={false}
|
||||
className={{
|
||||
wrapper: 'w-full',
|
||||
body: 'p-4 shadow',
|
||||
}}
|
||||
>
|
||||
<Card
|
||||
title='Pengeluaran Overhead'
|
||||
collapsible
|
||||
defaultCollapsed={false}
|
||||
className={{
|
||||
wrapper: 'w-full',
|
||||
body: 'p-4 shadow',
|
||||
}}
|
||||
>
|
||||
{isLoadingOverhead ? (
|
||||
<OverheadClosingSkeleton columns={columns} />
|
||||
) : !isResponseSuccess(overhead) ||
|
||||
(!kandangId && overhead.data?.overheads.length === 0) ||
|
||||
(kandangId && !isResponseSuccess(overheadKandang)) ? (
|
||||
<OverheadClosingSkeleton
|
||||
columns={columns}
|
||||
iconName='heroicons:chart-bar'
|
||||
title='Data Overhead Tidak Ditemukan'
|
||||
subtitle='Tidak ada data overhead untuk periode ini.'
|
||||
/>
|
||||
) : (
|
||||
<Table<Overhead>
|
||||
data={
|
||||
kandangId
|
||||
@@ -256,7 +256,8 @@ const OverheadClosingTable = ({
|
||||
: false
|
||||
}
|
||||
/>
|
||||
{kandangId && (
|
||||
)}
|
||||
{kandangId && !isLoadingOverhead && isResponseSuccess(overhead) && (
|
||||
<Card
|
||||
className={{
|
||||
wrapper: 'w-full',
|
||||
@@ -309,9 +310,8 @@ const OverheadClosingTable = ({
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
)}
|
||||
</Card>
|
||||
)}
|
||||
)}
|
||||
</Card>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user