rename all variants of naming that hold an AyaType value to "aType" (parameter) / "AType" (not parameter) everywhere front and back; "ayType", "objectType", "oType" all are used in various areas

This commit is contained in:
2021-03-23 17:06:05 +00:00
parent f1777818bd
commit 01655061f3
69 changed files with 196 additions and 228 deletions

View File

@@ -96,9 +96,9 @@ export default {
};
},
/////////////////////////////////
// oType is the name of the object type as defined in ayatype.js
// aType is the name of the object type as defined in ayatype.js
//
getRights(oType) {
getRights(aType) {
//from bizroles.cs:
//HOW THIS WORKS / WHATS EXPECTED
//Change = CREATE, RETRIEVE, UPDATE, DELETE - Full rights
@@ -113,13 +113,13 @@ export default {
//Get the type name from the type enum value
//de-lodash
// let typeName = window.$gz. _.findKey(window.$gz.type, function(o) {
// return o == oType;
// return o == aType;
// });
//my _.findKey replacement:
let typeName = undefined;
for (const [key, value] of Object.entries(window.$gz.type)) {
if (value == oType) {
if (value == aType) {
typeName = key;
break;
}
@@ -129,7 +129,7 @@ export default {
let objectRoleRights = this.ROLE_RIGHTS[typeName];
if (!objectRoleRights) {
throw new Error(
`authorizationroles::getRights type ${oType} not found in roles collection`
`authorizationroles::getRights type ${aType} not found in roles collection`
);
}
@@ -163,8 +163,8 @@ export default {
// convenience method for forms that deal with multiple object types
// (i.e. grids, history etc, initialization of main menu etc)
//
canOpen(oType) {
let r = this.getRights(oType);
canOpen(aType) {
let r = this.getRights(aType);
//convention is change might be defined but not read so canOpen is true eitehr way
return r.change == true || r.read == true;
},
@@ -172,8 +172,8 @@ export default {
// convenience method for forms that deal with multiple object types
// (i.e. grids, history etc, initialization of main menu etc)
//
canChange(oType) {
let r = this.getRights(oType);
canChange(aType) {
let r = this.getRights(aType);
return r.change == true;
}
};