This commit is contained in:
@@ -98,6 +98,9 @@ import GzWoItemScheduledUsers from "../components/work-order-item-scheduled-user
|
||||
ideally not in menu because it would be a lot on a workorder and need space for wo graph subitem links
|
||||
todo: need an editable control at every level for proper test of partial update
|
||||
todo: highlight currently selected row, mobile and full
|
||||
todo: failed saved on a grandchild item shouldn't preclude the rest saving
|
||||
e.g. if there is a concurrency error on a child that shouldn't block the rest but a fatal error probably should
|
||||
todo: do we need a dirty indicator at every level??
|
||||
*/
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -648,8 +648,10 @@ async function saveItems(vm) {
|
||||
if (totalItems == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (let i = 0; i < totalItems; i++) {
|
||||
let o = vm.obj.items[i];
|
||||
|
||||
if (o.isDirty) {
|
||||
let res = await window.$gz.api.upsert(`${API_BASE_URL}items`, o);
|
||||
if (res.error) {
|
||||
@@ -676,12 +678,13 @@ async function saveItems(vm) {
|
||||
// SCHEDULED USERS
|
||||
//
|
||||
async function saveScheduledUsers(vm, woitemid) {
|
||||
let totalItems = vm.obj.items[woitemid].scheduledUsers.length;
|
||||
let woitemindex = vm.obj.items.findIndex(z => z.id == woitemid);
|
||||
let totalItems = vm.obj.items[woitemindex].scheduledUsers.length;
|
||||
if (totalItems == 0) {
|
||||
return;
|
||||
}
|
||||
for (let i = 0; i < totalItems; i++) {
|
||||
let o = vm.obj.items[woitemid].scheduledUsers[i];
|
||||
let o = vm.obj.items[woitemindex].scheduledUsers[i];
|
||||
if (o.isDirty) {
|
||||
let res = await window.$gz.api.upsert(`${API_BASE_URL}scheduledusers`, o);
|
||||
if (res.error) {
|
||||
|
||||
Reference in New Issue
Block a user