Refactor: Unify moderation queue for all entities

This commit is contained in:
gpt-engineer-app[bot]
2025-10-01 20:00:22 +00:00
parent 5831705fe2
commit d100e0188b
11 changed files with 94 additions and 223 deletions

View File

@@ -64,25 +64,22 @@ const Operators = () => {
return;
}
const result = await submitCompanyCreation(
await submitCompanyCreation(
data,
'operator',
user.id,
isModerator()
user.id
);
toast({
title: result.submitted ? "Operator Submitted" : "Operator Created",
description: result.submitted
? "Your submission has been sent for review."
: "The operator has been created successfully."
title: "Operator Submitted",
description: "Your submission has been sent for review."
});
setIsCreateModalOpen(false);
} catch (error: any) {
toast({
title: "Error",
description: error.message || "Failed to create operator.",
description: error.message || "Failed to submit operator.",
variant: "destructive"
});
}