This commit is contained in:
2019-05-22 00:13:30 +00:00
parent a56aa13613
commit 0868def995
6 changed files with 47 additions and 17 deletions

View File

@@ -7,7 +7,19 @@ TODO:
- DONE Delete works but triggers navigation guard when record has been edited and is dirty and it attempts to navigate away after deletion automatically
- Dirty delete should clear dirty after successful delete then move away or whatever
- DONE About form when you go to log doesn't update the title bar showing log, still seems to say about ayanova
- About page - should show currently logged in user name, doesn't actually show anywhere right now
TODO: About AyaNova form
- About page CLIENT section
- should show currently logged in user name, doesn't actually show anywhere right now
- should show the exact client browser and device info as much as possible as it also serves as the tech support info thing
- Maybe make a support info local class in client that can gather the correct info and then can be used to both display and to send to us for support with a click
- Also add a tech support reporting form / button that will gather up support info and possibly also send it to us??
- Sends to rockfish?
- Generates an email?
- At least copy it to clipboard on desktop or enable sharing so can share on device to email
- LOGIN: hitting enter / return should be equivalent of clicking on OK button
- Not actionable but FF is super slow on Lenovo and had to reset and reload multiple times to get to the app, but it did update almost immediately once it was loading.
- Also the icon is still showing the old outdated favicon, didn't reset, slow and fucky, app works though, no issues
@@ -98,12 +110,7 @@ TODO: Delete widget button and rights stuff
TODO: History button, other AyaNova 7 example buttons all need to be there or their equivalent, do we need a top menu type thing?
- Also Save button at bottom seems like an issue too
TODO: About AyaNova form should show the exact client browser and device info as much as possible as it also serves as the tech support info thing
- Maybe make a support info local class in client that can gather the correct info and then can be used to both display and to send to us for support with a click
- Also add a tech support reporting form / button that will gather up support info and possibly also send it to us??
- Sends to rockfish?
- Generates an email?
- At least copy it to clipboard on desktop or enable sharing so can share on device to email
TODO: TAGS!!! Do tags mofo
TODO: //todo: timezone doesn't match, offer to fix it in initialize.js there needs to be a prompt and autofix
TODO: Automated testing of UI by driving web interaction, that needs to be instituted asap

View File

@@ -1,5 +1,24 @@
import store from "../store";
export default {
version: "8.0.0-alpha.5",
copyright:
"Copyright © 1999-2019, Ground Zero Tech-Works Inc. All Rights Reserved"
"Copyright © 1999-2019, Ground Zero Tech-Works Inc. All Rights Reserved",
userName: store.state.userName,
browser: {
platform: window.navigator.platform,
userAgent: window.navigator.userAgent,
language: window.navigator.language,
oscpu: window.navigator.oscpu,
maxTouchPoints: window.navigator.maxTouchPoints,
webdriver: window.navigator.webdriver,
vendor: window.navigator.vendor,
availWidth: window.screen.availWidth,
availHeight: window.screen.availHeight,
width: window.screen.width,
height: window.screen.height,
devicePixelRatio: window.devicePixelRatio,
pixelDepth: window.screen.pixelDepth
}
};
TODO: SHOw this shit

View File

