This commit is contained in:
@@ -45,20 +45,7 @@ CURRENT TODOs
|
|||||||
SHELL / NAV / MENUS / LAYOUT
|
SHELL / NAV / MENUS / LAYOUT
|
||||||
|
|
||||||
TODO: LOCALIZATION
|
TODO: LOCALIZATION
|
||||||
- TODO ACTIONS
|
|
||||||
|
|
||||||
- TODO: Flag enums are a pain because they can't be re-hydrated back into their bitwise combos in the Client UI (without some math I don't know or care to find out)
|
|
||||||
- If I take roles out of widget and make that something basic enum, maybe I don't need to do the changes below but can turn a user roles into an array for edting in the client?
|
|
||||||
- i.e. fake it as if it's an array when needed that way?
|
|
||||||
- Or fuck it just make it simple array and ditch the bitwise flags, what are we really saving anyway?
|
|
||||||
- perhaps the easy thing to do is store them as an array of values instead of a single value, it's really not any amount of data to matter anyway and much easier to deal with
|
|
||||||
- So instead of 123123 for a combo of values just have [2,32,64]
|
|
||||||
- If do this change then revert the enums from being flags at the server into just an array of selections from a 1 increment enum list of roles
|
|
||||||
- i.e. No role=0, 1=BizAdminLimited, 2=xxxx, 3=xxxx etc
|
|
||||||
- MOdify server code to handle roles this way
|
|
||||||
- Modify Widget to use some other enum instead of roles for testing purposes, maybe usertype or something, whatever doesn't exactly matter, just to test shit out
|
|
||||||
|
|
||||||
- DataTable Need enum translator in it's own class or maybe part of locale or uses locale I guess
|
|
||||||
- DataTable Editing and saving a widget makes it disappear from list, the default sort order sb by record ID so they stay in same order
|
- DataTable Editing and saving a widget makes it disappear from list, the default sort order sb by record ID so they stay in same order
|
||||||
- DataTable changing screen width doesn't automatically transition to alternate view seems to require a forced refresh when it shouldn't
|
- DataTable changing screen width doesn't automatically transition to alternate view seems to require a forced refresh when it shouldn't
|
||||||
- DataTable clean out old comments / clean up code
|
- DataTable clean out old comments / clean up code
|
||||||
|
|||||||
@@ -520,25 +520,6 @@ function buildRecords(listData, columndefinitions, filters) {
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 10: //enum
|
case 10: //enum
|
||||||
//TODO: Need enum translator
|
|
||||||
//AuthorizationRoles.128
|
|
||||||
//window.$gz.local.enumLocalized(enumType, enumValue)
|
|
||||||
//(in locale) check if have that type already featched, if not fetches the whole list and caches it locally
|
|
||||||
//also a method to return the list of enumerated types in ID order with localized names
|
|
||||||
//window.$gz.local.enumList(enumType) - returns a list usable on edit forms
|
|
||||||
/* enums: {
|
|
||||||
AuthorizationRoles0:"No role",
|
|
||||||
AuthorizationRoles1:"Business admin limited"
|
|
||||||
etc
|
|
||||||
|
|
||||||
to get all authorization roles iterate list looking for start of key that is AuthorizationRoles
|
|
||||||
To get individual one same but only need to fetch actual value i.e. AuthorizationRoles1
|
|
||||||
if not one item starts with AuthorizationRoles then list needs to be fetched, maybe can use the enumpicklist route for that
|
|
||||||
This way entirely bypasses locale stuff
|
|
||||||
//big object so maybe it's own thing, not part of locale at all or locale fronts for it??
|
|
||||||
*/
|
|
||||||
// window.$gz.enums.getEnumList(columndefinitions[iColumn].et);
|
|
||||||
//display = columndefinitions[iColumn].et + "." + display;
|
|
||||||
display = window.$gz.enums.get(
|
display = window.$gz.enums.get(
|
||||||
columndefinitions[iColumn].et,
|
columndefinitions[iColumn].et,
|
||||||
display
|
display
|
||||||
@@ -614,23 +595,4 @@ async function fetchEnums(columnData) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//CURRENTLY THINKING NOT TO CACHE THIS AS
|
|
||||||
//users might only ever view the list and
|
|
||||||
//often it might not contain the whole range of options
|
|
||||||
//so would be unnecessary fetching
|
|
||||||
// `//////////////////////
|
|
||||||
// //
|
|
||||||
// //
|
|
||||||
// function preFetchEnumListNames(vm, enumListTypes) {
|
|
||||||
// //enumlisttypes is an array of enum lists to fetch names for
|
|
||||||
// return window.$gz.api
|
|
||||||
// .get("EnumPickList/list/authorizationroles")
|
|
||||||
// .then(res => {
|
|
||||||
// if (res.error) {
|
|
||||||
// throw res.error;
|
|
||||||
// }
|
|
||||||
// vm.pickLists.roles = res.data;
|
|
||||||
// });
|
|
||||||
// }`
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user