re-factor / cleanup

This commit is contained in:
2022-01-11 22:08:38 +00:00
parent e871708b20
commit e0be8a7cfe
251 changed files with 14680 additions and 15693 deletions

View File

@@ -542,7 +542,7 @@ export default {
r = await that.extractBodyEx(r);
return r;
} catch (error) {
handleError("POSTATTACHMENT", error, route);
handleError("POSTATTACHMENT", error, "uploadAttachmentRoute");
}
},
//////////////////////////////////////////////
@@ -616,7 +616,7 @@ export default {
r = await that.extractBodyEx(r);
return r;
} catch (error) {
handleError("uploadLogo", error, route);
handleError("uploadLogo", error, "postLogoRoute");
}
},
///////////////////////////////////
@@ -633,7 +633,6 @@ export default {
LanguageName: window.$gz.locale.getResolvedLanguage(),
Hour12: window.$gz.locale.getHour12(),
CurrencyName: window.$gz.locale.getCurrencyName(),
LanguageName: window.$gz.locale.getResolvedLanguage(),
DefaultLocale: window.$gz.locale.getResolvedLanguage().split("-", 1)[0], //kind of suspect, maybe it can be removed
PDFDate: window.$gz.locale.utcDateToShortDateLocalized(nowUtc),
PDFTime: window.$gz.locale.utcDateToShortTimeLocalized(nowUtc)
@@ -646,7 +645,7 @@ export default {
async fetchBizObjectName(ayaType, objectId) {
const res = await this.get(`name/${ayaType}/${objectId}`);
//We never expect there to be no data here
if (!res.hasOwnProperty("data")) {
if (!Object.prototype.hasOwnProperty.call(res, "data")) {
return Promise.reject(res);
} else {
return res.data;