TT#82509 CF: As a Customer, I want to remove the condition "call from ..."

EXTRA:
- Main title
-- √ change wording online -> available
-- √ Add number placeholder after Primary number
-- √ if no groups exist label should be “All calls group to the primary number”

- √ When adding a sourceset to an unpersisted group, all the popovers should be in the same context,
- √ and the alert message should be within the popover (instead of yellow toast)

- √  Change buttons in the sourceset edit popover
ADD button for adding sources under the input field
CLOSE and DELETE (red + trash icon) buttons for the whole list on the same line at the bottom of the popover

- √ Prevent creation of more than one unpersisted group by alerting the user “You have to create a destination on the unsaved group”

- √ Gray out “All calls go to the primary number” on available groups when group is disabled

Cosmetic
- √ Remove bold from main title
- √ Adjust paddings for buttons in the popover
- √ Line heights within each group should be consistent
- √ Timeout popover > more width + dots

Change-Id: I1adab34f5bd921779027adacf7ff50f235ff2510
changes/35/40635/12
Carlo Venusino 5 years ago
parent bbe96a8df1
commit 092e6bd224

@ -4,6 +4,7 @@
:title="title" :title="title"
:titleIcon="titleIcon" :titleIcon="titleIcon"
:opened="opened" :opened="opened"
@close="onClose()"
> >
<div <div
slot="content" slot="content"
@ -50,6 +51,9 @@
close() { close() {
this.$refs.dialogComp.close(); this.$refs.dialogComp.close();
}, },
onClose(){
this.$emit('closed');
},
cancel() { cancel() {
this.close(); this.close();
this.$emit('cancel'); this.$emit('cancel');

@ -88,6 +88,7 @@
}, },
close() { close() {
this.$refs.modal.close(); this.$refs.modal.close();
this.$emit('close');
}, },
cancel() { cancel() {
this.close(); this.close();

@ -8,11 +8,9 @@
class="row csc-cf-destination-cont" class="row csc-cf-destination-cont"
> >
<div <div
class="col col-xs-12 col-md-4 text-right csc-cf-group-title" class="col col-xs-12 col-md-4 text-right csc-cf-group-title-bold"
> >
{{groupTitle}} {{groupTitle}}
<span <span
class="csc-cf-destination-add-condition" class="csc-cf-destination-add-condition"
v-if="isTempGroup" v-if="isTempGroup"
@ -124,11 +122,12 @@
</div> </div>
<div <div
class="csc-cf-row row" class="csc-cf-destination-cont row"
v-if="isTimeoutOrUnconditional" v-if="isTimeoutOrUnconditional"
> >
<div <div
class="col col-xs-12 col-md-4 text-right" class="col col-xs-12 col-md-4 text-right"
:class="{ 'csc-cf-destination-disabled': !isEnabled }"
> >
{{ toggleLabel }} {{ toggleLabel }}
</div> </div>
@ -213,9 +212,7 @@
import { import {
mapGetters, mapGetters,
} from 'vuex' } from 'vuex'
import {
showGlobalWarning
} from '../../../helpers/ui'
import { import {
QSpinnerDots, QSpinnerDots,
QToggle, QToggle,
@ -251,7 +248,6 @@
QItemSide, QItemSide,
CscConfirmDialog, CscConfirmDialog,
CscObjectSpinner, CscObjectSpinner,
showGlobalWarning,
CscNewCallForwardDestination, CscNewCallForwardDestination,
CscNewCallForwardAddDestinationForm, CscNewCallForwardAddDestinationForm,
CscNewCallForwardEditSources, CscNewCallForwardEditSources,
@ -380,8 +376,14 @@
showFirstDestMenu(){ showFirstDestMenu(){
const firstDestinationCmp = this.$refs.destination[0]; const firstDestinationCmp = this.$refs.destination[0];
firstDestinationCmp.firstDestinationInCreation = true; firstDestinationCmp.firstDestinationInCreation = true;
if(this.group.name.includes('timeout') || this.group.name.includes('unconditional')){
firstDestinationCmp.movePopoverTimeoutToTop();
}
else{
firstDestinationCmp.movePopoverToTop();
}
firstDestinationCmp.$refs.destTypeForm.open(); firstDestinationCmp.$refs.destTypeForm.open();
showGlobalWarning(`${this.$t('pages.newCallForward.mandatoryDestinationLabel')}`, 5000)
}, },
async showConditionForm(){ async showConditionForm(){
this.toggleConditionFromForm = false; this.toggleConditionFromForm = false;
@ -441,6 +443,10 @@
this.sourceSet = sourceSet; this.sourceSet = sourceSet;
this.sources = this.sourceSet.sources; this.sources = this.sourceSet.sources;
} }
else{
this.sourceSet = null;
this.sources = [];
}
} }
}, },
showConfirmDialog(){ showConfirmDialog(){
@ -466,6 +472,9 @@
@import '../../../themes/app.common.styl' @import '../../../themes/app.common.styl'
.csc-cf-group .csc-cf-group
width 100% width 100%
.csc-cf-group-title-bold
text-align right
font-weight bold
.csc-cf-group-cont .csc-cf-group-cont
position relative position relative
.csc-cf-destination-label .csc-cf-destination-label

@ -7,8 +7,15 @@
> >
<div <div
class="col col-xs-12 col-md-4 csc-cf-group-title" class="col col-xs-12 col-md-4 csc-cf-group-title"
v-if="this.groupsCount > 0"
> >
{{ $t('pages.newCallForward.titles.mainTitle') }} {{ $t('pages.newCallForward.titles.mainTitle', {number: this.subscriberDisplayName}) }}
</div>
<div
class="col col-xs-12 col-md-4 csc-cf-group-title"
v-else
>
{{$t('pages.newCallForward.primarNumberEnabled')}} {{ subscriberDisplayName }}
</div> </div>
<div <div
class="col col-xs-12 col-md-2 text-left csc-cf-self-number-cont" class="col col-xs-12 col-md-2 text-left csc-cf-self-number-cont"
@ -91,6 +98,9 @@
import { import {
mapGetters, mapGetters,
} from 'vuex' } from 'vuex'
import {
showGlobalWarning
} from '../../../helpers/ui'
import { import {
QSpinnerDots, QSpinnerDots,
QField, QField,
@ -114,6 +124,7 @@
CscNewCallForwardDestination, CscNewCallForwardDestination,
CscNewCallForwardAddDestinationForm, CscNewCallForwardAddDestinationForm,
CscNewCallForwardDestinationsetTypeSelect, CscNewCallForwardDestinationsetTypeSelect,
showGlobalWarning,
QSpinnerDots, QSpinnerDots,
QField, QField,
QToggle, QToggle,
@ -152,53 +163,64 @@
'subscriberDisplayName', 'subscriberDisplayName',
'forwardGroups', 'forwardGroups',
'selectedDestType' 'selectedDestType'
]) ]),
groupsCount(){
return this.forwardGroups.length;
}
}, },
methods: { methods: {
async addForwardGroup(){ async addForwardGroup(){
this.groupInCreation = true; this.groupInCreation = true;
const selectedDestType = this.selectedDestType; const selectedDestType = this.selectedDestType;
switch(selectedDestType){ let tempGroups = this.forwardGroups.filter(($group)=>{
case "unconditional":{ return $group.id.toString().indexOf('temp-') > -1;
if(this.toggleDefaultNumber){ });
const tempTimeoutFwdGroup = await this.$store.dispatch('newCallForward/getForwardGroupById', 'temp-csc-timeout');
if(!tempTimeoutFwdGroup){ if(tempGroups.length > 0){
await this.$store.dispatch('newCallForward/addTempGroup','timeout' ); showGlobalWarning(`${this.$t('pages.newCallForward.addDestinationAlert')}`, 5000);
}
else{
switch(selectedDestType){
case "unconditional":{
if(this.toggleDefaultNumber){
const tempTimeoutFwdGroup = await this.$store.dispatch('newCallForward/getForwardGroupById', 'temp-csc-timeout');
if(!tempTimeoutFwdGroup){
await this.$store.dispatch('newCallForward/addTempGroup','timeout' );
}
} }
} else{
else{ const tempUnconditionalFwdGroup = await this.$store.dispatch('newCallForward/getForwardGroupById', 'temp-csc-unconditional');
const tempUnconditionalFwdGroup = await this.$store.dispatch('newCallForward/getForwardGroupById', 'temp-csc-unconditional'); if(!tempUnconditionalFwdGroup){
if(!tempUnconditionalFwdGroup){ await this.$store.dispatch('newCallForward/addTempGroup','unconditional' );
await this.$store.dispatch('newCallForward/addTempGroup','unconditional' ); }
} }
} }
} break;
break; case "unconditional-from":{
case "unconditional-from":{ if(this.toggleDefaultNumber){
if(this.toggleDefaultNumber){ const tempTimeoutFwdGroup = await this.$store.dispatch('newCallForward/getForwardGroupById', 'temp-csc-timeout-from');
const tempTimeoutFwdGroup = await this.$store.dispatch('newCallForward/getForwardGroupById', 'temp-csc-timeout-from'); if(!tempTimeoutFwdGroup){
if(!tempTimeoutFwdGroup){ await this.$store.dispatch('newCallForward/addTempGroup','timeoutFrom' );
await this.$store.dispatch('newCallForward/addTempGroup','timeoutFrom' ); }
} }
} else{
else{ const tempUnconditionalFwdGroup = await this.$store.dispatch('newCallForward/getForwardGroupById', 'temp-csc-unconditional-from');
const tempUnconditionalFwdGroup = await this.$store.dispatch('newCallForward/getForwardGroupById', 'temp-csc-unconditional-from'); if(!tempUnconditionalFwdGroup){
if(!tempUnconditionalFwdGroup){ await this.$store.dispatch('newCallForward/addTempGroup','unconditionalFrom' );
await this.$store.dispatch('newCallForward/addTempGroup','unconditionalFrom' ); }
} }
} }
break;
case "offline":{
await this.$store.dispatch('newCallForward/addTempGroup','offline' );
}
break;
case "busy":{
await this.$store.dispatch('newCallForward/addTempGroup','busy' );
}
break;
} }
break;
case "offline":{
await this.$store.dispatch('newCallForward/addTempGroup','offline' );
}
break;
case "busy":{
await this.$store.dispatch('newCallForward/addTempGroup','busy' );
}
break;
} }
this.groupInCreation = false; this.groupInCreation = false;
}, },
showForm(){ showForm(){
@ -224,7 +246,6 @@
float right float right
.csc-cf-group-title .csc-cf-group-title
text-align right text-align right
font-weight bold
.csc-cf-destinations-cont .csc-cf-destinations-cont
margin-top 25px margin-top 25px
.csc-cf-field-toggle .csc-cf-field-toggle

@ -11,7 +11,7 @@
@error="error" @error="error"
/> />
<div <div
class="csc-form-actions row justify-center" class="csc-form-actions row justify-center csc-actions-cont"
> >
<q-btn <q-btn
flat flat
@ -79,7 +79,8 @@
'disable', 'disable',
'loading', 'loading',
'groupName', 'groupName',
'groupId' 'groupId',
'firstDestinationInCreation'
], ],
validations: { validations: {
number: { number: {
@ -122,7 +123,7 @@
await this.$store.dispatch('newCallForward/loadForwardGroups'); await this.$store.dispatch('newCallForward/loadForwardGroups');
if(this.destinationIndex === 0){ if(this.destinationIndex === 0 && this.firstDestinationInCreation){
await this.$store.dispatch('newCallForward/setFirstDestinationInCreation', newGroupId); await this.$store.dispatch('newCallForward/setFirstDestinationInCreation', newGroupId);
} }
@ -161,4 +162,6 @@
<style lang="stylus" rel="stylesheet/stylus"> <style lang="stylus" rel="stylesheet/stylus">
@import '../../../themes/app.common.styl' @import '../../../themes/app.common.styl'
.csc-actions-cont
margin-bottom 15px
</style> </style>

@ -18,7 +18,7 @@
/> />
<div <div
class="csc-form-actions row justify-center" class="csc-form-actions row justify-center csc-actions-cont"
> >
<q-btn <q-btn
flat flat
@ -162,4 +162,6 @@
<style lang="stylus" rel="stylesheet/stylus"> <style lang="stylus" rel="stylesheet/stylus">
@import '../../../themes/app.common.styl' @import '../../../themes/app.common.styl'
.csc-actions-cont
margin-bottom 15px
</style> </style>

@ -22,7 +22,8 @@
label-always label-always
:step="5" :step="5"
:min="5" :min="5"
:max="300" :max="60"
markers
snap snap
/> />
</q-popover> </q-popover>
@ -47,10 +48,16 @@
ref="destTypeForm" ref="destTypeForm"
class="csc-cf-dest-popover-bottom" class="csc-cf-dest-popover-bottom"
v-if="!isVoiceMail()" v-if="!isVoiceMail()"
v-bind:class="{ 'csc-cf-popover-hide': disableDestType }" v-bind:class="{ 'csc-cf-popover-hide': disableDestType, 'csc-cf-popover-to-top': popoverToTop, 'csc-cf-popover-timeout-to-top': popoverTimeoutToTop }"
@open="showDestTypeForm()" @open="showDestTypeForm()"
@close="showNext()" @close="showNext()"
> >
<div
v-if="this.firstDestinationInCreation && (this.popoverToTop || this.popoverTimeoutToTop)"
class="csc-cf-popver-alert"
>
{{ $t('pages.newCallForward.mandatoryDestinationLabel') }}
</div>
<csc-new-call-forward-destination-type-form <csc-new-call-forward-destination-type-form
ref="selectDestinationType" ref="selectDestinationType"
/> />
@ -60,8 +67,9 @@
ref="numberForm" ref="numberForm"
class="csc-cf-number-form csc-cf-dest-popover-bottom" class="csc-cf-number-form csc-cf-dest-popover-bottom"
v-if="!isVoiceMail()" v-if="!isVoiceMail()"
v-bind:class="{ 'csc-cf-popover-hide': disableNumberPopover }" v-bind:class="{ 'csc-cf-popover-hide': disableNumberPopover, 'csc-cf-popover-to-top': popoverToTop, 'csc-cf-popover-timeout-to-top': popoverTimeoutToTop }"
@open="showNumberForm()" @open="showNumberForm()"
@close="movePopoverToInitialPos(); movePopoverTimeoutToInitialPos()"
> >
<csc-new-call-forward-add-destination-form <csc-new-call-forward-add-destination-form
ref="addDestinationForm" ref="addDestinationForm"
@ -69,6 +77,7 @@
:destination="this.destinationNumber" :destination="this.destinationNumber"
:groupName="this.groupName" :groupName="this.groupName"
:groupId="this.groupId" :groupId="this.groupId"
:firstDestinationInCreation="this.firstDestinationInCreation"
/> />
</q-popover> </q-popover>
</div> </div>
@ -142,7 +151,9 @@
destinationIndex: null, destinationIndex: null,
removeInProgress: false, removeInProgress: false,
toggleNumberForm: true, toggleNumberForm: true,
firstDestinationInCreation: false firstDestinationInCreation: false,
popoverToTop: false,
popoverTimeoutToTop: false
} }
}, },
computed: { computed: {
@ -192,7 +203,12 @@
await this.$store.dispatch('newCallForward/addVoiceMail', this.groupId); await this.$store.dispatch('newCallForward/addVoiceMail', this.groupId);
} }
await this.$store.dispatch('newCallForward/removeGroupLoader', this.groupId); await this.$store.dispatch('newCallForward/removeGroupLoader', this.groupId);
this.popoverToTop = false;
this.popoverTimeoutToTop = false;
break; break;
default:
this.popoverToTop = false;
this.popoverTimeoutToTop = false;
} }
}, },
showNumberForm(){ showNumberForm(){
@ -242,6 +258,18 @@
: this.isVoiceMail() : this.isVoiceMail()
? `${this.$t('pages.newCallForward.voiceMailLabel')}` ? `${this.$t('pages.newCallForward.voiceMailLabel')}`
: ""; : "";
},
movePopoverToTop(){
this.popoverToTop = true;
},
movePopoverToInitialPos(){
this.popoverToTop = false;
},
movePopoverTimeoutToTop(){
this.popoverTimeoutToTop = true;
},
movePopoverTimeoutToInitialPos(){
this.popoverTimeoutToTop = false;
} }
} }
} }
@ -262,10 +290,11 @@
.csc-cf-destination-link .csc-cf-destination-link
color $primary color $primary
cursor pointer cursor pointer
.csc-cf-timeout-form, .csc-cf-timeout-form
min-width 200px
padding 0 20px 20px 20px
.csc-cf-number-form .csc-cf-number-form
padding 0 20px 0 20px padding 0 20px 0 20px
min-width 120px
.csc-cf-dest-number-cont .csc-cf-dest-number-cont
padding-left 30px padding-left 30px
.csc-cf-destination-actions .csc-cf-destination-actions
@ -279,4 +308,15 @@
visibility hidden visibility hidden
opacity 0 opacity 0
transition visibility 0s 2s, opacity 2s linear transition visibility 0s 2s, opacity 2s linear
.csc-cf-popover-to-top
position: fixed;
margin: -4vh 0px 0px -120px;
.csc-cf-popover-timeout-to-top
position: fixed;
margin: -8.5vh 0px 0px -120px;
.csc-cf-popver-alert
padding 10px
max-width 160px
font-size 12px
color $red
</style> </style>

