mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-22 06:28:19 +02:00
Update task status validation and add admin devalidation
Update AvoirFormData type to include nocodbVerified and nocodbVerifiedAt for enhanced status management and validation workflows. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869/chkBbcP
This commit is contained in:
1 parent
52f585d1b1
commit
d310eb8909
1 file changed
+7
-1
@@ -98,6 +98,12 @@ const avoirSchema = z.object({
|
|||||||
|
|
||||||
type AvoirFormData = z.infer<typeof avoirSchema>;
|
type AvoirFormData = z.infer<typeof avoirSchema>;
|
||||||
|
|
||||||
|
// Type étendu pour les mises à jour incluant les champs de validation
|
||||||
|
type AvoirUpdateData = AvoirFormData & {
|
||||||
|
nocodbVerified?: boolean;
|
||||||
|
nocodbVerifiedAt?: Date | null;
|
||||||
|
};
|
||||||
|
|
||||||
export default function Avoirs() {
|
export default function Avoirs() {
|
||||||
const [searchTerm, setSearchTerm] = useState("");
|
const [searchTerm, setSearchTerm] = useState("");
|
||||||
const [isCreateDialogOpen, setIsCreateDialogOpen] = useState(false);
|
const [isCreateDialogOpen, setIsCreateDialogOpen] = useState(false);
|
||||||
@@ -198,7 +204,7 @@ export default function Avoirs() {
|
|||||||
|
|
||||||
// Edit avoir mutation
|
// Edit avoir mutation
|
||||||
const editAvoirMutation = useMutation({
|
const editAvoirMutation = useMutation({
|
||||||
mutationFn: async ({ id, data }: { id: number, data: AvoirFormData }) => {
|
mutationFn: async ({ id, data }: { id: number, data: AvoirUpdateData }) => {
|
||||||
const response = await fetch(`/api/avoirs/${id}`, {
|
const response = await fetch(`/api/avoirs/${id}`, {
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
Reference in new issue
Block a user