@@ -48,15 +48,16 @@ export default {
/////////////////////////////////
//
//
getRights(vm, oType, ownerId) {
getRights(vm, oType) {
//from bizroles.cs:
//HOW THIS WORKS / WHATS EXPECTED
//Change = CREATE, RETRIEVE, UPDATE, DELETE - Full rights
//EditOwn = special subset of CHANGE: You can create and if it's one you created then you have rights to edit it or delete, but you can't edit ones others have created
//
//ReadFullRecord = You can read *all* the fields of the record, but can't modify it. Change is automatically checked for so only add different roles from change
//PICKLIST NOTE: this does not control getting a list of names for selection which is role independent because it's required for so much indirectly
//DELETE = SAME AS CHANGE FOR NOW (There is no specific delete right for now though it's checked for by routes in Authorized.cs in case we want to add it in future as a separate right from create.)
//NOTE: biz rules can supersede this, this is just for general rights purposes, if an object has restrictive business rules they will take precedence every time.
var ret = {
change: false,
@@ -71,18 +72,17 @@ export default {
//Get the AyaNova stock role rights for that object
var objectRoleRights = this.ROLE_RIGHTS[typeName];
//get the logged in user's role
var userRole = vm.$store.state.roles;
//see if it's self owned
var isSelfOwned = ownerId == vm.$store.state.userId;
//calculate the effective rights taking into consideration self owned etc
//calculate the effective rights
//a non zero result of the bitwise calculation means true and zero means false so using !! to force it into a boolean value (contrary to some style guides that say !! is obscure but I say it saves a lot of typing)
var canChange = !!(userRole & objectRoleRights.Change);
var canEditOwn = isSelfOwned && (!!(userRole & objectRoleRights.EditOwn));
var canChange = !!(userRole & objectRoleRights.Change);
var canReadFullRecord = !!(userRole & objectRoleRights.ReadFullRecord);
ret.change=canChange || canEditOwn;
ret.change=canChange;
ret.delete=ret.change;//FOR NOW
ret.read=canReadFullRecord;

View File

@@ -40,6 +40,7 @@ export function processLogin(response) {
apiToken: response.data.token,
authenticated: true,
userId: Number(token.id),
userName: token.name,
roles: token["ayanova/roles"]
});

View File

@@ -1,6 +1,6 @@
var rights = JSON.parse(
//TODO CACHE THIS??
'{"User":{"Change":2,"EditOwn":0,"ReadFullRecord":1},"UserOptions":{"Change":2,"EditOwn":0,"ReadFullRecord":1},"Widget":{"Change":34,"EditOwn":256,"ReadFullRecord":17},"ServerState":{"Change":16384,"EditOwn":0,"ReadFullRecord":32767},"License":{"Change":16386,"EditOwn":0,"ReadFullRecord":8193},"LogFile":{"Change":0,"EditOwn":0,"ReadFullRecord":24576},"JobOperations":{"Change":16384,"EditOwn":0,"ReadFullRecord":8195},"AyaNova7Import":{"Change":16384,"EditOwn":0,"ReadFullRecord":0},"Metrics":{"Change":0,"EditOwn":0,"ReadFullRecord":24576},"Locale":{"Change":16386,"EditOwn":0,"ReadFullRecord":32767},"DataFilter":{"Change":2,"EditOwn":32767,"ReadFullRecord":32767},"FormCustom":{"Change":2,"EditOwn":0,"ReadFullRecord":32767}}'
'{"User":{"Change":2,"ReadFullRecord":1},"UserOptions":{"Change":2,"ReadFullRecord":1},"Widget":{"Change":34,"ReadFullRecord":17},"ServerState":{"Change":16384,"ReadFullRecord":32767},"License":{"Change":16386,"ReadFullRecord":8193},"LogFile":{"Change":0,"ReadFullRecord":24576},"JobOperations":{"Change":16384,"ReadFullRecord":8195},"AyaNova7Import":{"Change":16384,"ReadFullRecord":0},"Metrics":{"Change":0,"ReadFullRecord":24576},"Locale":{"Change":16386,"ReadFullRecord":32767},"DataFilter":{"Change":2,"ReadFullRecord":32767},"FormCustom":{"Change":2,"ReadFullRecord":32767}}'
);
export default rights;
/**

View File

@@ -15,6 +15,7 @@ export default new Vuex.Store({
helpUrl: "",
apiToken: "-",
userId: 0,
userName: "NOT AUTHENTICATED",
roles: 0,
localeText: {},
navItems: [],
@@ -27,11 +28,13 @@ export default new Vuex.Store({
state.userId = data.userId;
state.roles = data.roles;
state.apiToken = data.apiToken;
state.userName = data.userName;
},
logout(state) {
state.apiToken = "-";
state.authenticated = false;
state.userId = 0;
state.userName = "NOT AUTHENTICATED";
state.roles = 0;
state.navItems = [];
state.localeText = {};