diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 363ea31e..ee4233d6 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -37,7 +37,7 @@ todo: actual customer reports so can figure out datalist for bringing other name CURRENTLY DOING: ServiceBank - todo: fix wrong source column data showing + todo: replicate servicebank open code from Customer form to HO and Unit diff --git a/ayanova/src/views/cust-head-office.vue b/ayanova/src/views/cust-head-office.vue index 76f79186..f75a9bd5 100644 --- a/ayanova/src/views/cust-head-office.vue +++ b/ayanova/src/views/cust-head-office.vue @@ -247,7 +247,19 @@ data-cy="usesBanking" :error-messages="form().serverErrors(this, 'usesBanking')" @change="fieldValueChanged('usesBanking')" - > + > + @@ -815,6 +827,20 @@ export default { } }, methods: { + canOpenServiceBank: function() { + return this.obj.usesBanking == true && this.$route.params.recordid != 0; + }, + openServiceBank: function() { + if (this.canOpenServiceBank()) { + this.$router.push({ + name: "service-banks", + params: { + objectType: window.$gz.type.HeadOffice, + objectId: this.$route.params.recordid + } + }); + } + }, canSave: function() { return this.formState.valid && this.formState.dirty; },