From 0297ef50aa2ba730ab6c78f9f49e6f76e80828f6 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Tue, 5 Feb 2019 13:45:26 +0530 Subject: [PATCH 1/4] start pd options changes --- .../pd-status-change-dialogue.component.html | 12 ++ .../pd-status-change-dialogue.component.scss | 0 ...d-status-change-dialogue.component.spec.ts | 25 +++ .../pd-status-change-dialogue.component.ts | 46 ++++++ .../list-pd/start-pd/start-pd.component.html | 2 +- .../list-pd/start-pd/start-pd.component.ts | 98 ++++++------ .../manage-pd/manage-pd.module.ts | 145 +----------------- 7 files changed, 135 insertions(+), 193 deletions(-) create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.html create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.scss create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.spec.ts create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.html new file mode 100644 index 000000000..d2d9b577d --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.html @@ -0,0 +1,12 @@ +

{{dialoge_title_content}}

+ +
+

+ {{dialoge_content}} +

+
+
+ + + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.spec.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.spec.ts new file mode 100644 index 000000000..56b4907d0 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PdStatusChangeDialogueComponent } from './pd-status-change-dialogue.component'; + +describe('PdStatusChangeDialogueComponent', () => { + let component: PdStatusChangeDialogueComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ PdStatusChangeDialogueComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PdStatusChangeDialogueComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts new file mode 100644 index 000000000..57eed34f7 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts @@ -0,0 +1,46 @@ +import { Component, OnInit, ViewChild , Input, Inject} from '@angular/core'; +import { NotifierService } from "angular-notifier"; +import {MatDialog,MatDialogRef,MAT_DIALOG_DATA } from '@angular/material'; +import { PdTrigerService } from '../../../pd-service/pd-triger.service'; + +@Component({ + selector: 'app-pd-status-change-dialogue', + templateUrl: './pd-status-change-dialogue.component.html', + styleUrls: ['./pd-status-change-dialogue.component.scss'] +}) +export class PdStatusChangeDialogueComponent implements OnInit { + + conformation: Boolean = false; + private notifier: NotifierService; + dialoge_title_content: string; + dialoge_content: string; + + constructor(notifier: NotifierService , private pd: PdTrigerService,private dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data: any) + { + this.notifier = notifier; + this.dialoge_title_content = this.data.pd_status=='INPROGRESS' ? 'Start PD' : this.data.pd_status=='COMPLETED' ? 'Complete PD' : 'Change PD Status'; + this.dialoge_content =this.data.pd_status=='INPROGRESS' ? 'Are you starting the Discussions ?' : this.data.pd_status=='COMPLETED' ? 'Please confirm you are completing the Discussions and forwarding for Quality Check ?' : 'Change PD Status'; + } + + ngOnInit() { + } + changePDStatus(): void { + let update_status = { + "pd_id":this.data.pdid, + }; + this.pd.editPdMasterDetails(update_status, this.data.pd_status).subscribe(result => { + if (result.status == 200) { + this.dialogRef.close({update_status:true}); + this.notifier.notify('success', this.data.pd_status=='INPROGRESS' ? 'PD Started Successfully' : this.data.pd_status=='COMPLETED' ? 'PD Completed Successfully ?' : 'PD Updated Successfully'); + } + else { + this.dialogRef.close({update_status:false}); + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + } + }, error => { + this.dialogRef.close({update_status:false}); + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + }); + } + +} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html index d64492d12..0c4ce1a5f 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html @@ -30,7 +30,7 @@ - + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts index 0af985710..1ea24c5e5 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts @@ -28,7 +28,7 @@ import {NeighbourHoodComponent} from './forms/neighbour-hood/neighbour-hood.comp import {FinalRemarksComponent} from './forms/final-remarks/final-remarks.component'; import { BusinessInfoGroupComponent } from './forms/business-info-group/business-info-group.component'; import { BusinessAssetsInfoComponent } from './forms/business-assets-info/business-assets-info.component'; - +import { PdStatusChangeDialogueComponent } from './../pd-status-change-dialogue/pd-status-change-dialogue.component'; @Component({ selector: 'app-start-pd', templateUrl: './start-pd.component.html', @@ -83,14 +83,9 @@ export class StartPdComponent implements OnInit, OnDestroy { // Ps.initialize(elemSidebar, { wheelSpeed: 2, suppressScrollX: true }); // Ps.initialize(elemContent, { wheelSpeed: 2, suppressScrollX: true }); } - - this.loadTemplates(this.startPD); + this.loadTemplates(this.startPD,1); } - // start - - - // end - + isMac(): boolean { let bool = false; if (navigator.platform.toUpperCase().indexOf('MAC') >= 0 || navigator.platform.toUpperCase().indexOf('IPAD') >= 0) { @@ -103,7 +98,9 @@ export class StartPdComponent implements OnInit, OnDestroy { return window.matchMedia(`(max-width: 960px)`).matches; } - loadTemplates(startID:string){ + + // load templates details + loadTemplates(startID:string,type:number){ this._pd.loadPDTemplates(startID).subscribe( data => { if (data.status == 200) { @@ -117,9 +114,10 @@ export class StartPdComponent implements OnInit, OnDestroy { this.actualQuestions = this.categoryFormButtons.length; let getAnsweredFormsCount = this.categoryFormButtons.filter(item=>item.isAnswered===true); this.answeredQuestions = getAnsweredFormsCount.length; - this.pdFullDetails = data.records - - + this.pdFullDetails = data.records; + if(type==1 && data.records.pdmaster_details.pd_status=='SCHEDULED') { + this.pdStatusDialogue(this.pdStatusCheck.INPROGRESS) + } } else{ this.pdMasterList = ""; @@ -132,26 +130,22 @@ export class StartPdComponent implements OnInit, OnDestroy { }); } - - - //change pd status - changePDStatus(status: string) { - - let update_array = { - "pd_id": this.startPD - } - this._pd.editPdMasterDetails(update_array, status).subscribe(result => { - if (result.status == 200) { - this.currentPDStatus = false; - this.notifier.notify('success', 'PD Completed.'); - } - else { - this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); - } - }, error => { - this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + // load pd status change dialogue + pdStatusDialogue(status: string): void { + const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, { + data: { pdid: this.startPD, pd_status: status }, + disableClose: true, + minWidth:'20%', + maxWidth:'40%', + }); + dialogRef.afterClosed() + .subscribe(dataresult => { + if(dataresult.update_status==true){ + this.loadTemplates(this.startPD,2); + } }); - } +} + // start // direct form based questions OnSelectDirectForms(details: any) { @@ -168,7 +162,7 @@ export class StartPdComponent implements OnInit, OnDestroy { dialogRef.afterClosed() .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.loadTemplates(this.startPD); + this.loadTemplates(this.startPD,2); }); }else if(this.selectedFormsCategory.form_id==2){ @@ -181,7 +175,7 @@ export class StartPdComponent implements OnInit, OnDestroy { dialogRef.afterClosed() .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.loadTemplates(this.startPD); + this.loadTemplates(this.startPD,2); }); }else if(this.selectedFormsCategory.form_id==3){ @@ -194,7 +188,7 @@ export class StartPdComponent implements OnInit, OnDestroy { dialogRef.afterClosed() .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.loadTemplates(this.startPD); + this.loadTemplates(this.startPD,2); }); }else if(this.selectedFormsCategory.form_id==4){ @@ -207,7 +201,7 @@ export class StartPdComponent implements OnInit, OnDestroy { dialogRef.afterClosed() .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.loadTemplates(this.startPD); + this.loadTemplates(this.startPD,2); }); }else if(this.selectedFormsCategory.form_id==5){ @@ -220,7 +214,7 @@ export class StartPdComponent implements OnInit, OnDestroy { dialogRef.afterClosed() .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.loadTemplates(this.startPD); + this.loadTemplates(this.startPD,2); }); }else if(this.selectedFormsCategory.form_id==6){ @@ -233,7 +227,7 @@ export class StartPdComponent implements OnInit, OnDestroy { dialogRef.afterClosed() .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.loadTemplates(this.startPD); + this.loadTemplates(this.startPD,2); }); }else if(this.selectedFormsCategory.form_id==7){ @@ -246,7 +240,7 @@ export class StartPdComponent implements OnInit, OnDestroy { dialogRef.afterClosed() .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.loadTemplates(this.startPD); + this.loadTemplates(this.startPD,2); }); } else @@ -260,7 +254,7 @@ export class StartPdComponent implements OnInit, OnDestroy { dialogRef.afterClosed() .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.loadTemplates(this.startPD); + this.loadTemplates(this.startPD,2); }); } else @@ -274,7 +268,7 @@ export class StartPdComponent implements OnInit, OnDestroy { dialogRef.afterClosed() .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.loadTemplates(this.startPD); + this.loadTemplates(this.startPD,2); }); }else if(this.selectedFormsCategory.form_id==10){ @@ -287,7 +281,7 @@ export class StartPdComponent implements OnInit, OnDestroy { dialogRef.afterClosed() .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.loadTemplates(this.startPD); + this.loadTemplates(this.startPD,2); }); }else if(this.selectedFormsCategory.form_id==11){ @@ -300,7 +294,7 @@ export class StartPdComponent implements OnInit, OnDestroy { dialogRef.afterClosed() .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.loadTemplates(this.startPD); + this.loadTemplates(this.startPD,2); }); }else if(this.selectedFormsCategory.form_id==12){ @@ -313,7 +307,7 @@ export class StartPdComponent implements OnInit, OnDestroy { dialogRef.afterClosed() .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.loadTemplates(this.startPD); + this.loadTemplates(this.startPD,2); }); }else if(this.selectedFormsCategory.form_id==13){ @@ -326,7 +320,7 @@ export class StartPdComponent implements OnInit, OnDestroy { dialogRef.afterClosed() .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.loadTemplates(this.startPD); + this.loadTemplates(this.startPD,2); }); }else if(this.selectedFormsCategory.form_id==14){ @@ -339,7 +333,7 @@ export class StartPdComponent implements OnInit, OnDestroy { dialogRef.afterClosed() .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.loadTemplates(this.startPD); + this.loadTemplates(this.startPD,2); }); }else if(this.selectedFormsCategory.form_id==15){ @@ -352,7 +346,7 @@ export class StartPdComponent implements OnInit, OnDestroy { dialogRef.afterClosed() .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.loadTemplates(this.startPD); + this.loadTemplates(this.startPD,2); }); } else @@ -366,7 +360,7 @@ export class StartPdComponent implements OnInit, OnDestroy { dialogRef.afterClosed() .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.loadTemplates(this.startPD); + this.loadTemplates(this.startPD,2); }); }else if(this.selectedFormsCategory.form_id==17){ @@ -379,7 +373,7 @@ export class StartPdComponent implements OnInit, OnDestroy { dialogRef.afterClosed() .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.loadTemplates(this.startPD); + this.loadTemplates(this.startPD,2); }); } else if(this.selectedFormsCategory.form_id==18){ @@ -392,7 +386,7 @@ export class StartPdComponent implements OnInit, OnDestroy { generaldialogRef.afterClosed() .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.loadTemplates(this.startPD); + this.loadTemplates(this.startPD,2); }); } else if(this.selectedFormsCategory.form_id==19){ @@ -405,7 +399,7 @@ export class StartPdComponent implements OnInit, OnDestroy { generaldialogRef.afterClosed() .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.loadTemplates(this.startPD); + this.loadTemplates(this.startPD,2); }); }else if(this.selectedFormsCategory.form_id==20){ const generaldialogRef = this.dialog.open(FinalRemarksComponent, { @@ -417,7 +411,7 @@ export class StartPdComponent implements OnInit, OnDestroy { generaldialogRef.afterClosed() .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.loadTemplates(this.startPD); + this.loadTemplates(this.startPD,2); }); }else if(this.selectedFormsCategory.form_id==22){ @@ -430,7 +424,7 @@ export class StartPdComponent implements OnInit, OnDestroy { dialogRef.afterClosed() .subscribe(dataresult => { // this.notifier.notify('success', 'Successfully allocated.!'); - this.loadTemplates(this.startPD); + this.loadTemplates(this.startPD,2); }); } 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 0d4c8b595..ca98cfdcc 100755 --- 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 @@ -108,6 +108,7 @@ import { ManageHouseHoldComponent } from './list-pd/start-pd/forms/assessed-inco import { ManageOtherBusinessIncomeComponent } from './list-pd/start-pd/forms/assessed-income/AI-diologue/manage-other-business-income/manage-other-business-income.component'; import { GrossProfitCalculationComponent } from './list-pd/start-pd/forms/assessed-income/gross-profit-calculation/gross-profit-calculation.component'; import { ManageDailySalesComponent } from './list-pd/start-pd/forms/assessed-income/AI-diologue/manage-daily-sales/manage-daily-sales.component'; +import { PdStatusChangeDialogueComponent } from './list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component'; /** * Custom angular notifier options */ @@ -153,143 +154,8 @@ const pdCustomNotifierOptions: NotifierOptions = { }; @NgModule({ -// <<<<<<< HEAD -// imports: [ -// CommonModule, -// ManagePdRoutingModule, -// NotifierModule.withConfig(pdCustomNotifierOptions), -// MatCardModule, -// MatIconModule, -// MatInputModule, -// MatRadioModule, -// MatTableModule, -// MatPaginatorModule, -// MatButtonModule, -// MatProgressBarModule, -// MatToolbarModule, -// FlexLayoutModule, -// NgxDatatableModule, -// FormsModule,MatSlideToggleModule, -// MatSelectModule, MatListModule,MatGridListModule, MatTabsModule, MatBadgeModule, MatCheckboxModule,MatStepperModule,MatSidenavModule ,MatMenuModule, MatButtonToggleModule, -// ReactiveFormsModule, -// FileUploadModule, -// TreeModule, -// MatDatepickerModule, -// MatDialogModule,MatSortModule, -// NgxMatSelectSearchModule,MatTooltipModule, MatExpansionModule, -// 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, -// AllocationViewMoreComponent], - -// exports: [PdAllocationComponent, -// SmartPdAllocationComponent, -// TelePdAllocationComponent, -// SchedulePdComponent, -// EditPdApplicantComponent, -// EditPdMasterComponent, -// StartPdComponent, -// CompletedPdComponent, -// QcCompletedPdComponent, -// AllocationViewMoreComponent], - -// providers: [PdTrigerService, -// GetGeometricLocationService], - -// entryComponents: [PdAllocationComponent, -// SmartPdAllocationComponent, -// SchedulePdComponent, -// EditPdApplicantComponent, -// EditPdMasterComponent, -// TelePdAllocationComponent, -// AllocationViewMoreComponent, - -// PersonalInfoComponent, -// ClientInfoComponent, -// SupplierInfoComponent, -// CurrentLoanComponent, -// LoanDetailsComponent, -// OtherIncomeComponent, -// AssetsInfoComponent, -// AddressComponent, -// FamilyDetailsComponent, -// BankingDetailsComponent, -// StockComponent, -// EmploymentInfoComponent, -// BusinessInfoComponent, -// FinancialInfoComponent, -// LenderRepresentativeComponent, -// RentalInfoComponent, -// AssessedIncomeComponent], -// ======= - // imports: [ - // CommonModule, - // ManagePdRoutingModule, - // NotifierModule.withConfig(pdCustomNotifierOptions), - // MatCardModule, - // MatIconModule, - // MatInputModule, - // MatRadioModule, - // MatTableModule, - // MatPaginatorModule, - // MatButtonModule, - // MatProgressBarModule, - // MatAutocompleteModule, - // MatToolbarModule, - // FlexLayoutModule, - // NgxDatatableModule, - // FormsModule, - // MatSlideToggleModule, - // MatSelectModule, MatListModule, MatGridListModule, MatTabsModule, MatBadgeModule, MatCheckboxModule, MatStepperModule, MatSidenavModule, MatMenuModule, MatButtonToggleModule, - // ReactiveFormsModule, - // FileUploadModule, - // TreeModule, - // MatDialogModule, MatSortModule, - // NgxMatSelectSearchModule, MatTooltipModule, MatExpansionModule, - // 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, AllocationViewMoreComponent, PdRequirementComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent, SearchRelationPipe, DeleteRecordsCountPipe, BusinessAssetsInfoComponent, BusinessBankingDetailsComponent, SalesDetailsComponent, DailySalesDetailsComponent, SalesCalculationComponent, ManageSalesComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent], - - // exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent], - // providers: [PdTrigerService, GetGeometricLocationService], - // entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent], - imports: [ + 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, PdRequirementComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent, SearchRelationPipe, DeleteRecordsCountPipe, BusinessAssetsInfoComponent, BusinessBankingDetailsComponent, SalesDetailsComponent, DailySalesDetailsComponent, SalesCalculationComponent, ManageSalesComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent], + imports: [ CommonModule, ManagePdRoutingModule, NgxViewerModule, @@ -321,14 +187,13 @@ const pdCustomNotifierOptions: NotifierOptions = { AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}),OwlDateTimeModule, 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, AllocationViewMoreComponent, GeneralInfoComponent, PdRequirementComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, BusinessOtherFamilyMemberComponent, BusinessInfoGroupComponent,DailySalesDetailsComponent, SalesCalculationComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent], + 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, GeneralInfoComponent, PdRequirementComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, BusinessOtherFamilyMemberComponent, BusinessInfoGroupComponent,DailySalesDetailsComponent, SalesCalculationComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent], providers: [PdTrigerService, GetGeometricLocationService,{provide: MAT_DATE_LOCALE, useValue: 'en-GB'}, {provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]}, {provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}], entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, AllocationViewMoreComponent, PersonalInfoComponent,BusinessAssetsInfoComponent, - ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent,BusinessBankingDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, ManageDailySalesComponent], + ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent,BusinessBankingDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, ManageDailySalesComponent,PdStatusChangeDialogueComponent], }) export class ManagePdModule { From 50da488c0ca2e0dd68d6f1fe660c1bb749837d2b Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Tue, 5 Feb 2019 14:30:49 +0530 Subject: [PATCH 2/4] changes in start pd --- .../manage-pd/list-pd/start-pd/start-pd.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts index 1ea24c5e5..7ceeb53af 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts @@ -135,7 +135,7 @@ export class StartPdComponent implements OnInit, OnDestroy { const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, { data: { pdid: this.startPD, pd_status: status }, disableClose: true, - minWidth:'20%', + minWidth:'30%', maxWidth:'40%', }); dialogRef.afterClosed() From 8694da1da61a709f6e46c9e3ec8e4ee89a5960b7 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Tue, 5 Feb 2019 14:35:32 +0530 Subject: [PATCH 3/4] pd status changes --- .../pd-status-change-dialogue.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts index 57eed34f7..cd43e6391 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts @@ -18,8 +18,8 @@ export class PdStatusChangeDialogueComponent implements OnInit { constructor(notifier: NotifierService , private pd: PdTrigerService,private dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data: any) { this.notifier = notifier; - this.dialoge_title_content = this.data.pd_status=='INPROGRESS' ? 'Start PD' : this.data.pd_status=='COMPLETED' ? 'Complete PD' : 'Change PD Status'; - this.dialoge_content =this.data.pd_status=='INPROGRESS' ? 'Are you starting the Discussions ?' : this.data.pd_status=='COMPLETED' ? 'Please confirm you are completing the Discussions and forwarding for Quality Check ?' : 'Change PD Status'; + this.dialoge_title_content = this.data.pd_status=='INPROGRESS' ? 'Start Discussions' : this.data.pd_status=='COMPLETED' ? 'Complete Discussions' : 'Change Discussions'; + this.dialoge_content =this.data.pd_status=='INPROGRESS' ? 'Are you starting the Discussions ?' : this.data.pd_status=='COMPLETED' ? 'Please confirm you are completing the Discussions and forwarding for Quality Check ?' : 'Change Discussions'; } ngOnInit() { @@ -31,7 +31,7 @@ export class PdStatusChangeDialogueComponent implements OnInit { this.pd.editPdMasterDetails(update_status, this.data.pd_status).subscribe(result => { if (result.status == 200) { this.dialogRef.close({update_status:true}); - this.notifier.notify('success', this.data.pd_status=='INPROGRESS' ? 'PD Started Successfully' : this.data.pd_status=='COMPLETED' ? 'PD Completed Successfully ?' : 'PD Updated Successfully'); + this.notifier.notify('success', this.data.pd_status=='INPROGRESS' ? 'Discussions Started Successfully' : this.data.pd_status=='COMPLETED' ? 'Discussions Completed Successfully ?' : 'Discussions Updated Successfully'); } else { this.dialogRef.close({update_status:false}); From 250d18f03474de125b272db1c799409b166cbcf6 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Tue, 5 Feb 2019 19:15:39 +0530 Subject: [PATCH 4/4] pd view map changes --- .../list-pd/view-pd/view-pd.component.html | 4 +- .../manage-pd/manage-pd.module.ts | 11 +++-- .../pd-located-map-view.directive.ts | 48 +++++++++++++++++++ .../view-location.component.html | 26 ++++++++++ .../view-location.component.scss | 48 +++++++++++++++++++ .../view-location.component.spec.ts | 25 ++++++++++ .../view-location/view-location.component.ts | 17 +++++++ 7 files changed, 173 insertions(+), 6 deletions(-) create mode 100644 ng6-seed/src/app/personal-discussion/pd-directive/pd-located-map-view.directive.ts create mode 100644 ng6-seed/src/app/personal-discussion/pd-directive/view-location/view-location.component.html create mode 100644 ng6-seed/src/app/personal-discussion/pd-directive/view-location/view-location.component.scss create mode 100644 ng6-seed/src/app/personal-discussion/pd-directive/view-location/view-location.component.spec.ts create mode 100644 ng6-seed/src/app/personal-discussion/pd-directive/view-location/view-location.component.ts 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 0597ae47a..c87152b7e 100755 --- 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 @@ -93,9 +93,9 @@
-
+
- +
{{master.addressline1}},
{{master.city_name}},
{{master.state_name}}-{{master.pincode_id == 1 ? master.other_pincode : master.pincode }}
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 ca98cfdcc..9e6bf883d 100755 --- 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 @@ -109,6 +109,9 @@ import { ManageOtherBusinessIncomeComponent } from './list-pd/start-pd/forms/ass import { GrossProfitCalculationComponent } from './list-pd/start-pd/forms/assessed-income/gross-profit-calculation/gross-profit-calculation.component'; import { ManageDailySalesComponent } from './list-pd/start-pd/forms/assessed-income/AI-diologue/manage-daily-sales/manage-daily-sales.component'; import { PdStatusChangeDialogueComponent } from './list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component'; +import { PdLocatedMapViewDirective } from './../pd-directive/pd-located-map-view.directive'; +import { ViewLocationComponent } from './../pd-directive/view-location/view-location.component'; + /** * Custom angular notifier options */ @@ -154,7 +157,7 @@ const pdCustomNotifierOptions: NotifierOptions = { }; @NgModule({ - 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, PdRequirementComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent, SearchRelationPipe, DeleteRecordsCountPipe, BusinessAssetsInfoComponent, BusinessBankingDetailsComponent, SalesDetailsComponent, DailySalesDetailsComponent, SalesCalculationComponent, ManageSalesComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent], + 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, PdRequirementComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent, SearchRelationPipe, DeleteRecordsCountPipe, BusinessAssetsInfoComponent, BusinessBankingDetailsComponent, SalesDetailsComponent, DailySalesDetailsComponent, SalesCalculationComponent, ManageSalesComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, PdLocatedMapViewDirective, ViewLocationComponent], imports: [ CommonModule, ManagePdRoutingModule, @@ -187,13 +190,13 @@ const pdCustomNotifierOptions: NotifierOptions = { AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}),OwlDateTimeModule, OwlNativeDateTimeModule, ], - 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, GeneralInfoComponent, PdRequirementComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, BusinessOtherFamilyMemberComponent, BusinessInfoGroupComponent,DailySalesDetailsComponent, SalesCalculationComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent], + 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, GeneralInfoComponent, PdRequirementComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, BusinessOtherFamilyMemberComponent, BusinessInfoGroupComponent,DailySalesDetailsComponent, SalesCalculationComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, ViewLocationComponent], providers: [PdTrigerService, GetGeometricLocationService,{provide: MAT_DATE_LOCALE, useValue: 'en-GB'}, {provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]}, - {provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}], + {provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}, PdLocatedMapViewDirective], entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, AllocationViewMoreComponent, PersonalInfoComponent,BusinessAssetsInfoComponent, - ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent,BusinessBankingDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, ManageDailySalesComponent,PdStatusChangeDialogueComponent], + ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent,BusinessBankingDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, ManageDailySalesComponent,PdStatusChangeDialogueComponent, ViewLocationComponent], }) export class ManagePdModule { diff --git a/ng6-seed/src/app/personal-discussion/pd-directive/pd-located-map-view.directive.ts b/ng6-seed/src/app/personal-discussion/pd-directive/pd-located-map-view.directive.ts new file mode 100644 index 000000000..b4cab5324 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/pd-directive/pd-located-map-view.directive.ts @@ -0,0 +1,48 @@ +import { Directive, OnInit, ElementRef, Renderer2 ,HostListener,HostBinding,Input} from '@angular/core'; +import { MatDialog,MatDialogRef,MAT_DIALOG_DATA } from '@angular/material'; +import { GetGeometricLocationService } from './../location-service/get-geometric-location.service'; +import { ViewLocationComponent } from './../pd-directive/view-location/view-location.component'; + +@Directive({ + selector: '[appPdLocatedMapView]' +}) +export class PdLocatedMapViewDirective { + + @Input() value:any; + @HostBinding('style.cursor') evPoint : string = 'none'; + lat : String; + lang: String; + constructor(private elm : ElementRef , private render:Renderer2,private dialog: MatDialog, private _geolocation: GetGeometricLocationService) { } + ngOnInit() + { + } + + @HostListener('mouseenter') mouseover(event: Event){ + this.evPoint = 'pointer'; + } + + @HostListener('click') onclick(event: Event) +{ + if(this.value.addressline1 && this.value.pincode && this.value.state_name && this.value.city_name){ + this._geolocation.findLocations(this.value.addressline1,this.value.pincode,this.value.state_name,this.value.city_name) + .subscribe(response => { + if (response.status == 'OK') { + this.lat = response.results[0].geometry.location.lat; + this.lang = response.results[0].geometry.location.lng; + const dialogRef = this.dialog.open(ViewLocationComponent, { + data: {"lat": this.lat, "lang":this.lang}, + disableClose: false, + minWidth:'30%', + maxWidth:'30%', + }); + } + }); + } + +} +@HostListener('mouseleave') mouseleave(event: Event) +{ + this.evPoint = 'none'; +} + +} diff --git a/ng6-seed/src/app/personal-discussion/pd-directive/view-location/view-location.component.html b/ng6-seed/src/app/personal-discussion/pd-directive/view-location/view-location.component.html new file mode 100644 index 000000000..1c59c9300 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/pd-directive/view-location/view-location.component.html @@ -0,0 +1,26 @@ +

+
+ PD Location +
+
+ +
+

+ +
+
+ + + + + + + +
+
+
+ + + diff --git a/ng6-seed/src/app/personal-discussion/pd-directive/view-location/view-location.component.scss b/ng6-seed/src/app/personal-discussion/pd-directive/view-location/view-location.component.scss new file mode 100644 index 000000000..b5967f66a --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/pd-directive/view-location/view-location.component.scss @@ -0,0 +1,48 @@ +@import "../../../../assets/styles/scss/material.variables"; + +:host { + margin-left: -5px; + margin-right: -5px; + margin-top: -5px; + display: block; + height: 100%; +} +.sebm-google-map-container { + width: 100%; + height: 350px; + display: flex; +} + +$mat-toolbar-height-desktop: 64px !default; +$mat-toolbar-height-mobile-portrait: 56px !default; +$mat-toolbar-height-mobile-landscape: 48px !default; + +.mat-card-top { + margin-top: -($mat-toolbar-height-desktop); +} +::ng-deep .mat-dialog-container{ + overflow: hidden; +} + +@media ($mat-xsmall) and (orientation: portrait) { + .mat-card-top { + margin-top: -($mat-toolbar-height-mobile-portrait); + } +} + +@media ($mat-small) and (orientation: landscape) { + .mat-card-top { + margin-top: -($mat-toolbar-height-mobile-landscape); + } +} +::-webkit-scrollbar { + width: 0px; /* remove scrollbar space */ + background: transparent; /* optional: just make scrollbar invisible */ +} +/* optional: show position indicator in red */ +::-webkit-scrollbar-thumb { + background: #FF0000; +} +::ng-deep .body-container{ + padding:0px !important; +} \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/pd-directive/view-location/view-location.component.spec.ts b/ng6-seed/src/app/personal-discussion/pd-directive/view-location/view-location.component.spec.ts new file mode 100644 index 000000000..86244b78d --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/pd-directive/view-location/view-location.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ViewLocationComponent } from './view-location.component'; + +describe('ViewLocationComponent', () => { + let component: ViewLocationComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ViewLocationComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ViewLocationComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/personal-discussion/pd-directive/view-location/view-location.component.ts b/ng6-seed/src/app/personal-discussion/pd-directive/view-location/view-location.component.ts new file mode 100644 index 000000000..5730a5066 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/pd-directive/view-location/view-location.component.ts @@ -0,0 +1,17 @@ +import { Component, OnInit, Input, Output, Inject } from '@angular/core'; +import { MatDialog, MatDialogRef, MAT_DIALOG_DATA , DialogPosition} from '@angular/material'; + +@Component({ + selector: 'app-view-location', + templateUrl: './view-location.component.html', + styleUrls: ['./view-location.component.scss'] +}) +export class ViewLocationComponent implements OnInit { + + constructor(@Inject(MAT_DIALOG_DATA) public data: any, private dialogRef: MatDialogRef) { } + + ngOnInit() { + console.log(this.data); + } + +}