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

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

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

Loading…
Cancel
Save