From a34a8b05de3a3fd9715109eabc4e07befe66c54d Mon Sep 17 00:00:00 2001 From: Carlo Venusino Date: Wed, 13 May 2020 15:43:18 +0200 Subject: [PATCH] TT#81166 CF: As a Customer, I want to add new forwarding groups "If call from ..." Change-Id: I421dbdb6606700af34d52426149990516c5da764 --- .../pages/NewCallForward/CscCallForwardGroup.vue | 4 ++++ .../pages/NewCallForward/CscNewCallForward.vue | 15 +++++++++++++++ src/locales/en.json | 1 + 3 files changed, 20 insertions(+) diff --git a/src/components/pages/NewCallForward/CscCallForwardGroup.vue b/src/components/pages/NewCallForward/CscCallForwardGroup.vue index e4d696cf..db9cdcbe 100644 --- a/src/components/pages/NewCallForward/CscCallForwardGroup.vue +++ b/src/components/pages/NewCallForward/CscCallForwardGroup.vue @@ -170,6 +170,10 @@ case "csc-timeout": title = `${this.$t('pages.newCallForward.titles.timeoutGroup')}`; break; + case "csc-unconditional-from": + case "csc-timeout-from": + title = `${this.$t('pages.newCallForward.titles.timeoutGroupFrom')}`; + break; case "csc-offline": title = `${this.$t('pages.newCallForward.titles.offlineGroup')}`; break; diff --git a/src/components/pages/NewCallForward/CscNewCallForward.vue b/src/components/pages/NewCallForward/CscNewCallForward.vue index b7c98537..2c3d5e75 100644 --- a/src/components/pages/NewCallForward/CscNewCallForward.vue +++ b/src/components/pages/NewCallForward/CscNewCallForward.vue @@ -199,6 +199,21 @@ } } break; + case "unconditional-from":{ + if(this.toggleDefaultNumber){ + const tempTimeoutFwdGroup = await this.$store.dispatch('newCallForward/getForwardGroupById', 'temp-csc-timeout-from'); + if(!tempTimeoutFwdGroup){ + await this.$store.dispatch('newCallForward/addTempGroup','timeoutFrom' ); + } + } + else{ + const tempUnconditionalFwdGroup = await this.$store.dispatch('newCallForward/getForwardGroupById', 'temp-csc-unconditional-from'); + if(!tempUnconditionalFwdGroup){ + await this.$store.dispatch('newCallForward/addTempGroup','unconditionalFrom' ); + } + } + } + break; case "offline":{ await this.$store.dispatch('newCallForward/addTempGroup','offline' ); } diff --git a/src/locales/en.json b/src/locales/en.json index b9642f77..ef2577b2 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -213,6 +213,7 @@ "newCallForward": { "titles": { "timeoutGroup" : "If online", + "timeoutGroupFrom" : "If online and call from ...", "offlineGroup" : "If offline", "busyGroup" : "If busy" },