TT#56394 Implemented toasts for all crud operations in manager secretary config

Change-Id: I3c1adead79ffa9ae99a29f01602d8161947e9613
changes/17/32017/1
Hans-Peter Herzog 6 years ago
parent 3b25cc26a3
commit 164406557c

@ -6,7 +6,7 @@ import {
} from './utils';
export const LIST_DEFAULT_PAGE = 1;
export const LIST_DEFAULT_ROWS = 3;
export const LIST_DEFAULT_ROWS = 25;
export const LIST_ALL_ROWS = 1000;
const PATCH_HEADERS = {

@ -80,14 +80,14 @@
mapGetters,
mapMutations
} from 'vuex'
// import {
// CreationState,
// RequestState
// } from "../../../store/common"
// import {
// showGlobalError,
// showToast
// } from '../../../helpers/ui'
import {
CreationState,
RequestState
} from "../../../store/common"
import {
showGlobalError,
showToast
} from '../../../helpers/ui'
import {
QField,
QInput,
@ -207,32 +207,32 @@
}
},
watch: {
// msConfigCreationState(state) {
// if(state === CreationState.created) {
// this.$scrollTo(this.$parent.$el);
// showToast(this.getMsConfigCreationToastMessage);
// }
// else if(state === CreationState.error) {
// showGlobalError(this.msConfigCreationError);
// }
// },
// msConfigUpdateState(state) {
// if(state === RequestState.succeeded) {
// showToast(this.getMsConfigUpdateToastMessage);
// }
// else if(state === RequestState.failed) {
// showGlobalError(this.msConfigUpdateError);
// }
// },
// msConfigRemovalState(state) {
// if(state === RequestState.succeeded) {
// this.$scrollTo(this.$parent.$el);
// showToast(this.getMsConfigRemovalToastMessage);
// }
// else if(state === RequestState.failed) {
// showGlobalError(this.msConfigRemovalError);
// }
// }
msConfigCreationState(state) {
if(state === CreationState.created) {
this.$scrollTo(this.$parent.$el);
showToast(this.getMsConfigCreationToastMessage);
}
else if(state === CreationState.error) {
showGlobalError(this.msConfigCreationError);
}
},
msConfigUpdateState(state) {
if(state === RequestState.succeeded) {
showToast(this.getMsConfigUpdateToastMessage);
}
else if(state === RequestState.failed) {
showGlobalError(this.msConfigUpdateError);
}
},
msConfigRemovalState(state) {
if(state === RequestState.succeeded) {
this.$scrollTo(this.$parent.$el);
showToast(this.getMsConfigRemovalToastMessage);
}
else if(state === RequestState.failed) {
showGlobalError(this.msConfigRemovalError);
}
}
}
}
</script>

@ -495,7 +495,10 @@
"msConfigNumbersLabel": "Secretary numbers",
"msConfigNoSecretaryNumbers": "No numbers assigned",
"msConfigRemovalDialogTitle": "Remove manager secretary config",
"msConfigRemovalDialogText": "You are about to remove config for {msConfig}"
"msConfigRemovalDialogText": "You are about to remove config for {msConfig}",
"msConfigCreationToast": "Created manager secretary config for {msConfig} successfully",
"msConfigUpdateToast": "Updated {field} for manager secretary config {msConfig} successfully",
"msConfigRemovalToast": "Removed manager secretary config for {msConfig} successfully"
},
"callBlocking": {
"privacyEnabledToast": "Your number is hidden to the callee",

Loading…
Cancel
Save