summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/shared
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2019-09-20 14:27:36 +0800
committercyuamber <xuranyjy@chinamobile.com>2019-09-20 14:27:59 +0800
commit8b1ee1f7fd52781df7af5e17c77521f39ae1d2ac (patch)
tree296e926a329b9a203e0ba3af3a95f674eae8cbcc /usecaseui-portal/src/app/shared
parentee2d1333ff4a8a233dd00bdbda7aa9f9e38061af (diff)
feat: optimize the code for the customer page
Change-Id: Ic30e916f0531592194420f21cfd22b80152f0892 Issue-ID: USECASEUI-307 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/shared')
-rw-r--r--usecaseui-portal/src/app/shared/components/customer/customer.component.ts20
1 files changed, 5 insertions, 15 deletions
diff --git a/usecaseui-portal/src/app/shared/components/customer/customer.component.ts b/usecaseui-portal/src/app/shared/components/customer/customer.component.ts
index c9419887..3fc73911 100644
--- a/usecaseui-portal/src/app/shared/components/customer/customer.component.ts
+++ b/usecaseui-portal/src/app/shared/components/customer/customer.component.ts
@@ -48,27 +48,17 @@ export class CustomerComponent implements OnInit {
deleteServiceTypeModelVisible = false;
//2019.08.14 add
notificationAttributes = null;
- key: string = 'notigication'
+ setNotification({ title, imgPath, action, status, name }):void{
+ this.notificationAttributes = { title, imgPath, action, status, name }
+ }
notificationSuccess(notificationModel,title,action,name) {
this.notification.remove()
- this.notificationAttributes = {
- title: title,
- imgPath: "assets/images/execute-success.png",
- action: action,
- status: 'Success',
- name: name
- }
+ this.setNotification({ title, imgPath: "assets/images/execute-success.png", action, status: 'Success', name })
this.notification.template(notificationModel);
}
notificationFailed(notificationModel,title,action,name) {
this.notification.remove()
- this.notificationAttributes = {
- title: title,
- imgPath: "assets/images/execute-faild.png",
- action: action,
- status: 'Failed',
- name: name
- }
+ this.setNotification({ title, imgPath: "assets/images/execute-faild.png", action, status: 'Failed', name })
this.notification.template(notificationModel)
}
getAllCustomers() {