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',