feat(FE-40): add edit button

This commit is contained in:
ValdiANS
2025-10-05 16:13:04 +07:00
parent 1ae2d13335
commit dcebd53c45
3 changed files with 51 additions and 0 deletions
@@ -174,6 +174,23 @@ const AreaForm = ({ type = 'add', initialValues }: AreaFormProps) => {
/>
Delete
</Button>
{type !== 'edit' && (
<Button
type='button'
color='warning'
href={`/master-data/area/detail/edit/?areaId=${initialValues?.id}`}
className='px-4'
>
<Icon
icon='material-symbols:edit-outline'
width={24}
height={24}
className='justify-start text-sm'
/>
Edit
</Button>
)}
</div>
)}
@@ -243,6 +243,23 @@ const LocationForm = ({ type = 'add', initialValues }: LocationFormProps) => {
/>
Delete
</Button>
{type !== 'edit' && (
<Button
type='button'
color='warning'
href={`/master-data/location/detail/edit/?locationId=${initialValues?.id}`}
className='px-4'
>
<Icon
icon='material-symbols:edit-outline'
width={24}
height={24}
className='justify-start text-sm'
/>
Edit
</Button>
)}
</div>
)}
@@ -174,6 +174,23 @@ const UomForm = ({ type = 'add', initialValues }: UomFormProps) => {
/>
Delete
</Button>
{type !== 'edit' && (
<Button
type='button'
color='warning'
href={`/master-data/uom/detail/edit/?uomId=${initialValues?.id}`}
className='px-4'
>
<Icon
icon='material-symbols:edit-outline'
width={24}
height={24}
className='justify-start text-sm'
/>
Edit
</Button>
)}
</div>
)}