mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE): Show kandangs table for add-request and selection
This commit is contained in:
@@ -174,9 +174,16 @@ const ExpenseKandangsTable = ({
|
||||
updateSortingFilter('picSort', picSortFilter);
|
||||
}, [sorting, updateSortingFilter]);
|
||||
|
||||
// Tampilkan tabel jika:
|
||||
// 1. Mode request pertama kali (type='add' dan formType='request')
|
||||
// 2. Atau sudah ada kandang yang dipilih
|
||||
const shouldShowTable =
|
||||
(type === 'add' && formType === 'request') ||
|
||||
(selectedKandangs.length > 0 && selectedKandangs.some((k) => k.id));
|
||||
|
||||
return (
|
||||
<>
|
||||
{selectedKandangs.length > 0 && selectedKandangs.some((k) => k.id) && (
|
||||
{shouldShowTable && (
|
||||
<Card
|
||||
className={{
|
||||
wrapper: className?.wrapper,
|
||||
|
||||
Reference in New Issue
Block a user