mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE): Filter inactive kandangs in UniformityForm options
This commit is contained in:
@@ -155,9 +155,12 @@ const UniformityForm = ({
|
||||
const kandangOpts = selectedProjectFlockData.kandangs
|
||||
.filter((kandang: Kandang) => {
|
||||
if (formType === 'add') {
|
||||
return approvedKandangIds.includes(kandang.id);
|
||||
return (
|
||||
approvedKandangIds.includes(kandang.id) &&
|
||||
kandang.status === 'ACTIVE'
|
||||
);
|
||||
}
|
||||
return true;
|
||||
return kandang.status === 'ACTIVE';
|
||||
})
|
||||
.map((kandang: Kandang) => ({
|
||||
value: kandang.id,
|
||||
|
||||
Reference in New Issue
Block a user