diff --git a/ayanova/src/api/open-object-handler.js b/ayanova/src/api/open-object-handler.js
index 6cf3f84f..bf3e6ac7 100644
--- a/ayanova/src/api/open-object-handler.js
+++ b/ayanova/src/api/open-object-handler.js
@@ -213,6 +213,12 @@ export default {
params: { recordid: tid.id }
});
break;
+ case ayatype.ServiceBank:
+ vm.$router.push({
+ name: "service-bank-edit",
+ params: { recordid: tid.id }
+ });
+ break;
default:
window.$gz.eventBus.$emit(
diff --git a/ayanova/src/views/acc-service-bank.vue b/ayanova/src/views/acc-service-bank.vue
index 074f9712..79d3298a 100644
--- a/ayanova/src/views/acc-service-bank.vue
+++ b/ayanova/src/views/acc-service-bank.vue
@@ -9,154 +9,23 @@
> {{ name }}
-
-
-
+
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -216,7 +85,7 @@ export default {
);
if (!vm.obj.objectId || !vm.obj.objectType) {
- throw "ObjectType and ObjectId are required to set a reminder";
+ throw "ObjectType and ObjectId are required to create a service bank entry";
}
vm.name = vm.$route.params.name;
@@ -298,14 +167,6 @@ export default {
serverError: {}
},
rights: window.$gz.role.defaultRightsObject(),
- ayaType: window.$gz.type.ServiceBank,
- currentUserIsASupervisor: window.$gz.role.hasRole([
- window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull,
- window.$gz.role.AUTHORIZATION_ROLES.DispatchFull,
- window.$gz.role.AUTHORIZATION_ROLES.InventoryFull,
- window.$gz.role.AUTHORIZATION_ROLES.SalesFull,
- window.$gz.role.AUTHORIZATION_ROLES.AccountingFull
- ]),
name: null
};
},
diff --git a/ayanova/src/views/cust-customer.vue b/ayanova/src/views/cust-customer.vue
index fb1f1b98..92a867e2 100644
--- a/ayanova/src/views/cust-customer.vue
+++ b/ayanova/src/views/cust-customer.vue
@@ -312,7 +312,7 @@
:error-messages="form().serverErrors(this, 'usesBanking')"
@change="fieldValueChanged('usesBanking')"
>
-
+
- {{ serviceBankIcon() }}$ayiCarBattery
@@ -927,24 +927,19 @@ export default {
}
},
methods: {
- serviceBankIcon: function() {
- if (this.obj.usesBanking != true || this.$route.params.recordid == 0) {
- return null;
- }
-
- return "$ayiCarBattery";
+ canOpenServiceBank: function() {
+ return this.obj.usesBanking == true && this.$route.params.recordid != 0;
},
openServiceBank: function() {
- if (this.obj.usesBanking != true || this.$route.params.recordid == 0) {
- return null;
+ if (this.canOpenServiceBank()) {
+ this.$router.push({
+ name: "service-banks",
+ params: {
+ objectType: window.$gz.type.Customer,
+ objectId: this.$route.params.recordid
+ }
+ });
}
- this.$router.push({
- name: "service-banks",
- params: {
- objectType: window.$gz.type.Customer,
- objectId: this.$route.params.recordid
- }
- });
},
canSave: function() {
return this.formState.valid && this.formState.dirty;
diff --git a/ayanova/src/views/home-review.vue b/ayanova/src/views/home-review.vue
index 8a0f18e7..5bebe0ea 100644
--- a/ayanova/src/views/home-review.vue
+++ b/ayanova/src/views/home-review.vue
@@ -216,7 +216,7 @@ export default {
);
if (!vm.obj.objectId || !vm.obj.objectType) {
- throw "ObjectType and ObjectId are required to set a reminder";
+ throw "ObjectType and ObjectId are required to create a review";
}
vm.name = vm.$route.params.name;