This commit is contained in:
@@ -177,33 +177,20 @@ export default {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
//Does the database need to be erased?
|
||||
let res = await window.$gz.api.get("license/database-empty");
|
||||
//We never expect there to be no data here
|
||||
if (!res.hasOwnProperty("data")) {
|
||||
return Promise.reject(res);
|
||||
let dialogResult = await window.$gz.dialog.confirmGeneric(
|
||||
"AdminEraseDatabaseWarning",
|
||||
"warning"
|
||||
);
|
||||
if (dialogResult == false) {
|
||||
return;
|
||||
}
|
||||
if (res.data != true) {
|
||||
let dialogResult = await window.$gz.dialog.confirmGeneric(
|
||||
"AdminEraseDatabaseWarning",
|
||||
"warning"
|
||||
);
|
||||
if (dialogResult == false) {
|
||||
return;
|
||||
}
|
||||
|
||||
dialogResult = await window.$gz.dialog.confirmGeneric(
|
||||
"AdminEraseDatabaseLastWarning",
|
||||
"error"
|
||||
);
|
||||
if (dialogResult == false) {
|
||||
return;
|
||||
}
|
||||
//call erase
|
||||
await window.$gz.api.upsert(
|
||||
"license/permanently-erase-all-data",
|
||||
"I understand"
|
||||
);
|
||||
dialogResult = await window.$gz.dialog.confirmGeneric(
|
||||
"AdminEraseDatabaseLastWarning",
|
||||
"error"
|
||||
);
|
||||
if (dialogResult == false) {
|
||||
return;
|
||||
}
|
||||
|
||||
//call seed route
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
{{ $store.state.customerRights }}
|
||||
todo: backend customer rights checks in conjunction with this form
|
||||
|
||||
<UnderConstruction data-cy="underconstruction" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -72,8 +72,22 @@
|
||||
append-icon=""
|
||||
></v-select>
|
||||
</v-col>
|
||||
<!-- //MIGRATE_OUTSTANDING put workorder picklist here and show if has a woitemid or whatever is required to link to the wo -->
|
||||
<!-- ---------------------------------- -->
|
||||
|
||||
<v-col
|
||||
v-if="obj.workOrderItemId != null"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<v-btn text @click="openWO()">
|
||||
<v-icon>$ayiTools</v-icon>
|
||||
<span class="text-h6 accent--text" @click="openWO()"
|
||||
>{{ $ay.t("WorkOrder") }} {{ obj.workOrderItemViz }}</span
|
||||
></v-btn
|
||||
>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<v-text-field
|
||||
v-model="obj.name"
|
||||
@@ -418,6 +432,12 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openWO: function() {
|
||||
window.$gz.eventBus.$emit("openobject", {
|
||||
type: window.$gz.type.WorkOrderItem,
|
||||
id: this.obj.workOrderItemId
|
||||
});
|
||||
},
|
||||
priorityColor: function() {
|
||||
switch (this.obj.priority) {
|
||||
case 1: //asap
|
||||
|
||||
Reference in New Issue
Block a user