TT#81165 CF: Can click a new type of forwarding group under "Add forwarding"

Change-Id: I4b03820b39fa940ee2d4543e08a8528812c88172
changes/28/40028/2
Carlo Venusino 5 years ago
parent 490cca90b5
commit a252fe21d8

@ -9,6 +9,13 @@
>
{{ $t('pages.newCallForward.unconditionalLabel') }}
</div>
<div
class="csc-cf-dest-type"
v-if="!unconditionalGroupExists && !timeoutFromGroupExists"
@click="addDestinationsetUnconditionalFrom()"
>
{{ $t('pages.newCallForward.unconditionalFromLabel') }}
</div>
<div
class="csc-cf-dest-type"
v-if="!offlineGroupExists"
@ -46,7 +53,9 @@
computed: {
...mapGetters('newCallForward', [
'timeoutGroupExists',
'timeoutFromGroupExists',
'unconditionalGroupExists',
'unconditionalFromGroupExists',
'offlineGroupExists',
'busyGroupExists'
])
@ -56,6 +65,10 @@
await this.$store.dispatch('newCallForward/setSelectedDestType', 'unconditional');
this.$parent.close()
},
async addDestinationsetUnconditionalFrom(){
await this.$store.dispatch('newCallForward/setSelectedDestType', 'unconditional-from');
this.$parent.close()
},
async addDestinationsetOffline(){
await this.$store.dispatch('newCallForward/setSelectedDestType', 'offline');
this.$parent.close()
@ -64,22 +77,7 @@
await this.$store.dispatch('newCallForward/setSelectedDestType', 'busy');
this.$parent.close()
},
// async checkTimeoutExisting(){
// const group = await this.$store.dispatch('newCallForward/getForwardGroupByName', 'timeout');
// this.timeoutExisting = !!group;
// },
// async checkUnconditionalExisting(){
// const group = await this.$store.dispatch('newCallForward/getForwardGroupByName', 'unconditional');
// this.unconditionalExisting = !!group;
// },
// async checkOfflineExisting(){
// const group = await this.$store.dispatch('newCallForward/getForwardGroupByName', 'offline');
// this.offlineExisting = !!group;
// },
// async checkBusyExisting(){
// const group = await this.$store.dispatch('newCallForward/getForwardGroupByName', 'busy');
// this.busyExisting = !!group;
// },
cancel() {
this.enabled = false;
},

@ -230,6 +230,7 @@
"cancelDialogTitle": "Delete from {groupName} forwarding",
"cancelDialogText": "You are about to delete {destination} from {groupName} call forwarding",
"unconditionalLabel": "If online",
"unconditionalFromLabel": "If online and call from ...",
"offlineLabel": "If offline",
"busyLabel": "If busy"
},

@ -16,10 +16,18 @@ const ForwardGroup = {
name : 'csc-unconditional',
mapping: 'cfu'
},
unconditionalFrom: {
name: 'csc-unconditional-from',
mapping: 'cfu'
},
timeout: {
name: 'csc-timeout',
mapping: 'cft'
},
timeoutFrom: {
name: 'csc-timeout-from',
mapping: 'cft'
},
offline: {
name: 'csc-offline',
mapping: 'cfna'
@ -81,6 +89,18 @@ export default {
});
return group && group.length > 0;
},
timeoutFromGroupExists(state){
const group = state.forwardGroups.filter(($group)=>{
return $group.name === 'csc-timeout-from'
});
return group && group.length > 0;
},
unconditionalFromGroupExists(state){
const group = state.forwardGroups.filter(($group)=>{
return $group.name === 'csc-unconditional-from'
});
return group && group.length > 0;
},
offlineGroupExists(state){
const group = state.forwardGroups.filter(($group)=>{
return $group.name === 'csc-offline'

Loading…
Cancel
Save