add selected task group User option to fill in user automatically for assignment

This commit is contained in:
2022-02-11 19:15:23 +00:00
parent f79d3c0c74
commit 508b66ca52
4 changed files with 52 additions and 13 deletions

View File

@@ -204,9 +204,7 @@ Coded by importance
\_____|______|_____|______|_| \_| |_|
todo: 1 Restriced user is supposed to only be able to edit tehir own tasks but it's coded to allow them to view and attempt to edit other users task.
validation catches it but gives a cryptic error that the user is incorrect. TEchnically it's working but they shouuld not even see other users's tasks
when not assigned to them so this is a bug
todo: 1 Add task group allow to choose the User at same time or will have to assign them all which is fucked for a restricted user
@@ -868,7 +866,7 @@ BUILD 8.0.0-beta.0.14 CHANGES OF NOTE
- case 4112 added, also other changes that were on my list
- native browser time control now shows the label
- Help -> about added items to show settings for Dark mode and Use native browser date time inputs
- work order item tasks cleaned up restricted user being able to edit other users tasks but then getting server error, now it just prevents any edit also in UI

View File

@@ -291,6 +291,14 @@
:label="$ay.t('TaskGroupList')"
data-cy="selectedTaskGroup"
></gz-pick-list>
<gz-pick-list
v-model="selectedTaskGroupUser"
:aya-type="$ay.ayt().User"
variant="tech"
:show-edit-icon="!value.userIsRestrictedType"
:label="$ay.t('WorkOrderItemTaskUser')"
@update:name="selectedTaskGroupUserChange"
></gz-pick-list>
</v-card-text>
<v-card-actions>
<v-btn text color="primary" @click="taskGroupDialog = false">{{
@@ -337,7 +345,9 @@ export default {
activeItemIndex: null,
selectedRow: [],
taskGroupDialog: false,
selectedTaskGroup: null
selectedTaskGroup: null,
selectedTaskGroupUser: null,
selectedTaskGroupUserName: null
};
},
computed: {
@@ -524,12 +534,12 @@ export default {
task: z.task,
status: 1, //incomplete==1
statusViz: incompleteViz,
completedByUserId: null,
completedByUserId: this.selectedTaskGroupUser,
completedDate: null,
isDirty: true,
pmItemId: this.value.items[this.activeWoItemIndex].id,
uid: Date.now(),
completedByUserViz: null
completedByUserViz: this.selectedTaskGroupUserName
});
});
this.$emit("change");
@@ -656,6 +666,9 @@ export default {
ret += this.form().tableRowErrorClass();
}
return ret;
},
selectedTaskGroupUserChange(newName) {
this.selectedTaskGroupUserName = newName;
}
}
};

View File

@@ -291,6 +291,15 @@
:label="$ay.t('TaskGroupList')"
data-cy="selectedTaskGroup"
></gz-pick-list>
<gz-pick-list
v-model="selectedTaskGroupUser"
:aya-type="$ay.ayt().User"
variant="tech"
:show-edit-icon="!value.userIsRestrictedType"
:label="$ay.t('WorkOrderItemTaskUser')"
@update:name="selectedTaskGroupUserChange"
></gz-pick-list>
</v-card-text>
<v-card-actions>
<v-btn text color="primary" @click="taskGroupDialog = false">{{
@@ -337,7 +346,9 @@ export default {
activeItemIndex: null,
selectedRow: [],
taskGroupDialog: false,
selectedTaskGroup: null
selectedTaskGroup: null,
selectedTaskGroupUser: null,
selectedTaskGroupUserName: null
};
},
computed: {
@@ -521,12 +532,12 @@ export default {
task: z.task,
status: 1, //incomplete==1
statusViz: incompleteViz,
completedByUserId: null,
completedByUserId: this.selectedTaskGroupUser,
completedDate: null,
isDirty: true,
quoteItemId: this.value.items[this.activeWoItemIndex].id,
uid: Date.now(),
completedByUserViz: null
completedByUserViz: this.selectedTaskGroupUserName
});
});
this.$emit("change");
@@ -653,6 +664,9 @@ export default {
ret += this.form().tableRowErrorClass();
}
return ret;
},
selectedTaskGroupUserChange(newName) {
this.selectedTaskGroupUserName = newName;
}
}
};

View File

@@ -302,6 +302,15 @@
:label="$ay.t('TaskGroupList')"
data-cy="selectedTaskGroup"
></gz-pick-list>
<gz-pick-list
v-model="selectedTaskGroupUser"
:aya-type="$ay.ayt().User"
variant="tech"
:show-edit-icon="!value.userIsRestrictedType"
:label="$ay.t('WorkOrderItemTaskUser')"
@update:name="selectedTaskGroupUserChange"
></gz-pick-list>
</v-card-text>
<v-card-actions>
<v-btn text color="primary" @click="taskGroupDialog = false">{{
@@ -349,7 +358,9 @@ export default {
activeItemIndex: null,
selectedRow: [],
taskGroupDialog: false,
selectedTaskGroup: null
selectedTaskGroup: null,
selectedTaskGroupUser: null,
selectedTaskGroupUserName: null
};
},
computed: {
@@ -535,12 +546,12 @@ export default {
task: z.task,
status: 1, //incomplete==1
statusViz: incompleteViz,
completedByUserId: null,
completedByUserId: this.selectedTaskGroupUser,
completedDate: null,
isDirty: true,
workOrderItemId: this.value.items[this.activeWoItemIndex].id,
uid: Date.now(),
completedByUserViz: null
completedByUserViz: this.selectedTaskGroupUserName
});
});
this.$emit("change");
@@ -667,6 +678,9 @@ export default {
ret += this.form().tableRowErrorClass();
}
return ret;
},
selectedTaskGroupUserChange(newName) {
this.selectedTaskGroupUserName = newName;
}
}
};