From ff73ab66ea49d2f6c0acf76ab4883dc7c6ee2fe4 Mon Sep 17 00:00:00 2001 From: Carlo Venusino <cvenusino@sipwise.com> Date: Tue, 21 Apr 2020 17:07:44 +0200 Subject: [PATCH] TT#79755 CF: Implement menu item "If offline" Change-Id: If75abf8ea77d5cd6b88f46f57da50744867b6ccf --- .../pages/NewCallForward/CscNewCallForward.vue | 4 +++- .../CscNewCallForwardDestinationsetTypeSelect.vue | 15 +++++++++++++-- src/locales/en.json | 3 ++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/components/pages/NewCallForward/CscNewCallForward.vue b/src/components/pages/NewCallForward/CscNewCallForward.vue index 6e7d0ba5..a14db3ab 100644 --- a/src/components/pages/NewCallForward/CscNewCallForward.vue +++ b/src/components/pages/NewCallForward/CscNewCallForward.vue @@ -130,7 +130,8 @@ return { groupInCreation: false, groupsLoading: false, - toggleDefaultNumber: true + toggleDefaultNumber: true, + selectedDestType: null }; }, async mounted(){ @@ -163,6 +164,7 @@ }, methods: { async addForwardGroup(){ + // TODO check this.selectedDestType and toggle proper logic this.groupInCreation = true; if(this.toggleDefaultNumber){ const timeoutFwdGroup = await this.$store.dispatch('newCallForward/getForwardGroupByName', 'timeout'); diff --git a/src/components/pages/NewCallForward/CscNewCallForwardDestinationsetTypeSelect.vue b/src/components/pages/NewCallForward/CscNewCallForwardDestinationsetTypeSelect.vue index 5b981c9c..c3357c03 100644 --- a/src/components/pages/NewCallForward/CscNewCallForwardDestinationsetTypeSelect.vue +++ b/src/components/pages/NewCallForward/CscNewCallForwardDestinationsetTypeSelect.vue @@ -4,10 +4,16 @@ > <div class="csc-cf-dest-type" - @click="addDestination()" + @click="addDestinationsetUnconditional()" > {{ $t('pages.newCallForward.uncoditionalLabel') }} </div> + <div + class="csc-cf-dest-type" + @click="addDestinationsetOffline()" + > + {{ $t('pages.newCallForward.offlinelLabel') }} + </div> </div> </template> @@ -26,7 +32,12 @@ } }, methods: { - addDestination(){ + addDestinationsetUnconditional(){ + this.$parent.selectedDestType = "unconditional"; + this.$parent.close() + }, + addDestinationsetOffline(){ + this.$parent.selectedDestType = "offline"; this.$parent.close() }, cancel() { diff --git a/src/locales/en.json b/src/locales/en.json index fc14a88b..889387a5 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -225,7 +225,8 @@ "cancelDialogTitle": "Delete from {groupName} forwarding", "cancelDialogText": "You are about to delete {destination} from {groupName} call forwarding", "timeoutGroupTitle" : "", - "uncoditionalLabel": "Unconditional" + "uncoditionalLabel": "Unconditional", + "offlinelLabel": "If offline" }, "callForward": { "titles": {