mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 05:11:13 -05:00
feat: Implement moderator notifications
This commit is contained in:
@@ -99,11 +99,16 @@ export function OperatorForm({ onSubmit, onCancel, initialData }: OperatorFormPr
|
||||
|
||||
setIsSubmitting(true);
|
||||
try {
|
||||
const formData = {
|
||||
...data,
|
||||
founded_year: data.founded_year ? parseInt(String(data.founded_year)) : undefined,
|
||||
};
|
||||
|
||||
if (initialData?.id) {
|
||||
await submitOperatorUpdate(initialData.id, data, user.id);
|
||||
await submitOperatorUpdate(initialData.id, formData, user.id);
|
||||
toast.success('Operator update submitted for review');
|
||||
} else {
|
||||
await submitOperatorCreation(data, user.id);
|
||||
await submitOperatorCreation(formData, user.id);
|
||||
toast.success('Operator submitted for review');
|
||||
}
|
||||
onCancel();
|
||||
|
||||
Reference in New Issue
Block a user