From 326832b1c732f8d4a62ed1cfe125d77c91570743 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Thu, 4 Oct 2018 20:01:27 +0530 Subject: [PATCH] master detail changes --- ng6-seed/src/app/AwsService/aws.service.ts | 8 +- .../src/app/AwsService/cognito.service.ts | 4 +- .../branch-dialog.component.html | 8 +- .../branch-dialog.component.scss | 3 +- .../branch-dialog/branch-dialog.component.ts | 29 +- .../branch-list/branch-list.component.html | 14 +- .../branch-list/branch-list.component.scss | 133 +++-- .../branch-list/branch-list.component.ts | 13 +- .../city-dialog/city-dialog.component.html | 7 +- .../city/city-dialog/city-dialog.component.ts | 28 +- .../city/city-list/city-list.component.html | 21 +- .../city/city-list/city-list.component.scss | 133 ++--- .../city/city-list/city-list.component.ts | 7 + ...comments-on-locality-dialog.component.html | 5 +- .../comments-on-locality-dialog.component.ts | 22 +- .../comments-on-locality-list.component.html | 23 +- .../comments-on-locality-list.component.scss | 166 ++---- .../comments-on-locality-list.component.ts | 7 + .../company-dialog.component.html | 157 +++--- .../company-dialog.component.ts | 76 ++- .../company-list/company-list.component.html | 17 +- .../company-list/company-list.component.scss | 154 ++---- .../company-list/company-list.component.ts | 7 + .../customer-behaviour-dialog.component.html | 6 +- .../customer-behaviour-dialog.component.ts | 21 +- .../customer-behaviour-list.component.html | 21 +- .../customer-behaviour-list.component.scss | 156 ++---- .../customer-behaviour-list.component.ts | 9 +- .../customer-segment-dialog.component.html | 6 +- .../customer-segment-dialog.component.ts | 26 +- .../customer-segment-list.component.html | 21 +- .../customer-segment-list.component.scss | 156 ++---- .../customer-segment-list.component.ts | 9 +- .../designation-dialog.component.html | 6 +- .../designation-dialog.component.ts | 22 +- .../designation-list.component.html | 21 +- .../designation-list.component.scss | 155 ++---- .../designation-list.component.ts | 9 +- .../frequency-dialog.component.html | 6 +- .../frequency-dialog.component.ts | 18 +- .../frequency-list.component.html | 21 +- .../frequency-list.component.scss | 186 ++----- .../frequency-list.component.ts | 13 +- ...ustry_classification-dialog.component.html | 6 +- ...ndustry_classification-dialog.component.ts | 22 +- ...ndustry_classification-list.component.html | 20 +- ...ndustry_classification-list.component.scss | 184 ++----- .../industry_classification-list.component.ts | 9 +- .../lender-hierarchy-dialog.component.html | 6 +- .../lender-hierarchy-dialog.component.ts | 27 +- .../lender-hierarchy-list.component.html | 20 +- .../lender-hierarchy-list.component.scss | 156 ++---- .../lender-hierarchy-list.component.ts | 10 +- .../members-occupation-dialog.component.html | 6 +- .../members-occupation-dialog.component.ts | 20 +- .../members-occupation-list.component.html | 20 +- .../members-occupation-list.component.scss | 124 ++--- .../members-occupation-list.component.ts | 8 +- .../pd-allocation-type-list.component.html | 18 +- .../pd-allocation-type-list.component.scss | 50 ++ .../pd-allocation-type-list.component.spec.ts | 0 .../pd-allocation-type-list.component.ts | 76 +-- ...pd-location-approach-dialog.component.html | 6 +- ...pd-location-approach-dialog.component.scss | 0 ...location-approach-dialog.component.spec.ts | 0 .../pd-location-approach-dialog.component.ts | 19 +- .../pd-location-approach-list.component.html | 20 +- .../pd-location-approach-list.component.scss | 50 ++ ...d-location-approach-list.component.spec.ts | 0 .../pd-location-approach-list.component.ts | 10 +- .../pd-notification-dialog.component.html} | 8 +- .../pd-notification-dialog.component.scss} | 0 .../pd-notification-dialog.component.spec.ts | 26 + .../pd-notification-dialog.component.ts | 84 +++ .../pd-notification-list.component.html | 127 +++++ .../pd-notification-list.component.scss | 50 ++ .../pd-notification-list.component.spec.ts | 25 + .../pd-notification-list.component.ts | 202 +++++++ .../pd-team-dialog.component.html | 90 ++++ .../pd-team-dialog.component.scss} | 0 .../pd-team-dialog.component.spec.ts | 25 + .../pd-team-dialog.component.ts | 491 ++++++++++++++++++ .../pd-team-list/pd-team-list.component.html | 137 +++++ .../pd-team-list/pd-team-list.component.scss | 83 +++ .../pd-team-list.component.spec.ts | 25 + .../pd-team-list/pd-team-list.component.ts | 152 ++++++ .../pd-type-dialog.component.html | 6 +- .../pd-type-dialog.component.scss | 3 + .../pd-type-dialog.component.spec.ts | 0 .../pd-type-dialog.component.ts | 22 +- .../pd-type-list/pd-type-list.component.html | 20 +- .../pd-type-list/pd-type-list.component.scss | 50 ++ .../pd-type-list.component.spec.ts | 0 .../pd-type-list/pd-type-list.component.ts | 10 +- ...d-allocation-type-dialog.component.spec.ts | 25 - .../pd-allocation-type-dialog.component.ts | 85 --- .../pd-allocation-type-list.component.scss | 123 ----- .../pd-location-approach-list.component.scss | 131 ----- .../pd-type-list/pd-type-list.component.scss | 132 ----- .../product-dialog.component.html | 6 +- .../product-dialog.component.ts | 22 +- .../product-list/product-list.component.html | 18 +- .../product-list/product-list.component.scss | 155 ++---- .../product-list/product-list.component.ts | 9 +- .../question-category-dialog.component.html | 34 ++ .../question-category-dialog.component.scss | 3 + ...question-category-dialog.component.spec.ts | 25 + .../question-category-dialog.component.ts | 92 ++++ .../question-category-list.component.html | 69 +++ .../question-category-list.component.scss | 50 ++ .../question-category-list.component.spec.ts | 25 + .../question-category-list.component.ts | 142 +++++ .../regions-dialog.component.html | 6 +- .../regions-dialog.component.ts | 21 +- .../regions-list/regions-list.component.html | 24 +- .../regions-list/regions-list.component.scss | 156 ++---- .../regions-list/regions-list.component.ts | 10 +- .../relation-ship-dialog.component.html | 6 +- .../relation-ship-dialog.component.ts | 22 +- .../relation-ship-list.component.html | 21 +- .../relation-ship-list.component.scss | 183 ++----- .../relation-ship-list.component.ts | 10 +- .../states-dialog.component.html | 6 +- .../states-dialog/states-dialog.component.ts | 25 +- .../states-list/states-list.component.html | 19 +- .../states-list/states-list.component.scss | 156 ++---- .../states-list/states-list.component.ts | 12 +- .../sub-product-dialog.component.html | 6 +- .../sub-product-dialog.component.ts | 22 +- .../sub-product-list.component.html | 21 +- .../sub-product-list.component.scss | 179 ++----- .../sub-product-list.component.ts | 10 +- .../title-dialog/title-dialog.component.html | 5 +- .../title-dialog/title-dialog.component.ts | 17 +- .../title-list/title-list.component.html | 21 +- .../title-list/title-list.component.scss | 60 ++- .../title/title-list/title-list.component.ts | 9 +- .../activity-dialog.component.html | 6 +- .../activity-dialog.component.ts | 20 +- .../activity-list.component.html | 21 +- .../activity-list.component.scss | 59 ++- .../activity-list/activity-list.component.ts | 9 +- .../uom/uom-dialog/uom-dialog.component.html | 6 +- .../uom/uom-dialog/uom-dialog.component.ts | 23 +- .../uom/uom-list/uom-list.component.html | 21 +- .../uom/uom-list/uom-list.component.scss | 59 ++- .../uom/uom-list/uom-list.component.ts | 9 +- .../settings/masters/masters.component.html | 19 +- .../app/settings/masters/masters.component.ts | 11 +- .../app/settings/masters/masters.module.ts | 49 +- .../service/masters/masters.service.ts | 90 +++- .../service/masters/pd-team.service.ts | 184 +++++++ .../src/app/settings/service/user.service.ts | 22 +- ng6-seed/src/app/settings/settings.module.ts | 11 +- ng6-seed/src/app/settings/settings.routing.ts | 9 +- .../users/register/register.component.html | 2 + .../users/register/register.component.ts | 21 +- .../menu-items/horizontal-menu-items.ts | 3 +- .../src/app/shared/menu-items/menu-items.ts | 3 +- 159 files changed, 4252 insertions(+), 3031 deletions(-) rename ng6-seed/src/app/settings/masters/component/{pd/pd-allocation-type-list => pd-allocation-type}/pd-allocation-type-list.component.html (89%) create mode 100644 ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.scss rename ng6-seed/src/app/settings/masters/component/{pd/pd-allocation-type-list => pd-allocation-type}/pd-allocation-type-list.component.spec.ts (100%) rename ng6-seed/src/app/settings/masters/component/{pd/pd-allocation-type-list => pd-allocation-type}/pd-allocation-type-list.component.ts (61%) rename ng6-seed/src/app/settings/masters/component/{pd => pd-location-approach}/pd-location-approach-dialog/pd-location-approach-dialog.component.html (76%) rename ng6-seed/src/app/settings/masters/component/{pd => pd-location-approach}/pd-location-approach-dialog/pd-location-approach-dialog.component.scss (100%) rename ng6-seed/src/app/settings/masters/component/{pd => pd-location-approach}/pd-location-approach-dialog/pd-location-approach-dialog.component.spec.ts (100%) rename ng6-seed/src/app/settings/masters/component/{pd => pd-location-approach}/pd-location-approach-dialog/pd-location-approach-dialog.component.ts (87%) rename ng6-seed/src/app/settings/masters/component/{pd => pd-location-approach}/pd-location-approach-list/pd-location-approach-list.component.html (90%) create mode 100644 ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.scss rename ng6-seed/src/app/settings/masters/component/{pd => pd-location-approach}/pd-location-approach-list/pd-location-approach-list.component.spec.ts (100%) rename ng6-seed/src/app/settings/masters/component/{pd => pd-location-approach}/pd-location-approach-list/pd-location-approach-list.component.ts (94%) rename ng6-seed/src/app/settings/masters/component/{pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.html => pd-notification/pd-notification-dialog/pd-notification-dialog.component.html} (65%) rename ng6-seed/src/app/settings/masters/component/{pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.scss => pd-notification/pd-notification-dialog/pd-notification-dialog.component.scss} (100%) create mode 100644 ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-dialog/pd-notification-dialog.component.spec.ts create mode 100644 ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-dialog/pd-notification-dialog.component.ts create mode 100644 ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list/pd-notification-list.component.html create mode 100644 ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list/pd-notification-list.component.scss create mode 100644 ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list/pd-notification-list.component.spec.ts create mode 100644 ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list/pd-notification-list.component.ts create mode 100644 ng6-seed/src/app/settings/masters/component/pd-team/pd-team-dialog/pd-team-dialog.component.html rename ng6-seed/src/app/settings/masters/component/{pd/pd-type-dialog/pd-type-dialog.component.scss => pd-team/pd-team-dialog/pd-team-dialog.component.scss} (100%) create mode 100644 ng6-seed/src/app/settings/masters/component/pd-team/pd-team-dialog/pd-team-dialog.component.spec.ts create mode 100644 ng6-seed/src/app/settings/masters/component/pd-team/pd-team-dialog/pd-team-dialog.component.ts create mode 100644 ng6-seed/src/app/settings/masters/component/pd-team/pd-team-list/pd-team-list.component.html create mode 100644 ng6-seed/src/app/settings/masters/component/pd-team/pd-team-list/pd-team-list.component.scss create mode 100644 ng6-seed/src/app/settings/masters/component/pd-team/pd-team-list/pd-team-list.component.spec.ts create mode 100644 ng6-seed/src/app/settings/masters/component/pd-team/pd-team-list/pd-team-list.component.ts rename ng6-seed/src/app/settings/masters/component/{pd => pd-type}/pd-type-dialog/pd-type-dialog.component.html (78%) create mode 100644 ng6-seed/src/app/settings/masters/component/pd-type/pd-type-dialog/pd-type-dialog.component.scss rename ng6-seed/src/app/settings/masters/component/{pd => pd-type}/pd-type-dialog/pd-type-dialog.component.spec.ts (100%) rename ng6-seed/src/app/settings/masters/component/{pd => pd-type}/pd-type-dialog/pd-type-dialog.component.ts (85%) rename ng6-seed/src/app/settings/masters/component/{pd => pd-type}/pd-type-list/pd-type-list.component.html (89%) create mode 100644 ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.scss rename ng6-seed/src/app/settings/masters/component/{pd => pd-type}/pd-type-list/pd-type-list.component.spec.ts (100%) rename ng6-seed/src/app/settings/masters/component/{pd => pd-type}/pd-type-list/pd-type-list.component.ts (93%) delete mode 100644 ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.spec.ts delete mode 100644 ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.ts delete mode 100644 ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.scss delete mode 100644 ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-list/pd-location-approach-list.component.scss delete mode 100644 ng6-seed/src/app/settings/masters/component/pd/pd-type-list/pd-type-list.component.scss create mode 100644 ng6-seed/src/app/settings/masters/component/question-category/question-category-dialog/question-category-dialog.component.html create mode 100644 ng6-seed/src/app/settings/masters/component/question-category/question-category-dialog/question-category-dialog.component.scss create mode 100644 ng6-seed/src/app/settings/masters/component/question-category/question-category-dialog/question-category-dialog.component.spec.ts create mode 100644 ng6-seed/src/app/settings/masters/component/question-category/question-category-dialog/question-category-dialog.component.ts create mode 100644 ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.html create mode 100644 ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.scss create mode 100644 ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.spec.ts create mode 100644 ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.ts create mode 100644 ng6-seed/src/app/settings/service/masters/pd-team.service.ts diff --git a/ng6-seed/src/app/AwsService/aws.service.ts b/ng6-seed/src/app/AwsService/aws.service.ts index c915fa886..3e25469c7 100755 --- a/ng6-seed/src/app/AwsService/aws.service.ts +++ b/ng6-seed/src/app/AwsService/aws.service.ts @@ -51,7 +51,7 @@ const sineedgeIdentity = "ap-south-1:9a551eab-97cf-4991-b677-2f9bcd058961";//"ap const lenderIdentity = "ap-south-1:ca22dabc-db59-4af5-9bb8-265f7ec95907"; const vendorIdenttiy = ""; // serviceProvider - const apiurl = "http://ssa.sineedge.com/sparqapi/api/"; +const apiurl = "http://ssa.sineedge.com/sparqapi/api/"; //const apiurl = "http://localhost/sparqapi/api/"; @Injectable({ @@ -730,9 +730,5 @@ adminlistgroup(enitiy){ }); } -// waiting for image api -getpicurl(userid){ - let users = {'userid':userid} - return this.http.post(apiurl+'getSingedProfilePicURL',users); -} + } diff --git a/ng6-seed/src/app/AwsService/cognito.service.ts b/ng6-seed/src/app/AwsService/cognito.service.ts index 52ff48707..2290dbc52 100644 --- a/ng6-seed/src/app/AwsService/cognito.service.ts +++ b/ng6-seed/src/app/AwsService/cognito.service.ts @@ -39,8 +39,8 @@ const sineedgeIdentity = "ap-south-1:9a551eab-97cf-4991-b677-2f9bcd058961";//"ap const lenderIdentity = "ap-south-1:ca22dabc-db59-4af5-9bb8-265f7ec95907"; const vendorIdenttiy = ""; // serviceProvider - const apiurl = "http://ssa.sineedge.com/sparqapi/api/"; -//const apiurl = "http://localhost/sparqapi/api/"; +const apiurl = "http://ssa.sineedge.com/sparqapi/api/"; +// const apiurl = "http://localhost/sparqapi/api/"; export interface Callback { callback(): void; diff --git a/ng6-seed/src/app/settings/masters/component/branch/branch-dialog/branch-dialog.component.html b/ng6-seed/src/app/settings/masters/component/branch/branch-dialog/branch-dialog.component.html index 1fc3e2d95..c5428d59f 100644 --- a/ng6-seed/src/app/settings/masters/component/branch/branch-dialog/branch-dialog.component.html +++ b/ng6-seed/src/app/settings/masters/component/branch/branch-dialog/branch-dialog.component.html @@ -54,8 +54,12 @@ fxLayoutAlign="center">
- - + + + + + +
diff --git a/ng6-seed/src/app/settings/masters/component/branch/branch-dialog/branch-dialog.component.scss b/ng6-seed/src/app/settings/masters/component/branch/branch-dialog/branch-dialog.component.scss index 94c0ec020..593611b43 100644 --- a/ng6-seed/src/app/settings/masters/component/branch/branch-dialog/branch-dialog.component.scss +++ b/ng6-seed/src/app/settings/masters/component/branch/branch-dialog/branch-dialog.component.scss @@ -6,5 +6,4 @@ mat-dialog-container{ } .container{ width:10% !important; -} -//style="width: 100%" \ No newline at end of file +} \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/branch/branch-dialog/branch-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/branch/branch-dialog/branch-dialog.component.ts index 4a727e520..00cea421e 100644 --- a/ng6-seed/src/app/settings/masters/component/branch/branch-dialog/branch-dialog.component.ts +++ b/ng6-seed/src/app/settings/masters/component/branch/branch-dialog/branch-dialog.component.ts @@ -33,16 +33,10 @@ export class BranchDialogComponent implements OnInit { private _mastersService: MastersService, @Inject(MAT_DIALOG_DATA) public data: Branch) { } - - ngOnInit() { - - /** Branch Form Datas*/ - this._branchForm = this._formBuilder.group({ - branch_id: [this.data.branch_id], - name: [this.data.name, Validators.compose([Validators.required])], - fk_city_id: [this.data.fk_city_id, Validators.compose([Validators.required])] - }); + ngOnInit() { + this.branchFormDatas(); + /** For SelectDrop Datas*/ this._mastersService.getAllMasterData('CITY') .subscribe( @@ -57,6 +51,15 @@ export class BranchDialogComponent implements OnInit { } + /** Branch Form Datas*/ + branchFormDatas(){ + this._branchForm = this._formBuilder.group({ + branch_id: [this.data.branch_id], + name: [this.data.name, Validators.compose([Validators.required])], + fk_city_id: [this.data.fk_city_id, Validators.compose([Validators.required])] + }); + } + /** For Popup Close Button */ onNoClick(): void { this.dialogRef.close(); @@ -66,7 +69,8 @@ export class BranchDialogComponent implements OnInit { onSubmit() { var BranchFormValues = this._branchForm.value; - + console.log(this._branchForm.value); + console.log(BranchFormValues); if(isNaN(this.data.branch_id)) { //To Remove The "Null" With Key also @@ -104,4 +108,9 @@ export class BranchDialogComponent implements OnInit { this._branchForm.reset(); } + /** To Reset Popup Data For Edit*/ + onResetForEdit(){ + this.branchFormDatas(); + } + } diff --git a/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.html b/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.html index ac5acaaae..4c7d9286b 100644 --- a/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.html @@ -1,10 +1,12 @@
- +
-
- +
@@ -16,7 +18,7 @@ Sl - {{i+1}} + {{row.serialno}}
- - + + + + +
diff --git a/ng6-seed/src/app/settings/masters/component/city/city-dialog/city-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/city/city-dialog/city-dialog.component.ts index a6b7630a3..d35473590 100644 --- a/ng6-seed/src/app/settings/masters/component/city/city-dialog/city-dialog.component.ts +++ b/ng6-seed/src/app/settings/masters/component/city/city-dialog/city-dialog.component.ts @@ -34,12 +34,7 @@ export class CityDialogComponent implements OnInit { ngOnInit() { - /** City Form Datas*/ - this._cityForm = this._formBuilder.group({ - city_id: [this.data.city_id], - name: [this.data.name, Validators.compose([Validators.required])], - fk_state_id: [this.data.fk_state_id, Validators.compose([Validators.required])] - }); + this.cityFormDatas(); /** For Drop Datas*/ this._mastersService.getAllMasterData('STATE') @@ -53,7 +48,14 @@ export class CityDialogComponent implements OnInit { }, error => this.errorMessage = error); } - + /** City Form Datas*/ + cityFormDatas(){ + this._cityForm = this._formBuilder.group({ + city_id: [this.data.city_id], + name: [this.data.name, Validators.compose([Validators.required])], + fk_state_id: [this.data.fk_state_id, Validators.compose([Validators.required])] + }); + } /** For Popup Close Button */ onNoClick(): void { this.dialogRef.close(); @@ -88,9 +90,8 @@ export class CityDialogComponent implements OnInit { alert("SomeThing Wents Wrong Try Again !"); } -}); - - + }); + } else { this._mastersService.editMasterDetails(CityFormValues,'CITY').subscribe( @@ -112,5 +113,12 @@ export class CityDialogComponent implements OnInit { onReset(){ this._cityForm.reset(); } + + /** To Reset Popup Data For Edit*/ + onResetForEdit(){ + this.cityFormDatas(); + } + + } /** End Of CityDialogComponent */ \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.html b/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.html index 7fb57cd8a..4817b7dea 100644 --- a/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.html @@ -1,11 +1,12 @@
- +
-
+
- -
+ +
+
-
-
+
+
@@ -85,7 +86,7 @@ Sl - {{i+1}} + {{row.serialno}} @@ -117,7 +118,7 @@ Actions - + @@ -126,7 +127,7 @@ Is Active .mat-header-row, > .mat-row { + display: table-row; + padding: 0; + border: none; + + > .mat-header-cell, > .mat-cell { + display: table-cell; + height: 48px; + vertical-align: middle; -.button{ - padding-left: 6px; - font-size: 20px; -}*/ - -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 64px; - padding: 8px 24px 0; -} - -.mat-form-field { - font-size: 14px; - width: 100%; -} - -.mat-table { - overflow: auto; - max-height: 500px; -} + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + } + } + } +/** Table CSS -nocontent */ .nocontent { color: red; font-size: 16px; text-align: center; } -.active:hover{ - color: green; - font-size: 20px; + +/** Table CSS - Search(or)Filter Field */ +.mat-form-field { + font-size: 14px; + width: 100%; } -.deactive:hover{ - color: red; - font-size: 20px; -} -.example-margin { - margin: 10px; + +.filter-container { + display: flex; + flex-direction: column; + min-width: 300px; } + +.filter-header { + min-height: 64px; + padding: 8px 24px 0; +} \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.ts b/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.ts index b512b4318..89d6eede7 100644 --- a/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/city/city-list/city-list.component.ts @@ -27,6 +27,7 @@ export class CityListComponent implements OnInit { noRecordFound: boolean = false; CityList: any = []; userData = null; + color = 'primary'; public dataLength: number; @@ -53,6 +54,12 @@ export class CityListComponent implements OnInit { this.noRecordFound = false; this.userData = dataresult.records; this.dataLength = dataresult.records.length; + if(dataresult.records.length >= 1){ + this.userData = this.userData.map((val, i)=>{ + val['serialno'] = i + 1; + return val; + }) + } this.dataSource.data = this.userData; }else{ this.noRecordFound = true; diff --git a/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-dialog/comments-on-locality-dialog.component.html b/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-dialog/comments-on-locality-dialog.component.html index 5998b987a..34ab31525 100644 --- a/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-dialog/comments-on-locality-dialog.component.html +++ b/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-dialog/comments-on-locality-dialog.component.html @@ -38,7 +38,10 @@ fxLayoutAlign="center">
- + + + +
diff --git a/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-dialog/comments-on-locality-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-dialog/comments-on-locality-dialog.component.ts index 596159f08..d148cbf45 100644 --- a/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-dialog/comments-on-locality-dialog.component.ts +++ b/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-dialog/comments-on-locality-dialog.component.ts @@ -31,19 +31,21 @@ export class CommentsOnLocalityDialogComponent implements OnInit { @Inject(MAT_DIALOG_DATA) public data: any) { } - ngOnInit() { + ngOnInit() { this.commentOnLocalityFormDatas(); } + commentOnLocalityFormDatas(){ /** Comment On Locality Form Datas*/ - this._CommentOnLocalityForm = this._formBuilder.group({ - comments_on_locality_id: [this.data.comments_on_locality_id], - rating: [this.data.rating, Validators.compose([Validators.required])], - }); - + this._CommentOnLocalityForm = this._formBuilder.group({ + comments_on_locality_id: [this.data.comments_on_locality_id], + rating: [this.data.rating, Validators.compose([Validators.required])], + }); } + /** For Popup Close Button */ onNoClick(): void { this.dialogRef.close(); } + /** To Save/Edited Popup Data */ onSubmit() { var CommentOnLocalityForm = this._CommentOnLocalityForm.value; @@ -85,5 +87,11 @@ export class CommentsOnLocalityDialogComponent implements OnInit { onReset(){ this._CommentOnLocalityForm.reset(); } + + /** To Reset Popup Data For Edit*/ + onResetForEdit(){ + this.commentOnLocalityFormDatas(); + } + } -/** End Of Comment On Locality Component*/ \ No newline at end of file +/** End Of Comment On Locality Component */ \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.html b/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.html index 6d5842063..580badecf 100644 --- a/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.html @@ -1,11 +1,12 @@
- +
-
-
- -
+
+ -
-
+
+
@@ -74,7 +75,7 @@ Sl - {{i+1}} + {{row.serialno}} @@ -93,7 +94,7 @@ Actions - + @@ -104,7 +105,7 @@ @@ -112,7 +113,7 @@ diff --git a/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.scss b/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.scss index 115d871ff..dea0560d5 100644 --- a/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.scss +++ b/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.scss @@ -1,130 +1,50 @@ +/** Table SerialNo CSS */ +.example-margin { + margin: 10px; +} -/* Structure -.example-container { +/** Table CSS - Dislplay Data */ +.mat-table { + display: table; + width: 100%; + overflow: auto; + max-height: 500px; + + > .mat-header-row, > .mat-row { + display: table-row; + padding: 0; + border: none; + + > .mat-header-cell, > .mat-cell { + display: table-cell; + height: 48px; + vertical-align: middle; + + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + } + } + } + +/** Table CSS -nocontent */ +.nocontent { + color: red; + font-size: 16px; + text-align: center; +} + +/** Table CSS - Search(or)Filter Field */ +.mat-form-field { + font-size: 14px; + width: 100%; +} + +.filter-container { display: flex; flex-direction: column; min-width: 300px; } -.example-header { - min-height: 56px; - max-height: 56px; - display: flex; - align-items: center; +.filter-header { + min-height: 64px; padding: 8px 24px 0; - font-size: 20px; - justify-content: space-between; - border-bottom: 1px solid transparent; -} - -.mat-input-container { - font-size: 14px; - flex-grow: 1; - margin-left: 32px; - margin-top: 8px; -} - -.example-no-results { - display: flex; - justify-content: center; - padding: 24px; - font-size: 12px; - font-style: italic; -} - -/** Selection styles -.example-selection-header { - font-size: 18px; - background: rgba(255, 64, 129, 0.3); - border-bottom: 1px solid #d696ac; -} - -.mat-column-select { - max-width: 54px; -} - -.mat-row:hover, .example-selected-row { - background: #f5f5f5; -} - -.mat-row:active, .mat-row.example-selected-row { - background: #eaeaea; -} - -.mat-table { - overflow: auto; - max-height: 500px; -}*/ -/* Structure * -.example-container { - display: flex; - flex-direction: column; - min-width: 30px; - width : 80%; - margin : 20px auto; - } - - .example-header { - min-height: 64px; - padding: 8px 24px 0; - } - - //mat-cell{ - .cell{ - display:flex !important; - justify-content:center!important; - - } - - // mat-header-cell { - .header-cell{ - display:flex; - justify-content:center; - } - - - table { - width: 100%; - } - - th { - text-align: left; - }*/ - .example-container { - display: flex; - flex-direction: column; - min-width: 300px; - } - - .example-header { - min-height: 64px; - padding: 8px 24px 0; - } - - .mat-form-field { - font-size: 14px; - width: 100%; - } - - .mat-table { - overflow: auto; - max-height: 500px; - } - - .nocontent { - color: red; - font-size: 16px; - text-align: center; - } - .active:hover{ - color: green; - font-size: 20px; - } - .deactive:hover{ - color: red; - font-size: 20px; - } - .example-margin { - margin: 10px; - } - \ No newline at end of file +} \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.ts b/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.ts index df343d366..f75ad7298 100644 --- a/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component.ts @@ -29,6 +29,7 @@ export class CommentsOnLocalityListComponent implements OnInit { CommentsOnLocalityList: any = []; userData = null; + color = 'primary'; public dataLength: number; public dataSource = new MatTableDataSource(); @@ -55,6 +56,12 @@ export class CommentsOnLocalityListComponent implements OnInit { this.noRecordFound = false; this.userData = dataresult.records; this.dataLength = dataresult.records.length; + if(dataresult.records.length >= 1){ + this.userData = this.userData.map((val, i)=>{ + val['serialno'] = i + 1; + return val; + }) + } this.dataSource.data = this.userData; }else{ this.noRecordFound = true; diff --git a/ng6-seed/src/app/settings/masters/component/company/company-dialog/company-dialog.component.html b/ng6-seed/src/app/settings/masters/component/company/company-dialog/company-dialog.component.html index 2d251f4b3..647ec3439 100644 --- a/ng6-seed/src/app/settings/masters/component/company/company-dialog/company-dialog.component.html +++ b/ng6-seed/src/app/settings/masters/component/company/company-dialog/company-dialog.component.html @@ -1,124 +1,93 @@ -
-

Company                                                 

-
-
- -
+ fxLayout="row" + fxLayoutAlign="center"> +

Company                                                 

+
+
+ +
- - -
+
- +
You must include a Name.
+
You must include a addressline1. - - -
-
+ +
+ +
You must include a Name. - - -
-
- - - You must include a Name. - - -
- -
+ +
+ +
- - - - {{ cd.name }} - - You must include a City. - - -
-
- - - pincode should be in 6 digit format - - - Your pincode must be at least 5 characters long. - Your pincode name cannot exceed 6 characters. - - -
-
- - - {{ sd.name }} - - You must Pickup a State. - - -
- +
+ + - + {{ cd.name }} + + You must include a City. + + +
+ +
+ + + pincode should be in 6 digit format + + + Your pincode must be at least 5 characters long. + Your pincode name cannot exceed 6 characters. + +
+ +
+ + + {{ sd.name }} + + You must Pickup a State. + +
+ +
+ logo + +
-
+
- - + + + + +
- -
\ No newline at end of file + \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/company/company-dialog/company-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/company/company-dialog/company-dialog.component.ts index d7c8b0da8..f9c24d5f4 100644 --- a/ng6-seed/src/app/settings/masters/component/company/company-dialog/company-dialog.component.ts +++ b/ng6-seed/src/app/settings/masters/component/company/company-dialog/company-dialog.component.ts @@ -37,20 +37,7 @@ export class CompanyDialogComponent implements OnInit { ngOnInit() { - - this._companyForm = this._formBuilder.group({ - //Company_id: any; fk_city_id: any; - // - company_id: [this.data.company_id], - name: [this.data.name, Validators.compose([Validators.required])], - addressline1: [this.data.addressline1, Validators.compose([Validators.required])], - addressline2: [this.data.addressline2, Validators.compose([Validators.required])], - addressline3: [this.data.addressline3, Validators.compose([Validators.required])], - city: [this.data.city, Validators.compose([Validators.required])], - state: [this.data.state, Validators.compose([Validators.required])], - pincode: [this.data.pincode, Validators.compose([Validators.required, Validators.minLength(5), Validators.maxLength(6)])], - // logo : [this.data.logo] - }); +this.CompanyFormData(); this._mastersService.getAllMasterData('STATE') .subscribe( @@ -73,19 +60,39 @@ export class CompanyDialogComponent implements OnInit { } + + /** For CompanyFormData */ + CompanyFormData() { + + this._companyForm = this._formBuilder.group({ + //Company_id: any; fk_city_id: any; + // + company_id: [this.data.company_id], + name: [this.data.name, Validators.compose([Validators.required])], + addressline1: [this.data.addressline1, Validators.compose([Validators.required])], + addressline2: [this.data.addressline2, Validators.compose([Validators.required])], + addressline3: [this.data.addressline3, Validators.compose([Validators.required])], + city: [this.data.city, Validators.compose([Validators.required])], + state: [this.data.state, Validators.compose([Validators.required])], + pincode: [this.data.pincode, Validators.compose([Validators.required, Validators.minLength(5), Validators.maxLength(6)])], + logo : [null] + }); +} + /** For Popup Close Button */ onNoClick(): void { this.dialogRef.close(); } - // onFileChange($event) { - // //console.log($event.target.files[0]); + onFileChange($event) { + //console.log($event.target.files[0]); - // //if($event.target.files[0] < 0 ){ - // this.files = $event.target.files[0]; - // //} - // //console.log(this.files); - // } + //if($event.target.files[0] < 0 ){ + this.files = $event.target.files[0]; + + //} + //console.log(this.files); + } // onSubmit() { // if (isNaN(this.data.ID)) { // this._companyService.addCompany(this._companyForm.value); @@ -106,13 +113,26 @@ export class CompanyDialogComponent implements OnInit { if(isNaN(this.data.company_id)) { console.log(CompanyFormValue); Object.keys(CompanyFormValue).forEach((key) => ( CompanyFormValue[key] == null) && delete CompanyFormValue[key]); - console.log(CompanyFormValue); + + CompanyFormValue.logo = this.files.name; + //console.log(CompanyFormValue); //After Saving the Company data then popup close - this._mastersService.addMasterDetails(CompanyFormValue,'COMPANY').subscribe(); + this._mastersService.addCompanyDetails(CompanyFormValue).subscribe( + + dataresult=>{ + if (dataresult.dataStatus == true){ + this.dialogRef.close();//After Saving the City data then popup close + alert("Data Saved Successfully"); + } + else{ + alert("SomeThing Wents Wrong Try Again !"); + } + + }); //this._mastersService.addCompanyDetails(CompanyFormValue,'COMPANY').subscribe(); - this.dialogRef.close(); + //this.dialogRef.close(); //Need To Dispaly saving Datas - alert("Saved Successfully"); + //alert("Saved Successfully"); } else { this._mastersService.editMasterDetails(CompanyFormValue,'COMPANY').subscribe(); @@ -124,8 +144,12 @@ export class CompanyDialogComponent implements OnInit { } /** To Reset Popup Data */ - onReset(){ this._companyForm.reset(); } +/** To Reset Popup Data For Edit*/ +onResetForEdit(){ + this.CompanyFormData(); +} + } diff --git a/ng6-seed/src/app/settings/masters/component/company/company-list/company-list.component.html b/ng6-seed/src/app/settings/masters/component/company/company-list/company-list.component.html index 11ac932ed..f70996d69 100644 --- a/ng6-seed/src/app/settings/masters/component/company/company-list/company-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/company/company-list/company-list.component.html @@ -1,11 +1,12 @@
- +

-
- -
+ -
-
+
+
@@ -106,7 +107,7 @@ Sl - {{i+1}} + {{row.serialno}} @@ -127,7 +128,7 @@ Actions - + diff --git a/ng6-seed/src/app/settings/masters/component/company/company-list/company-list.component.scss b/ng6-seed/src/app/settings/masters/component/company/company-list/company-list.component.scss index a51650995..dea0560d5 100644 --- a/ng6-seed/src/app/settings/masters/component/company/company-list/company-list.component.scss +++ b/ng6-seed/src/app/settings/masters/component/company/company-list/company-list.component.scss @@ -1,118 +1,50 @@ +/** Table SerialNo CSS */ +.example-margin { + margin: 10px; +} -/* Structure -.example-container { +/** Table CSS - Dislplay Data */ +.mat-table { + display: table; + width: 100%; + overflow: auto; + max-height: 500px; + + > .mat-header-row, > .mat-row { + display: table-row; + padding: 0; + border: none; + + > .mat-header-cell, > .mat-cell { + display: table-cell; + height: 48px; + vertical-align: middle; + + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + } + } + } + +/** Table CSS -nocontent */ +.nocontent { + color: red; + font-size: 16px; + text-align: center; +} + +/** Table CSS - Search(or)Filter Field */ +.mat-form-field { + font-size: 14px; + width: 100%; +} + +.filter-container { display: flex; flex-direction: column; min-width: 300px; } -.example-header { - min-height: 56px; - max-height: 56px; - display: flex; - align-items: center; +.filter-header { + min-height: 64px; padding: 8px 24px 0; - font-size: 20px; - justify-content: space-between; - border-bottom: 1px solid transparent; -} - -.mat-input-container { - font-size: 14px; - flex-grow: 1; - margin-left: 32px; - margin-top: 8px; -} - -.example-no-results { - display: flex; - justify-content: center; - padding: 24px; - font-size: 12px; - font-style: italic; -} - -/** Selection styles -.example-selection-header { - font-size: 18px; - background: rgba(255, 64, 129, 0.3); - border-bottom: 1px solid #d696ac; -} - -.mat-column-select { - max-width: 54px; -} - -.mat-row:hover, .example-selected-row { - background: #f5f5f5; -} - -.mat-row:active, .mat-row.example-selected-row { - background: #eaeaea; -} - -.mat-table { - overflow: auto; - max-height: 500px; -}*/ -/* Structure * -.example-container { - display: flex; - flex-direction: column; - min-width: 30px; - width : 80%; - margin : 20px auto; - } - - .example-header { - min-height: 64px; - padding: 8px 24px 0; - } - - //mat-cell{ - .cell{ - display:flex !important; - justify-content:center!important; - - } - - // mat-header-cell { - .header-cell{ - display:flex; - justify-content:center; - } - - - table { - width: 100%; - } - - th { - text-align: left; - }*/ - .example-container { - display: flex; - flex-direction: column; - min-width: 300px; - } - - .example-header { - min-height: 64px; - padding: 8px 24px 0; - } - - .mat-form-field { - font-size: 14px; - width: 100%; - } - - .mat-table { - overflow: auto; - max-height: 500px; - } - .nocontent { - color: red; - font-size: 16px; - text-align: center; - } - +} \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/company/company-list/company-list.component.ts b/ng6-seed/src/app/settings/masters/component/company/company-list/company-list.component.ts index f1ada0b57..53da0e3c8 100644 --- a/ng6-seed/src/app/settings/masters/component/company/company-list/company-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/company/company-list/company-list.component.ts @@ -37,6 +37,7 @@ export class CompanyListComponent implements OnInit { noRecordFound: boolean = false; CompanyList: any = []; userData = null; + color = 'primary'; public dataLength: number; public dataSource = new MatTableDataSource(); @@ -67,6 +68,12 @@ export class CompanyListComponent implements OnInit { this.noRecordFound = false; this.userData = data.records; this.dataLength = data.records.length; + if(data.records.length >= 1){ + this.userData = this.userData.map((val, i)=>{ + val['serialno'] = i + 1; + return val; + }) + } this.dataSource.data = this.userData; }else{ this.noRecordFound = true; diff --git a/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-dialog/customer-behaviour-dialog.component.html b/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-dialog/customer-behaviour-dialog.component.html index eac08918d..2810d9a0c 100644 --- a/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-dialog/customer-behaviour-dialog.component.html +++ b/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-dialog/customer-behaviour-dialog.component.html @@ -41,7 +41,11 @@ fxLayoutAlign="center">
- + + + + +
diff --git a/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-dialog/customer-behaviour-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-dialog/customer-behaviour-dialog.component.ts index 257e570c3..89170af7b 100644 --- a/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-dialog/customer-behaviour-dialog.component.ts +++ b/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-dialog/customer-behaviour-dialog.component.ts @@ -32,15 +32,22 @@ export class CustomerBehaviourDialogComponent implements OnInit { ngOnInit() { /** Customer Behaviour Form Datas*/ - this._customerBehaviourForm = this._formBuilder.group({ - //branch_id: any; fk_city_id: any; - customer_behaviour_id: [this.data.customer_behaviour_id], - description: [this.data.description, Validators.compose([Validators.required])] - }); + this.customerBehaviourFormData() + //customer_behaviour_id, description, createdon, fk_createdby, updatedon, fk_updatedby, isactive //console.log(this._customerBehaviourForm); } + customerBehaviourFormData(){ + + this._customerBehaviourForm = this._formBuilder.group({ + //branch_id: any; fk_city_id: any; + customer_behaviour_id: [this.data.customer_behaviour_id], + description: [this.data.description, Validators.compose([Validators.required])] + }); + + } + // onSubmit() { // if (isNaN(this.data.ID)) { // this._MastersService.addBranch(this._customerBehaviourForm.value); @@ -101,5 +108,9 @@ onNoClick(): void { onReset(){ this._customerBehaviourForm.reset(); } + /** To Reset Popup Data For Edit*/ + onResetForEdit(){ + this.customerBehaviourFormData(); + } } /** End of CustomerBehaviour Component */ \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.html b/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.html index 6c1530ed4..092f2a7a7 100644 --- a/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.html @@ -1,11 +1,12 @@
- +

-
- -
+ -
-
+
+
@@ -73,7 +74,7 @@ Sl - {{i+1}} + {{row.serialno}} @@ -92,7 +93,7 @@ Actions - + @@ -105,13 +106,13 @@ .mat-header-row, > .mat-row { + display: table-row; + padding: 0; + border: none; + + > .mat-header-cell, > .mat-cell { + display: table-cell; + height: 48px; + vertical-align: middle; - .example-header { - min-height: 64px; - padding: 8px 24px 0; - } - - //mat-cell{ - .cell{ - display:flex !important; - justify-content:center!important; - - } - - // mat-header-cell { - .header-cell{ - display:flex; - justify-content:center; - } - - - table { - width: 100%; - } - - th { - text-align: left; - } -*/ -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 64px; - padding: 8px 24px 0; -} - -.mat-form-field { - font-size: 14px; - width: 100%; -} - -.mat-table { - overflow: auto; - max-height: 500px; -} + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + } + } + } +/** Table CSS -nocontent */ .nocontent { color: red; font-size: 16px; text-align: center; } -.active:hover{ - color: green; - font-size: 20px; + +/** Table CSS - Search(or)Filter Field */ +.mat-form-field { + font-size: 14px; + width: 100%; } -.deactive:hover{ - color: red; - font-size: 20px; -} -.example-margin { - margin: 10px; + +.filter-container { + display: flex; + flex-direction: column; + min-width: 300px; } + +.filter-header { + min-height: 64px; + padding: 8px 24px 0; +} \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.ts b/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.ts index b1b548a4b..62bf47008 100644 --- a/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/customer-behaviour/customer-behaviour-list/customer-behaviour-list.component.ts @@ -29,6 +29,7 @@ export class CustomerBehaviourListComponent implements OnInit { CustomerBehaviourList: any = []; noRecordFound: boolean = false; userData = null; + color = 'primary'; public dataLength: number; public dataSource = new MatTableDataSource(); @@ -52,10 +53,16 @@ export class CustomerBehaviourListComponent implements OnInit { getCustomerBehaviour() { this._MastersService.getAllMasterData('CUSTOMERBEHAVIOUR').subscribe( dataresult => { - if(dataresult.status === 200){ + if(dataresult.dataStatus == true){ this.noRecordFound = false; this.userData = dataresult.records; this.dataLength = dataresult.records.length; + if(dataresult.records.length >= 1){ + this.userData = this.userData.map((val, i)=>{ + val['serialno'] = i + 1; + return val; + }) + } this.dataSource.data = this.userData; }else{ this.noRecordFound = true; diff --git a/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-dialog/customer-segment-dialog.component.html b/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-dialog/customer-segment-dialog.component.html index b821e6dc2..fa62cda30 100644 --- a/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-dialog/customer-segment-dialog.component.html +++ b/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-dialog/customer-segment-dialog.component.html @@ -47,7 +47,11 @@ fxLayoutAlign="center">

- + + + + +
diff --git a/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-dialog/customer-segment-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-dialog/customer-segment-dialog.component.ts index fa83b951f..1cbd28b2b 100644 --- a/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-dialog/customer-segment-dialog.component.ts +++ b/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-dialog/customer-segment-dialog.component.ts @@ -29,18 +29,21 @@ export class CustomerSegmentDialogComponent implements OnInit { ngOnInit() { - - /** Customer Segment Datas */ - this._customerSegmentForm = this._formBuilder.group({ - - customer_segment_id: [this.data.customer_segment_id], - name: [this.data.name, Validators.compose([Validators.required])], - abbr: [this.data.abbr, Validators.compose([Validators.required])] - }); + this.customerSegmentFormDatas(); + //console.log(this._customerSegmentForm); //customer_segment_id, name, abbr, createdon, fk_createdby, updatedon, isactive, fk_updatedby } + /** Customer Segment Datas */ + customerSegmentFormDatas(){ + this._customerSegmentForm = this._formBuilder.group({ + customer_segment_id: [this.data.customer_segment_id], + name: [this.data.name, Validators.compose([Validators.required])], + abbr: [this.data.abbr, Validators.compose([Validators.required])] + }); + } + // onSubmit() { // if (isNaN(this.data.ID)) { // this._MastersService.addCustomerSegment(this._customerSegmentForm.value); @@ -99,5 +102,12 @@ export class CustomerSegmentDialogComponent implements OnInit { onReset(){ this._customerSegmentForm.reset(); } + +/** To Reset Popup Data For Edit*/ + onResetForEdit(){ + this.customerSegmentFormDatas(); + } + + } /** End Of Customer Segment Component */ \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.html b/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.html index 7dced45bf..c8567dd0b 100644 --- a/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.html @@ -1,11 +1,12 @@
- +

-
- -
+ -
-
+
+
@@ -78,7 +79,7 @@ Sl - {{i+1}} + {{row.serialno}} @@ -90,7 +91,7 @@ Actions - + @@ -104,7 +105,7 @@ @@ -112,7 +113,7 @@ diff --git a/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.scss b/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.scss index 98c5a2faf..dea0560d5 100644 --- a/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.scss +++ b/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.scss @@ -1,130 +1,50 @@ - -/* Structure -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 56px; - max-height: 56px; - display: flex; - align-items: center; - padding: 8px 24px 0; - font-size: 20px; - justify-content: space-between; - border-bottom: 1px solid transparent; -} - -.mat-input-container { - font-size: 14px; - flex-grow: 1; - margin-left: 32px; - margin-top: 8px; -} - -.example-no-results { - display: flex; - justify-content: center; - padding: 24px; - font-size: 12px; - font-style: italic; -} - -/** Selection styles -.example-selection-header { - font-size: 18px; - background: rgba(255, 64, 129, 0.3); - border-bottom: 1px solid #d696ac; -} - -.mat-column-select { - max-width: 54px; -} - -.mat-row:hover, .example-selected-row { - background: #f5f5f5; -} - -.mat-row:active, .mat-row.example-selected-row { - background: #eaeaea; +/** Table SerialNo CSS */ +.example-margin { + margin: 10px; } +/** Table CSS - Dislplay Data */ .mat-table { - overflow: auto; - max-height: 500px; -}*/ -/* Structure * -.example-container { - display: flex; - flex-direction: column; - min-width: 30px; - width : 80%; - margin : 20px auto; - } + display: table; + width: 100%; + overflow: auto; + max-height: 500px; + + > .mat-header-row, > .mat-row { + display: table-row; + padding: 0; + border: none; + + > .mat-header-cell, > .mat-cell { + display: table-cell; + height: 48px; + vertical-align: middle; - .example-header { - min-height: 64px; - padding: 8px 24px 0; - } - - //mat-cell{ - .cell{ - display:flex !important; - justify-content:center!important; - - } - - // mat-header-cell { - .header-cell{ - display:flex; - justify-content:center; - } + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + } + } + } - - table { - width: 100%; - } - - th { - text-align: left; - } - -*/ -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 64px; - padding: 8px 24px 0; -} - -.mat-form-field { - font-size: 14px; - width: 100%; -} - -.mat-table { - overflow: auto; - max-height: 500px; -} +/** Table CSS -nocontent */ .nocontent { color: red; font-size: 16px; text-align: center; } -.active:hover{ - color: green; - font-size: 20px; + +/** Table CSS - Search(or)Filter Field */ +.mat-form-field { + font-size: 14px; + width: 100%; } -.deactive:hover{ - color: red; - font-size: 20px; -} -.example-margin { - margin: 10px; + +.filter-container { + display: flex; + flex-direction: column; + min-width: 300px; } + +.filter-header { + min-height: 64px; + padding: 8px 24px 0; +} \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.ts b/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.ts index bdb1c7e21..93a822eaa 100644 --- a/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/customer-segment/customer-segment-list/customer-segment-list.component.ts @@ -27,6 +27,7 @@ export class CustomerSegmentListComponent implements OnInit { loader: boolean = false; CustomerSegmentList: any = []; noRecordFound: boolean = false; + color = 'primary'; // displayedColumns = ['customer_segment_id', 'abbr', 'name', 'isactive','actions']; userData = null; @@ -83,10 +84,16 @@ displayedColumns = ['serialno','name','actions','isactive']; getCustomerSegment() { this._MastersService.getAllMasterData('CUSTOMERSEGMENT').subscribe( data => { - if(data.status === 200){ + if(data.dataStatus == true){ this.noRecordFound = false; this.userData = data.records; this.dataLength = data.records.length; + if(data.records.length >= 1){ + this.userData = this.userData.map((val, i)=>{ + val['serialno'] = i + 1; + return val; + }) + } this.dataSource.data = this.userData; }else{ this.noRecordFound = true; diff --git a/ng6-seed/src/app/settings/masters/component/designation/designation-dialog/designation-dialog.component.html b/ng6-seed/src/app/settings/masters/component/designation/designation-dialog/designation-dialog.component.html index b425a40d2..20883e40f 100644 --- a/ng6-seed/src/app/settings/masters/component/designation/designation-dialog/designation-dialog.component.html +++ b/ng6-seed/src/app/settings/masters/component/designation/designation-dialog/designation-dialog.component.html @@ -47,7 +47,11 @@ fxLayoutAlign="center">

- + + + + +
diff --git a/ng6-seed/src/app/settings/masters/component/designation/designation-dialog/designation-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/designation/designation-dialog/designation-dialog.component.ts index a2582b9a8..15412fbbf 100644 --- a/ng6-seed/src/app/settings/masters/component/designation/designation-dialog/designation-dialog.component.ts +++ b/ng6-seed/src/app/settings/masters/component/designation/designation-dialog/designation-dialog.component.ts @@ -29,16 +29,20 @@ export class DesignationDialogComponent implements OnInit { ngOnInit() { + this.designationFormDatas(); - /** Designation Form Datas */ - this._designationForm = this._formBuilder.group({ - - designation_id: [this.data.designation_id], - name: [this.data.name, Validators.compose([Validators.required])], - short_name: [this.data.short_name, Validators.compose([Validators.required])] - }); + } + /** Designation Form Datas */ + designationFormDatas(){ + this._designationForm = this._formBuilder.group({ + + designation_id: [this.data.designation_id], + name: [this.data.name, Validators.compose([Validators.required])], + short_name: [this.data.short_name, Validators.compose([Validators.required])] + }); + } // onSubmit() { // if (isNaN(this.data.ID)) { // this._MastersService.addDesignation(this._designationForm.value); @@ -95,5 +99,9 @@ export class DesignationDialogComponent implements OnInit { onReset(){ this._designationForm.reset(); } + /** To Reset Popup Data For Edit*/ + onResetForEdit(){ + this.designationFormDatas(); + } } /** End Of Designation Component */ \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.html b/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.html index d880637ee..c7e248d6c 100644 --- a/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.html @@ -1,11 +1,12 @@
- +

-
- -
+ -
-
+
+
@@ -78,7 +79,7 @@ Sl - {{i+1}} + {{row.serialno}} @@ -94,7 +95,7 @@ @@ -102,7 +103,7 @@ @@ -112,7 +113,7 @@ Actions - + diff --git a/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.scss b/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.scss index d2a39133c..dea0560d5 100644 --- a/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.scss +++ b/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.scss @@ -1,131 +1,50 @@ - -/* Structure -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 56px; - max-height: 56px; - display: flex; - align-items: center; - padding: 8px 24px 0; - font-size: 20px; - justify-content: space-between; - border-bottom: 1px solid transparent; -} - -.mat-input-container { - font-size: 14px; - flex-grow: 1; - margin-left: 32px; - margin-top: 8px; -} - -.example-no-results { - display: flex; - justify-content: center; - padding: 24px; - font-size: 12px; - font-style: italic; -} - -/** Selection styles -.example-selection-header { - font-size: 18px; - background: rgba(255, 64, 129, 0.3); - border-bottom: 1px solid #d696ac; -} - -.mat-column-select { - max-width: 54px; -} - -.mat-row:hover, .example-selected-row { - background: #f5f5f5; -} - -.mat-row:active, .mat-row.example-selected-row { - background: #eaeaea; +/** Table SerialNo CSS */ +.example-margin { + margin: 10px; } +/** Table CSS - Dislplay Data */ .mat-table { - overflow: auto; - max-height: 500px; -}*/ -/* Structure * -.example-container { - display: flex; - flex-direction: column; - min-width: 30px; - width : 80%; - margin : 20px auto; - } + display: table; + width: 100%; + overflow: auto; + max-height: 500px; + + > .mat-header-row, > .mat-row { + display: table-row; + padding: 0; + border: none; + + > .mat-header-cell, > .mat-cell { + display: table-cell; + height: 48px; + vertical-align: middle; - .example-header { - min-height: 64px; - padding: 8px 24px 0; - } - - //mat-cell{ - .cell{ - display:flex !important; - justify-content:center!important; - - } - - // mat-header-cell { - .header-cell{ - display:flex; - justify-content:center; - } - - - table { - width: 100%; - } - - th { - text-align: left; - }*/ - - -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 64px; - padding: 8px 24px 0; -} - -.mat-form-field { - font-size: 14px; - width: 100%; -} - -.mat-table { - overflow: auto; - max-height: 500px; -} + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + } + } + } +/** Table CSS -nocontent */ .nocontent { color: red; font-size: 16px; text-align: center; } -.active:hover{ - color: green; - font-size: 20px; + +/** Table CSS - Search(or)Filter Field */ +.mat-form-field { + font-size: 14px; + width: 100%; } -.deactive:hover{ - color: red; - font-size: 20px; + +.filter-container { + display: flex; + flex-direction: column; + min-width: 300px; } -.example-margin { - margin: 10px; + +.filter-header { + min-height: 64px; + padding: 8px 24px 0; } \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.ts b/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.ts index eadc34b9d..0b8ec7447 100644 --- a/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/designation/designation-list/designation-list.component.ts @@ -28,6 +28,7 @@ export class DesignationListComponent implements OnInit { loader: boolean = false; noRecordFound: boolean = false; DesignationList: any = []; + color = 'primary'; userData = null; @@ -81,10 +82,16 @@ export class DesignationListComponent implements OnInit { getDesignation() { this._MastersService.getAllMasterData('DESIGNATION').subscribe( data => { - if(data.status === 200){ + if(data.dataStatus == true){ this.noRecordFound = false; this.userData = data.records; this.dataLength = data.records.length; + if(data.records.length >= 1){ + this.userData = this.userData.map((val, i)=>{ + val['serialno'] = i + 1; + return val; + }) + } this.dataSource.data = this.userData; }else{ this.noRecordFound = true; diff --git a/ng6-seed/src/app/settings/masters/component/frequency/frequency-dialog/frequency-dialog.component.html b/ng6-seed/src/app/settings/masters/component/frequency/frequency-dialog/frequency-dialog.component.html index 80a1bd05e..aded4c628 100644 --- a/ng6-seed/src/app/settings/masters/component/frequency/frequency-dialog/frequency-dialog.component.html +++ b/ng6-seed/src/app/settings/masters/component/frequency/frequency-dialog/frequency-dialog.component.html @@ -39,7 +39,11 @@ fxLayoutAlign="center">

- + + + + +
diff --git a/ng6-seed/src/app/settings/masters/component/frequency/frequency-dialog/frequency-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/frequency/frequency-dialog/frequency-dialog.component.ts index f36d4b167..e0737041a 100644 --- a/ng6-seed/src/app/settings/masters/component/frequency/frequency-dialog/frequency-dialog.component.ts +++ b/ng6-seed/src/app/settings/masters/component/frequency/frequency-dialog/frequency-dialog.component.ts @@ -29,14 +29,17 @@ export class FrequencyDialogComponent implements OnInit { ngOnInit() { - /**FrequencyForm Datas*/ - this._frequencyForm = this._formBuilder.group({ - frequency_id: [this.data.frequency_id], - name: [this.data.name, Validators.compose([Validators.required])] - }); + this.frequencyFormDatas(); + //console.log(this._frequencyForm); } + /**FrequencyForm Datas*/ + frequencyFormDatas(){ this._frequencyForm = this._formBuilder.group({ + frequency_id: [this.data.frequency_id], + name: [this.data.name, Validators.compose([Validators.required])] + });} + /** For Popup Close Button */ onNoClick(): void { this.dialogRef.close(); @@ -90,5 +93,10 @@ export class FrequencyDialogComponent implements OnInit { onReset(){ this._frequencyForm.reset(); } + + /** To Reset Popup Data For Edit*/ + onResetForEdit(){ + this.frequencyFormDatas(); + } } /** End Of Frequency Component */ \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.html b/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.html index 91ea8cb5a..198bf8cb3 100644 --- a/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.html @@ -1,11 +1,12 @@
- +

-
- -
+ -
-
+
+
@@ -87,7 +88,7 @@ Sl - {{i+1}} + {{row.serialno}} @@ -101,13 +102,13 @@ Actions - + diff --git a/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.scss b/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.scss index bef4a3bab..dea0560d5 100644 --- a/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.scss +++ b/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.scss @@ -1,160 +1,50 @@ -/* Structure -.example-container { - display: flex; - flex-direction: column; - min-width: 30px; - } - - .example-header { - min-height: 64px; - padding: 8px 24px 0; - } - - //mat-cell{ - .cell{ - display:flex !important; - justify-content:center!important; - - } - - // mat-header-cell { - .header-cell{ - display:flex; - justify-content:center; - }*/ - - // - - - - -/* Structure -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 56px; - max-height: 56px; - display: flex; - align-items: center; - padding: 8px 24px 0; - font-size: 20px; - justify-content: space-between; - border-bottom: 1px solid transparent; -} - -.mat-input-container { - font-size: 14px; - flex-grow: 1; - margin-left: 32px; - margin-top: 8px; -} - -.example-no-results { - display: flex; - justify-content: center; - padding: 24px; - font-size: 12px; - font-style: italic; -} - -/** Selection styles -.example-selection-header { - font-size: 18px; - background: rgba(255, 64, 129, 0.3); - border-bottom: 1px solid #d696ac; -} - -.mat-column-select { - max-width: 54px; -} - -.mat-row:hover, .example-selected-row { - background: #f5f5f5; -} - -.mat-row:active, .mat-row.example-selected-row { - background: #eaeaea; +/** Table SerialNo CSS */ +.example-margin { + margin: 10px; } +/** Table CSS - Dislplay Data */ .mat-table { - overflow: auto; - max-height: 500px; -}*/ -/* Structure * -.example-container { - display: flex; - flex-direction: column; - min-width: 30px; - width : 80%; - margin : 20px auto; -} + display: table; + width: 100%; + overflow: auto; + max-height: 500px; + + > .mat-header-row, > .mat-row { + display: table-row; + padding: 0; + border: none; + + > .mat-header-cell, > .mat-cell { + display: table-cell; + height: 48px; + vertical-align: middle; -.example-header { - min-height: 64px; - padding: 8px 24px 0; -} + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + } + } + } -//mat-cell{ -.cell{ - display:flex !important; - justify-content:center!important; - -} - -// mat-header-cell { - .header-cell{ - display:flex; - justify-content:center; -} - - -table { - width: 100%; -} - -th { - text-align: left; -}*/ - - - -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 64px; - padding: 8px 24px 0; -} - -.mat-form-field { - font-size: 14px; - width: 100%; -} - -.mat-table { - overflow: auto; - max-height: 500px; -} +/** Table CSS -nocontent */ .nocontent { color: red; font-size: 16px; text-align: center; } -.active:hover{ - color: green; - font-size: 20px; + +/** Table CSS - Search(or)Filter Field */ +.mat-form-field { + font-size: 14px; + width: 100%; } -.deactive:hover{ - color: red; - font-size: 20px; -} -.example-margin { - margin: 10px; + +.filter-container { + display: flex; + flex-direction: column; + min-width: 300px; } + +.filter-header { + min-height: 64px; + padding: 8px 24px 0; +} \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.ts b/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.ts index 2b8089cce..6b09aad45 100644 --- a/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/frequency/frequency-list/frequency-list.component.ts @@ -29,7 +29,7 @@ export class FrequencyListComponent implements OnInit { loader: boolean = false; FrequencyList: any = []; noRecordFound: boolean = false; - + color = 'primary'; userData = null; @@ -90,10 +90,16 @@ export class FrequencyListComponent implements OnInit { getFrequency() { this._MastersService.getAllMasterData('FREQUENCY').subscribe( data => { - if(data.status === 200){ + if(data.dataStatus == true){ this.noRecordFound = false; this.userData = data.records; this.dataLength = data.records.length; + if(data.records.length >= 1){ + this.userData = this.userData.map((val, i)=>{ + val['serialno'] = i + 1; + return val; + }) + } this.dataSource.data = this.userData; }else{ this.noRecordFound = true; @@ -143,5 +149,6 @@ applyFilter(filterValue: string) { this.dataSource.filter = filterValue; } + } -/** End of BranchListComponent */ \ No newline at end of file +/** End of FrequencyListComponent */ \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.html b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.html index cf954f084..fd0068ee6 100644 --- a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.html +++ b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.html @@ -39,7 +39,11 @@ fxLayoutAlign="center">

- + + + + + diff --git a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.ts index 2c2963fe0..8c3255cc0 100644 --- a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.ts +++ b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-dialog/industry_classification-dialog.component.ts @@ -29,15 +29,21 @@ export class IndustryClassificationDialogComponent implements OnInit { ngOnInit() { - /** Industry Classification Form Data */ - this._IndustryClassificationForm = this._formBuilder.group({ - industry_classification_id: [this.data.industry_classification_id], - name: [this.data.name, Validators.compose([Validators.required])] - }); + this.industryClassificationFormDatas(); + //console.log(this._IndustryClassificationForm); //industry_classification_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive } + /** Industry Classification Form Data */ + industryClassificationFormDatas(){ + + this._IndustryClassificationForm = this._formBuilder.group({ + industry_classification_id: [this.data.industry_classification_id], + name: [this.data.name, Validators.compose([Validators.required])] + }); + } + // onSubmit() { // if (isNaN(this.data.ID)) { // this._contactService.addIndustryClassification(this._IndustryClassificationForm.value); @@ -93,5 +99,11 @@ onNoClick(): void { onReset(){ this._IndustryClassificationForm.reset(); } + + /** To Reset Popup Data For Edit*/ + onResetForEdit(){ + this.industryClassificationFormDatas(); + } + } /** End Of Industry Classification Dialog Component */ \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.html b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.html index 3820b5bc1..5cd969bfa 100644 --- a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.html @@ -1,14 +1,14 @@
- +

-
- -
-
+ +
-
+
@@ -18,7 +18,7 @@ Sl - {{i+1}} + {{row.serialno}} @@ -34,14 +34,14 @@ @@ -51,7 +51,7 @@ Actions - + diff --git a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.scss b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.scss index d334fc024..dea0560d5 100644 --- a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.scss +++ b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.scss @@ -1,156 +1,50 @@ -/* Structure -.example-container { - display: flex; - flex-direction: column; - min-width: 30px; - } - - .example-header { - min-height: 64px; - padding: 8px 24px 0; - } - - //mat-cell{ - .cell{ - display:flex !important; - justify-content:center!important; - - } - - // mat-header-cell { - .header-cell{ - display:flex; - justify-content:center; - }*/ - - -/* Structure -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 56px; - max-height: 56px; - display: flex; - align-items: center; - padding: 8px 24px 0; - font-size: 20px; - justify-content: space-between; - border-bottom: 1px solid transparent; -} - -.mat-input-container { - font-size: 14px; - flex-grow: 1; - margin-left: 32px; - margin-top: 8px; -} - -.example-no-results { - display: flex; - justify-content: center; - padding: 24px; - font-size: 12px; - font-style: italic; -} - -/** Selection styles -.example-selection-header { - font-size: 18px; - background: rgba(255, 64, 129, 0.3); - border-bottom: 1px solid #d696ac; -} - -.mat-column-select { - max-width: 54px; -} - -.mat-row:hover, .example-selected-row { - background: #f5f5f5; -} - -.mat-row:active, .mat-row.example-selected-row { - background: #eaeaea; +/** Table SerialNo CSS */ +.example-margin { + margin: 10px; } +/** Table CSS - Dislplay Data */ .mat-table { - overflow: auto; - max-height: 500px; -}*/ -/* Structure * -.example-container { - display: flex; - flex-direction: column; - min-width: 30px; - width : 80%; - margin : 20px auto; -} - -.example-header { - min-height: 64px; - padding: 8px 24px 0; -} - -//mat-cell{ -.cell{ - display:flex !important; - justify-content:center!important; - -} - -// mat-header-cell { - .header-cell{ - display:flex; - justify-content:center; -} - - -table { - width: 100%; -} - -th { - text-align: left; -}*/ - - -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 64px; - padding: 8px 24px 0; + display: table; + width: 100%; + overflow: auto; + max-height: 500px; + + > .mat-header-row, > .mat-row { + display: table-row; + padding: 0; + border: none; + + > .mat-header-cell, > .mat-cell { + display: table-cell; + height: 48px; + vertical-align: middle; + + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + } + } + } + +/** Table CSS -nocontent */ +.nocontent { + color: red; + font-size: 16px; + text-align: center; } +/** Table CSS - Search(or)Filter Field */ .mat-form-field { font-size: 14px; width: 100%; } - -.mat-table { - overflow: auto; - max-height: 500px; + +.filter-container { + display: flex; + flex-direction: column; + min-width: 300px; } -.nocontent { - color: red; - font-size: 16px; - text-align: center; -} -.active:hover{ - color: green; - font-size: 20px; -} -.deactive:hover{ - color: red; - font-size: 20px; -} -.example-margin { - margin: 10px; -} +.filter-header { + min-height: 64px; + padding: 8px 24px 0; +} \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.ts b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.ts index e1d6b2933..7221dad2c 100644 --- a/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/industry_classification/industry_classification-list/industry_classification-list.component.ts @@ -38,6 +38,7 @@ export class IndustryClassificationListComponent implements OnInit { noRecordFound: boolean = false; userData = null; + color = 'primary'; public dataLength: number; public dataSource = new MatTableDataSource(); @@ -95,10 +96,16 @@ export class IndustryClassificationListComponent implements OnInit { getIndustryClassification() { this._IMService.getAllMasterData('INDUSTRYCLASSIFICATION').subscribe(data => { - if(data.status === 200){ + if(data.dataStatus == true){ this.noRecordFound = false; this.userData = data.records; this.dataLength = data.records.length; + if(data.records.length >= 1){ + this.userData = this.userData.map((val, i)=>{ + val['serialno'] = i + 1; + return val; + }) + } this.dataSource.data = this.userData; }else{ this.noRecordFound = true; diff --git a/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-dialog/lender-hierarchy-dialog.component.html b/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-dialog/lender-hierarchy-dialog.component.html index 1c6e002ed..2300ec3f7 100644 --- a/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-dialog/lender-hierarchy-dialog.component.html +++ b/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-dialog/lender-hierarchy-dialog.component.html @@ -38,7 +38,11 @@ fxLayoutAlign="center">

- + + + + +
diff --git a/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-dialog/lender-hierarchy-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-dialog/lender-hierarchy-dialog.component.ts index 0b3b71c0d..6c36da5a8 100644 --- a/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-dialog/lender-hierarchy-dialog.component.ts +++ b/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-dialog/lender-hierarchy-dialog.component.ts @@ -28,17 +28,22 @@ export class LenderHierarchyDialogComponent implements OnInit { ngOnInit() { - /** lender Hierarchy Form Data */ - this._lenderHierarchyForm = this._formBuilder.group({ - //Designation_id: any; fk_city_id: any; - - lender_hierarchy_id: [this.data.lender_hierarchy_id], - lender_hierarchy: [this.data.lender_hierarchy, Validators.compose([Validators.required])], - - }); + this.lenderHierarchyFormDatas(); + + //console.log(this._lenderHierarchyForm); } + /** lender Hierarchy Form Data */ + lenderHierarchyFormDatas(){ + this._lenderHierarchyForm = this._formBuilder.group({ + //Designation_id: any; fk_city_id: any; + + lender_hierarchy_id: [this.data.lender_hierarchy_id], + lender_hierarchy: [this.data.lender_hierarchy, Validators.compose([Validators.required])], + + });} + // onSubmit() { // if (isNaN(this.data.ID)) { // this._MastersService.addDesignation(this._lenderHierarchyForm.value); @@ -98,5 +103,11 @@ export class LenderHierarchyDialogComponent implements OnInit { onReset(){ this._lenderHierarchyForm.reset(); } + + /** To Reset Popup Data For Edit*/ + onResetForEdit(){ + this.lenderHierarchyFormDatas(); + } + } /** End of lender hierarchy Component*/ \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.html b/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.html index 69c86ca60..4a399912b 100644 --- a/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.html @@ -1,11 +1,11 @@
- +

-
- -
+ -
-
+
+
@@ -72,7 +72,7 @@ Sl - {{i+1}} + {{row.serialno}} @@ -91,7 +91,7 @@ @@ -99,7 +99,7 @@ @@ -109,7 +109,7 @@ Actions - + diff --git a/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.scss b/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.scss index 79309cc02..dea0560d5 100644 --- a/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.scss +++ b/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.scss @@ -1,132 +1,50 @@ - -/* Structure -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 56px; - max-height: 56px; - display: flex; - align-items: center; - padding: 8px 24px 0; - font-size: 20px; - justify-content: space-between; - border-bottom: 1px solid transparent; -} - -.mat-input-container { - font-size: 14px; - flex-grow: 1; - margin-left: 32px; - margin-top: 8px; -} - -.example-no-results { - display: flex; - justify-content: center; - padding: 24px; - font-size: 12px; - font-style: italic; -} - -/** Selection styles -.example-selection-header { - font-size: 18px; - background: rgba(255, 64, 129, 0.3); - border-bottom: 1px solid #d696ac; -} - -.mat-column-select { - max-width: 54px; -} - -.mat-row:hover, .example-selected-row { - background: #f5f5f5; -} - -.mat-row:active, .mat-row.example-selected-row { - background: #eaeaea; +/** Table SerialNo CSS */ +.example-margin { + margin: 10px; } +/** Table CSS - Dislplay Data */ .mat-table { - overflow: auto; - max-height: 500px; -}*/ -/* Structure * -.example-container { - display: flex; - flex-direction: column; - min-width: 30px; - width : 80%; - margin : 20px auto; - } + display: table; + width: 100%; + overflow: auto; + max-height: 500px; + + > .mat-header-row, > .mat-row { + display: table-row; + padding: 0; + border: none; + + > .mat-header-cell, > .mat-cell { + display: table-cell; + height: 48px; + vertical-align: middle; - .example-header { - min-height: 64px; - padding: 8px 24px 0; - } - - //mat-cell{ - .cell{ - display:flex !important; - justify-content:center!important; - - } - - // mat-header-cell { - .header-cell{ - display:flex; - justify-content:center; - } - - - table { - width: 100%; - } - - th { - text-align: left; - }*/ - - -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 64px; - padding: 8px 24px 0; -} - -.mat-form-field { - font-size: 14px; - width: 100%; -} - -.mat-table { - overflow: auto; - max-height: 500px; -} + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + } + } + } +/** Table CSS -nocontent */ .nocontent { color: red; font-size: 16px; text-align: center; } -.active:hover{ - color: green; - font-size: 20px; + +/** Table CSS - Search(or)Filter Field */ +.mat-form-field { + font-size: 14px; + width: 100%; } -.deactive:hover{ - color: red; - font-size: 20px; -} -.example-margin { - margin: 10px; + +.filter-container { + display: flex; + flex-direction: column; + min-width: 300px; } +.filter-header { + min-height: 64px; + padding: 8px 24px 0; +} \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.ts b/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.ts index 70a57c090..ae18cadae 100644 --- a/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.ts @@ -31,7 +31,7 @@ export class LenderHierarchyListComponent implements OnInit { isPopupOpened: boolean = true; loader: boolean = false; LenderHierarchyList: any = []; - + color = 'primary'; //displayedColumns = ['lender_hierarchy_id', 'lender_hierarchy','isactive','actions']; userData = null; @@ -103,10 +103,16 @@ export class LenderHierarchyListComponent implements OnInit { this._MastersService.getAllMasterData('LENDERHIERARCHY').subscribe( data => { - if(data.status === 200){ + if(data.dataStatus == true){ this.noRecordFound = false; this.userData = data.records; this.dataLength = data.records.length; + if(data.records.length >= 1){ + this.userData = this.userData.map((val, i)=>{ + val['serialno'] = i + 1; + return val; + }) + } this.dataSource.data = this.userData; }else{ this.noRecordFound = true; diff --git a/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-dialog/members-occupation-dialog.component.html b/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-dialog/members-occupation-dialog.component.html index 5d2a610c7..5df35b721 100644 --- a/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-dialog/members-occupation-dialog.component.html +++ b/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-dialog/members-occupation-dialog.component.html @@ -38,7 +38,11 @@ fxLayout="row">

- + + + + +
diff --git a/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-dialog/members-occupation-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-dialog/members-occupation-dialog.component.ts index 09f40e51c..6cb891ecf 100644 --- a/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-dialog/members-occupation-dialog.component.ts +++ b/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-dialog/members-occupation-dialog.component.ts @@ -26,13 +26,15 @@ export class MembersOccupationDialogComponent implements OnInit { private _memberService: MastersService, @Inject(MAT_DIALOG_DATA) public data: any) { } - + occupationFormDatas(){ + this._occupationForm = this._formBuilder.group({ + occupation_non_earning_member_id: [this.data.occupation_non_earning_member_id], + name: [this.data.name, Validators.compose([Validators.required])] + }); +} ngOnInit() { - - this._occupationForm = this._formBuilder.group({ - occupation_non_earning_member_id: [this.data.occupation_non_earning_member_id], - name: [this.data.name, Validators.compose([Validators.required])] - }); + this.occupationFormDatas(); + //console.log(this._occupationForm); } @@ -91,6 +93,12 @@ export class MembersOccupationDialogComponent implements OnInit { onReset(){ this._occupationForm.reset(); } + + /** To Reset Popup Data For Edit*/ + onResetForEdit(){ + this.occupationFormDatas(); + } + } /** End Of Occupation Dialog Component */ \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.html b/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.html index ef4a74013..f4cc3b6ef 100644 --- a/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.html @@ -1,11 +1,11 @@
- +

-
- -
+ -
-
+
+
@@ -92,7 +92,7 @@ Sl - {{i+1}} + {{row.serialno}} @@ -108,7 +108,7 @@ @@ -116,7 +116,7 @@ @@ -128,7 +128,7 @@ Actions - + diff --git a/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.scss b/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.scss index 5c4e9d53e..dea0560d5 100644 --- a/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.scss +++ b/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.scss @@ -1,98 +1,50 @@ -/* Structure -.example-container { - display: flex; - flex-direction: column; - min-width: 30px; - } - - .example-header { - min-height: 64px; - padding: 8px 24px 0; - } - - //mat-cell{ - .cell{ - display:flex !important; - justify-content:center!important; - - } - - // mat-header-cell { - .header-cell{ - display:flex; - justify-content:center; - }* - - .example-container { - display: flex; - flex-direction: column; - min-width: 30px; - width : 80%; - margin : 20px auto; - } - - .example-header { - min-height: 64px; - padding: 8px 24px 0; - } - - //mat-cell{ - .cell{ - display:flex !important; - justify-content:center!important; - - } - - // mat-header-cell { - .header-cell{ - display:flex; - justify-content:center; - } - - - table { - width: 100%; - } - - th { - text-align: left; - } - -*/ -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 64px; - padding: 8px 24px 0; -} - -.mat-form-field { - font-size: 14px; - width: 100%; +/** Table SerialNo CSS */ +.example-margin { + margin: 10px; } +/** Table CSS - Dislplay Data */ .mat-table { - overflow: auto; - max-height: 500px; -} + display: table; + width: 100%; + overflow: auto; + max-height: 500px; + + > .mat-header-row, > .mat-row { + display: table-row; + padding: 0; + border: none; + + > .mat-header-cell, > .mat-cell { + display: table-cell; + height: 48px; + vertical-align: middle; + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + } + } + } + +/** Table CSS -nocontent */ .nocontent { color: red; font-size: 16px; text-align: center; } -.active:hover{ - color: green; - font-size: 20px; + +/** Table CSS - Search(or)Filter Field */ +.mat-form-field { + font-size: 14px; + width: 100%; } -.deactive:hover{ - color: red; - font-size: 20px; + +.filter-container { + display: flex; + flex-direction: column; + min-width: 300px; } -.example-margin { - margin: 10px; + +.filter-header { + min-height: 64px; + padding: 8px 24px 0; } \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.ts b/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.ts index 36e91baf7..ae9e016d6 100644 --- a/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/members-occupation/members-occupation-list/members-occupation-list.component.ts @@ -30,7 +30,7 @@ export class MembersOccupationListComponent implements OnInit { isPopupOpened: boolean = true; loader: boolean = false; MemberOccupationList: any = []; - + color = 'primary'; userData = null; noRecordFound: boolean = false; @@ -106,6 +106,12 @@ export class MembersOccupationListComponent implements OnInit { this.noRecordFound = false; this.userData = data.records; this.dataLength = data.records.length; + if(data.records.length >= 1){ + this.userData = this.userData.map((val, i)=>{ + val['serialno'] = i + 1; + return val; + }) + } this.dataSource.data = this.userData; }else{ this.noRecordFound = true; diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.html b/ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.html similarity index 89% rename from ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.html rename to ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.html index 73929e94a..ef344ae78 100644 --- a/ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.html @@ -1,13 +1,13 @@
- +

-
- -
-
-
+ +
+
@@ -17,7 +17,7 @@ Sl - {{i+1}} + {{row.serialno}} @@ -53,14 +53,14 @@ class="example-margin" matTooltip="Not a Default" matTooltipPosition="above" - checked="false" + checked="false" [color]="color" (change)="defaultPDAllocationType(row.pd_allocation_type_id)" onclick="return confirm('Are you sure?')"> diff --git a/ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.scss b/ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.scss new file mode 100644 index 000000000..dea0560d5 --- /dev/null +++ b/ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.scss @@ -0,0 +1,50 @@ +/** Table SerialNo CSS */ +.example-margin { + margin: 10px; +} + +/** Table CSS - Dislplay Data */ +.mat-table { + display: table; + width: 100%; + overflow: auto; + max-height: 500px; + + > .mat-header-row, > .mat-row { + display: table-row; + padding: 0; + border: none; + + > .mat-header-cell, > .mat-cell { + display: table-cell; + height: 48px; + vertical-align: middle; + + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + } + } + } + +/** Table CSS -nocontent */ +.nocontent { + color: red; + font-size: 16px; + text-align: center; +} + +/** Table CSS - Search(or)Filter Field */ +.mat-form-field { + font-size: 14px; + width: 100%; +} + +.filter-container { + display: flex; + flex-direction: column; + min-width: 300px; +} + +.filter-header { + min-height: 64px; + padding: 8px 24px 0; +} \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.spec.ts b/ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.spec.ts similarity index 100% rename from ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.spec.ts rename to ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.spec.ts diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.ts b/ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.ts similarity index 61% rename from ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.ts rename to ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.ts index a7ac8c42d..103ab9456 100644 --- a/ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.ts @@ -10,9 +10,9 @@ import { MatDialog, MatSort, MatTableDataSource } from '@angular/material'; /** Service */ -import { MastersService } from '../../../../service/masters/masters.service'; +import { MastersService } from '../../../service/masters/masters.service'; /** Model */ -import { PdAllocationType } from '../../../model/pd'; +import { PdAllocationType } from '../../model/pd'; @Component({ @@ -26,9 +26,8 @@ export class PdAllocationTypeListComponent implements OnInit { loader: boolean = false; PDAllocationTypeList: any = []; noRecordFound: boolean = false; - userData = null; - defaultdatas : any = []; - defdatas : any = []; + dataSourceRecords = null; + color = 'primary'; public dataLength: number; @@ -55,9 +54,15 @@ export class PdAllocationTypeListComponent implements OnInit { data => { if(data.dataStatus == true){ this.noRecordFound = false; - this.userData = data.records; + this.dataSourceRecords = data.records; this.dataLength = data.records.length; - this.dataSource.data = this.userData; + if(data.records.length >= 1){ + this.dataSourceRecords = this.dataSourceRecords.map((val, i)=>{ + val['serialno'] = i + 1; + return val; + }) + } + this.dataSource.data = this.dataSourceRecords; }else{ this.noRecordFound = true; this.dataLength = 0 @@ -70,41 +75,44 @@ export class PdAllocationTypeListComponent implements OnInit { * And Remaining All are set to '0' */ defaultPDAllocationType(id: number){ + + let allDefaultData:any =[];//Empty array to store defaultDatas + let tempDefaultData:any =[]; - var defaultDatas = [];//Empty array to store defaultDatas - - defaultDatas.push({'pd_allocation_type_id':id,'default': 1}); - - this._MastersService.getAllMasterData('PDALLOCATIONTYPE').subscribe( - data => { - if(data.dataStatus == true){ - let allDefaultDatas = data.records; - allDefaultDatas = allDefaultDatas.filter(Datas=>Datas.default == 1 ); - - allDefaultDatas.forEach((item, index) => { - // console.log('id',item.pd_allocation_type_id); - // console.log('value',item.default); - let dataChanges = { + + this.dataSourceRecords.forEach((item, index) => { + + if(item.pd_allocation_type_id == id){ + tempDefaultData = { + pd_allocation_type_id:item.pd_allocation_type_id, + default:1 + }; + this.dataSourceRecords[index].default = 1; + }else{ + tempDefaultData = { pd_allocation_type_id:item.pd_allocation_type_id, default:0 }; - defaultDatas.push(dataChanges); - }); - } - }); + + this.dataSourceRecords[index].default = 0; + } - //console.log(defaultDatas); - - this._MastersService.editMasterDetails(defaultDatas,'PDALLOCATIONTYPE') + allDefaultData.push(tempDefaultData); + }); + + + this._MastersService.editPDAllocationType(allDefaultData,'PDALLOCATIONTYPE') .subscribe(dataresult=>{ - if (dataresult.dataStatus == true){ - //alert("my check"); - this.getPDAllocationType(); - } - else{ + + if (dataresult.dataStatus == true){ + //this.getPDAllocationType(); + alert("Done"); + } + else{ alert("SomeThing Wents Wrong Try Again !"); - } + } }); + //console.log('at last Completed Section'); } /** For Display Tables Pagination And Sorting */ diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-dialog/pd-location-approach-dialog.component.html b/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-dialog/pd-location-approach-dialog.component.html similarity index 76% rename from ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-dialog/pd-location-approach-dialog.component.html rename to ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-dialog/pd-location-approach-dialog.component.html index 5a29d76e9..9f4e1788a 100644 --- a/ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-dialog/pd-location-approach-dialog.component.html +++ b/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-dialog/pd-location-approach-dialog.component.html @@ -41,7 +41,11 @@ fxLayoutAlign="center">
- + + + + +
diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-dialog/pd-location-approach-dialog.component.scss b/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-dialog/pd-location-approach-dialog.component.scss similarity index 100% rename from ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-dialog/pd-location-approach-dialog.component.scss rename to ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-dialog/pd-location-approach-dialog.component.scss diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-dialog/pd-location-approach-dialog.component.spec.ts b/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-dialog/pd-location-approach-dialog.component.spec.ts similarity index 100% rename from ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-dialog/pd-location-approach-dialog.component.spec.ts rename to ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-dialog/pd-location-approach-dialog.component.spec.ts diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-dialog/pd-location-approach-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-dialog/pd-location-approach-dialog.component.ts similarity index 87% rename from ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-dialog/pd-location-approach-dialog.component.ts rename to ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-dialog/pd-location-approach-dialog.component.ts index 59ca111cc..26b3b1790 100644 --- a/ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-dialog/pd-location-approach-dialog.component.ts +++ b/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-dialog/pd-location-approach-dialog.component.ts @@ -28,15 +28,19 @@ export class PdLocationApproachDialogComponent implements OnInit { //pd_location_approach_id, description, createdon, fk_createdby, updatedon, fk_updatedby, isactive ngOnInit() { + this.pdLocationApproachFormDatas(); + - this._pdLocationApproachForm = this._formBuilder.group({ - //branch_id: any; fk_city_id: any; - pd_location_approach_id: [this.data.pd_location_approach_id], - description: [this.data.description, Validators.compose([Validators.required])] - }); //console.log(this._pdLocationApproachForm); } + pdLocationApproachFormDatas(){ + this._pdLocationApproachForm = this._formBuilder.group({ + //branch_id: any; fk_city_id: any; + pd_location_approach_id: [this.data.pd_location_approach_id], + description: [this.data.description, Validators.compose([Validators.required])] + });} + // onSubmit() { // if (isNaN(this.data.ID)) { // this._MastersService.addBranch(this._pdLocationApproachForm.value); @@ -96,5 +100,10 @@ export class PdLocationApproachDialogComponent implements OnInit { onReset(){ this._pdLocationApproachForm.reset(); } + + /** To Reset Popup Data For Edit*/ + onResetForEdit(){ + this.pdLocationApproachFormDatas(); + } } /** End Of Pd Location DIalog COmponent */ \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-list/pd-location-approach-list.component.html b/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.html similarity index 90% rename from ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-list/pd-location-approach-list.component.html rename to ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.html index 920dcd91f..92666795b 100644 --- a/ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-list/pd-location-approach-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.html @@ -1,11 +1,11 @@
- +

-
- -
+ -
-
+
+
@@ -73,7 +73,7 @@ Sl - {{i+1}} + {{row.serialno}} @@ -87,7 +87,7 @@ @@ -95,7 +95,7 @@ @@ -107,7 +107,7 @@ Actions - + diff --git a/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.scss b/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.scss new file mode 100644 index 000000000..dea0560d5 --- /dev/null +++ b/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.scss @@ -0,0 +1,50 @@ +/** Table SerialNo CSS */ +.example-margin { + margin: 10px; +} + +/** Table CSS - Dislplay Data */ +.mat-table { + display: table; + width: 100%; + overflow: auto; + max-height: 500px; + + > .mat-header-row, > .mat-row { + display: table-row; + padding: 0; + border: none; + + > .mat-header-cell, > .mat-cell { + display: table-cell; + height: 48px; + vertical-align: middle; + + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + } + } + } + +/** Table CSS -nocontent */ +.nocontent { + color: red; + font-size: 16px; + text-align: center; +} + +/** Table CSS - Search(or)Filter Field */ +.mat-form-field { + font-size: 14px; + width: 100%; +} + +.filter-container { + display: flex; + flex-direction: column; + min-width: 300px; +} + +.filter-header { + min-height: 64px; + padding: 8px 24px 0; +} \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-list/pd-location-approach-list.component.spec.ts b/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.spec.ts similarity index 100% rename from ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-list/pd-location-approach-list.component.spec.ts rename to ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.spec.ts diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-list/pd-location-approach-list.component.ts b/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.ts similarity index 94% rename from ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-list/pd-location-approach-list.component.ts rename to ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.ts index b2280fb66..38e347e24 100644 --- a/ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-list/pd-location-approach-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component.ts @@ -36,7 +36,7 @@ export class PdLocationApproachListComponent implements OnInit { isPopupOpened = true; loader: boolean = false; PdLocationApproachList: any = []; - + color = 'primary'; userData = null; noRecordFound: boolean = false; public dataLength: number; @@ -93,10 +93,16 @@ export class PdLocationApproachListComponent implements OnInit { getPdLocationApproach() { this._MastersService.getAllMasterData('PDLOCATIONAPPROACH').subscribe( data => { - if(data.status === 200){ + if(data.dataStatus == true){ this.noRecordFound = false; this.userData = data.records; this.dataLength = data.records.length; + if(data.records.length >= 1){ + this.userData = this.userData.map((val, i)=>{ + val['serialno'] = i + 1; + return val; + }) + } this.dataSource.data = this.userData; }else{ this.noRecordFound = true; diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.html b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-dialog/pd-notification-dialog.component.html similarity index 65% rename from ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.html rename to ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-dialog/pd-notification-dialog.component.html index 5976f0efd..c1693c543 100644 --- a/ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.html +++ b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-dialog/pd-notification-dialog.component.html @@ -2,7 +2,7 @@
-

PD Allocation Type                                                 

+

PD Notification                                                 

@@ -10,15 +10,15 @@ fxLayoutAlign="center">
-
+
- - You must include a Name. + + You must include a ID.
diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.scss b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-dialog/pd-notification-dialog.component.scss similarity index 100% rename from ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.scss rename to ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-dialog/pd-notification-dialog.component.scss diff --git a/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-dialog/pd-notification-dialog.component.spec.ts b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-dialog/pd-notification-dialog.component.spec.ts new file mode 100644 index 000000000..b90aa06bf --- /dev/null +++ b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-dialog/pd-notification-dialog.component.spec.ts @@ -0,0 +1,26 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +//import { PdNotificationDialogComponent } from './pd-allocation-type-dialog.component'; +import { PdNotificationDialogComponent } from './pd-notification-dialog.component'; + +describe('PdNotificationDialogComponent', () => { + let component: PdNotificationDialogComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ PdNotificationDialogComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PdNotificationDialogComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-dialog/pd-notification-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-dialog/pd-notification-dialog.component.ts new file mode 100644 index 000000000..758b4cc56 --- /dev/null +++ b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-dialog/pd-notification-dialog.component.ts @@ -0,0 +1,84 @@ +import { Component, + OnInit, + Inject } from '@angular/core'; +import { FormBuilder, + FormGroup, + Validators, + FormControl } from '@angular/forms'; +import { MatDialog, + MatDialogRef, + MAT_DIALOG_DATA } from '@angular/material'; +/**Service */ +import { MastersService } from '../../../../service/masters/masters.service'; + +@Component({ + selector: 'app-jazz-dialog', + templateUrl: './pd-notification-dialog.component.html', + styleUrls: ['./pd-notification-dialog.component.scss'] +}) +export class PdNotificationDialogComponent implements OnInit { + + + + public _PDNotificationForm: FormGroup; + + constructor(private _formBuilder: FormBuilder, + private dialogRef: MatDialogRef, + private _pds: MastersService, + @Inject(MAT_DIALOG_DATA) public data: any) { } + + + ngOnInit() { + this._PDNotificationForm = this._formBuilder.group({ + pdnotification_id: [this.data.pdnotification_id] + }); + } + + /** For Popup Close Button */ + onNoClick(): void { + this.dialogRef.close(); + } + + /** To Save/Edited Popup Data */ + onSubmit() { + alert('i am a submit'); + } + // onSubmit() { + // if(isNaN(this.data.pd_allocation_type_id)) { + // var my_array = this._PDNotificationForm.value; + // Object.keys(my_array).forEach((key) => ( my_array[key] == null) && delete my_array[key]); + // console.log(my_array); + // this._pds.addMasterDetails(my_array,'PDNOTIFICATION').subscribe(); + // this.dialogRef.close(); + // alert("saved"); + // } else { + // this._pds.editMasterDetails(this._PDNotificationForm.value,'PDNOTIFICATION').subscribe(); + // this.dialogRef.close(); + // alert("edited"); + // } + // } + + // onSubmit() { + // if (isNaN(this.data.ID)) { + // this._memberService.addMembersOccupation(this._PDAllocationTypeForm.value); + // this.dialogRef.close(); + // } else { + // this._memberService.editMembersOccupation(this._PDAllocationTypeForm.value); + // this.dialogRef.close(); + // } + // } + + /** To Reset Popup Data */ + onReset(){ + this._PDNotificationForm.reset(); + } +} + + + + + + + + + diff --git a/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list/pd-notification-list.component.html b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list/pd-notification-list.component.html new file mode 100644 index 000000000..638b2b553 --- /dev/null +++ b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list/pd-notification-list.component.html @@ -0,0 +1,127 @@ + +
+ + +
+
+ +
+
+ + + +
+ + + + + Sl + {{i+1}} + + + + pdnotification_id + {{row.pdnotification_id}} + + + + PD Status + {{row.pd_status_name}} + + + + + + + Lender-SMS + + + + + + + PD Officer-SMS + + + + + + + + + PD Incharge -SMS + + + + + + + + + Lender -MAIL + + + + + + + + + PD Incharge -MAIL + + + + + + + + PD Officer -MAIL + + + + + + + + + + + + + + + + +
+ + +
+ + +
diff --git a/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list/pd-notification-list.component.scss b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list/pd-notification-list.component.scss new file mode 100644 index 000000000..dea0560d5 --- /dev/null +++ b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list/pd-notification-list.component.scss @@ -0,0 +1,50 @@ +/** Table SerialNo CSS */ +.example-margin { + margin: 10px; +} + +/** Table CSS - Dislplay Data */ +.mat-table { + display: table; + width: 100%; + overflow: auto; + max-height: 500px; + + > .mat-header-row, > .mat-row { + display: table-row; + padding: 0; + border: none; + + > .mat-header-cell, > .mat-cell { + display: table-cell; + height: 48px; + vertical-align: middle; + + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + } + } + } + +/** Table CSS -nocontent */ +.nocontent { + color: red; + font-size: 16px; + text-align: center; +} + +/** Table CSS - Search(or)Filter Field */ +.mat-form-field { + font-size: 14px; + width: 100%; +} + +.filter-container { + display: flex; + flex-direction: column; + min-width: 300px; +} + +.filter-header { + min-height: 64px; + padding: 8px 24px 0; +} \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list/pd-notification-list.component.spec.ts b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list/pd-notification-list.component.spec.ts new file mode 100644 index 000000000..22d79c3df --- /dev/null +++ b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list/pd-notification-list.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PdAllocationTypeListComponent } from './pd-allocation-type-list.component'; + +describe('PdAllocationTypeListComponent', () => { + let component: PdAllocationTypeListComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ PdAllocationTypeListComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PdAllocationTypeListComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list/pd-notification-list.component.ts b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list/pd-notification-list.component.ts new file mode 100644 index 000000000..58dedcc23 --- /dev/null +++ b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list/pd-notification-list.component.ts @@ -0,0 +1,202 @@ +import { Component, + OnInit, + ViewChild } from '@angular/core'; + +import { MatDialog, + MatPaginator, + MatSort, + MatTableDataSource } from '@angular/material'; + +import 'rxjs/add/operator/map'; + +/** Service */ +import { MastersService } from '../../../../service/masters/masters.service'; +/** Dialog Component */ +import { PdNotificationDialogComponent } from '../pd-notification-dialog/pd-notification-dialog.component'; +/** Model */ +import { PdLocationApproach } from '../../../model/pd'; + +@Component({ + selector: 'app-pd-notification-list', + templateUrl: './pd-notification-list.component.html', + styleUrls: ['./pd-notification-list.component.scss'] +}) + +export class PdNotificationListComponent implements OnInit { + + + isPopupOpened = true; + loader: boolean = false; + PdLocationApproachList: any = []; + row={ + sms_lender:'' + }; + notificationData = null; + noRecordFound: boolean = false; + + public dataLength: number; + public dataSource = new MatTableDataSource(); + + displayedColumns = ['serialno','pd_status_name','sms_lender','sms_pdofficer','sms_pdincharge','mail_lender', 'mail_pdincharge','mail_pdofficer']; + + @ViewChild(MatPaginator) paginator: MatPaginator; + @ViewChild(MatSort) sort: MatSort; + + constructor(private dialog: MatDialog, + private _MastersService: MastersService) { + this.getPdNotification(); + } + + ngOnInit() {} + + modelChanged(value,event){ + console.log('value',value); + console.log(event); + } + + // addPdLocationApproach() { + // this.isPopupOpened = true; + // const dialogRef = this.dialog.open(PdNotificationDialogComponent, { + // data: {} + // }); + + // dialogRef.afterClosed().subscribe(result => { + // this.getPdNotification(); + // this.isPopupOpened = false; + // }); + // } + + // editPdLocationApproach(arr: any[]) { + // this.isPopupOpened = true; + // //const contact = this._MastersService.getAllPdLocationApproach().find(c => c.ID === id); + // const dialogRef = this.dialog.open(PdNotificationDialogComponent, { + // data: arr + // }); + // dialogRef.afterClosed().subscribe(result => { + // this.getPdNotification(); + // this.isPopupOpened = false; + // }); + // } + + //To get data for listing + getPdNotification() { + this._MastersService.getAllPDNotification().subscribe( + data => { + // console.log(data); + // console.log(data.status); + // console.log(data.dataStatus); + // console.log(data.records); + // pdnotification_id, fk_pd_status_id, sms_lender, sms_pdofficer, + // sms_pdincharge, mail_lender, mail_pdincharge, mail_pdofficer, createdon, fk_createdby, updatedon, fk_updatedby, isactive + if(data.dataStatus == true){ + this.noRecordFound = false; + this.notificationData = data.records; + this.notificationData.forEach((item, index) => { + if(item.sms_lender ==1){ + this.notificationData[index].sms_lender = true; + }else{ + this.notificationData[index].sms_lender = false; + } + if(item.sms_pdofficer ==1){ + this.notificationData[index].sms_pdofficer = true; + }else{ + this.notificationData[index].sms_pdofficer = false; + } + if(item.sms_pdincharge ==1){ + this.notificationData[index].sms_pdincharge = true; + }else{ + this.notificationData[index].sms_pdincharge = false; + } + if(item.mail_lender ==1){ + this.notificationData[index].mail_lender = true; + }else{ + this.notificationData[index].mail_lender = false; + } + if(item.mail_pdincharge ==1){ + this.notificationData[index].mail_pdincharge = true; + }else{ + this.notificationData[index].mail_pdincharge = false; + } + if(item.mail_pdofficer ==1){ + this.notificationData[index].mail_pdofficer = true; + }else{ + this.notificationData[index].mail_pdofficer = false; + } + if(item.isactive ==1){ + this.notificationData[index].isactive = true; + }else{ + this.notificationData[index].isactive = false; + } + }); + //console.log(this.notificationData); + this.dataLength = data.records.length; + this.dataSource.data = this.notificationData; + }else{ + this.noRecordFound = true; + this.dataLength = 0 + } + }) + } + + // deletePdLocationApproach(id: number) { + // var PrimaryKeyWithValue ={'pd_allocation_type_id':id}; + // this._MastersService.deleteMasterDetails(PrimaryKeyWithValue,'PDNOTIFICATION').subscribe( data => { }); + // this.getPdNotification(); + // //this._MastersService.deleteMasterDetails('pd_allocation_type_id',id,'PDNOTIFICATION'); + // } + + /** For Changing Active States., which means both Changing Active And Inactive alternatively */ +// isactivePdLocationApproach(id: number,isactive: number){ + +// let pdLocationApproachFormValue = isactive == 0 +// ? { 'pd_allocation_type_id':id,'isactive': '1'} +// : { 'pd_allocation_type_id':id,'isactive': '0'} + +// //this._mastersService.IsactiveMasterDetails(ActiveDatas,'BRANCH') +// //this._MastersService.editMasterDetails(ActiveDatas,'PDNOTIFICATION') +// this._MastersService.editMasterDetails(pdLocationApproachFormValue,'PDNOTIFICATION') +// .subscribe(dataresult=>{ +// if (dataresult.dataStatus == true){ +// //alert("my check"); +// this.getPdNotification(); +// } +// else{ +// alert("SomeThing Wents Wrong Try Again !"); +// } +// }); +// } + +/** For Display Tables Pagination And Sorting */ +ngAfterViewInit() { + this.dataSource.paginator = this.paginator; + this.dataSource.sort = this.sort; +} + +/** For Display Tables Filtering */ +applyFilter(filterValue: string) { + filterValue = filterValue.trim(); // Remove whitespace + filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches + this.dataSource.filter = filterValue; +} + +/** For Saving Table Data */ +SaveData(dataSource){ + let PDNotificationArray = dataSource['filteredData'] + + + //console.log(PDNotificationArray); + this._MastersService.saveAllPDNotification(PDNotificationArray).subscribe( + dataresult => { + if(dataresult.dataStatus == true){ + alert('Updated Successfully !'); + this.getPdNotification(); + }else{ + alert('Sorry Try Again !'); + } + + }); + +} + +} +/** End of ListComponent */ \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/pd-team/pd-team-dialog/pd-team-dialog.component.html b/ng6-seed/src/app/settings/masters/component/pd-team/pd-team-dialog/pd-team-dialog.component.html new file mode 100644 index 000000000..3bac163aa --- /dev/null +++ b/ng6-seed/src/app/settings/masters/component/pd-team/pd-team-dialog/pd-team-dialog.component.html @@ -0,0 +1,90 @@ +
+

PD Team Details                                 

+
+ +
+
+ + + +
+ + +
+ + + You must include a team name. + +
+ +
+ + + {{ ld.short_name }} {{ ld.full_name }} + + You must Pick up Lender Name. + +
+ +
+ + + {{ cd.name }} + + You must Pick Up the City Name. + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
S.noLender NameCity NameAction
{{i+1}}{{PD.lender_name }}{{PD.city_name }} + +
{{i+PDTeamMaplen+1}}{{PM.lenderid.full_name}}{{PM.cityid.name}} + +
+ + + +
+ +
+ +
+ + + + + + + +
+ +
+
+ diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-type-dialog/pd-type-dialog.component.scss b/ng6-seed/src/app/settings/masters/component/pd-team/pd-team-dialog/pd-team-dialog.component.scss similarity index 100% rename from ng6-seed/src/app/settings/masters/component/pd/pd-type-dialog/pd-type-dialog.component.scss rename to ng6-seed/src/app/settings/masters/component/pd-team/pd-team-dialog/pd-team-dialog.component.scss diff --git a/ng6-seed/src/app/settings/masters/component/pd-team/pd-team-dialog/pd-team-dialog.component.spec.ts b/ng6-seed/src/app/settings/masters/component/pd-team/pd-team-dialog/pd-team-dialog.component.spec.ts new file mode 100644 index 000000000..c23f17f93 --- /dev/null +++ b/ng6-seed/src/app/settings/masters/component/pd-team/pd-team-dialog/pd-team-dialog.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PdTeamDialogComponent } from './pd-team-dialog.component'; + +describe('PdTeamDialogComponent', () => { + let component: PdTeamDialogComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ PdTeamDialogComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PdTeamDialogComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/settings/masters/component/pd-team/pd-team-dialog/pd-team-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/pd-team/pd-team-dialog/pd-team-dialog.component.ts new file mode 100644 index 000000000..b0554b020 --- /dev/null +++ b/ng6-seed/src/app/settings/masters/component/pd-team/pd-team-dialog/pd-team-dialog.component.ts @@ -0,0 +1,491 @@ +import { Component, + OnInit, + Inject } from '@angular/core'; +import { FormBuilder, + FormGroup, + Validators, + FormControl } from '@angular/forms'; +import { MatDialog, + MatDialogRef, + MAT_DIALOG_DATA } from '@angular/material'; +/** Service */ +import { MastersService } from '../../../../service/masters/masters.service'; +import { PdTeamService } from '../../../../service/masters/pd-team.service'; + +@Component({ + selector: 'app-pd-team-dialog', + templateUrl: './pd-team-dialog.component.html', + styleUrls: ['./pd-team-dialog.component.scss'] +}) + + +export class PdTeamDialogComponent implements OnInit { + +public _pdTeamForm: FormGroup; +citydatas: any[]; +lenderdatas: any[]; +errorMessage:string; +selectedValueForLender: any; +selectedValueForCity: any; +tempArray: Array<{lenderid: number, cityid: number}> = []; +PDTeamMapping: any[]; +PDTeamMaplen:any = 0; + + +constructor(private _formBuilder: FormBuilder, +private dialogRef: MatDialogRef, +private _pdTeamService: PdTeamService, +private _masterService: MastersService, +@Inject(MAT_DIALOG_DATA) public data: any) { } + + +ngOnInit() { + this.PdTeamFormDatas(); + if(isNaN(this.data.pdteam_id)){} + else{ + this._pdTeamService.getAllPdTeamMapList(this.data.pdteam_id) // note, removed this.countries = + .subscribe( + dataresult => { + if(dataresult.dataStatus == true){ + this.PDTeamMapping = dataresult.records; + this.PDTeamMaplen = this.PDTeamMapping.length; + } + }); + } + + /** For City Drop Datas*/ + this._masterService.getAllMasterData('CITY') + .subscribe( + dataresult => { + if (dataresult.status == 200) { + this.citydatas = dataresult.records; + this.citydatas = this.citydatas.filter(city=>city.isactive == 1 ); + } + + }, error => this.errorMessage = error); + + /** For Entity Drop Datas*/ + this._masterService.getAllMasterData('ENTITY') + .subscribe( + dataresult => { + if (dataresult.status == 200) { + this.lenderdatas = dataresult.records; + this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 ); + } + + }, error => this.errorMessage = error); + +} + +/** Pd Team Form Datas */ +PdTeamFormDatas(){ +this._pdTeamForm = this._formBuilder.group({ + + pdteam_id: [this.data.pdteam_id], + team_name: [this.data.team_name, Validators.compose([Validators.required])], + fk_city_id: [null, Validators.compose([Validators.required])], + fk_lender_id: [null, Validators.compose([Validators.required])], + temp_array: [this.tempArray] + +}); + +} + +// isactivePDTeamChild(PD.pdteam_map_id,PD.isactive) +isactivePDTeamChild(id: number,isactive : number) { + + let ActiveDatas = isactive == 0 + ? { 'pdteam_map_id':id,'isactive': '1'} + : { 'pdteam_map_id':id,'isactive': '0'} + +//private _masterService: MastersService, +this._masterService.editMasterDetails(ActiveDatas,'PDTEAMMAP') + .subscribe(dataresult=>{ + if (dataresult.dataStatus == true){ + alert("Successfully InActive !"); + } + else{ + alert("SomeThing Wents Wrong Try Again !"); + } + }); +} + +// deletePdTeamMap(arr: any) { +// //console.log(arr); +// //var PrimaryKeyWithValue ={'pdteam_map_id':arr.id}; +// //fk_team_id +// this._pdTeamService.updatePdTeam(arr) +// .subscribe( data => { }); +// this._pdTeamService.deletePdTeamMap(arr) +// .subscribe( data => { }); +// //this.getPdTeam(); +// } + +deletePdTeamMap(PdTeamMaparr,i) { + let datas :any = []; + this._pdTeamService.deletePdTeamMapDetails(PdTeamMaparr) + .subscribe(data => { + datas = data; + if(datas.dataStatus == true){ + this.PDTeamMapping.splice(i, 1); + //alert('Deleted Successfully'); + + } + + }); +} + + +removevalue(i:number) { + //const index: number = this.tempArray.indexOf(i); + if (i !== -1) { + this.tempArray.splice(i, 1); + } + console.log('delete function',this.tempArray); + +} + +doSomething(){ +var check = 0 ; + // console.log(this.selectedValueForLender); + // console.log(this.selectedValueForCity); + + this.tempArray.forEach(item => { + if((item.cityid['city_id'] == this._pdTeamForm.controls['fk_city_id'].value.city_id) && + (item.lenderid['entity_id'] == this._pdTeamForm.controls['fk_lender_id'].value.entity_id)) + { + check++; + alert('Already Exists'); + } + }); + if(isNaN(this.data.pdteam_id)) {} + else{ + //console.log(this.PDTeamMapping); +// console.log(this.PDTeamMapping.length); + if(this.PDTeamMapping !== undefined){ + this.PDTeamMapping.forEach(item => { + if((item.fk_city_id == this._pdTeamForm.controls['fk_city_id'].value.city_id) && + (item.fk_lender_id == this._pdTeamForm.controls['fk_lender_id'].value.entity_id)) + { + check++; + alert('Already Exists'); + } + }); + } + + } + + // this.tempArray.forEach(this.data, function (value, key) { + + // if((value.cityid.city_id == this._pdTeamForm.controls['fk_city_id'].value.city_id) && + // (value.lenderid.entity_id == this._pdTeamForm.controls['fk_lender_id'].value.entity_id)) + // { + // check++; + // console.log('for loop'); + // } + // }); + + if(check == 0){ + + if((this._pdTeamForm.controls['fk_lender_id'].value != null) && (this._pdTeamForm.controls['fk_city_id'].value != null)){ + + this.tempArray.push({ + 'lenderid':this._pdTeamForm.controls['fk_lender_id'].value, + 'cityid': this._pdTeamForm.controls['fk_city_id'].value + }) + + } + //console.log('if condition',check); + } + else{ + //console.log('else condition',check); + } + // console.log('Temparray',this.tempArray); + // console.log(this._pdTeamForm.controls['fk_city_id'].value); + // console.log(this._pdTeamForm.controls['fk_lender_id'].value); + + +} + +/** For Popup Close Button */ +onNoClick(): void { +this.dialogRef.close(); +} +// OnSumbitForAdd(){ +// this._pdTeamForm.controls['team_name'].value; +// this._pdTeamService.addPdTeamDetail(pdTeamFormValues).subscribe( +// dataresult=>{ +// if (dataresult.dataStatus == true){ } +// }) +// } +/** To Save/Edited Popup Data */ +onSubmit() { + +var pdTeamFormValues = this._pdTeamForm.value; + +if(isNaN(this.data.pdteam_id)) { +//console.log(pdTeamFormValues); +//To Remove The "Null" With Key +Object.keys(pdTeamFormValues).forEach( + (key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key] && + delete pdTeamFormValues['fk_lender_id'] && delete pdTeamFormValues['fk_city_id']); + + +//this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 ); +//this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 ); +//console.log(pdTeamFormValues); +//this._memberService.addMasterDetails(OccupationFormValues,'OCCUPATIONMEMBERS').subscribe( +this._pdTeamService.addPdTeamDetail(pdTeamFormValues).subscribe( +dataresult=>{ +if (dataresult.dataStatus == true){ + //After Saving the data then popup close + this.dialogRef.close(); + //Need To Dispaly saving Datas + alert("Data Saved Successfully"); + } + else{ + alert("SomeThing Wents Wrong Try Again !"); + } + +}); +} else { + Object.keys(pdTeamFormValues).forEach( + (key) => delete pdTeamFormValues['fk_lender_id'] && delete pdTeamFormValues['fk_city_id']); + +this._pdTeamService.editPdTeamDetail(pdTeamFormValues).subscribe( + +dataresult=>{ +if (dataresult.dataStatus == true){ +//After Editing the data then popup close +this.dialogRef.close(); +//Need To Display saving Datas +alert("Data Edited Successfully"); + } + else{ + alert("SomeThing Wents Wrong Try Again !"); + } + }); +} +} + +// onSubmit() { +// if (isNaN(this.data.ID)) { +// this._memberService.addMembersOccupation(this._occupationForm.value); +// this.dialogRef.close(); +// } else { +// this._memberService.editMembersOccupation(this._occupationForm.value); +// this.dialogRef.close(); +// } +// } + +/** To Reset Popup Data For Add*/ + + onResetForAdd(){ + this._pdTeamForm.reset(); + this.tempArray = []; + //console.log(this.tempArray); + } + + /** To Reset Popup Data For Edit*/ + onResetForEdit(){ + this.PdTeamFormDatas(); + this.tempArray = []; + } + +} + +/** End Of Pd Dialog Component */ + + + + + + + + + + + + + +/* +import { Component, + OnInit, + ViewChild, + Inject } from '@angular/core'; +import { FormBuilder, + FormGroup, + FormArray, + Validators, + FormControl } from '@angular/forms'; +import { MatDialog, + MatOption, + MatDialogRef, + MAT_DIALOG_DATA } from '@angular/material'; + +/** Service * +import { MastersService } from '../../../../service/masters/masters.service'; +import { PdTeamService } from '../../../../service/masters/pd-team.service'; + +@Component({ + selector: 'app-pd-team-dialog', + templateUrl: './pd-team-dialog.component.html', + styleUrls: ['./pd-team-dialog.component.scss'] +}) + +export class PdTeamDialogComponent implements OnInit { + + public _pdTeamForm: FormGroup; + citydatas: any[]; + lenderdatas: any[]; + errorMessage:string; + + @ViewChild('allSelected') private allSelected: MatOption; + + constructor(private _formBuilder: FormBuilder, + private dialogRef: MatDialogRef, + private _MastersService: MastersService, + private _PdTeamService: PdTeamService, + @Inject(MAT_DIALOG_DATA) public data: any) { } + + ngOnInit() { + + this._pdTeamForm = this._formBuilder.group({ + + pdteam_id: [this.data.pdteam_id], + team_name: [this.data.team_name, Validators.compose([Validators.required])], + fk_city_id: [this.data.fk_city_id, Validators.compose([Validators.required])], + fk_lender_id: [this.data.fk_lender_id, Validators.compose([Validators.required])], + // city_ids: this._formBuilder.array([ + // this._formBuilder.group({ + // pdteam_city_mapping_id: [this.data.pdteam_city_mapping_id], + // fk_team_id:[this.data.pdteam_id], + // fk_city_id: [this.data.fk_city_id] + // }) + // ]) + // city_ids: [this._formBuilder.group({ + // pdteam_city_mapping_id: [this.data.pdteam_city_mapping_id], + // fk_team_id:[this.data.pdteam_id], + // fk_city_id: [this.data.fk_city_id, Validators.compose([Validators.required])], + // }) + // ] + // fk_city_id: this._formBuilder.array([this.data.fk_city_id, Validators.compose([Validators.required])]) + + }); + console.log(this._pdTeamForm); + + /** For SelectDrop Datas For Multiple Datas* + // this._MastersService.getAllMasterData('CITY') + // .subscribe( + // data => { + // let userRole:any = []; + // if (data.status == 200) { + // this.citydatas = data.records; + // this.citydatas = this.citydatas.filter(city=>city.isactive == 1 ); + // if(this.data.pdteam_id != null){ + // for (let cities of this.data[0]) { + // //console.log(role); + // userRole.push(this.citydatas.filter(city => city.city_id == cities.fk_city_id)[0]); + // this._pdTeamForm.controls['fk_city_id'].setValue(userRole); + // } + // console.log(userRole); + // } + // } + // }, error => this.errorMessage = error); + + /** For Drop Datas* + this._MastersService.getAllMasterData('CITY') + .subscribe( + dataresult => { + if (dataresult.status == 200) { + this.citydatas = dataresult.records; + this.citydatas = this.citydatas.filter(city=>city.isactive == 1 ); + } + + }, error => this.errorMessage = error); + + /** For Drop Datas* + this._MastersService.getAllMasterData('ENTITY') + .subscribe( + dataresult => { + if (dataresult.status == 200) { + this.lenderdatas = dataresult.records; + this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 ); + } + + }, error => this.errorMessage = error); + + + } + + + + //pdteam_id, team_name, createdon, fk_createdby, updatedon, fk_updatedby, isactive + /** For Popup Close Button * + onNoClick(): void { + this.dialogRef.close(); + } +//pdteam_id, team_name, createdon, fk_createdby, updatedon, fk_updatedby, isactive + /** To Save/Edited Popup Data * + onSubmit() { + + var pdTeamFormValues = this._pdTeamForm.value; + + console.log('b4 null val pdTeamFormValues',pdTeamFormValues); + if(isNaN(this.data.pdteam_id)) { + + Object.keys(pdTeamFormValues).forEach( + (key) => (pdTeamFormValues[key] == null) && delete pdTeamFormValues[key] + ); + + console.log('After null val pdTeamFormValues',pdTeamFormValues); + // // var start_index = 2 + // // var number_of_elements_to_remove = 1; + // // var removed_elements = pdTeamFormValues.splice(start_index, number_of_elements_to_remove); + // // console.log(removed_elements); + // //["k"] + + // pdTeamFormValues.splice(3, 1); + // console.log(pdTeamFormValues); + + this._PdTeamService.addPdTeamDetail(pdTeamFormValues).subscribe( + dataresult=>{ + if (dataresult.dataStatus == true){ + //After Saving the data then popup close + this.dialogRef.close(); + //Need To Dispaly saving Datas + alert("Data Saved Successfully"); + } + else{ + alert("SomeThing Wents Wrong Try Again !"); + } + + }); + } else { alert('Not Yet Completed Edit Function'); } + // //this._MastersService.editProductMaster(this._pdTeamForm.value); + // this._MastersService.editMasterDetails(this._pdTeamForm.value,'PDTEAM').subscribe( dataresult=>{ + // if (dataresult.dataStatus == true){ + // //After Editing0 the data then popup close + // this.dialogRef.close(); + // //Need To Display saving Datas + // alert("Data Edited Successfully"); + // } + // else{ + // alert("SomeThing Wents Wrong Try Again !"); + // } + // }); + // } + } + + /** To Reset Popup Data / + onReset(){ + this._pdTeamForm.reset(); + } + +} +/** End Of Product Master Component*/ + + + + + diff --git a/ng6-seed/src/app/settings/masters/component/pd-team/pd-team-list/pd-team-list.component.html b/ng6-seed/src/app/settings/masters/component/pd-team/pd-team-list/pd-team-list.component.html new file mode 100644 index 000000000..8376b72f9 --- /dev/null +++ b/ng6-seed/src/app/settings/masters/component/pd-team/pd-team-list/pd-team-list.component.html @@ -0,0 +1,137 @@ + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ + + + + + + Sl + {{row.serialno}} + + + + PD Team Name + {{row.team_name}} + + + + + + Is Active + + + + + + + + + + + + Actions + + + + + + + + + + + + + +
+ + +
\ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/pd-team/pd-team-list/pd-team-list.component.scss b/ng6-seed/src/app/settings/masters/component/pd-team/pd-team-list/pd-team-list.component.scss new file mode 100644 index 000000000..dcc8578ca --- /dev/null +++ b/ng6-seed/src/app/settings/masters/component/pd-team/pd-team-list/pd-team-list.component.scss @@ -0,0 +1,83 @@ + +// .example-container { +// display: flex; +// flex-direction: column; +// min-width: 300px; +// } + +// .example-header { +// min-height: 64px; +// padding: 8px 24px 0; +// } + +// .mat-form-field { +// font-size: 14px; +// width: 100%; +// } + +// .mat-table { +// overflow: auto; +// max-height: 500px; +// } + +// .nocontent { +// color: red; +// font-size: 16px; +// text-align: center; +// } + +// .example-margin { +// margin: 10px; +// } + + +/** Table SerialNo CSS */ +.example-margin { + margin: 10px; +} + +/** Table CSS - Dislplay Data */ +.mat-table { + display: table; + width: 100%; + overflow: auto; + max-height: 500px; + + > .mat-header-row, > .mat-row { + display: table-row; + padding: 0; + border: none; + + > .mat-header-cell, > .mat-cell { + display: table-cell; + height: 48px; + vertical-align: middle; + + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + } + } + } + +/** Table CSS -nocontent */ +.nocontent { + color: red; + font-size: 16px; + text-align: center; +} + +/** Table CSS - Search(or)Filter Field */ +.mat-form-field { + font-size: 14px; + width: 100%; +} + +.filter-container { + display: flex; + flex-direction: column; + min-width: 300px; +} + +.filter-header { + min-height: 64px; + padding: 8px 24px 0; +} \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/pd-team/pd-team-list/pd-team-list.component.spec.ts b/ng6-seed/src/app/settings/masters/component/pd-team/pd-team-list/pd-team-list.component.spec.ts new file mode 100644 index 000000000..6ace2cc4e --- /dev/null +++ b/ng6-seed/src/app/settings/masters/component/pd-team/pd-team-list/pd-team-list.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PdTeamListComponent } from './pd-team-list.component'; + +describe('PdTeamListComponent', () => { + let component: PdTeamListComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ PdTeamListComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PdTeamListComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/settings/masters/component/pd-team/pd-team-list/pd-team-list.component.ts b/ng6-seed/src/app/settings/masters/component/pd-team/pd-team-list/pd-team-list.component.ts new file mode 100644 index 000000000..e0440bf06 --- /dev/null +++ b/ng6-seed/src/app/settings/masters/component/pd-team/pd-team-list/pd-team-list.component.ts @@ -0,0 +1,152 @@ +import { Component, + OnInit, + ViewChild } from '@angular/core'; + +import { MatDialog, + MatDialogRef, + MatDialogConfig, + MatPaginator, + MatSort, +MatTableDataSource } from '@angular/material'; +/** Service */ +import { MastersService } from '../../../../service/masters/masters.service'; +import { PdTeamService } from '../../../../service/masters/pd-team.service'; + +/** Dialog Component */ +import { PdTeamDialogComponent } from '../pd-team-dialog/pd-team-dialog.component'; + + +@Component({ + selector: 'app-pd-team-list', + templateUrl: './pd-team-list.component.html', + styleUrls: ['./pd-team-list.component.scss'] +}) +export class PdTeamListComponent implements OnInit { + + //Variable Declaration part + isPopupOpened: boolean = true; + loader: boolean = false; + PdTeamList: any = []; + color = 'primary'; + userData = null; + noRecordFound: boolean = false; + + + public dataLength: number; + public dataSource = new MatTableDataSource(); + displayedColumns = ['serialno','team_name','actions', 'isactive']; + + @ViewChild(MatPaginator) paginator: MatPaginator; + @ViewChild(MatSort) sort: MatSort; + + constructor(private dialog: MatDialog, + private _MasterService: MastersService, + private _PdTeamService: PdTeamService) { + this.getPdTeam(); + } + + ngOnInit() {} + + //To open dialog for add the data + addPdTeam() { + this.isPopupOpened = true; + const dialogRef = this.dialog.open(PdTeamDialogComponent, { + data: {} + }); + + dialogRef.afterClosed().subscribe(result => { + this.getPdTeam(); + this.isPopupOpened = false; + }); + } + + //To open dialog for edit the data + editPdTeam(arr: any[]) { + // let a:any; + // if(arr.length !=0){ + // a = arr; + // }else{ + // a =''; + // } + // console.log(a); + this.isPopupOpened = true; + const dialogRef = this.dialog.open(PdTeamDialogComponent, { + + data: arr + }); + + dialogRef.afterClosed().subscribe(result => { + this.getPdTeam(); + this.isPopupOpened = false; + }); + } + + //To get data for listing + getPdTeam() { + + //this.loader = true; + this._PdTeamService.getAllPdTeamList().subscribe( + //this._MasterService.getAllMasterData('PDTEAM').subscribe( + data => { + if(data.dataStatus == true){ + //this.loader = false; + this.noRecordFound = false; + this.userData = data.records; + this.dataLength = data.records.length; + if(data.records.length >= 1){ + this.userData = this.userData.map((val, i)=>{ + val['serialno'] = i + 1; + return val; + }) + } + this.dataSource.data = this.userData; + }else{ + this.noRecordFound = true; + this.dataLength = 0 + } + }) +} + + //To inactive the data + deletePdTeam(id: number) { + var PrimaryKeyWithValue ={'pdteam_id':id}; + this._MasterService.deleteMasterDetails(PrimaryKeyWithValue,'PDTEAM') + .subscribe( data => { }); + this.getPdTeam(); + + } + + /** For Changing Active States., which means both Changing Active And Inactive alternatively */ + isactivePdTeam(id: number,isactive : number) { + + let ActiveDatas = isactive == 0 + ? { 'pdteam_id':id,'isactive': '1'} + : { 'pdteam_id':id,'isactive': '0'} + + this._MasterService.editMasterDetails(ActiveDatas,'PDTEAM') + .subscribe(dataresult=>{ + if (dataresult.dataStatus == true){ + //alert("my check"); + this.getPdTeam(); + } + else{ + alert("SomeThing Wents Wrong Try Again !"); + } + }); +} + +/** For Display Tables Pagination And Sorting */ +ngAfterViewInit() { + this.dataSource.paginator = this.paginator; + this.dataSource.sort = this.sort; +} + +/** For Display Tables Filtering */ +applyFilter(filterValue: string) { + filterValue = filterValue.trim(); // Remove whitespace + filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches + this.dataSource.filter = filterValue; +} + +} +/** End of ListComponent */ \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-type-dialog/pd-type-dialog.component.html b/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-dialog/pd-type-dialog.component.html similarity index 78% rename from ng6-seed/src/app/settings/masters/component/pd/pd-type-dialog/pd-type-dialog.component.html rename to ng6-seed/src/app/settings/masters/component/pd-type/pd-type-dialog/pd-type-dialog.component.html index fff839b30..dd5df6db4 100644 --- a/ng6-seed/src/app/settings/masters/component/pd/pd-type-dialog/pd-type-dialog.component.html +++ b/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-dialog/pd-type-dialog.component.html @@ -41,7 +41,11 @@ fxLayoutAlign="center">
- + + + + +
diff --git a/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-dialog/pd-type-dialog.component.scss b/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-dialog/pd-type-dialog.component.scss new file mode 100644 index 000000000..3e80f0dbb --- /dev/null +++ b/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-dialog/pd-type-dialog.component.scss @@ -0,0 +1,3 @@ +mat-form-field{ + width:100%; +} \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-type-dialog/pd-type-dialog.component.spec.ts b/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-dialog/pd-type-dialog.component.spec.ts similarity index 100% rename from ng6-seed/src/app/settings/masters/component/pd/pd-type-dialog/pd-type-dialog.component.spec.ts rename to ng6-seed/src/app/settings/masters/component/pd-type/pd-type-dialog/pd-type-dialog.component.spec.ts diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-type-dialog/pd-type-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-dialog/pd-type-dialog.component.ts similarity index 85% rename from ng6-seed/src/app/settings/masters/component/pd/pd-type-dialog/pd-type-dialog.component.ts rename to ng6-seed/src/app/settings/masters/component/pd-type/pd-type-dialog/pd-type-dialog.component.ts index 9ff5063bf..a002a84f6 100644 --- a/ng6-seed/src/app/settings/masters/component/pd/pd-type-dialog/pd-type-dialog.component.ts +++ b/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-dialog/pd-type-dialog.component.ts @@ -27,15 +27,17 @@ export class PdTypeDialogComponent implements OnInit { ngOnInit() { - - /** Pd Type Form Datas */ - this._pdTypeForm = this._formBuilder.group({ - //branch_id: any; fk_city_id: any;pd_type_id, type_name, createdon, fk_createdby, updatedon, fk_updatedby, isactive - pd_type_id: [this.data.pd_type_id], - type_name: [this.data.type_name, Validators.compose([Validators.required])] - }); + this.pdTypeFormDatas(); + //console.log(this._pdTypeForm); } + /** Pd Type Form Datas */ + pdTypeFormDatas(){ + this._pdTypeForm = this._formBuilder.group({ + //branch_id: any; fk_city_id: any;pd_type_id, type_name, createdon, fk_createdby, updatedon, fk_updatedby, isactive + pd_type_id: [this.data.pd_type_id], + type_name: [this.data.type_name, Validators.compose([Validators.required])] + });} // onSubmit() { // if (isNaN(this.data.ID)) { @@ -95,5 +97,11 @@ export class PdTypeDialogComponent implements OnInit { onReset(){ this._pdTypeForm.reset(); } + + /** To Reset Popup Data For Edit*/ + onResetForEdit(){ + this.pdTypeFormDatas(); + } + } /** End Of PD Type Dialog Component */ \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-type-list/pd-type-list.component.html b/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.html similarity index 89% rename from ng6-seed/src/app/settings/masters/component/pd/pd-type-list/pd-type-list.component.html rename to ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.html index cd2a20317..7b8e6d366 100644 --- a/ng6-seed/src/app/settings/masters/component/pd/pd-type-list/pd-type-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.html @@ -1,11 +1,11 @@
- +

-
- -
+ diff --git a/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.scss b/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.scss new file mode 100644 index 000000000..dea0560d5 --- /dev/null +++ b/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.scss @@ -0,0 +1,50 @@ +/** Table SerialNo CSS */ +.example-margin { + margin: 10px; +} + +/** Table CSS - Dislplay Data */ +.mat-table { + display: table; + width: 100%; + overflow: auto; + max-height: 500px; + + > .mat-header-row, > .mat-row { + display: table-row; + padding: 0; + border: none; + + > .mat-header-cell, > .mat-cell { + display: table-cell; + height: 48px; + vertical-align: middle; + + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + } + } + } + +/** Table CSS -nocontent */ +.nocontent { + color: red; + font-size: 16px; + text-align: center; +} + +/** Table CSS - Search(or)Filter Field */ +.mat-form-field { + font-size: 14px; + width: 100%; +} + +.filter-container { + display: flex; + flex-direction: column; + min-width: 300px; +} + +.filter-header { + min-height: 64px; + padding: 8px 24px 0; +} \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-type-list/pd-type-list.component.spec.ts b/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.spec.ts similarity index 100% rename from ng6-seed/src/app/settings/masters/component/pd/pd-type-list/pd-type-list.component.spec.ts rename to ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.spec.ts diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-type-list/pd-type-list.component.ts b/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.ts similarity index 93% rename from ng6-seed/src/app/settings/masters/component/pd/pd-type-list/pd-type-list.component.ts rename to ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.ts index 912243bac..daf92efde 100644 --- a/ng6-seed/src/app/settings/masters/component/pd/pd-type-list/pd-type-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/pd-type/pd-type-list/pd-type-list.component.ts @@ -29,7 +29,7 @@ export class PdTypeListComponent implements OnInit { loader: boolean = false; PDTypeList: any = []; noRecordFound: boolean = false; - + color = 'primary'; userData = null; public dataLength: number; @@ -88,10 +88,16 @@ export class PdTypeListComponent implements OnInit { data => { - if(data.status === 200){ + if(data.dataStatus == true){ this.noRecordFound = false; this.userData = data.records; this.dataLength = data.records.length; + if(data.records.length >= 1){ + this.userData = this.userData.map((val, i)=>{ + val['serialno'] = i + 1; + return val; + }) + } this.dataSource.data = this.userData; }else{ this.noRecordFound = true; diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.spec.ts b/ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.spec.ts deleted file mode 100644 index a98fc3331..000000000 --- a/ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { PdAllocationTypeDialogComponent } from './pd-allocation-type-dialog.component'; - -describe('PdAllocationTypeDialogComponent', () => { - let component: PdAllocationTypeDialogComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ PdAllocationTypeDialogComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(PdAllocationTypeDialogComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.ts deleted file mode 100644 index a338bbbdd..000000000 --- a/ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { Component, - OnInit, - Inject } from '@angular/core'; -import { FormBuilder, - FormGroup, - Validators, - FormControl } from '@angular/forms'; -import { MatDialog, - MatDialogRef, - MAT_DIALOG_DATA } from '@angular/material'; -/**Service */ -import { MastersService } from '../../../../service/masters/masters.service'; - -@Component({ - selector: 'app-jazz-dialog', - templateUrl: './pd-allocation-type-dialog.component.html', - styleUrls: ['./pd-allocation-type-dialog.component.scss'] -}) -export class PdAllocationTypeDialogComponent implements OnInit { - - - - public _PDAllocationTypeForm: FormGroup; - - constructor(private _formBuilder: FormBuilder, - private dialogRef: MatDialogRef, - private _pds: MastersService, - @Inject(MAT_DIALOG_DATA) public data: any) { } - - - ngOnInit() { - - this._PDAllocationTypeForm = this._formBuilder.group({ - pd_allocation_type_id: [this.data.pd_allocation_type_id], - pd_allocation_type_name: [this.data.pd_allocation_type_name, Validators.compose([Validators.required])] - }); - //pd_allocation_type_id, pd_allocation_type_name, createdon, fk_createdby, updatedon, isactive - //console.log(this._PDAllocationTypeForm); - } - - /** For Popup Close Button */ - onNoClick(): void { - this.dialogRef.close(); - } - - /** To Save/Edited Popup Data */ - onSubmit() { - if(isNaN(this.data.pd_allocation_type_id)) { - var my_array = this._PDAllocationTypeForm.value; - Object.keys(my_array).forEach((key) => ( my_array[key] == null) && delete my_array[key]); - console.log(my_array); - this._pds.addMasterDetails(my_array,'PDALLOCATIONTYPE').subscribe(); - this.dialogRef.close(); - alert("saved"); - } else { - this._pds.editMasterDetails(this._PDAllocationTypeForm.value,'PDALLOCATIONTYPE').subscribe(); - this.dialogRef.close(); - alert("edited"); - } - } - - // onSubmit() { - // if (isNaN(this.data.ID)) { - // this._memberService.addMembersOccupation(this._PDAllocationTypeForm.value); - // this.dialogRef.close(); - // } else { - // this._memberService.editMembersOccupation(this._PDAllocationTypeForm.value); - // this.dialogRef.close(); - // } - // } - - /** To Reset Popup Data */ - onReset(){ - this._PDAllocationTypeForm.reset(); - } -} - - - - - - - - - diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.scss b/ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.scss deleted file mode 100644 index 860d6b073..000000000 --- a/ng6-seed/src/app/settings/masters/component/pd/pd-allocation-type-list/pd-allocation-type-list.component.scss +++ /dev/null @@ -1,123 +0,0 @@ - -/* Structure -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 56px; - max-height: 56px; - display: flex; - align-items: center; - padding: 8px 24px 0; - font-size: 20px; - justify-content: space-between; - border-bottom: 1px solid transparent; -} - -.mat-input-container { - font-size: 14px; - flex-grow: 1; - margin-left: 32px; - margin-top: 8px; -} - -.example-no-results { - display: flex; - justify-content: center; - padding: 24px; - font-size: 12px; - font-style: italic; -} - -/** Selection styles -.example-selection-header { - font-size: 18px; - background: rgba(255, 64, 129, 0.3); - border-bottom: 1px solid #d696ac; -} - -.mat-column-select { - max-width: 54px; -} - -.mat-row:hover, .example-selected-row { - background: #f5f5f5; -} - -.mat-row:active, .mat-row.example-selected-row { - background: #eaeaea; -} - -.mat-table { - overflow: auto; - max-height: 500px; -}*/ -/* Structure * -.example-container { - display: flex; - flex-direction: column; - min-width: 30px; - width : 80%; - margin : 20px auto; - } - - .example-header { - min-height: 64px; - padding: 8px 24px 0; - } - - //mat-cell{ - .cell{ - display:flex !important; - justify-content:center!important; - - } - - // mat-header-cell { - .header-cell{ - display:flex; - justify-content:center; - } - - - table { - width: 100%; - } - - th { - text-align: left; - } - - -*/ -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 64px; - padding: 8px 24px 0; -} - -.mat-form-field { - font-size: 14px; - width: 100%; -} - -.mat-table { - overflow: auto; - max-height: 500px; -} -.nocontent { - color: red; - font-size: 16px; - text-align: center; -} -.example-margin { - margin: 10px; -} \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-list/pd-location-approach-list.component.scss b/ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-list/pd-location-approach-list.component.scss deleted file mode 100644 index 12d41abc6..000000000 --- a/ng6-seed/src/app/settings/masters/component/pd/pd-location-approach-list/pd-location-approach-list.component.scss +++ /dev/null @@ -1,131 +0,0 @@ - -/* Structure -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 56px; - max-height: 56px; - display: flex; - align-items: center; - padding: 8px 24px 0; - font-size: 20px; - justify-content: space-between; - border-bottom: 1px solid transparent; -} - -.mat-input-container { - font-size: 14px; - flex-grow: 1; - margin-left: 32px; - margin-top: 8px; -} - -.example-no-results { - display: flex; - justify-content: center; - padding: 24px; - font-size: 12px; - font-style: italic; -} - -/** Selection styles -.example-selection-header { - font-size: 18px; - background: rgba(255, 64, 129, 0.3); - border-bottom: 1px solid #d696ac; -} - -.mat-column-select { - max-width: 54px; -} - -.mat-row:hover, .example-selected-row { - background: #f5f5f5; -} - -.mat-row:active, .mat-row.example-selected-row { - background: #eaeaea; -} - -.mat-table { - overflow: auto; - max-height: 500px; -}*/ -/* Structure * -.example-container { - display: flex; - flex-direction: column; - min-width: 30px; - width : 80%; - margin : 20px auto; - } - - .example-header { - min-height: 64px; - padding: 8px 24px 0; - } - - //mat-cell{ - .cell{ - display:flex !important; - justify-content:center!important; - - } - - // mat-header-cell { - .header-cell{ - display:flex; - justify-content:center; - } - - - table { - width: 100%; - } - - th { - text-align: left; - } - - -*/ -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 64px; - padding: 8px 24px 0; -} - -.mat-form-field { - font-size: 14px; - width: 100%; -} - -.mat-table { - overflow: auto; - max-height: 500px; -} -.nocontent { - color: red; - font-size: 16px; - text-align: center; -} -.active:hover{ - color: green; - font-size: 20px; -} -.deactive:hover{ - color: red; - font-size: 20px; -} -.example-margin { - margin: 10px; -} \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/pd/pd-type-list/pd-type-list.component.scss b/ng6-seed/src/app/settings/masters/component/pd/pd-type-list/pd-type-list.component.scss deleted file mode 100644 index 382f2e683..000000000 --- a/ng6-seed/src/app/settings/masters/component/pd/pd-type-list/pd-type-list.component.scss +++ /dev/null @@ -1,132 +0,0 @@ - -/* Structure -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 56px; - max-height: 56px; - display: flex; - align-items: center; - padding: 8px 24px 0; - font-size: 20px; - justify-content: space-between; - border-bottom: 1px solid transparent; -} - -.mat-input-container { - font-size: 14px; - flex-grow: 1; - margin-left: 32px; - margin-top: 8px; -} - -.example-no-results { - display: flex; - justify-content: center; - padding: 24px; - font-size: 12px; - font-style: italic; -} - -/** Selection styles -.example-selection-header { - font-size: 18px; - background: rgba(255, 64, 129, 0.3); - border-bottom: 1px solid #d696ac; -} - -.mat-column-select { - max-width: 54px; -} - -.mat-row:hover, .example-selected-row { - background: #f5f5f5; -} - -.mat-row:active, .mat-row.example-selected-row { - background: #eaeaea; -} - -.mat-table { - overflow: auto; - max-height: 500px; -}*/ -/* Structure * -.example-container { - display: flex; - flex-direction: column; - min-width: 30px; - width : 80%; - margin : 20px auto; - } - - .example-header { - min-height: 64px; - padding: 8px 24px 0; - } - - //mat-cell{ - .cell{ - display:flex !important; - justify-content:center!important; - - } - - // mat-header-cell { - .header-cell{ - display:flex; - justify-content:center; - } - - - table { - width: 100%; - } - - th { - text-align: left; - } - - -*/ -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 64px; - padding: 8px 24px 0; -} - -.mat-form-field { - font-size: 14px; - width: 100%; -} - -.mat-table { - overflow: auto; - max-height: 500px; -} - -.nocontent { - color: red; - font-size: 16px; - text-align: center; -} -.active:hover{ - color: green; - font-size: 20px; -} -.deactive:hover{ - color: red; - font-size: 20px; -} -.example-margin { - margin: 10px; -} \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/product/product-dialog/product-dialog.component.html b/ng6-seed/src/app/settings/masters/component/product/product-dialog/product-dialog.component.html index 1f75ab2cf..5012d7ec7 100644 --- a/ng6-seed/src/app/settings/masters/component/product/product-dialog/product-dialog.component.html +++ b/ng6-seed/src/app/settings/masters/component/product/product-dialog/product-dialog.component.html @@ -45,7 +45,11 @@ fxLayoutAlign="center">
- + + + + +
diff --git a/ng6-seed/src/app/settings/masters/component/product/product-dialog/product-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/product/product-dialog/product-dialog.component.ts index 003817798..413430ae1 100644 --- a/ng6-seed/src/app/settings/masters/component/product/product-dialog/product-dialog.component.ts +++ b/ng6-seed/src/app/settings/masters/component/product/product-dialog/product-dialog.component.ts @@ -27,16 +27,19 @@ export class ProductDialogComponent implements OnInit { @Inject(MAT_DIALOG_DATA) public data: any) { } ngOnInit() { - - this._productMasterForm = this._formBuilder.group({ - //ID: [this.data.ID], - product_id: [this.data.product_id], - name: [this.data.name, Validators.compose([Validators.required])], - abbr: [this.data.abbr, Validators.compose([Validators.required])] - }); + this.productFormDatas(); + //console.log(this._productMasterForm); } + productFormDatas(){ + this._productMasterForm = this._formBuilder.group({ + //ID: [this.data.ID], + product_id: [this.data.product_id], + name: [this.data.name, Validators.compose([Validators.required])], + abbr: [this.data.abbr, Validators.compose([Validators.required])] +});} + /** For Popup Close Button */ onNoClick(): void { this.dialogRef.close(); @@ -85,5 +88,10 @@ export class ProductDialogComponent implements OnInit { this._productMasterForm.reset(); } + /** To Reset Popup Data For Edit*/ + onResetForEdit(){ + this.productFormDatas(); + } + } /** End Of Product Master Component*/ \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.html b/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.html index e8b2937b4..b09dcca8c 100644 --- a/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.html @@ -1,10 +1,14 @@
- +

-
-
+ +
+
@@ -16,7 +20,7 @@ Sl - {{i+1}} + {{row.serialno}} @@ -37,7 +41,7 @@ @@ -45,7 +49,7 @@ @@ -55,7 +59,7 @@ Actions - + diff --git a/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.scss b/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.scss index d2a39133c..dea0560d5 100644 --- a/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.scss +++ b/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.scss @@ -1,131 +1,50 @@ - -/* Structure -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 56px; - max-height: 56px; - display: flex; - align-items: center; - padding: 8px 24px 0; - font-size: 20px; - justify-content: space-between; - border-bottom: 1px solid transparent; -} - -.mat-input-container { - font-size: 14px; - flex-grow: 1; - margin-left: 32px; - margin-top: 8px; -} - -.example-no-results { - display: flex; - justify-content: center; - padding: 24px; - font-size: 12px; - font-style: italic; -} - -/** Selection styles -.example-selection-header { - font-size: 18px; - background: rgba(255, 64, 129, 0.3); - border-bottom: 1px solid #d696ac; -} - -.mat-column-select { - max-width: 54px; -} - -.mat-row:hover, .example-selected-row { - background: #f5f5f5; -} - -.mat-row:active, .mat-row.example-selected-row { - background: #eaeaea; +/** Table SerialNo CSS */ +.example-margin { + margin: 10px; } +/** Table CSS - Dislplay Data */ .mat-table { - overflow: auto; - max-height: 500px; -}*/ -/* Structure * -.example-container { - display: flex; - flex-direction: column; - min-width: 30px; - width : 80%; - margin : 20px auto; - } + display: table; + width: 100%; + overflow: auto; + max-height: 500px; + + > .mat-header-row, > .mat-row { + display: table-row; + padding: 0; + border: none; + + > .mat-header-cell, > .mat-cell { + display: table-cell; + height: 48px; + vertical-align: middle; - .example-header { - min-height: 64px; - padding: 8px 24px 0; - } - - //mat-cell{ - .cell{ - display:flex !important; - justify-content:center!important; - - } - - // mat-header-cell { - .header-cell{ - display:flex; - justify-content:center; - } - - - table { - width: 100%; - } - - th { - text-align: left; - }*/ - - -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 64px; - padding: 8px 24px 0; -} - -.mat-form-field { - font-size: 14px; - width: 100%; -} - -.mat-table { - overflow: auto; - max-height: 500px; -} + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + } + } + } +/** Table CSS -nocontent */ .nocontent { color: red; font-size: 16px; text-align: center; } -.active:hover{ - color: green; - font-size: 20px; + +/** Table CSS - Search(or)Filter Field */ +.mat-form-field { + font-size: 14px; + width: 100%; } -.deactive:hover{ - color: red; - font-size: 20px; + +.filter-container { + display: flex; + flex-direction: column; + min-width: 300px; } -.example-margin { - margin: 10px; + +.filter-header { + min-height: 64px; + padding: 8px 24px 0; } \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.ts b/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.ts index 1b27bbfdd..44a27719a 100644 --- a/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/product/product-list/product-list.component.ts @@ -30,6 +30,7 @@ export class ProductListComponent implements OnInit { ProductMasterList: any = []; noRecordFound: boolean = false; userData = null; + color = 'primary'; public dataLength: number; public dataSource = new MatTableDataSource(); @@ -94,10 +95,16 @@ export class ProductListComponent implements OnInit { this._ProductService.getAllMasterData('PRODUCTS').subscribe( data => { - if(data.status === 200){ + if(data.dataStatus == true){ this.noRecordFound = false; this.userData = data.records; this.dataLength = data.records.length; + if(data.records.length >= 1){ + this.userData = this.userData.map((val, i)=>{ + val['serialno'] = i + 1; + return val; + }) + } this.dataSource.data = this.userData; }else{ this.noRecordFound = true; diff --git a/ng6-seed/src/app/settings/masters/component/question-category/question-category-dialog/question-category-dialog.component.html b/ng6-seed/src/app/settings/masters/component/question-category/question-category-dialog/question-category-dialog.component.html new file mode 100644 index 000000000..200eade51 --- /dev/null +++ b/ng6-seed/src/app/settings/masters/component/question-category/question-category-dialog/question-category-dialog.component.html @@ -0,0 +1,34 @@ + +
+

Question Category                                 

+
+ +
+
+ +
+ +
+ + +
+ + + You must include a category name. + +
+ +
+ + + + + + +
+ +
+
+
\ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/question-category/question-category-dialog/question-category-dialog.component.scss b/ng6-seed/src/app/settings/masters/component/question-category/question-category-dialog/question-category-dialog.component.scss new file mode 100644 index 000000000..3e80f0dbb --- /dev/null +++ b/ng6-seed/src/app/settings/masters/component/question-category/question-category-dialog/question-category-dialog.component.scss @@ -0,0 +1,3 @@ +mat-form-field{ + width:100%; +} \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/question-category/question-category-dialog/question-category-dialog.component.spec.ts b/ng6-seed/src/app/settings/masters/component/question-category/question-category-dialog/question-category-dialog.component.spec.ts new file mode 100644 index 000000000..8dbe439ae --- /dev/null +++ b/ng6-seed/src/app/settings/masters/component/question-category/question-category-dialog/question-category-dialog.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { QuestionCategoryDialogComponent } from './question-category-dialog.component'; + +describe('QuestionCategoryDialogComponent', () => { + let component: QuestionCategoryDialogComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ QuestionCategoryDialogComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(QuestionCategoryDialogComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/settings/masters/component/question-category/question-category-dialog/question-category-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/question-category/question-category-dialog/question-category-dialog.component.ts new file mode 100644 index 000000000..519619ced --- /dev/null +++ b/ng6-seed/src/app/settings/masters/component/question-category/question-category-dialog/question-category-dialog.component.ts @@ -0,0 +1,92 @@ +import { Component, + OnInit, + Inject } from '@angular/core'; +import { FormBuilder, + FormGroup, + Validators, + FormControl } from '@angular/forms'; + import { MatDialog, + MatDialogRef, + MAT_DIALOG_DATA } from '@angular/material'; + /** Service */ + import { MastersService } from '../../../../service/masters/masters.service'; + +@Component({ + selector: 'app-question-category-dialog', + templateUrl: './question-category-dialog.component.html', + styleUrls: ['./question-category-dialog.component.scss'] +}) +export class QuestionCategoryDialogComponent implements OnInit { + + public _questionCategoryForm: FormGroup; + + constructor(private _formBuilder: FormBuilder, + private dialogRef: MatDialogRef, + private _MastersService: MastersService, + @Inject(MAT_DIALOG_DATA) public data: any) { } + + ngOnInit() { this.formfunction(); } + + formfunction(){ + this._questionCategoryForm = this._formBuilder.group({ + question_categroy_id: [this.data.question_categroy_id], + categroy_name: [this.data.categroy_name, Validators.compose([Validators.required])], + }); + } + + /** For Popup Close Button */ + onNoClick(): void { + this.dialogRef.close(); + } + + /** To Save/Edited Popup Data */ + onSubmit() { + var QuestionFormValues = this._questionCategoryForm.value; + if(isNaN(this.data.question_categroy_id)) { + + Object.keys(QuestionFormValues).forEach((key) => ( QuestionFormValues[key] == null) && delete QuestionFormValues[key]); + + this._MastersService.addMasterDetails(QuestionFormValues,'QUESTIONCATEGORY').subscribe( + dataresult=>{ + if (dataresult.dataStatus == true){ + //After Saving the data then popup close + this.dialogRef.close(); + //Need To Dispaly saving Datas + alert("Data Saved Successfully"); + } + else{ + alert("SomeThing Wents Wrong Try Again !"); + } + + }); + } else { + //this._MastersService.editProductMaster(this._questionCategoryForm.value); + this._MastersService.editMasterDetails(this._questionCategoryForm.value,'QUESTIONCATEGORY').subscribe( dataresult=>{ + if (dataresult.dataStatus == true){ + //After Editing the data then popup close + this.dialogRef.close(); + //Need To Display saving Datas + alert("Data Edited Successfully"); + } + else{ + alert("SomeThing Wents Wrong Try Again !"); + } + }); + } + } + /** To Reset Popup Data */ + onReset(){ + this._questionCategoryForm.reset({ id: this.data.question_categroy_id }); + } + + onResetedited(){ + this.formfunction(); + } + +} +/** End Of Question Category dialog Component*/ + + + + + diff --git a/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.html b/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.html new file mode 100644 index 000000000..b8e326229 --- /dev/null +++ b/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.html @@ -0,0 +1,69 @@ + +
+ +
+
+ +
+
+
+ + + +
+ + + + + Sl + {{row.serialno}} + + + + Question Category Name + {{row.categroy_name}} + + + + Is Active + + + + + + + + + + + Actions + + + + + + + + + + + + +
+ + + +
\ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.scss b/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.scss new file mode 100644 index 000000000..dea0560d5 --- /dev/null +++ b/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.scss @@ -0,0 +1,50 @@ +/** Table SerialNo CSS */ +.example-margin { + margin: 10px; +} + +/** Table CSS - Dislplay Data */ +.mat-table { + display: table; + width: 100%; + overflow: auto; + max-height: 500px; + + > .mat-header-row, > .mat-row { + display: table-row; + padding: 0; + border: none; + + > .mat-header-cell, > .mat-cell { + display: table-cell; + height: 48px; + vertical-align: middle; + + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + } + } + } + +/** Table CSS -nocontent */ +.nocontent { + color: red; + font-size: 16px; + text-align: center; +} + +/** Table CSS - Search(or)Filter Field */ +.mat-form-field { + font-size: 14px; + width: 100%; +} + +.filter-container { + display: flex; + flex-direction: column; + min-width: 300px; +} + +.filter-header { + min-height: 64px; + padding: 8px 24px 0; +} \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.spec.ts b/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.spec.ts new file mode 100644 index 000000000..71e77cb90 --- /dev/null +++ b/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { QuestionCategoryListComponent } from './question-category-list.component'; + +describe('QuestionCategoryListComponent', () => { + let component: QuestionCategoryListComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ QuestionCategoryListComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(QuestionCategoryListComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.ts b/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.ts new file mode 100644 index 000000000..67e68cf90 --- /dev/null +++ b/ng6-seed/src/app/settings/masters/component/question-category/question-category-list/question-category-list.component.ts @@ -0,0 +1,142 @@ +import { Component, + OnInit, + ViewChild } from '@angular/core'; + +import { MatDialog, + MatDialogRef, + MatDialogConfig, + MatPaginator, + MatSort, +MatTableDataSource } from '@angular/material'; + +/** Service */ +import { MastersService } from '../../../../service/masters/masters.service'; + +/** Dialog Component */ +import { QuestionCategoryDialogComponent } from '../question-category-dialog/question-category-dialog.component'; + +@Component({ + selector: 'app-question-category-list', + templateUrl: './question-category-list.component.html', + styleUrls: ['./question-category-list.component.scss'] +}) +export class QuestionCategoryListComponent implements OnInit { + + //Variable Declaration part + isPopupOpened: boolean = true; + loader: boolean = false; + QuestionCategoryList: any = []; + noRecordFound: boolean = false; + userData = null; + color = 'primary'; + + public dataLength: number; + public dataSource = new MatTableDataSource(); + // + displayedColumns = ['serialno','categroy_name','actions', 'isactive']; + + @ViewChild(MatPaginator) paginator: MatPaginator; + @ViewChild(MatSort) sort: MatSort; + + constructor(private dialog: MatDialog, + private _MasterService: MastersService) { + this.getQuestionCategory(); + } + + + ngOnInit() {} + + //To open dialog for add the data + addQuestionCategory() { + this.isPopupOpened = true; + const dialogRef = this.dialog.open(QuestionCategoryDialogComponent, { + data: {} + }); + + dialogRef.afterClosed().subscribe(result => { + this.getQuestionCategory(); + this.isPopupOpened = false; + }); + } + + //To open dialog for edit the data + editQuestionCategory(arr: any[]) { + + this.isPopupOpened = true; + const dialogRef = this.dialog.open(QuestionCategoryDialogComponent, { + data: arr + }); + + dialogRef.afterClosed().subscribe(result => { + this.getQuestionCategory(); + this.isPopupOpened = false; + }); + } + + //To get data for listing + getQuestionCategory() { + + this.loader = true; + this._MasterService.getAllMasterData('QUESTIONCATEGORY').subscribe( + data => { + if(data.dataStatus == true){ + this.loader = false; + this.noRecordFound = false; + this.userData = data.records; + this.dataLength = data.records.length; + if(data.records.length >= 1){ + this.userData = this.userData.map((val, i)=>{ + val['serialno'] = i + 1; + return val; + }) + } + this.dataSource.data = this.userData; + }else{ + this.noRecordFound = true; + this.dataLength = 0 + } + })} + + //To inactive the data + deleteQuestionCategory(id: number) { + var PrimaryKeyWithValue ={'question_categroy_id':id}; + this._MasterService.deleteMasterDetails(PrimaryKeyWithValue,'QUESTIONCATEGORY') + .subscribe( data => { }); + this.getQuestionCategory(); + + } + /** For Changing Active States., which means both Changing Active And Inactive alternatively */ + isactiveQuestionCategory(id: number,isactive : number) { + + let ActiveDatas = isactive == 0 + ? { 'question_categroy_id':id,'isactive': '1'} + : { 'question_categroy_id':id,'isactive': '0'} + + this._MasterService.editMasterDetails(ActiveDatas,'QUESTIONCATEGORY') + .subscribe(dataresult=>{ + if (dataresult.dataStatus == true){ + //alert("my check"); + this.getQuestionCategory(); + } + else{ + alert("SomeThing Wents Wrong Try Again !"); + } + }); +} + +/** For Display Tables Pagination And Sorting */ +ngAfterViewInit() { + this.dataSource.paginator = this.paginator; + this.dataSource.sort = this.sort; +} + +/** For Display Tables Filtering */ +applyFilter(filterValue: string) { + filterValue = filterValue.trim(); // Remove whitespace + filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches + this.dataSource.filter = filterValue; +} + +} +/** End of ListComponent */ + \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/regions/regions-dialog/regions-dialog.component.html b/ng6-seed/src/app/settings/masters/component/regions/regions-dialog/regions-dialog.component.html index 40a463c7d..9aea62e85 100644 --- a/ng6-seed/src/app/settings/masters/component/regions/regions-dialog/regions-dialog.component.html +++ b/ng6-seed/src/app/settings/masters/component/regions/regions-dialog/regions-dialog.component.html @@ -41,7 +41,11 @@ fxLayoutAlign="center">
- + + + + +
diff --git a/ng6-seed/src/app/settings/masters/component/regions/regions-dialog/regions-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/regions/regions-dialog/regions-dialog.component.ts index f55a3f70f..fb8b01795 100644 --- a/ng6-seed/src/app/settings/masters/component/regions/regions-dialog/regions-dialog.component.ts +++ b/ng6-seed/src/app/settings/masters/component/regions/regions-dialog/regions-dialog.component.ts @@ -28,16 +28,18 @@ export class RegionsDialogComponent implements OnInit { ngOnInit() { - - /** Region Form Datas */ - this._regionsForm = this._formBuilder.group({ - //Regions_id: any; fk_city_id: any; - region_id: [this.data.region_id], - name: [this.data.name, Validators.compose([Validators.required])] - }); + this.regionsFormDatas(); //console.log(this._regionsForm); } + /** Region Form Datas */ + regionsFormDatas(){ + this._regionsForm = this._formBuilder.group({ + //Regions_id: any; fk_city_id: any; + region_id: [this.data.region_id], + name: [this.data.name, Validators.compose([Validators.required])] + });} + // onSubmit() { // if (isNaN(this.data.ID)) { // this._regionsService.addRegions(this._regionsForm.value); @@ -93,5 +95,10 @@ onNoClick(): void { onReset(){ this._regionsForm.reset(); } + + /** To Reset Popup Data For Edit*/ + onResetForEdit(){ + this.regionsFormDatas(); + } } /**End Of Region Dialog Component*/ \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.html b/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.html index e05d318df..1965d5710 100644 --- a/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.html @@ -1,11 +1,15 @@
- +

-
- -
+ + -
-
+
+
@@ -74,7 +78,7 @@ Sl - {{i+1}} + {{row.serialno}} @@ -91,7 +95,7 @@ @@ -99,7 +103,7 @@ @@ -109,7 +113,7 @@ Actions - + diff --git a/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.scss b/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.scss index 382f2e683..dea0560d5 100644 --- a/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.scss +++ b/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.scss @@ -1,132 +1,50 @@ - -/* Structure -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 56px; - max-height: 56px; - display: flex; - align-items: center; - padding: 8px 24px 0; - font-size: 20px; - justify-content: space-between; - border-bottom: 1px solid transparent; -} - -.mat-input-container { - font-size: 14px; - flex-grow: 1; - margin-left: 32px; - margin-top: 8px; -} - -.example-no-results { - display: flex; - justify-content: center; - padding: 24px; - font-size: 12px; - font-style: italic; -} - -/** Selection styles -.example-selection-header { - font-size: 18px; - background: rgba(255, 64, 129, 0.3); - border-bottom: 1px solid #d696ac; -} - -.mat-column-select { - max-width: 54px; -} - -.mat-row:hover, .example-selected-row { - background: #f5f5f5; -} - -.mat-row:active, .mat-row.example-selected-row { - background: #eaeaea; +/** Table SerialNo CSS */ +.example-margin { + margin: 10px; } +/** Table CSS - Dislplay Data */ .mat-table { - overflow: auto; - max-height: 500px; -}*/ -/* Structure * -.example-container { - display: flex; - flex-direction: column; - min-width: 30px; - width : 80%; - margin : 20px auto; - } + display: table; + width: 100%; + overflow: auto; + max-height: 500px; + + > .mat-header-row, > .mat-row { + display: table-row; + padding: 0; + border: none; + + > .mat-header-cell, > .mat-cell { + display: table-cell; + height: 48px; + vertical-align: middle; - .example-header { - min-height: 64px; - padding: 8px 24px 0; - } - - //mat-cell{ - .cell{ - display:flex !important; - justify-content:center!important; - - } - - // mat-header-cell { - .header-cell{ - display:flex; - justify-content:center; - } - - - table { - width: 100%; - } - - th { - text-align: left; - } - - -*/ -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 64px; - padding: 8px 24px 0; -} - -.mat-form-field { - font-size: 14px; - width: 100%; -} - -.mat-table { - overflow: auto; - max-height: 500px; -} + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + } + } + } +/** Table CSS -nocontent */ .nocontent { color: red; font-size: 16px; text-align: center; } -.active:hover{ - color: green; - font-size: 20px; + +/** Table CSS - Search(or)Filter Field */ +.mat-form-field { + font-size: 14px; + width: 100%; } -.deactive:hover{ - color: red; - font-size: 20px; + +.filter-container { + display: flex; + flex-direction: column; + min-width: 300px; } -.example-margin { - margin: 10px; + +.filter-header { + min-height: 64px; + padding: 8px 24px 0; } \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.ts b/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.ts index 03b6189c5..7c9979531 100644 --- a/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/regions/regions-list/regions-list.component.ts @@ -30,7 +30,7 @@ export class RegionsListComponent implements OnInit { loader: boolean = false; regionsList: any = []; noRecordFound: boolean = false; - + color = 'primary'; userData = null; public dataLength: number; @@ -105,10 +105,16 @@ this.getregions(); getregions() { this._regionsService.getAllMasterData('REGIONS').subscribe( data => { - if(data.status === 200){ + if(data.dataStatus == true){ this.noRecordFound = false; this.userData = data.records; this.dataLength = data.records.length; + if(data.records.length >= 1){ + this.userData = this.userData.map((val, i)=>{ + val['serialno'] = i + 1; + return val; + }) + } this.dataSource.data = this.userData; }else{ this.noRecordFound = true; diff --git a/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-dialog/relation-ship-dialog.component.html b/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-dialog/relation-ship-dialog.component.html index e2d4e0529..532cd44e8 100644 --- a/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-dialog/relation-ship-dialog.component.html +++ b/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-dialog/relation-ship-dialog.component.html @@ -40,7 +40,11 @@ fxLayoutAlign="center">

- + + + + +
diff --git a/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-dialog/relation-ship-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-dialog/relation-ship-dialog.component.ts index 23f1f6b08..c68408450 100644 --- a/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-dialog/relation-ship-dialog.component.ts +++ b/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-dialog/relation-ship-dialog.component.ts @@ -29,16 +29,17 @@ export class RelationShipDialogComponent implements OnInit { @Inject(MAT_DIALOG_DATA) public data: any) { } - ngOnInit() { - - /** RelationShip Form Datas */ - this._relationShipForm = this._formBuilder.group({ - relationship_id: [this.data.relationship_id], - name: [this.data.name, Validators.compose([Validators.required])] - }); - + ngOnInit() { + this.relationShipFormDatas(); } + /** RelationShip Form Datas */ + relationShipFormDatas(){ + this._relationShipForm = this._formBuilder.group({ + relationship_id: [this.data.relationship_id], + name: [this.data.name, Validators.compose([Validators.required])] + }); + } // onSubmit() { // if (isNaN(this.data.ID)) { // this._MastersService.addRelationShip(this._relationShipForm.value); @@ -95,5 +96,10 @@ onNoClick(): void { onReset(){ this._relationShipForm.reset(); } + + /** To Reset Popup Data For Edit*/ + onResetForEdit(){ + this.relationShipFormDatas(); + } } /** End Of Relationship Dialog Component */ \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.html b/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.html index 4b039c6e9..fa963226e 100644 --- a/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.html @@ -1,11 +1,12 @@
- +

-
- -
+ -
-
+
+
@@ -93,7 +94,7 @@ Sl - {{i+1}} + {{row.serialno}} @@ -110,7 +111,7 @@ @@ -118,7 +119,7 @@ @@ -128,7 +129,7 @@ Actions - + diff --git a/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.scss b/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.scss index 2fb88a800..dea0560d5 100644 --- a/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.scss +++ b/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.scss @@ -1,157 +1,50 @@ -/* Structure -.example-container { - display: flex; - flex-direction: column; - min-width: 30px; - } - - .example-header { - min-height: 64px; - padding: 8px 24px 0; - } - - //mat-cell{ - .cell{ - display:flex !important; - justify-content:center!important; - - } - - // mat-header-cell { - .header-cell{ - display:flex; - justify-content:center; - }*/ - - // - - -/* Structure -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 56px; - max-height: 56px; - display: flex; - align-items: center; - padding: 8px 24px 0; - font-size: 20px; - justify-content: space-between; - border-bottom: 1px solid transparent; -} - -.mat-input-container { - font-size: 14px; - flex-grow: 1; - margin-left: 32px; - margin-top: 8px; -} - -.example-no-results { - display: flex; - justify-content: center; - padding: 24px; - font-size: 12px; - font-style: italic; -} - -/** Selection styles -.example-selection-header { - font-size: 18px; - background: rgba(255, 64, 129, 0.3); - border-bottom: 1px solid #d696ac; -} - -.mat-column-select { - max-width: 54px; -} - -.mat-row:hover, .example-selected-row { - background: #f5f5f5; -} - -.mat-row:active, .mat-row.example-selected-row { - background: #eaeaea; +/** Table SerialNo CSS */ +.example-margin { + margin: 10px; } +/** Table CSS - Dislplay Data */ .mat-table { - overflow: auto; - max-height: 500px; -}*/ -/* Structure * -.example-container { - display: flex; - flex-direction: column; - min-width: 30px; - width : 80%; - margin : 20px auto; -} + display: table; + width: 100%; + overflow: auto; + max-height: 500px; + + > .mat-header-row, > .mat-row { + display: table-row; + padding: 0; + border: none; + + > .mat-header-cell, > .mat-cell { + display: table-cell; + height: 48px; + vertical-align: middle; -.example-header { - min-height: 64px; - padding: 8px 24px 0; -} + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + } + } + } -//mat-cell{ -.cell{ - display:flex !important; - justify-content:center!important; - -} - -// mat-header-cell { - .header-cell{ - display:flex; - justify-content:center; -} - - -table { - width: 100%; -} - -th { - text-align: left; -} - -*/ -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 64px; - padding: 8px 24px 0; -} - -.mat-form-field { - font-size: 14px; - width: 100%; -} - -.mat-table { - overflow: auto; - max-height: 500px; -} +/** Table CSS -nocontent */ .nocontent { color: red; font-size: 16px; text-align: center; } -.active:hover{ - color: green; - font-size: 20px; + +/** Table CSS - Search(or)Filter Field */ +.mat-form-field { + font-size: 14px; + width: 100%; } -.deactive:hover{ - color: red; - font-size: 20px; -} -.example-margin { - margin: 10px; + +.filter-container { + display: flex; + flex-direction: column; + min-width: 300px; } + +.filter-header { + min-height: 64px; + padding: 8px 24px 0; +} \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.ts b/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.ts index 90eee0ba2..ae8f7d6ab 100644 --- a/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/relation-ship/relation-ship-list/relation-ship-list.component.ts @@ -28,7 +28,7 @@ export class RelationShipListComponent implements OnInit { loader: boolean = false; RelationShipList: any = []; noRecordFound: boolean = false; - + color = 'primary'; //displayedColumns = ['relationship_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions']; //relationship_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive @@ -116,10 +116,16 @@ export class RelationShipListComponent implements OnInit { data => { - if(data.status === 200){ + if(data.dataStatus == true){ this.noRecordFound = false; this.userData = data.records; this.dataLength = data.records.length; + if(data.records.length >= 1){ + this.userData = this.userData.map((val, i)=>{ + val['serialno'] = i + 1; + return val; + }) + } this.dataSource.data = this.userData; }else{ this.noRecordFound = true; diff --git a/ng6-seed/src/app/settings/masters/component/states/states-dialog/states-dialog.component.html b/ng6-seed/src/app/settings/masters/component/states/states-dialog/states-dialog.component.html index 782dd0feb..b326a1be9 100644 --- a/ng6-seed/src/app/settings/masters/component/states/states-dialog/states-dialog.component.html +++ b/ng6-seed/src/app/settings/masters/component/states/states-dialog/states-dialog.component.html @@ -65,7 +65,11 @@ fxLayoutAlign="center">
- + + + + +
diff --git a/ng6-seed/src/app/settings/masters/component/states/states-dialog/states-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/states/states-dialog/states-dialog.component.ts index 89962c3a0..cde912e62 100644 --- a/ng6-seed/src/app/settings/masters/component/states/states-dialog/states-dialog.component.ts +++ b/ng6-seed/src/app/settings/masters/component/states/states-dialog/states-dialog.component.ts @@ -32,14 +32,8 @@ export class StatesDialogComponent implements OnInit { ngOnInit() { - - this._statesForm = this._formBuilder.group({ - //States_id: any; fk_city_id: any; - state_id: [this.data.state_id], - name: [this.data.name, Validators.compose([Validators.required])], - code: [this.data.code, Validators.compose([Validators.required])], - fk_region_id : [this.data.fk_region_id, Validators.compose([Validators.required])] - }); + this.statesFormDatas(); + /** For SelectDrop Datas*/ this._MastersService.getAllMasterData('REGIONS') .subscribe( @@ -53,7 +47,17 @@ export class StatesDialogComponent implements OnInit { }, error => this.errorMessage = error); //console.log(this._statesForm); } + + statesFormDatas(){ + this._statesForm = this._formBuilder.group({ + //States_id: any; fk_city_id: any; + state_id: [this.data.state_id], + name: [this.data.name, Validators.compose([Validators.required])], + code: [this.data.code, Validators.compose([Validators.required])], + fk_region_id : [this.data.fk_region_id, Validators.compose([Validators.required])] + }); + } // onSubmit() { // if (isNaN(this.data.ID)) { // this._MastersService.addStates(this._statesForm.value); @@ -113,6 +117,11 @@ export class StatesDialogComponent implements OnInit { onReset(){ this._statesForm.reset(); } + + /** To Reset Popup Data For Edit*/ + onResetForEdit(){ + this.statesFormDatas(); + } } /** End Of State Dialog Component */ \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.html b/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.html index 3afaf871c..2099dc1f0 100644 --- a/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.html @@ -3,9 +3,10 @@

-
- -
+ -
-
+
+
@@ -113,7 +114,7 @@ Sl - {{i+1}} + {{row.serialno}} @@ -134,7 +135,7 @@ @@ -142,7 +143,7 @@ @@ -152,7 +153,7 @@ Actions - + diff --git a/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.scss b/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.scss index 382f2e683..dea0560d5 100644 --- a/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.scss +++ b/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.scss @@ -1,132 +1,50 @@ - -/* Structure -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 56px; - max-height: 56px; - display: flex; - align-items: center; - padding: 8px 24px 0; - font-size: 20px; - justify-content: space-between; - border-bottom: 1px solid transparent; -} - -.mat-input-container { - font-size: 14px; - flex-grow: 1; - margin-left: 32px; - margin-top: 8px; -} - -.example-no-results { - display: flex; - justify-content: center; - padding: 24px; - font-size: 12px; - font-style: italic; -} - -/** Selection styles -.example-selection-header { - font-size: 18px; - background: rgba(255, 64, 129, 0.3); - border-bottom: 1px solid #d696ac; -} - -.mat-column-select { - max-width: 54px; -} - -.mat-row:hover, .example-selected-row { - background: #f5f5f5; -} - -.mat-row:active, .mat-row.example-selected-row { - background: #eaeaea; +/** Table SerialNo CSS */ +.example-margin { + margin: 10px; } +/** Table CSS - Dislplay Data */ .mat-table { - overflow: auto; - max-height: 500px; -}*/ -/* Structure * -.example-container { - display: flex; - flex-direction: column; - min-width: 30px; - width : 80%; - margin : 20px auto; - } + display: table; + width: 100%; + overflow: auto; + max-height: 500px; + + > .mat-header-row, > .mat-row { + display: table-row; + padding: 0; + border: none; + + > .mat-header-cell, > .mat-cell { + display: table-cell; + height: 48px; + vertical-align: middle; - .example-header { - min-height: 64px; - padding: 8px 24px 0; - } - - //mat-cell{ - .cell{ - display:flex !important; - justify-content:center!important; - - } - - // mat-header-cell { - .header-cell{ - display:flex; - justify-content:center; - } - - - table { - width: 100%; - } - - th { - text-align: left; - } - - -*/ -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 64px; - padding: 8px 24px 0; -} - -.mat-form-field { - font-size: 14px; - width: 100%; -} - -.mat-table { - overflow: auto; - max-height: 500px; -} + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + } + } + } +/** Table CSS -nocontent */ .nocontent { color: red; font-size: 16px; text-align: center; } -.active:hover{ - color: green; - font-size: 20px; + +/** Table CSS - Search(or)Filter Field */ +.mat-form-field { + font-size: 14px; + width: 100%; } -.deactive:hover{ - color: red; - font-size: 20px; + +.filter-container { + display: flex; + flex-direction: column; + min-width: 300px; } -.example-margin { - margin: 10px; + +.filter-header { + min-height: 64px; + padding: 8px 24px 0; } \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.ts b/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.ts index b06843e3a..d6cea1399 100644 --- a/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/states/states-list/states-list.component.ts @@ -28,7 +28,7 @@ export class StatesListComponent implements OnInit { isPopupOpened: boolean = true; loader: boolean = false; StateList: any = []; - + color = 'primary'; noRecordFound: boolean = false; //displayedColumns = ['states_id', 'fk_city_id', 'name', 'createdon', 'fk_createdby', 'updatedon', 'fk_updatedby', 'isactive','actions']; @@ -110,11 +110,17 @@ isactiveState(id: number,isactive : number) { getState() { this._statesService.getAllState().subscribe( data => { - if(data.status === 200){ + if(data.dataStatus == true){ this.noRecordFound = false; this.userData = data.records; this.dataLength = data.records.length; - this.dataSource.data = this.userData; + this.dataSource.data = this.userData; + if(data.records.length >= 1){ + this.userData = this.userData.map((val, i)=>{ + val['serialno'] = i + 1; + return val; + }) + } }else{ this.noRecordFound = true; this.dataLength = 0 diff --git a/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-dialog/sub-product-dialog.component.html b/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-dialog/sub-product-dialog.component.html index 840cbfd1d..6381579f0 100644 --- a/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-dialog/sub-product-dialog.component.html +++ b/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-dialog/sub-product-dialog.component.html @@ -72,7 +72,11 @@ fxLayoutAlign="center">
- + + + + +
diff --git a/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-dialog/sub-product-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-dialog/sub-product-dialog.component.ts index f9c463683..2f2068fb7 100644 --- a/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-dialog/sub-product-dialog.component.ts +++ b/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-dialog/sub-product-dialog.component.ts @@ -31,13 +31,8 @@ export class SubProductDialogComponent implements OnInit { @Inject(MAT_DIALOG_DATA) public data: any) { } ngOnInit() { - - this._subProductMasterForm = this._formBuilder.group({ - subproduct_id: [this.data.subproduct_id], - name: [this.data.name, Validators.compose([Validators.required])], - fk_product_id: [this.data.fk_product_id, Validators.compose([Validators.required])], - abbr: [this.data.abbr, Validators.compose([Validators.required])] - }); + this.subProductFormDatas(); + this._MastersService.getAllMasterData('PRODUCTS') .subscribe( @@ -53,6 +48,14 @@ export class SubProductDialogComponent implements OnInit { //console.log(this._industryMasterForm); } + subProductFormDatas(){ + this._subProductMasterForm = this._formBuilder.group({ + subproduct_id: [this.data.subproduct_id], + name: [this.data.name, Validators.compose([Validators.required])], + fk_product_id: [this.data.fk_product_id, Validators.compose([Validators.required])], + abbr: [this.data.abbr, Validators.compose([Validators.required])] + }); + } // onSubmit() { // if (isNaN(this.data.ID)) { // this._MastersService.addSubProductMaster(this._subProductMasterForm.value); @@ -107,5 +110,10 @@ export class SubProductDialogComponent implements OnInit { this._subProductMasterForm.reset(); } + /** To Reset Popup Data For Edit*/ + onResetForEdit(){ + this.subProductFormDatas(); + } + } /** End Of SubProductMaster Dialog Component */ \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.html b/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.html index 0fbfa25e6..2b1094aec 100644 --- a/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.html @@ -1,11 +1,12 @@
- +

-
- -
+
-
-
+
+
@@ -103,7 +104,7 @@ Sl - {{i+1}} + {{row.serialno}} @@ -124,7 +125,7 @@ @@ -132,7 +133,7 @@ @@ -142,7 +143,7 @@ Actions - + diff --git a/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.scss b/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.scss index cb9d4cd47..dea0560d5 100644 --- a/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.scss +++ b/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.scss @@ -1,151 +1,50 @@ -/* Structure -.example-container { - display: flex; - flex-direction: column; - min-width: 30px; - } - - .example-header { - min-height: 64px; - padding: 8px 24px 0; - } - - //mat-cell{ - .cell{ - display:flex !important; - justify-content:center!important; - - } - - // mat-header-cell { - .header-cell{ - display:flex; - justify-content:center; - }*/ - - // - - -/* Structure -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 56px; - max-height: 56px; - display: flex; - align-items: center; - padding: 8px 24px 0; - font-size: 20px; - justify-content: space-between; - border-bottom: 1px solid transparent; -} - -.mat-input-container { - font-size: 14px; - flex-grow: 1; - margin-left: 32px; - margin-top: 8px; -} - -.example-no-results { - display: flex; - justify-content: center; - padding: 24px; - font-size: 12px; - font-style: italic; -} - -/** Selection styles -.example-selection-header { - font-size: 18px; - background: rgba(255, 64, 129, 0.3); - border-bottom: 1px solid #d696ac; -} - -.mat-column-select { - max-width: 54px; -} - -.mat-row:hover, .example-selected-row { - background: #f5f5f5; -} - -.mat-row:active, .mat-row.example-selected-row { - background: #eaeaea; +/** Table SerialNo CSS */ +.example-margin { + margin: 10px; } +/** Table CSS - Dislplay Data */ .mat-table { - overflow: auto; - max-height: 500px; -}*/ -/* Structure * -.example-container { - display: flex; - flex-direction: column; - min-width: 30px; - width : 80%; - margin : 20px auto; -} + display: table; + width: 100%; + overflow: auto; + max-height: 500px; + + > .mat-header-row, > .mat-row { + display: table-row; + padding: 0; + border: none; + + > .mat-header-cell, > .mat-cell { + display: table-cell; + height: 48px; + vertical-align: middle; -.example-header { - min-height: 64px; - padding: 8px 24px 0; -} - -//mat-cell{ -.cell{ - display:flex !important; - justify-content:center!important; - -} - -// mat-header-cell { - .header-cell{ - display:flex; - justify-content:center; -} - - -table { - width: 100%; -} - -th { - text-align: left; -} - - -*/ -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 64px; - padding: 8px 24px 0; -} - -.mat-form-field { - font-size: 14px; - width: 100%; -} - -.mat-table { - overflow: auto; - max-height: 500px; -} + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + } + } + } +/** Table CSS -nocontent */ .nocontent { color: red; font-size: 16px; text-align: center; } -.example-margin { - margin: 10px; + +/** Table CSS - Search(or)Filter Field */ +.mat-form-field { + font-size: 14px; + width: 100%; +} + +.filter-container { + display: flex; + flex-direction: column; + min-width: 300px; +} + +.filter-header { + min-height: 64px; + padding: 8px 24px 0; } \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.ts b/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.ts index 7cda85dda..2f28e4056 100644 --- a/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/sub-product/sub-product-list/sub-product-list.component.ts @@ -17,6 +17,7 @@ import { SubProductDialogComponent } from '../sub-product-dialog/sub-product-dia /** Model */ import { SubProductMaster } from '../../../model/sub-product-master'; + @Component({ selector: 'app-sub-product-list', templateUrl: './sub-product-list.component.html', @@ -36,6 +37,7 @@ export class SubProductListComponent implements OnInit { public dataLength: number; public dataSource = new MatTableDataSource(); displayedColumns = ['serialno','product_name','name','actions','isactive']; + color = 'primary'; @ViewChild(MatPaginator) paginator: MatPaginator; @ViewChild(MatSort) sort: MatSort; @@ -102,10 +104,16 @@ export class SubProductListComponent implements OnInit { getSubProductMaster() { this._MastersService.getAllSubProduct().subscribe( data => { - if(data.status === 200){ + if(data.dataStatus == true){ this.noRecordFound = false; this.userData = data.records; this.dataLength = data.records.length; + if(data.records.length >= 1){ + this.userData = this.userData.map((val, i)=>{ + val['serialno'] = i + 1; + return val; + }) + } this.dataSource.data = this.userData; }else{ this.noRecordFound = true; diff --git a/ng6-seed/src/app/settings/masters/component/title/title-dialog/title-dialog.component.html b/ng6-seed/src/app/settings/masters/component/title/title-dialog/title-dialog.component.html index c6be789ef..c54116f2a 100644 --- a/ng6-seed/src/app/settings/masters/component/title/title-dialog/title-dialog.component.html +++ b/ng6-seed/src/app/settings/masters/component/title/title-dialog/title-dialog.component.html @@ -40,7 +40,10 @@ fxLayoutAlign="center">

- + + + +
diff --git a/ng6-seed/src/app/settings/masters/component/title/title-dialog/title-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/title/title-dialog/title-dialog.component.ts index 7adc7a4b5..651b5aa49 100644 --- a/ng6-seed/src/app/settings/masters/component/title/title-dialog/title-dialog.component.ts +++ b/ng6-seed/src/app/settings/masters/component/title/title-dialog/title-dialog.component.ts @@ -30,14 +30,18 @@ export class TitleDialogComponent implements OnInit { ngOnInit() { + this.titleFormDatas(); - this._titleForm = this._formBuilder.group({ - title_id: [this.data.title_id], - name: [this.data.name, Validators.compose([Validators.required])] - }); + //console.log(this._titleForm); } + titleFormDatas(){ + this._titleForm = this._formBuilder.group({ + title_id: [this.data.title_id], + name: [this.data.name, Validators.compose([Validators.required])] + });} + // onSubmit() { // if (isNaN(this.data.ID)) { // this._contactService.addTitle(this._titleForm.value); @@ -92,5 +96,10 @@ export class TitleDialogComponent implements OnInit { onReset(){ this._titleForm.reset(); } + + /** To Reset Popup Data For Edit*/ + onResetForEdit(){ + this.titleFormDatas(); + } } /** End Of Title Dialog Component */ \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.html b/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.html index 0f707f3af..218aba20f 100644 --- a/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.html @@ -1,11 +1,12 @@
- +

-
- -
+
-
-
+
+
@@ -93,7 +94,7 @@ Sl - {{i+1}} + {{row.serialno}} @@ -109,7 +110,7 @@ @@ -117,7 +118,7 @@ @@ -127,7 +128,7 @@ Actions - + diff --git a/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.scss b/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.scss index 30e06d236..f263cde4d 100644 --- a/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.scss +++ b/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.scss @@ -118,33 +118,53 @@ th { } -*/ -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 64px; - padding: 8px 24px 0; -} - -.mat-form-field { - font-size: 14px; - width: 100%; +*//** Table SerialNo CSS */ +.example-margin { + margin: 10px; } +/** Table CSS - Dislplay Data */ .mat-table { - overflow: auto; - max-height: 500px; -} + display: table; + width: 100%; + overflow: auto; + max-height: 500px; + + > .mat-header-row, > .mat-row { + display: table-row; + padding: 0; + border: none; + + > .mat-header-cell, > .mat-cell { + display: table-cell; + height: 48px; + vertical-align: middle; + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + } + } + } + +/** Table CSS -nocontent */ .nocontent { color: red; font-size: 16px; text-align: center; } -.example-margin { - margin: 10px; + +/** Table CSS - Search(or)Filter Field */ +.mat-form-field { + font-size: 14px; + width: 100%; +} + +.filter-container { + display: flex; + flex-direction: column; + min-width: 300px; +} + +.filter-header { + min-height: 64px; + padding: 8px 24px 0; } \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.ts b/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.ts index d030054a3..9ccc07c45 100644 --- a/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/title/title-list/title-list.component.ts @@ -26,6 +26,7 @@ export class TitleListComponent implements OnInit { loader: boolean = false; TitleList: any = []; noRecordFound: boolean = false; + color = 'primary'; //displayedColumns = ['title_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions']; //title_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive @@ -88,10 +89,16 @@ export class TitleListComponent implements OnInit { getTitle() { this._MastersService.getAllMasterData('TITLES').subscribe( data => { - if(data.status === 200){ + if(data.dataStatus == true){ this.noRecordFound = false; this.userData = data.records; this.dataLength = data.records.length; + if(data.records.length >= 1){ + this.userData = this.userData.map((val, i)=>{ + val['serialno'] = i + 1; + return val; + }) + } this.dataSource.data = this.userData; }else{ this.noRecordFound = true; diff --git a/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-dialog/activity-dialog.component.html b/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-dialog/activity-dialog.component.html index 25e9e01d0..2ca887e43 100644 --- a/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-dialog/activity-dialog.component.html +++ b/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-dialog/activity-dialog.component.html @@ -40,7 +40,11 @@ fxLayoutAlign="center">

- + + + + +
diff --git a/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-dialog/activity-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-dialog/activity-dialog.component.ts index c0b676091..dcb2b9184 100644 --- a/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-dialog/activity-dialog.component.ts +++ b/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-dialog/activity-dialog.component.ts @@ -31,15 +31,18 @@ export class ActivityDialogComponent implements OnInit { ngOnInit() { - - /** ActivityMaster Form Datas */ - this._activityMasterForm = this._formBuilder.group({ - type_of_activity_id: [this.data.type_of_activity_id], - name: [this.data.name, Validators.compose([Validators.required])] - }); + this.activityFormDatas(); + //console.log(this._activityMasterForm); } + /** ActivityMaster Form Datas */ + activityFormDatas(){ + this._activityMasterForm = this._formBuilder.group({ + type_of_activity_id: [this.data.type_of_activity_id], + name: [this.data.name, Validators.compose([Validators.required])] + });} + /** For Popup Close Button */ onNoClick(): void { this.dialogRef.close(); @@ -95,5 +98,10 @@ onSubmit() { onReset(){ this._activityMasterForm.reset(); } + + /** To Reset Popup Data For Edit*/ + onResetForEdit(){ + this.activityFormDatas(); + } } /** End Of Activit Dialog Component */ \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.html b/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.html index e9a2f8943..2b6c9c8c7 100644 --- a/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.html @@ -1,11 +1,12 @@
- +

-
- -
+ -
-
+
+
@@ -86,7 +87,7 @@ Sl - {{i+1}} + {{row.serialno}} @@ -102,13 +103,13 @@ Actions - + diff --git a/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.scss b/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.scss index 2262bf296..e96b58111 100644 --- a/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.scss +++ b/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.scss @@ -118,32 +118,53 @@ th { */ -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 64px; - padding: 8px 24px 0; -} - -.mat-form-field { - font-size: 14px; - width: 100%; +/** Table SerialNo CSS */ +.example-margin { + margin: 10px; } +/** Table CSS - Dislplay Data */ .mat-table { - overflow: auto; - max-height: 500px; -} + display: table; + width: 100%; + overflow: auto; + max-height: 500px; + + > .mat-header-row, > .mat-row { + display: table-row; + padding: 0; + border: none; + + > .mat-header-cell, > .mat-cell { + display: table-cell; + height: 48px; + vertical-align: middle; + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + } + } + } + +/** Table CSS -nocontent */ .nocontent { color: red; font-size: 16px; text-align: center; } -.example-margin { - margin: 10px; + +/** Table CSS - Search(or)Filter Field */ +.mat-form-field { + font-size: 14px; + width: 100%; +} + +.filter-container { + display: flex; + flex-direction: column; + min-width: 300px; +} + +.filter-header { + min-height: 64px; + padding: 8px 24px 0; } \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.ts b/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.ts index 946bb8d44..43d90a2ef 100644 --- a/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/type-of-activity/activity-list/activity-list.component.ts @@ -32,6 +32,7 @@ export class ActivityListComponent implements OnInit { userData = null; noRecordFound: boolean = false; + color = 'primary'; public dataLength: number; public dataSource = new MatTableDataSource(); displayedColumns = ['serialno','name','actions', 'isactive']; @@ -95,10 +96,16 @@ export class ActivityListComponent implements OnInit { this._MastersService.getAllMasterData('TYPEOFACTIVITY').subscribe( data => { - if(data.status === 200){ + if(data.dataStatus == true){ this.noRecordFound = false; this.userData = data.records; this.dataLength = data.records.length; + if(data.records.length >= 1){ + this.userData = this.userData.map((val, i)=>{ + val['serialno'] = i + 1; + return val; + }) + } this.dataSource.data = this.userData; }else{ this.noRecordFound = true; diff --git a/ng6-seed/src/app/settings/masters/component/uom/uom-dialog/uom-dialog.component.html b/ng6-seed/src/app/settings/masters/component/uom/uom-dialog/uom-dialog.component.html index 7f0319106..d4bc15ad0 100644 --- a/ng6-seed/src/app/settings/masters/component/uom/uom-dialog/uom-dialog.component.html +++ b/ng6-seed/src/app/settings/masters/component/uom/uom-dialog/uom-dialog.component.html @@ -38,7 +38,11 @@ fxLayoutAlign="center">

- + + + + +
diff --git a/ng6-seed/src/app/settings/masters/component/uom/uom-dialog/uom-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/uom/uom-dialog/uom-dialog.component.ts index fe7ae9e89..b79c2f8ce 100644 --- a/ng6-seed/src/app/settings/masters/component/uom/uom-dialog/uom-dialog.component.ts +++ b/ng6-seed/src/app/settings/masters/component/uom/uom-dialog/uom-dialog.component.ts @@ -30,17 +30,20 @@ export class UomDialogComponent implements OnInit { ngOnInit() { + this.uomFormDatas(); - this._uomForm = this._formBuilder.group({ - // ID: [this.data.ID], - // Name: [this.data.Name, Validators.compose([Validators.required])] - // uom_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive - uom_id: [this.data.uom_id], - name: [this.data.name, Validators.compose([Validators.required])] - }); //console.log(this._UomForm); } + uomFormDatas(){ + this._uomForm = this._formBuilder.group({ + // ID: [this.data.ID], + // Name: [this.data.Name, Validators.compose([Validators.required])] + // uom_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive + uom_id: [this.data.uom_id], + name: [this.data.name, Validators.compose([Validators.required])] +});} + // onSubmit() { // if (isNaN(this.data.ID)) { // this._mastersService.addUom(this._uomForm.value); @@ -97,5 +100,11 @@ export class UomDialogComponent implements OnInit { onReset(){ this._uomForm.reset(); } + + /** To Reset Popup Data For Edit*/ + onResetForEdit(){ + this.uomFormDatas(); + } + } /** End of UOM dialog Component*/ \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.html b/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.html index 1ca40c400..55bfb4d57 100644 --- a/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.html @@ -1,11 +1,12 @@
- +

-
- -
+ -
-
+
+
@@ -88,7 +89,7 @@ Sl - {{i+1}} + {{row.serialno}} @@ -105,7 +106,7 @@ @@ -113,7 +114,7 @@ @@ -123,7 +124,7 @@ Actions - + diff --git a/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.scss b/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.scss index 147e64ad8..304c4e85e 100644 --- a/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.scss +++ b/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.scss @@ -117,32 +117,53 @@ th { text-align: left; } */ -.example-container { - display: flex; - flex-direction: column; - min-width: 300px; -} - -.example-header { - min-height: 64px; - padding: 8px 24px 0; -} - -.mat-form-field { - font-size: 14px; - width: 100%; +/** Table SerialNo CSS */ +.example-margin { + margin: 10px; } +/** Table CSS - Dislplay Data */ .mat-table { - overflow: auto; - max-height: 500px; -} + display: table; + width: 100%; + overflow: auto; + max-height: 500px; + + > .mat-header-row, > .mat-row { + display: table-row; + padding: 0; + border: none; + + > .mat-header-cell, > .mat-cell { + display: table-cell; + height: 48px; + vertical-align: middle; + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + } + } + } + +/** Table CSS -nocontent */ .nocontent { color: red; font-size: 16px; text-align: center; } -.example-margin { - margin: 10px; + +/** Table CSS - Search(or)Filter Field */ +.mat-form-field { + font-size: 14px; + width: 100%; +} + +.filter-container { + display: flex; + flex-direction: column; + min-width: 300px; +} + +.filter-header { + min-height: 64px; + padding: 8px 24px 0; } \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.ts b/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.ts index 075d79682..e581db38e 100644 --- a/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/uom/uom-list/uom-list.component.ts @@ -32,6 +32,7 @@ export class UomListComponent implements OnInit { isPopupOpened: boolean = true; loader: boolean = false; UOMList: any = []; + color = 'primary'; //displayedColumns = ['uom_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions']; //uom_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive @@ -107,10 +108,16 @@ export class UomListComponent implements OnInit { this._MastersService.getAllMasterData('UOM').subscribe( data => { - if(data.status === 200){ + if(data.dataStatus == true){ this.noRecordFound = false; this.userData = data.records; this.dataLength = data.records.length; + if(data.records.length >= 1){ + this.userData = this.userData.map((val, i)=>{ + val['serialno'] = i + 1; + return val; + }) + } this.dataSource.data = this.userData; }else{ this.noRecordFound = true; diff --git a/ng6-seed/src/app/settings/masters/masters.component.html b/ng6-seed/src/app/settings/masters/masters.component.html index addd7376d..87a93dc18 100644 --- a/ng6-seed/src/app/settings/masters/masters.component.html +++ b/ng6-seed/src/app/settings/masters/masters.component.html @@ -10,7 +10,7 @@
- + {{master.name}} @@ -84,14 +84,27 @@
- +
- +
+ +
+
+
+ +
+
+ + +
+ \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/masters.component.ts b/ng6-seed/src/app/settings/masters/masters.component.ts index 4b0e1d881..3869c26a8 100644 --- a/ng6-seed/src/app/settings/masters/masters.component.ts +++ b/ng6-seed/src/app/settings/masters/masters.component.ts @@ -119,9 +119,14 @@ export class MastersComponent implements OnInit { {id: 'master-17',name: 'Designation'}, {id: 'master-18',name: 'Lender Hierarchy'}, {id: 'master-19',name: 'Company Details'}, - {id: 'master-20',name: 'PD Type'}, - {id: 'master-21',name: 'Approach to PD location'}, - {id: 'master-22',name: 'PD Allocation Type'}, + {id: 'master-20',name: 'Question Category'}, + {id: 'master-21',name: 'PD Type'}, + {id: 'master-22',name: 'Approach to PD location'}, + {id: 'master-23',name: 'PD Allocation Type'}, + {id: 'master-24',name: 'PD Notification'}, + // {id: 'master-25',name: 'PD Office Lender'}, + {id: 'master-25',name: 'PD Team'}, + ]; diff --git a/ng6-seed/src/app/settings/masters/masters.module.ts b/ng6-seed/src/app/settings/masters/masters.module.ts index 1da14799b..34ccae9df 100644 --- a/ng6-seed/src/app/settings/masters/masters.module.ts +++ b/ng6-seed/src/app/settings/masters/masters.module.ts @@ -10,10 +10,10 @@ import { MatButtonModule, MatSelectModule, MatDialogModule, - MatProgressBarModule,MatToolbarModule, + MatProgressBarModule,MatToolbarModule,MatCheckboxModule, MatTableModule,MatPaginatorModule,MatSortModule} from '@angular/material'; import {MatSlideToggleModule} from '@angular/material/slide-toggle'; - + import { MatTooltipModule } from '@angular/material/tooltip'; import { DemoMaterialModule } from '../../shared/demo.module'; @@ -49,10 +49,14 @@ import { CustomerBehaviourListComponent } from './component/customer-behaviour/c import { DesignationListComponent } from './component/designation/designation-list/designation-list.component'; import { RegionsListComponent } from './component/regions/regions-list/regions-list.component'; import { CommentsOnLocalityListComponent } from './component/comments-on-locality/comments-on-locality-list/comments-on-locality-list.component'; -import { PdAllocationTypeListComponent } from './component/pd/pd-allocation-type-list/pd-allocation-type-list.component'; -import { PdLocationApproachListComponent } from './component/pd/pd-location-approach-list/pd-location-approach-list.component'; -import { PdTypeListComponent } from './component/pd/pd-type-list/pd-type-list.component'; +import { PdAllocationTypeListComponent } from './component/pd-allocation-type/pd-allocation-type-list.component'; +import { PdLocationApproachListComponent } from './component/pd-location-approach/pd-location-approach-list/pd-location-approach-list.component'; +import { PdTypeListComponent } from './component/pd-type/pd-type-list/pd-type-list.component'; import { LenderHierarchyListComponent } from './component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component'; +import { QuestionCategoryListComponent } from './component/question-category/question-category-list/question-category-list.component'; +import { PdNotificationDialogComponent } from './component/pd-notification/pd-notification-dialog/pd-notification-dialog.component'; +import { PdTeamDialogComponent } from './component/pd-team/pd-team-dialog/pd-team-dialog.component'; + /** Master Child Component - For Dialogboxes*/ import { ProductDialogComponent } from './component/product/product-dialog/product-dialog.component'; @@ -65,9 +69,8 @@ import { MembersOccupationDialogComponent } from './component/members-occupation import { ActivityDialogComponent } from './component/type-of-activity/activity-dialog/activity-dialog.component'; import { UomDialogComponent } from './component/uom/uom-dialog/uom-dialog.component'; import { FrequencyDialogComponent } from './component/frequency/frequency-dialog/frequency-dialog.component'; -import { PdTypeDialogComponent } from './component/pd/pd-type-dialog/pd-type-dialog.component'; -import { PdLocationApproachDialogComponent } from './component/pd/pd-location-approach-dialog/pd-location-approach-dialog.component'; -import { PdAllocationTypeDialogComponent } from './component/pd/pd-allocation-type-dialog/pd-allocation-type-dialog.component'; +import { PdTypeDialogComponent } from './component/pd-type/pd-type-dialog/pd-type-dialog.component'; +import { PdLocationApproachDialogComponent } from './component/pd-location-approach/pd-location-approach-dialog/pd-location-approach-dialog.component'; import { LenderHierarchyDialogComponent } from './component/lender-hierarchy/lender-hierarchy-dialog/lender-hierarchy-dialog.component'; import { CommentsOnLocalityDialogComponent } from './component/comments-on-locality/comments-on-locality-dialog/comments-on-locality-dialog.component'; import { DesignationDialogComponent } from './component/designation/designation-dialog/designation-dialog.component'; @@ -77,13 +80,17 @@ import { StatesDialogComponent } from './component/states/states-dialog/states-d import { CompanyDialogComponent } from './component/company/company-dialog/company-dialog.component'; import { CityDialogComponent } from './component/city/city-dialog/city-dialog.component'; import { RegionsDialogComponent } from './component/regions/regions-dialog/regions-dialog.component'; +import { QuestionCategoryDialogComponent } from './component/question-category/question-category-dialog/question-category-dialog.component'; +import { PdNotificationListComponent } from './component/pd-notification/pd-notification-list/pd-notification-list.component'; +import { PdTeamListComponent } from './component/pd-team/pd-team-list/pd-team-list.component'; + /** Master Routes */ import { MastersRoutes } from './masters.routing'; /** Master Service */ import { MastersService } from '../service/masters/masters.service'; - +import { PdTeamService } from '../service/masters/pd-team.service'; @NgModule({ @@ -109,7 +116,8 @@ import { MastersService } from '../service/masters/masters.service'; NgxDatatableModule, MatSortModule, MatSlideToggleModule, - MatTooltipModule + MatTooltipModule, + MatCheckboxModule ], declarations: [MastersComponent, IndustryClassificationListComponent, @@ -134,7 +142,8 @@ import { MastersService } from '../service/masters/masters.service'; PdLocationApproachListComponent, PdTypeListComponent, LenderHierarchyListComponent, - + PdNotificationDialogComponent, + PdNotificationListComponent, ProductDialogComponent, IndustryClassificationDialogComponent, SubProductDialogComponent, @@ -146,8 +155,7 @@ import { MastersService } from '../service/masters/masters.service'; UomDialogComponent, FrequencyDialogComponent, PdTypeDialogComponent, - PdLocationApproachDialogComponent, - PdAllocationTypeDialogComponent, + PdLocationApproachDialogComponent, LenderHierarchyDialogComponent, CommentsOnLocalityDialogComponent, DesignationDialogComponent, @@ -156,9 +164,14 @@ import { MastersService } from '../service/masters/masters.service'; StatesDialogComponent, CompanyDialogComponent, CityDialogComponent, - RegionsDialogComponent], + RegionsDialogComponent, + PdTeamDialogComponent, + PdTeamListComponent, + QuestionCategoryDialogComponent, + QuestionCategoryListComponent + ], - providers: [ MastersService ], + providers: [ MastersService,PdTeamService ], entryComponents: [ IndustryClassificationDialogComponent, @@ -173,7 +186,6 @@ import { MastersService } from '../service/masters/masters.service'; FrequencyDialogComponent, PdTypeDialogComponent, PdLocationApproachDialogComponent, - PdAllocationTypeDialogComponent, LenderHierarchyDialogComponent, CommentsOnLocalityDialogComponent, DesignationDialogComponent, @@ -182,7 +194,10 @@ import { MastersService } from '../service/masters/masters.service'; StatesDialogComponent, CompanyDialogComponent, CityDialogComponent, - RegionsDialogComponent], + RegionsDialogComponent, + PdTeamDialogComponent, + QuestionCategoryDialogComponent +], }) export class MastersModule { } \ No newline at end of file diff --git a/ng6-seed/src/app/settings/service/masters/masters.service.ts b/ng6-seed/src/app/settings/service/masters/masters.service.ts index a9b83e84a..6514e9b22 100644 --- a/ng6-seed/src/app/settings/service/masters/masters.service.ts +++ b/ng6-seed/src/app/settings/service/masters/masters.service.ts @@ -25,8 +25,7 @@ export interface Master { export class MastersService { - private apiUrl = "http://ssa.sineedge.com/sparqapi/api/"; -// private apiUrl = "http://localhost/sparqapi/api/"; + private apiUrl = "http://ssa.sineedge.com/sparqapi/api/"; constructor(private _http: HttpClient, @@ -41,12 +40,12 @@ export class MastersService { */ addMasterDetails(Records: any,MasterName:string): Observable { Records.fk_createdby = this._aws.getlocale();//to get user id for who is created the Record - if(MasterName == 'COMPANY'){ - Records.company_master_createdon = currentdate;//to get Current date and Time for when the Record is created - } - else{ - Records.createdon = currentdate;//to get Current date and Time for when the Record is created - } + // if(MasterName == 'COMPANY'){ + // Records.company_master_createdon = currentdate;//to get Current date and Time for when the Record is created + // } + // else{ + Records.createdon = currentdate;//to get Current date and Time for when the Record is created + //} var ArrayData = { "master_name":MasterName, "records": Records } @@ -67,7 +66,7 @@ return this._http.post(this.apiUrl+"saveMaster", ArrayData) * 2nd argument is "MasterName" :string - Table Name */ editMasterDetails(Records: any,MasterName:string): Observable { - + Records.fk_updatedby = this._aws.getlocale();//to get user id for who is update the record Records.updatedon = currentdate;//to get Current date and Time for when the Record is updated @@ -236,4 +235,77 @@ return this._http.post(this.apiUrl+"saveMaster", ArrayData) return of(result as T); }; } + +editPDAllocationType(Records: any,MasterName:string): Observable { + + Records.forEach((item, index) => { + + item.fk_updatedby = this._aws.getlocale();//to get user id for who is update the record + item.updatedon = currentdate;//to get Current date and Time for when the Record is updated + + }); + + var ArrayData = { "master_name":MasterName, + "records": Records } + + return this._http.post(this.apiUrl+"savePDAllocationType", ArrayData) + .pipe( + catchError(this.handleError('role', [])) + ) + + } + + + getAllPDNotification(): Observable { + + return this._http.get(this.apiUrl+'getPDNotificationsList') + .pipe( + catchError(this.handleError('role', [])) + ) + // return this._http.get(this.apiUrl+'getListOfCompany') + // .pipe( + // catchError(this.handleError('role', [])) + // ) + + } + + + /** + * Seperated Records from the res + * argument 'res' : Response + */ + addCompanyDetails(Records: any): Observable { + let formData = new FormData(); + + Records.fk_createdby = this._aws.getlocale();//to get user id for who is created the Records + Records.company_master_createdon = currentdate;//to get Current date and Time for when the Record is created + + // var ArrayData = { "master_name":'COMPANY', + // "records": Records } + + formData.append('logo',Records.logo); + formData.append('records',JSON.stringify(Records)); + + return this._http.post(this.apiUrl+"saveCompany", formData) + .pipe( + catchError(this.handleError('role', [])) + ) + } + + saveAllPDNotification(Records: any): Observable { + + Records.forEach((item, index) => { + + item.fk_updatedby = this._aws.getlocale();//to get user id for who is update the record + item.updatedon = currentdate;//to get Current date and Time for when the Record is updated + delete item.pd_status_name; // to delete the pd_status_name + }); + + //console.log('Service Data',Records); + var ArrayData = { "records": Records } + return this._http.post(this.apiUrl+"savePDNotification", ArrayData) + .pipe( + catchError(this.handleError('role', [])) + ) + } } \ No newline at end of file diff --git a/ng6-seed/src/app/settings/service/masters/pd-team.service.ts b/ng6-seed/src/app/settings/service/masters/pd-team.service.ts new file mode 100644 index 000000000..d0dd22ebe --- /dev/null +++ b/ng6-seed/src/app/settings/service/masters/pd-team.service.ts @@ -0,0 +1,184 @@ +/** Common Import Section */ +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs';//for Datatables +import { HttpClient } from '@angular/common/http'; +import { catchError } from 'rxjs/operators'; +import { of } from 'rxjs'; + +/** Imported Service Files Are., */ +import { AwsService } from '../../../AwsService/aws.service'; + +/** Consant Value For Created Date And Updated Date */ +const currentdate = new Date().toJSON().slice(0,19).replace('T',' '); + +/** Master Interface */ +export interface Master { + master_id:number; + master_name:string; + constant_name:string; +} + +@Injectable() + +export class PdTeamService { + + +private apiUrl = "http://ssa.sineedge.com/sparqapi/api/"; +//private apiUrl = "http://localhost/sparqapi/api/"; + + + constructor(private _http: HttpClient, + private _aws:AwsService) { } + + //headers:any = this._shared.headercofig(''); + + /** + * TO Add PdTeam Details using API Call + * 1st argument is "Records": any - Set of Data To Adding to database + */ + addPdTeamDetail(Records: any): Observable { + + Records.fk_createdby = this._aws.getlocale();//to get user id for who is created the Record + Records.createdon = currentdate;//to get Current date and Time for when the Record is created + // Records.fk_updatedby = this._aws.getlocale();//to get user id for who is update the record + // Records.updatedon = currentdate;//to get Current date and Time for when the Record is updated + + var ArrayData = { "records": Records } + +return this._http.post(this.apiUrl+"savePDTeam", ArrayData) +.pipe( + catchError(this.handleError('role', [])) + ) + + + } + + /** + * TO Edit Master Datas using API Call + * 1st argument is "Records": any - Set of Updated Data + */ + editPdTeamDetail(Records: any): Observable { + + Records.fk_updatedby = this._aws.getlocale();//to get user id for who is update the record + Records.updatedon = currentdate;//to get Current date and Time for when the Record is updated + + var ArrayData = { "records": Records } + + return this._http.post(this.apiUrl+'savePDTeam',ArrayData) + .pipe( + catchError(this.handleError('role', [])) + ) + + } + + + /** + * TO Inactive the Master Datas using API Call + * Note : Which means To delete The records + * 1st argument is "PrimaryKeyWithValue" : any - Primarykey and its value + * 2nd argument is "MasterName" :string - Table Name + */ + // deletePdTeamDetail(PrimaryKeyWithValue:any,MasterName:string): Observable { + + // //This "otherDatas" Array is common Argument For All Master + // let otherDatas:any = {isactive:0, + // fk_updatedby:this._aws.getlocale(), + // updatedon:currentdate} + + // //This "dataWithPrimaryKey" Array is Mergeing The 'PrimaryKeyWithValue' argument with otherDatas + // let dataWithPrimaryKey = Object.assign(otherDatas,PrimaryKeyWithValue); + + // var ArrayData = { "master_name":MasterName, + // "records":JSON.parse(JSON.stringify(dataWithPrimaryKey)) + // } + + // return this._http.post(this.apiUrl+'saveMaster',ArrayData).pipe( + // catchError(this.handleError('role', [])) + // ); + + // } + + //To delete PDTeam Mapping Details + deletePdTeamMapDetails(Records:any){ + Records.fk_updatedby = this._aws.getlocale();//to get user id for who is update the record + Records.updatedon = currentdate;//to get Current date and Time for when the Record is updated + + var ArrayData = { "records": [Records]}; + + // console.log(ArrayData); + // console.log('PdTeamMapDetails in service'); + + return this._http.post(this.apiUrl+"deletePdTeamMapping",ArrayData).pipe( + catchError(this.handleError('role', [])) + ); + + + } + + + IsactivePdTeamDetail(Records:any,MasterName:string): Observable { + //console.log('FromServiceRecords',Records); + Records.fk_updatedby = this._aws.getlocale();//to get user id for who is update the record + Records.updatedon = currentdate;//to get Current date and Time for when the Record is updated + + var ArrayData = { "master_name":MasterName, + "records": Records } + //console.log('FromServiceArrayData',ArrayData); + return this._http.post(this.apiUrl+"saveMaster", ArrayData) + .pipe( + catchError(this.handleError('role', [])) + ) + } + + /** + * TO Get the Master Datas using API Call + * 1st argument is "TableName" :string - Table Name + */ + getAllPdTeamList(): Observable { + + return this._http.get(this.apiUrl+"getListOfPDTeam") + .pipe( + catchError(this.handleError('role', [])) + ) + } + + + /** Get All PD Team Child Data using API call With master Keyword */ + getAllPdTeamMapList(Primarykey): Observable { + var pk = { "primary_key":Primarykey } + + //var Primar = Primarykey +//console.log('FromServiceArrayData',ArrayData); + + return this._http.post(this.apiUrl+'getListOfPDTeamMap',pk) + .pipe( + catchError(this.handleError('role', [])) + ) + } + + + + /** + * TO get City Data For Listing Screen + */ + getAllCity(): Observable { + + return this._http.get(this.apiUrl+'getListOfCity') + .pipe( + catchError(this.handleError('role', [])) + ) + +} + + + /** + * TO Handle The Error + */ + private handleError(operation = 'operation', result?: T) { + + return (error: any): Observable => { + return of(result as T); + }; +} + +} \ No newline at end of file diff --git a/ng6-seed/src/app/settings/service/user.service.ts b/ng6-seed/src/app/settings/service/user.service.ts index a41da7000..aad22e307 100644 --- a/ng6-seed/src/app/settings/service/user.service.ts +++ b/ng6-seed/src/app/settings/service/user.service.ts @@ -141,11 +141,21 @@ export class UserService { } + let pdtypeid:any; + let productid:any; + let pdteam:any; + let cust:any; + if(users.product != null && users.customer != null && users.pdteam !=null && users.pdtype !=null){ + pdtypeid = users.pdtype.pd_type_id; + productid = users.product.product_id; + pdteam = users.pdteam.pdteam_id; + cust = users.customer.customer_segment_id; + } let pdofficer = { - 'fk_pd_type_id':users.pdtype.pd_type_id, - 'fk_product_id':users.product.product_id, - 'fk_customer_segment':users.customer.customer_segment_id, - 'fk_team_id':users.pdteam.pdteam_id, + 'fk_pd_type_id':pdtypeid, + 'fk_product_id':productid, + 'fk_customer_segment':cust, + 'fk_team_id':pdteam, 'fk_user_id':users.userid }; @@ -213,5 +223,9 @@ export class UserService { return this.http.post(apiurl+'getUsersDetails',roles); } + + getprofilepic(users){ + return this.http.post('http://192.168.0.4:9999/AWSEC2/sparqapi/api/getSingedProfilePicURL',users); + } } diff --git a/ng6-seed/src/app/settings/settings.module.ts b/ng6-seed/src/app/settings/settings.module.ts index 373b4af7d..e36b8ecd2 100644 --- a/ng6-seed/src/app/settings/settings.module.ts +++ b/ng6-seed/src/app/settings/settings.module.ts @@ -26,14 +26,17 @@ import { RouterModule } from '@angular/router'; import { SettingsRoutes } from './settings.routing'; import { RegisterComponent } from '../session/register/register.component'; import { UserService } from './service/user.service'; -import { MastersModule } from './masters/masters.module'; +// import { MastersModule } from './masters/masters.module'; +// import { EntityModule } from './entity/entity.module'; +// import { AddEntityComponent } from './entity/add-entity/add-entity.component'; +// import { EditEntityComponent } from './entity/edit-entity/edit-entity.component'; +// import { EntityListComponent } from './entity/entity-list/entity-list.component'; // import { HttpClientModule } from '@angular/common/http'; @NgModule({ imports: [ CommonModule, RouterModule.forChild(SettingsRoutes),MatCardModule, - MastersModule, MatIconModule, MatInputModule, MatRadioModule, @@ -46,6 +49,8 @@ import { MastersModule } from './masters/masters.module'; providers:[ UserService - ] + ], + +// declarations: [AddEntityComponent, EditEntityComponent, EntityListComponent] }) export class SettingsModule { } diff --git a/ng6-seed/src/app/settings/settings.routing.ts b/ng6-seed/src/app/settings/settings.routing.ts index aa7e9bcbe..2897661fc 100644 --- a/ng6-seed/src/app/settings/settings.routing.ts +++ b/ng6-seed/src/app/settings/settings.routing.ts @@ -1,5 +1,6 @@ import { Routes } from '@angular/router'; import { MastersModule } from './masters/masters.module'; +//import { EntityModule } from './entity/entity.module'; export const SettingsRoutes: Routes = [{ path: '', @@ -9,6 +10,10 @@ export const SettingsRoutes: Routes = [{ },{ path:'mastermodule', loadChildren:'./masters/masters.module#MastersModule' - } + }, + // { + // path:'entitymodule', + // loadChildren:'./entity/entity.module#EntityModule' + // } ] -}] +}] \ No newline at end of file diff --git a/ng6-seed/src/app/settings/users/register/register.component.html b/ng6-seed/src/app/settings/users/register/register.component.html index ecc6daee6..2ae94c7d5 100755 --- a/ng6-seed/src/app/settings/users/register/register.component.html +++ b/ng6-seed/src/app/settings/users/register/register.component.html @@ -32,6 +32,8 @@ + +
Account Details

diff --git a/ng6-seed/src/app/settings/users/register/register.component.ts b/ng6-seed/src/app/settings/users/register/register.component.ts index 5e6359593..61a56b0c4 100755 --- a/ng6-seed/src/app/settings/users/register/register.component.ts +++ b/ng6-seed/src/app/settings/users/register/register.component.ts @@ -46,6 +46,8 @@ export class RegisterComponent implements OnInit { typeValue:any; lenderHierarchy:any; @ViewChild('allSelected') private allSelected: MatOption; + profileurl: any; + profileaccess: boolean; constructor( private router: Router, public fb: FormBuilder, public AWS: AwsService, private cd: ChangeDetectorRef ,private elementRef: ElementRef,public users:UserService) { } @@ -260,7 +262,7 @@ this.loader = true; if (this.users.localUserId != '' && this.users.localUserId != null && this.users.localUserId !== undefined) { this.usersData = this.users.localUserId; - + this.users.entityType().subscribe(res => { this.types = res; if (this.types.status == 200) { @@ -349,8 +351,19 @@ this.loader = true; this.regForm.controls['customer'].setValue(cust); } }); - - + let users= { + 'userid':this.usersData.userid, + 'entityid':this.usersData.fk_entity_id, + 'profilepic':this.usersData.profilepic + } + this.profileaccess = false; + this.users.getprofilepic(users).subscribe(res=>{ + this.profileurl = res; + if(this.profileurl.dataStatus == true){ + this.profileaccess = true; + this.profileurl = this.profileurl.records; + } + }) //console.log(userRole); @@ -392,7 +405,7 @@ this.loader = true; //console.log(role); userRole.push(this.roles.filter(roles => roles.GroupName == role.user_role)[0]); //console.log(userRole); - this.regForm.controls['role'].setValue(userRole); + this.regForm.controls['role'].setValue(userRole); } } diff --git a/ng6-seed/src/app/shared/menu-items/horizontal-menu-items.ts b/ng6-seed/src/app/shared/menu-items/horizontal-menu-items.ts index 618d5fd52..a1f82d488 100644 --- a/ng6-seed/src/app/shared/menu-items/horizontal-menu-items.ts +++ b/ng6-seed/src/app/shared/menu-items/horizontal-menu-items.ts @@ -81,7 +81,8 @@ const HORIZONTALMENUITEMS = [ type:'sub', icon:'settings', children:[ - {state:'mastermodule',name:'Master Details'} + {state:'mastermodule',name:'Master Details'}, + // {state:'entitymodule',name:'Entity Type'} ] }, // { diff --git a/ng6-seed/src/app/shared/menu-items/menu-items.ts b/ng6-seed/src/app/shared/menu-items/menu-items.ts index ebc3fe320..3b3c21b44 100644 --- a/ng6-seed/src/app/shared/menu-items/menu-items.ts +++ b/ng6-seed/src/app/shared/menu-items/menu-items.ts @@ -33,7 +33,8 @@ const MENUITEMS : Menu[] = [ icon:'settings', children:[ {state:'users',name:'User List'}, - {state:'mastermodule',name:'Master Details'} + {state:'mastermodule',name:'Master Details'}, + // {state:'entitymodule',name:'Entity Type'} ] }, {