From 8f42c76a94a7db0c813f66c91a528fda57229b9c Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 15 Oct 2018 21:26:54 +0530 Subject: [PATCH 1/3] pd changes :schedule and edit : kms --- ng6-seed/package.json | 2 +- .../list-pd/add-pd/add-pd.component.ts | 6 +- .../edit-pd-applicant.component.html | 81 +++++++++ .../edit-pd-applicant.component.scss | 0 .../edit-pd-applicant.component.spec.ts | 25 +++ .../edit-pd-applicant.component.ts | 166 ++++++++++++++++++ .../edit-pd-master.component.html | 136 ++++++++++++++ .../edit-pd-master.component.scss | 0 .../edit-pd-master.component.spec.ts | 25 +++ .../edit-pd-master.component.ts | 153 ++++++++++++++++ .../manage-pd/list-pd/list-pd.component.html | 8 +- .../map-pd-view/map-pd-view.component.html | 11 +- .../map-pd-view/map-pd-view.component.ts | 21 ++- .../schedule-pd/schedule-pd.component.html | 53 ++++++ .../schedule-pd/schedule-pd.component.scss | 0 .../schedule-pd/schedule-pd.component.spec.ts | 25 +++ .../schedule-pd/schedule-pd.component.ts | 102 +++++++++++ .../list-pd/view-pd/view-pd.component.html | 25 +-- .../list-pd/view-pd/view-pd.component.ts | 55 +++++- .../manage-pd/manage-pd.module.ts | 12 +- .../pd-service/pd-triger.service.ts | 9 + ng6-seed/src/assets/styles/app.scss | 5 +- 22 files changed, 883 insertions(+), 37 deletions(-) create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.html create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.scss create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.spec.ts create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.ts create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.scss create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.spec.ts create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/schedule-pd/schedule-pd.component.html create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/schedule-pd/schedule-pd.component.scss create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/schedule-pd/schedule-pd.component.spec.ts create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/schedule-pd/schedule-pd.component.ts diff --git a/ng6-seed/package.json b/ng6-seed/package.json index 06740755f..661d62af8 100644 --- a/ng6-seed/package.json +++ b/ng6-seed/package.json @@ -45,6 +45,7 @@ "karma-jasmine": "^1.1.1", "leaflet": "^1.0.2", "moment": "^2.15.0", + "ng-pick-datetime": "^5.2.6", "ng2-charts": "1.6.0", "ng2-dragula": "1.3.1", "ng2-file-upload": "1.2.1", @@ -88,4 +89,3 @@ "typescript": "^2.7.2" } } - \ 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 0ed9a60ae..58b91a531 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 @@ -285,9 +285,9 @@ export class AddPdComponent implements OnInit, OnDestroy { 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_entity_billing_id":formValue.lender_billing, + "pd_contact_person":formValue.lender_contact_person, + "pd_contact_mobileno":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, diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.html new file mode 100644 index 000000000..3defab285 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.html @@ -0,0 +1,81 @@ +
+
+ +
+
+ +
+
+ +
Main Applicant
+ + + + + Name is required. + + + + + Email number is required. + + + + + + Mobile number is required. + + + +
+
+
+
+
+ + +
{{coDetails.controls.label.value}} {{i+1}}
+ +
+ + + + + + + + + + + + + {{rel.name}} + + + +
+
+
+
+
+ +
+ + + + +
+
+ +
+
+ + + +
+
+ + + \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.spec.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.spec.ts new file mode 100644 index 000000000..73b41f696 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.spec.ts @@ -0,0 +1,25 @@ +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/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.ts new file mode 100644 index 000000000..c40b7d2cf --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.ts @@ -0,0 +1,166 @@ +import { Component, OnInit,ViewEncapsulation, Inject } from '@angular/core'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; +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 { + public pageTitle: string = "Edit Applicant"; + errorMessage: any; + public _EditApplicantForm:FormGroup; + public notifier: NotifierService; + mainApplicantData: any[]; + coApplicantData: any[]; + coApplicantItems:FormArray; + emptyData:any; + relationShipList:any; + constructor(private _fb: FormBuilder, + private _pd: PdTrigerService, notifier: NotifierService, private dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data: any) { + this.notifier=notifier + } + + ngOnInit() { + if(this.data.records.length>0){ + this.mainApplicantData= this.data.records.filter(item => item.applicant_type == 1); + this.coApplicantData= this.data.records.filter(item => item.applicant_type == 0); + this.loadApplicantFormData(); + } + else{ + this.loadEmptyFormData() + } + this.getRelationMaster(); + + } + loadEmptyFormData() { + this._EditApplicantForm = this._fb.group({ + fk_applicant_primary_id: [null], + applicant_name: [null, Validators.compose([Validators.required])], + mobile_no: [null, Validators.compose([Validators.required])], + email: [null, Validators.compose([Validators.required, CustomValidators.email])], + applicant_type: [1], + coApplicantItems: this._fb.array([]), +}); + + } + + 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.data.pdID, + "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.data.pdID, + "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.dialogRef.close(); + } + else { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + } + }, error => { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + }); + } + } + + // 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); + } + /** To Reset Popup Data */ + onReset() { + if(this.data.records.length>0){ + this.loadApplicantFormData(); + } + else{ + this.loadEmptyFormData(); + } + } + /** For Popup Close Button */ + closeEditComponent(): void { + this.dialogRef.close(); + } +} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html new file mode 100644 index 000000000..5d2f67588 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html @@ -0,0 +1,136 @@ +
+
+ +
+ +
+ +
+
+
+ + + + {{LL.full_name}} + + + + + + + + + Applicant ID Required + + + + + {{billL.billing_name}} + + + + + + + Contact Person Required + + + + Contact Number Required + + + + + {{PL.product_name}} + + + + + + + + + + {{SPL.subproduct_name}} + + + + + + + + + + {{CSL.customer_segment}} + + + + + + + + {{PDL.type_name}} + + + + + + + + + + + + + + + + + + + + + + + + + + {{SL.state_name}} + + + + + + + + + ` + {{CL.city_name}} + + + + + + + + + + + + +
+ +
+
+ + +
+ + + + +
+
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.spec.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.spec.ts new file mode 100644 index 000000000..c2b08e200 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.spec.ts @@ -0,0 +1,25 @@ +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/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts new file mode 100644 index 000000000..499191446 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts @@ -0,0 +1,153 @@ +import { Component, OnInit,ViewEncapsulation, Inject } from '@angular/core'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; +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 { + public pageTitle: string = "Edit PD Master"; + errorMessage: any; + productList:any; + subProductList:any; + lenderList:any; + customerSegmentList:any; + stateList:any; + cityList:any; + pdTypeList:any; + billingList:any; + public _EditPDtriggerForm:FormGroup; + public notifier: NotifierService; + constructor(private _fb: FormBuilder, + private _pd: PdTrigerService, notifier: NotifierService,private dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data: any) { + this.notifier=notifier + } + + ngOnInit() { + console.log(this.data) + 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 + if(this.data.fk_lender_id){ + this.getBillingDetails(this.data.fk_lender_id); + } + } + }, error => this.errorMessage = error); + } + getProductsList(){ + this._pd.getProductsDetails().subscribe( + data => { + if (data.status == 200) { + this.productList=data.records + if(this.data.fk_product_id){ + this.getSubproductList(this.data.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 + if(this.data.fk_state){ + this.getCityList(this.data.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.data.pd_id], + fk_lender_id: [this.data.fk_lender_id, Validators.compose([Validators.required])], + lender_applicant_id: [this.data.lender_applicant_id, Validators.compose([Validators.required])], + pd_contact_person: [this.data.pd_contact_person, Validators.compose([Validators.required])], + pd_contact_mobileno: [this.data.pd_contact_mobileno, Validators.compose([Validators.required])], + fk_enitity_billing_id: [this.data.fk_enitity_billing_id], + fk_product_id: [this.data.fk_product_id], + fk_subproduct_id: [this.data.fk_subproduct_id], + fk_pd_type: [this.data.fk_pd_type], + fk_customer_segment: [this.data.fk_customer_segment], + loan_amount: [this.data.loan_amount], +   addressline1: [this.data.addressline1], + addressline2: [this.data.addressline2], + addressline3: [this.data.addressline3], + fk_city: [this.data.fk_city], + fk_state: [this.data.fk_state], +   pincode : [this.data.pincode], + }); + } + 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; + } + // lendor billing address + getBillingDetails(lendorID:string){ + console.log(lendorID) + // this.billingList= this.lenderList.filter(item => item.fk_entity_id == lendorID); + // this.billingList=this.billingList[0].billing_address; + } + 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(); + } + } + /** To Reset Popup Data */ + onReset() { + this.loadFormData(); + } + /** For Popup Close Button */ + closeEditMasterComponent(): void { + this.dialogRef.close(); + } + + +} 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 fa3855b93..a8567c7cf 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,4 +1,4 @@ -
+
@@ -20,10 +20,10 @@ -

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

+

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

+

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

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

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

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

+

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

+

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

+ + +
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 index bbcdc91a3..4e3e91ee4 100644 --- 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 @@ -8,6 +8,8 @@ import { GetGeometricLocationService } from '../../../location-service/get-geome import { ListPdComponent } from '../list-pd.component'; import { PdAllocationComponent } from '../pd-allocation/pd-allocation.component'; import { SmartPdAllocationComponent } from '../smart-pd-allocation/smart-pd-allocation.component'; +import { SchedulePdComponent } from '../schedule-pd/schedule-pd.component'; + @Component({ selector: 'app-map-pd-view', templateUrl: './map-pd-view.component.html', @@ -66,7 +68,8 @@ pdList:any[] = []; getMapViewLocations(getData:any){ getData.forEach(element => { - this._geolocation.findLocations(element.addressline1,element.pincode,element.state_name,element.city_name) + if(element.addressline1 && element.pincode && element.state_name && element.city_name){ + 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; @@ -79,6 +82,8 @@ pdList:any[] = []; // console.log('geocodingAPIService', 'Other error', response.status); // } }); + } + }); } @@ -120,6 +125,20 @@ pdList:any[] = []; } + + // pd schedule details + scheduleDetails(pdData:any){ + + const dialogSchedule = this.dialog.open(SchedulePdComponent, { + data: pdData, + disableClose: true + }); + dialogSchedule.afterClosed() + .subscribe(dataresult => { + // this.notifier.notify('success', 'Successfully allocated.!'); + this.loadPdDetails(); + }); +} ngOnDestroy(): void { this.ListPdComponent.showListView(true); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/schedule-pd/schedule-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/schedule-pd/schedule-pd.component.html new file mode 100644 index 000000000..06e1137aa --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/schedule-pd/schedule-pd.component.html @@ -0,0 +1,53 @@ + +
+ +
+ +
+
+ + + + + + + {{times.name}} + + + Please Choose Time + + + + + + + + + +
+ + + + +
+ + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/schedule-pd/schedule-pd.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/schedule-pd/schedule-pd.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/schedule-pd/schedule-pd.component.spec.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/schedule-pd/schedule-pd.component.spec.ts new file mode 100644 index 000000000..82d0cdbe7 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/schedule-pd/schedule-pd.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { SchedulePdComponent } from './schedule-pd.component'; + +describe('SchedulePdComponent', () => { + let component: SchedulePdComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ SchedulePdComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(SchedulePdComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/schedule-pd/schedule-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/schedule-pd/schedule-pd.component.ts new file mode 100644 index 000000000..17d0b8174 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/schedule-pd/schedule-pd.component.ts @@ -0,0 +1,102 @@ +import { Component, OnInit, Inject, Pipe, PipeTransform } 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'; +import { DatePipe } from '@angular/common'; +export interface Timeslot { + id: string; + name: string; + objectValue: string +} + +@Component({ + selector: 'app-schedule-pd', + templateUrl: './schedule-pd.component.html', + styleUrls: ['./schedule-pd.component.scss'] +}) +export class SchedulePdComponent implements OnInit { + public pageTitle: string = "PD Schedule"; + pipe = new DatePipe('en-US'); + public selectedMoment = new Date(); + errorMessage: any; + notifier : NotifierService; + scheduleControl = new FormControl('', [Validators.required]); + timeDetails: Timeslot[] = [ + {id: '1', name: '06:00 AM', objectValue:'06:00:00'}, + {id: '2', name: '06:30 AM', objectValue:'06:30:00'}, + {id: '3', name: '07:00 AM', objectValue:'07:00:00'}, + {id: '4', name: '07:30 AM', objectValue:'07:30:00'}, + {id: '5', name: '08:00 AM', objectValue:'08:00:00'}, + {id: '6', name: '08:30 AM', objectValue:'08:30:00'}, + {id: '7', name: '09:00 AM', objectValue:'09:00:00'}, + {id: '8', name: '09:30 AM', objectValue:'09:30:00'}, + {id: '9', name: '10:00 AM', objectValue:'10:00:00'}, + {id: '10', name: '10:30 AM', objectValue:'10:30:00'}, + {id: '11', name: '11:00 AM', objectValue:'11:00:00'}, + {id: '12', name: '11:30 AM', objectValue:'11:30:00'}, + {id: '13', name: '12:00 PM', objectValue:'12:00:00'}, + {id: '14', name: '12:30 PM', objectValue:'12:30:00'}, + {id: '15', name: '01:00 PM', objectValue:'13:00:00'}, + {id: '16', name: '01:30 PM', objectValue:'13:30:00'}, + {id: '17', name: '02:00 PM', objectValue:'14:00:00'}, + {id: '18', name: '02:30 PM', objectValue:'14:30:00'}, + {id: '19', name: '03:00 PM', objectValue:'15:00:00'}, + {id: '20', name: '03:30 PM', objectValue:'15:30:00'}, + {id: '21', name: '04:00 PM', objectValue:'16:00:00'}, + {id: '22', name: '04:30 PM', objectValue:'16:30:00'}, + {id: '23', name: '05.00 PM', objectValue:'17:00:00'}, + {id: '24', name: '05:30 PM', objectValue:'17:30:00'}, + {id: '25', name: '06:00 PM', objectValue:'18:00:00'}, + {id: '26', name: '06:30 PM', objectValue:'18:30:00'}, + {id: '27', name: '07:00 PM', objectValue:'19:00:00'}, + {id: '28', name: '07:30 PM', objectValue:'19:30:00'}, + {id: '29', name: '08:00 PM', objectValue:'20:00:00'}, + + ]; + public min = new Date(); + constructor(notifier: NotifierService, private dialogRef: MatDialogRef, + private _pd: PdTrigerService, + @Inject(MAT_DIALOG_DATA) public data: any) { + this.notifier=notifier; + } + + ngOnInit() { + + } + + // close pd schedule pop up + closeScheduleComponent(): void { + this.dialogRef.close(); + } + // update pd schedule + + upatePDSchedule(date:any,time:string){ + let myFormattedDate = this.pipe.transform(date, 'yyyy-MM-dd'); + if(!this.scheduleControl.valid){ + this.notifier.notify('warning', 'Please Choose Schedule Date/Time.!'); + } + else { + let updateData = { + "fk_pd_id":this.data.pd_id, + "schedule_time":myFormattedDate +' '+ time, + } + this._pd.updateSchedule(updateData).subscribe( + result => { + if (result.status == 200) { + this.notifier.notify('success', 'PD Scheduled.!'); + 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(); + }); + } + } + +} 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 index 1e0c22956..ae3ea2041 100644 --- 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 @@ -11,25 +11,25 @@
- - + +
{{master.lender_full_name}} - {{master.lender_applicant_id}} -  {{master.city_name}} / {{master.state_name}}-{{master.pincode}} +  {{master.city_name}} / {{master.state_name}}-{{master.pincode}} -

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

-

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

+

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

+

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

{{master.addressline1}}

{{master.addressline2}}

{{master.addressline3}}

-

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

+

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

@@ -45,27 +45,30 @@ Applicants - - + + +

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

- +
+ +

No Applicants

+
-
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 index 57080f137..fefd67712 100644 --- 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 @@ -7,6 +7,10 @@ import { PdTrigerService } from '../../../pd-service/pd-triger.service'; import { PdAllocationComponent } from '../pd-allocation/pd-allocation.component'; import { SmartPdAllocationComponent } from '../smart-pd-allocation/smart-pd-allocation.component'; import { ListPdComponent } from '../list-pd.component'; +import { SchedulePdComponent } from '../schedule-pd/schedule-pd.component'; +import { EditPdApplicantComponent } from '../edit-pd-applicant/edit-pd-applicant.component'; +import { EditPdMasterComponent } from '../edit-pd-master/edit-pd-master.component'; + @Component({ selector: 'app-view-pd', templateUrl: './view-pd.component.html', @@ -14,13 +18,13 @@ import { ListPdComponent } from '../list-pd.component'; encapsulation: ViewEncapsulation.None }) export class ViewPdComponent implements OnInit, OnDestroy { - + public selectedMoment = new Date(); private notifier:NotifierService; errorMessage: any; - pdMasterData: any; - pdApplicantData: any; - pdDocumentsData: any; - pdLogsData: any; + pdMasterData: any=[]; + pdApplicantData: any=[]; + pdDocumentsData: any=[]; + pdLogsData: any=[]; viewID:string; viewParams:any; // @Input() childData: string; @@ -57,10 +61,31 @@ export class ViewPdComponent implements OnInit, OnDestroy { } editPdMaster(masterData:any){ - + + const dialogPDMaster = this.dialog.open(EditPdMasterComponent, { + data: masterData, + disableClose: true + }); + dialogPDMaster.afterClosed() + .subscribe(dataresult => { + // this.notifier.notify('success', 'Successfully allocated.!'); + this.viewPdDetails(this.viewID) + }); } editPdApplicant(applicantData:any){ - + let setPdDetails = { + "pdID":this.viewID, + "records":applicantData + } + const dialogApplicant = this.dialog.open(EditPdApplicantComponent, { + data: setPdDetails, + disableClose: true + }); + dialogApplicant.afterClosed() + .subscribe(dataresult => { + // this.notifier.notify('success', 'Successfully allocated.!'); + this.viewPdDetails(this.viewID) + }); } // pd allocation to pdAllocationTo(pdData:any) { @@ -76,7 +101,7 @@ export class ViewPdComponent implements OnInit, OnDestroy { }); } else if(pdData.fk_pd_type == 2){ - const dialogRef = this.dialog.open(SmartPdAllocationComponent, { + const dialogRef = this.dialog.open(PdAllocationComponent, { data: pdData, disableClose: true }); @@ -91,6 +116,20 @@ export class ViewPdComponent implements OnInit, OnDestroy { } + // pd schedule details + scheduleDetails(pdData:any){ + + const dialogSchedule = this.dialog.open(SchedulePdComponent, { + data: pdData, + disableClose: true + }); + dialogSchedule.afterClosed() + .subscribe(dataresult => { + // this.notifier.notify('success', 'Successfully allocated.!'); + this.viewPdDetails(this.viewID) + }); + } + // updateViewComponent(editBack:string) { // if(editBack=='1'){ 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 391b2d3c2..0000aaaec 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 @@ -30,7 +30,10 @@ import { PdAllocationComponent } from '../manage-pd/list-pd/pd-allocation/pd-all import { SmartPdAllocationComponent } from './list-pd/smart-pd-allocation/smart-pd-allocation.component'; import { PdTrigerService } from '../pd-service/pd-triger.service'; import { GetGeometricLocationService } from '../location-service/get-geometric-location.service'; - +import { OwlDateTimeModule, OwlNativeDateTimeModule } from 'ng-pick-datetime'; +import { SchedulePdComponent } from './list-pd/schedule-pd/schedule-pd.component'; +import { EditPdApplicantComponent } from './list-pd/edit-pd-applicant/edit-pd-applicant.component'; +import { EditPdMasterComponent } from './list-pd/edit-pd-master/edit-pd-master.component'; /** * Custom angular notifier options */ @@ -97,10 +100,11 @@ const pdCustomNotifierOptions: NotifierOptions = { TreeModule, MatDialogModule,MatSortModule, NgxMatSelectSearchModule,MatTooltipModule, MatExpansionModule, - AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}), + AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}),OwlDateTimeModule, + OwlNativeDateTimeModule, ], - declarations: [ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent], + declarations: [ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent], providers: [PdTrigerService, GetGeometricLocationService], - entryComponents: [PdAllocationComponent, SmartPdAllocationComponent] + entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent] }) export class ManagePdModule { } diff --git a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts index 76901ebb7..72e857142 100644 --- a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts +++ b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts @@ -141,6 +141,15 @@ export class PdTrigerService { ) } + // update pd schedule + updateSchedule(updateData: any): Observable { + updateData.fk_scheduled_by = this._aws.getlocale(); + updateData.createdon = currentdate; + return this._http.post(this.apiUrl+"schdulePD",{"records":updateData}) + .pipe( + catchError(this.handleError('operation', [])) + ) + } private handleError(operation = 'operation', result?: T) { return (error: any): Observable => { return of(result as T); diff --git a/ng6-seed/src/assets/styles/app.scss b/ng6-seed/src/assets/styles/app.scss index a5b6d83cc..b8044770c 100644 --- a/ng6-seed/src/assets/styles/app.scss +++ b/ng6-seed/src/assets/styles/app.scss @@ -47,4 +47,7 @@ Author: TrendSetter Themes /* Add application styles & imports to this file! */ -@import "~angular-notifier/styles"; \ No newline at end of file +@import "~angular-notifier/styles"; + +// import date time picker styles +@import "~ng-pick-datetime/assets/style/picker.min.css"; \ No newline at end of file From b4f416ac43b354d56fb6c4d68c407deb55eaa5f7 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 15 Oct 2018 21:28:25 +0530 Subject: [PATCH 2/3] merge pd changes: kms --- ng6-seed/package-lock.json | 28 ++- .../app/dashboard/dashboard.component.html | 53 +++-- .../src/app/dashboard/dashboard.component.ts | 196 +++++++++++----- .../branch-dialog/branch-dialog.component.ts | 2 +- .../branch-list/branch-list.component.html | 10 +- .../branch-list/branch-list.component.ts | 2 +- .../city/city-list/city-list.component.html | 4 +- .../comments-on-locality-list.component.html | 6 +- .../component/company/company.component.html | 3 +- .../component/company/company.component.ts | 20 +- .../customer-behaviour-list.component.html | 4 +- .../customer-segment-list.component.html | 6 +- .../designation-list.component.html | 6 +- .../frequency-list.component.html | 6 +- ...ndustry_classification-list.component.html | 12 +- .../lender-hierarchy-list.component.html | 8 +- .../members-occupation-list.component.html | 6 +- .../pd-allocation-type-list.component.html | 4 +- ...pd-location-approach-dialog.component.html | 2 +- .../pd-location-approach-list.component.html | 6 +- .../pd-notification-list.component.html | 2 +- .../pd-type-list/pd-type-list.component.html | 4 +- .../product-list/product-list.component.html | 6 +- .../question-category-dialog.component.html | 8 +- .../question-category-dialog.component.ts | 8 +- .../question-category-list.component.html | 18 +- .../question-category-list.component.ts | 10 +- .../regions-list/regions-list.component.html | 6 +- .../relation-ship-list.component.html | 6 +- .../states-list/states-list.component.html | 8 +- .../sub-product-list.component.html | 8 +- .../title-list/title-list.component.html | 6 +- .../activity-list.component.html | 6 +- .../uom/uom-list/uom-list.component.html | 6 +- .../settings/masters/masters.component.html | 198 +++++++++++----- .../app/settings/masters/masters.component.ts | 158 +++++++++---- .../app/settings/masters/model/Dbmaster.ts | 7 + .../pd-team-list/pd-team-list.component.html | 17 +- .../pd-team-manage.component.html | 17 +- .../users/register/register.component.html | 211 ++++++++++-------- .../users/user-list/user-list.component.html | 176 +++++++-------- .../users/user-list/user-list.component.ts | 39 +++- .../template/questions/add/add.component.html | 2 +- .../questions/edit/edit.component.html | 2 +- .../questions/list/list.component.html | 12 +- ng6-seed/src/index.html | 5 + 46 files changed, 863 insertions(+), 467 deletions(-) create mode 100644 ng6-seed/src/app/settings/masters/model/Dbmaster.ts diff --git a/ng6-seed/package-lock.json b/ng6-seed/package-lock.json index 7119b427d..f30e1a2fb 100644 --- a/ng6-seed/package-lock.json +++ b/ng6-seed/package-lock.json @@ -4294,12 +4294,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -4314,17 +4316,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -4441,7 +4446,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -4453,6 +4459,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -4467,6 +4474,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -4474,12 +4482,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -4498,6 +4508,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -4578,7 +4589,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -4590,6 +4602,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -4711,6 +4724,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", diff --git a/ng6-seed/src/app/dashboard/dashboard.component.html b/ng6-seed/src/app/dashboard/dashboard.component.html index d02b0aefb..27e02bdc9 100644 --- a/ng6-seed/src/app/dashboard/dashboard.component.html +++ b/ng6-seed/src/app/dashboard/dashboard.component.html @@ -1,4 +1,5 @@ -
+ +
@@ -118,47 +118,68 @@
- -
-
+======= + + +
+
+
- Lender - PD Triggered Today + Personal Discussion Details + +
+ +
+ + +
+
+
+
+
+ + + \ 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 d22f38292..f260b7b7c 100644 --- a/ng6-seed/src/app/dashboard/dashboard.component.ts +++ b/ng6-seed/src/app/dashboard/dashboard.component.ts @@ -1,4 +1,5 @@ import { Component } from '@angular/core'; + @Component({ selector: 'app-dashboard', @@ -6,60 +7,151 @@ import { Component } from '@angular/core'; styleUrls: ['./dashboard.component.scss'] }) export class DashboardComponent { + //public single: any[]; + //public multi: any[]; + + public showXAxis = true; + public showYAxis = true; + public gradient = false; + public showLegend = false; + public showXAxisLabel = true; + public xAxisLabel = 'Type'; + public showYAxisLabel = true; + public yAxisLabel = 'Application'; + public colorScheme = { + domain: ['#673ab7', '#f44336', '#009688 ', '#2196f3', '#ffd740 ', '#eb35bb '] + }; 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', - }, ]; + // //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', + // }, ]; - //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', - }, ]; + // multi: Object[] = [ + // { + // name: 'Full', + // series: [ + // { + // name: 'Triggered', + // value: 50 + // }, + // { + // name: 'Allocated', + // value: 29 + // }, + // { + // name: 'Schudled', + // value: 45 + // }, + // { + // name: 'InProgress', + // value: 67 + // }, + // { + // name: 'Completed', + // value: 34 + // },{ + // name: 'QC Completed', + // value: 22 + // } + // ] + // }, + // { + // name: 'Smart', + // series: [ + // { + // name: 'Triggred', + // value: 60 + // }, + // { + // name: 'Allocated', + // value: 33 + // }, + // { + // name: 'Schudled', + // value: 76 + // }, + // { + // name: 'InProgress', + // value: 34 + // },{ + // name: 'Completed', + // value: 56 + // },{ + // name: 'QC Completed', + // value: 45 + // } + // ] + // }, + // ]; + + // //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.ts b/ng6-seed/src/app/settings/masters/component/branch/branch-dialog/branch-dialog.component.ts index 4b051e7fc..aa157394c 100644 --- a/ng6-seed/src/app/settings/masters/component/branch/branch-dialog/branch-dialog.component.ts +++ b/ng6-seed/src/app/settings/masters/component/branch/branch-dialog/branch-dialog.component.ts @@ -58,7 +58,7 @@ export class BranchDialogComponent implements OnInit { } }, error => this.errorMessage = error); - + } /** Branch Form Datas*/ 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 b548f6251..fcdbc2c68 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 @@ -26,17 +26,17 @@ - Branch Name + Branch {{row.name}} - City Name + City {{row.city_name}} - Actions + Action @@ -44,7 +44,7 @@ - Is Active + Active - + 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 edd6fd2d5..5fea0b7ff 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 @@ -150,7 +150,7 @@ active(){ Swal({ title: 'Are you sure?', type: 'warning', - showCancelButton: true, + showCancelButton: true, confirmButtonColor: '#3085d6', cancelButtonColor: '#d33', confirmButtonText: 'Yes, activate it!' 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 ad8dec250..728a52b03 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 @@ -100,12 +100,12 @@ - City Name + City {{row.name}} - State Name + State {{row.state_name}} 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 860e77df7..78aafa8a6 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 @@ -94,7 +94,7 @@ - Comments On Locality Rating + Locality Rating {{row.rating}} @@ -107,7 +107,7 @@ --> - Actions + Action @@ -115,7 +115,7 @@ - Is Active + Active - \ No newline at end of file + + \ No newline at end of file diff --git a/ng6-seed/src/app/settings/masters/component/company/company.component.ts b/ng6-seed/src/app/settings/masters/component/company/company.component.ts index 17b2f760f..310dcfe96 100644 --- a/ng6-seed/src/app/settings/masters/component/company/company.component.ts +++ b/ng6-seed/src/app/settings/masters/component/company/company.component.ts @@ -9,6 +9,7 @@ import { FormBuilder, /** Service */ import { MastersService } from '../../../service/masters/masters.service'; +import { NotifierService } from 'angular-notifier'; @Component({ @@ -21,14 +22,15 @@ export class CompanyComponent implements OnInit { public _companyForm: FormGroup; public companyData: any = []; + private notifier: NotifierService; stateDatas: any[]; citydatas: any[]; errorMessage:string; - constructor(private _formBuilder: FormBuilder, - private _mastersService: MastersService) { } + constructor(private _formBuilder: FormBuilder,notifier: NotifierService, + private _mastersService: MastersService) { this.notifier = notifier; } FetchFormValue() { this._mastersService.getAllCompany().subscribe( @@ -139,11 +141,12 @@ export class CompanyComponent implements OnInit { dataresult=>{ if (dataresult.dataStatus == true){ - - alert("Data Saved Successfully"); + //alert("Data Saved Successfully"); + this.notifier.notify('success', 'Record Saved Successfully.!'); } else{ - alert("SomeThing Wents Wrong Try Again !"); + //alert("SomeThing Wents Wrong Try Again !"); + this.notifier.notify('warning', 'SomeThing Wents Wrong Try Again !'); } }); @@ -153,11 +156,12 @@ export class CompanyComponent implements OnInit { this._mastersService.editMasterDetails(CompanyFormValue,'COMPANY').subscribe( dataresult=>{ if (dataresult.dataStatus == true){ - - alert("Data Edited Successfully"); + //alert("Data Edited Successfully"); + this.notifier.notify('success', 'Record Edited Successfully.!'); } else{ - alert("SomeThing Wents Wrong Try Again !"); + //alert("SomeThing Wents Wrong Try Again !"); + this.notifier.notify('warning', 'SomeThing Wents Wrong Try Again !'); } } 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 1c738a32b..e422a9d8e 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 @@ -105,7 +105,7 @@ --> - Actions + Action @@ -113,7 +113,7 @@ - Is Active + Active 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 4a701354a..a11e5ff36 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 @@ -94,13 +94,13 @@ - Customer Segment + Segment {{row.name}} - Actions + Action @@ -109,7 +109,7 @@ - Is Active + Active 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 c7ba7e2d7..0909e1c7d 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 @@ -96,12 +96,12 @@ - Designation Name + Designation {{row.name}} - Is Active + Active @@ -124,7 +124,7 @@ - Actions + Action 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 ee86a9249..53fd768ea 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 @@ -105,12 +105,12 @@ - Frequency Name + Frequency {{row.name}} - Is Active + Active - Actions + Action 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 5925987f3..29f81a42a 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 @@ -34,16 +34,16 @@ - Industry Classification Name + Classification {{row.name}} - Is Active + Active - + diff --git a/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.html b/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.html index 669e3cb9d..d29cbfe6e 100644 --- a/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/lender-hierarchy/lender-hierarchy-list/lender-hierarchy-list.component.html @@ -90,17 +90,17 @@ - Lender Hierarchy + Hierarchy {{row.lender_hierarchy}} - State Name + State {{row.cityname}} - Is Active + Active - Actions + Action 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 00da6e7cc..c37bbfac3 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 @@ -109,14 +109,14 @@ - Occupation Non Earning Member + Occupation {{row.name}} - Is Active + Active - Actions + Action 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 a0b0d17a2..8d2a4fee3 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 @@ -28,12 +28,12 @@ - PD Allocation Type + Type {{row.pd_allocation_type_name}} - PD Allocation Logic + Logic {{row.pd_allocation_logic}} 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 7cc5879cf..d65b8cde4 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/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 69b6028a0..fc9991cd7 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 @@ -90,12 +90,12 @@ - PD Location + Location {{row.description}} - Is Active + Active - Actions + Action diff --git a/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.html b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.html index 0f5bbdbe5..08a08a66d 100644 --- a/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.html +++ b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.html @@ -36,7 +36,7 @@ - PD Status + Status {{row.pd_status_name}} 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 45815f287..ed7ac372d 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 @@ -90,12 +90,12 @@ - PD Type + Type {{row.type_name}} - Is Active + Active 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 59d48ad1c..677912f7f 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 @@ -36,7 +36,7 @@ - Product Name + Product {{row.name}} @@ -46,7 +46,7 @@ - Is Active + Active @@ -69,7 +69,7 @@ - Actions + Action 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 b54a9f9fd..770a4570f 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 @@ -1,4 +1,4 @@ - +
@@ -15,14 +15,14 @@ fxLayoutAlign="center">
- - Category Name Required. + + Category Name Required.
- + diff --git a/ng6-seed/src/app/settings/masters/component/question-category/question-category-dialog/question-category-dialog.component.ts b/ng6-seed/src/app/settings/masters/component/question-category/question-category-dialog/question-category-dialog.component.ts index f276c315f..6959b2127 100644 --- a/ng6-seed/src/app/settings/masters/component/question-category/question-category-dialog/question-category-dialog.component.ts +++ b/ng6-seed/src/app/settings/masters/component/question-category/question-category-dialog/question-category-dialog.component.ts @@ -31,8 +31,8 @@ export class QuestionCategoryDialogComponent implements OnInit { formfunction(){ this._questionCategoryForm = this._formBuilder.group({ - question_categroy_id: [this.data.question_categroy_id], - categroy_name: [this.data.categroy_name, Validators.compose([Validators.required])], + question_category_id: [this.data.question_category_id], + category_name: [this.data.category_name, Validators.compose([Validators.required])], }); } @@ -44,7 +44,7 @@ export class QuestionCategoryDialogComponent implements OnInit { /** To Save/Edited Popup Data */ onSubmit() { var QuestionFormValues = this._questionCategoryForm.value; - if(isNaN(this.data.question_categroy_id)) { + if(isNaN(this.data.question_category_id)) { Object.keys(QuestionFormValues).forEach((key) => ( QuestionFormValues[key] == null) && delete QuestionFormValues[key]); @@ -82,7 +82,7 @@ export class QuestionCategoryDialogComponent implements OnInit { } /** To Reset Popup Data */ onReset(){ - this._questionCategoryForm.reset({ id: this.data.question_categroy_id }); + this._questionCategoryForm.reset({ id: this.data.question_category_id }); } onResetedited(){ 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 23d77bb4d..96272fc1b 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 @@ -35,19 +35,25 @@ {{row.serialno}} - +<<<<<<< HEAD + Question Category Name + {{row.category_name}} +======= + + Category {{row.categroy_name}} +>>>>>>> f40b8b4997c74fe358c25b41f5e1e558c66841ff - Is Active + Active @@ -55,14 +61,14 @@ class="example-margin" matTooltip="Inactive" matTooltipPosition="above" checked="false" [color]="color" - (change)="isactiveQuestionCategory(row.question_categroy_id,row.isactive)" + (change)="isactiveQuestionCategory(row.question_category_id,row.isactive)" (click)="active()"> - Actions + Action @@ -76,7 +82,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 fd3169758..0e1bfe851 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 @@ -35,8 +35,8 @@ export class QuestionCategoryListComponent implements OnInit { public dataLength: number; public dataSource = new MatTableDataSource(); - // - displayedColumns = ['serialno','categroy_name','actions', 'isactive']; + // + displayedColumns = ['serialno','category_name','actions', 'isactive']; @ViewChild(MatPaginator) paginator: MatPaginator; @ViewChild(MatSort) sort: MatSort; @@ -102,7 +102,7 @@ export class QuestionCategoryListComponent implements OnInit { //To inactive the data deleteQuestionCategory(id: number) { - var PrimaryKeyWithValue ={'question_categroy_id':id}; + var PrimaryKeyWithValue ={'question_category_id':id}; this._MasterService.deleteMasterDetails(PrimaryKeyWithValue,'QUESTIONCATEGORY') .subscribe( data => { }); this.getQuestionCategory(); @@ -112,8 +112,8 @@ export class QuestionCategoryListComponent implements OnInit { isactiveQuestionCategory(id: number,isactive : number) { let ActiveDatas = isactive == 0 - ? { 'question_categroy_id':id,'isactive': '1'} - : { 'question_categroy_id':id,'isactive': '0'} + ? { 'question_category_id':id,'isactive': '1'} + : { 'question_category_id':id,'isactive': '0'} this._MasterService.editMasterDetails(ActiveDatas,'QUESTIONCATEGORY') .subscribe(dataresult=>{ 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 721a29181..716f3fcd0 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 @@ -21,12 +21,12 @@ - Region Name + Region {{row.name}} - Is Active + Active - Actions + Action 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 47ac9f9b0..ca7f53328 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 @@ -112,13 +112,13 @@ - Relationship Name + Relationship {{row.name}} - Is Active + Active @@ -141,7 +141,7 @@ - Actions + Action 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 22983dd36..197920973 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 @@ -131,17 +131,17 @@ - State Name + State {{row.name}} - Region Name + Region {{row.region_name}} - Is Active + Active @@ -164,7 +164,7 @@ - Actions + Action 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 8ddf1791e..590ea0f63 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 @@ -120,17 +120,17 @@ - Product Name + Product {{row.product_name}} - Sub-Product Name + Sub-Product {{row.name}} - Is Active + Active @@ -153,7 +153,7 @@ - Actions + Action 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 216b2fa5b..fcca0155c 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 @@ -109,12 +109,12 @@ - Title Name + Title {{row.name}} - Is Active + Active @@ -137,7 +137,7 @@ - Actions + Action 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 478f72eef..aabc465a8 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 @@ -103,12 +103,12 @@ - Activity Name + Activity {{row.name}} - Is Active + Active @@ -131,7 +131,7 @@ - Actions + Action 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 dc2e9ab0f..ca7892d3c 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 @@ -29,13 +29,13 @@ - UOM Name + UOM {{row.name}} - Is Active + Active @@ -58,7 +58,7 @@ - Actions + Action diff --git a/ng6-seed/src/app/settings/masters/masters.component.html b/ng6-seed/src/app/settings/masters/masters.component.html index c1825639c..9b24cc3a0 100644 --- a/ng6-seed/src/app/settings/masters/masters.component.html +++ b/ng6-seed/src/app/settings/masters/masters.component.html @@ -11,94 +11,174 @@ [placeholderLabel]="'Find Masters...'" [noEntriesFoundLabel]="'no matching found'"> - + + + {{master.master_name}} - You must Pickup Master Name. +
-
+<<<<<<< HEAD +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + +
+
+ +
+
+ +
+
+ +
+======= +
-
- +
+
-
- +
+
-
- +
+
-
- +
+
-
- +
+
-
- +
+
-
- +
+
-
- +
+
-
- +
+
-
- +
+
-
- +
+
-
- +
+
-
- +
+ + +
-
- -
-
- -
-
- -
-
- -
-
- - -
-
- -
-
- -
-
+
-
- - +
+
-
- +
+
+
+ +
+
+ +
+
+ +
+
+ + +
+
+ +
+
+ +
+
+ +
+>>>>>>> f40b8b4997c74fe358c25b41f5e1e558c66841ff - - \ 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 3c840fa23..642bae1e0 100644 --- a/ng6-seed/src/app/settings/masters/masters.component.ts +++ b/ng6-seed/src/app/settings/masters/masters.component.ts @@ -17,6 +17,12 @@ name: string; } + + export interface Dbmaster{ + master_id: number; + master_name: string; + constant_name: string; + } // export interface Master { // master_id: string; // master_name: string; @@ -35,9 +41,16 @@ styleUrls: ['./masters.component.scss'] }) export class MastersComponent implements OnInit { - + + private dbmasters: Dbmaster[]; + + + //public dbmasters: Dbmaster = new Dbmaster(); + + //public arr: Array<{master_id: number, master_name: string}>; + /* Normal Search Code - pickUpMasterData : string; + pickUpMasterData : string constructor() {} @@ -86,7 +99,7 @@ export class MastersComponent implements OnInit { /** control for the MatSelect filter keyword */ public masterFilterCtrl: FormControl = new FormControl(); - + //masters: Master[]; constructor(private _MastersService: MastersService) @@ -98,38 +111,42 @@ export class MastersComponent implements OnInit { } /** list of masters */ - - private masters: Master[] = [ - {id: 'master-1',name: 'Industry Classfication'}, - {id: 'master-2',name: 'Branch'}, - {id: 'master-3',name: 'Title'}, - {id: 'master-4',name: 'City'}, - {id: 'master-5',name: 'States'}, - {id: 'master-6',name: 'Regions'}, - {id: 'master-7',name: 'Relation Ship'}, - {id: 'master-8',name: 'Product'}, - {id: 'master-9',name: 'Sub Product'}, - {id: 'master-10',name: 'Occupation of Non earning members'}, - {id: 'master-11',name: 'Type of activity'}, - {id: 'master-12',name: 'Unit of Measurement'}, - {id: 'master-13',name: 'Frequency'}, - {id: 'master-14',name: 'Comments on locality'}, - {id: 'master-15',name: 'Customer Behaviour'}, - {id: 'master-16',name: 'Customer Segment'}, - {id: 'master-17',name: 'Designation'}, - {id: 'master-18',name: 'Lender Hierarchy'}, - {id: 'master-19',name: 'Company Details'}, - {id: 'master-20',name: 'Question Category'}, - {id: 'master-21',name: 'PD Type'}, - {id: 'master-22',name: 'Approach to PD location'}, - {id: 'master-23',name: 'PD Allocation Type'}, - {id: 'master-24',name: 'PD Notification'}, - // {id: 'master-25',name: 'PD Office Lender'}, - // {id: 'master-25',name: 'PD Team'}, - ]; + + // private masters: Master[] = [ + // {id: 'master-1',name: 'Industry Classfication'}, + // {id: 'master-2',name: 'Branch'}, + // {id: 'master-3',name: 'Title'}, + // {id: 'master-4',name: 'City'}, + // {id: 'master-5',name: 'States'}, + // {id: 'master-6',name: 'Regions'}, + // {id: 'master-7',name: 'Relation Ship'}, + // {id: 'master-8',name: 'Product'}, + // {id: 'master-9',name: 'Sub Product'}, + // {id: 'master-10',name: 'Occupation of Non earning members'}, + // {id: 'master-11',name: 'Type of activity'}, + // {id: 'master-12',name: 'Unit of Measurement'}, + // {id: 'master-13',name: 'Frequency'}, + // {id: 'master-14',name: 'Comments on locality'}, + // {id: 'master-15',name: 'Customer Behaviour'}, + // {id: 'master-16',name: 'Customer Segment'}, + // {id: 'master-17',name: 'Designation'}, + // {id: 'master-18',name: 'Lender Hierarchy'}, + // {id: 'master-19',name: 'Company Details'}, + // {id: 'master-20',name: 'Question Category'}, + // {id: 'master-21',name: 'PD Type'}, + // {id: 'master-22',name: 'Approach to PD location'}, + // {id: 'master-23',name: 'PD Allocation Type'}, + // {id: 'master-24',name: 'PD Notification'}, + // // {id: 'master-25',name: 'PD Office Lender'}, + // // {id: 'master-25',name: 'PD Team'}, + // ]; /** list of masters filtered by search keyword */ - public filteredMasters: ReplaySubject = new ReplaySubject(1); + + //public filteredMasters: ReplaySubject = new ReplaySubject(1); + + + public filteredMasters: ReplaySubject = new ReplaySubject(1); @ViewChild('singleSelect') singleSelect: MatSelect; @@ -139,14 +156,35 @@ export class MastersComponent implements OnInit { ngOnInit() { + // this._MastersService.getAllMasterData('LISTOFMASTERS').subscribe((data:Master[]) => { // this.masters = data; // console.log(this.masters); // }); - console.log(this.masters); + //console.log(this.masters); + + this._MastersService.getAllMasterData('LISTOFMASTERS').subscribe(data => { + this.dbmasters = data.records; + this.dbmasters = this.dbmasters.sort((a, b) => { + if (a.master_name > b.master_name) { + return 1; + } + if (a.master_name < b.master_name) { + return -1; + } + return 0; + }); + this.filteredMasters.next(this.dbmasters.slice()); + }); + // load the initial master list - this.filteredMasters.next(this.masters.slice()); + //this.filteredMasters.next(this.masters.slice()); + + //console.log(this.dbmasters.master_id); + + // load the initial master list + // listen for search field value changes this.masterFilterCtrl.valueChanges .pipe(takeUntil(this._onDestroy)) @@ -158,6 +196,7 @@ export class MastersComponent implements OnInit { ngAfterViewInit() { //this.setInitialValue(); + //console.log('ngafterViewInit',this.dbmasters); } ngOnDestroy() { @@ -182,21 +221,64 @@ export class MastersComponent implements OnInit { // } private filterMasters() { - if (!this.masters) { + + if (!this.dbmasters) { return; + + // this._MastersService.getAllMasterData('LISTOFMASTERS').subscribe(data => { + // this.dbmasters = data.records; + // if (!this.dbmasters) { + // return; + // } + //console.log(this.dbmasters); } + + // get the search keyword let search = this.masterFilterCtrl.value; if (!search) { - this.filteredMasters.next(this.masters.slice()); + + this._MastersService.getAllMasterData('LISTOFMASTERS').subscribe(data => { + this.dbmasters = data.records; + this.dbmasters = this.dbmasters.sort((a, b) => { + if (a.master_name > b.master_name) { + return 1; + } + if (a.master_name < b.master_name) { + return -1; + } + return 0; + }); + this.filteredMasters.next(this.dbmasters.slice()); + }); + + + //this.filteredMasters.next(this.masters.slice()); + return; } else { search = search.toLowerCase(); } // filter the masters + this._MastersService.getAllMasterData('LISTOFMASTERS').subscribe(data => { + this.dbmasters = data.records; + this.dbmasters = this.dbmasters.sort((a, b) => { + if (a.master_name > b.master_name) { + return 1; + } + if (a.master_name < b.master_name) { + return -1; + } + return 0; + }); + this.filteredMasters.next( - this.masters.filter(master => master.name.toLowerCase().indexOf(search) > -1) + //this.masters.filter(master => master.name.toLowerCase().indexOf(search) > -1) + this.dbmasters.filter(master => master.master_name.toLowerCase().indexOf(search) > -1) ); + }); + + //this.filteredMasters.next(this.dbmasters.slice()); } } diff --git a/ng6-seed/src/app/settings/masters/model/Dbmaster.ts b/ng6-seed/src/app/settings/masters/model/Dbmaster.ts new file mode 100644 index 000000000..ca8195cc2 --- /dev/null +++ b/ng6-seed/src/app/settings/masters/model/Dbmaster.ts @@ -0,0 +1,7 @@ +export class Dbmaster { + + master_id: any; + master_name: any; + constant_name: any; + +} 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 67e0462a9..4392ea103 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 @@ -12,22 +12,23 @@
-
+
- -
-<<<<<<< HEAD - -======= + +
+ + +
-
+ +
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 6a07b4430..e31ad0925 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 @@ -3,22 +3,23 @@
Manage PD Team
-
+
-
+ + +
-
+
- {{pdteamdetails.team_name | titlecase}} info - -
+ {{pdteamdetails.team_name | titlecase}} info + {{pdteamdetails.short_name}}
@@ -49,5 +50,7 @@
{{pdTeamManageData}}
+ +
\ No newline at end of file diff --git a/ng6-seed/src/app/settings/users/register/register.component.html b/ng6-seed/src/app/settings/users/register/register.component.html index 5065050f5..c48574908 100755 --- a/ng6-seed/src/app/settings/users/register/register.component.html +++ b/ng6-seed/src/app/settings/users/register/register.component.html @@ -1,79 +1,121 @@ - - - USER REGISTRATION - - - +
- Personal
+
+
+
User Registration
+
+
+ + + +
+
+
+
+ + Personal
+ +
+ + +
+ User Profile + +
+
+ +
+ + {{img}} + +
+ + + First Name Required. + Atleast 5 Characters. + Not More Than 10 Characters. + -
- - - First Name Required. - Atleast 5 Characters. - Not More Than 10 Characters. - +
+ + + Last Name Required. + + + + + +
+ + + Isactive + + +
+ + - - - - Last Name Required. - - - - - - - -
+
+
+ + Contact
+ +
+ + + email Address Required. + Invalid Email Address. + +
+ + + + Phone Number Required. + Invalid Phone Number. + + +
+ + + -- + + {{s.name}} + + + State Required. +
+ + + + -- + + {{c.name}} + + + city Required. + +
+ +
+
+
+ + - Account Details

-
- - - email Address Required. - Invalid Email Address. - - - - - - Phone Number Required. - Invalid Phone Number. - - - - - -- - - {{s.name}} - - - State Required. - - - - - -- - - {{c.name}} - - - city Required. - -
- + + @@ -134,7 +176,8 @@ city Required.
--> - Role Information

+ Role
+
Enitity Type Required +
@@ -157,7 +201,9 @@ Lender Name Required. + +
-- @@ -165,7 +211,10 @@ {{ent.full_name}} Vendor Name Required. - + + +
+ @@ -180,9 +229,12 @@
+
+
+ +
-
-
- User Profile - -
-
- -
- - {{img}} - -
-
- - Isactive - -
-
+
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 b5a3a6fed..1d9c308f8 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 @@ -1,88 +1,90 @@ - - - -
-
- -
-
-
Users

-
- - - - -
+
+ +
+
+ Users +
- - - - Sl - {{us.SerialNo}} - - - - Full Name - {{us.user_first_name}} {{us.user_last_name}} - - - - Email Id - {{us.email}} - - - Mobile No - {{us.mobile_no}} - - - Roles - {{us.role_name}} - - - Entities - {{us.entitytypename}} - - - Is Active - - - - - - - - - - - - Actions - - edit - - - - - - - - - - - - - -
- + +
+
+
+ + + + +
+
+ + + + Sl + {{us.SerialNo}} + + + + Name + {{us.user_first_name}} {{us.user_last_name}} + + + + Email + {{us.email}} + + + Mobile + {{us.mobile_no}} + + + Role + {{us.role_name}} + + + Entity + {{us.entitytypename}} + + + Active + + + + + + + + + + + + Action + + edit + + + + + + + + + + + +
+
+ +
+ \ No newline at end of file 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 29f23fae9..5d9842295 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,7 +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'; - + /**sweet alert */ +import Swal from 'sweetalert2' @Component({ selector: 'app-user-list', @@ -146,5 +147,41 @@ export class UserListComponent implements OnInit { this.getusers(); }) } + //Sweetalert2 for active and deactive +active(){ + Swal({ + title: 'Are you sure?', + type: 'warning', + showCancelButton: true, + confirmButtonColor: '#3085d6', + cancelButtonColor: '#d33', + confirmButtonText: 'Yes, activate it!' + }).then((result) => { + if (result.value) { + Swal( + 'Activated!', + 'success' + ) + } + }) +} +deactive() +{ + Swal({ + title: 'Are you sure?', + type: 'warning', + showCancelButton: true, + confirmButtonColor: '#3085d6', + cancelButtonColor: '#d33', + confirmButtonText: 'Yes, deactivate it!' + }).then((result) => { + if (result.value) { + Swal( + 'Deactivated!', + 'success' + ) + } + }) +} } 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..029b2a39b 100644 --- a/ng6-seed/src/app/template/questions/add/add.component.html +++ b/ng6-seed/src/app/template/questions/add/add.component.html @@ -12,7 +12,7 @@
- {{ ct.categroy_name }} + {{ ct.category_name }} You must Select Category. diff --git a/ng6-seed/src/app/template/questions/edit/edit.component.html b/ng6-seed/src/app/template/questions/edit/edit.component.html index 159e706ca..caa24924f 100644 --- a/ng6-seed/src/app/template/questions/edit/edit.component.html +++ b/ng6-seed/src/app/template/questions/edit/edit.component.html @@ -13,7 +13,7 @@
- {{ ct.categroy_name }} + {{ ct.category_name }} You must Select Category. diff --git a/ng6-seed/src/app/template/questions/list/list.component.html b/ng6-seed/src/app/template/questions/list/list.component.html index d4f6ed730..0a16393fe 100644 --- a/ng6-seed/src/app/template/questions/list/list.component.html +++ b/ng6-seed/src/app/template/questions/list/list.component.html @@ -12,8 +12,8 @@ - - {{cat.categroy_name}} + + {{cat.category_name}}
@@ -33,11 +33,11 @@
- {{ product.categroy_name }} + {{ product.category_name }}
{{ product.question }} @@ -84,9 +84,9 @@
- + Category - {{row.categroy_name}} + {{row.category_name}} diff --git a/ng6-seed/src/index.html b/ng6-seed/src/index.html index ec6b2a986..de6c3b18d 100644 --- a/ng6-seed/src/index.html +++ b/ng6-seed/src/index.html @@ -124,6 +124,11 @@ .mat-cell{ font-size:1.2em !important; } + .mat-header-cell{ + font-size:1.2em !important; + font-weight:800 !important; + } + .swal2-header { text-align:left !important; } From 1a645dd5a16f3ce2151571513d9bb87035cb6959 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 15 Oct 2018 21:45:49 +0530 Subject: [PATCH 3/3] questions category changes by sanjevv --- .../question-category-list.component.html | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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 96272fc1b..1ef449d34 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 @@ -35,15 +35,9 @@ {{row.serialno}} -<<<<<<< HEAD - Question Category Name - {{row.category_name}} -======= - Category - {{row.categroy_name}} ->>>>>>> f40b8b4997c74fe358c25b41f5e1e558c66841ff + {{row.category_name}}