This commit is contained in:
2020-12-30 17:02:40 +00:00
parent 13436fc68a
commit 07ff575ad0
9 changed files with 1169 additions and 6 deletions

View File

@@ -311,10 +311,24 @@
data-cy="usesBanking"
:error-messages="form().serverErrors(this, 'usesBanking')"
@change="fieldValueChanged('usesBanking')"
></v-checkbox>
>
<template v-slot:append>
<v-btn
outlined
small
color="primary"
@click="openServiceBank"
class="ml-12"
>
<v-icon>{{ serviceBankIcon() }}</v-icon></v-btn
>
</template>
</v-checkbox>
</v-col>
<!-- --------------------------------- -->
<!--
--------------------------------- -->
<v-col v-if="form().showMe(this, 'Notes')" cols="12">
<v-textarea
v-model="obj.notes"
@@ -913,6 +927,25 @@ export default {
}
},
methods: {
serviceBankIcon: function() {
if (this.obj.usesBanking != true || this.$route.params.recordid == 0) {
return null;
}
return "$ayiCarBattery";
},
openServiceBank: function() {
if (this.obj.usesBanking != true || this.$route.params.recordid == 0) {
return null;
}
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;
},