This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -247,7 +247,19 @@
|
||||
data-cy="usesBanking"
|
||||
:error-messages="form().serverErrors(this, 'usesBanking')"
|
||||
@change="fieldValueChanged('usesBanking')"
|
||||
></v-checkbox>
|
||||
>
|
||||
<template v-slot:append v-if="canOpenServiceBank()">
|
||||
<v-btn
|
||||
outlined
|
||||
small
|
||||
color="primary"
|
||||
@click="openServiceBank"
|
||||
class="ml-12"
|
||||
>
|
||||
<v-icon>$ayiCarBattery</v-icon></v-btn
|
||||
>
|
||||
</template></v-checkbox
|
||||
>
|
||||
</v-col>
|
||||
|
||||
<!-- --------------------------------- -->
|
||||
@@ -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;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user