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