mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 15:55:48 +00:00
refactor(FE): Update button behavior based on kandang status
This commit is contained in:
@@ -398,6 +398,7 @@ const ProjectFlockDetail = ({
|
||||
</div>
|
||||
|
||||
<div className='grid grid-cols-4 gap-3'>
|
||||
{selectedKandang?.status !== 'NON_ACTIVE' && (
|
||||
<RequirePermission permissions='lti.production.chickins.detail'>
|
||||
<Link
|
||||
href={`/production/project-flock/chickin/add/kandang?projectFlockKandangId=${selectedKandang?.project_flock_kandang_id}&projectFlockId=${projectFlock.id}`}
|
||||
@@ -416,6 +417,7 @@ const ProjectFlockDetail = ({
|
||||
</Button>
|
||||
</Link>
|
||||
</RequirePermission>
|
||||
)}
|
||||
<RequirePermission permissions='lti.production.project_flock_kandangs.closing.detail'>
|
||||
<Link
|
||||
href={`/production/project-flock/closing?projectFlockId=${projectFlock.id}&projectFlockKandangId=${selectedKandang?.project_flock_kandang_id}`}
|
||||
@@ -430,7 +432,15 @@ const ProjectFlockDetail = ({
|
||||
projectFlock?.approval?.step_number == 1
|
||||
}
|
||||
>
|
||||
{selectedKandang?.status === 'NON_ACTIVE' ? (
|
||||
<>
|
||||
Unclose <Icon icon='mdi:lock-open-variant' />
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
Close <Icon icon='mdi:checkbox-marked-circle-outline' />
|
||||
</>
|
||||
)}
|
||||
</Button>
|
||||
</Link>
|
||||
</RequirePermission>
|
||||
|
||||
Reference in New Issue
Block a user