From 0c8872e1e65ce3ed2ea820fd463f98c2fe4c4df2 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Wed, 28 Nov 2018 11:43:25 +0530 Subject: [PATCH] pd allocation view more components added --- .../allocation-view-more.component.html | 17 +++ .../allocation-view-more.component.scss | 9 ++ .../allocation-view-more.component.spec.ts | 25 +++++ .../allocation-view-more.component.ts | 18 +++ .../pd-allocation.component.html | 103 ++++++++++-------- .../pd-allocation.component.scss | 13 ++- .../pd-allocation/pd-allocation.component.ts | 37 +++++-- .../list-pd/view-pd/view-pd.component.ts | 2 + .../manage-pd/manage-pd.module.ts | 7 +- .../qc-list/qc-view/qc-view.component.ts | 2 + 10 files changed, 172 insertions(+), 61 deletions(-) create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.html create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.scss create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.spec.ts create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.ts diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.html new file mode 100644 index 000000000..a39a12bf0 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.html @@ -0,0 +1,17 @@ +

{{data.first_name}}

+ + + +
    +
  1. {{moreDat.pd_type_name}} ( ID : {{moreDat.pd_id}} )
  2. +
  3. {{moreDat.applicant_name}}
  4. +
  5. {{moreDat.pd_status}} ( {{moreDat.scheduled_on}} )
  6. +
+
+
+ +
+ + + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.scss new file mode 100644 index 000000000..076be8a35 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.scss @@ -0,0 +1,9 @@ +.paragraph_change { + color: #e00201 !important; +} +ol { + list-style-type: none; +} +ol li:first-child { + color: #62B013; +} \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.spec.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.spec.ts new file mode 100644 index 000000000..857fca66a --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AllocationViewMoreComponent } from './allocation-view-more.component'; + +describe('AllocationViewMoreComponent', () => { + let component: AllocationViewMoreComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ AllocationViewMoreComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AllocationViewMoreComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.ts new file mode 100644 index 000000000..fd89ec25f --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.ts @@ -0,0 +1,18 @@ +import { Component, OnInit, Inject } from '@angular/core'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; + +@Component({ + selector: 'app-allocation-view-more', + templateUrl: './allocation-view-more.component.html', + styleUrls: ['./allocation-view-more.component.scss'] +}) +export class AllocationViewMoreComponent implements OnInit { + + constructor(private dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data: any) { + } + + ngOnInit() { + } + +} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.html index d7cd16fcc..ef714550f 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.html @@ -1,49 +1,62 @@ -
-
- - -
- - - {{pageTitle}} - - - - - -
-
-
- - - - No Image
- {{officer.first_name}} -
- {{officer.mobile_no}}
- PD in hand - {{officer.count}} -
-
-
-
- - -
- - -

No PD officer available.

-
-
- - -
- -
- -
-
-
+

+
+ {{pageTitle}}
+
+ + +
+ +

+ + + + + + +
+
+
+ + {{officer.first_name}} + +
+
+ {{officer.mobile_no}} +
+
+ PD in hand - {{officer.count}} + +
+
+ +
+ +
+ +
+ + +

No PD officer available.

+
+
+ + + +
+ + +
+

Currently Selected: {{selectedItem.first_name}}

+
+
+ + +
+ +
+ + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.scss index 6e263adae..460dfa640 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.scss @@ -1,3 +1,14 @@ .example-full-width{ width: 100%; -} \ No newline at end of file +} +.view_more { + cursor: pointer; + color: #e00201 !important; + // text-decoration-line: underline; + // text-decoration-style: dotted; + // font-weight: bold; + +} +.text_change { + color: #e00201 !important; +} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts index a8fca707a..38eb7cdd9 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts @@ -1,8 +1,9 @@ import { Component, OnInit, Inject } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; +import { MatDialog, MatDialogRef, MAT_DIALOG_DATA , DialogPosition} 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 { AllocationViewMoreComponent } from './../allocation-view-more/allocation-view-more.component'; @Component({ selector: 'app-pd-allocation', @@ -17,10 +18,11 @@ export class PdAllocationComponent implements OnInit { notifier : NotifierService; selectedItem:any; isDisabled: boolean; + constructor( notifier: NotifierService, private _fb: FormBuilder, private dialogRef: MatDialogRef, - private _pd: PdTrigerService, + private _pd: PdTrigerService, private dialog: MatDialog, @Inject(MAT_DIALOG_DATA) public data: any) { this.notifier=notifier; } @@ -48,23 +50,16 @@ export class PdAllocationComponent implements OnInit { } }, 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){ + updatePdOfficer(allocateDetails:any) { + if(!allocateDetails){ 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, + "fk_pd_allocated_to":allocateDetails.fk_user_id, } this._pd.updatePdOfficer(updateData).subscribe( result => { @@ -87,4 +82,22 @@ export class PdAllocationComponent implements OnInit { closeAllocationComponent(): void { this.dialogRef.close(); } + // pd officer view more + viewMoreDetails(details:any){ + if(Number(details.count) > 0) { + const dialogSchedule = this.dialog.open(AllocationViewMoreComponent, { + data: details, + disableClose: true, + position: { right: '0'}, + // hasBackdrop:false + }); + // dialogSchedule.afterClosed() + // .subscribe(dataresult => { + // }); + } + else { + this.notifier.notify('warning', 'No PD In Hand'); + + } +} } 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 335fc148f..65bc8a3d8 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 @@ -114,6 +114,8 @@ export class ViewPdComponent implements OnInit, OnDestroy { if(pdData.fk_pd_type == 1){ const dialogRef = this.dialog.open(PdAllocationComponent, { data: pdData, + width: '60%', + maxHeight: '60%', disableClose: true }); dialogRef.afterClosed() 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 a23a13efa..432694b66 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 @@ -66,6 +66,7 @@ import { TelePdAllocationComponent } from './list-pd/tele-pd-allocation/tele-pd- import { PdReportComponent } from './list-pd/pd-report/pd-report.component'; import {RentalInfoComponent} from "./list-pd/start-pd/forms/rental-info/rental-info.component"; +import { AllocationViewMoreComponent } from './list-pd/allocation-view-more/allocation-view-more.component'; /** @@ -140,7 +141,7 @@ const pdCustomNotifierOptions: NotifierOptions = { // AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}), OwlDateTimeModule, // OwlNativeDateTimeModule, // ], - declarations: [RentalInfoComponent, TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent], + declarations: [RentalInfoComponent, TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent, AllocationViewMoreComponent], // exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent], // providers: [PdTrigerService, GetGeometricLocationService], @@ -172,9 +173,9 @@ const pdCustomNotifierOptions: NotifierOptions = { OwlNativeDateTimeModule, ], // declarations: [ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, AssetsInfoComponent], - exports: [PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent], + exports: [PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent, AllocationViewMoreComponent], providers: [PdTrigerService, GetGeometricLocationService], - entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent] + entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, AllocationViewMoreComponent] }) export class ManagePdModule { } diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts index 67819b0e6..a2b91264c 100644 --- a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts +++ b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts @@ -112,6 +112,8 @@ export class QcViewComponent implements OnInit, OnDestroy { if(pdData.fk_pd_type == 1){ const dialogRef = this.dialog.open(PdAllocationComponent, { data: pdData, + width: '60%', + maxHeight: '60%', disableClose: true }); dialogRef.afterClosed()