This commit is contained in:
2021-08-06 21:22:54 +00:00
parent b8d0af21da
commit 0186da8453
3 changed files with 42 additions and 19 deletions

View File

@@ -242,6 +242,12 @@ export default {
} finally {
vm.formState.loading = false;
}
},
hideAll() {
for (let i = 0; i < this.obj.length; i++) {
this.obj[i].visible = false;
}
this.formState.dirty = true;
}
}
};
@@ -259,6 +265,9 @@ function clickHandler(menuItem) {
case "save":
m.vm.submit();
break;
case "DEVHIDEALL":
m.vm.hideAll();
break;
default:
window.$gz.eventBus.$emit(
@@ -296,6 +305,15 @@ function generateMenu(vm) {
});
}
menuOptions.menuItems.push({ divider: true, inset: false });
if (window.$gz.dev) {
menuOptions.menuItems.push({
title: "DEV HIDE ALL",
icon: "$ayiMagic",
key: FORM_KEY + ":DEVHIDEALL",
vm: vm
});
}
//Extra link to it here so people can stumble their way onto it
//plus it's related to this form and people think Customize for the whole shebang
menuOptions.menuItems.push({
@@ -304,6 +322,7 @@ function generateMenu(vm) {
data: "adm-translations",
key: "app:nav"
});
menuOptions.menuItems.push({ divider: true, inset: false });
window.$gz.eventBus.$emit("menu-change", menuOptions);
}

View File

@@ -17,7 +17,13 @@
data-cy="customerId"
></gz-pick-list>
</v-col>
<v-col cols="12" sm="6" lg="4" xl="3">
<v-col
v-if="form().showMe(this, 'Priority')"
cols="12"
sm="6"
lg="4"
xl="3"
>
<v-select
:color="priorityColor()"
:item-color="priorityColor()"
@@ -47,7 +53,13 @@
data-cy="dateRequested"
></gz-date-picker>
</v-col>
<v-col cols="12" sm="6" lg="4" xl="3">
<v-col
v-if="form().showMe(this, 'Status')"
cols="12"
sm="6"
lg="4"
xl="3"
>
<v-select
v-model="obj.status"
:items="selectLists.status"
@@ -76,12 +88,7 @@
</v-col>
<v-col
v-if="
form().showMe(
this,
'CustomerServiceRequestCustomerReferenceNumber'
)
"
v-if="form().showMe(this, 'CustomerReferenceNumber')"
cols="12"
sm="6"
lg="4"
@@ -101,7 +108,7 @@
</v-col>
<v-col
v-if="form().showMe(this, 'CustomerServiceRequestRequestedBy')"
v-if="form().showMe(this, 'RequestedByUserId')"
cols="12"
sm="6"
lg="4"
@@ -122,7 +129,7 @@
</v-col>
<v-col
v-if="form().showMe(this, 'CustomerServiceRequestItemUnitID')"
v-if="form().showMe(this, 'UnitId')"
cols="12"
sm="6"
lg="4"
@@ -143,10 +150,7 @@
</v-col>
<!-- --------------------------------- -->
<v-col
v-if="form().showMe(this, 'CustomerServiceRequestDetails')"
cols="12"
>
<v-col v-if="form().showMe(this, 'Notes')" cols="12">
<v-textarea
v-model="obj.notes"
:readonly="formState.readOnly"

View File

@@ -19,7 +19,7 @@
</v-col>
<v-col
v-if="form().showMe(this, 'ProjectAccountNumber')"
v-if="form().showMe(this, 'AccountNumber')"
cols="12"
sm="6"
lg="4"
@@ -37,7 +37,7 @@
</v-col>
<v-col
v-if="form().showMe(this, 'ProjectProjectOverseerID')"
v-if="form().showMe(this, 'ProjectOverseerID')"
cols="12"
sm="6"
lg="4"
@@ -58,14 +58,14 @@
</v-col>
<v-col
v-if="form().showMe(this, 'ProjectDateStarted')"
v-if="form().showMe(this, 'DateStarted')"
cols="12"
sm="6"
lg="4"
xl="3"
>
<gz-date-time-picker
:label="$ay.t('ProjectDateStarted')"
:label="$ay.t('DateStarted')"
v-model="obj.dateStarted"
:readonly="formState.readOnly"
ref="dateStarted"
@@ -76,7 +76,7 @@
</v-col>
<v-col
v-if="form().showMe(this, 'ProjectDateCompleted')"
v-if="form().showMe(this, 'DateCompleted')"
cols="12"
sm="6"
lg="4"