pd view changes

This commit is contained in:
gandhimathi 2018-10-13 10:18:22 +05:30
parent 73b7c5209b
commit 61c050d728
15 changed files with 578 additions and 124 deletions

View File

@ -1,7 +1,11 @@
<mat-card class="p-1"> <mat-card class="p-1">
<form [formGroup]="_PDtriggerForm" (submit)="submitPdDetails(_PDtriggerForm.value)"> <form [formGroup]="_PDtriggerForm" (submit)="submitPdDetails(_PDtriggerForm.value,PDTriggerStatus)">
<mat-card-content>
<div class="mb-2"></div> <mat-card-content>
<div style="width: 100%;text-align:right;">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above"
(click)="loadPdListCompoent(cancelStatus)"><mat-icon>close</mat-icon></button>
</div>
<div fxLayout="row" fxLayoutWrap="wrap"> <div fxLayout="row" fxLayoutWrap="wrap">
<div class="column" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100"> <div class="column" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
<mat-card class="p-2"> <mat-card class="p-2">
@ -11,67 +15,81 @@
<!-- <mat-form-field style="width: 100%"> <!-- <mat-form-field style="width: 100%">
<input matInput placeholder="First Name" type="text" name="name" required> <input matInput placeholder="First Name" type="text" name="name" required>
</mat-form-field> --> </mat-form-field> -->
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">
<mat-select placeholder="Lender Name" formControlName="fk_lender_id" required> <mat-select placeholder="Lender Name" formControlName="fk_lender_id" (selectionChange)="getBillingDetails(pdMain.fk_lender_id.value)">
<mat-option *ngFor="let LL of lenderList" [value]="LL.entity_id" > <mat-option *ngFor="let LL of lenderList" [value]="LL.entity_id" >
{{LL.full_name}} {{LL.full_name}}
</mat-option> </mat-option>
</mat-select> </mat-select>
<mat-error *ngIf="pdMain.fk_lender_id.hasError('required')" class="mat-text-warn">Lender name is required.</mat-error> <!-- <mat-error *ngIf="pdMain.fk_lender_id.hasError('required')" class="mat-text-warn">Lender Name Required.</mat-error> -->
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">
<input matInput placeholder="Lender Applicant ID" formControlName="lender_applicant_id" type="text" required> <input matInput placeholder="Lender Applicant ID" formControlName="lender_applicant_id" type="text" required>
<mat-error *ngIf="pdMain.lender_applicant_id.hasError('required')">Applicant id is required.</mat-error> <mat-error *ngIf="pdMain.lender_applicant_id.hasError('required')">Applicant ID Required</mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%">
<mat-select placeholder="Billing Address" formControlName="lender_billing">
<mat-option *ngFor="let billL of billingList" [value]="billL.entity_billing_id" >
{{billL.billing_name}}
</mat-option>
</mat-select>
<!-- <mat-error *ngIf="pdMain.lender_billing.hasError('required')">Billing Address Required</mat-error> -->
</mat-form-field>
<mat-form-field style="width: 100%">
<input matInput placeholder="Contact Person" formControlName="lender_contact_person" type="text" required>
<mat-error *ngIf="pdMain.lender_contact_person.hasError('required')">Contact Person Required</mat-error>
</mat-form-field>
<mat-form-field style="width: 100%">
<input matInput placeholder="Contact Number" formControlName="lender_contact_mobile" type="text" required>
<mat-error *ngIf="pdMain.lender_contact_mobile.hasError('required')">Contact Number Required</mat-error>
</mat-form-field>
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">
<mat-select placeholder="Product Name" formControlName="fk_product_id" (selectionChange)="getSubproductList(pdMain.fk_product_id.value)" required> <mat-select placeholder="Product Name" formControlName="fk_product_id" (selectionChange)="getSubproductList(pdMain.fk_product_id.value)">
<mat-option *ngFor="let PL of productList" [value]="PL.product_id" > <mat-option *ngFor="let PL of productList" [value]="PL.product_id" >
{{PL.product_name}} {{PL.product_name}}
</mat-option> </mat-option>
</mat-select> </mat-select>
<mat-error *ngIf="pdMain.fk_product_id.hasError('required')">Product is required.</mat-error> <!-- <mat-error *ngIf="pdMain.fk_product_id.hasError('required')">Product Required.</mat-error> -->
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">
<mat-select placeholder="Sub product Name" formControlName="fk_subproduct_id" required> <mat-select placeholder="Sub product Name" formControlName="fk_subproduct_id">
<mat-option *ngFor="let SPL of subProductList" [value]="SPL.subproduct_id" > <mat-option *ngFor="let SPL of subProductList" [value]="SPL.subproduct_id" >
{{SPL.subproduct_name}} {{SPL.subproduct_name}}
</mat-option> </mat-option>
</mat-select> </mat-select>
<mat-error *ngIf="pdMain.fk_subproduct_id.hasError('required')">Sub product is required.</mat-error> <!-- <mat-error *ngIf="pdMain.fk_subproduct_id.hasError('required')">Sub Product Required.</mat-error> -->
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">
<mat-select placeholder="Customer Segment" formControlName="fk_customer_segment" required> <mat-select placeholder="Customer Segment" formControlName="fk_customer_segment">
<mat-option *ngFor="let CSL of customerSegmentList" [value]="CSL.customer_segment_id" > <mat-option *ngFor="let CSL of customerSegmentList" [value]="CSL.customer_segment_id" >
{{CSL.customer_segment}} {{CSL.customer_segment}}
</mat-option> </mat-option>
</mat-select> </mat-select>
<mat-error *ngIf="pdMain.fk_customer_segment.hasError('required')">Customer segment is required.</mat-error> <!-- <mat-error *ngIf="pdMain.fk_customer_segment.hasError('required')">Customer Segment Required.</mat-error> -->
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">
<mat-select placeholder="PD Type" formControlName="fk_pd_type" required> <mat-select placeholder="PD Type" formControlName="fk_pd_type">
<mat-option *ngFor="let PDL of pdTypeList" [value]="PDL.pd_type_id" > <mat-option *ngFor="let PDL of pdTypeList" [value]="PDL.pd_type_id" >
{{PDL.type_name}} {{PDL.type_name}}
</mat-option> </mat-option>
</mat-select> </mat-select>
<mat-error *ngIf="pdMain.fk_pd_type.hasError('required')">PD type is required.</mat-error> <!-- <mat-error *ngIf="pdMain.fk_pd_type.hasError('required')">PD Type Required.</mat-error> -->
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">
<input matInput placeholder="Loan Amount" formControlName="loan_amount" required> <input matInput placeholder="Loan Amount" formControlName="loan_amount">
<mat-error *ngIf="pdMain.loan_amount.hasError('required')">Amount is required.</mat-error> <!-- <mat-error *ngIf="pdMain.loan_amount.hasError('required')">Amount Required.</mat-error> -->
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">
<textarea matInput placeholder="Address 1" formControlName="addressline1" required></textarea> <textarea matInput placeholder="Address 1" formControlName="addressline1"></textarea>
<mat-error *ngIf="pdMain.addressline1.hasError('required')">Address1 required.</mat-error> <!-- <mat-error *ngIf="pdMain.addressline1.hasError('required')">Address1 required.</mat-error> -->
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">
@ -82,31 +100,31 @@
<textarea matInput placeholder="Address 3" formControlName="addressline3"></textarea> <textarea matInput placeholder="Address 3" formControlName="addressline3"></textarea>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%;"> <mat-form-field style="width: 100%;">
<mat-select placeholder="Select State" formControlName="fk_state" (selectionChange)="getCityList(pdMain.fk_state.value)" required> <mat-select placeholder="State" formControlName="fk_state" (selectionChange)="getCityList(pdMain.fk_state.value)">
<mat-option *ngFor="let SL of stateList" [value]="SL.state_id"> <mat-option *ngFor="let SL of stateList" [value]="SL.state_id">
{{SL.state_name}} {{SL.state_name}}
</mat-option> </mat-option>
</mat-select> </mat-select>
<mat-error *ngIf="pdMain.fk_state.hasError('required')">State is required.</mat-error> <!-- <mat-error *ngIf="pdMain.fk_state.hasError('required')">State Required.</mat-error> -->
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%;"> <mat-form-field style="width: 100%;">
<mat-select placeholder="Select City" formControlName="fk_city" required> <mat-select placeholder="City" formControlName="fk_city">
` <mat-option *ngFor="let CL of cityList" [value]="CL.city_id"> ` <mat-option *ngFor="let CL of cityList" [value]="CL.city_id">
{{CL.city_name}} {{CL.city_name}}
</mat-option> </mat-option>
</mat-select> </mat-select>
<mat-error *ngIf="pdMain.fk_city.hasError('required')">City is required.</mat-error> <!-- <mat-error *ngIf="pdMain.fk_city.hasError('required')">City Required.</mat-error> -->
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%;"> <mat-form-field style="width: 100%;">
<input matInput placeholder="Pincode" formControlName="pincode" required> <input matInput placeholder="Pincode" formControlName="pincode">
<mat-error *ngIf="pdMain.pincode.hasError('required')">Pincode is required.</mat-error> <!-- <mat-error *ngIf="pdMain.pincode.hasError('required')">Pincode Required.</mat-error> -->
</mat-form-field> </mat-form-field>
<div class="ml-xs mr-xs" style="width: 100%;" fxLayout="row" > <!-- <div class="ml-xs mr-xs" style="width: 100%;" fxLayout="row" >
<h4 mat-dialog-title style="width: 14%;margin-top: 0%;">Allocation</h4> <h4 mat-dialog-title style="width: 14%;margin-top: 0%;">Allocation</h4>
<div style="width: 20%;"> <mat-slide-toggle formControlName="allocation_type" <div style="width: 20%;"> <mat-slide-toggle formControlName="allocation_type"
class="example-margin" id="type" class="example-margin" id="type"
@ -120,7 +138,7 @@
checked="allocationTypeModel==1 ? false:allocationTypeModel==2 ? true"> {{subAllocationLabel}} checked="allocationTypeModel==1 ? false:allocationTypeModel==2 ? true"> {{subAllocationLabel}}
</mat-slide-toggle> </mat-slide-toggle>
</div> </div>
</div> </div> -->
</div> </div>
</mat-card> </mat-card>
@ -133,22 +151,23 @@
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">
<input matInput placeholder="Name" formControlName="applicant_name" required> <input matInput placeholder="Name" formControlName="applicant_name">
<mat-error *ngIf="pdMain.applicant_name.hasError('required')">Name is required.</mat-error> <!-- <mat-error *ngIf="pdMain.applicant_name.hasError('required')">Name Required.</mat-error> -->
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">
<input matInput placeholder="Email" formControlName="email" type="email" required> <input matInput placeholder="Phone" formControlName="mobile_no" type="text">
<mat-error *ngIf="pdMain.email.hasError('required')">Email number is required.</mat-error> <!-- <mat-error *ngIf="pdMain.mobile_no.hasError('required')">Mobile Required.</mat-error> -->
</mat-form-field>
<mat-form-field style="width: 100%">
<input matInput placeholder="Email" formControlName="email" type="email">
<!-- <mat-error *ngIf="pdMain.email.hasError('required')">Email Required.</mat-error> -->
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%">
<input matInput placeholder="Phone" formControlName="mobile_no" type="text" required>
<mat-error *ngIf="pdMain.mobile_no.hasError('required')">Mobile number is required.</mat-error>
</mat-form-field>
</mat-card> </mat-card>
</div> </div>
</div> </div>
@ -169,8 +188,19 @@
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%"> <mat-form-field style="width: 100%">
<input matInput placeholder="Relation" formControlName="relationship" type="text">
</mat-form-field> <mat-select placeholder="Relationship" formControlName="relationship">
<mat-option *ngFor="let rel of relationShipList" [value]="rel.relationship_id" >
{{rel.name}}
</mat-option>
</mat-select>
</mat-form-field>
<div style="width:20%">
<span (click)="removeCoApplicant(i)">
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
</span>
</div>
</div> </div>
</mat-card> </mat-card>
</div> </div>
@ -182,7 +212,7 @@
<h5>Co-Applicant</h5> <h5>Co-Applicant</h5>
<!-- <button _ngcontent-c29="" class="mr-1 mb-2 mat-fab1 mat-accent" mat-fab="" (click)="addCoApplicant(createWithLongContent)"><span class="mat-button-wrapper"><mat-icon _ngcontent-c29="" class="mat-icon material-icons" role="img" aria-hidden="true">add</mat-icon></span><div class="mat-button-ripple mat-ripple mat-button-ripple-round" matripple=""></div><div class="mat-button-focus-overlay"></div></button> --> <!-- <button _ngcontent-c29="" class="mr-1 mb-2 mat-fab1 mat-accent" mat-fab="" (click)="addCoApplicant(createWithLongContent)"><span class="mat-button-wrapper"><mat-icon _ngcontent-c29="" class="mat-icon material-icons" role="img" aria-hidden="true">add</mat-icon></span><div class="mat-button-ripple mat-ripple mat-button-ripple-round" matripple=""></div><div class="mat-button-focus-overlay"></div></button> -->
<!--<button mat-fab class="mr-1 mb-1" color="primary" (click)="addCoApplicant()"><mat-icon>add</mat-icon></button>--> <!--<button mat-fab class="mr-1 mb-1" color="primary" (click)="addCoApplicant()"><mat-icon>add</mat-icon></button>-->
<button mat-fab class="mr-1 mb-1" color="primary" style="opacity: 0.5;" (click)="addCoApplicant()"><mat-icon>add</mat-icon><div class="mat-button-ripple mat-ripple" matripple=""></div><div class="mat-button-focus-overlay"></div></button> <button mat-fab class="mr-1 mb-1" color="primary" style="opacity: 0.5;" (click)="addCoApplicant()"><mat-icon>group_add</mat-icon><div class="mat-button-ripple mat-ripple" matripple=""></div><div class="mat-button-focus-overlay"></div></button>
<!-- <button mat-raised-button mat-button-sm color="primary" (click)="addCoApplicant()" type="button">Add More Co-Applicant</button> --> <!-- <button mat-raised-button mat-button-sm color="primary" (click)="addCoApplicant()" type="button">Add More Co-Applicant</button> -->
</mat-card> </mat-card>
@ -197,7 +227,7 @@
<mat-list> <mat-list>
<mat-list-item> <mat-list-item>
<!-- <button mat-raised-button mat-button-sm color="primary" type="button">Add Document</button> --> <!-- <button mat-raised-button mat-button-sm color="primary" type="button">Add Document</button> -->
<button mat-fab class="mr-1 mb-1" color="primary" style="opacity: 0.5;" (click)="addMoreDocs()" class="mat-button-wrapper"><mat-icon>add</mat-icon><div class="mat-button-ripple mat-ripple" matripple=""></div><div class="mat-button-focus-overlay"></div></button> <button mat-fab class="mr-1 mb-1" color="primary" style="opacity: 0.5;" (click)="addMoreDocs()" class="mat-button-wrapper"><mat-icon>attach_file</mat-icon><div class="mat-button-ripple mat-ripple" matripple=""></div><div class="mat-button-focus-overlay"></div></button>
</mat-list-item> </mat-list-item>
</mat-list> </mat-list>
@ -213,7 +243,12 @@
<input type="file" title="Browse Document" (change)="fileSelectionEvent($event,d)" formControlName="documentFile"> <input type="file" title="Browse Document" (change)="fileSelectionEvent($event,d)" formControlName="documentFile">
</mat-list-item> </mat-list-item>
<mat-list-item> <mat-list-item>
<button mat-button color="accent" (click)="removeItem(d)" type="button">Remove</button> <!-- <button mat-button color="accent" (click)="removeItem(d)" type="button">Remove</button> -->
<div style="width:20%">
<span (click)="removeItem(d)">
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
</span>
</div>
</mat-list-item> </mat-list-item>
</mat-list> </mat-list>
</mat-card> </mat-card>
@ -228,10 +263,15 @@
</mat-card-actions> --> </mat-card-actions> -->
<mat-card-actions style="text-align: right"> <mat-card-actions style="text-align: right">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above"
(click)="loadPdListCompoent(cancelStatus)"><mat-icon>close</mat-icon></button> (click)="loadPdListCompoent(cancelStatus)"><mat-icon>close</mat-icon></button>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="submit"><mat-icon>save</mat-icon></button>
<!-- <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Click To Draft" matTooltipPosition="above" type="button" (click)="addCoApplicant()"><mat-icon>drafts</mat-icon></button> -->
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" (click)="submitPdDetails(_PDtriggerForm.value,draftStatus)" matTooltip="PD Draft" matTooltipPosition="above"><mat-icon>drafts</mat-icon></button>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="submit" matTooltip="PD Process" matTooltipPosition="above" [disabled]="!enablePDButton || !_PDtriggerForm.valid "><mat-icon>save</mat-icon></button>
</mat-card-actions> </mat-card-actions>
</form> </form>
</mat-card> </mat-card>

