refactor(FE-106-91-339-238): Slicing UI Chickin DOC Refactored

This commit is contained in:
randy-ar
2025-11-04 13:24:10 +07:00
parent 219cbedbcd
commit d8637923bd
24 changed files with 780 additions and 709 deletions
@@ -77,7 +77,7 @@ const ProjectFlockForm = ({
const [isDeleteLoading, setIsDeleteLoading] = useState(false);
const [isApproveLoading, setIsApproveLoading] = useState(false);
const [isApprovedDisabled, setIsApprovedDisabled] = useState(
initialValues?.approval.step_name == 'Pengajuan' ? false : true
initialValues?.approval?.step_name == 'Pengajuan' ? false : true
);
const [isRejectedDisabled, setIsRejectedDisabled] =
useState(!isApprovedDisabled);
@@ -726,7 +726,25 @@ const ProjectFlockForm = ({
</div>
</form>
{formType != 'add' && (
<div className='w-full'>
<div className='flex flex-row gap-2 mb-6'>
{formType != 'edit' && (
<Button
onClick={() => {
router.push(
`/production/project-flock/detail/edit?projectFlockId=${initialValues?.id}`
);
}}
color='warning'
>
<Icon
icon='mdi:pencil-outline'
width={16}
height={16}
className='justify-start text-sm'
/>
Edit
</Button>
)}
<Button
onClick={() => {
if (initialValues?.id) {
@@ -121,6 +121,10 @@ const ProjectFlockKandangTable = ({
);
},
},
{
accessorFn: (row) => row.capacity,
header: 'Kapasitas',
},
{
accessorFn: (row) => row.pic?.name,
header: 'Penanggung Jawab',