diff --git a/src/api/call-forward.js b/src/api/call-forward.js
index 62400635..593ec633 100644
--- a/src/api/call-forward.js
+++ b/src/api/call-forward.js
@@ -856,8 +856,9 @@ export function createSourcesetWithSource(options) {
sources: [{
source: options.source
}]
- }).then(() => {
- resolve();
+ }).then((data) => {
+ let id = data.headers.map.location[0].split('cfsourcesets/')[1];
+ resolve(id);
}).catch((err) => {
reject(err);
});
diff --git a/src/components/pages/NewCallForward/CscCallForwardGroup.vue b/src/components/pages/NewCallForward/CscCallForwardGroup.vue
index 0616cdc0..c46bb1c1 100644
--- a/src/components/pages/NewCallForward/CscCallForwardGroup.vue
+++ b/src/components/pages/NewCallForward/CscCallForwardGroup.vue
@@ -13,17 +13,19 @@
{{$t('pages.newCallForward.titles.timeoutGroupFromPost')}}
- TODO
-
+
+
+
+
+
+
+
diff --git a/src/components/pages/NewCallForward/CscNewCallForwardInputText.vue b/src/components/pages/NewCallForward/CscNewCallForwardInputText.vue
new file mode 100644
index 00000000..b6e4406d
--- /dev/null
+++ b/src/components/pages/NewCallForward/CscNewCallForwardInputText.vue
@@ -0,0 +1,111 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/locales/en.json b/src/locales/en.json
index 6e8a398b..9c4107b6 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -234,7 +234,8 @@
"unconditionalLabel": "If online",
"unconditionalFromLabel": "If online and call from ...",
"offlineLabel": "If offline",
- "busyLabel": "If busy"
+ "busyLabel": "If busy",
+ "sourcesetName": "List name"
},
"callForward": {
"titles": {
diff --git a/src/store/new-call-forward.js b/src/store/new-call-forward.js
index 342c2e02..d70041f5 100644
--- a/src/store/new-call-forward.js
+++ b/src/store/new-call-forward.js
@@ -8,7 +8,8 @@ import {
addDestinationToDestinationset,
addNewMapping,
updateOwnPhoneTimeout,
- updateDestinationsetName
+ updateDestinationsetName,
+ createSourcesetWithSource
} from '../api/call-forward';
const ForwardGroup = {
@@ -191,7 +192,7 @@ export default {
groupMappings.push({
"destinationset_id": data.groupId,
- "sourceset_id":null,
+ "sourceset_id": data.sourceSetId || null,
"timeset_id":null
});
@@ -547,6 +548,22 @@ export default {
},
setSelectedDestType(context, destType){
context.commit('setSelectedDestType', destType);
+ },
+ async createSourceSet(context, data){
+ const sourceSetId = await createSourcesetWithSource({
+ sourcesetName: data.name,
+ subscriberId: localStorage.getItem('subscriberId'),
+ mode: "whitelist", // TODO maybe get rid?
+ source: data.source
+ });
+ return sourceSetId;
+ },
+ async addSourcesetToGroup(context, data){
+ await context.dispatch('editMapping', {
+ name: data.name,
+ groupId: data.id,
+ sourceSetId: data.sourceSetId
+ });
}
}
};