|
|
|
@ -12,15 +12,15 @@
|
|
|
|
|
separator
|
|
|
|
|
link
|
|
|
|
|
>
|
|
|
|
|
<q-item @click="enableForm('number'), $refs.popover.close()">
|
|
|
|
|
<q-item @click="addDestinationByType('number'), $refs.popover.close()">
|
|
|
|
|
{{ $t('pages.callForward.buttons.addNumber') }}
|
|
|
|
|
</q-item>
|
|
|
|
|
<q-item @click="enableForm('voicebox'), $refs.popover.close()">
|
|
|
|
|
<q-item @click="addDestinationByType('voicebox'), $refs.popover.close()">
|
|
|
|
|
{{ $t('pages.callForward.buttons.addVoicemail') }}
|
|
|
|
|
</q-item>
|
|
|
|
|
<q-item
|
|
|
|
|
v-if="hasFaxCapability && hasSendFaxFeature"
|
|
|
|
|
@click="enableForm('fax2mail'), $refs.popover.close()"
|
|
|
|
|
@click="addDestinationByType('fax2mail'), $refs.popover.close()"
|
|
|
|
|
>
|
|
|
|
|
{{ $t('pages.callForward.buttons.addFax2Mail') }}
|
|
|
|
|
</q-item>
|
|
|
|
@ -49,12 +49,12 @@
|
|
|
|
|
:error-label="timeoutInputError"
|
|
|
|
|
>
|
|
|
|
|
<q-input
|
|
|
|
|
v-if="isFormTypeNumber"
|
|
|
|
|
:before="beforeIconTimeout"
|
|
|
|
|
:float-label="$t('pages.callForward.timeout')"
|
|
|
|
|
type="number"
|
|
|
|
|
v-model="destinationForm.timeout"
|
|
|
|
|
suffix="seconds"
|
|
|
|
|
clearable
|
|
|
|
|
@input="$v.destinationForm.timeout.$touch"
|
|
|
|
|
@blur="$v.destinationForm.timeout.$touch"
|
|
|
|
|
:error="$v.destinationForm.timeout.$error"
|
|
|
|
@ -213,21 +213,24 @@
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
enableForm(type) {
|
|
|
|
|
let lastDestination = _.findLast(this.destinations) || {};
|
|
|
|
|
this.formEnabled = true;
|
|
|
|
|
addDestinationByType(type) {
|
|
|
|
|
this.$store.commit('callForward/setFormType', type);
|
|
|
|
|
this.$store.commit('callForward/setActiveForm', this.groupName);
|
|
|
|
|
let lastDestination = _.findLast(this.destinations) || {};
|
|
|
|
|
this.$store.commit('callForward/setDestinationsetId', this.id);
|
|
|
|
|
this.$store.commit('callForward/setGroupName', this.groupName);
|
|
|
|
|
this.$store.commit('callForward/setPriority', lastDestination.priority || 1);
|
|
|
|
|
if (type === 'voicebox') {
|
|
|
|
|
this.destinationForm.destination = 'Voicemail';
|
|
|
|
|
this.addDestination();
|
|
|
|
|
}
|
|
|
|
|
else if (type === 'fax2mail') {
|
|
|
|
|
this.destinationForm.destination = 'Fax2Mail';
|
|
|
|
|
this.addDestination();
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this.$v.$reset();
|
|
|
|
|
this.formEnabled = true;
|
|
|
|
|
this.$store.commit('callForward/setActiveForm', this.groupName);
|
|
|
|
|
this.destinationForm.destination = '';
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -235,6 +238,7 @@
|
|
|
|
|
this.destinationForm.timeout = 300;
|
|
|
|
|
this.destinationForm.destination = '';
|
|
|
|
|
this.formEnabled = false;
|
|
|
|
|
this.$v.$reset();
|
|
|
|
|
this.$store.commit('callForward/resetFormState');
|
|
|
|
|
this.$store.commit('callForward/resetDestinationState');
|
|
|
|
|
},
|
|
|
|
|