This commit is contained in:
2020-11-24 23:49:41 +00:00
parent b627b1e250
commit af57c6efa4
2 changed files with 29 additions and 24 deletions

View File

@@ -76,13 +76,13 @@ CURRENTLY WORKING ON: Customer
OUTSTANDING OUTSTANDING
User opening in cust-user, not internal user, needs to know which one I guess or object open needs a hint User opening in cust-user, not internal user, needs to know which one I guess or object open needs a hint
customer notes
help docs
Customer Customer
documentation update for form
v8 migrate v8 migrate
todo: TESTING After customer form is made todo: TESTING After customer form is made
Test with devices Test with devices
ensure that a PHONE "tel" field can be triggered to make a phone call ensure that a PHONE "tel" field can be triggered to make a phone call

View File

@@ -37,24 +37,24 @@ export default {
//Is it an "Inside" user (staff or subcontractor) //Is it an "Inside" user (staff or subcontractor)
//or an "outside" user (customer or headoffice) //or an "outside" user (customer or headoffice)
//if key doesn't provide this then need to directly find out first before determining which form to redirect to //if key doesn't provide this then need to directly find out first before determining which form to redirect to
if (tid.inside == undefined && tid.id != 0) { if (tid.id != 0) {
//lookup which one to open from server //lookup which one to open from server
(async () => { (async () => {
try { try {
//shortcut for superuser, always id 1
if (tid.inside == undefined && tid.id == 1) {
tid.inside = true;
}
if (tid.inside == undefined) {
let res = await window.$gz.api.get( let res = await window.$gz.api.get(
"user/inside-type/" + tid.id "user/inside-type/" + tid.id
); );
if (res.error) { if (res.error) {
throw new Error(res.error); throw new Error(res.error);
} }
if (res.data) { if (res.data) {
tid.inside = res.data; tid.inside = res.data;
} }
} catch (e) {
throw new Error(e);
}
})();
} }
if (tid.inside == true) { if (tid.inside == true) {
vm.$router.push({ vm.$router.push({
@@ -67,6 +67,11 @@ export default {
params: { recordid: tid.id } params: { recordid: tid.id }
}); });
} }
} catch (e) {
throw new Error(e);
}
})();
}
break; break;
case ayatype.NotifySubscription: case ayatype.NotifySubscription:
vm.$router.push({ vm.$router.push({