-
+
-
+
-
+
-
-
-
Add device
+
+ Add device
-
-
+
+
diff --git a/src/components/pages/PbxConfiguration/CscPbxDeviceConfig.vue b/src/components/pages/PbxConfiguration/CscPbxDeviceConfig.vue
index dfca7ecb..f32b794c 100644
--- a/src/components/pages/PbxConfiguration/CscPbxDeviceConfig.vue
+++ b/src/components/pages/PbxConfiguration/CscPbxDeviceConfig.vue
@@ -363,8 +363,9 @@
},
watch: {
device() {
- this.openKeyOverlay(this.selectedKey, this.selectedKeyIndex);
- this.$forceUpdate();
+ if(this.keyOverlayActive) {
+ this.selectedLine = this.getLineByKey(this.selectedKeyIndex);
+ }
}
}
}
diff --git a/src/components/pages/PbxConfiguration/CscPbxDevices.vue b/src/components/pages/PbxConfiguration/CscPbxDevices.vue
index 0fc85fd5..0cccab26 100644
--- a/src/components/pages/PbxConfiguration/CscPbxDevices.vue
+++ b/src/components/pages/PbxConfiguration/CscPbxDevices.vue
@@ -1,6 +1,5 @@
-
-
diff --git a/src/components/pages/PbxConfiguration/CscPbxModelSelect.vue b/src/components/pages/PbxConfiguration/CscPbxModelSelect.vue
index e0485b40..3e93413d 100644
--- a/src/components/pages/PbxConfiguration/CscPbxModelSelect.vue
+++ b/src/components/pages/PbxConfiguration/CscPbxModelSelect.vue
@@ -25,7 +25,7 @@
-
![]()
+
@@ -96,7 +96,7 @@
diff --git a/src/components/pages/PbxConfiguration/CscPbxSeats.vue b/src/components/pages/PbxConfiguration/CscPbxSeats.vue
index 88816699..b18e5c7c 100644
--- a/src/components/pages/PbxConfiguration/CscPbxSeats.vue
+++ b/src/components/pages/PbxConfiguration/CscPbxSeats.vue
@@ -79,7 +79,8 @@
'lastRemovedSeat',
'lastUpdatedField',
'updateAliasNumbersState',
- 'updateGroupsAndSeatsState'
+ 'updateGroupsAndSeatsState',
+ 'updateState'
]),
groupOptions() {
let groups = [];
diff --git a/src/locales/en.json b/src/locales/en.json
index 7b10dd21..05b740fe 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -295,6 +295,7 @@
"removedSeatToast": "Removed seat {seat}",
"removedDeviceToast": "Removed device {name}",
"updatedDeviceKeys": "Updated keys of device {name}",
+ "updatedStationName": "Updated station name to {name}",
"createdDevice": "Created device {name} successfully"
},
"removeDevice": "Remove device",
diff --git a/src/store/pbx-config/actions.js b/src/store/pbx-config/actions.js
index 2aafb752..14303f69 100644
--- a/src/store/pbx-config/actions.js
+++ b/src/store/pbx-config/actions.js
@@ -1,9 +1,14 @@
-'use strict';
import _ from 'lodash';
-import { assignNumbers } from '../../api/user';
-import { addGroup, removeGroup, addSeat, removeSeat, setGroupName,
-
+import {
+ assignNumbers
+} from '../../api/user';
+import {
+ addGroup,
+ removeGroup,
+ addSeat,
+ removeSeat,
+ setGroupName,
setGroupExtension,
setGroupHuntPolicy,
setGroupHuntTimeout,
@@ -20,7 +25,8 @@ import { addGroup, removeGroup, addSeat, removeSeat, setGroupName,
getSeatList,
getDeviceList,
getDevice,
- getAllGroupsAndSeats
+ getAllGroupsAndSeats,
+ setStationName
} from '../../api/pbx-config'
export default {
@@ -287,18 +293,22 @@ export default {
}).catch((err)=>{
context.commit('updateDeviceKeyFailed', data.device.id, err);
});
+ },
+ listProfiles(context) {
+ context.commit('listProfilesRequesting');
+ getProfiles({ all: true }).then((profiles)=>{
+ context.commit('listProfilesSucceeded', profiles);
+ }).catch((err)=>{
+ context.commit('listProfilesFailed', err.message);
+ });
+ },
+ setStationName(context, device) {
+ context.commit('updateStationNameRequesting', device);
+ setStationName(device).then(() => {
+ context.commit('updateStationNameSucceeded');
+ context.dispatch('loadDevice', device.id);
+ }).catch((err) => {
+ context.commit('updateStationNameFailed', err.message);
+ });
}
- // filterDevices(context, params) {
- // context.commit('deviceListRequesting', {
- // silent: false
- // });
- // filterDeviceList(params).then((devices)=>{
- // context.commit('deviceListSucceeded', devices);
- // devices.items.forEach((device)=>{
- // context.dispatch('loadDevice', device.id);
- // });
- // }).catch((err)=>{
- // context.commit('deviceListFailed', err.message);
- // });
- // }
}
diff --git a/src/store/pbx-config/getters.js b/src/store/pbx-config/getters.js
index 8bd41ea0..3fb1c6ce 100644
--- a/src/store/pbx-config/getters.js
+++ b/src/store/pbx-config/getters.js
@@ -141,7 +141,7 @@ export default {
return state.listLastPage;
},
isDeviceLoading(state) {
- return (id)=>{
+ return (id) => {
return state.deviceStates[id + ""] === RequestState.requesting;
}
},
@@ -250,7 +250,19 @@ export default {
listProfilesError(state) {
return state.listError;
},
+ updatedStationName(state) {
+ return state.updatedStationName;
+ },
modelImages(state) {
return state.modelImages;
+ },
+ updatedDevice(state) {
+ return state.updatedDevice;
+ },
+ updatedDeviceSucceeded(state) {
+ return state.updatedDeviceState === 'succeeded';
+ },
+ updatedDeviceError(state) {
+ return state.updatedDeviceError;
}
}
diff --git a/src/store/pbx-config/mutations.js b/src/store/pbx-config/mutations.js
index 13b63c8a..f9a74d1e 100644
--- a/src/store/pbx-config/mutations.js
+++ b/src/store/pbx-config/mutations.js
@@ -285,5 +285,18 @@ export default {
listProfilesFailed(state, error) {
state.listProfilesState = RequestState.failed;
state.listProfilesError = error;
+ },
+ updateStationNameRequesting(state, deviceId) {
+ state.updatedDevice = deviceId;
+ state.updatedDeviceState = RequestState.requesting;
+ state.updatedDeviceError = null;
+ },
+ updateStationNameSucceeded(state) {
+ state.updatedDeviceState = RequestState.succeeded;
+ state.updatedDeviceError = null;
+ },
+ updateStationNameFailed(state, error) {
+ state.updatedDeviceState = RequestState.failed;
+ state.updatedDeviceError = error;
}
}
diff --git a/src/store/pbx-config/state.js b/src/store/pbx-config/state.js
index 993f0e63..e5418685 100644
--- a/src/store/pbx-config/state.js
+++ b/src/store/pbx-config/state.js
@@ -51,6 +51,9 @@ export default {
createDeviceError: null,
listProfilesState: RequestState.initiated,
listProfilesError: null,
+ updatedDevice: null,
+ updatedDeviceState: RequestState.initiated,
+ updatedDeviceError: null,
modelImageStates: {},
modelImageErrors: {},
modelImages: {},