From 30073db984086df9041fc53f2cabb52917b519b4 Mon Sep 17 00:00:00 2001 From: venbaSriram Date: Fri, 12 Oct 2018 13:38:50 +0530 Subject: [PATCH 1/5] User Management Change and PD Team Management by Sriram --- ng6-seed/package-lock.json | 48 +++---- ng6-seed/package.json | 1 + ng6-seed/src/app/AwsService/aws.service.ts | 107 ++++++++++------ .../pd-team-list/pd-team-list.component.html | 3 + .../pd-team-list/pd-team-list.component.ts | 5 +- .../pd-team-manage.component.html | 54 ++++++++ .../pd-team-manage.component.scss | 24 ++++ .../pd-team-manage.component.spec.ts | 25 ++++ .../pd-team-manage.component.ts | 120 ++++++++++++++++++ .../app/settings/pd-team/pd-team.module.ts | 9 +- .../app/settings/pd-team/pd-team.routing.ts | 4 + .../service/masters/pd-team.service.ts | 26 ++++ .../src/app/settings/service/user.service.ts | 6 +- .../users/register/register.component.html | 14 +- .../users/register/register.component.ts | 8 +- .../users/user-list/user-list.component.html | 28 +++- .../users/user-list/user-list.component.ts | 2 +- 17 files changed, 391 insertions(+), 93 deletions(-) create mode 100644 ng6-seed/src/app/settings/pd-team/pd-team-manage/pd-team-manage.component.html create mode 100644 ng6-seed/src/app/settings/pd-team/pd-team-manage/pd-team-manage.component.scss create mode 100644 ng6-seed/src/app/settings/pd-team/pd-team-manage/pd-team-manage.component.spec.ts create mode 100644 ng6-seed/src/app/settings/pd-team/pd-team-manage/pd-team-manage.component.ts diff --git a/ng6-seed/package-lock.json b/ng6-seed/package-lock.json index 31f7995ee..7119b427d 100644 --- a/ng6-seed/package-lock.json +++ b/ng6-seed/package-lock.json @@ -4273,8 +4273,7 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "aproba": { "version": "1.2.0", @@ -4295,14 +4294,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -4317,20 +4314,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -4447,8 +4441,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -4460,7 +4453,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -4475,7 +4467,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -4483,14 +4474,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -4509,7 +4498,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -4590,8 +4578,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -4603,7 +4590,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -4689,8 +4675,7 @@ "safe-buffer": { "version": "5.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -4726,7 +4711,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -4746,7 +4730,6 @@ "version": "3.0.1", "bundled": true, "dev": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -4790,14 +4773,12 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true } } }, @@ -9991,6 +9972,11 @@ "has-flag": "^3.0.0" } }, + "sweetalert2": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-7.28.4.tgz", + "integrity": "sha512-HEAfIAPactjB8CvgsJClxT+6wv2OGh/KkgvgJ8xR28uAXtx9BUQAlws1mruaS7Jzn8gIt6esx4BEZLaZSGvBZw==" + }, "symbol-observable": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", @@ -11377,4 +11363,4 @@ "integrity": "sha512-W9Nj+UmBJG251wkCacIkETgra4QgBo/vgoEkb4a2uoLzpQG7qF9nzwoLXWU5xj3Fg2mxGvEDh47mg24vXccYjA==" } } -} \ No newline at end of file +} diff --git a/ng6-seed/package.json b/ng6-seed/package.json index 299250298..77f4ff8ef 100644 --- a/ng6-seed/package.json +++ b/ng6-seed/package.json @@ -60,6 +60,7 @@ "screenfull": "^3.2.2", "simple-line-icons": "^2.4.1", "sortablejs": "^1.6.0", + "sweetalert2": "^7.28.4", "tether": "^1.4.0", "zone.js": "^0.8.26" }, diff --git a/ng6-seed/src/app/AwsService/aws.service.ts b/ng6-seed/src/app/AwsService/aws.service.ts index 221bb775c..36ddffe86 100755 --- a/ng6-seed/src/app/AwsService/aws.service.ts +++ b/ng6-seed/src/app/AwsService/aws.service.ts @@ -223,12 +223,12 @@ export class AwsService { let params: any; if (userGroup == 'ADMIN') { console.log(userdata); - if (userdata.fk_entity_id == 1) { + if (userdata.fk_entity_type_id == 1) { params = { UserPoolId: sineedgedev_poolData.UserPoolId, /* required */ Username: awsName /* required */ }; - } else if (userdata.fk_entity_id == 2) { + } else if (userdata.fk_entity_type_id == 2) { params = { UserPoolId: lender_poolData.UserPoolId, /* required */ Username: awsName /* required */ @@ -253,7 +253,7 @@ export class AwsService { adminenableUser(userdata, awsName) { let session:any = this.shared.getAccessToken() || ""; // this.getconfig(); - + console.log(userdata); let config = ""; AWS.config.region = "ap-south-1"; AWS.config.credentials = new AWS.CognitoIdentityCredentials({ @@ -271,13 +271,13 @@ export class AwsService { //cognitosdata = 7; let params: any; if (userGroup == 'ADMIN') { - console.log(userdata); - if (userdata.fk_entity_id == 1) { + + if (userdata.fk_entity_type_id == 1) { params = { UserPoolId: sineedgedev_poolData.UserPoolId, /* required */ Username: awsName /* required */ }; - } else if (userdata.fk_entity_id == 2) { + } else if (userdata.fk_entity_type_id == 2) { params = { UserPoolId: lender_poolData.UserPoolId, /* required */ Username: awsName /* required */ @@ -308,7 +308,7 @@ export class AwsService { )[0]; // (userGroup); if (userGroup == "ADMIN") { - if (userData.type.entity_type_id == 1) { + if (userData.type.fk_entity_type_id == 1) { params = { UserPoolId: sineedgedev_poolData.UserPoolId /* required */, Username: userData.email /* required */, @@ -331,7 +331,7 @@ export class AwsService { /* more items */ ] }; - } else if (userData.type.entity_type_id == 2) { + } else if (userData.type.fk_entity_type_id == 2) { console.log(2); params = { UserPoolId: lender_poolData.UserPoolId /* required */, @@ -355,7 +355,7 @@ export class AwsService { /* more items */ ] }; - }else if(userData.type.entity_type_id == 3){ + }else if(userData.type.fk_entity_type_id == 3){ params = { UserPoolId: vendor_poolData.UserPoolId /* required */, Username: userData.email /* required */, @@ -409,7 +409,7 @@ export class AwsService { //console.log(cognitodata); - + console.log(userData); this.getconfig(); //let cognitodata = "539bfefa-ae42-4bee-bf79-4b15d1a2af7f"; @@ -418,13 +418,20 @@ export class AwsService { let params: any; - + if(userData.userid === undefined){ params = { GroupName: "ADMIN" /* required */, UserPoolId: sineedgedev_poolData.UserPoolId,//"ap-south-1_y7dt3iEaX" /* required */, Username: cognitodata.User.Username //'539bfefa-ae42-4bee-bf79-4b15d1a2af7f' /* required */ }; - + }else + { + params = { + GroupName: "ADMIN" /* required */, + UserPoolId: sineedgedev_poolData.UserPoolId,//"ap-south-1_y7dt3iEaX" /* required */, + Username: userData.aws_name //'539bfefa-ae42-4bee-bf79-4b15d1a2af7f' /* required */ + }; + } //(params); return Observable.create(observe=>{ @@ -466,7 +473,7 @@ export class AwsService { //cognitosdata = 7; let params:any; if (userGroup == 'ADMIN') { - if(user.type.entity_type_id ==1){ + if(user.type.fk_entity_type_id ==1){ params = { UserAttributes: [ /* required */ { @@ -484,7 +491,7 @@ export class AwsService { UserPoolId: sineedgedev_poolData.UserPoolId, /* required */ Username: user.email /* required */ }; - }else if(user.type.entity_type_id ==2){ + }else if(user.type.fk_entity_type_id ==2){ params = { UserAttributes: [ /* required */ { @@ -558,6 +565,24 @@ export class AwsService { UserPoolId: lender_poolData.UserPoolId /* required */, Username: userData.aws_name /* required */, + UserAttributes: [ + { + Name: "email" /* required */, + Value: changeusers.email + }, + { + Name: "phone_number" /* required */, + Value: "+91" + changeusers.phone + } + /* more items */ + ] + }; + }else if(userData.fk_entity_type_id == 3) + { + params = { + UserPoolId: vendor_poolData.UserPoolId /* required */, + Username: userData.aws_name /* required */, + UserAttributes: [ { Name: "email" /* required */, @@ -581,34 +606,34 @@ export class AwsService { }) } } -adminremoveGroup(roles,users){ - console.log(roles); - console.log(users); - if(users !==undefined){ +// adminremoveGroup(roles,users){ +// console.log(roles); +// console.log(users); +// if(users !==undefined){ - let session:any = this.shared.getAccessToken() ||""; - this.getconfig(); - let params:any; - if(users.fk_entity_id ==1){ - params = { - GroupName: roles.GroupName, /* required */ - UserPoolId: sineedgedev_poolData.UserPoolId, /* required */ - Username: users.aws_name//'2c64866e-e96f-453b-903f-2b6f831688af' /* required */ - }; -}else if(users.fk_entity_id ==2){ - params = { - GroupName: roles.GroupName, /* required */ - UserPoolId: lender_poolData.UserPoolId, /* required */ - Username: users.aws_name//'2c64866e-e96f-453b-903f-2b6f831688af' /* required */ - }; -} - let cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider(); - cognitoidentityserviceprovider.adminRemoveUserFromGroup(params, function(err, data) { - if (err) console.log(err, err.stack); // an error occurred - else console.log(data); // successful response - }); -} -} +// let session:any = this.shared.getAccessToken() ||""; +// this.getconfig(); +// let params:any; +// if(users.fk_entity_type_id ==1){ +// params = { +// GroupName: roles.GroupName, /* required */ +// UserPoolId: sineedgedev_poolData.UserPoolId, /* required */ +// Username: users.aws_name//'2c64866e-e96f-453b-903f-2b6f831688af' /* required */ +// }; +// }else if(users.fk_entity_id ==2){ +// params = { +// GroupName: roles.GroupName, /* required */ +// UserPoolId: lender_poolData.UserPoolId, /* required */ +// Username: users.aws_name//'2c64866e-e96f-453b-903f-2b6f831688af' /* required */ +// }; +// } +// let cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider(); +// cognitoidentityserviceprovider.adminRemoveUserFromGroup(params, function(err, data) { +// if (err) console.log(err, err.stack); // an error occurred +// else console.log(data); // successful response +// }); +// } +// } adminresetpassword(awsuser){ this.getconfig(); diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html b/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html index 848631ed1..e7598cf3c 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html +++ b/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html @@ -18,6 +18,9 @@ +
+ +
diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.ts b/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.ts index 390529b82..b9455fbaa 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.ts +++ b/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.ts @@ -69,7 +69,10 @@ export class PdTeamListComponent implements OnInit { }); } - +/**To Manage Team */ +managepdteam(){ + this.router.navigate(['/setting/pdteam/pdteammanage']); +} changeListView(){ this.getPdTeam(); this.listView = true; diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-manage/pd-team-manage.component.html b/ng6-seed/src/app/settings/pd-team/pd-team-manage/pd-team-manage.component.html new file mode 100644 index 000000000..d30fab3a0 --- /dev/null +++ b/ng6-seed/src/app/settings/pd-team/pd-team-manage/pd-team-manage.component.html @@ -0,0 +1,54 @@ + + +
+
Manage PD Team
+ +
+
+
+ + +
+
+
+ +
+
+ + + + + {{pdteamdetails.team_name | titlecase}} info + +
+ {{pdteamdetails.short_name}} + +
+ + + + + +
+ {{ users.user_full_name |titlecase}} + +
+ + +
+
+ + +
+ + +
+
+ +
+
+
+
+ {{pdTeamManageData}} +
+
diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-manage/pd-team-manage.component.scss b/ng6-seed/src/app/settings/pd-team/pd-team-manage/pd-team-manage.component.scss new file mode 100644 index 000000000..38135d397 --- /dev/null +++ b/ng6-seed/src/app/settings/pd-team/pd-team-manage/pd-team-manage.component.scss @@ -0,0 +1,24 @@ + + .tooltip { + position: relative; + display: inline-block; + border-bottom: 1px dotted black; + } + + .tooltip .tooltiptext { + visibility: hidden; + width: 120px; + background-color: black; + color: #fff; + text-align: center; + border-radius: 6px; + padding: 5px 0; + + /* Position the tooltip */ + position: absolute; + z-index: 1; + } + + .tooltip:hover .tooltiptext { + visibility: visible; + } diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-manage/pd-team-manage.component.spec.ts b/ng6-seed/src/app/settings/pd-team/pd-team-manage/pd-team-manage.component.spec.ts new file mode 100644 index 000000000..e80ff730f --- /dev/null +++ b/ng6-seed/src/app/settings/pd-team/pd-team-manage/pd-team-manage.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PdTeamManageComponent } from './pd-team-manage.component'; + +describe('PdTeamManageComponent', () => { + let component: PdTeamManageComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ PdTeamManageComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PdTeamManageComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-manage/pd-team-manage.component.ts b/ng6-seed/src/app/settings/pd-team/pd-team-manage/pd-team-manage.component.ts new file mode 100644 index 000000000..1f8368b2a --- /dev/null +++ b/ng6-seed/src/app/settings/pd-team/pd-team-manage/pd-team-manage.component.ts @@ -0,0 +1,120 @@ +import { Output, EventEmitter,Component, OnInit,ViewEncapsulation, Directive, ViewChild } from '@angular/core'; +import { PdTeamService } from '../../service/masters/pd-team.service'; +import { DragulaService } from 'ng2-dragula'; + +/**sweet alert */ +import Swal from 'sweetalert2' +@Component({ + selector: 'app-pd-team-manage', + templateUrl: './pd-team-manage.component.html', + styleUrls: ['./pd-team-manage.component.scss'] +}) + +export class PdTeamManageComponent implements OnInit { + saveData: any; + viewpage:boolean = false; + pdTeamManageData:any; + pdTeamColor:any =[]; + pdTeamNewList:any = []; + transferData: any; + btnsave:boolean = true; + teamDetails:any = []; + loader:boolean = false; + mapDetails:any =[]; + @ViewChild('bag1') bag1: any; + constructor( public pdteammanage:PdTeamService,private dragulaService:DragulaService) { + this.getPDTeamManageDetails(); + this.getpdteamchange(); + + } + + ngOnInit() { + + } + + getPDTeamManageDetails() + { + this.loader = true; + this.pdteammanage.getPdTeam().subscribe(res=>{ + this.pdTeamManageData = res; + if(this.pdTeamManageData.dataStatus == true) + { + this.loader = false; + this.btnsave = true; + this.viewpage = true; + this.pdTeamManageData = this.pdTeamManageData.records; + + console.log(this.pdTeamManageData); + + }else + { + this.viewpage = false; + this.pdTeamManageData = "No Records Found"; + } + }) + } + + getpdteamchange(){ + let that = this; + + //console.log(this.bag1); + that.dragulaService.dropModel.subscribe((args: any) => { + + let [bagName, el, target, source] = args; + //console.log(el); + console.log(this.bag1.nativeElement); + console.log(this.bag1.nativeElement === target); + if(this.bag1.nativeElement){ // needed since dropModel triggers for all bags, not only on the dropped bag + console.log(this.bag1.nativeElement); + + let transferData:any = { + userid: el.dataset.id, + oldTeamName: source.dataset.id, + newTeamName: target.dataset.id, + oldIndex: el.dataset.index + } + console.log(el); + for(let i = 0; i < that.pdTeamManageData.length; i++){ + let users = that.pdTeamManageData[i].USERPROFILE; + for(let us of users){ + if(us.userid == transferData.userid){ + transferData.newIndex = i; + //console.log(transferData); + this.pdTeamNewList.push(transferData); + //console.log(that.transferData); + console.log(this.pdTeamNewList); + this.btnsave = false; + break; + } + } + } + + } + }); + + } + getnewTeamDetails(){ + if(this.pdTeamNewList.length ==0) + { + + }else{ + + + this.pdteammanage.savePdTeamManage(this.pdTeamNewList).subscribe(res=> + { + this.saveData = res; + if(this.saveData.dataStatus == true) + { + this.getPDTeamManageDetails(); + } + }) + } + } + cityinfo(id) { + Swal("
CITY:
"+this.pdTeamManageData[id].CITYMAP+'
'+"PRODUCTS: "+this.pdTeamManageData[id].PRODUCTS+"
"+"CS: "+this.pdTeamManageData[id].CUSTOMERSEGMENT+"..
"); + + + + +} +} diff --git a/ng6-seed/src/app/settings/pd-team/pd-team.module.ts b/ng6-seed/src/app/settings/pd-team/pd-team.module.ts index cc7958bc3..dac9173f9 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team.module.ts +++ b/ng6-seed/src/app/settings/pd-team/pd-team.module.ts @@ -3,6 +3,9 @@ import { RouterModule } from '@angular/router'; import { CommonModule } from '@angular/common'; import { NotifierModule, NotifierOptions } from 'angular-notifier'; import { FlexLayoutModule } from '@angular/flex-layout'; +import { PdTeamManageComponent } from './pd-team-manage/pd-team-manage.component'; +import {MatListModule} from '@angular/material/list'; + import { MatCardModule, MatIconModule, @@ -30,6 +33,7 @@ import { PdTeamRoutes } from './pd-team.routing'; /** Service */ import { PdTeamService } from '../service/masters/pd-team.service'; +import { DragulaModule } from 'ng2-dragula'; /** * Custom angular notifier options @@ -97,13 +101,14 @@ const customNotifierOptions: NotifierOptions = { NgxDatatableModule, MatSortModule, MatSlideToggleModule, - MatTooltipModule, + MatTooltipModule,MatListModule,DragulaModule, NotifierModule.withConfig(customNotifierOptions), ], declarations: [ PdTeamListComponent, PdTeamAddComponent, - PdTeamEditComponent], + PdTeamEditComponent, + PdTeamManageComponent], providers: [PdTeamService] diff --git a/ng6-seed/src/app/settings/pd-team/pd-team.routing.ts b/ng6-seed/src/app/settings/pd-team/pd-team.routing.ts index e792e720a..6c6fa741b 100755 --- a/ng6-seed/src/app/settings/pd-team/pd-team.routing.ts +++ b/ng6-seed/src/app/settings/pd-team/pd-team.routing.ts @@ -2,6 +2,7 @@ import { Routes } from '@angular/router'; import { PdTeamAddComponent } from '../pd-team/pd-team-add/pd-team-add.component'; import { PdTeamEditComponent } from '../pd-team/pd-team-edit/pd-team-edit.component'; import { PdTeamListComponent } from '../pd-team/pd-team-list/pd-team-list.component'; +import { PdTeamManageComponent } from './pd-team-manage/pd-team-manage.component'; export const PdTeamRoutes: Routes = [{ @@ -16,6 +17,9 @@ export const PdTeamRoutes: Routes = [{ },{ path:'editpdteam', component:PdTeamEditComponent + },{ + path:'pdteammanage', + component:PdTeamManageComponent }] }]; 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 index 1b339e139..dda5a7c98 100644 --- a/ng6-seed/src/app/settings/service/masters/pd-team.service.ts +++ b/ng6-seed/src/app/settings/service/masters/pd-team.service.ts @@ -215,5 +215,31 @@ return this._http.post(this.apiUrl+"savePDTeam", ArrayData) // catchError(this.handleError('role', [])) // ) // } +/** + * PD Team Manage + * sriram + */ +getPdTeam() +{ + return this._http.get(this.apiUrl+'getPdManage').pipe(catchError(this.handleError('role',[]))); +} +/** +* Save pd Team Manage +* sriram +*/ + +savePdTeamManage(teamDetails:any) +{ +let records = {records:{teamDetails,fk_updatedby:this._aws.getlocale(),updatedon :currentdate}}; + + + +// console.log(records); +return this._http.post(this.apiUrl+'savePdTeamManage',records); +} + +/** +* End of the function +*/ } \ 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 a3d4b5e40..47019ca84 100644 --- a/ng6-seed/src/app/settings/service/user.service.ts +++ b/ng6-seed/src/app/settings/service/user.service.ts @@ -150,8 +150,8 @@ export class UserService { let pdtypeid:any; let pdteam:any; - if(users.pdteam !=null && users.pdtype !=null){ - pdtypeid = users.pdtype.pd_type_id; + if(users.pdteam !=null){ + pdteam = users.pdteam.pdteam_id; @@ -161,7 +161,7 @@ export class UserService { userid = users.userid } let pdofficer = { - 'fk_pd_type_id':pdtypeid, + 'fk_team_id':pdteam, 'fk_user_id':userid 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 8eff3a4f4..23cc8171b 100755 --- a/ng6-seed/src/app/settings/users/register/register.component.html +++ b/ng6-seed/src/app/settings/users/register/register.component.html @@ -194,7 +194,7 @@ - +
UserProfile @@ -226,16 +226,16 @@
- + - - - + + +
- +
\ No newline at end of file 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 17e26be41..790abd315 100755 --- a/ng6-seed/src/app/settings/users/register/register.component.ts +++ b/ng6-seed/src/app/settings/users/register/register.component.ts @@ -10,7 +10,7 @@ import { MatOption } from '@angular/material'; import { UserService } from '../../service/user.service'; import { ifStmt } from '@angular/compiler/src/output/output_ast'; const pdoff = "PD Officer"; - +const pdexu = "PD Executive"; @Component({ selector: 'app-register', templateUrl: './register.component.html', @@ -232,9 +232,9 @@ this.loader = true; // this.roleAccess = false; // } // } - if (this.usersData != '' && this.usersData !==undefined || e.value.role_name == pdoff && enitiyid.entity_type_id == 1) { - console.log(e); - if(e.role_name == pdoff && enitiyid.entity_type_id == 1 || e.value.role_name == pdoff && enitiyid.entity_type_id == 1){ + if (this.usersData != '' && this.usersData !==undefined || e.value.role_name == pdoff && enitiyid.entity_type_id == 1 || e.value.role_name == pdexu && enitiyid.entity_type_id == 1) { + + if(e.role_name == pdoff && enitiyid.entity_type_id == 1 ||e.role_name == pdexu && enitiyid.entity_type_id == 1 || e.value.role_name == pdoff && enitiyid.entity_type_id == 1 || e.value.role_name == pdexu && enitiyid.entity_type_id == 1){ this.roleAccess = true; }else{ diff --git a/ng6-seed/src/app/settings/users/user-list/user-list.component.html b/ng6-seed/src/app/settings/users/user-list/user-list.component.html index cc5a4df7a..21a3e9a9d 100644 --- a/ng6-seed/src/app/settings/users/user-list/user-list.component.html +++ b/ng6-seed/src/app/settings/users/user-list/user-list.component.html @@ -36,12 +36,34 @@ Mobile No {{us.mobile_no}} - + + Roles + {{us.role_name}} + + + ENTITIES + {{us.entitytypename}} + Is Active - done - close + + + + + + diff --git a/ng6-seed/src/app/settings/users/user-list/user-list.component.ts b/ng6-seed/src/app/settings/users/user-list/user-list.component.ts index 6e6e4be5d..c9fafe84b 100644 --- a/ng6-seed/src/app/settings/users/user-list/user-list.component.ts +++ b/ng6-seed/src/app/settings/users/user-list/user-list.component.ts @@ -13,7 +13,7 @@ import { CognitoService } from '../../../AwsService/cognito.service'; export class UserListComponent implements OnInit { public dataLength: number; public dataSource = new MatTableDataSource(); - displayedColumns = ['SerialNo','FullName','Email','Mobile','Actions', 'IsActive']; + displayedColumns = ['SerialNo','FullName','Email','Mobile','Roles','Entity','Actions', 'IsActive']; @ViewChild(MatPaginator) paginator: MatPaginator; @ViewChild(MatSort) sort: MatSort; From 97c73093c5df6e17473a134050e39f769cc49c00 Mon Sep 17 00:00:00 2001 From: dineshkumarkannan Date: Fri, 12 Oct 2018 16:53:50 +0530 Subject: [PATCH 2/5] template master details view , listing design page : kdk --- .../templates/templates.service.spec.ts | 12 ++ .../service/templates/templates.service.ts | 9 + ng6-seed/src/app/template/template.module.ts | 8 +- .../edit-category.component.html | 38 ++++ .../edit-category.component.scss | 0 .../edit-category.component.spec.ts | 25 +++ .../edit-category/edit-category.component.ts | 103 +++++++++++ .../edit-lender/edit-lender.component.html | 46 +++++ .../edit-lender/edit-lender.component.scss | 0 .../edit-lender/edit-lender.component.spec.ts | 25 +++ .../edit/edit-lender/edit-lender.component.ts | 74 ++++++++ .../edit-question-answer.component.html | 100 ++++++++++ .../edit-question-answer.component.scss | 0 .../edit-question-answer.component.spec.ts | 25 +++ .../edit-question-answer.component.ts | 104 +++++++++++ .../edit/templates.edit.component.html | 78 +++----- .../edit/templates.edit.component.ts | 11 +- .../templates.list.component.html | 76 +++++++- .../templates.list.component.scss | 52 ++++++ .../templates.list.component.ts | 173 +++++++++++++++++- .../template/templates/templates.component.ts | 2 +- .../template/templates/templates.module.ts | 13 +- 22 files changed, 908 insertions(+), 66 deletions(-) create mode 100644 ng6-seed/src/app/template/service/templates/templates.service.spec.ts create mode 100644 ng6-seed/src/app/template/service/templates/templates.service.ts create mode 100644 ng6-seed/src/app/template/templates/templates-list/edit/edit-category/edit-category.component.html create mode 100644 ng6-seed/src/app/template/templates/templates-list/edit/edit-category/edit-category.component.scss create mode 100644 ng6-seed/src/app/template/templates/templates-list/edit/edit-category/edit-category.component.spec.ts create mode 100644 ng6-seed/src/app/template/templates/templates-list/edit/edit-category/edit-category.component.ts create mode 100644 ng6-seed/src/app/template/templates/templates-list/edit/edit-lender/edit-lender.component.html create mode 100644 ng6-seed/src/app/template/templates/templates-list/edit/edit-lender/edit-lender.component.scss create mode 100644 ng6-seed/src/app/template/templates/templates-list/edit/edit-lender/edit-lender.component.spec.ts create mode 100644 ng6-seed/src/app/template/templates/templates-list/edit/edit-lender/edit-lender.component.ts create mode 100644 ng6-seed/src/app/template/templates/templates-list/edit/edit-question-answer/edit-question-answer.component.html create mode 100644 ng6-seed/src/app/template/templates/templates-list/edit/edit-question-answer/edit-question-answer.component.scss create mode 100644 ng6-seed/src/app/template/templates/templates-list/edit/edit-question-answer/edit-question-answer.component.spec.ts create mode 100644 ng6-seed/src/app/template/templates/templates-list/edit/edit-question-answer/edit-question-answer.component.ts create mode 100644 ng6-seed/src/app/template/templates/templates-list/templates.list.component.scss diff --git a/ng6-seed/src/app/template/service/templates/templates.service.spec.ts b/ng6-seed/src/app/template/service/templates/templates.service.spec.ts new file mode 100644 index 000000000..1e482017f --- /dev/null +++ b/ng6-seed/src/app/template/service/templates/templates.service.spec.ts @@ -0,0 +1,12 @@ +import { TestBed } from '@angular/core/testing'; + +import { TemplatesService } from './templates.service'; + +describe('TemplatesService', () => { + beforeEach(() => TestBed.configureTestingModule({})); + + it('should be created', () => { + const service: TemplatesService = TestBed.get(TemplatesService); + expect(service).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/template/service/templates/templates.service.ts b/ng6-seed/src/app/template/service/templates/templates.service.ts new file mode 100644 index 000000000..875551de0 --- /dev/null +++ b/ng6-seed/src/app/template/service/templates/templates.service.ts @@ -0,0 +1,9 @@ +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root' +}) +export class TemplatesService { + + constructor() { } +} diff --git a/ng6-seed/src/app/template/template.module.ts b/ng6-seed/src/app/template/template.module.ts index 732349611..880c418bf 100644 --- a/ng6-seed/src/app/template/template.module.ts +++ b/ng6-seed/src/app/template/template.module.ts @@ -8,7 +8,10 @@ import { MatRadioModule, MatButtonModule,MatTableModule,MatPaginatorModule, MatProgressBarModule,MatDialogModule, MatSortModule, - MatToolbarModule,MatSelectModule } from '@angular/material'; + MatToolbarModule,MatSelectModule, +MatListModule, MatMenuModule, + MatCheckboxModule, MatStepperModule, MatTabsModule, + MatExpansionModule } from '@angular/material'; import {MatSlideToggleModule} from '@angular/material/slide-toggle'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FileUploadModule } from 'ng2-file-upload/ng2-file-upload'; @@ -44,6 +47,9 @@ import { MastersService } from './service/masters/masters.service'; MatButtonModule,MatTableModule,MatPaginatorModule, MatProgressBarModule,MatDialogModule, MatSortModule, MatToolbarModule,MatSelectModule, + MatListModule, MatMenuModule, + MatCheckboxModule, MatStepperModule, MatTabsModule, + MatExpansionModule , FormsModule,ReactiveFormsModule, // HttpClientModule, ], diff --git a/ng6-seed/src/app/template/templates/templates-list/edit/edit-category/edit-category.component.html b/ng6-seed/src/app/template/templates/templates-list/edit/edit-category/edit-category.component.html new file mode 100644 index 000000000..217c94345 --- /dev/null +++ b/ng6-seed/src/app/template/templates/templates-list/edit/edit-category/edit-category.component.html @@ -0,0 +1,38 @@ +
+
+ + +
+
+
+ + + {{ category.name }} + + + +
+
+ + + % +
+
+ + +
+
+ + +
+
+
+
+
+
+
+ + +
+
\ No newline at end of file diff --git a/ng6-seed/src/app/template/templates/templates-list/edit/edit-category/edit-category.component.scss b/ng6-seed/src/app/template/templates/templates-list/edit/edit-category/edit-category.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/ng6-seed/src/app/template/templates/templates-list/edit/edit-category/edit-category.component.spec.ts b/ng6-seed/src/app/template/templates/templates-list/edit/edit-category/edit-category.component.spec.ts new file mode 100644 index 000000000..962cea890 --- /dev/null +++ b/ng6-seed/src/app/template/templates/templates-list/edit/edit-category/edit-category.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { EditCategoryComponent } from './edit-category.component'; + +describe('EditCategoryComponent', () => { + let component: EditCategoryComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ EditCategoryComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(EditCategoryComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/template/templates/templates-list/edit/edit-category/edit-category.component.ts b/ng6-seed/src/app/template/templates/templates-list/edit/edit-category/edit-category.component.ts new file mode 100644 index 000000000..2687c5cf1 --- /dev/null +++ b/ng6-seed/src/app/template/templates/templates-list/edit/edit-category/edit-category.component.ts @@ -0,0 +1,103 @@ +import { Component, ViewChild, OnInit, OnDestroy, Input } from '@angular/core'; +import { MatPaginator, MatSort, MatTableDataSource, MatDialog, PageEvent } from '@angular/material'; +import { FormGroup, FormControl, FormBuilder, Validators , FormArray} from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import { DataSource } from '@angular/cdk/table'; +import { Observable } from 'rxjs/Observable'; + +@Component({ + selector: 'app-template-edit-category', + templateUrl: './edit-category.component.html', + styleUrls: ['./edit-category.component.scss'] +}) +export class EditCategoryComponent implements OnInit, OnDestroy { + + @Input() questionId: number; + + public _editTempCategoryFrom: FormGroup; + public submitted = false; + constructor( + private _formBuilder: FormBuilder, + public dialog: MatDialog) { + } + + + ngOnInit() { + this.initalLoadFormData(); + if(this.categoryList.length > 0){ + for (let val of this.categoryList) { + // alert(JSON.stringify(val)); + let vals = val; + this.addLanguage(vals['fk_category_id'], vals['name'], vals['weightage'], null); + } + } + } + + initalLoadFormData(){ + this._editTempCategoryFrom = this._formBuilder.group({ + temp_category: this._formBuilder.array([ + // this.initAnswers(), + ]) + }) + } + + // convenience getter for easy access to form fields + get f() { return this._editTempCategoryFrom.controls; } + + public m_categoryList = [{ + fk_category_id: 1, + name: 'Category List 1', + weightage: 2, + },{ + fk_category_id: 2, + name: 'Category List 2', + weightage: 5, + },{ + fk_category_id: 3, + name: 'Category List 2', + weightage: 5, + }]; + + public categoryList = [{ + fk_category_id: 1, + name: 'Category List 1', + weightage: 2, + },{ + fk_category_id: 2, + name: 'Category List 2', + weightage: 5, + }]; + + // Dynamic Form field creation Functionality : START ===> + initAnswers(fk_cat_id, name, weightage) { + return this._formBuilder.group({ + fk_category_id: [fk_cat_id, Validators.compose([Validators.required])], + name: [name, Validators.compose([Validators.required])], + weightage: [weightage, Validators.compose([Validators.required])], + }); + } + addLanguage(fk_cat_id, name, weightage, e) { + const control = this._editTempCategoryFrom.controls['temp_category']; + control.push(this.initAnswers(fk_cat_id, name, weightage)); + } + removeLanguage(i: number) { + const control = this._editTempCategoryFrom.controls['temp_category']; + control.removeAt(i); + } + + // END ===> + + + /** To Save/Edited Popup Data */ + onSubmit() { + this.submitted = true; + // stop here if form is invalid + } + + ngOnDestroy(): void { + //Called once, before the instance is destroyed. + //Add 'implements OnDestroy' to the class. + } + + +} diff --git a/ng6-seed/src/app/template/templates/templates-list/edit/edit-lender/edit-lender.component.html b/ng6-seed/src/app/template/templates/templates-list/edit/edit-lender/edit-lender.component.html new file mode 100644 index 000000000..af969774d --- /dev/null +++ b/ng6-seed/src/app/template/templates/templates-list/edit/edit-lender/edit-lender.component.html @@ -0,0 +1,46 @@ +
+
+
+
+
+ + + {{ enti.name }} + + You must Select Lender Type. + + + + + {{ enti.name }} + + You must Select Product. + + + + + {{ enti.name }} + + You must Select Category Segment. + + + + + + +
+
+
+ +
+
+ + +
+
\ No newline at end of file diff --git a/ng6-seed/src/app/template/templates/templates-list/edit/edit-lender/edit-lender.component.scss b/ng6-seed/src/app/template/templates/templates-list/edit/edit-lender/edit-lender.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/ng6-seed/src/app/template/templates/templates-list/edit/edit-lender/edit-lender.component.spec.ts b/ng6-seed/src/app/template/templates/templates-list/edit/edit-lender/edit-lender.component.spec.ts new file mode 100644 index 000000000..7a62261c3 --- /dev/null +++ b/ng6-seed/src/app/template/templates/templates-list/edit/edit-lender/edit-lender.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { EditLenderComponent } from './edit-lender.component'; + +describe('EditLenderComponent', () => { + let component: EditLenderComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ EditLenderComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(EditLenderComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/template/templates/templates-list/edit/edit-lender/edit-lender.component.ts b/ng6-seed/src/app/template/templates/templates-list/edit/edit-lender/edit-lender.component.ts new file mode 100644 index 000000000..7c8ba8437 --- /dev/null +++ b/ng6-seed/src/app/template/templates/templates-list/edit/edit-lender/edit-lender.component.ts @@ -0,0 +1,74 @@ +import { Component, ViewChild, OnInit, OnDestroy, Input } from '@angular/core'; +import { MatPaginator, MatSort, MatTableDataSource, MatDialog, PageEvent } from '@angular/material'; +import { FormGroup, FormControl, FormBuilder, Validators , FormArray} from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import { DataSource } from '@angular/cdk/table'; +import { Observable } from 'rxjs/Observable'; + +@Component({ + selector: 'app-template-edit-lender', + templateUrl: './edit-lender.component.html', + styleUrls: ['./edit-lender.component.scss'] +}) +export class EditLenderComponent implements OnInit { + + + @Input() questionId: number; + + public _editTempLenderFrom: FormGroup; + public submitted = false; + constructor( + private _formBuilder: FormBuilder) { + } + + ngOnInit() { + this._editTempLenderFrom = this._formBuilder.group({ + temp_lender: this._formBuilder.array([ + this.initAnswers(), + ]) + }) + } + + // convenience getter for easy access to form fields + get f() { return this._editTempLenderFrom.controls; } + + + public entityOptions = [{ + fk_lender_id: 1, + name: 'Lender1' + },{ + fk_lender_id: 2, + name: 'Lender2' + }]; + + // Dynamic Form field creation Functionality : START ===> + initAnswers() { + return this._formBuilder.group({ + fk_lender_id: ['', Validators.compose([Validators.required])], + fk_product_id: ['', Validators.compose([Validators.required])], + fk_category_segment_id: ['', Validators.compose([Validators.required])], + }); + } + addLanguage(e) { + const control = this._editTempLenderFrom.controls['temp_lender']; + control.push(this.initAnswers()); + } + removeLanguage(i: number) { + const control = this._editTempLenderFrom.controls['temp_lender']; + control.removeAt(i); + } + + // END ===> + + + /** To Save/Edited Popup Data */ + onSubmit() { + this.submitted = true; + // stop here if form is invalid + } + + ngOnDestroy(): void { + //Called once, before the instance is destroyed. + //Add 'implements OnDestroy' to the class. + } +} diff --git a/ng6-seed/src/app/template/templates/templates-list/edit/edit-question-answer/edit-question-answer.component.html b/ng6-seed/src/app/template/templates/templates-list/edit/edit-question-answer/edit-question-answer.component.html new file mode 100644 index 000000000..c8a3175eb --- /dev/null +++ b/ng6-seed/src/app/template/templates/templates-list/edit/edit-question-answer/edit-question-answer.component.html @@ -0,0 +1,100 @@ + + + + + + + Category 1 + + + 50% + + + + + + + + + Category 2 + + + 50% + + +

I'm visible because I am open

+
+
+
diff --git a/ng6-seed/src/app/template/templates/templates-list/edit/edit-question-answer/edit-question-answer.component.scss b/ng6-seed/src/app/template/templates/templates-list/edit/edit-question-answer/edit-question-answer.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/ng6-seed/src/app/template/templates/templates-list/edit/edit-question-answer/edit-question-answer.component.spec.ts b/ng6-seed/src/app/template/templates/templates-list/edit/edit-question-answer/edit-question-answer.component.spec.ts new file mode 100644 index 000000000..f9cb80e43 --- /dev/null +++ b/ng6-seed/src/app/template/templates/templates-list/edit/edit-question-answer/edit-question-answer.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { EditQuestionAnswerComponent } from './edit-question-answer.component'; + +describe('EditQuestionAnswerComponent', () => { + let component: EditQuestionAnswerComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ EditQuestionAnswerComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(EditQuestionAnswerComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/template/templates/templates-list/edit/edit-question-answer/edit-question-answer.component.ts b/ng6-seed/src/app/template/templates/templates-list/edit/edit-question-answer/edit-question-answer.component.ts new file mode 100644 index 000000000..7c53dca47 --- /dev/null +++ b/ng6-seed/src/app/template/templates/templates-list/edit/edit-question-answer/edit-question-answer.component.ts @@ -0,0 +1,104 @@ +import { Component, ViewChild, OnInit, OnDestroy, Input } from '@angular/core'; +import { MatPaginator, MatSort, MatTableDataSource, MatDialog, PageEvent } from '@angular/material'; +import { FormGroup, FormControl, FormBuilder, Validators , FormArray} from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import { DataSource } from '@angular/cdk/table'; +import { Observable } from 'rxjs/Observable'; + +@Component({ + selector: 'app-template-edit-question-answer', + templateUrl: './edit-question-answer.component.html', + styleUrls: ['./edit-question-answer.component.scss'] +}) +export class EditQuestionAnswerComponent implements OnInit { + + + @Input() questionId: number; + + public _editTempCategoryFrom: FormGroup; + public submitted = false; + public panelOpenState : boolean; + constructor( + private _formBuilder: FormBuilder, + public dialog: MatDialog) { + } + + + ngOnInit() { + this.initalLoadFormData(); + if(this.categoryList.length > 0){ + for (let val of this.categoryList) { + // alert(JSON.stringify(val)); + let vals = val; + this.addLanguage(vals['fk_category_id'], vals['name'], vals['weightage'], null); + } + } + } + + initalLoadFormData(){ + this._editTempCategoryFrom = this._formBuilder.group({ + temp_category: this._formBuilder.array([ + // this.initAnswers(), + ]) + }) + } + + // convenience getter for easy access to form fields + get f() { return this._editTempCategoryFrom.controls; } + + public m_categoryList = [{ + fk_category_id: 1, + name: 'Category List 1', + weightage: 2, + },{ + fk_category_id: 2, + name: 'Category List 2', + weightage: 5, + },{ + fk_category_id: 3, + name: 'Category List 2', + weightage: 5, + }]; + + public categoryList = [{ + fk_category_id: 1, + name: 'Category List 1', + weightage: 2, + },{ + fk_category_id: 2, + name: 'Category List 2', + weightage: 5, + }]; + + // Dynamic Form field creation Functionality : START ===> + initAnswers(fk_cat_id, name, weightage) { + return this._formBuilder.group({ + fk_category_id: [fk_cat_id, Validators.compose([Validators.required])], + name: [name, Validators.compose([Validators.required])], + weightage: [weightage, Validators.compose([Validators.required])], + }); + } + addLanguage(fk_cat_id, name, weightage, e) { + const control = this._editTempCategoryFrom.controls['temp_category']; + control.push(this.initAnswers(fk_cat_id, name, weightage)); + } + removeLanguage(i: number) { + const control = this._editTempCategoryFrom.controls['temp_category']; + control.removeAt(i); + } + + // END ===> + + + /** To Save/Edited Popup Data */ + onSubmit() { + this.submitted = true; + // stop here if form is invalid + } + + ngOnDestroy(): void { + //Called once, before the instance is destroyed. + //Add 'implements OnDestroy' to the class. + } + +} diff --git a/ng6-seed/src/app/template/templates/templates-list/edit/templates.edit.component.html b/ng6-seed/src/app/template/templates/templates-list/edit/templates.edit.component.html index a2d2f3f4e..abf8dcde4 100644 --- a/ng6-seed/src/app/template/templates/templates-list/edit/templates.edit.component.html +++ b/ng6-seed/src/app/template/templates/templates-list/edit/templates.edit.component.html @@ -1,56 +1,38 @@ + -
-

{{pageTitle}}

-
-
+
-
-
-
+
Template Name
+
+ +
- - You must Include Pan Number. - -
+ + + +
+ + +
+
+
- - - - -
- Fill out your name - - - -
- -
-
-
- -
- Fill out your address - - - -
- - -
-
-
- - Done - You are now done. -
- - -
-
-
+ + + + + + + + + + + + + + + diff --git a/ng6-seed/src/app/template/templates/templates-list/edit/templates.edit.component.ts b/ng6-seed/src/app/template/templates/templates-list/edit/templates.edit.component.ts index 6881ca31f..9f15b1428 100644 --- a/ng6-seed/src/app/template/templates/templates-list/edit/templates.edit.component.ts +++ b/ng6-seed/src/app/template/templates/templates-list/edit/templates.edit.component.ts @@ -16,11 +16,14 @@ import { TemplateListComponent } from './../templates.list.component'; templateUrl: './templates.edit.component.html' }) export class TemplateEditComponent implements OnInit, OnDestroy { - public pageTitle: string = "Edit Template"; + public pageTitle: string = "Edit Template"; + public question_id : number; + public submitted: boolean = false; constructor( private route: ActivatedRoute, private router: Router, private templateListComponent : TemplateListComponent) { + this.question_id = this.route.snapshot.params['question-id']; } ngOnInit() { @@ -32,6 +35,12 @@ export class TemplateEditComponent implements OnInit, OnDestroy { this.router.navigate([ '../../' ], { relativeTo: this.route }); } + /** To Save/Edited Popup Data */ + onSubmit() { + this.submitted = true; + // stop here if form is invalid + } + ngOnDestroy(): void { //Called once, before the instance is destroyed. //Add 'implements OnDestroy' to the class. diff --git a/ng6-seed/src/app/template/templates/templates-list/templates.list.component.html b/ng6-seed/src/app/template/templates/templates-list/templates.list.component.html index efc3cdd58..ab73ed692 100644 --- a/ng6-seed/src/app/template/templates/templates-list/templates.list.component.html +++ b/ng6-seed/src/app/template/templates/templates-list/templates.list.component.html @@ -1,11 +1,73 @@
- - - - + + +
+ + +
+
Template Master
+
List of Templates
+
+
+
+ +
+
+ + +
+
+
+ +
+ +
+ +
+ +
+
+ {{ template.template_name }} +
+
+
+ {{lender.full_name}} - {{lender.product_name}} - {{lender.customer_segment_name}} , +
+
+
+
+
+ +
+
+
+
+
+ +
No Record Found ...
+
+ + + +
+
+ + -
+
- -
\ No newline at end of file + +
+ + + \ No newline at end of file diff --git a/ng6-seed/src/app/template/templates/templates-list/templates.list.component.scss b/ng6-seed/src/app/template/templates/templates-list/templates.list.component.scss new file mode 100644 index 000000000..fa863a272 --- /dev/null +++ b/ng6-seed/src/app/template/templates/templates-list/templates.list.component.scss @@ -0,0 +1,52 @@ +// mat table css + +.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; +} + +.text-line-limit { + text-overflow: ellipsis; + overflow: hidden; + // white-space: nowrap; + display: -webkit-box; + line-height: 16px; /* fallback */ + max-height: 32px; /* fallback */ + -webkit-line-clamp: 2; /* number of lines to show */ + -webkit-box-orient: vertical; + + // text-overflow: ellipsis; + // overflow: hidden; + // width: 160px; + // height: 1.2em; + // white-space: nowrap; +} + +.category-label { + padding: 2px 6px; + background: #629cff; + color: #fff; + box-shadow: 0 2px 3px #c8bbbb; +} + +.no-record-found { + font-size: 18px; + color: #03a9f4; + padding : 12px 8px; +} \ No newline at end of file diff --git a/ng6-seed/src/app/template/templates/templates-list/templates.list.component.ts b/ng6-seed/src/app/template/templates/templates-list/templates.list.component.ts index 6062bc415..12501d0ab 100644 --- a/ng6-seed/src/app/template/templates/templates-list/templates.list.component.ts +++ b/ng6-seed/src/app/template/templates/templates-list/templates.list.component.ts @@ -11,25 +11,81 @@ import { Observable } from 'rxjs/Observable'; */ @Component({ selector: 'app-list', + styleUrls: ['./templates.list.component.scss'], templateUrl: './templates.list.component.html' }) export class TemplateListComponent implements OnInit, OnDestroy { - public listView: boolean = true; + + public templateList = []; + public listView: boolean; public names: string; + public noTemplMasterRecrdFound: boolean = false; + + // pagination variable details + length = 50; + pageIndex = 0; + pageSize = 10; + pageEvent: PageEvent; + + // data source variable details + templateListData = null; + public dataLength: number; + public dataSource = new MatTableDataSource(); + displayedColumns = ['categroy_name', 'question', 'actions']; + + @ViewChild(MatPaginator) paginator: MatPaginator; + @ViewChild(MatSort) sort: MatSort; + constructor( private route: ActivatedRoute, private router: Router) { + this.listView = true; // this.names = 'dinesh'; } ngOnInit() { - // alert(1); - alert(); this.listView = true; + this.getTemplateMastersListDetails(); + } + + + // get question master list details + getTemplateMastersListDetails() { + this.templateList = this.m_templateList.records; + this.templateListData = this.m_templateList.records; + this.dataLength = this.m_templateList.records.length; + this.dataSource.data = this.templateListData; + + // this.noTemplMasterRecrdFound = false; + // this.search_cid = this.filterFormGroupCtrl.controls.category.value; + // console.log(this.search_cid + ", " + this.filterFormGroupCtrl); + // this.questionsService.getQuestionMasterDetails(this.search_cid).subscribe( + // data => { + // if (data) { + // if (data.records) { + // this.templateList = data.records; + // this.templateListData = data.records; + // this.dataLength = data.records.length; + // this.dataSource.data = this.templateListData; + // } else { + // this.templateList = []; + // this.dataLength = null; + // this.noTemplMasterRecrdFound = true; + // } + // } else { + // this.templateList = []; + // this.dataLength = null; + // this.noTemplMasterRecrdFound = true; + // } + // } + // ) } - goToEdit(){ - this.router.navigate([ '../list/edit', '1' ], { relativeTo: this.route }); + + + + goToEdit(template_id : number){ + this.router.navigate([ '../list/edit', template_id ], { relativeTo: this.route }); this.listView = false; } @@ -41,7 +97,112 @@ export class TemplateListComponent implements OnInit, OnDestroy { ngOnDestroy(): void { //Called once, before the instance is destroyed. //Add 'implements OnDestroy' to the class. - alert(); } + + public m_templateList = { + "dataStatus": true, + "status": 200, + "records": + [ + { + "template_id": "1", + "template_name": "sample dev template", + "createdon": "28/09/2018", + "fk_createdby": "1", + "updatedon": null, + "fk_updatedby": null, + "isactive": "1", + "createdby": "sriram v", + "updatedby": null, + "lender_details": [] + }, + { + "template_id": "2", + "template_name": "two template", + "createdon": "28/09/2018", + "fk_createdby": "1", + "updatedon": null, + "fk_updatedby": null, + "isactive": "1", + "createdby": "sriram v", + "updatedby": null, + "lender_details": [] + }, + { + "template_id": "3", + "template_name": "ABCD template redd", + "createdon": "11/10/2018", + "fk_createdby": "1", + "updatedon": null, + "fk_updatedby": null, + "isactive": "1", + "createdby": "sriram v", + "updatedby": null, + "lender_details": [ + { + "template_lender_map_id": "1", + "fk_template_id": "3", + "fk_lender_id": "1", + "full_name": "ICICIedited", + "short_name": "checkee", + "fk_product_id": "1", + "product_name": "Home Loan ", + "product_abbr": "HL", + "fk_customer_segment": "1", + "customer_segment_name": "Salaried Non Professional ", + "customer_segment_abbr": "SNP", + "createdon": "11/10/2018", + "fk_createdby": "1", + "updatedon": null, + "isactive": "1", + "fk_updatedby": null, + "createdby": "sriram v", + "updatedby": null + }, + { + "template_lender_map_id": "2", + "fk_template_id": "3", + "fk_lender_id": "1", + "full_name": "ICICIedited", + "short_name": "checkee", + "fk_product_id": "2", + "product_name": "Non Residential Premises Loans", + "product_abbr": "NRPL", + "fk_customer_segment": "2", + "customer_segment_name": "Salaried Professional ", + "customer_segment_abbr": "SP", + "createdon": "11/10/2018", + "fk_createdby": "1", + "updatedon": "11/10/2018", + "isactive": "1", + "fk_updatedby": null, + "createdby": "sriram v", + "updatedby": null + }, + { + "template_lender_map_id": "2", + "fk_template_id": "3", + "fk_lender_id": "1", + "full_name": "ICICIedited", + "short_name": "checkee", + "fk_product_id": "2", + "product_name": "Non Residential Premises Loans", + "product_abbr": "NRPL", + "fk_customer_segment": "2", + "customer_segment_name": "Salaried Professional ", + "customer_segment_abbr": "SP", + "createdon": "11/10/2018", + "fk_createdby": "1", + "updatedon": "11/10/2018", + "isactive": "1", + "fk_updatedby": null, + "createdby": "sriram v", + "updatedby": null + } + ] + } + ] +} + } diff --git a/ng6-seed/src/app/template/templates/templates.component.ts b/ng6-seed/src/app/template/templates/templates.component.ts index ace2651e4..4440478d4 100644 --- a/ng6-seed/src/app/template/templates/templates.component.ts +++ b/ng6-seed/src/app/template/templates/templates.component.ts @@ -1,6 +1,6 @@ import { Component } from '@angular/core'; @Component({ - template: `

Templates Master Details List

+ template: `
diff --git a/ng6-seed/src/app/template/templates/templates.module.ts b/ng6-seed/src/app/template/templates/templates.module.ts index f7ca24067..a7c1b6938 100644 --- a/ng6-seed/src/app/template/templates/templates.module.ts +++ b/ng6-seed/src/app/template/templates/templates.module.ts @@ -12,7 +12,8 @@ import { MatProgressBarModule,MatDialogModule, MatSortModule, MatToolbarModule,MatSelectModule, MatListModule, MatMenuModule, - MatCheckboxModule, MatStepperModule + MatCheckboxModule, MatStepperModule, MatTabsModule, + MatExpansionModule } from '@angular/material'; import {MatSlideToggleModule} from '@angular/material/slide-toggle'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; @@ -24,6 +25,9 @@ import { TemplatesRouting } from './templates.routing'; import { TemplatesComponent } from './templates.component'; import { TemplateListComponent } from './templates-list/templates.list.component'; import { TemplateEditComponent } from './templates-list/edit/templates.edit.component'; +import { EditCategoryComponent } from './templates-list/edit/edit-category/edit-category.component'; +import { EditLenderComponent } from './templates-list/edit/edit-lender/edit-lender.component'; +import { EditQuestionAnswerComponent } from './templates-list/edit/edit-question-answer/edit-question-answer.component'; // import { QuestionsService } from './../service/questions/questions.service'; /* @@ -86,7 +90,9 @@ const customNotifierOptions: NotifierOptions = { MatButtonModule,MatTableModule,MatPaginatorModule, MatProgressBarModule,MatDialogModule, MatSortModule, MatToolbarModule,MatSelectModule,MatListModule, MatMenuModule, + MatExpansionModule, MatStepperModule, + MatTabsModule, MatSlideToggleModule, MatCheckboxModule, FormsModule, @@ -96,7 +102,10 @@ const customNotifierOptions: NotifierOptions = { declarations: [ TemplatesComponent, TemplateListComponent, - TemplateEditComponent + TemplateEditComponent, + EditCategoryComponent, + EditLenderComponent, + EditQuestionAnswerComponent ], entryComponents: [ ], From 5b1d626ba229956079539ffc6ce0f7b5410057a6 Mon Sep 17 00:00:00 2001 From: saravanakumarkandasami Date: Fri, 12 Oct 2018 16:56:45 +0530 Subject: [PATCH 3/5] UI changes --- .../app/dashboard/dashboard.component.html | 172 +++++++++++++++++- .../src/app/dashboard/dashboard.component.ts | 53 ++++++ .../branch-dialog.component.html | 6 +- .../branch-list/branch-list.component.html | 2 +- .../city-dialog/city-dialog.component.html | 6 +- ...comments-on-locality-dialog.component.html | 2 +- .../company-dialog.component.html | 24 +-- .../customer-behaviour-dialog.component.html | 2 +- .../customer-segment-dialog.component.html | 4 +- .../designation-dialog.component.html | 4 +- .../frequency-dialog.component.html | 2 +- ...ustry_classification-dialog.component.html | 2 +- .../lender-hierarchy-dialog.component.html | 2 +- .../members-occupation-dialog.component.html | 2 +- ...pd-location-approach-dialog.component.html | 4 +- .../pd-type-dialog.component.html | 4 +- .../product-dialog.component.html | 4 +- .../question-category-dialog.component.html | 2 +- .../regions-dialog.component.html | 2 +- .../relation-ship-dialog.component.html | 2 +- .../states-dialog.component.html | 8 +- .../sub-product-dialog.component.html | 6 +- .../title-dialog/title-dialog.component.html | 2 +- .../activity-dialog.component.html | 2 +- .../uom/uom-dialog/uom-dialog.component.html | 2 +- .../service/masters/pd-team.service.ts | 4 +- .../users/user-list/user-list.component.html | 6 +- .../users/user-list/user-list.component.ts | 9 +- 28 files changed, 280 insertions(+), 60 deletions(-) diff --git a/ng6-seed/src/app/dashboard/dashboard.component.html b/ng6-seed/src/app/dashboard/dashboard.component.html index 6b07abff7..d02b0aefb 100644 --- a/ng6-seed/src/app/dashboard/dashboard.component.html +++ b/ng6-seed/src/app/dashboard/dashboard.component.html @@ -1,5 +1,171 @@
-

- Dashboard! -

+
+
+ +
+
+

PD Triggered

+
+
+
+

Full PD

+

13

+
+
+

Smart PD

+

13

+
+
+
+
+
+
+ +
+
+

PD Allocated

+
+
+
+

Full PD

+

33

+
+
+

Smart PD

+

5

+
+
+
+
+
+
+ +
+
+

PD Scheduled

+
+
+
+

Full PD

+

20

+
+
+

Smart PD

+

6

+
+
+
+
+
+
+ +
+
+ +
+
+

PD Progress

+
+
+
+

Full PD

+

34

+
+
+

Smart PD

+

9

+
+
+
+
+
+
+ +
+
+

PD Completed

+
+
+
+

Full PD

+

65

+
+
+

Smart PD

+

24

+
+
+
+
+
+
+ +
+
+

QC Completed

+
+
+
+

Full PD

+

47

+
+
+

Smart PD

+

29

+
+
+
+
+
+
+ +
+
+ + Lender + PD Triggered Today +
+ + + +

{{item.lendername}} / {{item.billingaddr}}

+

Full PD -{{item.fullpd}} / Smart PD -{{item.smartpd}}

+
+
+
+
+
+
+ + Citywise + PD Triggered Today +
+ + + +

{{item.cityname}}

+

Full PD -{{item.fullpd}} / Smart PD -{{item.smartpd}}

+
+
+
+
+
+
+ + Information + PD In Same Status +
+ + + + +

{{item.applicantname}}

+

{{item.applicantid}}

+

{{item.lendername}} - {{item.status}}

+
+
+
+
+
+
\ No newline at end of file diff --git a/ng6-seed/src/app/dashboard/dashboard.component.ts b/ng6-seed/src/app/dashboard/dashboard.component.ts index de294a8f4..d22f38292 100644 --- a/ng6-seed/src/app/dashboard/dashboard.component.ts +++ b/ng6-seed/src/app/dashboard/dashboard.component.ts @@ -9,4 +9,57 @@ export class DashboardComponent { constructor() { } + //Lender wise PD Triggered + lenderpd: Object[] = [{ + lendername:'ICICI', + billingaddr:'Bangalore', + fullpd:'9', + smartpd:'6', + }, { + lendername:'IOB', + billingaddr:'Chennai', + fullpd:'10', + smartpd:'5', + }, { + lendername:'SBI', + billingaddr:'Pune', + fullpd:'16', + smartpd:'3', + }, ]; + + //City Wise PD Triggered + citywisepd: Object[] = [{ + cityname: 'Bangalore', + fullpd:'45', + smartpd:'17', + }, { + cityname: 'Chennai', + fullpd:'33', + smartpd:'16', + }, { + cityname: 'Salem', + fullpd:'22', + smartpd:'12', + }, ]; + + //Same status + message: Object[] = [{ + applicantname: 'Saravana', + applicantid:'ICICITN0118000354', + lendername:'ICICI', + status:'Allocated', + photo: 'assets/images/face3.jpg', + }, { + applicantname: 'Kumaran', + applicantid:'IOBKA0418000578', + lendername:'IOB', + status:'Allocated', + photo: 'assets/images/face6.jpg', + }, { + applicantname: 'Priya', + applicantid:'SBIGA0118000241', + lendername:'SBI', + status:'Triggered', + photo: 'assets/images/face4.jpg', + }, ]; } 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 c35582094..da96ed323 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 @@ -17,11 +17,11 @@ fxLayoutAlign="center">
- + {{ cd.name }} - You must Pickup City Name. + City Name Required.
@@ -29,7 +29,7 @@ fxLayoutAlign="center">
- You must inculde a Branch Name + Branch Name Required
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 d7fb9940b..58640ef98 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 @@ -17,7 +17,7 @@
- + diff --git a/ng6-seed/src/app/settings/masters/component/city/city-dialog/city-dialog.component.html b/ng6-seed/src/app/settings/masters/component/city/city-dialog/city-dialog.component.html index 4d1ddc672..c18a1fa26 100644 --- a/ng6-seed/src/app/settings/masters/component/city/city-dialog/city-dialog.component.html +++ b/ng6-seed/src/app/settings/masters/component/city/city-dialog/city-dialog.component.html @@ -31,17 +31,17 @@ fxLayoutAlign="center">
- + {{ sd.name }} - You must Pickup State Name. + State Name Required.
- You must include a Name. + City Name Required.
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 4de4790c4..da88ac6b3 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 @@ -32,7 +32,7 @@ fxLayoutAlign="center">
- You must include a Rating. + Rating Required.
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 618130537..f0df83f71 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 @@ -16,38 +16,38 @@
- You must include a Name. + Company Name Required.
- - You must include a addressline1. + + Company Address Line1 Required.
- - You must include a Name. + + Company Address Line2 Required.
- - You must include a Name. + + Company Address Line3 Required.
- + {{ cd.name }} - You must include a City. + City Name Required.
@@ -55,7 +55,7 @@
- pincode should be in 6 digit format + Pincode should be in 6 digit format Your pincode must be at least 5 characters long. @@ -65,10 +65,10 @@
- + {{ sd.name }} - You must Pickup a State. + State Name Required.
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 7198faac0..c445f8fe6 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 @@ -34,7 +34,7 @@ fxLayoutAlign="center">
- You must include a Name. + Description Required.
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 af713ed41..98f96e5e6 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 @@ -34,7 +34,7 @@ fxLayoutAlign="center">
- You must include a Name. + Name Required.
@@ -42,7 +42,7 @@ fxLayoutAlign="center">
- You must include a Abbrevation. + Abbrevation Required.
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 fd3e2e99a..c50de886e 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 @@ -32,7 +32,7 @@ fxLayoutAlign="center">
- You must include a Name. + Name Required.
@@ -42,7 +42,7 @@ fxLayoutAlign="center">
- You must include a Short Name. + Short Name Required.
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 caa3b9348..706429f5d 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 @@ -34,7 +34,7 @@ fxLayoutAlign="center">
- You must include a Name. + Frequency Name Required.
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 9fae64052..5cae4c53a 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 @@ -33,7 +33,7 @@ fxLayoutAlign="center">
- You must include a Classified Name. + Classified Name Required.
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 e176790fd..3fba64166 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 @@ -32,7 +32,7 @@ fxLayoutAlign="center">
- You must include a Lender Hierarchy Name. + Lender Hierarchy Name Required.
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 21bb919a7..c6ca49362 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 @@ -32,7 +32,7 @@ fxLayout="row">
- You must include a Name. + Name Required.
diff --git a/ng6-seed/src/app/settings/masters/component/pd-location-approach/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 index bf39530f1..bf100ef8e 100644 --- a/ng6-seed/src/app/settings/masters/component/pd-location-approach/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 @@ -33,8 +33,8 @@ fxLayoutAlign="center">
- - You must include a Description. + + Description Required.
diff --git a/ng6-seed/src/app/settings/masters/component/pd-type/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 index bbc649150..643c7122a 100644 --- a/ng6-seed/src/app/settings/masters/component/pd-type/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 @@ -33,8 +33,8 @@ fxLayoutAlign="center">
- - You must include a type_name. + + Type Name Required.
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 5793c6d43..bd8c0551a 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 @@ -32,7 +32,7 @@ fxLayoutAlign="center">
- You must include a Product name. + Product Name Required.
@@ -41,7 +41,7 @@ fxLayoutAlign="center"> - You must include a Product abbrevation. + Product Abbrevation Required.
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 index 4158e2813..b54a9f9fd 100644 --- 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 @@ -16,7 +16,7 @@ fxLayoutAlign="center">
- You must include a category name. + Category Name Required.
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 92891a919..f652efa2a 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 @@ -34,7 +34,7 @@ fxLayoutAlign="center">
- You must include a Name. + Name Required.
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 415e9ff95..3cce82541 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 @@ -34,7 +34,7 @@ fxLayoutAlign="center">
- You must include a Name. + Name Required.
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 78827813d..fe54686e3 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 @@ -32,17 +32,17 @@ fxLayoutAlign="center">
- + {{ sd.name }} - You must include a Region. + Region Name Required.
- You must include a Name. + Name Required.
@@ -58,7 +58,7 @@ fxLayoutAlign="center">
- You must include a Code. + Code Required.
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 e0193cf07..55cb0254d 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 @@ -41,10 +41,10 @@ fxLayoutAlign="center"> -->
- + {{ sd.name }} - You must include a Product name. + Product Name Required.
@@ -83,6 +83,6 @@ - +
diff --git a/ng6-seed/src/app/settings/users/user-list/user-list.component.ts b/ng6-seed/src/app/settings/users/user-list/user-list.component.ts index c9fafe84b..29f23fae9 100644 --- a/ng6-seed/src/app/settings/users/user-list/user-list.component.ts +++ b/ng6-seed/src/app/settings/users/user-list/user-list.component.ts @@ -5,6 +5,8 @@ import { MatPaginator, MatTableDataSource,MatSort } from '@angular/material'; import { UserService } from '../../service/user.service'; import { DataSource } from '@angular/cdk/table'; import { CognitoService } from '../../../AwsService/cognito.service'; + + @Component({ selector: 'app-user-list', templateUrl: './user-list.component.html', @@ -17,7 +19,9 @@ export class UserListComponent implements OnInit { @ViewChild(MatPaginator) paginator: MatPaginator; @ViewChild(MatSort) sort: MatSort; - + color="primary"; + // pagination variable details + pageSize = 10; userdata: any = []; loader: boolean = false; @@ -41,9 +45,6 @@ export class UserListComponent implements OnInit { } - - - ngOnInit() { delete this.aws.localUserId; From 3e989b9d23eea3ebc7474a3b3e6bad4352aa72fc Mon Sep 17 00:00:00 2001 From: saravanakumarkandasami Date: Fri, 12 Oct 2018 17:02:30 +0530 Subject: [PATCH 4/5] Spell change in master --- .../pd-location-approach-dialog.component.html | 2 +- .../sub-product-dialog/sub-product-dialog.component.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ng6-seed/src/app/settings/masters/component/pd-location-approach/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 index bf100ef8e..7cc5879cf 100644 --- a/ng6-seed/src/app/settings/masters/component/pd-location-approach/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 @@ -33,7 +33,7 @@ fxLayoutAlign="center">
- + Description Required. 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 55cb0254d..387c6daae 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 @@ -65,7 +65,7 @@ fxLayoutAlign="center">
- You must include a Sub Product Abbrevation. + Sub Product Abbrevation Requireds.
From b7241853f8c3bf9c6cac474a1c6e214848fd36ab Mon Sep 17 00:00:00 2001 From: saravanakumarkandasami Date: Fri, 12 Oct 2018 19:20:33 +0530 Subject: [PATCH 5/5] User UI --- .../users/register/register.component.html | 140 ++++++++++-------- ng6-seed/src/index.html | 3 + 2 files changed, 82 insertions(+), 61 deletions(-) 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 23cc8171b..5065050f5 100755 --- a/ng6-seed/src/app/settings/users/register/register.component.html +++ b/ng6-seed/src/app/settings/users/register/register.component.html @@ -1,9 +1,9 @@ - User Registrations + USER REGISTRATION + @@ -33,27 +33,45 @@ - +
- Account Details
+ Account Details

- - You must include an email address. - You must include a valid email address. + + email Address Required. + Invalid Email Address. - - You must include phone number. - You must include a valid phone number. + + Phone Number Required. + Invalid Phone Number. - + + + -- + + {{s.name}} + + + State Required. + + + + + -- + + {{c.name}} + + + city Required. +
@@ -95,7 +113,7 @@
--> -
+ Role Information

- - + -- {{types.name}} - Select User Role - Select User Role + Enitity Type Required + Enitity Type Required - + -- {{ent.full_name}} + Lender Name Required. - + -- {{ent.full_name}} - - - - - + Vendor Name Required. + + {{role.role_name}} +
- Select User Role - Select User Role + User Role Required + User Role Required
- - - -
+ +
- + -- @@ -204,32 +221,33 @@ -->
-
- UserProfile - -
-
- -
- - {{img}} - +
+
+ User Profile + +
+
+ +
+ + {{img}} + +
+
+ + Isactive + +
- - - - Isactive - - +
- - - + + + + + diff --git a/ng6-seed/src/index.html b/ng6-seed/src/index.html index 3a317457e..5e6c787ef 100644 --- a/ng6-seed/src/index.html +++ b/ng6-seed/src/index.html @@ -121,6 +121,9 @@ transform: scale3D(0, 0, 1); } } + .mat-cell{ + font-size:1.2em !important; + }