{{ title }}
@@ -73,10 +73,9 @@
date
},
computed: {
- ...mapState('callForward', {
- activeTimeForm: 'activeTimeForm',
- addTimeState: 'addTimeState'
- }),
+ ...mapState('callForward', [
+ 'addTimeState'
+ ]),
typeIsNew() {
return this.type === 'new';
},
@@ -120,7 +119,6 @@
},
disableForm() {
this.resetTimes();
- this.$store.commit('callForward/resetAlerts');
this.$store.commit('callForward/setActiveTimeForm', false);
},
addTime() {
@@ -151,6 +149,7 @@
.add-times
margin-right 30px
+
.title
color $primary
line-height $csc-subtitle-line-height
diff --git a/src/components/pages/CallForward/CscCallForwardDestinations.vue b/src/components/pages/CallForward/CscCallForwardDestinations.vue
index 2d98fd68..1ee4d95e 100644
--- a/src/components/pages/CallForward/CscCallForwardDestinations.vue
+++ b/src/components/pages/CallForward/CscCallForwardDestinations.vue
@@ -62,15 +62,9 @@
},
methods: {
reloadDestinations(timeset) {
- if (timeset === null) {
- this.$store.dispatch('callForward/loadAlwaysEverybodyDestinations');
- }
- else if (timeset === 'Company Hours') {
- this.$store.dispatch('callForward/loadCompanyHoursEverybodyDestinations');
- }
- else if (timeset === 'After Hours') {
- this.$store.dispatch('callForward/loadAfterHoursEverybodyDestinations');
- }
+ this.$store.dispatch('callForward/loadEverybodyDestinations', {
+ timeset: timeset
+ });
},
reloadTimes() {
this.$store.dispatch('callForward/loadTimesetTimes', {
diff --git a/src/components/pages/CallForward/CscCallForwardTimes.vue b/src/components/pages/CallForward/CscCallForwardTimes.vue
index 3943ee95..53e84164 100644
--- a/src/components/pages/CallForward/CscCallForwardTimes.vue
+++ b/src/components/pages/CallForward/CscCallForwardTimes.vue
@@ -6,7 +6,7 @@
-
+
@@ -30,7 +30,8 @@
export default {
name: 'csc-call-forward-times',
props: [
- 'times'
+ 'times',
+ 'timesetName'
],
data () {
return {
@@ -48,9 +49,9 @@
QBtn
},
computed: {
- ...mapState('callForward', {
- activeTimeForm: 'activeTimeForm'
- })
+ ...mapState('callForward', [
+ 'activeTimeForm'
+ ])
},
methods: {
resetTimes() {
diff --git a/src/components/pages/CallForward/CscCallForwardTimeset.vue b/src/components/pages/CallForward/CscCallForwardTimeset.vue
new file mode 100644
index 00000000..24f18207
--- /dev/null
+++ b/src/components/pages/CallForward/CscCallForwardTimeset.vue
@@ -0,0 +1,198 @@
+
+
+
+
+
+
+
+
+
+ {{ $t('pages.callForward.times.timesetDuplicate', { timeset: timesetName }) }}
+
+
+
+
+ {{ $t('pages.callForward.times.timesetIncompatible', { timeset: timesetName }) }}
+
+
+
+
+ {{ $t('pages.callForward.times.timesetReverse', { timeset: timesetName }) }}
+
+
+
+
+ {{ $t('pages.callForward.times.timesetNotDefined', { timeset: timesetName }) }}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/pages/CallForward/CscDestination.vue b/src/components/pages/CallForward/CscDestination.vue
index 57203936..81c86539 100644
--- a/src/components/pages/CallForward/CscDestination.vue
+++ b/src/components/pages/CallForward/CscDestination.vue
@@ -76,7 +76,7 @@
QItemSide,
Dialog,
QBtn,
- QTooltip
+ QTooltip
},
computed: {
...mapState('callForward', [
diff --git a/src/locales/en.json b/src/locales/en.json
index 6e036ca3..bfc18960 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -170,10 +170,10 @@
"addTimeErrorMessage": "An error occured while trying to create the timeset. Please try again.",
"noTimeSet": "no time set",
"addTimeButton": "Add Time",
- "companyHoursIncompatible": "The Company Hours timeset contains incompatible values. You can resolve this by resetting the company hours timeset.",
- "companyHoursNotDefined": "The Company Hours timeset is not defined. You need to create one to be able to define call forward destinations.",
- "companyHoursDuplicate": "More than one Company Hours timeset exists. You can resolve this by resetting the company hours timesets.",
- "companyHoursReverse": "The Company Hours timeset contain reverse order of values. You can resolve this by resetting the company hours timeset.",
+ "timesetIncompatible": "The {timeset} timeset contains incompatible values. You can resolve this by resetting the {timeset} timeset.",
+ "timesetNotDefined": "The {timeset} timeset is not defined. You need to create one to be able to define call forward destinations.",
+ "timesetDuplicate": "More than one {timeset} timeset exists. You can resolve this by resetting the {timeset} timesets.",
+ "timesetReverse": "The {timeset} timeset contain reverse order of values. You can resolve this by resetting the {timeset} timeset.",
"weekday": "Weekday",
"from": "From",
"to": "To",
@@ -184,8 +184,8 @@
"friday": "Friday",
"saturday": "Saturday",
"sunday": "Sunday",
- "addCompanyHours": "Add Company Hours",
- "resetCompanyHours": "Reset Company Hours",
+ "resetTimeset": "Reset {timeset}",
+ "addTimeset": "Add {timeset}",
"selectValidTime": "Select valid time"
}
},
diff --git a/src/store/call-forward.js b/src/store/call-forward.js
index d4d1b22b..6f4b17db 100644
--- a/src/store/call-forward.js
+++ b/src/store/call-forward.js
@@ -72,13 +72,7 @@ export default {
timesetHasReverse: false,
timesetHasDuplicate: false,
timesetId: null,
- activeTimeForm: false,
- showAlerts: {
- duplicate: true,
- compatible: true,
- reverse: true,
- defined: true
- }
+ activeTimeForm: false
},
getters: {
hasFaxCapability(state, getters, rootState, rootGetters) {
@@ -257,26 +251,15 @@ export default {
setActiveTimeForm(state, value) {
state.activeTimeForm = value;
},
- resetAlerts(state) {
- state.showAlerts.duplicate = true;
- state.showAlerts.compatible = true;
- state.showAlerts.reverse = true;
- state.showAlerts.defined = true;
- },
- setShowAlertDuplicate(state, value) {
- state.showAlerts.duplicate = value;
- },
- setShowAlertCompatible(state, value) {
- state.showAlerts.compatible = value;
- },
- setShowAlertReverse(state, value) {
- state.showAlerts.reverse = value;
- },
- setShowAlertDefined(state, value) {
- state.showAlerts.defined = value;
- },
resetAddTimeState(state) {
state.addTimeState = RequestState.button;
+ },
+ resetTimesetState(state) {
+ state.timesetIsCompatible = true;
+ state.timesetExists = true;
+ state.timesetHasReverse = false;
+ state.timesetHasDuplicate = false;
+ state.addTimeState = RequestState.button;
}
},
actions: {
@@ -320,35 +303,13 @@ export default {
});
});
},
- loadAlwaysEverybodyDestinations(context) {
- return new Promise(()=>{
- loadEverybodyDestinations({
- subscriberId: localStorage.getItem('subscriberId'),
- timeset: null
- }).then((result)=>{
- context.commit('loadDestinations', result);
- });
- });
- },
- loadCompanyHoursEverybodyDestinations(context) {
- return new Promise(()=>{
- loadEverybodyDestinations({
- subscriberId: localStorage.getItem('subscriberId'),
- timeset: 'Company Hours'
- }).then((result)=>{
- context.commit('loadDestinations', result);
- });
- });
- },
- loadAfterHoursEverybodyDestinations(context) {
- return new Promise(()=>{
- loadEverybodyDestinations({
+ loadEverybodyDestinations(context, options) {
+ loadEverybodyDestinations({
subscriberId: localStorage.getItem('subscriberId'),
- timeset: 'After Hours'
- }).then((result)=>{
- context.commit('loadDestinations', result);
- });
- });
+ timeset: options.timeset
+ }).then((result)=>{
+ context.commit('loadDestinations', result);
+ });
},
deleteDestinationFromDestinationset(context, options) {
let removedDestination = options.removeDestination;
@@ -521,7 +482,7 @@ export default {
id: context.getters.getSubscriberId,
name: name
}).then(() => {
- context.commit('resetAddTimeState');
+ context.commit('resetTimesetState');
context.commit('resetTimeSucceeded');
}).catch((err) => {
context.commit('resetTimeFailed', err.message);