diff --git a/src/components/pages/NewCallForward/CscCallForwardGroup.vue b/src/components/pages/NewCallForward/CscCallForwardGroup.vue index dbd4d96b..4a6e06d5 100644 --- a/src/components/pages/NewCallForward/CscCallForwardGroup.vue +++ b/src/components/pages/NewCallForward/CscCallForwardGroup.vue @@ -37,7 +37,7 @@ :groupId="group.id" /> - {{ $t('pages.newCallForward.fromLabelShort') +'"'+ groupSourceset +'"'}} + + + +
@@ -156,6 +170,7 @@ import CscObjectSpinner from "../../CscObjectSpinner"; import CscNewCallForwardDestination from './CscNewCallForwardDestination' import CscNewCallForwardAddDestinationForm from './CscNewCallForwardAddDestinationForm' + import CscNewCallForwardEditSources from './CscNewCallForwardEditSources' import CscNewCallForwardAddSourcesetForm from './CscNewCallForwardAddSourcesetForm' import CscNewCallForwardConditionTypeSelect from './CscNewCallForwardConditionTypeSelect' import CscNewCallForwardDestinationTypeForm from './CscNewCallForwardDestinationTypeForm' @@ -176,6 +191,7 @@ CscObjectSpinner, CscNewCallForwardDestination, CscNewCallForwardAddDestinationForm, + CscNewCallForwardEditSources, CscNewCallForwardAddSourcesetForm, CscNewCallForwardConditionTypeSelect, CscNewCallForwardDestinationTypeForm @@ -187,7 +203,8 @@ toggleNumberForm: true, toggleConditionFromForm: true, toggleGroupInProgress: false, - sourceSet: null + sourceSet: null, + sources: [] }; }, async mounted(){ @@ -303,14 +320,17 @@ }, showConditions(){ this.$refs.addCondition.add(); - this.$refs.addSourceSet.cancel(); }, showSourcesetForm(){ this.$refs.addSourceSet.add(); }, + showSources(){ + this.$refs.editSources.add(); + }, resetToggleCondition(){ this.toggleConditionFromForm = true; }, + async updateSourcesetNames(){ const mappings = this.getMappings; const groupMappingId = await this.$store.dispatch('newCallForward/getMappingIdByGroupName', this.group.name); @@ -319,9 +339,10 @@ groupMapping = mappings[groupMappingId].filter(($mapping)=>{ return $mapping.destinationset_id == this.group.id; }); - sourceSet = groupMapping[0] ? await this.$store.dispatch('newCallForward/getSourcesetById', groupMapping[0].sourceset_id) : null; + sourceSet = groupMapping[0] && groupMapping[0].sourceset_id ? await this.$store.dispatch('newCallForward/getSourcesetById', groupMapping[0].sourceset_id) : null; if(sourceSet){ - this.sourceSet = sourceSet + this.sourceSet = sourceSet; + this.sources = this.sourceSet.sources; } } } diff --git a/src/components/pages/NewCallForward/CscNewCallForwardEditSources.vue b/src/components/pages/NewCallForward/CscNewCallForwardEditSources.vue new file mode 100644 index 00000000..3d8f147a --- /dev/null +++ b/src/components/pages/NewCallForward/CscNewCallForwardEditSources.vue @@ -0,0 +1,154 @@ + + + + + diff --git a/src/components/pages/NewCallForward/CscNewCallForwardSource.vue b/src/components/pages/NewCallForward/CscNewCallForwardSource.vue new file mode 100644 index 00000000..40a17824 --- /dev/null +++ b/src/components/pages/NewCallForward/CscNewCallForwardSource.vue @@ -0,0 +1,133 @@ + + + + + diff --git a/src/store/new-call-forward.js b/src/store/new-call-forward.js index b4480702..f8218193 100644 --- a/src/store/new-call-forward.js +++ b/src/store/new-call-forward.js @@ -384,6 +384,10 @@ export default { console.log(err); } }, + removeSourceFromSourceset(context, data){ + // TODO + console.log(context, data) + }, async editDestination(context, data){ let group = context.state.forwardGroups.find((group)=>{ return group.id === data.forwardGroupId;