From 27ad8d75ff9a81946e1cfc0c1640ab57d35231c6 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Fri, 12 Oct 2018 10:59:16 +0530 Subject: [PATCH 01/11] pd map view and compoents changes --- ng6-seed/src/app/app.routing.ts | 4 +- .../edit-pd-applicant.component.html | 75 ------ .../edit-pd-applicant.component.spec.ts | 25 -- .../edit-pd-applicant.component.ts | 122 ---------- .../edit-pd-master.component.html | 117 ---------- .../edit-pd-master.component.scss | 0 .../edit-pd-master.component.spec.ts | 25 -- .../edit-pd-master.component.ts | 130 ----------- .../pd-triger/edit-pd/edit-pd.component.html | 123 ---------- .../pd-triger/edit-pd/edit-pd.component.scss | 0 .../pd-triger/edit-pd/edit-pd.component.ts | 156 ------------- .../pd-triger/list-pd/list-pd.component.ts | 175 -------------- .../map-pd-view/map-pd-view.component.html | 213 ------------------ .../map-pd-view/map-pd-view.component.ts | 54 ----- .../pd-allocation.component.html | 43 ---- .../pd-allocation.component.scss | 3 - .../pd-allocation/pd-allocation.component.ts | 90 -------- .../app/pd-triger/pd-triger-routing.module.ts | 19 -- .../app/pd-triger/pd-triger.module.spec.ts | 13 -- .../pd-triger/view-pd/view-pd.component.html | 91 -------- .../pd-triger/view-pd/view-pd.component.scss | 3 - .../view-pd/view-pd.component.spec.ts | 25 -- .../pd-triger/view-pd/view-pd.component.ts | 92 -------- .../get-geometric-location.service.spec.ts | 12 + .../get-geometric-location.service.ts | 24 ++ .../list-pd}/add-pd/add-pd.component.html | 2 +- .../list-pd}/add-pd/add-pd.component.scss | 0 .../list-pd}/add-pd/add-pd.component.spec.ts | 0 .../list-pd}/add-pd/add-pd.component.ts | 36 ++- .../manage-pd}/list-pd/list-pd.component.html | 17 +- .../manage-pd}/list-pd/list-pd.component.scss | 3 +- .../list-pd/list-pd.component.spec.ts | 0 .../manage-pd/list-pd/list-pd.component.ts | 86 +++++++ .../map-pd-view/map-pd-view.component.html | 73 ++++++ .../map-pd-view/map-pd-view.component.scss | 2 +- .../map-pd-view/map-pd-view.component.spec.ts | 0 .../map-pd-view/map-pd-view.component.ts | 94 ++++++++ .../manage-pd/manage-pd.component.html | 3 + .../manage-pd/manage-pd.component.scss} | 0 .../manage-pd/manage-pd.component.spec.ts} | 12 +- .../manage-pd/manage-pd.component.ts | 10 + .../manage-pd/manage-pd.module.spec.ts | 13 ++ .../manage-pd/manage-pd.module.ts} | 30 ++- .../manage-pd/manage-pd.routing.ts | 41 ++++ .../pd-service/pd-triger.service.spec.ts | 0 .../pd-service/pd-triger.service.ts | 99 ++++---- .../personal-discussion.module.spec.ts | 13 ++ .../personal-discussion.module.ts | 52 +++++ .../personal-discussion.routing.ts | 18 ++ .../src/app/shared/menu-items/menu-items.ts | 2 +- 50 files changed, 548 insertions(+), 1692 deletions(-) delete mode 100644 ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.html delete mode 100644 ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.spec.ts delete mode 100644 ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.ts delete mode 100644 ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.html delete mode 100644 ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.scss delete mode 100644 ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.spec.ts delete mode 100644 ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.ts delete mode 100644 ng6-seed/src/app/pd-triger/edit-pd/edit-pd.component.html delete mode 100644 ng6-seed/src/app/pd-triger/edit-pd/edit-pd.component.scss delete mode 100644 ng6-seed/src/app/pd-triger/edit-pd/edit-pd.component.ts delete mode 100644 ng6-seed/src/app/pd-triger/list-pd/list-pd.component.ts delete mode 100644 ng6-seed/src/app/pd-triger/map-pd-view/map-pd-view.component.html delete mode 100644 ng6-seed/src/app/pd-triger/map-pd-view/map-pd-view.component.ts delete mode 100644 ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.html delete mode 100644 ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.scss delete mode 100644 ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.ts delete mode 100644 ng6-seed/src/app/pd-triger/pd-triger-routing.module.ts delete mode 100644 ng6-seed/src/app/pd-triger/pd-triger.module.spec.ts delete mode 100644 ng6-seed/src/app/pd-triger/view-pd/view-pd.component.html delete mode 100644 ng6-seed/src/app/pd-triger/view-pd/view-pd.component.scss delete mode 100644 ng6-seed/src/app/pd-triger/view-pd/view-pd.component.spec.ts delete mode 100644 ng6-seed/src/app/pd-triger/view-pd/view-pd.component.ts create mode 100644 ng6-seed/src/app/personal-discussion/location-service/get-geometric-location.service.spec.ts create mode 100644 ng6-seed/src/app/personal-discussion/location-service/get-geometric-location.service.ts rename ng6-seed/src/app/{pd-triger => personal-discussion/manage-pd/list-pd}/add-pd/add-pd.component.html (99%) rename ng6-seed/src/app/{pd-triger => personal-discussion/manage-pd/list-pd}/add-pd/add-pd.component.scss (100%) rename ng6-seed/src/app/{pd-triger => personal-discussion/manage-pd/list-pd}/add-pd/add-pd.component.spec.ts (100%) rename ng6-seed/src/app/{pd-triger => personal-discussion/manage-pd/list-pd}/add-pd/add-pd.component.ts (91%) rename ng6-seed/src/app/{pd-triger => personal-discussion/manage-pd}/list-pd/list-pd.component.html (88%) rename ng6-seed/src/app/{pd-triger => personal-discussion/manage-pd}/list-pd/list-pd.component.scss (95%) rename ng6-seed/src/app/{pd-triger => personal-discussion/manage-pd}/list-pd/list-pd.component.spec.ts (100%) create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.ts create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.html rename ng6-seed/src/app/{pd-triger => personal-discussion/manage-pd/list-pd}/map-pd-view/map-pd-view.component.scss (91%) rename ng6-seed/src/app/{pd-triger => personal-discussion/manage-pd/list-pd}/map-pd-view/map-pd-view.component.spec.ts (100%) create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.ts create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.component.html rename ng6-seed/src/app/{pd-triger/edit-pd-applicant/edit-pd-applicant.component.scss => personal-discussion/manage-pd/manage-pd.component.scss} (100%) rename ng6-seed/src/app/{pd-triger/edit-pd/edit-pd.component.spec.ts => personal-discussion/manage-pd/manage-pd.component.spec.ts} (55%) create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.component.ts create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.spec.ts rename ng6-seed/src/app/{pd-triger/pd-triger.module.ts => personal-discussion/manage-pd/manage-pd.module.ts} (71%) create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.routing.ts rename ng6-seed/src/app/{pd-triger => personal-discussion}/pd-service/pd-triger.service.spec.ts (100%) rename ng6-seed/src/app/{pd-triger => personal-discussion}/pd-service/pd-triger.service.ts (56%) create mode 100644 ng6-seed/src/app/personal-discussion/personal-discussion.module.spec.ts create mode 100644 ng6-seed/src/app/personal-discussion/personal-discussion.module.ts create mode 100644 ng6-seed/src/app/personal-discussion/personal-discussion.routing.ts diff --git a/ng6-seed/src/app/app.routing.ts b/ng6-seed/src/app/app.routing.ts index deeef0a53..5eefaa6c7 100644 --- a/ng6-seed/src/app/app.routing.ts +++ b/ng6-seed/src/app/app.routing.ts @@ -20,8 +20,8 @@ export const AppRoutes: Routes = [{ loadChildren:'./settings/settings.module#SettingsModule' } ,{ - path:'pdtrigger', - loadChildren:'./pd-triger/pd-triger.module#PdTrigerModule' + path:'personal_discussion', + loadChildren:'./personal-discussion/personal-discussion.module#PersonalDiscussionModule' },{ path:'template', loadChildren:'./template/template.module#TemplateModule' diff --git a/ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.html b/ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.html deleted file mode 100644 index 198e3fb58..000000000 --- a/ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.html +++ /dev/null @@ -1,75 +0,0 @@ - -
- - -
-
- -
Main Applicant
- - - - - Name is required. - - - - - Email number is required. - - - - - - Mobile number is required. - - - -
-
-
-
-
- - -
{{coDetails.controls.label.value}} {{i+1}}
- -
- - - - - - - - - - - - - -
-
-
-
-
- -
- - - - -
-
- -
- - - - -
-
- - - \ No newline at end of file diff --git a/ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.spec.ts b/ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.spec.ts deleted file mode 100644 index 73b41f696..000000000 --- a/ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { EditPdApplicantComponent } from './edit-pd-applicant.component'; - -describe('EditPdApplicantComponent', () => { - let component: EditPdApplicantComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ EditPdApplicantComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(EditPdApplicantComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.ts b/ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.ts deleted file mode 100644 index 7d42232cf..000000000 --- a/ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.ts +++ /dev/null @@ -1,122 +0,0 @@ -import { Component, OnInit,ViewEncapsulation, EventEmitter, Input, Output } from '@angular/core'; -import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms'; -import { CustomValidators } from 'ng2-validation'; -import { NotifierService } from 'angular-notifier'; -import { PdTrigerService } from '../pd-service/pd-triger.service'; -@Component({ - selector: 'app-edit-pd-applicant', - templateUrl: './edit-pd-applicant.component.html', - styleUrls: ['./edit-pd-applicant.component.scss'], - encapsulation: ViewEncapsulation.None, -}) -export class EditPdApplicantComponent implements OnInit { - errorMessage: any; - @Input() applicantChild: any; - @Output() loadPdView = new EventEmitter(); - public _EditApplicantForm:FormGroup; - public notifier: NotifierService; - mainApplicantData: any[]; - coApplicantData: any[]; - coApplicantItems:FormArray; - emptyData:any; - constructor(private _fb: FormBuilder, - private _pd: PdTrigerService, notifier: NotifierService,) { - this.notifier=notifier - } - - ngOnInit() { - this.mainApplicantData= this.applicantChild.filter(item => item.applicant_type == 1); - this.coApplicantData= this.applicantChild.filter(item => item.applicant_type == 0); - this.loadApplicantFormData(); - } - loadApplicantFormData() { - this._EditApplicantForm = this._fb.group({ - fk_applicant_primary_id: [this.mainApplicantData[0].pd_co_applicant_id], - applicant_name: [this.mainApplicantData[0].applicant_name, Validators.compose([Validators.required])], - mobile_no: [this.mainApplicantData[0].mobile_no, Validators.compose([Validators.required])], - email: [this.mainApplicantData[0].email, Validators.compose([Validators.required, CustomValidators.email])], - applicant_type: [this.mainApplicantData[0].applicant_type, Validators.compose([Validators.required])], - coApplicantItems: this._fb.array([]), -}); - // bind dynamic co applicant data - if(this.coApplicantData.length > 0){ - for(let value of this.coApplicantData){ - this.addCoApplicant(value); - } - } - - } - createItem(listData): FormGroup { - if(listData){ - return this._fb.group({ - label: ['Co Applicant'], - fk_applicant_primary_id: [listData.pd_co_applicant_id], - coapplicantName: [listData.applicant_name, Validators.compose([Validators.required])], - coapplicant_mobile_no: [listData.mobile_no], - relationship: [listData.relation], - applicant_type: [listData.applicant_type, Validators.compose([Validators.required])], - }); - } - else{ - return this._fb.group({ - label: ['Co Applicant'], - fk_applicant_primary_id: [null], - coapplicantName: [null, Validators.compose([Validators.required])], - coapplicant_mobile_no: [], - relationship: [null], - applicant_type: [0], - }); - } - - }; - addCoApplicant(listData) { - if(this._EditApplicantForm.valid){ - this.coApplicantItems = this._EditApplicantForm.get('coApplicantItems') as FormArray; - this.coApplicantItems.push(this.createItem(listData)); - } - } - get pdMainApplicant() { return this._EditApplicantForm.controls; } - get pdCoApplicant() { return this._EditApplicantForm.get('coApplicantItems') as FormArray; } - updatePdApplicant(formValue: any) { - if(this._EditApplicantForm.valid){ - let pd_applicant_details : any=[{ - "fk_pd_id": this.mainApplicantData[0].fk_pd_id, - "pd_co_applicant_id": formValue.fk_applicant_primary_id, - "applicant_name":formValue.applicant_name, - "email":formValue.email, - "mobile_no":formValue.mobile_no, - "applicant_type":formValue.applicant_type, - "relation":formValue.relationship, - "isactive":1 - }]; - formValue.coApplicantItems.forEach((itemElement, itemIndex) => { - let obj1 = { - "fk_pd_id": this.mainApplicantData[0].fk_pd_id, - "pd_co_applicant_id": itemElement.fk_applicant_primary_id, - "applicant_name":itemElement.coapplicantName, - "relation":itemElement.relationship, - "email":"", - "mobile_no":itemElement.coapplicant_mobile_no, - "applicant_type":itemElement.applicant_type, - "isactive":1 - } - pd_applicant_details.push(obj1) - }); - - this._pd.updatePdApplicant(pd_applicant_details).subscribe(result => { - if (result.status == 200) { - this.notifier.notify('success', 'Applicants updated..'); - this.loadPdMasterCompoent(); - } - else { - this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); - } - }, error => { - this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); - }); - } - } - loadPdMasterCompoent() { - this.loadPdView.emit('2') - } -} diff --git a/ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.html b/ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.html deleted file mode 100644 index b1145bcb8..000000000 --- a/ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.html +++ /dev/null @@ -1,117 +0,0 @@ - -
- -
-
-
-
- - - - {{LL.full_name}} - - - Lender name is required. - - - - - Applicant id is required. - - - - - {{PL.product_name}} - - - Product is required. - - - - - - - {{SPL.subproduct_name}} - - - - Sub product is required. - - - - - - {{CSL.customer_segment}} - - - Customer segment is required. - - - - - {{PDL.type_name}} - - - - PD type is required. - - - - - Amount is required. - - - - - Address1 required. - - - - - - - - - - - - - - {{SL.state_name}} - - - - State is required. - - - - - ` - {{CL.city_name}} - - - - City is required. - - - - - - Pincode is required. - - - -
- -
-
- - -
- - - - -
-
diff --git a/ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.scss b/ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.scss deleted file mode 100644 index e69de29bb..000000000 diff --git a/ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.spec.ts b/ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.spec.ts deleted file mode 100644 index c2b08e200..000000000 --- a/ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { EditPdMasterComponent } from './edit-pd-master.component'; - -describe('EditPdMasterComponent', () => { - let component: EditPdMasterComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ EditPdMasterComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(EditPdMasterComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.ts b/ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.ts deleted file mode 100644 index 9ed6604ac..000000000 --- a/ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.ts +++ /dev/null @@ -1,130 +0,0 @@ -import { Component, OnInit,ViewEncapsulation, EventEmitter, Input, Output } from '@angular/core'; -import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms'; -import { CustomValidators } from 'ng2-validation'; -import { NotifierService } from 'angular-notifier'; -import { PdTrigerService } from '../pd-service/pd-triger.service'; -@Component({ - selector: 'app-edit-pd-master', - templateUrl: './edit-pd-master.component.html', - styleUrls: ['./edit-pd-master.component.scss'], - encapsulation: ViewEncapsulation.None -}) -export class EditPdMasterComponent implements OnInit { - errorMessage: any; - productList:any; - subProductList:any; - lenderList:any; - customerSegmentList:any; - stateList:any; - cityList:any; - pdTypeList:any; - @Input() masterChild: any; - @Output() loadPdView = new EventEmitter(); - public _EditPDtriggerForm:FormGroup; - public notifier: NotifierService; - constructor(private _fb: FormBuilder, - private _pd: PdTrigerService, notifier: NotifierService,) { - this.notifier=notifier - } - - ngOnInit() { - this.getLenderList(); - this.getProductsList(); - this.getCustomerSegmentList(); - this.getStateCityList(); - this.getPDTypeList(); - this.loadFormData(); - } - - getLenderList(){ - this._pd.getLenderDetails().subscribe( - data => { - if (data.status == 200) { - this.lenderList=data.records - } - }, error => this.errorMessage = error); - } - getProductsList(){ - this._pd.getProductsDetails().subscribe( - data => { - if (data.status == 200) { - this.productList=data.records - this.getSubproductList(this.masterChild.fk_product_id); - - } - }, error => this.errorMessage = error); - } - getCustomerSegmentList(){ - this._pd.getCustomersDetails().subscribe( - data => { - if (data.status == 200) { - this.customerSegmentList=data.records - } - }, error => this.errorMessage = error); - } - getStateCityList(){ - this._pd.getStateCityDetails().subscribe( - data => { - if (data.status == 200) { - this.stateList=data.records - this.getCityList(this.masterChild.fk_state); - } - }, error => this.errorMessage = error); - } - getPDTypeList(){ - this._pd.getPDTypeDetails().subscribe( - data => { - if (data.status == 200) { - this.pdTypeList=data.records.pd_type; - - } - }, error => this.errorMessage = error); - } - - loadFormData() { - this._EditPDtriggerForm = this._fb.group({ - fk_primary_id: [this.masterChild.pd_id], - fk_lender_id: [this.masterChild.fk_lender_id, Validators.compose([Validators.required])], - lender_applicant_id: [this.masterChild.lender_applicant_id, Validators.compose([Validators.required])], - fk_product_id: [this.masterChild.fk_product_id, Validators.compose([Validators.required])], - fk_subproduct_id: [this.masterChild.fk_subproduct_id, Validators.compose([Validators.required])], - fk_pd_type: [this.masterChild.fk_pd_type, Validators.compose([Validators.required])], - fk_customer_segment: [this.masterChild.fk_customer_segment, Validators.compose([Validators.required])], - loan_amount: [this.masterChild.loan_amount, Validators.compose([Validators.required])], -   addressline1: [this.masterChild.addressline1, Validators.compose([Validators.required])], - addressline2: [this.masterChild.addressline2], - addressline3: [this.masterChild.addressline3], - fk_city: [this.masterChild.fk_city, Validators.compose([Validators.required])], - fk_state: [this.masterChild.fk_state, Validators.compose([Validators.required])], -   pincode : [this.masterChild.pincode, Validators.compose([Validators.required])], - }); - } - get pdMain() { return this._EditPDtriggerForm.controls; } - - //get sub product list based on prokduct id - getSubproductList(productID:string){ - - this.subProductList= this.productList.filter(item => item.product_id == productID); - this.subProductList=this.subProductList[0].subproducts; - } - - //get city list details based on state id - getCityList(stateID:string){ - this.cityList= this.stateList.filter(item => item.state_id == stateID); - this.cityList=this.cityList[0].cities; - } - submitPdDetails(formValue: any) { - if(this._EditPDtriggerForm.valid){ - let my_array = this._EditPDtriggerForm.value; - Object.keys(my_array).forEach((key) => ( my_array[key] == null) && delete my_array[key]); - this._pd.editPdMasterDetails(my_array).subscribe(); - } - } - loadPdMasterCompoent() { - // this.notifier.notify('success', 'Your Changes Updated.!'); - - this.loadPdView.emit('1') - } - - -} diff --git a/ng6-seed/src/app/pd-triger/edit-pd/edit-pd.component.html b/ng6-seed/src/app/pd-triger/edit-pd/edit-pd.component.html deleted file mode 100644 index 2089d0ef3..000000000 --- a/ng6-seed/src/app/pd-triger/edit-pd/edit-pd.component.html +++ /dev/null @@ -1,123 +0,0 @@ - -
- -
-
-
- -
PD Details
- -
- - - - {{LL.full_name}} - - - Lender name is required. - - - - - Applicant id is required. - - - - - {{PL.product_name}} - - - Product is required. - - - - - - - {{SPL.subproduct_name}} - - - - Sub product is required. - - - - - - {{CSL.customer_segment}} - - - Customer segment is required. - - - - - {{PDL.type_name}} - - - - PD type is required. - - - - - Amount is required. - - - - - Address1 required. - - - - - - - - - - - - - - {{SL.state_name}} - - - - State is required. - - - - - ` - {{CL.name}} - - - - City is required. - - - - - - Pincode is required. - - - -
- -
-
-
- - -
-
- -
-
- \ No newline at end of file diff --git a/ng6-seed/src/app/pd-triger/edit-pd/edit-pd.component.scss b/ng6-seed/src/app/pd-triger/edit-pd/edit-pd.component.scss deleted file mode 100644 index e69de29bb..000000000 diff --git a/ng6-seed/src/app/pd-triger/edit-pd/edit-pd.component.ts b/ng6-seed/src/app/pd-triger/edit-pd/edit-pd.component.ts deleted file mode 100644 index 99ab0e723..000000000 --- a/ng6-seed/src/app/pd-triger/edit-pd/edit-pd.component.ts +++ /dev/null @@ -1,156 +0,0 @@ -import { Component, OnInit,ViewEncapsulation, EventEmitter, Input, Output } from '@angular/core'; -import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms'; -import { CustomValidators } from 'ng2-validation'; -import { PdTrigerService } from '../pd-service/pd-triger.service'; -import { AwsService } from '../../AwsService/aws.service'; -@Component({ - selector: 'app-edit-pd', - templateUrl: './edit-pd.component.html', - styleUrls: ['./edit-pd.component.scss'], - encapsulation: ViewEncapsulation.None -}) -export class EditPdComponent implements OnInit { - errorMessage: any; - public editData: any; - public productList:any; - subProductList:any; - lenderList:any; - customerSegmentList:any; - public stateList:any; - cityList:any; - pdTypeList:any; - @Input() childData: string; - @Output() loadParent = new EventEmitter(); - public _EditPDtriggerForm:FormGroup; - constructor(private _fb: FormBuilder, - private _pd: PdTrigerService, private _aws:AwsService) { - - } - - ngOnInit() { - this.getLenderList(); - this.getProductsList(); - this.getCustomerSegmentList(); - this.getStateCityList(); - this.getPDTypeList(); - this.editPdDetails(this.childData); - this.beforeLoadFormData(); - } - editPdDetails(editID:string){ - this._pd.editPdDetails(editID).subscribe( - data => { - if (data.status == 200) { - this.editData=data.records - this.afterLoadFormData(); - } -}, error => this.errorMessage = error); - } - - loadPdListCompoent() { - this.loadParent.emit('2') - } - getLenderList(){ - this._pd.getLenderDetails().subscribe( - data => { - if (data.status == 200) { - this.lenderList=data.records - } - }, error => this.errorMessage = error); - } - getProductsList(){ - this._pd.getProductsDetails().subscribe( - data => { - if (data.status == 200) { - this.productList=data.records - } - }, error => this.errorMessage = error); - } - getCustomerSegmentList(){ - this._pd.getCustomersDetails().subscribe( - data => { - if (data.status == 200) { - this.customerSegmentList=data.records - } - }, error => this.errorMessage = error); - } - getStateCityList(){ - this._pd.getStateCityDetails().subscribe( - data => { - if (data.status == 200) { - this.stateList=data.records - } - }, error => this.errorMessage = error); - } - getPDTypeList(){ - this._pd.getPDTypeDetails().subscribe( - data => { - if (data.status == 200) { - this.pdTypeList=data.records.pd_type; - - } - }, error => this.errorMessage = error); - } - - - beforeLoadFormData(){ - this._EditPDtriggerForm = this._fb.group({ - fk_lender_id: [null, Validators.compose([Validators.required])], - lender_applicant_id: [null, Validators.compose([Validators.required])], - fk_product_id: [null, Validators.compose([Validators.required])], - fk_subproduct_id: [null, Validators.compose([Validators.required])], - fk_pd_type: [null, Validators.compose([Validators.required])], - fk_customer_segment: [null, Validators.compose([Validators.required])], - loan_amount: [null, Validators.compose([Validators.required])], - applicant_name: [null, Validators.compose([Validators.required])], - mobile_no: [null, Validators.compose([Validators.required])], - email: [null, Validators.compose([Validators.required, CustomValidators.email])], -   addressline1: [null, Validators.compose([Validators.required])], - addressline2: [null], - addressline3: [null], - fk_city: [null, Validators.compose([Validators.required])], - fk_state: [null, Validators.compose([Validators.required])], -   pincode : [null, Validators.compose([Validators.required])], - items: this._fb.array([]), - documents: this._fb.array([]) - }); - } - afterLoadFormData() { - this._EditPDtriggerForm = this._fb.group({ - fk_lender_id: [null, Validators.compose([Validators.required])], - lender_applicant_id: [null, Validators.compose([Validators.required])], - fk_product_id: [null, Validators.compose([Validators.required])], - fk_subproduct_id: [null, Validators.compose([Validators.required])], - fk_pd_type: [null, Validators.compose([Validators.required])], - fk_customer_segment: [null, Validators.compose([Validators.required])], - loan_amount: [null, Validators.compose([Validators.required])], - applicant_name: [null, Validators.compose([Validators.required])], - mobile_no: [null, Validators.compose([Validators.required])], - email: [null, Validators.compose([Validators.required, CustomValidators.email])], -   addressline1: [null, Validators.compose([Validators.required])], - addressline2: [null], - addressline3: [null], - fk_city: [null, Validators.compose([Validators.required])], - fk_state: [null, Validators.compose([Validators.required])], -   pincode : [null, Validators.compose([Validators.required])], - items: this._fb.array([]), - documents: this._fb.array([]) - }); - } - get pdMain() { return this._EditPDtriggerForm.controls; } - - //get sub product list based on prokduct id - getSubproductList(productID:string){ - this.subProductList= this.productList.filter(item => item.product_id == productID); - this.subProductList=this.subProductList[0].subproducts; - } - - //get city list details based on state id - getCityList(stateID:string){ - this.cityList= this.stateList.filter(item => item.state_id == stateID); - this.cityList=this.cityList[0].city; - } - submitPdDetails(formValue: any) { - if(this._EditPDtriggerForm.valid){ - } - } -} diff --git a/ng6-seed/src/app/pd-triger/list-pd/list-pd.component.ts b/ng6-seed/src/app/pd-triger/list-pd/list-pd.component.ts deleted file mode 100644 index 7ecdb00de..000000000 --- a/ng6-seed/src/app/pd-triger/list-pd/list-pd.component.ts +++ /dev/null @@ -1,175 +0,0 @@ -import { Component, ViewChild, OnInit, ViewEncapsulation, EventEmitter, Output } from '@angular/core'; -import { PdTrigerService } from '../pd-service/pd-triger.service'; -import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/material'; -//import { MapPdViewComponent } from '../map-pd-view/map-pd-view.component'; -@Component({ - selector: 'app-list-pd', - templateUrl: './list-pd.component.html', - styleUrls: ['./list-pd.component.scss'], - encapsulation: ViewEncapsulation.None -}) -export class ListPdComponent implements OnInit { - recordStatus: boolean; - parentEditData :string; - parentViewData :string; - showParentComponent:boolean; - showAddComponent:boolean; - showEditComponent:boolean; - showViewComponent:boolean; - showMapViewComponent:boolean; - errorMessage: any; - public paginationList: any[] = []; - // pagination variable details - length = 50; - pageIndex = 0; - pageSize = 10; - pageEvent: PageEvent; - - // data source variable details - pdListData = null; - public dataLength: number; - public dataSource = new MatTableDataSource(); - @ViewChild(MatPaginator) paginator: MatPaginator; - @ViewChild(MatSort) sort: MatSort; - pdList:any[] = []; - tiles: any[] = [{ - text: 'One', - cols: 3, - rows: 1, - color: 'lightblue' - }, { - text: 'Two', - cols: 1, - rows: 1, - color: 'lightgreen' - }, { - text: 'Three', - cols: 1, - rows: 1, - color: 'lightpink' - }, { - text: 'Four', - cols: 2, - rows: 1, - color: '#DDBDF1' - }]; - - dogs: Object[] = [{ - name: 'Porter', - human: 'Kara' - }, { - name: 'Mal', - human: 'Jeremy' - }, { - name: 'Koby', - human: 'Igor' - }, { - name: 'Razzle', - human: 'Ward' - }, { - name: 'Molly', - human: 'Rob' - }, { - name: 'Husi', - human: 'Matias' - }]; - - basicRowHeight = 80; - fixedCols = 4; - fixedRowHeight = 50; - ratioGutter = 1; - fitListHeight = '400px'; - ratio = '8:1'; - - addTileCols() { - this.tiles[2].cols++; - } - constructor(private _pd: PdTrigerService) { - } - - ngOnInit() { - this.recordStatus=false - this.showParentComponent=true - this.showAddComponent=false - this.showEditComponent=false - this.showViewComponent=false - this.showMapViewComponent=false - this._pd.getPdDetails() - .subscribe( - data => { - if (data.status == 200) { - this.pdList = data.records; - this.pdListData = data.records; - this.dataLength = data.records.length; - this.dataSource.data = this.pdListData; - - } - else{ - this.pdList=[]; - this.dataLength = null; - this.recordStatus=true; - } - }, error => this.errorMessage = error); - } - addPdDetails(){ - this.showParentComponent=false - this.showEditComponent=false - this.showViewComponent=false - this.showAddComponent=!this.showAddComponent - } - - editPdDetails(editID:string){ - this.showParentComponent=false - this.showAddComponent=false - this.showViewComponent=false - this.showEditComponent=!this.showEditComponent - this.parentEditData=editID - } - viewPdDetails(editID:string){ - this.showParentComponent=false - this.showAddComponent=false - this.showEditComponent=false - this.showViewComponent=!this.showViewComponent - this.parentViewData=editID - } - viewMapPdDetails(){ - this.showParentComponent=false - this.showAddComponent=false - this.showEditComponent=false - this.showMapViewComponent=!this.showMapViewComponent; -} - updateParentComponent(event:string) { - this.showParentComponent=!this.showParentComponent - if(event=='1'){ - this.showAddComponent=!this.showAddComponent - } - else if(event=='2'){ - this.showEditComponent=!this.showEditComponent - } - else if(event=='3'){ - this.showViewComponent=!this.showViewComponent - } - this._pd.getPdDetails() - .subscribe( - data => { - if (data.status == 200) { - this.pdList = data.records; - this.pdListData = data.records; - this.dataLength = data.records.length; - this.dataSource.data = this.pdListData; - - } - else{ - this.pdList=[]; - this.dataLength = null; - this.recordStatus=true; - } - }, error => this.errorMessage = error); -} - - -pageChange(e) { - console.log(e); -} - -} diff --git a/ng6-seed/src/app/pd-triger/map-pd-view/map-pd-view.component.html b/ng6-seed/src/app/pd-triger/map-pd-view/map-pd-view.component.html deleted file mode 100644 index f9af0c590..000000000 --- a/ng6-seed/src/app/pd-triger/map-pd-view/map-pd-view.component.html +++ /dev/null @@ -1,213 +0,0 @@ -
-
- - - - Search Options - Header subtitle - - - -
- - - - - - - - - - - {{details.applicat_details[0].applicant_name}} - - - {{details.product_abbr}}/{{details.subproduct_abbr}} - - -

Lendor ID:{{details.lender_applicant_id}}

-

Lendor Name:{{details.lender_full_name}}

-

Date Of Initiation:{{details.pd_date_of_initiation}}

-

 {{details.loan_amount}} -

-

- - -

- - -
- - - - - -

No Record Found ...

- -
-
- - - - - -
-
- - - - - -
-
-
-
-
-
-
- -
- - - - All - -
- - - - -

{{details.applicat_details[0].applicant_name}}

- -

{{details.lender_full_name}} {{details.lender_applicant_id}}{{details.pd_date_of_initiation}}

-

{{details.product_abbr}}/{{details.subproduct_abbr}}/{{details.customer_segment_abbr}} {{details.loan_amount}}  {{details.city_name}}/{{details.state_name}}-{{details.pincode}}

- - - -
- - - -
- -
-
-
- - -

No Record Found ...

- -
-
-
-
- - - - - -
- - - In Progress - - - - - - Scheduled - - - - - - Completed - - - - - -
-
-
diff --git a/ng6-seed/src/app/pd-triger/map-pd-view/map-pd-view.component.ts b/ng6-seed/src/app/pd-triger/map-pd-view/map-pd-view.component.ts deleted file mode 100644 index 441823679..000000000 --- a/ng6-seed/src/app/pd-triger/map-pd-view/map-pd-view.component.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { Component, ViewChild, OnInit } from '@angular/core'; -import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/material'; - -import { NotifierService } from 'angular-notifier'; -import { PdTrigerService } from '../pd-service/pd-triger.service'; - - -@Component({ - selector: 'app-map-pd-view', - templateUrl: './map-pd-view.component.html', - styleUrls: ['./map-pd-view.component.scss'] -}) -export class MapPdViewComponent implements OnInit { - lat = -34.397; - lng = 150.644; - recordStatus: boolean; - errorMessage: any; - // pagination variable details - length = 50; - pageIndex = 0; - pageSize = 10; - pageEvent: PageEvent; -// data source variable details -pdListData = null; -public dataLength: number; -public dataSource = new MatTableDataSource(); -@ViewChild(MatPaginator) paginator: MatPaginator; -@ViewChild(MatSort) sort: MatSort; -pdList:any[] = []; - constructor(private _pd: PdTrigerService) { - - } - - ngOnInit() { - this.recordStatus=false - this._pd.getPdDetails() - .subscribe( - data => { - if (data.status == 200) { - this.pdList = data.records; - this.pdListData = data.records; - this.dataLength = data.records.length; - this.dataSource.data = this.pdListData; - - } - else{ - this.pdList=[]; - this.dataLength = null; - this.recordStatus=true; - } - }, error => this.errorMessage = error); - } - -} diff --git a/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.html b/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.html deleted file mode 100644 index d677abc20..000000000 --- a/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.html +++ /dev/null @@ -1,43 +0,0 @@ -
- - - {{pageTitle}} - - - - - - -

- {{officer.first_name}} -

-

- Allocated -

-

- Scheduled -

-

- Inprogress -

- -
-
- - -

PD officer not available..

-
-
-
- - -
- -
-
-
- - - - diff --git a/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.scss b/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.scss deleted file mode 100644 index 6e263adae..000000000 --- a/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.scss +++ /dev/null @@ -1,3 +0,0 @@ -.example-full-width{ - width: 100%; -} \ No newline at end of file diff --git a/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.ts b/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.ts deleted file mode 100644 index ac56fdf9e..000000000 --- a/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { Component, OnInit, Inject } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; -import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms'; -import { NotifierService } from 'angular-notifier'; -import { PdTrigerService } from '../pd-service/pd-triger.service'; - -@Component({ - selector: 'app-pd-allocation', - templateUrl: './pd-allocation.component.html', - styleUrls: ['./pd-allocation.component.scss'] -}) -export class PdAllocationComponent implements OnInit { - public pageTitle: string = "PD Allocation To"; - public _pdAllocationForm: FormGroup; - public pdOfficerList: any = []; - errorMessage: any; - notifier : NotifierService; - selectedItem:any; - isDisabled: boolean; - constructor( notifier: NotifierService, - private _fb: FormBuilder, - private dialogRef: MatDialogRef, - private _pd: PdTrigerService, - @Inject(MAT_DIALOG_DATA) public data: any) { - this.notifier=notifier; - } - - ngOnInit() { - this.isDisabled=true; - this.getPDOfficerList(this.data.pd_id); - - // this._pdAllocationForm = this._fb.group({ - // pd_primary_id: [null], - // allocation_id: [null], - // }); - } - -// convenience getter for easy access to form fields -// get readForm() { return this._pdAllocationForm.controls; } - -// pd officer list - getPDOfficerList(pdID:string){ - this._pd.getPdOfficerList(pdID).subscribe( - data => { - if (data.status == 200) { - this.pdOfficerList=data.records; - - } - }, error => this.errorMessage = error); - - } - // select pd officer list - selectPdOfficer(selected:any){ - this.isDisabled=false; - this.selectedItem=selected; - // this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); - - } - /** To update pd officer*/ - updatePdOfficer(allocateDate:any) { - if(this.isDisabled){ - this.notifier.notify('warning', 'Please Choose PD Officer.!'); - } - else { - let updateData = { - "pd_id":this.data.pd_id, - "fk_pd_allocated_to":allocateDate.fk_user_id, - } - this._pd.updatePdOfficer(updateData).subscribe( - result => { - if (result.status == 200) { - this.notifier.notify('success', 'PD Allocated.!'); - this.dialogRef.close(); - } - else { - this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); - this.errorMessage = "Something Wents Wrong Try Again.!"; - } - }, error => { - this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); - this.errorMessage = "Some Thing Wents Wrong Try Again.!"; - // this.dialogRef.close(); - }); - } - } -/** For Popup Close Button */ - closeAllocationComponent(): void { - this.dialogRef.close(); - } -} diff --git a/ng6-seed/src/app/pd-triger/pd-triger-routing.module.ts b/ng6-seed/src/app/pd-triger/pd-triger-routing.module.ts deleted file mode 100644 index cf23e2a3d..000000000 --- a/ng6-seed/src/app/pd-triger/pd-triger-routing.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; -import { ListPdComponent } from './list-pd/list-pd.component'; -import { AddPdComponent } from './add-pd/add-pd.component'; - -export const PdTrigerRoutes: Routes = [ - { - path: '', - component: ListPdComponent - // children: - // [{ - // path: 'pdtriggerlist', - // component: AddPdComponent - // }] - } - -]; - - diff --git a/ng6-seed/src/app/pd-triger/pd-triger.module.spec.ts b/ng6-seed/src/app/pd-triger/pd-triger.module.spec.ts deleted file mode 100644 index f82d79b3e..000000000 --- a/ng6-seed/src/app/pd-triger/pd-triger.module.spec.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { PdTrigerModule } from './pd-triger.module'; - -describe('PdTrigerModule', () => { - let pdTrigerModule: PdTrigerModule; - - beforeEach(() => { - pdTrigerModule = new PdTrigerModule(); - }); - - it('should create an instance', () => { - expect(pdTrigerModule).toBeTruthy(); - }); -}); diff --git a/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.html b/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.html deleted file mode 100644 index f5d233149..000000000 --- a/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.html +++ /dev/null @@ -1,91 +0,0 @@ -
- -
-
- -
- - - -
- - - {{master.lender_full_name}} - {{master.lender_applicant_id}} - -  {{master.city_name}} / {{master.state_name}}-{{master.pincode}} - - - -

{{master.product_name}} / {{master.subproduct_name}}

-

{{master.pd_type_name}}   {{master.pd_allocation_type_name}}    {{master.pd_allocated_to}}

-

{{master.addressline1}}

-

{{master.addressline2}}

-

{{master.addressline3}}

- -

 {{master.loan_amount}}    {{master.pd_status_name}}   {{master.pd_date_of_initiation}}

- -
-
-
- - - - -
- -
- - Applicants - - - - -

- -  {{applicant.applicant_name}}     - -  {{applicant.mobile_no}}     Main Applicant -    {{applicant.relation}} -

- - -
- -
- -
- -
- - - - - - Documents - - - - -

- {{documents.pd_document_title}}     - -  {{documents.pd_document_name}} -

-
- -
- -
- - - - PD History - - - - - - - diff --git a/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.scss b/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.scss deleted file mode 100644 index fd48f4449..000000000 --- a/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.scss +++ /dev/null @@ -1,3 +0,0 @@ -.cardEdit { - display: inline;float:right;padding-top:3%; -} \ No newline at end of file diff --git a/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.spec.ts b/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.spec.ts deleted file mode 100644 index 51de6afa9..000000000 --- a/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ViewPdComponent } from './view-pd.component'; - -describe('ViewPdComponent', () => { - let component: ViewPdComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ ViewPdComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(ViewPdComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.ts b/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.ts deleted file mode 100644 index f0324f37e..000000000 --- a/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { Component, OnInit,ViewEncapsulation, EventEmitter, Input, Output } from '@angular/core'; -import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms'; -import { MatDialog } from '@angular/material'; -import { NotifierService } from 'angular-notifier'; -import { PdTrigerService } from '../pd-service/pd-triger.service'; -import { PdAllocationComponent } from '../pd-allocation/pd-allocation.component'; -@Component({ - selector: 'app-view-pd', - templateUrl: './view-pd.component.html', - styleUrls: ['./view-pd.component.scss'], - encapsulation: ViewEncapsulation.None -}) -export class ViewPdComponent implements OnInit { - private notifier:NotifierService; - errorMessage: any; - pdMasterData: any; - pdApplicantData: any; - pdDocumentsData: any; - pdLogsData: any; - editMasterData: any[]; - editApplicantData: any[]; - showEditMasterComponent: boolean; - showEditApplicantComponent: boolean; - showEditDocumentComponent: boolean; - @Input() childData: string; - @Output() loadParent = new EventEmitter(); - public _EditPDtriggerForm:FormGroup; - constructor(notifier:NotifierService,private dialog: MatDialog,private _fb: FormBuilder, - private _pd: PdTrigerService) { - this.notifier=notifier - } - - ngOnInit() { - - this.viewPdDetails(this.childData); - this.showEditMasterComponent=false; - this.showEditApplicantComponent=false; - this.showEditDocumentComponent=false; - } - viewPdDetails(editID:string){ - this._pd.editPdDetails(editID).subscribe( - data => { - if (data.status == 200) { - this.pdMasterData=data.records.pd_master_details; - this.pdApplicantData= data.records.applicants_details; - this.pdDocumentsData=data.records.pd_documnets; - this.pdLogsData=data.records.pd_logs; - } -}, error => this.errorMessage = error); - } - - loadPdListCompoent() { - this.loadParent.emit('3') - } - - editPdMaster(masterData:any){ - this.editMasterData=masterData; - this.showEditMasterComponent=!this.showEditMasterComponent; - } - editPdApplicant(applicantData:any){ - this.editApplicantData=applicantData; - this.showEditApplicantComponent=!this.showEditApplicantComponent; - } - // pd allocation to - // edit questions master details popup model - pdAllocationTo(pdID:any) { - const dialogRef = this.dialog.open(PdAllocationComponent, { - data: pdID, - disableClose: true - }); - dialogRef.afterClosed() - .subscribe(dataresult => { - // this.notifier.notify('success', 'Successfully allocated.!'); - this.viewPdDetails(this.childData) - }); - } - - updateViewComponent(editBack:string) { - - if(editBack=='1'){ - this.showEditMasterComponent=!this.showEditMasterComponent - } - else if(editBack=='2'){ - this.showEditApplicantComponent=!this.showEditApplicantComponent - } - else if(editBack=='3'){ - this.showEditMasterComponent=!this.showEditMasterComponent - } - this.viewPdDetails(this.childData); - } - -} diff --git a/ng6-seed/src/app/personal-discussion/location-service/get-geometric-location.service.spec.ts b/ng6-seed/src/app/personal-discussion/location-service/get-geometric-location.service.spec.ts new file mode 100644 index 000000000..faa0a9fba --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/location-service/get-geometric-location.service.spec.ts @@ -0,0 +1,12 @@ +import { TestBed } from '@angular/core/testing'; + +import { GetGeometricLocationService } from './get-geometric-location.service'; + +describe('GetGeometricLocationService', () => { + beforeEach(() => TestBed.configureTestingModule({})); + + it('should be created', () => { + const service: GetGeometricLocationService = TestBed.get(GetGeometricLocationService); + expect(service).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/personal-discussion/location-service/get-geometric-location.service.ts b/ng6-seed/src/app/personal-discussion/location-service/get-geometric-location.service.ts new file mode 100644 index 000000000..44fc0f092 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/location-service/get-geometric-location.service.ts @@ -0,0 +1,24 @@ +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs';//for Datatables +import { Http } from '@angular/http'; + +@Injectable() + +export class GetGeometricLocationService { + MAP_API_KEY: string; + MAP_API_URL: string; + constructor(private _http: Http) { + this.MAP_API_KEY = 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk' + this.MAP_API_URL = `https://maps.googleapis.com/maps/api/geocode/json?key=${this.MAP_API_KEY}&address=`; + } + findLocations(address:string, postalCode?: string,state?:string, city?: string): Observable { + let compositeAddress = [address]; + + if (postalCode) compositeAddress.push(postalCode); + if (state) compositeAddress.push(state); + if (city) compositeAddress.push(city); + + let url = `${this.MAP_API_URL}${compositeAddress.join(',')}`; + return this._http.get(url).map(response => response.json()); + } +} diff --git a/ng6-seed/src/app/pd-triger/add-pd/add-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html similarity index 99% rename from ng6-seed/src/app/pd-triger/add-pd/add-pd.component.html rename to ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html index c98778f50..65cb39c83 100644 --- a/ng6-seed/src/app/pd-triger/add-pd/add-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html @@ -229,7 +229,7 @@ + (click)="loadPdListCompoent(cancelStatus)">close diff --git a/ng6-seed/src/app/pd-triger/add-pd/add-pd.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.scss similarity index 100% rename from ng6-seed/src/app/pd-triger/add-pd/add-pd.component.scss rename to ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.scss diff --git a/ng6-seed/src/app/pd-triger/add-pd/add-pd.component.spec.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.spec.ts similarity index 100% rename from ng6-seed/src/app/pd-triger/add-pd/add-pd.component.spec.ts rename to ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.spec.ts diff --git a/ng6-seed/src/app/pd-triger/add-pd/add-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts similarity index 91% rename from ng6-seed/src/app/pd-triger/add-pd/add-pd.component.ts rename to ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts index 1613e5c92..3cf94ed47 100644 --- a/ng6-seed/src/app/pd-triger/add-pd/add-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts @@ -1,17 +1,20 @@ -import { Component, OnInit, ViewEncapsulation, Output, EventEmitter } from '@angular/core'; +import { Component, OnInit, ViewEncapsulation, Output, EventEmitter, OnDestroy } from '@angular/core'; import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; import { CustomValidators } from 'ng2-validation'; import { NotifierService } from 'angular-notifier'; -import { PdTrigerService } from '../pd-service/pd-triger.service'; -import { AwsService } from '../../AwsService/aws.service'; +import { PdTrigerService } from '../../../pd-service/pd-triger.service'; +import { ListPdComponent } from '../list-pd.component'; +import { AwsService } from '../../../../AwsService/aws.service'; @Component({ selector: 'app-add-pd', templateUrl: './add-pd.component.html', styleUrls: ['./add-pd.component.scss'], encapsulation: ViewEncapsulation.None }) -export class AddPdComponent implements OnInit { - @Output() loadParent = new EventEmitter(); +export class AddPdComponent implements OnInit, OnDestroy { + //@Output() loadParent = new EventEmitter(); + cancelStatus: boolean; private notifier: NotifierService; public _PDtriggerForm: FormGroup; items: FormArray; @@ -31,14 +34,16 @@ export class AddPdComponent implements OnInit { subAllocationTypeCheck: boolean; allocationLabel: string; subAllocationLabel: string; - constructor(notifier: NotifierService,private _fb: FormBuilder, - private _pd: PdTrigerService, private _aws:AwsService) { + constructor(notifier: NotifierService,private _fb: FormBuilder,private route: ActivatedRoute, + private router: Router,private _pd: PdTrigerService, private _aws:AwsService, private ListPdComponent: ListPdComponent) { this.notifier = notifier; } public totalfiles: Array =[]; public totalFileName = []; public lengthCheckToaddMore =0; ngOnInit() { + this.cancelStatus = false; + this.ListPdComponent.pdListLoad(false); this.getLenderList(); this.getProductsList(); this.getCustomerSegmentList(); @@ -291,7 +296,7 @@ export class AddPdComponent implements OnInit { this._pd.addPdDetails(pd_form).subscribe(result => { if (result.status == 200) { this.notifier.notify('success', 'PD Saved.'); - this.loadPdListCompoent(); + this.loadPdListCompoent(true); } else { this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); @@ -324,7 +329,18 @@ export class AddPdComponent implements OnInit { this.subAllocationLabel="Load Balance"; } } - loadPdListCompoent() { - this.loadParent.emit('1') + loadPdListCompoent(from:boolean) { + if(from){ + this.router.navigate([ '../../' ], { relativeTo: this.route }); + this.ListPdComponent.pdListLoad(true); + } + else{ + this.router.navigate([ '../../' ], { relativeTo: this.route }); + this.ListPdComponent.showListView(true); + } + + } + ngOnDestroy(): void { + this.ListPdComponent.showListView(true); } } diff --git a/ng6-seed/src/app/pd-triger/list-pd/list-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.html similarity index 88% rename from ng6-seed/src/app/pd-triger/list-pd/list-pd.component.html rename to ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.html index 70baa691b..6a958309b 100644 --- a/ng6-seed/src/app/pd-triger/list-pd/list-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.html @@ -1,8 +1,8 @@ -
- - -
- +
+ + +
+ All @@ -124,9 +124,6 @@ + + - - - - - diff --git a/ng6-seed/src/app/pd-triger/list-pd/list-pd.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.scss similarity index 95% rename from ng6-seed/src/app/pd-triger/list-pd/list-pd.component.scss rename to ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.scss index b1e122b24..d143ad302 100644 --- a/ng6-seed/src/app/pd-triger/list-pd/list-pd.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.scss @@ -1,5 +1,4 @@ .ic-change:hover { transform: scale(1.1); color: green; -} - +} \ No newline at end of file diff --git a/ng6-seed/src/app/pd-triger/list-pd/list-pd.component.spec.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.spec.ts similarity index 100% rename from ng6-seed/src/app/pd-triger/list-pd/list-pd.component.spec.ts rename to ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.spec.ts diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.ts new file mode 100644 index 000000000..28305196a --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.ts @@ -0,0 +1,86 @@ +import { Component,ViewChild, OnInit, ViewEncapsulation, OnDestroy } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { NotifierService } from 'angular-notifier'; +import { PdTrigerService } from '../../pd-service/pd-triger.service'; +import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/material'; +@Component({ + selector: 'app-list-pd', + templateUrl: './list-pd.component.html', + styleUrls: ['./list-pd.component.scss'], + encapsulation: ViewEncapsulation.None +}) +export class ListPdComponent implements OnInit, OnDestroy { + private notifier: NotifierService; + recordStatus: boolean; + viewPdList:boolean; + viewMapPdList:boolean; + errorMessage: any; + // pagination variable details + length = 50; + pageIndex = 0; + pageSize = 10; + pageEvent: PageEvent; + + // data source variable details + pdListData = null; + public dataLength: number; + public dataSource = new MatTableDataSource(); + @ViewChild(MatPaginator) paginator: MatPaginator; + @ViewChild(MatSort) sort: MatSort; + pdList:any[] = []; + constructor( notifier: NotifierService, private route: ActivatedRoute, + private router: Router, private _pd: PdTrigerService) { + this.notifier = notifier; + } + + ngOnInit() { + this.viewPdList = true; + this.recordStatus=false; + this.loadPDDetails(); + } +//load pd details + loadPDDetails() { + this._pd.getPdDetails() + .subscribe( + data => { + if (data.status == 200) { + this.pdList = data.records; + this.pdListData = data.records; + this.dataLength = data.records.length; + this.dataSource.data = this.pdListData; + + } + else{ + this.pdList=[]; + this.dataLength = null; + this.recordStatus=true; + } + }, error => this.errorMessage = error); + } + pageChange(e) { + console.log(e); + } + // view pd list in map view + viewMapPdDetails(){ + this.viewPdList = !this.viewPdList; + this.router.navigate([ '../pdlist/pdmaplist'], { relativeTo: this.route }); + + } + // add pd + addPdDetails() { + this.viewPdList = !this.viewPdList; + this.router.navigate([ '../pdlist/addpd'], { relativeTo: this.route }); + + } + showListView(status: boolean){ + this.viewPdList = status; + } + pdListLoad(status: boolean){ + this.viewPdList = status; + this.loadPDDetails(); + } + ngOnDestroy(): void { + this.viewPdList=false; + } + +} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.html new file mode 100644 index 000000000..5ea9b073b --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.html @@ -0,0 +1,73 @@ +
+
+
+ +
+ + + Search Options + Header subtitle + + +
+ + + + {{details.applicat_details[0].applicant_name}} +

 {{details.city_name}}/{{details.state_name}}-{{details.pincode}}

+

{{details.lender_full_name}}({{details.lender_applicant_id}})

+

{{details.product_abbr}}/{{details.subproduct_abbr}}/{{details.customer_segment_abbr}}

+

{{details.pd_date_of_initiation}}  {{details.loan_amount}}

+
+ + + + +
+
+ + +

No Record Found ...

+ +
+
+ + + + + +
+
+ + + + + +
+
+
+
+
+ diff --git a/ng6-seed/src/app/pd-triger/map-pd-view/map-pd-view.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.scss similarity index 91% rename from ng6-seed/src/app/pd-triger/map-pd-view/map-pd-view.component.scss rename to ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.scss index 3944ca03d..1cf171a27 100644 --- a/ng6-seed/src/app/pd-triger/map-pd-view/map-pd-view.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.scss @@ -1,4 +1,4 @@ -@import "../../../assets/styles/scss/material.variables"; +@import "../../../../../assets/styles/scss/material.variables"; :host { margin-left: -5px; diff --git a/ng6-seed/src/app/pd-triger/map-pd-view/map-pd-view.component.spec.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.spec.ts similarity index 100% rename from ng6-seed/src/app/pd-triger/map-pd-view/map-pd-view.component.spec.ts rename to ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.spec.ts diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.ts new file mode 100644 index 000000000..73532956b --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.ts @@ -0,0 +1,94 @@ +import { Component, ViewChild, OnInit, OnDestroy } from '@angular/core'; +import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/material'; +import { ActivatedRoute, Router } from '@angular/router'; +import { NotifierService } from 'angular-notifier'; +import { PdTrigerService } from '../../../pd-service/pd-triger.service'; +import { GetGeometricLocationService } from '../../../location-service/get-geometric-location.service'; +import { ListPdComponent } from '../list-pd.component'; + +@Component({ + selector: 'app-map-pd-view', + templateUrl: './map-pd-view.component.html', + styleUrls: ['./map-pd-view.component.scss'] +}) +export class MapPdViewComponent implements OnInit, OnDestroy { + + lat:string + lng:string + mapDetails:any[] = []; + recordStatus: boolean; + errorMessage: any; + // pagination variable details + length = 50; + pageIndex = 0; + pageSize = 10; + pageEvent: PageEvent; +// data source variable details +pdListData = null; +public dataLength: number; +public dataSource = new MatTableDataSource(); +@ViewChild(MatPaginator) paginator: MatPaginator; +@ViewChild(MatSort) sort: MatSort; +pdList:any[] = []; + constructor(private route: ActivatedRoute, + private router: Router,private _pd: PdTrigerService,private _geolocation: GetGeometricLocationService, private ListPdComponent : ListPdComponent) { + + } + + ngOnInit() { + this.ListPdComponent.showListView(false); + this.recordStatus=false + this._pd.getPdDetails() + .subscribe( + data => { + if (data.status == 200) { + this.pdList = data.records; + this.pdListData = data.records; + this.dataLength = data.records.length; + this.dataSource.data = this.pdListData; + this.getMapViewLocations(this.pdList); + + } + else{ + this.pdList=[]; + this.dataLength = null; + this.recordStatus=true; + } + }, error => this.errorMessage = error); + } + + + getMapViewLocations(getData:any){ + getData.forEach(element => { + this._geolocation.findLocations(element.addressline1,element.pincode,element.state_name,element.city_name) + .subscribe(response => { + if (response.status == 'OK') { + this.lat = response.results[0].geometry.location.lat; + this.lng = response.results[0].geometry.location.lng; + this.mapDetails.push(response.results[0].geometry.location) + } + // else if (response.status == 'ZERO_RESULTS') { + // console.log('geocodingAPIService', 'ZERO_RESULTS', response.status); + // } else { + // console.log('geocodingAPIService', 'Other error', response.status); + // } + }); + + }); + } + + pageChange(e) { + console.log(e); + } + // go list view + goList(){ + this.ListPdComponent.showListView(true); + this.router.navigate([ '../../' ], { relativeTo: this.route }); + + } + ngOnDestroy(): void { + this.ListPdComponent.showListView(true); + + } + +} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.component.html new file mode 100644 index 000000000..92d06be8b --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.component.html @@ -0,0 +1,3 @@ +

+ manage-pd works! +

diff --git a/ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.component.scss similarity index 100% rename from ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.scss rename to ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.component.scss diff --git a/ng6-seed/src/app/pd-triger/edit-pd/edit-pd.component.spec.ts b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.component.spec.ts similarity index 55% rename from ng6-seed/src/app/pd-triger/edit-pd/edit-pd.component.spec.ts rename to ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.component.spec.ts index ad598b308..bd5932b0c 100644 --- a/ng6-seed/src/app/pd-triger/edit-pd/edit-pd.component.spec.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.component.spec.ts @@ -1,20 +1,20 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { EditPdComponent } from './edit-pd.component'; +import { ManagePdComponent } from './manage-pd.component'; -describe('EditPdComponent', () => { - let component: EditPdComponent; - let fixture: ComponentFixture; +describe('ManagePdComponent', () => { + let component: ManagePdComponent; + let fixture: ComponentFixture; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ EditPdComponent ] + declarations: [ ManagePdComponent ] }) .compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(EditPdComponent); + fixture = TestBed.createComponent(ManagePdComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.component.ts new file mode 100644 index 000000000..1d31fea9f --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; +@Component({ + template: ` +
+ +
+ ` +}) +export class ManagePdComponent { +} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.spec.ts b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.spec.ts new file mode 100644 index 000000000..dc60f4b0e --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.spec.ts @@ -0,0 +1,13 @@ +import { ManagePdModule } from './manage-pd.module'; + +describe('ManagePdModule', () => { + let managePdModule: ManagePdModule; + + beforeEach(() => { + managePdModule = new ManagePdModule(); + }); + + it('should create an instance', () => { + expect(managePdModule).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/pd-triger/pd-triger.module.ts b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts similarity index 71% rename from ng6-seed/src/app/pd-triger/pd-triger.module.ts rename to ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts index 4ed7f07a8..bcaa5f044 100644 --- a/ng6-seed/src/app/pd-triger/pd-triger.module.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts @@ -1,6 +1,5 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { RouterModule } from '@angular/router'; import { MatCardModule, MatIconModule, @@ -18,20 +17,18 @@ import { FlexLayoutModule } from '@angular/flex-layout'; import { MatTooltipModule } from '@angular/material/tooltip'; import { NgxMatSelectSearchModule } from 'ngx-mat-select-search'; +import 'hammerjs'; import { NotifierModule, NotifierOptions } from 'angular-notifier'; import { AgmCoreModule } from '@agm/core'; - -import 'hammerjs'; -import { PdTrigerRoutes } from './pd-triger-routing.module'; -import { AddPdComponent } from './add-pd/add-pd.component'; -import { PdTrigerService } from './pd-service/pd-triger.service'; +import { ManagePdRoutingModule } from './manage-pd.routing'; import { ListPdComponent } from './list-pd/list-pd.component'; -import { EditPdComponent } from './edit-pd/edit-pd.component'; -import { ViewPdComponent } from './view-pd/view-pd.component'; -import { EditPdMasterComponent } from './edit-pd-master/edit-pd-master.component'; -import { EditPdApplicantComponent } from './edit-pd-applicant/edit-pd-applicant.component'; -import { PdAllocationComponent } from './pd-allocation/pd-allocation.component'; -import { MapPdViewComponent } from './map-pd-view/map-pd-view.component'; +import { ManagePdComponent } from './manage-pd.component'; +import { MapPdViewComponent } from './list-pd/map-pd-view/map-pd-view.component'; +import { AddPdComponent } from '../manage-pd/list-pd/add-pd/add-pd.component'; + +import { PdTrigerService } from '../pd-service/pd-triger.service'; +import { GetGeometricLocationService } from '../location-service/get-geometric-location.service'; + /** * Custom angular notifier options */ @@ -78,7 +75,7 @@ const pdCustomNotifierOptions: NotifierOptions = { @NgModule({ imports: [ CommonModule, - RouterModule.forChild(PdTrigerRoutes), + ManagePdRoutingModule, NotifierModule.withConfig(pdCustomNotifierOptions), MatCardModule, MatIconModule, @@ -100,8 +97,7 @@ const pdCustomNotifierOptions: NotifierOptions = { NgxMatSelectSearchModule,MatTooltipModule, MatExpansionModule, AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}), ], - declarations: [AddPdComponent, ListPdComponent, EditPdComponent, ViewPdComponent, EditPdMasterComponent, EditPdApplicantComponent, PdAllocationComponent, MapPdViewComponent], - entryComponents:[PdAllocationComponent], - providers: [PdTrigerService] + declarations: [ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent], + providers: [PdTrigerService, GetGeometricLocationService] }) -export class PdTrigerModule { } +export class ManagePdModule { } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.routing.ts b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.routing.ts new file mode 100644 index 000000000..fa000cb60 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.routing.ts @@ -0,0 +1,41 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import { ManagePdComponent } from './manage-pd.component'; +import { ListPdComponent } from './list-pd/list-pd.component'; +import { MapPdViewComponent } from './list-pd/map-pd-view/map-pd-view.component'; +import { AddPdComponent } from '../manage-pd/list-pd/add-pd/add-pd.component'; +/* +* manage pd router +*/ +const routes: Routes = [ + { + path: '', + component: ManagePdComponent, + children: [ + { + path: '', + pathMatch: 'full', + redirectTo: 'pdlist' + },{ + path: 'pdlist', + component: ListPdComponent, + children: [ + { + path: 'pdmaplist', + component: MapPdViewComponent, + }, + { + path: 'addpd', + component: AddPdComponent, + }, + ] + } + ] + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class ManagePdRoutingModule { } diff --git a/ng6-seed/src/app/pd-triger/pd-service/pd-triger.service.spec.ts b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.spec.ts similarity index 100% rename from ng6-seed/src/app/pd-triger/pd-service/pd-triger.service.spec.ts rename to ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.spec.ts diff --git a/ng6-seed/src/app/pd-triger/pd-service/pd-triger.service.ts b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts similarity index 56% rename from ng6-seed/src/app/pd-triger/pd-service/pd-triger.service.ts rename to ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts index dc2cbe7bb..808767907 100644 --- a/ng6-seed/src/app/pd-triger/pd-service/pd-triger.service.ts +++ b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs';//for Datatables import { HttpClient,HttpParams } from '@angular/common/http'; -import { catchError } from 'rxjs/operators'; +import { catchError, map } from 'rxjs/operators'; import { of } from 'rxjs'; /** Imported Service Files Are., */ @@ -23,9 +23,13 @@ export class PdTrigerService { //private apiUrl = "http://ssa.sineedge.com/sparqapi/api/"; //private apiUrl = "http://192.168.0.5:9999/AWSEC2/sparqapi/api/"; private apiUrl = "http://ssa.sineedge.com/sparqapi/api/"; - + MAP_API_KEY: string; + MAP_API_URL: string; constructor(private _http: HttpClient, - private _aws:AwsService) { } + private _aws:AwsService) { + this.MAP_API_KEY = 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk' + this.MAP_API_URL = `https://maps.googleapis.com/maps/api/geocode/json?key=${this.MAP_API_KEY}&address=`; + } // get add pd master details getAllMasterDatas(TableName:string): Observable { return this._http.post(this.apiUrl+'getListOfMaster', { "master_name":TableName }) @@ -87,55 +91,54 @@ export class PdTrigerService { return this._http.get(this.apiUrl+"listLessPDDetails/get") .pipe( catchError(this.handleError('operation', [])) - ) + ) + } + + // get edit row pd details + editPdDetails(editId:string):Observable{ + let httpParams = new HttpParams().set('pdid', editId); + return this._http.post(this.apiUrl+"getFullPDDetails",httpParams) + .pipe( + catchError(this.handleError('operation', [])) + ) + } + // update pd master details + editPdMasterDetails(editData:any):Observable{ + editData.fk_updatedby = this._aws.getlocale(); + editData.updatedon = currentdate; + return this._http.post(this.apiUrl+"triggerNewPD",{records:editData}) + + .pipe( + catchError(this.handleError('operation', [])) + ) } + // update pd applicant + updatePdApplicant(editData:any):Observable{ + // editData.fk_updatedby = this._aws.getlocale(); + // editData.updatedon = currentdate; + return this._http.post(this.apiUrl+"updatePDApplicants",{"pd_applicant_details":editData}) - // get edit row pd details - editPdDetails(editId:string):Observable{ - let httpParams = new HttpParams().set('pdid', editId); - return this._http.post(this.apiUrl+"getFullPDDetails",httpParams) .pipe( - catchError(this.handleError('operation', [])) - ) + catchError(this.handleError('operation', [])) + ) } - // update pd master details - editPdMasterDetails(editData:any):Observable{ - editData.fk_updatedby = this._aws.getlocale(); - editData.updatedon = currentdate; - return this._http.post(this.apiUrl+"triggerNewPD",{records:editData}) - - .pipe( - catchError(this.handleError('operation', [])) - ) - } - // update pd applicant - updatePdApplicant(editData:any):Observable{ - // editData.fk_updatedby = this._aws.getlocale(); - // editData.updatedon = currentdate; - console.log(editData) - return this._http.post(this.apiUrl+"updatePDApplicants",{"pd_applicant_details":editData}) - - .pipe( - catchError(this.handleError('operation', [])) - ) - } - - // get pd allocation to details - getPdOfficerList(pdID:string): Observable { - return this._http.post(this.apiUrl+"getListPDOfficers",{"pdid":pdID}) - .pipe( - catchError(this.handleError('operation', [])) - ) - } - // update pd officer - updatePdOfficer(updateData: any): Observable { - updateData.fk_updatedby = this._aws.getlocale(); - updateData.updatedon = currentdate; - return this._http.post(this.apiUrl+"allocatePD",{"records":updateData}) - .pipe( - catchError(this.handleError('operation', [])) - ) - } + + // get pd allocation to details + getPdOfficerList(pdID:string): Observable { + return this._http.post(this.apiUrl+"getListPDOfficers",{"pdid":pdID}) + .pipe( + catchError(this.handleError('operation', [])) + ) + } + // update pd officer + updatePdOfficer(updateData: any): Observable { + updateData.fk_updatedby = this._aws.getlocale(); + updateData.updatedon = currentdate; + return this._http.post(this.apiUrl+"allocatePD",{"records":updateData}) + .pipe( + catchError(this.handleError('operation', [])) + ) + } private handleError(operation = 'operation', result?: T) { return (error: any): Observable => { diff --git a/ng6-seed/src/app/personal-discussion/personal-discussion.module.spec.ts b/ng6-seed/src/app/personal-discussion/personal-discussion.module.spec.ts new file mode 100644 index 000000000..5d317556a --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/personal-discussion.module.spec.ts @@ -0,0 +1,13 @@ +import { PersonalDiscussionModule } from './personal-discussion.module'; + +describe('PersonalDiscussionModule', () => { + let personalDiscussionModule: PersonalDiscussionModule; + + beforeEach(() => { + personalDiscussionModule = new PersonalDiscussionModule(); + }); + + it('should create an instance', () => { + expect(personalDiscussionModule).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/personal-discussion/personal-discussion.module.ts b/ng6-seed/src/app/personal-discussion/personal-discussion.module.ts new file mode 100644 index 000000000..c0ecf82ed --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/personal-discussion.module.ts @@ -0,0 +1,52 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterModule } from '@angular/router'; +import { + MatCardModule, + MatIconModule, + MatInputModule, + MatRadioModule, + MatButtonModule,MatTableModule,MatPaginatorModule, + MatProgressBarModule,MatDialogModule, MatSortModule, + MatToolbarModule,MatSelectModule, MatListModule, MatGridListModule, MatTabsModule, MatCheckboxModule, MatBadgeModule, 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'; +import { TreeModule } from 'angular-tree-component'; +import { NgxDatatableModule } from '@swimlane/ngx-datatable'; +import { FlexLayoutModule } from '@angular/flex-layout'; +import { MatTooltipModule } from '@angular/material/tooltip'; + +import { NgxMatSelectSearchModule } from 'ngx-mat-select-search'; +import 'hammerjs'; +import { ManagePdModule } from './manage-pd/manage-pd.module'; + +import { personalDiscussionRoutes } from './personal-discussion.routing'; + +@NgModule({ + imports: [ + CommonModule, + RouterModule.forChild(personalDiscussionRoutes), + ManagePdModule, + MatCardModule, + MatIconModule, + MatInputModule, + MatRadioModule, + MatTableModule, + MatPaginatorModule, + MatButtonModule, + MatProgressBarModule, + MatToolbarModule, + FlexLayoutModule, + NgxDatatableModule, + FormsModule,MatSlideToggleModule, + MatSelectModule, MatListModule,MatGridListModule, MatTabsModule, MatBadgeModule, MatCheckboxModule, + ReactiveFormsModule, + FileUploadModule, + TreeModule, + MatDialogModule,MatSortModule, + NgxMatSelectSearchModule,MatTooltipModule, MatExpansionModule, + ], + declarations: [] +}) +export class PersonalDiscussionModule { } diff --git a/ng6-seed/src/app/personal-discussion/personal-discussion.routing.ts b/ng6-seed/src/app/personal-discussion/personal-discussion.routing.ts new file mode 100644 index 000000000..2854d0c1a --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/personal-discussion.routing.ts @@ -0,0 +1,18 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import { ManagePdModule } from './manage-pd/manage-pd.module'; +export const personalDiscussionRoutes: Routes = [{ + path: '', + loadChildren:'./manage-pd/manage-pd.module#ManagePdModule', +// children:[{ +// path:'managepd', +// loadChildren:'./manage-pd/manage-pd.module#ManagePdModule' +// } +// ] +}]; + +// @NgModule({ +// imports: [RouterModule.forChild(routes)], +// exports: [RouterModule] +// }) +// export class PersonalDiscussionRoutingModule { } 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 55f03f401..528934907 100644 --- a/ng6-seed/src/app/shared/menu-items/menu-items.ts +++ b/ng6-seed/src/app/shared/menu-items/menu-items.ts @@ -72,7 +72,7 @@ const MENUITEMS : Menu[] = [ }, { - state:'pdtrigger', + state:'personal_discussion', name:'Personal Discussion', type:'link', icon:'forum', From 57a01dfd608652efe659bde95904d44bb6a219d2 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Fri, 12 Oct 2018 11:00:22 +0530 Subject: [PATCH 02/11] merge changes --- .../layouts/admin/admin-layout.component.html | 2 +- .../branch-list/branch-list.component.html | 4 +- .../branch-list/branch-list.component.ts | 5 +- .../city/city-list/city-list.component.html | 4 +- .../city/city-list/city-list.component.ts | 2 + .../comments-on-locality-list.component.html | 2 +- .../comments-on-locality-list.component.ts | 2 + .../company-list/company-list.component.html | 2 +- .../company-list/company-list.component.ts | 4 +- .../customer-behaviour-list.component.html | 2 +- .../customer-behaviour-list.component.ts | 2 + .../customer-segment-list.component.html | 2 +- .../customer-segment-list.component.ts | 3 + .../designation-list.component.html | 2 +- .../designation-list.component.ts | 2 + .../frequency-list.component.html | 2 +- .../frequency-list.component.ts | 4 +- ...ndustry_classification-list.component.html | 2 +- .../industry_classification-list.component.ts | 2 + .../lender-hierarchy-list.component.html | 2 +- .../lender-hierarchy-list.component.ts | 3 + .../members-occupation-list.component.html | 2 +- .../members-occupation-list.component.ts | 3 + .../pd-allocation-type-list.component.html | 2 +- .../pd-allocation-type-list.component.ts | 3 + .../pd-location-approach-list.component.html | 2 +- .../pd-location-approach-list.component.ts | 3 + .../pd-type-list/pd-type-list.component.html | 2 +- .../pd-type-list/pd-type-list.component.ts | 3 + .../product-list/product-list.component.html | 8 +- .../product-list/product-list.component.ts | 2 + .../question-category-list.component.html | 2 +- .../question-category-list.component.ts | 2 + .../regions-list/regions-list.component.html | 5 +- .../regions-list/regions-list.component.ts | 2 + .../relation-ship-list.component.html | 2 +- .../relation-ship-list.component.ts | 3 + .../states-list/states-list.component.html | 2 +- .../states-list/states-list.component.ts | 3 + .../sub-product-list.component.html | 8 +- .../sub-product-list.component.ts | 2 + .../title-list/title-list.component.html | 2 +- .../title/title-list/title-list.component.ts | 5 +- .../activity-list.component.html | 2 +- .../activity-list/activity-list.component.ts | 3 + .../uom/uom-list/uom-list.component.html | 2 +- .../uom/uom-list/uom-list.component.ts | 3 + .../settings/masters/masters.component.html | 10 +- .../app/settings/masters/masters.component.ts | 2 +- .../pd-team-add/pd-team-add.component.html | 6 +- .../pd-team-add/pd-team-add.component.ts | 105 ++-- .../pd-team-dialog.component.html | 86 --- .../pd-team-dialog.component.scss | 3 - .../pd-team-dialog.component.spec.ts | 25 - .../pd-team-dialog.component.ts | 537 ------------------ .../pd-team-edit/pd-team-edit.component.html | 9 +- .../pd-team-edit/pd-team-edit.component.ts | 297 ++++++---- .../pd-team-list/pd-team-list.component.html | 18 +- .../pd-team-list/pd-team-list.component.ts | 25 +- .../app/settings/pd-team/pd-team.module.ts | 17 +- .../service/masters/pd-team.service.ts | 48 +- .../assets/styles/scss/_app.variables.scss | 2 +- .../styles/scss/_material.variables.scss | 4 +- .../assets/styles/scss/core/_main-header.scss | 4 +- .../styles/scss/core/_main-sidebar.scss | 2 +- .../assets/styles/scss/material/_buttons.scss | 4 + 66 files changed, 433 insertions(+), 904 deletions(-) delete mode 100644 ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.html delete mode 100644 ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.scss delete mode 100644 ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.spec.ts delete mode 100644 ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.ts diff --git a/ng6-seed/src/app/layouts/admin/admin-layout.component.html b/ng6-seed/src/app/layouts/admin/admin-layout.component.html index e21724eaa..4f8d69a11 100644 --- a/ng6-seed/src/app/layouts/admin/admin-layout.component.html +++ b/ng6-seed/src/app/layouts/admin/admin-layout.component.html @@ -13,7 +13,7 @@
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 41aef2ea3..d7fb9940b 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 @@
- + @@ -70,7 +70,7 @@ - + diff --git a/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.ts b/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.ts index 6b84feb28..fe0195e1b 100644 --- a/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/branch/branch-list/branch-list.component.ts @@ -31,6 +31,9 @@ export class BranchListComponent implements OnInit { userdata2:any = []; color = 'primary'; + // pagination variable details + pageSize = 10; + // changed(id: number,isactive : number) { // console.log('Id',id); // console.log('Isactive',isactive) @@ -77,7 +80,7 @@ export class BranchListComponent implements OnInit { } }) } - + /**Popup for ADD Branch */ addBranch() { this.isPopupOpened = true; 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 3d4975b76..c59e33199 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 @@ -161,10 +161,10 @@ - + - + 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 89d6eede7..0a9c73892 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 @@ -29,6 +29,8 @@ export class CityListComponent implements OnInit { userData = null; color = 'primary'; +// pagination variable details +pageSize = 10; public dataLength: number; public dataSource = new MatTableDataSource(); 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 2b024c19c..12e107a52 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 @@ -140,7 +140,7 @@ - + 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 f54fef2d4..df441e9c8 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 @@ -30,6 +30,8 @@ export class CommentsOnLocalityListComponent implements OnInit { CommentsOnLocalityList: any = []; userData = null; color = 'primary'; + // pagination variable details + pageSize = 10; public dataLength: number; public dataSource = new MatTableDataSource(); 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 b49443cc7..6ecc37adb 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 @@ -137,7 +137,7 @@ - + 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 53da0e3c8..894daa16b 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 @@ -38,7 +38,9 @@ export class CompanyListComponent implements OnInit { CompanyList: any = []; userData = null; color = 'primary'; - + // pagination variable details + pageSize = 10; + public dataLength: number; public dataSource = new MatTableDataSource(); displayedColumns = ['serialno', 'name', 'city_name', 'state_name' , 'actions']; 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 136c52c61..de991df88 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 @@ -140,7 +140,7 @@ - + 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 62bf47008..7aa955569 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 @@ -30,6 +30,8 @@ export class CustomerBehaviourListComponent implements OnInit { noRecordFound: boolean = false; userData = null; color = 'primary'; +// pagination variable details +pageSize = 10; public dataLength: number; public dataSource = new MatTableDataSource(); 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 00a5fbb45..6d7d5d5ea 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 @@ -137,7 +137,7 @@ - + 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 93a822eaa..af7d91e8c 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 @@ -28,6 +28,9 @@ export class CustomerSegmentListComponent implements OnInit { CustomerSegmentList: any = []; noRecordFound: boolean = false; color = 'primary'; + // pagination variable details + pageSize = 10; + // displayedColumns = ['customer_segment_id', 'abbr', 'name', 'isactive','actions']; userData = null; 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 ff86fe450..eaf71e234 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 @@ -136,7 +136,7 @@ - + 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 0b8ec7447..e9d8a0194 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 @@ -29,6 +29,8 @@ export class DesignationListComponent implements OnInit { noRecordFound: boolean = false; DesignationList: any = []; color = 'primary'; +// pagination variable details +pageSize = 10; userData = null; 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 2fae291cd..0b5e5d7ef 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 @@ -143,7 +143,7 @@ - + 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 6b09aad45..13ec1b4d0 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 @@ -30,7 +30,9 @@ export class FrequencyListComponent implements OnInit { FrequencyList: any = []; noRecordFound: boolean = false; color = 'primary'; - + // pagination variable details + pageSize = 10; + userData = null; public dataLength: number; 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 13476f697..9e1baa7b0 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 @@ -73,7 +73,7 @@ - + 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 ae18cadae..9d87e5dfe 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 @@ -32,6 +32,9 @@ export class LenderHierarchyListComponent implements OnInit { loader: boolean = false; LenderHierarchyList: any = []; color = 'primary'; + // pagination variable details + pageSize = 10; + //displayedColumns = ['lender_hierarchy_id', 'lender_hierarchy','isactive','actions']; userData = null; 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 cb51c0c42..743410f48 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 @@ -151,7 +151,7 @@ - + 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 ae9e016d6..c5c6666e1 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 @@ -31,6 +31,9 @@ export class MembersOccupationListComponent implements OnInit { loader: boolean = false; MemberOccupationList: any = []; color = 'primary'; + // pagination variable details + pageSize = 10; + userData = null; noRecordFound: boolean = false; diff --git a/ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.html b/ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.html index 7a97c0acc..702f0cc0a 100644 --- a/ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.html @@ -80,7 +80,7 @@ - + diff --git a/ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.ts b/ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.ts index 629b200a8..8dbb8a3fe 100644 --- a/ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/pd-allocation-type/pd-allocation-type-list.component.ts @@ -29,6 +29,9 @@ export class PdAllocationTypeListComponent implements OnInit { noRecordFound: boolean = false; dataSourceRecords = null; color = 'primary'; + // pagination variable details + pageSize = 10; + private notifier: NotifierService; public dataLength: number; diff --git a/ng6-seed/src/app/settings/masters/component/pd-location-approach/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 index dde60b4af..122e67d21 100644 --- a/ng6-seed/src/app/settings/masters/component/pd-location-approach/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 @@ -130,7 +130,7 @@ - + diff --git a/ng6-seed/src/app/settings/masters/component/pd-location-approach/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 index c042bdbf0..ceab4afa1 100644 --- a/ng6-seed/src/app/settings/masters/component/pd-location-approach/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 @@ -37,6 +37,9 @@ export class PdLocationApproachListComponent implements OnInit { loader: boolean = false; PdLocationApproachList: any = []; color = 'primary'; + // pagination variable details + pageSize = 10; + userData = null; noRecordFound: boolean = false; public dataLength: number; diff --git a/ng6-seed/src/app/settings/masters/component/pd-type/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 index 86299fe02..190dc380f 100644 --- a/ng6-seed/src/app/settings/masters/component/pd-type/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 @@ -130,7 +130,7 @@ - + diff --git a/ng6-seed/src/app/settings/masters/component/pd-type/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 index daf92efde..99306684c 100644 --- a/ng6-seed/src/app/settings/masters/component/pd-type/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 @@ -30,6 +30,9 @@ export class PdTypeListComponent implements OnInit { PDTypeList: any = []; noRecordFound: boolean = false; color = 'primary'; + // pagination variable details + pageSize = 10; + userData = null; public dataLength: number; 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 0ae762158..60b3bc04b 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 @@ -21,9 +21,9 @@ -
- - + +
+
@@ -82,7 +82,7 @@ - + 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 44a27719a..a21203975 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 @@ -31,6 +31,8 @@ export class ProductListComponent implements OnInit { noRecordFound: boolean = false; userData = null; color = 'primary'; + // pagination variable details + pageSize = 10; public dataLength: number; public dataSource = new MatTableDataSource(); 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 index c0fbd3c21..45ac1b8a5 100644 --- 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 @@ -74,7 +74,7 @@ - + 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 index 67e68cf90..105002311 100644 --- 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 @@ -29,6 +29,8 @@ export class QuestionCategoryListComponent implements OnInit { noRecordFound: boolean = false; userData = null; color = 'primary'; + // pagination variable details + pageSize = 10; public dataLength: number; public dataSource = new MatTableDataSource(); 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 cd7239a84..7139f4fd2 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 @@ -11,7 +11,7 @@ - + @@ -58,6 +58,7 @@ - + + \ 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 8c8b04848..96484306a 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 @@ -32,6 +32,8 @@ export class RegionsListComponent implements OnInit { noRecordFound: boolean = false; color = 'primary'; userData = null; + // pagination variable details + pageSize = 10; public dataLength: number; public dataSource = new MatTableDataSource(); 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 74b2b10e0..bfa0b81b6 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 @@ -153,7 +153,7 @@ - + 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 ae8f7d6ab..d3d37ad33 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 @@ -29,6 +29,9 @@ export class RelationShipListComponent implements OnInit { RelationShipList: any = []; noRecordFound: boolean = false; color = 'primary'; + // pagination variable details + pageSize = 10; + //displayedColumns = ['relationship_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions']; //relationship_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive 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 c252f5ba4..2ea2da2ee 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 @@ -176,7 +176,7 @@ - + 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 d6cea1399..3fe180cd1 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 @@ -29,6 +29,9 @@ export class StatesListComponent implements OnInit { loader: boolean = false; StateList: any = []; color = 'primary'; + // pagination variable details + pageSize = 10; + noRecordFound: boolean = false; //displayedColumns = ['states_id', 'fk_city_id', 'name', 'createdon', 'fk_createdby', 'updatedon', 'fk_updatedby', 'isactive','actions']; 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 e8a483667..031422274 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 @@ -104,9 +104,9 @@ -
- - + +
+
@@ -165,7 +165,7 @@ - + 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 2f28e4056..ee31d5e89 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 @@ -33,6 +33,8 @@ export class SubProductListComponent implements OnInit { userData = null; noRecordFound: boolean = false; + // pagination variable details + pageSize = 10; public dataLength: number; public dataSource = new MatTableDataSource(); 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 b40fde58c..925b5c249 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 @@ -149,7 +149,7 @@ - + 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 9ccc07c45..473db1820 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,7 +26,10 @@ export class TitleListComponent implements OnInit { loader: boolean = false; TitleList: any = []; noRecordFound: boolean = false; - color = 'primary'; + color = 'primary'; + // pagination variable details + pageSize = 10; + //displayedColumns = ['title_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions']; //title_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive 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 ac386e22a..11659f5a2 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 @@ -143,7 +143,7 @@ - + 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 43d90a2ef..7b3c2120f 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 @@ -33,6 +33,9 @@ export class ActivityListComponent implements OnInit { userData = null; noRecordFound: boolean = false; color = 'primary'; + // pagination variable details + pageSize = 10; + public dataLength: number; public dataSource = new MatTableDataSource(); displayedColumns = ['serialno','name','actions', 'isactive']; 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 7846b4bba..738cca2ff 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 @@ -70,7 +70,7 @@ - + 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 e581db38e..5a93a0dce 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 @@ -33,6 +33,9 @@ export class UomListComponent implements OnInit { loader: boolean = false; UOMList: any = []; color = 'primary'; + // pagination variable details + pageSize = 10; + //displayedColumns = ['uom_id','name','createdon','fk_createdby','updatedon','isactive','fk_updatedby','actions']; //uom_id, name, createdon, fk_createdby, updatedon, fk_updatedby, isactive diff --git a/ng6-seed/src/app/settings/masters/masters.component.html b/ng6-seed/src/app/settings/masters/masters.component.html index d4432748c..d8d42e07b 100644 --- a/ng6-seed/src/app/settings/masters/masters.component.html +++ b/ng6-seed/src/app/settings/masters/masters.component.html @@ -89,12 +89,12 @@
-
- - -
+
+ +
-->
\ 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 56bb61e53..34529d22d 100644 --- a/ng6-seed/src/app/settings/masters/masters.component.ts +++ b/ng6-seed/src/app/settings/masters/masters.component.ts @@ -125,7 +125,7 @@ export class MastersComponent implements OnInit { {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'}, + // {id: 'master-25',name: 'PD Team'}, ]; diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.html b/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.html index be23374a8..f34cb0948 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.html +++ b/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.html @@ -28,7 +28,7 @@
- {{ cd.name }} + {{ cd.name }} You must Select Cities. @@ -47,7 +47,7 @@
- {{ pd.name }} + {{ pd.name }} You must Select Product. @@ -64,7 +64,7 @@ - {{csd.name}} + {{csd.name}} You must Select Customer Segment. diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.ts b/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.ts index 74b53b844..e4d53370e 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.ts +++ b/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.ts @@ -10,8 +10,9 @@ import { FormBuilder, import { MastersService } from '../../service/masters/masters.service'; import { PdTeamService } from '../../service/masters/pd-team.service'; import { NotifierService } from 'angular-notifier'; -import { PdTeamDialogComponent } from '../pd-team-dialog/pd-team-dialog.component'; + import { Router } from '@angular/router'; +import { empty } from 'rxjs'; @Component({ selector: 'app-pd-team-add', @@ -21,6 +22,7 @@ import { Router } from '@angular/router'; export class PdTeamAddComponent implements OnInit { public _pdTeamForm: FormGroup; +private notifier: NotifierService; public submitted = false; color = 'primary'; errorMessage:string; @@ -32,7 +34,7 @@ productdatas: any[]; customerSegmentdatas: any[]; //This Type Of Array Declaration -pdTeamCityArray: Array<{teamid: number, cityid: number}> = []; +pdTeamCityArray:any= []; pdTeamProductArray: Array<{teamid: number, productid: number}> = []; pdTeamCustomerSegmentArray: Array<{teamid: number, customerid: number}> = []; @@ -47,13 +49,24 @@ constructor(private _formBuilder: FormBuilder, private _router: Router, private _masterService: MastersService) { - this._notifier = _notifier; + this.notifier = _notifier; } ngOnInit() { this.PdTeamFormDatas(); +/** For Checking City Validation datas - checking purpose - Already exists are not */ +this._pdTeamService.getAllPdTeamCityMapping() + .subscribe( + dataresult => { + if(dataresult.dataStatus == true){ + //this.AllPDTeamMapData = dataresult.records; + this.pdTeamCityArray = dataresult.records; + + } +}); +// console.log('All Datas for Validation purpose',this.pdTeamCityArray); /** To Display The City Data For City DropDown */ this._masterService.getAllMasterData('CITY').subscribe( dataresult => { @@ -117,69 +130,87 @@ onNoClick(): void { /** To Save/Edited Popup Data */ onSubmit() { this.submitted = true; + var pdTeamFormValues = this._pdTeamForm.value; + Object.keys(pdTeamFormValues).forEach( + (key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key]); // stop here if form is invalid - if (this._pdTeamForm.invalid) { - // this.errorMessage = "Please Fill All Mandate Fields."; - // return; - alert('Please Fill All Mandate Fields.'); - } else { + // if (pdTeamFormValues.invalid) { + // // this.errorMessage = "Please Fill All Mandate Fields."; + // // return; + // alert('Please Fill All Mandate Fields.'); + // } else { + - var pdTeamFormValues = this._pdTeamForm.value; //To Remove The "Null" With Key also - Object.keys(pdTeamFormValues).forEach( - (key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key]); - + this._pdTeamService.addPdTeamDetail(this._pdTeamForm.value).subscribe( dataresult => { if (dataresult.status == 200) { - console.log(dataresult); - this._notifier.notify('success', 'Record Edited Successfully.!'); -// alert('Record Successfully.!'); + + this.notifier.notify('success', 'Record Edited Successfully.!'); + alert('Success.!'); this._router.navigate(['/setting/pdteam/pdteamlist']); this._pdTeamForm.reset(); } else { - this._notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + alert('Wrong.!'); //alert('Some Thing Wents Wrong Try Again !'); //this.errorMessage = "Some Thing Wents Wrong Try Again !"; } - }, error => { - this._notifier.notify('warning', 'Something Wents Wrong Try Again.!'); - // this.errorMessage = "Something Wents Wrong Try Again !"; - //alert('Some Thing Wents Wrong Try Again !'); }); - } + } -/** To Reset Popup Data For Add*/ - -onResetForAdd(){ -alert("reset function"); -} - /**on change function for customer segment to dispaly the as List in html page */ onChangeCustomerSegmentDatas($event){ - let CustomerSegmentName = $event.source.value.name; + //let CustomerSegmentName = $event.source.value.name; + let CustomerSegmentName = this.customerSegmentdatas.filter(cs=>cs.customer_segment_id == $event.source.value)[0]; + if($event.source._selected === true ){ - this.selectedSegmentDatas.push(CustomerSegmentName); + this.selectedSegmentDatas.push(CustomerSegmentName.name); } else if($event.source._selected === false ){ - let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName); + let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName.name); this.selectedSegmentDatas.splice(index,1); } } /**on change function for City to display the as List in html page */ onChangeCityDatas($event){ + var mycheck = 0 ; + //let cityName = $event.source.value; + let cityName = this.citydatas.filter(city=>city.city_id == $event.source.value)[0]; - let cityName = $event.source.value.name; if($event.source._selected === true ){ - this.selectedCityDatas.push(cityName); + + for(let Duplication_City of this.pdTeamCityArray){ + + let teamname = Duplication_City.team_name; + let dup_cityname = Duplication_City.CITYMAP.filter(city=>city.city_id == $event.source.value); + + if(dup_cityname != ''){ + for(let data of dup_cityname){ + + if(data.name == cityName.name){ + alert('"'+data.name+'" Already Existing with "'+ teamname +'"'); + $event.source._selected = false; + mycheck++; + } + + } + } + } + + if(mycheck == 0){ + this.selectedCityDatas.push(cityName.name); + } + } else if($event.source._selected === false ){ - let index = this.selectedCityDatas.indexOf(cityName); + let index = this.selectedCityDatas.indexOf(cityName.name); this.selectedCityDatas.splice(index,1); } @@ -188,12 +219,14 @@ onChangeCityDatas($event){ /**on change function for Product to display the data as List in html page */ onChangeProductDatas($event){ - let productName = $event.source.value.name; + //let productName = $event.source.value.name; + let productName = this.productdatas.filter(product=>product.product_id == $event.source.value )[0]; + if($event.source._selected === true ){ - this.selectedProductDatas.push(productName); + this.selectedProductDatas.push(productName.name); } else if($event.source._selected === false ){ - let index = this.selectedProductDatas.indexOf(productName); + let index = this.selectedProductDatas.indexOf(productName.name); this.selectedProductDatas.splice(index,1); } diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.html b/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.html deleted file mode 100644 index b1a63ac70..000000000 --- a/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.html +++ /dev/null @@ -1,86 +0,0 @@ -
-

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}} - -
- -

- -
- - - - - - - -
- -
-
-
- \ No newline at end of file diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.scss b/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.scss deleted file mode 100644 index 3e80f0dbb..000000000 --- a/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.scss +++ /dev/null @@ -1,3 +0,0 @@ -mat-form-field{ - width:100%; -} \ No newline at end of file diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.spec.ts b/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.spec.ts deleted file mode 100644 index c23f17f93..000000000 --- a/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -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/pd-team/pd-team-dialog/pd-team-dialog.component.ts b/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.ts deleted file mode 100644 index 6a01db192..000000000 --- a/ng6-seed/src/app/settings/pd-team/pd-team-dialog/pd-team-dialog.component.ts +++ /dev/null @@ -1,537 +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'; -import { PdTeamService } from '../../service/masters/pd-team.service'; -import { NotifierService } from 'angular-notifier'; - -@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; -private notifier: NotifierService; -color = 'primary'; -citydatas: any[]; -lenderdatas: any[]; -errorMessage:string; -selectedValueForLender: any; -selectedValueForCity: any; -tempArray: Array<{lenderid: number, cityid: number}> = []; -PDTeamMapping: any[]; -AllPDTeamMapData: any[]; -PDTeamMaplen:any = 0; - - -constructor(private _formBuilder: FormBuilder,notifier: NotifierService, -private dialogRef: MatDialogRef, -private _pdTeamService: PdTeamService, -private _masterService: MastersService, -@Inject(MAT_DIALOG_DATA) public data: any) { - this.notifier = notifier; -} - - -ngOnInit() { - this.PdTeamFormDatas(); - if(isNaN(this.data.pdteam_id)){} - else{ - this._pdTeamService.getAllPdTeamMapListWithPK(this.data.pdteam_id) // note, removed this.countries = - .subscribe( - dataresult => { - if(dataresult.dataStatus == true){ - this.PDTeamMapping = dataresult.records; - this.PDTeamMaplen = this.PDTeamMapping.length; - } - }); - } - this._pdTeamService.getAllPdTeamMapList() // note, removed this.countries = - .subscribe( - dataresult => { - if(dataresult.dataStatus == true){ - this.AllPDTeamMapData = dataresult.records; - } - }); - - /** 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 !"); - this.notifier.notify('success', 'Record Successfully InActive.!'); - } - else{ - - //alert("SomeThing Wents Wrong Try Again !"); - this.notifier.notify('warning', 'Sorry 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._pdTeamForm.controls['fk_city_id'].value.city_id); - // console.log(this._pdTeamForm.controls['fk_lender_id'].value.entity_id); -if((this._pdTeamForm.controls['fk_city_id'].value.city_id != '') - &&(this._pdTeamForm.controls['fk_lender_id'].value.entity_id != '')) -{ - - 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(''); - this.notifier.notify('info', 'Already Exists.!'); - } - }); - - if(this.AllPDTeamMapData !== undefined){ - - this.AllPDTeamMapData.forEach(item => { - if(item.fk_team_id != this._pdTeamForm.controls['pdteam_id'].value){ - 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++; - //this.notifier.notify('success', 'Already Exists.!'); - //alert('Already Exists on Other Team "'+item.team_name+'"'); - this.notifier.notify( 'info', 'Already Exists on Other Team'+item.team_name ); - } - } - }); - } - - if(isNaN(this.data.pdteam_id)) {} - else{ -// 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.notifier.notify( 'info', '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( - //getAllPdTeam(); - (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=>{ - console.log(dataresult); -if (dataresult.dataStatus == true){ - //After Saving the data then popup close - this.dialogRef.close(); - //Need To Dispaly saving Datas - // alert("Data Saved Successfully"); - this.notifier.notify('success', 'Record Saved Successfully.!'); - } - else{ - //alert(""); - this.notifier.notify('warning', '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"); -this.notifier.notify('success', 'Record Edited Successfully.!'); - } - else{ - //alert("SomeThing Wents Wrong Try Again !"); - this.notifier.notify('warning', '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 = []; - } - isEmptyObject(obj) { - return (obj && (Object.keys(obj).length === 0)); - } - -} - -/** 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/pd-team/pd-team-edit/pd-team-edit.component.html b/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.html index be23374a8..42f4f724f 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.html +++ b/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.html @@ -28,7 +28,7 @@
- {{ cd.name }} + {{ cd.name }} You must Select Cities. @@ -47,7 +47,7 @@
- {{ pd.name }} + {{ pd.name }} You must Select Product. @@ -64,7 +64,7 @@ - {{csd.name}} + {{csd.name}} You must Select Customer Segment. @@ -77,7 +77,8 @@
- + +
diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.ts b/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.ts index 2bb0fa976..a0cc5afa9 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.ts +++ b/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.ts @@ -1,32 +1,35 @@ -import { Component, OnInit, Inject } from '@angular/core'; +import { Component, OnInit, Input } 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'; import { NotifierService } from 'angular-notifier'; -import { PdTeamDialogComponent } from '../pd-team-dialog/pd-team-dialog.component'; -import { Router } from '@angular/router'; - + +/** Here this component is like as a partent component */ +import { PdTeamListComponent } from './../pd-team-list/pd-team-list.component'; + @Component({ selector: 'app-pd-team-edit', templateUrl: './pd-team-edit.component.html', styleUrls: ['./pd-team-edit.component.scss'] }) + export class PdTeamEditComponent implements OnInit { public _pdTeamForm: FormGroup; public submitted = false; + private notifier: NotifierService; color = 'primary'; errorMessage:string; + + //This "childMessage" to get the function or data from partent component + @Input() public childMessage: any; //This Type Of Array Declaration for select dropdown to list the datas citydatas: any[]; @@ -34,8 +37,8 @@ export class PdTeamEditComponent implements OnInit { productdatas: any[]; customerSegmentdatas: any[]; - //This Type Of Array Declaration - pdTeamCityArray: Array<{teamid: number, cityid: number}> = []; + //This Type Of Array Declaration for Validation + pdTeamCityArray:any= []; pdTeamProductArray: Array<{teamid: number, productid: number}> = []; pdTeamCustomerSegmentArray: Array<{teamid: number, customerid: number}> = []; @@ -43,165 +46,213 @@ export class PdTeamEditComponent implements OnInit { selectedCityDatas : any=[]; selectedProductDatas : any=[]; selectedSegmentDatas : any=[]; + //EditDatasforFormGroup: any; constructor(private _formBuilder: FormBuilder, private _notifier: NotifierService, private _pdTeamService: PdTeamService, - private _router: Router, - private _masterService: MastersService) - { - this._notifier = _notifier; - } - + private _PdTeamListComponent: PdTeamListComponent, + private _masterService: MastersService) { + this.notifier = _notifier; + } + /** Onready function */ ngOnInit() { - this.PdTeamFormDatas(); + + this.PdTeamFormDatas(); + //console.log('hai I am Child This onready function',this.childMessage); + // this._pdTeamService.getAllPDTeamWithPDTeamID(this.childMessage).subscribe( + // dataresult => { + // console.log(dataresult); + // this.EditDatasforFormGroup = dataresult.records; + // console.log(this.EditDatasforFormGroup); + // }); + /** For Checking City Validation datas - checking purpose - Already exists are not */ + this._pdTeamService.getAllPdTeamCityMapping().subscribe( + dataresult => { + if(dataresult.dataStatus == true){ + //this.AllPDTeamMapData = dataresult.records; + this.pdTeamCityArray = dataresult.records; + } + }, error => this.errorMessage = error); + + /** To Display The City Data For City DropDown */ + this._masterService.getAllMasterData('CITY').subscribe( + dataresult => { + if (dataresult.dataStatus == true) { + this.citydatas = dataresult.records; + this.citydatas = this.citydatas.filter(city=>city.isactive == 1 ); + } + + }, error => this.errorMessage = error); + + /** To Display The Entities Data For Entities DropDown */ + this._masterService.getAllMasterData('ENTITY').subscribe( + dataresult => { + if (dataresult.dataStatus == true) { + this.lenderdatas = dataresult.records; + this.lenderdatas = this.lenderdatas.filter(entity=>entity.isactive == 1 ); + } + }, error => this.errorMessage = error); - /** To Display The City Data For City DropDown */ - 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); - - /** To Display The Entities Data For Entities DropDown */ - 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); - - /** To Display The Entities Data For Entities DropDown */ - this._masterService.getAllMasterData('PRODUCTS').subscribe( - dataresult => { - if (dataresult.status == 200) { - this.productdatas = dataresult.records; - this.productdatas = this.productdatas.filter(product=>product.isactive == 1 ); + /** To Display The Entities Data For Entities DropDown */ + this._masterService.getAllMasterData('PRODUCTS').subscribe( + dataresult => { + if (dataresult.dataStatus == true) { + this.productdatas = dataresult.records; + this.productdatas = this.productdatas.filter(product=>product.isactive == 1 ); + } + }, error => this.errorMessage = error); + + /** To Display The Entities Data For Entities DropDown */ + this._masterService.getAllMasterData('CUSTOMERSEGMENT').subscribe( + dataresult => { + if (dataresult.dataStatus == true) { + this.customerSegmentdatas = dataresult.records; + this.customerSegmentdatas = this.customerSegmentdatas.filter(segment=>segment.isactive == 1 ); + } + }, error => this.errorMessage = error) } - }, error => this.errorMessage = error); - - /** To Display The Entities Data For Entities DropDown */ - this._masterService.getAllMasterData('CUSTOMERSEGMENT').subscribe( - dataresult => { - if (dataresult.status == 200) { - this.customerSegmentdatas = dataresult.records; - this.customerSegmentdatas = this.customerSegmentdatas.filter(segment=>segment.isactive == 1 ); - } - }, error => this.errorMessage = error); - } /** Pd Team Form Datas */ PdTeamFormDatas(){ - this._pdTeamForm = this._formBuilder.group({ - pdteam_id: [null, Validators.compose([Validators.required])], - team_name: [null, Validators.compose([Validators.required])], - fk_lender: [null, Validators.compose([Validators.required])], - fk_city: [null, Validators.compose([Validators.required])], - fk_customer_segment: [null, Validators.compose([Validators.required])], - fk_product:[null, Validators.compose([Validators.required])], + //console.log('Patricular pdteam_id Datas',this.childMessage); + // let PdTeamcity:any = []; + // for (let ptc of this.childMessage[0].CITYMAP) { + // //PdTeamcity.push(ptc); + // PdTeamcity.push(this.citydatas.filter(dataresults => this.selectedCityDatas == ptc)); + // //this._pdTeamForm.controls['fk_city'].setValue(PdTeamcity); + // } + // console.log('PdTeamcity',PdTeamcity); + + let PdTeamCity:any = []; + for(let ptc of this.childMessage[0].CITYMAP){ + PdTeamCity.push(ptc.city_id); + } + + let PdTeamProduct:any = []; + for(let ptp of this.childMessage[0].PRODUCTS){ + PdTeamProduct.push(ptp.product_id); + } + + let PdTeamCS:any = []; + for(let ptcs of this.childMessage[0].CUSTOMERSEGMENT){ + PdTeamCS.push(ptcs.customer_segment_id); + } + + this._pdTeamForm = this._formBuilder.group({ + pdteam_id: [this.childMessage[0].pdteam_id, Validators.compose([Validators.required])], + team_name: [this.childMessage[0].team_name, Validators.compose([Validators.required])], + fk_lender: [this.childMessage[0].fk_lender_id, Validators.compose([Validators.required])], + fk_city: [PdTeamCity, Validators.compose([Validators.required])], + fk_customer_segment: [PdTeamCS, Validators.compose([Validators.required])], + fk_product:[PdTeamProduct, Validators.compose([Validators.required])], }); + } /** convenience getter for easy access to form fields */ get f() { return this._pdTeamForm.controls; } - + /** For Popup Close Button */ onNoClick(): void { - this._router.navigate(['/setting/pdteam/pdteamlist']); + this._PdTeamListComponent.changeListView(); } - /** To Save/Edited Popup Data */ - /** To Save/Edited Popup Data */ - onSubmit() { - this.submitted = true; - // stop here if form is invalid - if (this._pdTeamForm.invalid) { - // this.errorMessage = "Please Fill All Mandate Fields."; - // return; - alert('Please Fill All Mandate Fields.'); - } else { - - var pdTeamFormValues = this._pdTeamForm.value; - - //To Remove The "Null" With Key also - Object.keys(pdTeamFormValues).forEach( - (key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key]); - - this._pdTeamService.addPdTeamDetail(this._pdTeamForm.value).subscribe( - dataresult => { - if (dataresult.status == 200) { - console.log(dataresult); - // this._notifier.notify('success', 'Record Saved Successfully.!'); - alert('Record Saved Successfully.!'); - this._router.navigate(['/setting/pdteam/pdteamlist']); - this._pdTeamForm.reset(); - } - else { - //this._notifier.notify('warning', 'Something Wents Wrong Try Again.!'); - alert('Some Thing Wents Wrong Try Again !'); - //this.errorMessage = "Some Thing Wents Wrong Try Again !"; - } - }, error => { - // this._notifier.notify('warning', 'Something Wents Wrong Try Again.!'); - // this.errorMessage = "Something Wents Wrong Try Again !"; - alert('Some Thing Wents Wrong Try Again !'); - }); - } - } - - /** To Reset Popup Data For Add*/ - - onResetForAdd(){ - alert("reset function"); + onResetForEdit(){ + this.PdTeamFormDatas(); } /**on change function for customer segment to dispaly the as List in html page */ onChangeCustomerSegmentDatas($event){ - let CustomerSegmentName = $event.source.value.name; + //let CustomerSegmentName = $event.source.value.name; + let CustomerSegmentName = this.customerSegmentdatas.filter(cs=>cs.customer_segment_id == $event.source.value)[0]; + if($event.source._selected === true ){ - this.selectedSegmentDatas.push(CustomerSegmentName); + this.selectedSegmentDatas.push(CustomerSegmentName.name); } else if($event.source._selected === false ){ - let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName); + let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName.name); this.selectedSegmentDatas.splice(index,1); } } /**on change function for City to display the as List in html page */ onChangeCityDatas($event){ + var mycheck = 0 ; + //let cityName = $event.source.value; + let cityName = this.citydatas.filter(city=>city.city_id == $event.source.value)[0]; + + if($event.source._selected === true ){ + + for(let Duplication_City of this.pdTeamCityArray){ + + let teamname = Duplication_City.team_name; + let dup_cityname = Duplication_City.CITYMAP.filter(city=>city.city_id == $event.source.value); + + if(dup_cityname != ''){ + for(let data of dup_cityname){ + + if(data.name == cityName.name){ + alert('"'+data.name+'" Already Existing with "'+ teamname +'"'); + $event.source._selected = false; + mycheck++; + } - let cityName = $event.source.value.name; - if($event.source._selected === true ){ - this.selectedCityDatas.push(cityName); - } - else if($event.source._selected === false ){ - let index = this.selectedCityDatas.indexOf(cityName); - this.selectedCityDatas.splice(index,1); - } - + } + } + } + + if(mycheck == 0){ + this.selectedCityDatas.push(cityName.name); + } + + } + else if($event.source._selected === false ){ + let index = this.selectedCityDatas.indexOf(cityName.name); + this.selectedCityDatas.splice(index,1); + } } - + /**on change function for Product to display the data as List in html page */ onChangeProductDatas($event){ - - let productName = $event.source.value.name; + + //let productName = $event.source.value.name; + let productName = this.productdatas.filter(product=>product.product_id == $event.source.value )[0]; if($event.source._selected === true ){ - this.selectedProductDatas.push(productName); + this.selectedProductDatas.push(productName.name); } else if($event.source._selected === false ){ - let index = this.selectedProductDatas.indexOf(productName); + let index = this.selectedProductDatas.indexOf(productName.name); this.selectedProductDatas.splice(index,1); } + + } + + /** To Edited form Data */ + onSubmit() { + + var pdTeamFormValues = this._pdTeamForm.value; + Object.keys(pdTeamFormValues).forEach( + (key) => ( pdTeamFormValues[key] == null) && delete pdTeamFormValues[key]); + + this._pdTeamService.editPdTeamDetail(pdTeamFormValues).subscribe( + + dataresult=>{ + if (dataresult.dataStatus == true){ + alert("Data Edited Successfully"); + this.notifier.notify('success', 'Record Edited Successfully.!'); + } + else{ + alert("SomeThing Wents Wrong Try Again !"); + this.notifier.notify('warning', 'SomeThing Wents Wrong Try Again !'); + } + }); } - } - /** End Of PD TEAM ADD Component */ \ No newline at end of file +} +/** End Of PD Team Edit Component */ \ No newline at end of file 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 80bb14541..848631ed1 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 @@ -1,4 +1,5 @@ - +
+
PD Team Masters @@ -22,9 +23,7 @@
- - - + Sl @@ -67,7 +66,7 @@ Actions - + @@ -79,7 +78,10 @@
- - - \ No newline at end of file +
+
+ +
+ +
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 892b0e2f7..390529b82 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 @@ -11,8 +11,6 @@ import { PdTeamService } from '../../service/masters/pd-team.service'; import { NotifierService } from 'angular-notifier'; -/** Dialog Component */ -import { PdTeamDialogComponent } from '../pd-team-dialog/pd-team-dialog.component'; /** Add Component */ //import { } from '../pd-team-add/pd-team-add.component; /** Edit Component */ @@ -33,10 +31,13 @@ export class PdTeamListComponent implements OnInit { color = 'primary'; userData = null; noRecordFound: boolean = false; + private notifier: NotifierService; - + public listView: any = true; public dataLength: number; public dataSource = new MatTableDataSource(); + public parentMessage: any = []; + displayedColumns = ['serialno','team_name','lender_name','actions','isactive']; @ViewChild(MatPaginator) paginator: MatPaginator; @@ -50,7 +51,7 @@ export class PdTeamListComponent implements OnInit { this.notifier = notifier; } - ngOnInit() {} + ngOnInit() { this.getPdTeam(); } /** To add data */ addPdTeam() { @@ -58,10 +59,22 @@ export class PdTeamListComponent implements OnInit { } /** To edit data */ - editPdTeam() { - this.router.navigate(['/setting/pdteam/editpdteam']); + editPdTeam(detail){ + + this._PdTeamService.getAllPDTeamWithPDTeamID(detail).subscribe( + dataresult => { + this.parentMessage = dataresult; + this.parentMessage = this.parentMessage.records; + this.listView = false; + + }); } + changeListView(){ + this.getPdTeam(); + this.listView = true; + } + /** To get data for listing */ getPdTeam() { 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 c17d54794..cc7958bc3 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 @@ -1,6 +1,8 @@ import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { CommonModule } from '@angular/common'; +import { NotifierModule, NotifierOptions } from 'angular-notifier'; +import { FlexLayoutModule } from '@angular/flex-layout'; import { MatCardModule, MatIconModule, @@ -17,19 +19,17 @@ import { MatTooltipModule } from '@angular/material/tooltip'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { NgxMatSelectSearchModule } from 'ngx-mat-select-search'; import { NgxDatatableModule } from '@swimlane/ngx-datatable'; -import { NotifierModule, NotifierOptions } from 'angular-notifier'; -import { FlexLayoutModule } from '@angular/flex-layout'; -import { PdTeamDialogComponent } from './pd-team-dialog/pd-team-dialog.component'; import { PdTeamListComponent } from './pd-team-list/pd-team-list.component'; +import { PdTeamAddComponent } from './pd-team-add/pd-team-add.component'; +import { PdTeamEditComponent } from './pd-team-edit/pd-team-edit.component'; + /** Route */ import { PdTeamRoutes } from './pd-team.routing'; /** Service */ import { PdTeamService } from '../service/masters/pd-team.service'; -import { PdTeamAddComponent } from './pd-team-add/pd-team-add.component'; -import { PdTeamEditComponent } from './pd-team-edit/pd-team-edit.component'; /** * Custom angular notifier options @@ -100,12 +100,13 @@ const customNotifierOptions: NotifierOptions = { MatTooltipModule, NotifierModule.withConfig(customNotifierOptions), ], - declarations: [PdTeamDialogComponent, + declarations: [ PdTeamListComponent, PdTeamAddComponent, PdTeamEditComponent], - providers: [PdTeamService ], - entryComponents: [PdTeamDialogComponent] + providers: [PdTeamService] + + //entryComponents: [PdTeamDialogComponent] }) export class PdTeamModule { } 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 d2a4dbc68..1b339e139 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 @@ -25,6 +25,7 @@ export class PdTeamService { //private apiUrl = "http://ssa.sineedge.com/sparqapi/api/"; private apiUrl = "http://localhost/sparqapi/api/"; + pk: { "primary_key": any; }; constructor(private _http: HttpClient, @@ -37,7 +38,7 @@ private apiUrl = "http://localhost/sparqapi/api/"; * 1st argument is "Records": any - Set of Data To Adding to database */ addPdTeamDetail(Records: any): Observable { - console.log('From Service Data',Records); + console.log('Add PD team Details In Service',Records); 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 @@ -58,7 +59,7 @@ return this._http.post(this.apiUrl+"savePDTeam", ArrayData) * 1st argument is "Records": any - Set of Updated Data */ editPdTeamDetail(Records: any): Observable { - + console.log('Update PD team Details In Service',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 @@ -134,16 +135,24 @@ return this._http.post(this.apiUrl+"savePDTeam", ArrayData) * 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', [])) - ) + getAllPdTeam(): Observable { + + return this._http.post(this.apiUrl+'getListOfPDTeam','') + .pipe( + catchError(this.handleError('role', [])) + ) } + getAllPDTeamWithPDTeamID(Primarykey): Observable { - /** Get All PD Team Child Data using API call Based on Primary Key */ + var pk = { "primary_key":Primarykey } + return this._http.post(this.apiUrl+'getListOfPDTeam',pk) + .pipe( + catchError(this.handleError('role', [])) + ) +} + + // /** Get All PD Team Child Data using API call Based on Primary Key */ getAllPdTeamMapListWithPK(Primarykey): Observable { var pk = { "primary_key":Primarykey } @@ -165,6 +174,14 @@ return this._http.post(this.apiUrl+"savePDTeam", ArrayData) ) } + getAllPdTeamCityMapping(): Observable { + //var vaildateKey = { "vaildate_key": 'cityvaildation1' } + return this._http.get(this.apiUrl+'getListOfPDTeamCityMapping') + .pipe( + catchError(this.handleError('role', [])) + ) + } + /** * TO get City Data For Listing Screen @@ -192,12 +209,11 @@ return this._http.post(this.apiUrl+"savePDTeam", ArrayData) /** * */ -getAllPdTeam(): Observable { - return this._http.get(this.apiUrl+'getListOfPDTeam') - .pipe( - catchError(this.handleError('role', [])) - ) - -} +// getAllPdTeam(): Observable { +// return this._http.get(this.apiUrl+'getListOfPDTeam') +// .pipe( +// catchError(this.handleError('role', [])) +// ) +// } } \ No newline at end of file diff --git a/ng6-seed/src/assets/styles/scss/_app.variables.scss b/ng6-seed/src/assets/styles/scss/_app.variables.scss index cab788b37..406ea8711 100644 --- a/ng6-seed/src/assets/styles/scss/_app.variables.scss +++ b/ng6-seed/src/assets/styles/scss/_app.variables.scss @@ -37,7 +37,7 @@ $main-bg-color:linear-gradient(58deg, #f44336, #673ab7); // // Typography // -$font-size-base: 0.875rem !default; +$font-size-base: 1.2rem !default; $font-weight-base: 400 !default; $font-weight-medium: 500 !default; $font-weight-bold: 600 !default; diff --git a/ng6-seed/src/assets/styles/scss/_material.variables.scss b/ng6-seed/src/assets/styles/scss/_material.variables.scss index c218bf189..160dee2cb 100644 --- a/ng6-seed/src/assets/styles/scss/_material.variables.scss +++ b/ng6-seed/src/assets/styles/scss/_material.variables.scss @@ -4,7 +4,7 @@ @import '~@angular/material/theming'; /**-- $primary: mat-palette($mat-deep-purple); --*/ -$primary: mat-palette($mat-light-blue); +$primary: mat-palette($mat-red); $accent: mat-palette($mat-amber, A200, A100, A400); $warn: mat-palette($mat-red); $theme: mat-light-theme($primary, $accent, $warn); @@ -24,5 +24,5 @@ $dark-foreground: map-get($dark-theme, foreground); - + diff --git a/ng6-seed/src/assets/styles/scss/core/_main-header.scss b/ng6-seed/src/assets/styles/scss/core/_main-header.scss index 38eee1653..c33d92320 100644 --- a/ng6-seed/src/assets/styles/scss/core/_main-header.scss +++ b/ng6-seed/src/assets/styles/scss/core/_main-header.scss @@ -91,10 +91,10 @@ mat-toolbar { .head-menu { font-size: 1.3rem !important; border-bottom: 2px solid rgba(255, 255, 255, 0.2); - background: linear-gradient(58deg, #f44336, #673ab7); + background: linear-gradient(58deg, #ca2126, #ca2126); color: #fff; &:hover { - background: linear-gradient(58deg, #f44336, #673ab7); + background: linear-gradient(58deg, #ca2126, #673ab7); } } img { diff --git a/ng6-seed/src/assets/styles/scss/core/_main-sidebar.scss b/ng6-seed/src/assets/styles/scss/core/_main-sidebar.scss index 46d4e3064..67cb61bff 100644 --- a/ng6-seed/src/assets/styles/scss/core/_main-sidebar.scss +++ b/ng6-seed/src/assets/styles/scss/core/_main-sidebar.scss @@ -39,7 +39,7 @@ flex-direction: row; align-items: center; height: 48px; - padding: 0 16px; + padding: 0 8px; color: $sidebar-menu-color; } .sub-menu { diff --git a/ng6-seed/src/assets/styles/scss/material/_buttons.scss b/ng6-seed/src/assets/styles/scss/material/_buttons.scss index 1a100dade..bde7a368f 100644 --- a/ng6-seed/src/assets/styles/scss/material/_buttons.scss +++ b/ng6-seed/src/assets/styles/scss/material/_buttons.scss @@ -11,6 +11,10 @@ $mat-fab-padding: 16px !default; } } +[mat-raised-button] { + color:red; +} + [mat-icon-button] { &[mat-button-sm] { padding: 0; From 30073db984086df9041fc53f2cabb52917b519b4 Mon Sep 17 00:00:00 2001 From: venbaSriram Date: Fri, 12 Oct 2018 13:38:50 +0530 Subject: [PATCH 03/11] 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 04/11] 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 05/11] 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 06/11] 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 07/11] 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; + } From 61c050d728f824c61e48cf5c792d596741eaac1e Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Sat, 13 Oct 2018 10:18:22 +0530 Subject: [PATCH 08/11] pd view changes --- .../list-pd/add-pd/add-pd.component.html | 134 +++++++----- .../list-pd/add-pd/add-pd.component.ts | 196 +++++++++++------- .../manage-pd/list-pd/list-pd.component.html | 7 +- .../manage-pd/list-pd/list-pd.component.ts | 5 + .../map-pd-view/map-pd-view.component.html | 2 +- .../pd-allocation.component.html | 43 ++++ .../pd-allocation.component.scss | 3 + .../pd-allocation/pd-allocation.component.ts | 90 ++++++++ .../list-pd/view-pd/view-pd.component.html | 87 ++++++++ .../list-pd/view-pd/view-pd.component.scss | 3 + .../list-pd/view-pd/view-pd.component.spec.ts | 25 +++ .../list-pd/view-pd/view-pd.component.ts | 94 +++++++++ .../manage-pd/manage-pd.module.ts | 5 +- .../manage-pd/manage-pd.routing.ts | 6 + .../template/questions/add/add.component.html | 2 +- 15 files changed, 578 insertions(+), 124 deletions(-) create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.html create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.scss create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.scss create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.spec.ts create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html index 65cb39c83..3e43f0da0 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html @@ -1,7 +1,11 @@ -
- -
+ + + +
+ +
@@ -11,67 +15,81 @@ - - + {{LL.full_name}} - Lender name is required. + + - Applicant id is required. + Applicant ID Required + + + + {{billL.billing_name}} + + + + + + + Contact Person Required + + + + Contact Number Required + - + {{PL.product_name}} - Product is required. + - + {{SPL.subproduct_name}} - Sub product is required. + - + {{CSL.customer_segment}} - Customer segment is required. + - + {{PDL.type_name}} - PD type is required. + - - Amount is required. - + + - - Address1 required. - + + @@ -82,31 +100,31 @@ - + {{SL.state_name}} - State is required. + - + ` {{CL.city_name}} - City is required. + - - Pincode is required. + + -
+
@@ -133,22 +151,23 @@ - - Name is required. + + - + - - Email number is required. + + + + + + + + - - - Mobile number is required. - - - +
@@ -169,8 +188,19 @@ - - + + + + {{rel.name}} + + + + +
+ + + +
@@ -182,7 +212,7 @@
Co-Applicant
- + @@ -197,7 +227,7 @@ - + @@ -213,7 +243,12 @@ - + +
+ + + +
@@ -228,10 +263,15 @@ --> - - + + + + + + \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts index 3cf94ed47..0ed9a60ae 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts @@ -15,6 +15,9 @@ import { AwsService } from '../../../../AwsService/aws.service'; export class AddPdComponent implements OnInit, OnDestroy { //@Output() loadParent = new EventEmitter(); cancelStatus: boolean; + enablePDButton: boolean; + draftStatus: boolean; + PDTriggerStatus: boolean; private notifier: NotifierService; public _PDtriggerForm: FormGroup; items: FormArray; @@ -25,15 +28,17 @@ export class AddPdComponent implements OnInit, OnDestroy { stateList:any; cityList:any; pdTypeList:any; + billingList: any; + relationShipList: any; errorMessage: any; // Dynamic co applicant createWithLongContent = false; dynamicCoApplicant = []; - allocationTypeModel: number; - allocationTypeCheck: boolean; - subAllocationTypeCheck: boolean; - allocationLabel: string; - subAllocationLabel: string; + //allocationTypeModel: number; + //allocationTypeCheck: boolean; + //subAllocationTypeCheck: boolean; + //allocationLabel: string; + //subAllocationLabel: string; constructor(notifier: NotifierService,private _fb: FormBuilder,private route: ActivatedRoute, private router: Router,private _pd: PdTrigerService, private _aws:AwsService, private ListPdComponent: ListPdComponent) { this.notifier = notifier; @@ -42,6 +47,9 @@ export class AddPdComponent implements OnInit, OnDestroy { public totalFileName = []; public lengthCheckToaddMore =0; ngOnInit() { + this.draftStatus=false; + this.PDTriggerStatus=true; + this.enablePDButton=false; this.cancelStatus = false; this.ListPdComponent.pdListLoad(false); this.getLenderList(); @@ -49,31 +57,46 @@ export class AddPdComponent implements OnInit, OnDestroy { this.getCustomerSegmentList(); this.getStateCityList(); this.getPDTypeList(); + this.getRelationMaster(); this._PDtriggerForm = this._fb.group({ - fk_lender_id: [null, Validators.compose([Validators.required])], + fk_lender_id: [null], lender_applicant_id: [null, Validators.compose([Validators.required])], - fk_product_id: [null, Validators.compose([Validators.required])], - fk_subproduct_id: [null, Validators.compose([Validators.required])], - fk_pd_type: [null, Validators.compose([Validators.required])], - fk_customer_segment: [null, Validators.compose([Validators.required])], - loan_amount: [null, Validators.compose([Validators.required])], - applicant_name: [null, Validators.compose([Validators.required])], - mobile_no: [null, Validators.compose([Validators.required])], - email: [null, Validators.compose([Validators.required, CustomValidators.email])], -   addressline1: [null, Validators.compose([Validators.required])], + lender_contact_person: [null, Validators.compose([Validators.required])], + lender_contact_mobile: [null, Validators.compose([Validators.required])], + lender_billing: [null], + fk_product_id: [null], + fk_subproduct_id: [null], + fk_pd_type: [null], + fk_customer_segment: [null], + loan_amount: [null], + applicant_name: [null], + mobile_no: [null], + email: [null], +   addressline1: [null], addressline2: [null], addressline3: [null], - fk_city: [null, Validators.compose([Validators.required])], - fk_state: [null, Validators.compose([Validators.required])], -   pincode : [null, Validators.compose([Validators.required])], -   allocation_type: [null], -   sub_allocation_type: [null], + fk_city: [null], + fk_state: [null], +   pincode : [null], +   // allocation_type: [null], +   // sub_allocation_type: [null], items: this._fb.array([]), documents: this._fb.array([]) }); - + this.OnChanges(); } + // enable pd trigger submit function + OnChanges(): void{ + this._PDtriggerForm.valueChanges.subscribe(val => { + if(val.fk_lender_id && val.fk_product_id && val.fk_subproduct_id && val.fk_pd_type && val.fk_customer_segment && val.loan_amount && val.applicant_name && val.mobile_no && val.addressline1 && val.fk_city && val.fk_state && val.pincode){ + this.enablePDButton=true; + } + else{ + this.enablePDButton=false; + } + }); + } getLenderList(){ this._pd.getLenderDetails().subscribe( data => { @@ -112,29 +135,34 @@ export class AddPdComponent implements OnInit, OnDestroy { data => { if (data.status == 200) { this.pdTypeList=data.records.pd_type; - if(data.records.pd_allocation_type){ - let getDefaultAllocation= data.records.pd_allocation_type.filter(item => item.default == 1); - if(getDefaultAllocation[0].pd_allocation_type_id==1){ - this.allocationTypeModel=1; - this.allocationTypeCheck=false; - this.subAllocationTypeCheck=false; - this.allocationLabel="Auto"; - this.subAllocationLabel="Load Balance"; - } - else if(this.allocationTypeModel[0].pd_allocation_type_id==2){ - this.allocationTypeModel=2; - this.allocationTypeCheck=false; - this.subAllocationTypeCheck=true; - this.allocationLabel="Auto"; - this.subAllocationLabel="Nearest"; - } - else if(this.allocationTypeModel[0].pd_allocation_type_id==3){ - this.allocationTypeModel=3; - this.allocationTypeCheck=true; - this.allocationLabel="Manual"; - } + + //start hide pd allocation type functinality + + // if(data.records.pd_allocation_type){ + // let getDefaultAllocation= data.records.pd_allocation_type.filter(item => item.default == 1); + // if(getDefaultAllocation[0].pd_allocation_type_id==1){ + // this.allocationTypeModel=1; + // this.allocationTypeCheck=false; + // this.subAllocationTypeCheck=false; + // this.allocationLabel="Auto"; + // this.subAllocationLabel="Load Balance"; + // } + // else if(this.allocationTypeModel[0].pd_allocation_type_id==2){ + // this.allocationTypeModel=2; + // this.allocationTypeCheck=false; + // this.subAllocationTypeCheck=true; + // this.allocationLabel="Auto"; + // this.subAllocationLabel="Nearest"; + // } + // else if(this.allocationTypeModel[0].pd_allocation_type_id==3){ + // this.allocationTypeModel=3; + // this.allocationTypeCheck=true; + // this.allocationLabel="Manual"; + // } - } + // } + + // end } }, error => this.errorMessage = error); @@ -151,6 +179,23 @@ export class AddPdComponent implements OnInit, OnDestroy { this.cityList= this.stateList.filter(item => item.state_id == stateID); this.cityList=this.cityList[0].cities; } + + // lendor billing address + getBillingDetails(lendorID:string){ + this.billingList= this.lenderList.filter(item => item.entity_id == lendorID); + this.billingList=this.billingList[0].billing_address; + } + // get relation master details + getRelationMaster(){ + let relation ="RELATIONSHIPS"; + this._pd.getAllMasterDatas(relation).subscribe( + data => { + if (data.status == 200) { + this.relationShipList=data.records; + + } + }, error => this.errorMessage = error); + } createItem(): FormGroup { return this._fb.group({ label: ['Co Applicant'], @@ -191,10 +236,14 @@ export class AddPdComponent implements OnInit, OnDestroy { get documents(): FormArray { return this._PDtriggerForm.get('documents') as FormArray; }; - get pdMain() { return this._PDtriggerForm.controls; } + get pdMain() { + return this._PDtriggerForm.controls; } get pdCoApplicant() { return this._PDtriggerForm.get('items') as FormArray; } - + removeCoApplicant(i: number) { + const control = this._PDtriggerForm.controls['items']; + control.removeAt(i); + } removeItem(index: number) { this.totalfiles.splice(index,1); this.totalFileName.splice(index,1); @@ -229,13 +278,16 @@ export class AddPdComponent implements OnInit, OnDestroy { this.lengthCheckToaddMore=1; } } - submitPdDetails(formValue: any) { + submitPdDetails(formValue: any, status:boolean) { if(this._PDtriggerForm.valid){ // let my_array = this.PDtriggerForm.value; // Object.keys(my_array).forEach((key) => ( my_array[key] == null) && delete my_array[key]); let pd_details:any={ "fk_lender_id":formValue.fk_lender_id, "lender_applicant_id":formValue.lender_applicant_id, + "lender_billing_id":formValue.lender_billing, + "lender_contact_person":formValue.lender_contact_person, + "lender_contact_mobile":formValue.lender_contact_mobile, "fk_product_id":formValue.fk_product_id, "fk_subproduct_id":formValue.fk_subproduct_id, "fk_pd_type":formValue.fk_pd_type, @@ -247,7 +299,8 @@ export class AddPdComponent implements OnInit, OnDestroy { "fk_city":formValue.fk_city, "fk_state":formValue.fk_state, "pincode":formValue.pincode , - "fk_pd_allocation_type":this.allocationTypeModel , + "pd_status": status, + //"fk_pd_allocation_type":this.allocationTypeModel , "fk_createdby" : this._aws.getlocale(), "createdon": new Date().toJSON().slice(0,19).replace('T',' ') }; @@ -306,29 +359,32 @@ export class AddPdComponent implements OnInit, OnDestroy { }); } } - changeAllocationType(status: boolean) { - if(status){ - this.allocationTypeModel=3; - this.allocationLabel="Manual"; - } - else{ - this.allocationTypeModel=1; - this.allocationLabel="Auto"; - this.subAllocationLabel="Load Balance"; - } - } - changeSubAllocationType(status: boolean){ - if(status){ - this.allocationTypeModel=2; - this.allocationLabel="Auto"; - this.subAllocationLabel="Nearest"; - } - else{ - this.allocationTypeModel=1; - this.allocationLabel="Auto"; - this.subAllocationLabel="Load Balance"; - } - } + // start hide allocation type functionality + + // changeAllocationType(status: boolean) { + // if(status){ + // this.allocationTypeModel=3; + // this.allocationLabel="Manual"; + // } + // else{ + // this.allocationTypeModel=1; + // this.allocationLabel="Auto"; + // this.subAllocationLabel="Load Balance"; + // } + // } + // changeSubAllocationType(status: boolean){ + // if(status){ + // this.allocationTypeModel=2; + // this.allocationLabel="Auto"; + // this.subAllocationLabel="Nearest"; + // } + // else{ + // this.allocationTypeModel=1; + // this.allocationLabel="Auto"; + // this.subAllocationLabel="Load Balance"; + // } + // } + // end loadPdListCompoent(from:boolean) { if(from){ this.router.navigate([ '../../' ], { relativeTo: this.route }); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.html index 6a958309b..b3922d059 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.html @@ -1,6 +1,6 @@
- - + +
@@ -25,7 +25,7 @@
- + @@ -124,6 +124,7 @@ + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.ts index 28305196a..791e98d32 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.ts @@ -79,6 +79,11 @@ export class ListPdComponent implements OnInit, OnDestroy { this.viewPdList = status; this.loadPDDetails(); } + viewPDDetails(pdid:string){ + this.viewPdList = !this.viewPdList; + this.router.navigate([ '../pdlist/viewpd',pdid], { relativeTo: this.route }); + + } ngOnDestroy(): void { this.viewPdList=false; } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.html index 5ea9b073b..9996d99eb 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.html @@ -1,7 +1,7 @@
- +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.html new file mode 100644 index 000000000..d677abc20 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.html @@ -0,0 +1,43 @@ +
+ + + {{pageTitle}} + + + + + + +

+ {{officer.first_name}} +

+

+ Allocated +

+

+ Scheduled +

+

+ Inprogress +

+ +
+
+ + +

PD officer not available..

+
+
+
+ + +
+ +
+
+
+ + + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.scss new file mode 100644 index 000000000..6e263adae --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.scss @@ -0,0 +1,3 @@ +.example-full-width{ + width: 100%; +} \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts new file mode 100644 index 000000000..842a1884f --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts @@ -0,0 +1,90 @@ +import { Component, OnInit, Inject } from '@angular/core'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; +import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms'; +import { NotifierService } from 'angular-notifier'; +import { PdTrigerService } from '../../../pd-service/pd-triger.service'; + +@Component({ + selector: 'app-pd-allocation', + templateUrl: './pd-allocation.component.html', + styleUrls: ['./pd-allocation.component.scss'] +}) +export class PdAllocationComponent implements OnInit { + public pageTitle: string = "PD Allocation To"; + public _pdAllocationForm: FormGroup; + public pdOfficerList: any = []; + errorMessage: any; + notifier : NotifierService; + selectedItem:any; + isDisabled: boolean; + constructor( notifier: NotifierService, + private _fb: FormBuilder, + private dialogRef: MatDialogRef, + private _pd: PdTrigerService, + @Inject(MAT_DIALOG_DATA) public data: any) { + this.notifier=notifier; + } + + ngOnInit() { + this.isDisabled=true; + this.getPDOfficerList(this.data.pd_id); + + // this._pdAllocationForm = this._fb.group({ + // pd_primary_id: [null], + // allocation_id: [null], + // }); + } + +// convenience getter for easy access to form fields +// get readForm() { return this._pdAllocationForm.controls; } + +// pd officer list + getPDOfficerList(pdID:string){ + this._pd.getPdOfficerList(pdID).subscribe( + data => { + if (data.status == 200) { + this.pdOfficerList=data.records; + + } + }, error => this.errorMessage = error); + + } + // select pd officer list + selectPdOfficer(selected:any){ + this.isDisabled=false; + this.selectedItem=selected; + // this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + + } + /** To update pd officer*/ + updatePdOfficer(allocateDate:any) { + if(this.isDisabled){ + this.notifier.notify('warning', 'Please Choose PD Officer.!'); + } + else { + let updateData = { + "pd_id":this.data.pd_id, + "fk_pd_allocated_to":allocateDate.fk_user_id, + } + this._pd.updatePdOfficer(updateData).subscribe( + result => { + if (result.status == 200) { + this.notifier.notify('success', 'PD Allocated.!'); + this.dialogRef.close(); + } + else { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + this.errorMessage = "Something Wents Wrong Try Again.!"; + } + }, error => { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + this.errorMessage = "Some Thing Wents Wrong Try Again.!"; + // this.dialogRef.close(); + }); + } + } +/** For Popup Close Button */ + closeAllocationComponent(): void { + this.dialogRef.close(); + } +} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html new file mode 100644 index 000000000..ecb9de82e --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html @@ -0,0 +1,87 @@ +
+ +
+ +
+ + + +
+ + + {{master.lender_full_name}} - {{master.lender_applicant_id}} + +  {{master.city_name}} / {{master.state_name}}-{{master.pincode}} + + + +

{{master.product_name}} / {{master.subproduct_name}}

+

{{master.pd_type_name}}   {{master.pd_allocation_type_name}}    {{master.pd_allocated_to}}

+

{{master.addressline1}}

+

{{master.addressline2}}

+

{{master.addressline3}}

+ +

 {{master.loan_amount}}    {{master.pd_status_name}}   {{master.pd_date_of_initiation}}

+ +
+
+ + + +
+ +
+ + Applicants + + + + +

+ +  {{applicant.applicant_name}}     + +  {{applicant.mobile_no}}     Main Applicant +    {{applicant.relation}} +

+ + +
+ +
+ +
+ +
+ + + + + Documents + + + + +

+ {{documents.pd_document_title}}     + +  {{documents.pd_document_name}} +

+
+ +
+ +
+ + + + PD History + + + + + + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.scss new file mode 100644 index 000000000..fd48f4449 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.scss @@ -0,0 +1,3 @@ +.cardEdit { + display: inline;float:right;padding-top:3%; +} \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.spec.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.spec.ts new file mode 100644 index 000000000..51de6afa9 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ViewPdComponent } from './view-pd.component'; + +describe('ViewPdComponent', () => { + let component: ViewPdComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ViewPdComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ViewPdComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts new file mode 100644 index 000000000..ee8a7e8cc --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts @@ -0,0 +1,94 @@ +import { Component, OnInit,ViewEncapsulation, EventEmitter, Input, Output, OnDestroy } from '@angular/core'; +import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; +import { MatDialog } from '@angular/material'; +import { NotifierService } from 'angular-notifier'; +import { PdTrigerService } from '../../../pd-service/pd-triger.service'; +import { PdAllocationComponent } from '../pd-allocation/pd-allocation.component'; +import { ListPdComponent } from '../list-pd.component'; +@Component({ + selector: 'app-view-pd', + templateUrl: './view-pd.component.html', + styleUrls: ['./view-pd.component.scss'], + encapsulation: ViewEncapsulation.None +}) +export class ViewPdComponent implements OnInit, OnDestroy { + + private notifier:NotifierService; + errorMessage: any; + pdMasterData: any; + pdApplicantData: any; + pdDocumentsData: any; + pdLogsData: any; + viewID:string; + viewParams:any; + // @Input() childData: string; + // @Output() loadParent = new EventEmitter(); + public _EditPDtriggerForm:FormGroup; + constructor(notifier:NotifierService,private dialog: MatDialog,private _fb: FormBuilder, + private _pd: PdTrigerService,private route: ActivatedRoute,private router: Router, private ListPdComponent: ListPdComponent) { + this.notifier=notifier + } + + ngOnInit() { + this.ListPdComponent.pdListLoad(false); + this.route.params.subscribe(params => { + this.viewID = params['pdid']; + }); + + this.viewPdDetails(this.viewID); + } + viewPdDetails(editID:string){ + this._pd.editPdDetails(editID).subscribe( + data => { + if (data.status == 200) { + this.pdMasterData=data.records.pd_master_details; + this.pdApplicantData= data.records.applicants_details; + this.pdDocumentsData=data.records.pd_documnets; + this.pdLogsData=data.records.pd_logs; + } +}, error => this.errorMessage = error); + } + + loadPdListCompoent() { + this.router.navigate([ '../../' ], { relativeTo: this.route }); + this.ListPdComponent.showListView(true); + } + + editPdMaster(masterData:any){ + + } + editPdApplicant(applicantData:any){ + + } + // pd allocation to + // edit questions master details popup model + pdAllocationTo(pdID:any) { + const dialogRef = this.dialog.open(PdAllocationComponent, { + data: pdID, + disableClose: true + }); + dialogRef.afterClosed() + .subscribe(dataresult => { + // this.notifier.notify('success', 'Successfully allocated.!'); + // this.viewPdDetails(this.childData) + }); + } + +// updateViewComponent(editBack:string) { + +// if(editBack=='1'){ +// this.showEditMasterComponent=!this.showEditMasterComponent +// } +// else if(editBack=='2'){ +// this.showEditApplicantComponent=!this.showEditApplicantComponent +// } +// else if(editBack=='3'){ +// this.showEditMasterComponent=!this.showEditMasterComponent +// } +// this.viewPdDetails(this.childData); +// } + ngOnDestroy(): void { + this.ListPdComponent.showListView(true); } + +} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts index bcaa5f044..59e77c3fd 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts @@ -25,7 +25,8 @@ import { ListPdComponent } from './list-pd/list-pd.component'; import { ManagePdComponent } from './manage-pd.component'; import { MapPdViewComponent } from './list-pd/map-pd-view/map-pd-view.component'; import { AddPdComponent } from '../manage-pd/list-pd/add-pd/add-pd.component'; - +import { ViewPdComponent } from '../manage-pd/list-pd/view-pd/view-pd.component'; +import { PdAllocationComponent } from '../manage-pd/list-pd/pd-allocation/pd-allocation.component'; import { PdTrigerService } from '../pd-service/pd-triger.service'; import { GetGeometricLocationService } from '../location-service/get-geometric-location.service'; @@ -97,7 +98,7 @@ const pdCustomNotifierOptions: NotifierOptions = { NgxMatSelectSearchModule,MatTooltipModule, MatExpansionModule, AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}), ], - declarations: [ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent], + declarations: [ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent], providers: [PdTrigerService, GetGeometricLocationService] }) export class ManagePdModule { } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.routing.ts b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.routing.ts index fa000cb60..3b30f5bd6 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.routing.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.routing.ts @@ -4,6 +4,8 @@ import { ManagePdComponent } from './manage-pd.component'; import { ListPdComponent } from './list-pd/list-pd.component'; import { MapPdViewComponent } from './list-pd/map-pd-view/map-pd-view.component'; import { AddPdComponent } from '../manage-pd/list-pd/add-pd/add-pd.component'; +import { ViewPdComponent } from '../manage-pd/list-pd/view-pd/view-pd.component'; + /* * manage pd router */ @@ -28,6 +30,10 @@ const routes: Routes = [ path: 'addpd', component: AddPdComponent, }, + { + path: 'viewpd/:pdid', + component: ViewPdComponent, + }, ] } ] diff --git a/ng6-seed/src/app/template/questions/add/add.component.html b/ng6-seed/src/app/template/questions/add/add.component.html index c088d4150..fe8959ae8 100644 --- a/ng6-seed/src/app/template/questions/add/add.component.html +++ b/ng6-seed/src/app/template/questions/add/add.component.html @@ -3,7 +3,7 @@

{{pageTitle}}

-
+
From 2479b5f98cb4aed8aefeee97aec0e21d098576bb Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Sat, 13 Oct 2018 10:19:26 +0530 Subject: [PATCH 09/11] merge:pd :kms --- ng6-seed/package-lock.json | 48 ++--- ng6-seed/package.json | 1 + ng6-seed/src/app/AwsService/aws.service.ts | 107 ++++++----- .../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 | 8 +- .../title-dialog/title-dialog.component.html | 2 +- .../activity-dialog.component.html | 2 +- .../uom/uom-dialog/uom-dialog.component.html | 2 +- .../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 | 30 ++- .../src/app/settings/service/user.service.ts | 6 +- .../users/register/register.component.html | 150 ++++++++------- .../users/register/register.component.ts | 8 +- .../users/user-list/user-list.component.html | 32 +++- .../users/user-list/user-list.component.ts | 11 +- .../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 +- ng6-seed/src/index.html | 3 + 65 files changed, 1659 insertions(+), 278 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 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/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/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..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,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..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 @@ -41,10 +41,10 @@ fxLayoutAlign="center"> -->
- + {{ sd.name }} - You must include a Product name. + Product Name Required.
+
+
+
+ + +
+
+
+ +
+
+ + + + + {{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..31f81afc4 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 @@ -23,8 +23,8 @@ export interface Master { export class PdTeamService { -//private apiUrl = "http://ssa.sineedge.com/sparqapi/api/"; -private apiUrl = "http://localhost/sparqapi/api/"; +private apiUrl = "http://ssa.sineedge.com/sparqapi/api/"; +//private apiUrl = "http://localhost/sparqapi/api/"; pk: { "primary_key": any; }; @@ -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..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
- - - -
+ +
- + -- @@ -194,7 +211,7 @@ - +
-
- UserProfile - -
-
- -
- - {{img}} - +
+
+ User Profile + +
+
+ +
+ + {{img}} + +
+
+ + Isactive + +
- - - - Isactive - - +
- - - - - + + + + + + +
- +
\ 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..b5a3a6fed 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,19 +36,41 @@ Mobile No {{us.mobile_no}} - + + Roles + {{us.role_name}} + + + Entities + {{us.entitytypename}} + Is Active - done - close + + + + + + Actions - edit + edit @@ -61,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 6e6e4be5d..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', @@ -13,11 +15,13 @@ 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; - + 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; 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: [ ], 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; + } From 4d0919dc3bd2cd54fda5f9da4667daaba56fcb93 Mon Sep 17 00:00:00 2001 From: saravanakumarkandasami Date: Sat, 13 Oct 2018 12:21:05 +0530 Subject: [PATCH 10/11] PD List UI and filter changes --- .../manage-pd/list-pd/list-pd.component.html | 14 +++++++++++--- .../manage-pd/list-pd/list-pd.component.ts | 6 ++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.html index b3922d059..fa3855b93 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.html @@ -1,6 +1,14 @@ -
- - +
+
+ + + +
+ +
+ + +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.ts index 791e98d32..3de4e7979 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/list-pd.component.ts @@ -83,6 +83,12 @@ export class ListPdComponent implements OnInit, OnDestroy { this.viewPdList = !this.viewPdList; this.router.navigate([ '../pdlist/viewpd',pdid], { relativeTo: this.route }); + } + //Global filter + applyFilter(filterValue: string) { + filterValue = filterValue.trim(); // Remove whitespace + filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches + this.dataSource.filter = filterValue; } ngOnDestroy(): void { this.viewPdList=false; From 3ad6314e0e602cb2c232acb142715009dca646f9 Mon Sep 17 00:00:00 2001 From: saravanakumarkandasami Date: Sat, 13 Oct 2018 15:39:55 +0530 Subject: [PATCH 11/11] Pd Team Manage Html --- .../pd-team-manage.component.html | 89 +++++++++---------- 1 file changed, 44 insertions(+), 45 deletions(-) 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 index d30fab3a0..5ff3c94b0 100644 --- 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 @@ -1,54 +1,53 @@ -
-
Manage PD Team
- -
-
-
- - +
+
Manage PD Team
+ +
-
-
- -
-
- - +
+ + +
+
+
+ +
+
+ - - {{pdteamdetails.team_name | titlecase}} info - -
- {{pdteamdetails.short_name}} - -
- - + {{pdteamdetails.team_name | titlecase}} info - - -
- {{ users.user_full_name |titlecase}} - -
+
+ {{pdteamdetails.short_name}} - -
-
+
+ + + + + +
+ {{ users.user_full_name |titlecase}} + +
+ + +
+ + + +
- - -
-
- -
-
-
-
- {{pdTeamManageData}} -
- +
+ +
+
+
+
+ {{pdTeamManageData}} +
+ + \ No newline at end of file