fix(FE): create hooks for formik error list and integrate alert error list for finance and master data modules

This commit is contained in:
randy-ar
2026-01-12 17:19:16 +07:00
parent 0f9849c0ac
commit aa114c164b
27 changed files with 280 additions and 242 deletions
+4 -1
View File
@@ -1,6 +1,7 @@
import Alert from '@/components/Alert';
import Button from '@/components/Button';
import { Icon } from '@iconify/react';
import { useState } from 'react';
/**
* Alert Unique Error List
@@ -14,8 +15,10 @@ const AlertErrorList = ({
formErrorList: string[];
onClose: () => void;
}) => {
if (formErrorList.length === 0) return null;
return (
<Alert color='error' className='flex flex-col gap-2 px-4 m-4'>
<Alert color='error' className='w-full flex flex-col gap-2 px-4 m-4'>
<div className='flex justify-between items-center gap-2 w-full'>
<div className='flex items-center gap-2'>
<Icon icon='material-symbols:error-outline' width={24} height={24} />