View File

@ -15,6 +15,9 @@ import { AwsService } from '../../../../AwsService/aws.service';
export class AddPdComponent implements OnInit, OnDestroy { export class AddPdComponent implements OnInit, OnDestroy {
//@Output() loadParent = new EventEmitter<string>(); //@Output() loadParent = new EventEmitter<string>();
cancelStatus: boolean; cancelStatus: boolean;
enablePDButton: boolean;
draftStatus: boolean;
PDTriggerStatus: boolean;
private notifier: NotifierService; private notifier: NotifierService;
public _PDtriggerForm: FormGroup; public _PDtriggerForm: FormGroup;
items: FormArray; items: FormArray;
@ -25,15 +28,17 @@ export class AddPdComponent implements OnInit, OnDestroy {
stateList:any; stateList:any;
cityList:any; cityList:any;
pdTypeList:any; pdTypeList:any;
billingList: any;
relationShipList: any;
errorMessage: any; errorMessage: any;
// Dynamic co applicant // Dynamic co applicant
createWithLongContent = false; createWithLongContent = false;
dynamicCoApplicant = []; dynamicCoApplicant = [];
allocationTypeModel: number; //allocationTypeModel: number;
allocationTypeCheck: boolean; //allocationTypeCheck: boolean;
subAllocationTypeCheck: boolean; //subAllocationTypeCheck: boolean;
allocationLabel: string; //allocationLabel: string;
subAllocationLabel: string; //subAllocationLabel: string;
constructor(notifier: NotifierService,private _fb: FormBuilder,private route: ActivatedRoute, constructor(notifier: NotifierService,private _fb: FormBuilder,private route: ActivatedRoute,
private router: Router,private _pd: PdTrigerService, private _aws:AwsService, private ListPdComponent: ListPdComponent) { private router: Router,private _pd: PdTrigerService, private _aws:AwsService, private ListPdComponent: ListPdComponent) {
this.notifier = notifier; this.notifier = notifier;
@ -42,6 +47,9 @@ export class AddPdComponent implements OnInit, OnDestroy {
public totalFileName = []; public totalFileName = [];
public lengthCheckToaddMore =0; public lengthCheckToaddMore =0;
ngOnInit() { ngOnInit() {
this.draftStatus=false;
this.PDTriggerStatus=true;
this.enablePDButton=false;
this.cancelStatus = false; this.cancelStatus = false;
this.ListPdComponent.pdListLoad(false); this.ListPdComponent.pdListLoad(false);
this.getLenderList(); this.getLenderList();
@ -49,31 +57,46 @@ export class AddPdComponent implements OnInit, OnDestroy {
this.getCustomerSegmentList(); this.getCustomerSegmentList();
this.getStateCityList(); this.getStateCityList();
this.getPDTypeList(); this.getPDTypeList();
this.getRelationMaster();
this._PDtriggerForm = this._fb.group({ this._PDtriggerForm = this._fb.group({
fk_lender_id: [null, Validators.compose([Validators.required])], fk_lender_id: [null],
lender_applicant_id: [null, Validators.compose([Validators.required])], lender_applicant_id: [null, Validators.compose([Validators.required])],
fk_product_id: [null, Validators.compose([Validators.required])], lender_contact_person: [null, Validators.compose([Validators.required])],
fk_subproduct_id: [null, Validators.compose([Validators.required])], lender_contact_mobile: [null, Validators.compose([Validators.required])],
fk_pd_type: [null, Validators.compose([Validators.required])], lender_billing: [null],
fk_customer_segment: [null, Validators.compose([Validators.required])], fk_product_id: [null],
loan_amount: [null, Validators.compose([Validators.required])], fk_subproduct_id: [null],
applicant_name: [null, Validators.compose([Validators.required])], fk_pd_type: [null],
mobile_no: [null, Validators.compose([Validators.required])], fk_customer_segment: [null],
email: [null, Validators.compose([Validators.required, CustomValidators.email])], loan_amount: [null],
  addressline1: [null, Validators.compose([Validators.required])], applicant_name: [null],
mobile_no: [null],
email: [null],
  addressline1: [null],
addressline2: [null], addressline2: [null],
addressline3: [null], addressline3: [null],
fk_city: [null, Validators.compose([Validators.required])], fk_city: [null],
fk_state: [null, Validators.compose([Validators.required])], fk_state: [null],
  pincode : [null, Validators.compose([Validators.required])],   pincode : [null],
  allocation_type: [null],   // allocation_type: [null],
  sub_allocation_type: [null],   // sub_allocation_type: [null],
items: this._fb.array([]), items: this._fb.array([]),
documents: this._fb.array([]) documents: this._fb.array([])
}); });
this.OnChanges();
} }
// enable pd trigger submit function
OnChanges(): void{
this._PDtriggerForm.valueChanges.subscribe(val => {
if(val.fk_lender_id && val.fk_product_id && val.fk_subproduct_id && val.fk_pd_type && val.fk_customer_segment && val.loan_amount && val.applicant_name && val.mobile_no && val.addressline1 && val.fk_city && val.fk_state && val.pincode){
this.enablePDButton=true;
}
else{
this.enablePDButton=false;
}
});
}
getLenderList(){ getLenderList(){
this._pd.getLenderDetails().subscribe( this._pd.getLenderDetails().subscribe(
data => { data => {
@ -112,29 +135,34 @@ export class AddPdComponent implements OnInit, OnDestroy {
data => { data => {
if (data.status == 200) { if (data.status == 200) {
this.pdTypeList=data.records.pd_type; this.pdTypeList=data.records.pd_type;
if(data.records.pd_allocation_type){
let getDefaultAllocation= data.records.pd_allocation_type.filter(item => item.default == 1); //start hide pd allocation type functinality
if(getDefaultAllocation[0].pd_allocation_type_id==1){
this.allocationTypeModel=1; // if(data.records.pd_allocation_type){
this.allocationTypeCheck=false; // let getDefaultAllocation= data.records.pd_allocation_type.filter(item => item.default == 1);
this.subAllocationTypeCheck=false; // if(getDefaultAllocation[0].pd_allocation_type_id==1){
this.allocationLabel="Auto"; // this.allocationTypeModel=1;
this.subAllocationLabel="Load Balance"; // this.allocationTypeCheck=false;
} // this.subAllocationTypeCheck=false;
else if(this.allocationTypeModel[0].pd_allocation_type_id==2){ // this.allocationLabel="Auto";
this.allocationTypeModel=2; // this.subAllocationLabel="Load Balance";
this.allocationTypeCheck=false; // }
this.subAllocationTypeCheck=true; // else if(this.allocationTypeModel[0].pd_allocation_type_id==2){
this.allocationLabel="Auto"; // this.allocationTypeModel=2;
this.subAllocationLabel="Nearest"; // this.allocationTypeCheck=false;
} // this.subAllocationTypeCheck=true;
else if(this.allocationTypeModel[0].pd_allocation_type_id==3){ // this.allocationLabel="Auto";
this.allocationTypeModel=3; // this.subAllocationLabel="Nearest";
this.allocationTypeCheck=true; // }
this.allocationLabel="Manual"; // else if(this.allocationTypeModel[0].pd_allocation_type_id==3){
} // this.allocationTypeModel=3;
// this.allocationTypeCheck=true;
// this.allocationLabel="Manual";
// }
} // }
// end
} }
}, error => this.errorMessage = <any> error); }, error => this.errorMessage = <any> error);
@ -151,6 +179,23 @@ export class AddPdComponent implements OnInit, OnDestroy {
this.cityList= this.stateList.filter(item => item.state_id == stateID); this.cityList= this.stateList.filter(item => item.state_id == stateID);
this.cityList=this.cityList[0].cities; this.cityList=this.cityList[0].cities;
} }
// lendor billing address
getBillingDetails(lendorID:string){
this.billingList= this.lenderList.filter(item => item.entity_id == lendorID);
this.billingList=this.billingList[0].billing_address;
}
// get relation master details
getRelationMaster(){
let relation ="RELATIONSHIPS";
this._pd.getAllMasterDatas(relation).subscribe(
data => {
if (data.status == 200) {
this.relationShipList=data.records;
}
}, error => this.errorMessage = <any> error);
}
createItem(): FormGroup { createItem(): FormGroup {
return this._fb.group({ return this._fb.group({
label: ['Co Applicant'], label: ['Co Applicant'],
@ -191,10 +236,14 @@ export class AddPdComponent implements OnInit, OnDestroy {
get documents(): FormArray { get documents(): FormArray {
return this._PDtriggerForm.get('documents') as FormArray; return this._PDtriggerForm.get('documents') as FormArray;
}; };
get pdMain() { return this._PDtriggerForm.controls; } get pdMain() {
return this._PDtriggerForm.controls; }
get pdCoApplicant() { return this._PDtriggerForm.get('items') as FormArray; } get pdCoApplicant() { return this._PDtriggerForm.get('items') as FormArray; }
removeCoApplicant(i: number) {
const control = <FormArray>this._PDtriggerForm.controls['items'];
control.removeAt(i);
}
removeItem(index: number) { removeItem(index: number) {
this.totalfiles.splice(index,1); this.totalfiles.splice(index,1);
this.totalFileName.splice(index,1); this.totalFileName.splice(index,1);
@ -229,13 +278,16 @@ export class AddPdComponent implements OnInit, OnDestroy {
this.lengthCheckToaddMore=1; this.lengthCheckToaddMore=1;
} }
} }
submitPdDetails(formValue: any) { submitPdDetails(formValue: any, status:boolean) {
if(this._PDtriggerForm.valid){ if(this._PDtriggerForm.valid){
// let my_array = this.PDtriggerForm.value; // let my_array = this.PDtriggerForm.value;
// Object.keys(my_array).forEach((key) => ( my_array[key] == null) && delete my_array[key]); // Object.keys(my_array).forEach((key) => ( my_array[key] == null) && delete my_array[key]);
let pd_details:any={ let pd_details:any={
"fk_lender_id":formValue.fk_lender_id, "fk_lender_id":formValue.fk_lender_id,
"lender_applicant_id":formValue.lender_applicant_id, "lender_applicant_id":formValue.lender_applicant_id,
"lender_billing_id":formValue.lender_billing,
"lender_contact_person":formValue.lender_contact_person,
"lender_contact_mobile":formValue.lender_contact_mobile,
"fk_product_id":formValue.fk_product_id, "fk_product_id":formValue.fk_product_id,
"fk_subproduct_id":formValue.fk_subproduct_id, "fk_subproduct_id":formValue.fk_subproduct_id,
"fk_pd_type":formValue.fk_pd_type, "fk_pd_type":formValue.fk_pd_type,
@ -247,7 +299,8 @@ export class AddPdComponent implements OnInit, OnDestroy {
"fk_city":formValue.fk_city, "fk_city":formValue.fk_city,
"fk_state":formValue.fk_state, "fk_state":formValue.fk_state,
"pincode":formValue.pincode , "pincode":formValue.pincode ,
"fk_pd_allocation_type":this.allocationTypeModel , "pd_status": status,
//"fk_pd_allocation_type":this.allocationTypeModel ,
"fk_createdby" : this._aws.getlocale(), "fk_createdby" : this._aws.getlocale(),
"createdon": new Date().toJSON().slice(0,19).replace('T',' ') "createdon": new Date().toJSON().slice(0,19).replace('T',' ')
}; };
@ -306,29 +359,32 @@ export class AddPdComponent implements OnInit, OnDestroy {
}); });
} }
} }
changeAllocationType(status: boolean) { // start hide allocation type functionality
if(status){
this.allocationTypeModel=3; // changeAllocationType(status: boolean) {
this.allocationLabel="Manual"; // if(status){
} // this.allocationTypeModel=3;
else{ // this.allocationLabel="Manual";
this.allocationTypeModel=1; // }
this.allocationLabel="Auto"; // else{
this.subAllocationLabel="Load Balance"; // this.allocationTypeModel=1;
} // this.allocationLabel="Auto";
} // this.subAllocationLabel="Load Balance";
changeSubAllocationType(status: boolean){ // }
if(status){ // }
this.allocationTypeModel=2; // changeSubAllocationType(status: boolean){
this.allocationLabel="Auto"; // if(status){
this.subAllocationLabel="Nearest"; // this.allocationTypeModel=2;
} // this.allocationLabel="Auto";
else{ // this.subAllocationLabel="Nearest";
this.allocationTypeModel=1; // }
this.allocationLabel="Auto"; // else{
this.subAllocationLabel="Load Balance"; // this.allocationTypeModel=1;
} // this.allocationLabel="Auto";
} // this.subAllocationLabel="Load Balance";
// }
// }
// end
loadPdListCompoent(from:boolean) { loadPdListCompoent(from:boolean) {
if(from){ if(from){
this.router.navigate([ '../../' ], { relativeTo: this.route }); this.router.navigate([ '../../' ], { relativeTo: this.route });

View File

@ -1,6 +1,6 @@
<div align="right" *ngIf="viewPdList"> <div align="right" *ngIf="viewPdList">
<button mat-raised-button mat-button-sm color="primary" (click)="viewMapPdDetails()" class="mr-1 mb-1"><mat-icon>map</mat-icon>Map List</button> <button mat-stroked-button color="primary" (click)="viewMapPdDetails()" class="mr-1 mb-1"><mat-icon>map</mat-icon>Map List</button>
<button mat-raised-button mat-button-sm color="primary" (click)="addPdDetails()" class="mr-1 mb-1"><mat-icon>add</mat-icon>Add PD</button> <button mat-stroked-button color="primary" (click)="addPdDetails()" class="mr-1 mb-1"><mat-icon>add</mat-icon>Add PD</button>
</div> </div>
<mat-card *ngIf="viewPdList"> <mat-card *ngIf="viewPdList">
<mat-tab-group> <mat-tab-group>
@ -25,7 +25,7 @@
<div class="comment-time"> <div class="comment-time">
<!-- <button mat-raised-button mat-icon-button mat-button-sm class="mr-1 mb-1" color="accent" type="button" (click)="viewPdDetails(details.pd_id)"><mat-icon>visibility</mat-icon></button> --> <!-- <button mat-raised-button mat-icon-button mat-button-sm class="mr-1 mb-1" color="accent" type="button" (click)="viewPdDetails(details.pd_id)"><mat-icon>visibility</mat-icon></button> -->
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="viewPdDetails(details.pd_id)"><mat-icon>visibility</mat-icon></button> <button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="viewPDDetails(details.pd_id)"><mat-icon>visibility</mat-icon></button>
@ -124,6 +124,7 @@
</mat-tab-group> </mat-tab-group>
</mat-card> </mat-card>
<notifier-container></notifier-container>
<router-outlet></router-outlet> <router-outlet></router-outlet>

View File

@ -79,6 +79,11 @@ export class ListPdComponent implements OnInit, OnDestroy {
this.viewPdList = status; this.viewPdList = status;
this.loadPDDetails(); this.loadPDDetails();
} }
viewPDDetails(pdid:string){
this.viewPdList = !this.viewPdList;
this.router.navigate([ '../pdlist/viewpd',pdid], { relativeTo: this.route });
}
ngOnDestroy(): void { ngOnDestroy(): void {
this.viewPdList=false; this.viewPdList=false;
} }

View File

@ -1,7 +1,7 @@
<div fxLayout="row"> <div fxLayout="row">
<div class="column" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100"> <div class="column" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
<div align="right"> <div align="right">
<button mat-raised-button mat-button-sm color="primary" (click)="goList()" class="mr-1 mb-1"><mat-icon>arrow_back</mat-icon>List</button> <button mat-stroked-button color="primary" (click)="goList()" class="mr-1 mb-1"><mat-icon>arrow_back</mat-icon>List</button>
</div> </div>
<mat-card class="mb-2" > <mat-card class="mb-2" >
<mat-card-header> <mat-card-header>

View File

@ -0,0 +1,43 @@
<div style="max-height: 480px;">
<mat-card style="width: 580px; padding: 2px;">
<mat-card-header>
<mat-card-title>{{pageTitle}}</mat-card-title>
</mat-card-header>
<mat-card-content>
<!-- <form [formGroup]="_pdAllocationForm" (submit)="onSubmit()"> -->
<mat-list *ngIf="pdOfficerList.length > 0">
<mat-list-item *ngFor="let officer of pdOfficerList">
<p><mat-radio-button (change)="selectPdOfficer(officer)"></mat-radio-button>
{{officer.first_name}}
</p>
<p style="padding-left: 8%;">
<span matBadge="{{officer.allocated}}" matBadgeOverlap="false" matBadgeColor="accent">Allocated</span>
</p>
<p style="padding-left: 8%;">
<span matBadge="{{officer.scheduled}}" matBadgeOverlap="false" >Scheduled</span>
</p>
<p style="padding-left: 8%;">
<span matBadge="{{officer.inprogress}}" matBadgeOverlap="false" matBadgeColor="warn">Inprogress</span>
</p>
</mat-list-item>
</mat-list>
<mat-list *ngIf="pdOfficerList.length == 0">
<mat-list-item>
<p>PD officer not available..</p>
</mat-list-item>
</mat-list>
<div class="row" style="text-align:right;">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button"
(click)="closeAllocationComponent()"><mat-icon>close</mat-icon></button>
<button mat-raised-button mat-icon-button (click)="updatePdOfficer(selectedItem)" class="mr-1 mb-1 hover-icon" type="button"><mat-icon>save</mat-icon></button>
</div>
<!-- </form> -->
</mat-card-content>
</mat-card>
</div>
<notifier-container></notifier-container>

View File

@ -0,0 +1,3 @@
.example-full-width{
width: 100%;
}

View File

@ -0,0 +1,90 @@
import { Component, OnInit, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
import { NotifierService } from 'angular-notifier';
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
@Component({
selector: 'app-pd-allocation',
templateUrl: './pd-allocation.component.html',
styleUrls: ['./pd-allocation.component.scss']
})
export class PdAllocationComponent implements OnInit {
public pageTitle: string = "PD Allocation To";
public _pdAllocationForm: FormGroup;
public pdOfficerList: any = [];
errorMessage: any;
notifier : NotifierService;
selectedItem:any;
isDisabled: boolean;
constructor( notifier: NotifierService,
private _fb: FormBuilder,
private dialogRef: MatDialogRef<PdAllocationComponent>,
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 = <any> 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();
}
}

View File

@ -0,0 +1,87 @@
<div class="row" style="text-align:right;">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="loadPdListCompoent()"><mat-icon>close</mat-icon></button>
</div>
<mat-card *ngFor="let master of pdMasterData">
<div class="cardEdit">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="pdAllocationTo(master)"><mat-icon>directions_run</mat-icon></button>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button"><mat-icon>schedule</mat-icon></button>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdMaster(master)"><mat-icon>edit</mat-icon></button>
</div>
<mat-card-header>
<img mat-card-avatar src="assets/images/avatar.jpg">
<mat-card-title>{{master.lender_full_name}} - {{master.lender_applicant_id}}
</mat-card-title>
<mat-card-subtitle class="hover-icon"><i class="fa-1x fa fa-map-marker"> </i> &nbsp;<span>{{master.city_name}} / {{master.state_name}}-{{master.pincode}}</span></mat-card-subtitle>
</mat-card-header>
<mat-card-content>
<p>{{master.product_name}} / {{master.subproduct_name}}</p>
<p><span>{{master.pd_type_name}}&nbsp;&nbsp;&nbsp;{{master.pd_allocation_type_name}} &nbsp;&nbsp;&nbsp;{{master.pd_allocated_to}}</span></p>
<p><span>{{master.addressline1}}</span></p>
<p><span>{{master.addressline2}}</span></p>
<p><span>{{master.addressline3}}</span></p>
<p><span class="hover-icon"><i class="fa-1x fa fa-rupee">&nbsp;</i>{{master.loan_amount}}</span> &nbsp;&nbsp;&nbsp;<span>{{master.pd_status_name}}</span>&nbsp;&nbsp;&nbsp;<span>{{master.pd_date_of_initiation}}</span></p>
</mat-card-content>
</mat-card>
<!-- applicant card -->
<mat-card>
<div class="cardEdit">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdApplicant(pdApplicantData)"><mat-icon>edit</mat-icon></button>
</div>
<mat-card-header>
<mat-card-title>Applicants</mat-card-title>
</mat-card-header>
<mat-card-content>
<mat-list *ngFor="let applicant of pdApplicantData">
<mat-list-item>
<p><span *ngIf="applicant.applicant_name!=null" class="mb-2 text-center hover-icon">
<i class="fa-1x fa fa-user-o"></i>
&nbsp;{{applicant.applicant_name}} </span> &nbsp;&nbsp;&nbsp;<span *ngIf="applicant.mobile_no!=null" class="mb-2 text-center hover-icon">
<i class="fa-1x fa fa-phone"></i>
&nbsp;{{applicant.mobile_no}} </span> &nbsp;&nbsp;&nbsp;<span *ngIf="applicant.applicant_type=='1';else codetails"> Main Applicant</span>
<ng-template #codetails>&nbsp;&nbsp;&nbsp;<span>{{applicant.relation}}</span></ng-template>
</p>
</mat-list-item>
</mat-list>
</mat-card-content>
</mat-card>
<!-- pd documents details -->
<mat-card>
<!-- <div class="cardEdit">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon"><mat-icon>edit</mat-icon></button>
</div> -->
<mat-card-header>
<mat-card-title>Documents</mat-card-title>
<!-- <mat-card-subtitle><i class="fa-1x fa fa-map-marker"> </i> &nbsp;{{master.city_name}} / {{master.state_name}}-{{master.pincode}}</mat-card-subtitle> -->
</mat-card-header>
<mat-list *ngFor="let documents of pdDocumentsData">
<mat-list-item>
<p><span>
{{documents.pd_document_title}} </span> &nbsp;&nbsp;&nbsp;<span class="mb-2 text-center hover-icon">
<i class="fa-1x fa fa-file"></i>
&nbsp;{{documents.pd_document_name}} </span>
</p>
</mat-list-item>
</mat-list>
</mat-card>
<!-- pd logs card -->
<mat-card>
<mat-card-header>
<mat-card-title>PD History</mat-card-title>
</mat-card-header>
<mat-card-content>
</mat-card-content>
</mat-card>
<!-- <notifier-container></notifier-container> -->

View File

@ -0,0 +1,3 @@
.cardEdit {
display: inline;float:right;padding-top:3%;
}

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ViewPdComponent } from './view-pd.component';
describe('ViewPdComponent', () => {
let component: ViewPdComponent;
let fixture: ComponentFixture<ViewPdComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ViewPdComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ViewPdComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,94 @@
import { Component, OnInit,ViewEncapsulation, EventEmitter, Input, Output, OnDestroy } from '@angular/core';
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import { MatDialog } from '@angular/material';
import { NotifierService } from 'angular-notifier';
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
import { PdAllocationComponent } from '../pd-allocation/pd-allocation.component';
import { ListPdComponent } from '../list-pd.component';
@Component({
selector: 'app-view-pd',
templateUrl: './view-pd.component.html',
styleUrls: ['./view-pd.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class ViewPdComponent implements OnInit, OnDestroy {
private notifier:NotifierService;
errorMessage: any;
pdMasterData: any;
pdApplicantData: any;
pdDocumentsData: any;
pdLogsData: any;
viewID:string;
viewParams:any;
// @Input() childData: string;
// @Output() loadParent = new EventEmitter<string>();
public _EditPDtriggerForm:FormGroup;
constructor(notifier:NotifierService,private dialog: MatDialog,private _fb: FormBuilder,
private _pd: PdTrigerService,private route: ActivatedRoute,private router: Router, private ListPdComponent: ListPdComponent) {
this.notifier=notifier
}
ngOnInit() {
this.ListPdComponent.pdListLoad(false);
this.route.params.subscribe(params => {
this.viewID = params['pdid'];
});
this.viewPdDetails(this.viewID);
}
viewPdDetails(editID:string){
this._pd.editPdDetails(editID).subscribe(
data => {
if (data.status == 200) {
this.pdMasterData=data.records.pd_master_details;
this.pdApplicantData= data.records.applicants_details;
this.pdDocumentsData=data.records.pd_documnets;
this.pdLogsData=data.records.pd_logs;
}
}, error => this.errorMessage = <any> error);
}
loadPdListCompoent() {
this.router.navigate([ '../../' ], { relativeTo: this.route });
this.ListPdComponent.showListView(true);
}
editPdMaster(masterData:any){
}
editPdApplicant(applicantData:any){
}
// pd allocation to
// edit questions master details popup model
pdAllocationTo(pdID:any) {
const dialogRef = this.dialog.open(PdAllocationComponent, {
data: pdID,
disableClose: true
});
dialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
// this.viewPdDetails(this.childData)
});
}
// updateViewComponent(editBack:string) {
// if(editBack=='1'){
// this.showEditMasterComponent=!this.showEditMasterComponent
// }
// else if(editBack=='2'){
// this.showEditApplicantComponent=!this.showEditApplicantComponent
// }
// else if(editBack=='3'){
// this.showEditMasterComponent=!this.showEditMasterComponent
// }
// this.viewPdDetails(this.childData);
// }
ngOnDestroy(): void {
this.ListPdComponent.showListView(true); }
}

View File

@ -25,7 +25,8 @@ import { ListPdComponent } from './list-pd/list-pd.component';
import { ManagePdComponent } from './manage-pd.component'; import { ManagePdComponent } from './manage-pd.component';
import { MapPdViewComponent } from './list-pd/map-pd-view/map-pd-view.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 { AddPdComponent } from '../manage-pd/list-pd/add-pd/add-pd.component';
import { ViewPdComponent } from '../manage-pd/list-pd/view-pd/view-pd.component';
import { PdAllocationComponent } from '../manage-pd/list-pd/pd-allocation/pd-allocation.component';
import { PdTrigerService } from '../pd-service/pd-triger.service'; import { PdTrigerService } from '../pd-service/pd-triger.service';
import { GetGeometricLocationService } from '../location-service/get-geometric-location.service'; import { GetGeometricLocationService } from '../location-service/get-geometric-location.service';
@ -97,7 +98,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
NgxMatSelectSearchModule,MatTooltipModule, MatExpansionModule, NgxMatSelectSearchModule,MatTooltipModule, MatExpansionModule,
AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}), AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}),
], ],
declarations: [ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent], declarations: [ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent],
providers: [PdTrigerService, GetGeometricLocationService] providers: [PdTrigerService, GetGeometricLocationService]
}) })
export class ManagePdModule { } export class ManagePdModule { }

View File

@ -4,6 +4,8 @@ import { ManagePdComponent } from './manage-pd.component';
import { ListPdComponent } from './list-pd/list-pd.component'; import { ListPdComponent } from './list-pd/list-pd.component';
import { MapPdViewComponent } from './list-pd/map-pd-view/map-pd-view.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 { AddPdComponent } from '../manage-pd/list-pd/add-pd/add-pd.component';
import { ViewPdComponent } from '../manage-pd/list-pd/view-pd/view-pd.component';
/* /*
* manage pd router * manage pd router
*/ */
@ -28,6 +30,10 @@ const routes: Routes = [
path: 'addpd', path: 'addpd',
component: AddPdComponent, component: AddPdComponent,
}, },
{
path: 'viewpd/:pdid',
component: ViewPdComponent,
},
] ]
} }
] ]

View File

@ -3,7 +3,7 @@
<div class="ml-xs mr-xs" style="width: 100%;" fxLayout="row" fxLayoutAlign="center"> <div class="ml-xs mr-xs" style="width: 100%;" fxLayout="row" fxLayoutAlign="center">
<h2 mat-dialog-title style="width: 50%;">{{pageTitle}}</h2> <h2 mat-dialog-title style="width: 50%;">{{pageTitle}}</h2>
<div style="width: 20%;"></div> <div style="width: 20%;"></div>
<div style="width: 30%;text-align:right;"> <div style="width: 30%;text-align:right;"></div>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Close" matTooltipPosition="above" (click)="onNoClick()"><mat-icon>close</mat-icon></button> <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Close" matTooltipPosition="above" (click)="onNoClick()"><mat-icon>close</mat-icon></button>
</div> </div>
</div> </div>