feat(84-85-86-87-88-89-102): create feature project flocks and adjust master data flock feature

This commit is contained in:
randy-ar
2025-10-16 16:49:44 +07:00
parent e2b35e765c
commit 5113bf4d3f
16 changed files with 1207 additions and 19 deletions
@@ -41,7 +41,7 @@ const RowsOptions = ({
)}
>
<Button
href={`/master-data/flock/edit/?flockId=${props.row.original.id}`}
href={`/master-data/flock/detail/edit/?flockId=${props.row.original.id}`}
variant='ghost'
color='warning'
className='justify-start text-sm'
@@ -53,6 +53,20 @@ const RowsOptions = ({
className='justify-start text-sm'
/>
Edit
</Button>
<Button
href={`/master-data/flock/detail/?flockId=${props.row.original.id}`}
variant='ghost'
color='primary'
className='justify-start text-sm'
>
<Icon
icon='mdi:eye-outline'
width={16}
height={16}
className='justify-start text-sm'
/>
Detail
</Button>
<Button
onClick={deleteClickHandler}
@@ -4,11 +4,11 @@ export const FlockFormSchema = Yup.object({
name: Yup.string()
.required('Nama wajib diisi!')
.matches(
/^[a-zA-Z0-9]+$/,
'Nama hanya boleh berisi huruf dan angka (tanpa spasi atau simbol)'
/^[\p{L}\p{N}\s]+$/u,
'Nama tidak boleh mengandung simbol'
),
});
export const UpdateFlockFormSchema = FlockFormSchema;
export type FlockFormValues = Yup.InferType<typeof FlockFormSchema>;
export type FlockFormValues = Yup.InferType<typeof FlockFormSchema>;
@@ -143,7 +143,7 @@ const FlockForm = ({ formType = 'add', initialValues }: FlockCustomProps) => {
<Button
type='button'
color='warning'
href={`/master-data/flock/edit/?flockId=${initialValues?.id}`}
href={`/master-data/flock/detail/edit/?flockId=${initialValues?.id}`}
className='px-4'
>
<Icon