mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 07:45:47 +00:00
refactor(FE): Remove restriction check for locked rows and add
"isGrowingLocked" badge
This commit is contained in:
@@ -210,7 +210,7 @@ const RowOptionsMenu = ({
|
|||||||
</Button>
|
</Button>
|
||||||
</RequirePermission>
|
</RequirePermission>
|
||||||
)}
|
)}
|
||||||
{!restrictionInfo.isLocked && !isApproved && !isRejected && (
|
{!isApproved && !isRejected && (
|
||||||
<RequirePermission permissions='lti.production.recording.approve'>
|
<RequirePermission permissions='lti.production.recording.approve'>
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -226,7 +226,7 @@ const RowOptionsMenu = ({
|
|||||||
</Button>
|
</Button>
|
||||||
</RequirePermission>
|
</RequirePermission>
|
||||||
)}
|
)}
|
||||||
{!restrictionInfo.isLocked && !isApproved && !isRejected && (
|
{!isApproved && !isRejected && (
|
||||||
<RequirePermission permissions='lti.production.recording.approve'>
|
<RequirePermission permissions='lti.production.recording.approve'>
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -818,6 +818,10 @@ const RecordingTable = () => {
|
|||||||
props.row.original.project_flock?.project_flock_category ||
|
props.row.original.project_flock?.project_flock_category ||
|
||||||
'GROWING';
|
'GROWING';
|
||||||
const color = category === 'LAYING' ? 'info' : 'warning';
|
const color = category === 'LAYING' ? 'info' : 'warning';
|
||||||
|
|
||||||
|
const isGrowingLocked =
|
||||||
|
category === 'GROWING' && props.row.original.is_laying;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='flex flex-col gap-1'>
|
<div className='flex flex-col gap-1'>
|
||||||
<StatusBadge color={color} text={formatTitleCase(category)} />
|
<StatusBadge color={color} text={formatTitleCase(category)} />
|
||||||
@@ -826,6 +830,11 @@ const RecordingTable = () => {
|
|||||||
(Transisi)
|
(Transisi)
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
|
{isGrowingLocked && (
|
||||||
|
<span className='text-xs text-error font-medium'>
|
||||||
|
(Penguncian)
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user