KON-185 Toaster added + example code
diff --git a/angular.json b/angular.json index 585de43..481b086 100644 --- a/angular.json +++ b/angular.json
@@ -39,7 +39,12 @@ "output": "/i18n" } ], - "styles": ["node_modules/bootstrap/dist/css/bootstrap.css", "node_modules/font-awesome/css/font-awesome.min.css", "src/styles.scss"], + "styles": [ + "node_modules/bootstrap/dist/css/bootstrap.css", + "node_modules/font-awesome/css/font-awesome.min.css", + "src/styles.scss", + "node_modules/ngx-toastr/toastr.css" + ], "scripts": ["node_modules/jquery/dist/jquery.min.js", "node_modules/bootstrap/dist/js/bootstrap.min.js"] }, "configurations": {
diff --git a/config/env.json b/config/env.json index 9556bbf..787c328 100644 --- a/config/env.json +++ b/config/env.json
@@ -1 +1 @@ -{"env":"test"} +{"env":"development"}
diff --git a/package-lock.json b/package-lock.json index 1b64eb2..2a48ff8 100644 --- a/package-lock.json +++ b/package-lock.json
@@ -8222,6 +8222,14 @@ "tslib": "^1.9.0" } }, + "ngx-toastr": { + "version": "11.2.1", + "resolved": "https://registry.npmjs.org/ngx-toastr/-/ngx-toastr-11.2.1.tgz", + "integrity": "sha512-qLZA+h1lIGLQ1HAJpx5JJ8i87PAZPAN6MnexmrWipSONqrK4fRh+nUKIxqmcckIiD16dgu2O5SNloSJymTKUAw==", + "requires": { + "tslib": "^1.9.0" + } + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
diff --git a/package.json b/package.json index aba0639..446cf93 100644 --- a/package.json +++ b/package.json
@@ -52,6 +52,7 @@ "moment": "^2.24.0", "ng2-popover": "0.0.14", "ngrx-forms": "^5.2.1", + "ngx-toastr": "^11.2.1", "npm": "^6.13.4", "npm-install-peers": "^1.2.1", "reselect": "^4.0.0",
diff --git a/proxy.conf-integration.json b/proxy.conf-integration.json index 933ae30..27430d8 100644 --- a/proxy.conf-integration.json +++ b/proxy.conf-integration.json
@@ -1,6 +1,6 @@ { "/api": { - "target": "http://entdockergss:10011", + "target": "http://entdockergss:9155", "secure": false, "pathRewrite": { "^/api": ""
diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 323d2a3..074811c 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts
@@ -5,6 +5,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { NgModule, APP_INITIALIZER } from '@angular/core'; import { FormsModule } from '@angular/forms'; +import { CommonModule } from '@angular/common'; // Routes import { AppRoutingModule } from './app-routing.module'; @@ -39,6 +40,7 @@ import { HttpClient, HttpClientModule } from '@angular/common/http'; import { environment } from 'environments/environment'; import { ContainersModule } from '@shared/containers'; +import { ToastrModule } from 'ngx-toastr'; /** * Calling functions or calling new is not supported in metadata when using AoT. @@ -60,6 +62,7 @@ FormsModule, HttpModule, HttpClientModule, + CommonModule, // Third party modules AngularFontAwesomeModule, TranslateModule.forRoot({ @@ -70,6 +73,7 @@ }, }), SimpleNotificationsModule.forRoot(), + ToastrModule.forRoot(), // App custom dependencies HttpServiceModule.forRoot(), UtilityModule.forRoot(),
diff --git a/src/app/pages/contacts/contacts-list/contacts-list.component.ts b/src/app/pages/contacts/contacts-list/contacts-list.component.ts index 8af9225..9299f8e 100644 --- a/src/app/pages/contacts/contacts-list/contacts-list.component.ts +++ b/src/app/pages/contacts/contacts-list/contacts-list.component.ts
@@ -3,6 +3,7 @@ import { CONTACTS_COLDEF } from '@pages/contacts/contacts-list/contacts-list-column-definition'; import { BaseList } from '@shared/components/base-components/base.list'; import { SetFilterComponent } from '@app/shared/filters/ag-grid/set-filter/set-filter.component'; +import { ToastrService } from 'ngx-toastr'; @Component({ selector: 'app-contacts-list', @@ -12,8 +13,10 @@ export class ContactsListComponent extends BaseList { public columnDefinition: any = CONTACTS_COLDEF; public frameworkComponents: { setFilterComponent: any }; - constructor( public contactsSandbox: ContactsSandbox) { + constructor( public contactsSandbox: ContactsSandbox, private toastr: ToastrService ) { super(); this.frameworkComponents = { setFilterComponent: SetFilterComponent }; + + this.toastr.success('Hello world!', 'Toastr fun!'); } }