mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-15 19:29:54 +02:00
Make task assignment optional and improve task creation flow
Update task forms to remove the required field for assignment, allowing tasks to be created without an assignee and setting a default "Non assigné" value. This addresses an issue where task creation was blocked due to a mandatory assignment field. Replit-Commit-Author: Agent Replit-Commit-Session-Id: f2b9c241-9fdd-4abd-9041-720afc8b27d6 Replit-Commit-Checkpoint-Type: full_checkpoint
This commit is contained in:
1 parent
e95723fd5c
commit
f2013cd616
4 files changed
+7
-22
No files matched your search
@@ -18,10 +18,6 @@ export default function TaskFormUltraSimple({ task, onClose }: any) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!assignedTo?.trim()) {
|
||||
alert("L'assignation est requise");
|
||||
return;
|
||||
}
|
||||
|
||||
const submitBtn = e.currentTarget.querySelector('button[type="submit"]') as HTMLButtonElement;
|
||||
submitBtn.disabled = true;
|
||||
@@ -33,7 +29,7 @@ export default function TaskFormUltraSimple({ task, onClose }: any) {
|
||||
description: description?.trim() || "",
|
||||
priority: priority || "medium",
|
||||
status: status || "pending",
|
||||
assignedTo: assignedTo.trim(),
|
||||
assignedTo: assignedTo?.trim() || "Non assigné",
|
||||
startDate: startDate || null,
|
||||
dueDate: dueDate || null,
|
||||
};
|
||||
@@ -212,14 +208,13 @@ export default function TaskFormUltraSimple({ task, onClose }: any) {
|
||||
|
||||
<div>
|
||||
<label style={{ display: 'block', fontSize: '14px', fontWeight: '500', marginBottom: '8px' }}>
|
||||
Assigné à *
|
||||
Assigné à <span style={{ fontSize: '12px', color: '#6b7280' }}>(optionnel)</span>
|
||||
</label>
|
||||
<input
|
||||
name="assignedTo"
|
||||
type="text"
|
||||
defaultValue={task?.assignedTo || "admin"}
|
||||
placeholder="Nom de la personne assignée"
|
||||
required
|
||||
style={{
|
||||
width: '100%',
|
||||
padding: '8px 12px',
|
||||
|
||||
Reference in new issue
Block a user