mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
feat(z-task-modal): implement draft handling for timeblocks and improve employee-specific timeblock management
This commit is contained in:
1 parent
1bca6cbfae
commit
81aaa293dd
3 files changed
+212
-49
No files matched your search
@@ -87,8 +87,8 @@ export default {
|
||||
...mapGetters('tm', ['enrichedEmployees']),
|
||||
|
||||
normalizedEmployees() {
|
||||
// Draft with multiple employees
|
||||
if (this.subtask.is_draft && Array.isArray(this.subtask.employees)) {
|
||||
// Drafts always have employees array
|
||||
if (this.subtask.is_draft) {
|
||||
return this.subtask.employees
|
||||
.filter((emp) => emp.id) // Filter out empty employee slots
|
||||
.map((emp) => ({
|
||||
@@ -99,7 +99,7 @@ export default {
|
||||
}));
|
||||
}
|
||||
|
||||
// Single employee (published subtask)
|
||||
// Published subtask - single employee format
|
||||
return [
|
||||
{
|
||||
id: this.subtask.employee_id,
|
||||
@@ -111,6 +111,11 @@ export default {
|
||||
},
|
||||
|
||||
hasMultipleEmployees() {
|
||||
// For drafts, always use multi-employee styling (even with 1 employee)
|
||||
if (this.subtask.is_draft) {
|
||||
return true;
|
||||
}
|
||||
// For published subtasks, check actual count
|
||||
return this.normalizedEmployees.length > 1;
|
||||
},
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user