mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-21 14:08:15 +02:00
Merge pull request #376 from R0m1k3/1.1
Update the task management interface to include status changes and ed…
This commit is contained in:
1 file changed
+5
-2
@@ -74,6 +74,7 @@ const avoirSchema = z.object({
|
|||||||
amount: z.number().optional(),
|
amount: z.number().optional(),
|
||||||
comment: z.string().optional(),
|
comment: z.string().optional(),
|
||||||
commercialProcessed: z.boolean().optional(),
|
commercialProcessed: z.boolean().optional(),
|
||||||
|
status: z.enum(["En attente de demande", "Demandé", "Reçu"]).optional(),
|
||||||
});
|
});
|
||||||
|
|
||||||
type AvoirFormData = z.infer<typeof avoirSchema>;
|
type AvoirFormData = z.infer<typeof avoirSchema>;
|
||||||
@@ -219,6 +220,7 @@ export default function Avoirs() {
|
|||||||
amount: undefined,
|
amount: undefined,
|
||||||
comment: "",
|
comment: "",
|
||||||
commercialProcessed: false,
|
commercialProcessed: false,
|
||||||
|
status: "En attente de demande",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -232,6 +234,7 @@ export default function Avoirs() {
|
|||||||
amount: undefined,
|
amount: undefined,
|
||||||
comment: "",
|
comment: "",
|
||||||
commercialProcessed: false,
|
commercialProcessed: false,
|
||||||
|
status: "En attente de demande",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -257,7 +260,7 @@ export default function Avoirs() {
|
|||||||
amount: avoir.amount,
|
amount: avoir.amount,
|
||||||
comment: avoir.comment || "",
|
comment: avoir.comment || "",
|
||||||
commercialProcessed: avoir.commercialProcessed,
|
commercialProcessed: avoir.commercialProcessed,
|
||||||
status: avoir.status,
|
status: avoir.status as "En attente de demande" | "Demandé" | "Reçu",
|
||||||
});
|
});
|
||||||
setIsEditDialogOpen(true);
|
setIsEditDialogOpen(true);
|
||||||
};
|
};
|
||||||
@@ -552,7 +555,7 @@ export default function Avoirs() {
|
|||||||
<p className="mt-1 text-sm text-gray-500">
|
<p className="mt-1 text-sm text-gray-500">
|
||||||
{searchTerm ? "Aucun avoir ne correspond à votre recherche." : "Commencez par créer votre premier avoir."}
|
{searchTerm ? "Aucun avoir ne correspond à votre recherche." : "Commencez par créer votre premier avoir."}
|
||||||
</p>
|
</p>
|
||||||
{canCreate && !searchTerm && (
|
{!searchTerm && (
|
||||||
<Button className="mt-4" onClick={() => setIsCreateDialogOpen(true)}>
|
<Button className="mt-4" onClick={() => setIsCreateDialogOpen(true)}>
|
||||||
<Plus className="h-4 w-4 mr-2" />
|
<Plus className="h-4 w-4 mr-2" />
|
||||||
Créer un avoir
|
Créer un avoir
|
||||||
|
|||||||
Reference in new issue
Block a user