feat: Auto resolve conversations after n days of inactivity (#1308)

fixes: #418
This commit is contained in:
Akash Srivastava
2020-11-01 12:53:25 +05:30
committed by GitHub
parent 65ed4c78a4
commit 074084b258
79 changed files with 358 additions and 22 deletions

View File

@@ -62,6 +62,20 @@
"
/>
</label>
<label :class="{ error: $v.autoResolveDuration.$error }">
{{ $t('GENERAL_SETTINGS.FORM.AUTO_RESOLVE_DURATION.LABEL') }}
<input
v-model="autoResolveDuration"
type="number"
:placeholder="
$t('GENERAL_SETTINGS.FORM.AUTO_RESOLVE_DURATION.PLACEHOLDER')
"
@blur="$v.autoResolveDuration.$touch"
/>
<span v-if="$v.autoResolveDuration.$error" class="message">
{{ $t('GENERAL_SETTINGS.FORM.AUTO_RESOLVE_DURATION.ERROR') }}
</span>
</label>
</div>
</div>
<div class="current-version">
@@ -82,7 +96,7 @@
<script>
import Vue from 'vue';
import { required } from 'vuelidate/lib/validators';
import { required, minValue } from 'vuelidate/lib/validators';
import { mapGetters } from 'vuex';
import alertMixin from 'shared/mixins/alertMixin';
import configMixin from 'shared/mixins/configMixin';
@@ -98,6 +112,7 @@ export default {
domain: '',
supportEmail: '',
features: {},
autoResolveDuration: null,
};
},
validations: {
@@ -107,6 +122,9 @@ export default {
locale: {
required,
},
autoResolveDuration: {
minValue: minValue(1),
},
},
computed: {
...mapGetters({
@@ -144,6 +162,7 @@ export default {
support_email,
custom_email_domain_enabled,
features,
auto_resolve_duration,
} = this.getAccount(this.accountId);
Vue.config.lang = locale;
@@ -154,6 +173,7 @@ export default {
this.supportEmail = support_email;
this.customEmailDomainEnabled = custom_email_domain_enabled;
this.features = features;
this.autoResolveDuration = auto_resolve_duration;
} catch (error) {
// Ignore error
}
@@ -171,6 +191,7 @@ export default {
name: this.name,
domain: this.domain,
support_email: this.supportEmail,
auto_resolve_duration: this.autoResolveDuration,
});
Vue.config.lang = this.locale;
this.showAlert(this.$t('GENERAL_SETTINGS.UPDATE.SUCCESS'));