"chore: update frontend dev script to include lint checks and add ESLint config file"

This commit is contained in:
louiscklaw
2025-06-04 02:35:32 +08:00
parent c0fad42f0a
commit 22fb620eef
48 changed files with 3315 additions and 97 deletions

View File

@@ -37,19 +37,22 @@ export function InvoiceDetails({ invoice }: Props) {
const { t } = useTranslation();
const [currentStatus, setCurrentStatus] = useState(invoice?.status);
const handleChangeStatus = useCallback((event: React.ChangeEvent<HTMLInputElement>) => {
// setCurrentStatus(event.target.value);
const handleChangeStatus = useCallback(
(event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
// setCurrentStatus(event.target.value);
try {
changeStatus(invoice.id, event.target.value);
setCurrentStatus(event.target.value);
try {
changeStatus(invoice.id, event.target.value);
setCurrentStatus(event.target.value);
toast.success('status changed!');
} catch (error) {
console.error(error);
toast.warning('error during changing status');
}
}, []);
toast.success('status changed!');
} catch (error) {
console.error(error);
toast.warning('error during changing status');
}
},
[]
);
const renderFooter = () => (
<Box