case 4203

This commit is contained in:
2022-09-30 23:57:14 +00:00
parent e560743683
commit 8b93e985d3

View File

@@ -31,7 +31,7 @@
></v-checkbox> ></v-checkbox>
</v-col> </v-col>
<v-col cols="12" sm="6" lg="4" xl="3"> <v-col v-if="!subscriptionMode" cols="12" sm="6" lg="4" xl="3">
<v-text-field <v-text-field
ref="backupSetsToKeep" ref="backupSetsToKeep"
v-model="obj.backupSetsToKeep" v-model="obj.backupSetsToKeep"
@@ -117,7 +117,7 @@ export default {
id: 1, id: 1,
concurrency: 0, concurrency: 0,
backupTime: null, backupTime: null,
backupSetsToKeep: null, backupSetsToKeep: 1,
backupAttachments: null backupAttachments: null
}, },
formState: { formState: {
@@ -140,6 +140,10 @@ export default {
computed: { computed: {
canSave: function() { canSave: function() {
return this.formState.valid && this.formState.dirty; return this.formState.valid && this.formState.dirty;
},
//case 4203
subscriptionMode() {
return window.$gz.store.state.globalSettings.sBuild;
} }
}, },
watch: { watch: {
@@ -187,6 +191,7 @@ export default {
beforeDestroy() { beforeDestroy() {
window.$gz.eventBus.$off("menu-click", clickHandler); window.$gz.eventBus.$off("menu-click", clickHandler);
}, },
methods: { methods: {
translation() { translation() {
return window.$gz.translation; return window.$gz.translation;
@@ -306,7 +311,13 @@ export default {
try { try {
if (vm.canSave) { if (vm.canSave) {
vm.formState.loading = true; vm.formState.loading = true;
window.$gz.form.deleteAllErrorBoxErrors(vm); window.$gz.form.deleteAllErrorBoxErrors(vm);
//case 4203
//always 1 if a subscription
if (this.subscriptionMode) {
vm.obj.backupSetsToKeep = 1;
}
const res = await window.$gz.api.upsert( const res = await window.$gz.api.upsert(
"global-ops-backup-setting", "global-ops-backup-setting",
vm.obj vm.obj