@ -2,6 +2,7 @@
<div <div
v-if="enabled" v-if="enabled"
class="csc-form" class="csc-form"
v-bind:class="{ 'csc-cf-popover-hide': toggleFormVisibility}"
> >
<div class="col text-left col-xs-12 col-md-12 "> <div class="col text-left col-xs-12 col-md-12 ">
@ -9,9 +10,25 @@
class='csc-cf-sourceset-name' class='csc-cf-sourceset-name'
> >
{{ sourceSetName }} {{ sourceSetName }}
<span
class="csc-cf-delete-sourceset-btn"
>
<csc-confirm-dialog
ref="confirmDialog"
title-icon="delete"
:title="$t('pages.newCallForward.cancelSourcesetDialogTitle', {name: this.sourceSetName})"
:message="$t('pages.newCallForward.cancelSourcesetText', {name: this.sourceSetName})"
@confirm="confirmDeleteSourceset"
@closed="restorePopver"
/>
</span>
</div> </div>
</div> </div>
<div <div
v-for="(source, item) in sources" v-for="(source, item) in sources"
@ -36,10 +53,20 @@
@submit="save()" @submit="save()"
@error="errorNumber" @error="errorNumber"
/> />
<q-btn
v-if="!loading"
flat
color="primary"
icon="add"
@click="save()"
:disable="saveDisabled"
class="csc-cf-btn-reduced-size"
>
</q-btn>
</div> </div>
<div <div
class="csc-form-actions row justify-center" class="csc-form-actions row justify-center csc-actions-cont"
> >
<q-btn <q-btn
flat flat
@ -47,17 +74,15 @@
icon="clear" icon="clear"
@mousedown.native="cancel()" @mousedown.native="cancel()"
> >
{{ $t('buttons.cancel') }} {{ $t('buttons.close') }}
</q-btn> </q-btn>
<q-btn <q-btn
v-if="!loading"
flat flat
color="primary" color="red"
icon="done" icon="delete"
@click="save()" @mousedown.native="showRemoveDialog()"
:disable="saveDisabled"
> >
{{ $t('buttons.save') }} {{ $t('buttons.remove') }}
</q-btn> </q-btn>
<div <div
v-if="loading" v-if="loading"
@ -75,6 +100,7 @@
} from 'vuex' } from 'vuex'
import CscNewCallForwardInput from './CscNewCallForwardInput' import CscNewCallForwardInput from './CscNewCallForwardInput'
import CscNewCallForwardSource from './CscNewCallForwardSource' import CscNewCallForwardSource from './CscNewCallForwardSource'
import CscConfirmDialog from "../../CscConfirmationDialog";
import CscSpinner from '../../CscSpinner' import CscSpinner from '../../CscSpinner'
import { import {
showGlobalError showGlobalError
@ -93,6 +119,7 @@
components: { components: {
CscNewCallForwardInput, CscNewCallForwardInput,
CscNewCallForwardSource, CscNewCallForwardSource,
CscConfirmDialog,
CscSpinner, CscSpinner,
QField, QField,
QInput, QInput,
@ -106,7 +133,8 @@
number: '', number: '',
numberError: false, numberError: false,
destinationIndex: null, destinationIndex: null,
sources: [] sources: [],
toggleFormVisibility: false
} }
}, },
props: [ props: [
@ -171,6 +199,22 @@
await this.$store.dispatch('newCallForward/removeGroupLoader', this.groupId); await this.$store.dispatch('newCallForward/removeGroupLoader', this.groupId);
} }
}, },
showRemoveDialog(){
this.$refs.confirmDialog.open();
this.toggleFormVisibility = true;
},
async confirmDeleteSourceset(){
await this.$store.dispatch('newCallForward/addGroupLoader', this.groupId);
await this.$store.dispatch('newCallForward/deleteSourcesetById', this.sourceSetId);
await this.$store.dispatch('newCallForward/loadMappings');
await this.$store.dispatch('newCallForward/loadSourcesets');
await this.$store.dispatch('newCallForward/loadForwardGroups');
await this.$store.dispatch('newCallForward/removeGroupLoader', this.groupId);
this.restorePopver();
},
restorePopver(){
this.toggleFormVisibility = false;
},
cancel() { cancel() {
this.number = ''; this.number = '';
this.enabled = false; this.enabled = false;
@ -196,4 +240,15 @@
@import '../../../themes/app.common.styl' @import '../../../themes/app.common.styl'
.csc-cf-sourceset-name .csc-cf-sourceset-name
margin-top 10px margin-top 10px
.csc-cf-popover-hide
display none
.csc-cf-delete-sourceset-btn
float right
margin-top -10px
margin-right -20px
.csc-cf-btn-reduced-size
.on-left
margin-right 0px
.csc-actions-cont
margin-bottom 15px
</style> </style>

@ -3,7 +3,7 @@
class="row csc-cf-source-cont" class="row csc-cf-source-cont"
v-bind:class="{ 'csc-cf-removed-source': removeInProgress }" v-bind:class="{ 'csc-cf-removed-source': removeInProgress }"
> >
<div class="col text-left col-xs-12 col-md-6 "> <div class="col text-left col-xs-12 col-md-10 ">
<div <div
class='csc-cf-source' class='csc-cf-source'
@ -13,7 +13,7 @@
</div> </div>
</div> </div>
<div class="col col-xs-12 col-md-6 csc-cf-source-actions"> <div class="col col-xs-12 col-md-2 csc-cf-source-actions">
<q-icon <q-icon
name="delete" name="delete"
color="negative" color="negative"
@ -103,7 +103,6 @@
width 100% width 100%
padding 5px padding 5px
.csc-cf-source .csc-cf-source
width 100px
white-space nowrap white-space nowrap
overflow hidden overflow hidden
text-overflow ellipsis text-overflow ellipsis
@ -113,6 +112,8 @@
.csc-cf-source-actions .csc-cf-source-actions
text-align left text-align left
cursor pointer cursor pointer
.q-icon
margin-left 4px
.csc-cf-popover-hide .csc-cf-popover-hide
display none display none
.csc-cf-sourceset-name .csc-cf-sourceset-name

@ -217,7 +217,7 @@
"timeoutGroupFromPost" : "call from ...", "timeoutGroupFromPost" : "call from ...",
"offlineGroup" : "If not available", "offlineGroup" : "If not available",
"busyGroup" : "If busy", "busyGroup" : "If busy",
"mainTitle": "Primary number rings before forwarded if the user is online" "mainTitle": "Primary number {number} rings before forwarded if the user is available"
}, },
"primarNumberEnabled": "All calls go to the primary number", "primarNumberEnabled": "All calls go to the primary number",
"primarNumberDisabled": "No call goes to primary number", "primarNumberDisabled": "No call goes to primary number",
@ -235,6 +235,8 @@
"cancelDialogTitle": "Delete from {groupName} forwarding", "cancelDialogTitle": "Delete from {groupName} forwarding",
"cancelGroupDialogTitle": "Delete {groupName} forwarding group", "cancelGroupDialogTitle": "Delete {groupName} forwarding group",
"cancelDialogText": "You are about to delete {destination} from {groupName} call forwarding", "cancelDialogText": "You are about to delete {destination} from {groupName} call forwarding",
"cancelSourcesetDialogTitle": "Delete {name} sourceset",
"cancelSourcesetText": "You are about to delete {name} sourceset",
"cancelGroupDialogText": "You are about to delete {groupName} call forwarding group", "cancelGroupDialogText": "You are about to delete {groupName} call forwarding group",
"unconditionalLabel": "If available", "unconditionalLabel": "If available",
"fromLabel": "If call from ...", "fromLabel": "If call from ...",
@ -242,7 +244,8 @@
"offlineLabel": "If not available", "offlineLabel": "If not available",
"busyLabel": "If busy", "busyLabel": "If busy",
"sourcesetName": "List name", "sourcesetName": "List name",
"mandatoryDestinationLabel": "Please add a destination to the group before adding conditions" "mandatoryDestinationLabel": "Please add a destination to the group before adding conditions",
"addDestinationAlert": "You have to add a destination to the unsaved group"
}, },
"callForward": { "callForward": {
"titles": { "titles": {

@ -11,7 +11,8 @@ import {
updateDestinationsetName, updateDestinationsetName,
createSourcesetWithSource, createSourcesetWithSource,
getSourcesets, getSourcesets,
addSourceToSourceset addSourceToSourceset,
deleteSourcesetById
} from '../api/call-forward'; } from '../api/call-forward';
const ForwardGroup = { const ForwardGroup = {
@ -129,7 +130,7 @@ export default {
}, },
getSourcesesBySourcesetId: (state) => (sourceSetId) => { getSourcesesBySourcesetId: (state) => (sourceSetId) => {
const sourceSet = state.sourceSets.filter($sourceset => $sourceset.id == sourceSetId); const sourceSet = state.sourceSets.filter($sourceset => $sourceset.id == sourceSetId);
return sourceSet ? sourceSet[0].sources : null; return sourceSet && sourceSet[0] ? sourceSet[0].sources : null;
} }
}, },
mutations: { mutations: {
@ -625,6 +626,9 @@ export default {
async removeSourceFromSourceset(context, data){ async removeSourceFromSourceset(context, data){
await addSourceToSourceset(data) await addSourceToSourceset(data)
}, },
async deleteSourcesetById(context, sourceSetId){
await deleteSourcesetById(sourceSetId)
},
setFirstDestinationInCreation(context, groupId){ setFirstDestinationInCreation(context, groupId){
context.commit('setFirstDestinationInCreation', groupId); context.commit('setFirstDestinationInCreation', groupId);
} }

Loading…
Cancel
Save