From 6258f85a54062ad1be804c62d2af54f33d6d2ce9 Mon Sep 17 00:00:00 2001 From: Spitap Date: Fri, 1 Sep 2023 13:31:49 +0200 Subject: [PATCH] Fixed message_limit issue on domains --- .../components/domains/DomainCreationForm.vue | 2 +- frontend/src/components/domains/DomainForm.vue | 8 ++++---- .../domains/DomainLimitationsForm.vue | 18 +++++++++++------- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/frontend/src/components/domains/DomainCreationForm.vue b/frontend/src/components/domains/DomainCreationForm.vue index f2b4679f2..ebcf375ef 100644 --- a/frontend/src/components/domains/DomainCreationForm.vue +++ b/frontend/src/components/domains/DomainCreationForm.vue @@ -92,7 +92,7 @@ export default { items: [ { key: this.$gettext('Quota'), value: this.domain.quota }, { key: this.$gettext('Default mailbox quota'), value: this.domain.default_mailbox_quota }, - { key: this.$gettext('Message sending limit'), value: this.domain.message_sending_limit } + { key: this.$gettext('Message sending limit'), value: this.domain.message_limit } ] } ] diff --git a/frontend/src/components/domains/DomainForm.vue b/frontend/src/components/domains/DomainForm.vue index 35f4156ac..8f53b75b3 100644 --- a/frontend/src/components/domains/DomainForm.vue +++ b/frontend/src/components/domains/DomainForm.vue @@ -89,8 +89,8 @@ Quota: {{ domain.quota }} - - Sending limit: {{ domain.message_sending_limit }} + + Sending limit: {{ domain.message_limit }} No sending limit @@ -207,7 +207,7 @@ export default { } this.working = true try { - const data = { ...this.editedDomain } + const data = JSON.parse(JSON.stringify(this.editedDomain)) if (data.transport === null) { delete data.transport } @@ -231,7 +231,7 @@ export default { domain: { handler: function (val) { if (val) { - this.editedDomain = JSON.parse(JSON.stringify(val)) + this.editedDomain = { ...val } } }, immediate: true diff --git a/frontend/src/components/domains/DomainLimitationsForm.vue b/frontend/src/components/domains/DomainLimitationsForm.vue index ba4b23e16..82ce575cd 100644 --- a/frontend/src/components/domains/DomainLimitationsForm.vue +++ b/frontend/src/components/domains/DomainLimitationsForm.vue @@ -38,7 +38,7 @@ :label="'Message sending limit' | translate" :hint="'Number of messages this domain can send per day. Leave empty for no limit.' | translate" persistent-hint - v-model="form.message_sending_limit" + v-model="form.message_limit" :error-messages="errors" outlined @input="update" @@ -49,9 +49,7 @@