cases 4221, 4223
This commit is contained in:
@@ -14,14 +14,16 @@ export default {
|
||||
try {
|
||||
await window.$gz.util.sleepAsync(pollingInterval);
|
||||
if (keepChecking && window.$gz.store.state.authenticated) {
|
||||
status = await window.$gz.api.get("notify/new-count");
|
||||
if (status.error) {
|
||||
throw new Error(window.$gz.errorHandler.errorToString(status));
|
||||
// throw new Error(status.error);
|
||||
} else {
|
||||
window.$gz.store.commit("setNewNotificationCount", status.data);
|
||||
//success so go to default in case it was changed by an error
|
||||
pollingInterval = DEFAULT_POLLING_INTERVAL;
|
||||
if (window.$gz.erasingDatabase == false) {
|
||||
status = await window.$gz.api.get("notify/new-count");
|
||||
if (status.error) {
|
||||
throw new Error(window.$gz.errorHandler.errorToString(status));
|
||||
// throw new Error(status.error);
|
||||
} else {
|
||||
window.$gz.store.commit("setNewNotificationCount", status.data);
|
||||
//success so go to default in case it was changed by an error
|
||||
pollingInterval = DEFAULT_POLLING_INTERVAL;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
keepChecking = false;
|
||||
|
||||
@@ -82,7 +82,8 @@ window.$gz = {
|
||||
errorHandler: errorhandler,
|
||||
store: store,
|
||||
clientInfo: ayaNovaVersion,
|
||||
dev: process.env.NODE_ENV === "development"
|
||||
dev: process.env.NODE_ENV === "development",
|
||||
erasingDatabase: false
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -435,10 +435,13 @@ export default {
|
||||
}
|
||||
|
||||
//call erase
|
||||
window.$gz.erasingDatabase = true; //suspend notify polling
|
||||
let r = await window.$gz.api.upsert(
|
||||
"license/permanently-erase-all-data-keep-tax-codes",
|
||||
"I understand"
|
||||
);
|
||||
window.$gz.erasingDatabase = false;
|
||||
|
||||
//send request
|
||||
r = await window.$gz.api.upsert("license/trialRequest", vm.request);
|
||||
if (r.error) {
|
||||
@@ -534,6 +537,7 @@ export default {
|
||||
}
|
||||
}
|
||||
//call erase
|
||||
window.$gz.erasingDatabase = true; //suspend notify polling
|
||||
await window.$gz.api.upsert(
|
||||
"license/permanently-erase-all-data-keep-tax-codes",
|
||||
"I understand"
|
||||
@@ -629,12 +633,14 @@ function generateMenu(vm) {
|
||||
});
|
||||
|
||||
//erase database
|
||||
menuOptions.menuItems.push({
|
||||
title: "AdminEraseDatabase",
|
||||
icon: "$ayiSkullCrossbones",
|
||||
key: FORM_KEY + ":erase",
|
||||
vm: vm
|
||||
});
|
||||
if (window.$gz.store.getters.isSuperUser == true) {
|
||||
menuOptions.menuItems.push({
|
||||
title: "AdminEraseDatabase",
|
||||
icon: "$ayiSkullCrossbones",
|
||||
key: FORM_KEY + ":erase",
|
||||
vm: vm
|
||||
});
|
||||
}
|
||||
}
|
||||
menuOptions.menuItems.push({
|
||||
title: "ViewEULA",
|
||||
|
||||
@@ -222,7 +222,8 @@ export default {
|
||||
return;
|
||||
}
|
||||
|
||||
//call erase before seeding
|
||||
//call the FULL (including taxcodes) erase before seeding
|
||||
window.$gz.erasingDatabase = true; //flags notify poll to suspend as user may be gone
|
||||
let r = await window.$gz.api.upsert(
|
||||
"license/permanently-erase-all-data",
|
||||
"I understand"
|
||||
@@ -230,6 +231,7 @@ export default {
|
||||
if (r.error) {
|
||||
throw new Error(window.$gz.errorHandler.errorToString(r, vm));
|
||||
}
|
||||
window.$gz.erasingDatabase = false;
|
||||
|
||||
//start the seeding
|
||||
let jobId = await window.$gz.api.upsert("trial/seed", vm.obj);
|
||||
|
||||
Reference in New Issue
Block a user