Merge branch 'master' of https://bitbucket.org/sriramv18/sparqsineedge
This commit is contained in:
commit
db9e0385c1
13
ng6-seed/package-lock.json
generated
13
ng6-seed/package-lock.json
generated
@ -4273,7 +4273,8 @@
|
|||||||
"ansi-regex": {
|
"ansi-regex": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"aproba": {
|
"aproba": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
@ -4688,7 +4689,8 @@
|
|||||||
"safe-buffer": {
|
"safe-buffer": {
|
||||||
"version": "5.1.1",
|
"version": "5.1.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"safer-buffer": {
|
"safer-buffer": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
@ -4744,6 +4746,7 @@
|
|||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-regex": "^2.0.0"
|
"ansi-regex": "^2.0.0"
|
||||||
}
|
}
|
||||||
@ -4787,12 +4790,14 @@
|
|||||||
"wrappy": {
|
"wrappy": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"yallist": {
|
"yallist": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<mat-card class="p-1">
|
<mat-card class="p-1">
|
||||||
<form [formGroup]="PDtriggerForm" (submit)="submitPdDetails(PDtriggerForm.value)">
|
<form [formGroup]="_PDtriggerForm" (submit)="submitPdDetails(_PDtriggerForm.value)">
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div class="mb-2"></div>
|
<div class="mb-2"></div>
|
||||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||||
@ -13,186 +13,218 @@
|
|||||||
</mat-form-field> -->
|
</mat-form-field> -->
|
||||||
|
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<mat-select placeholder="Lender Name" [formControl]="PDtriggerForm.controls['fk_lender_id']" required>
|
<mat-select placeholder="Lender Name" formControlName="fk_lender_id" required>
|
||||||
<mat-option *ngFor="let LL of LenderList" [value]="LL.lender_hierarchy_id" >
|
<mat-option *ngFor="let LL of lenderList" [value]="LL.entity_id" >
|
||||||
{{LL.lender_hierarchy}}
|
{{LL.full_name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<mat-error *ngIf="!PDtriggerForm.controls['fk_lender_id'].valid && PDtriggerForm.controls['fk_lender_id'].touched" class="mat-text-warn">You must include a Pick up Lender Name.</mat-error>
|
</mat-select>
|
||||||
</mat-select>
|
<mat-error *ngIf="pdMain.fk_lender_id.hasError('required')" class="mat-text-warn">Lender name is required.</mat-error>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<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-form-field>
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<mat-select placeholder="Product Name" formControlName="fk_product_id" (selectionChange)="getSubproductList(pdMain.fk_product_id.value)" required>
|
||||||
|
<mat-option *ngFor="let PL of productList" [value]="PL.product_id" >
|
||||||
|
{{PL.product_name}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="pdMain.fk_product_id.hasError('required')">Product is required.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
|
||||||
|
<mat-select placeholder="Sub product Name" formControlName="fk_subproduct_id" required>
|
||||||
|
<mat-option *ngFor="let SPL of subProductList" [value]="SPL.subproduct_id" >
|
||||||
|
{{SPL.subproduct_name}}
|
||||||
|
</mat-option>
|
||||||
|
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="pdMain.fk_subproduct_id.hasError('required')">Sub product is required.</mat-error>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<mat-select placeholder="Customer Segment" formControlName="fk_customer_segment" required>
|
||||||
|
<mat-option *ngFor="let CSL of customerSegmentList" [value]="CSL.customer_segment_id" >
|
||||||
|
{{CSL.customer_segment}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="pdMain.fk_customer_segment.hasError('required')">Customer segment is required.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<mat-select placeholder="PD Type" formControlName="fk_pd_type" required>
|
||||||
|
<mat-option *ngFor="let PDL of pdTypeList" [value]="PDL.pd_type_id" >
|
||||||
|
{{PDL.type_name}}
|
||||||
|
</mat-option>
|
||||||
|
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="pdMain.fk_pd_type.hasError('required')">PD type is required.</mat-error>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<input matInput placeholder="Loan Amount" formControlName="loan_amount" required>
|
||||||
|
<mat-error *ngIf="pdMain.loan_amount.hasError('required')">Amount is required.</mat-error>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<textarea matInput placeholder="Address 1" formControlName="addressline1" required></textarea>
|
||||||
|
<mat-error *ngIf="pdMain.addressline1.hasError('required')">Address1 required.</mat-error>
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
|
|
||||||
<mat-form-field style="width: 100%">
|
|
||||||
<input matInput placeholder="Lender Applicant ID" required [formControl]="PDtriggerForm.controls['lender_applicant_id']" type="text">
|
|
||||||
<mat-error *ngIf="!PDtriggerForm.controls['lender_applicant_id'].valid && PDtriggerForm.controls['lender_applicant_id'].touched" class="mat-text-warn">You must include Lender Applicant Id.</mat-error>
|
|
||||||
</mat-form-field>
|
|
||||||
<!-- <mat-form-field style="width: 100%">
|
|
||||||
|
|
||||||
<input matInput placeholder="PD Date of Initiation" [formControl]="PDtriggerForm.controls['pd_date_of_initiation']" type="date">
|
|
||||||
|
|
||||||
</mat-form-field>-->
|
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<mat-select placeholder="Product Name" [formControl]="PDtriggerForm.controls['fk_product_id']">
|
<textarea matInput placeholder="Address 2" formControlName="addressline2"></textarea>
|
||||||
<mat-option *ngFor="let PL of ProductList" [value]="PL" >
|
</mat-form-field>
|
||||||
{{PL.name}}
|
|
||||||
</mat-option>
|
<mat-form-field style="width: 100%">
|
||||||
|
<textarea matInput placeholder="Address 3" formControlName="addressline3"></textarea>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 100%;">
|
||||||
|
<mat-select placeholder="Select State" formControlName="fk_state" (selectionChange)="getCityList(pdMain.fk_state.value)" required>
|
||||||
|
<mat-option *ngFor="let SL of stateList" [value]="SL.state_id">
|
||||||
|
{{SL.state_name}}
|
||||||
|
</mat-option>
|
||||||
|
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
<mat-error *ngIf="pdMain.fk_state.hasError('required')">State is required.</mat-error>
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 100%;">
|
||||||
|
<mat-select placeholder="Select City" formControlName="fk_city" required>
|
||||||
|
` <mat-option *ngFor="let CL of cityList" [value]="CL.city_id">
|
||||||
|
{{CL.city_name}}
|
||||||
|
</mat-option>
|
||||||
|
|
||||||
<mat-form-field style="width: 100%">
|
|
||||||
|
|
||||||
<mat-select placeholder="Sub product Name" [formControl]="PDtriggerForm.controls['fk_subproduct_id']">
|
|
||||||
<mat-option *ngFor="let SPL of SubProductList" [value]="SPL" >
|
|
||||||
{{SPL.name}}
|
|
||||||
</mat-option>
|
|
||||||
</mat-select>
|
|
||||||
</mat-form-field>
|
|
||||||
<mat-form-field style="width: 100%">
|
|
||||||
<mat-select placeholder="Customer Segment" [formControl]="PDtriggerForm.controls['fk_customer_segment']">
|
|
||||||
<mat-option *ngFor="let CSL of CustomerSegmentList" [value]="CSL.customer_segment_id" >
|
|
||||||
{{CSL.name}}
|
|
||||||
</mat-option>
|
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
<mat-error *ngIf="pdMain.fk_city.hasError('required')">City is required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 100%">
|
|
||||||
<mat-select placeholder="PD Type" [formControl]="PDtriggerForm.controls['fk_pd_type']">
|
|
||||||
<mat-option *ngFor="let PDL of PDTypeList" [value]="PDL.pd_type_id" >
|
|
||||||
{{PDL.type_name}}
|
|
||||||
</mat-option>
|
|
||||||
</mat-select>
|
|
||||||
</mat-form-field>
|
|
||||||
<mat-form-field style="width: 100%">
|
|
||||||
<input matInput placeholder="Loan Amount" [formControl]="PDtriggerForm.controls['loan_amount']">
|
|
||||||
</mat-form-field>
|
|
||||||
<mat-form-field style="width: 100%">
|
|
||||||
<textarea matInput placeholder="Address 1" [formControl]="PDtriggerForm.controls['addressline1']"></textarea>
|
|
||||||
|
|
||||||
</mat-form-field>
|
|
||||||
|
|
||||||
<mat-form-field style="width: 100%">
|
|
||||||
<textarea matInput placeholder="Address 2" [formControl]="PDtriggerForm.controls['addressline2']"></textarea>
|
|
||||||
</mat-form-field>
|
|
||||||
|
|
||||||
<mat-form-field style="width: 100%">
|
|
||||||
<textarea matInput placeholder="Address 3" [formControl]="PDtriggerForm.controls['addressline3']"></textarea>
|
|
||||||
</mat-form-field>
|
|
||||||
<mat-form-field style="width: 100%;">
|
|
||||||
<mat-select placeholder="Select City" [formControl]="PDtriggerForm.controls['fk_city']" >
|
|
||||||
` <mat-option *ngFor="let CL of CityList" [value]="CL">
|
|
||||||
{{CL.name}}
|
|
||||||
</mat-option>
|
|
||||||
</mat-select>
|
|
||||||
|
|
||||||
</mat-form-field>
|
|
||||||
<mat-form-field style="width: 100%;">
|
<mat-form-field style="width: 100%;">
|
||||||
<mat-select placeholder="Pickup the State" [formControl]="PDtriggerForm.controls['fk_state']" >
|
<input matInput placeholder="Pincode" formControlName="pincode" required>
|
||||||
<mat-option *ngFor="let SL of StateList" [value]="SL">
|
<mat-error *ngIf="pdMain.pincode.hasError('required')">Pincode is required.</mat-error>
|
||||||
{{SL.name}}
|
</mat-form-field>
|
||||||
</mat-option>
|
<mat-slide-toggle formControlName="allocation_type"
|
||||||
</mat-select>
|
class="example-margin" id="type"
|
||||||
</mat-form-field>
|
[(ngModel)]="allocationTypeCheck" (change)="changeAllocationType(allocationTypeCheck)"
|
||||||
|
checked="allocationTypeModel==1 ? false:allocationTypeModel==2 ? false:allocationTypeModel==3 ? true"> {{allocationLabel}}
|
||||||
|
</mat-slide-toggle>
|
||||||
|
<mat-slide-toggle *ngIf="allocationTypeModel==1 || allocationTypeModel==2" formControlName="sub_allocation_type"
|
||||||
|
class="example-margin" id="subType"
|
||||||
|
[(ngModel)]="subAllocationTypeCheck" (change)="changeSubAllocationType(subAllocationTypeCheck)"
|
||||||
|
checked="allocationTypeModel==1 ? false:allocationTypeModel==2 ? true"> {{subAllocationLabel}}
|
||||||
|
</mat-slide-toggle>
|
||||||
|
|
||||||
<mat-form-field style="width: 100%;">
|
|
||||||
<input matInput placeholder="Pincode" [formControl]="PDtriggerForm.controls['pincode']">
|
|
||||||
</mat-form-field>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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">
|
||||||
<h5>Main Applicant Details</h5>
|
<h5>Main Applicant</h5>
|
||||||
|
|
||||||
|
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput placeholder="Name" [formControl]="PDtriggerForm.controls['applicant_name']">
|
<input matInput placeholder="Name" formControlName="applicant_name" required>
|
||||||
|
<mat-error *ngIf="pdMain.applicant_name.hasError('required')">Name is 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" [formControl]="PDtriggerForm.controls['email']" type="email">
|
<input matInput placeholder="Email" formControlName="email" type="email" required>
|
||||||
<!-- <small *ngIf="PDtriggerForm.controls['email'].hasError('required') && PDtriggerForm.controls['email'].touched" class="mat-text-warn">You must include an email address.</small>
|
<mat-error *ngIf="pdMain.email.hasError('required')">Email is required.</mat-error>
|
||||||
<small *ngIf="PDtriggerForm.controls['email'].errors?.email && PDtriggerForm.controls['email'].touched" class="mat-text-warn">You must include a valid email address.</small> -->
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput placeholder="Phone" [formControl]="PDtriggerForm.controls['mobile_no']" type="text">
|
<input matInput placeholder="Phone" formControlName="mobile_no" type="text" required>
|
||||||
<!-- <small *ngIf="PDtriggerForm.controls['mobile_no'].hasError('required') && PDtriggerForm.controls['mobile_no'].touched" class="mat-text-warn">You must include phone number.</small>
|
<mat-error *ngIf="pdMain.mobile_no.hasError('required')">Mobile number is required.</mat-error>
|
||||||
<small *ngIf="PDtriggerForm.controls['mobile_no'].errors?.phone && PDtriggerForm.controls['mobile_no'].touched" class="mat-text-warn">You must include a valid phone number.</small> -->
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div fxLayout="row" fxLayoutWrap="wrap" formArrayName="items" *ngFor="let coDetails of PDtriggerForm.get('items')['controls']; let i = index;">
|
<div fxLayout="row" fxLayoutWrap="wrap" formArrayName="items" *ngFor="let coDetails of pdCoApplicant.controls; let i = index;">
|
||||||
<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">
|
||||||
<h5>{{PDtriggerForm.controls.items.controls[i].controls.label.value}} {{i+1}}</h5>
|
<h5>{{coDetails.controls.label.value}} {{i+1}}</h5>
|
||||||
<div [formGroupName]="i">
|
|
||||||
<mat-form-field style="width: 100%">
|
|
||||||
<input matInput placeholder="Name" formControlName="coapplicantName" type="text">
|
|
||||||
</mat-form-field>
|
|
||||||
<mat-form-field style="width: 100%">
|
|
||||||
<input matInput placeholder="Relation" formControlName="relationship" type="text">
|
|
||||||
</mat-form-field>
|
|
||||||
</div>
|
|
||||||
</mat-card>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
|
||||||
|
|
||||||
<div class="column" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
<div [formGroupName]="i">
|
||||||
<mat-card class="p-2" style="opacity: 0.5;">
|
<mat-form-field style="width: 100%">
|
||||||
<!-- <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> -->
|
<input matInput placeholder="Name" formControlName="coapplicantName" type="text" required>
|
||||||
<button _ngcontent-c39="" class="mr-1 mb-1 mat-button" type="button"><span style="opacity: 0.5;" (click)="addCoApplicant()" class="mat-button-wrapper">Add More Co-Applicant</span><div class="mat-button-ripple mat-ripple" matripple=""></div><div class="mat-button-focus-overlay"></div></button>
|
</mat-form-field>
|
||||||
<!-- <button mat-raised-button mat-button-sm color="primary" (click)="addCoApplicant()" type="button">Add More Co-Applicant</button> -->
|
<mat-form-field style="width: 100%">
|
||||||
|
<input matInput placeholder="Phone" formControlName="coapplicant_mobile_no" type="text">
|
||||||
|
|
||||||
</mat-card>
|
</mat-form-field>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
|
||||||
|
|
||||||
<div class="column" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
<mat-form-field style="width: 100%">
|
||||||
|
<input matInput placeholder="Relation" formControlName="relationship" type="text">
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||||
|
|
||||||
<mat-card class="p-2" formArrayName="documents">
|
<div class="column" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||||
<mat-list>
|
<mat-card class="p-2" style="opacity: 0.5;">
|
||||||
|
<!-- <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-c39="" class="mr-1 mb-1 mat-button" type="button"><span style="opacity: 0.5;" (click)="addCoApplicant()" class="mat-button-wrapper">Add More Co-Applicant</span><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> -->
|
||||||
|
|
||||||
|
</mat-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||||
|
|
||||||
|
<div class="column" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||||
|
|
||||||
|
<mat-card class="p-2" formArrayName="documents">
|
||||||
|
<mat-list>
|
||||||
|
<mat-list-item>
|
||||||
|
<!-- <button mat-raised-button mat-button-sm color="primary" type="button">Add Document</button> -->
|
||||||
|
<button _ngcontent-c39="" class="mr-1 mb-1 mat-button" type="button"><span style="opacity: 0.5;" (click)="addMoreDocs()" class="mat-button-wrapper">Add Document</span><div class="mat-button-ripple mat-ripple" matripple=""></div><div class="mat-button-focus-overlay"></div></button>
|
||||||
|
|
||||||
|
</mat-list-item>
|
||||||
|
</mat-list>
|
||||||
|
<mat-list *ngFor="let docList of documents.controls; let d = index;" [formGroupName]="d">
|
||||||
|
<!-- <h3 mat-subheader>Upload Documents</h3> -->
|
||||||
<mat-list-item>
|
<mat-list-item>
|
||||||
<!-- <button mat-raised-button mat-button-sm color="primary" type="button">Add Document</button> -->
|
<mat-form-field style="width: 100%">
|
||||||
<button _ngcontent-c39="" class="mr-1 mb-1 mat-button" type="button"><span style="opacity: 0.5;" (click)="addMoreDocs()" class="mat-button-wrapper">Add Document</span><div class="mat-button-ripple mat-ripple" matripple=""></div><div class="mat-button-focus-overlay"></div></button>
|
<input matInput placeholder="Document Name" formControlName="doc_name" type="text">
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
</mat-list>
|
<mat-list-item>
|
||||||
<mat-list *ngFor="let docList of documents.controls; let d = index;" [formGroupName]="d">
|
<input type="file" title="Browse Document" (change)="fileSelectionEvent($event,d)" formControlName="documentFile">
|
||||||
<!-- <h3 mat-subheader>Upload Documents</h3> -->
|
</mat-list-item>
|
||||||
<mat-list-item>
|
<mat-list-item>
|
||||||
<mat-form-field style="width: 100%">
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="removeItem(d)"
|
||||||
<input matInput placeholder="Document Name" formControlName="doc_name" type="text">
|
(click)="loadPdListCompoent()"><mat-icon>delete</mat-icon></button>
|
||||||
</mat-form-field>
|
<!-- <button mat-button color="accent" (click)="removeItem(d)" type="button">Remove</button> -->
|
||||||
|
</mat-list-item>
|
||||||
</mat-list-item>
|
</mat-list>
|
||||||
<mat-list-item>
|
</mat-card>
|
||||||
<input type="file" title="Browse Document" (change)="fileSelectionEvent($event,d)" formControlName="documentFile">
|
</div>
|
||||||
</mat-list-item>
|
</div>
|
||||||
<mat-list-item>
|
|
||||||
<button mat-button color="accent" (click)="removeItem(d)" type="button">Remove</button>
|
|
||||||
</mat-list-item>
|
|
||||||
</mat-list>
|
|
||||||
</mat-card>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<hr>
|
<!-- <mat-card-actions style="text-align: right">
|
||||||
<mat-card-actions style="text-align: right">
|
|
||||||
<button mat-button color="accent" type="button" (click)="loadPdListCompoent()">Cancel</button>
|
<button mat-button color="accent" type="button" (click)="loadPdListCompoent()">Cancel</button>
|
||||||
|
|
||||||
<button mat-button color="primary" type="submit" [disabled]="!PDtriggerForm.valid">Submit</button>
|
<button mat-button color="primary" type="submit" [disabled]="!PDtriggerForm.valid">Submit</button>
|
||||||
</mat-card-actions>
|
</mat-card-actions> -->
|
||||||
|
|
||||||
|
<mat-card-actions 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>
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="submit"><mat-icon>save</mat-icon></button>
|
||||||
|
</mat-card-actions>
|
||||||
</form>
|
</form>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
<notifier-container></notifier-container>
|
||||||
@ -1,9 +1,9 @@
|
|||||||
import { Component, OnInit, ViewEncapsulation, Output, EventEmitter } from '@angular/core';
|
import { Component, OnInit, ViewEncapsulation, Output, EventEmitter } from '@angular/core';
|
||||||
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
|
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
|
||||||
import { CustomValidators } from 'ng2-validation';
|
import { CustomValidators } from 'ng2-validation';
|
||||||
|
import { NotifierService } from 'angular-notifier';
|
||||||
import { PdTrigerService } from '../pd-service/pd-triger.service';
|
import { PdTrigerService } from '../pd-service/pd-triger.service';
|
||||||
import { AwsService } from '../../AwsService/aws.service';
|
import { AwsService } from '../../AwsService/aws.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-add-pd',
|
selector: 'app-add-pd',
|
||||||
templateUrl: './add-pd.component.html',
|
templateUrl: './add-pd.component.html',
|
||||||
@ -12,31 +12,39 @@ import { AwsService } from '../../AwsService/aws.service';
|
|||||||
})
|
})
|
||||||
export class AddPdComponent implements OnInit {
|
export class AddPdComponent implements OnInit {
|
||||||
@Output() loadParent = new EventEmitter<string>();
|
@Output() loadParent = new EventEmitter<string>();
|
||||||
|
public notifier: NotifierService;
|
||||||
public PDtriggerForm: FormGroup;
|
public _PDtriggerForm: FormGroup;
|
||||||
items: FormArray;
|
items: FormArray;
|
||||||
CityList: any;
|
productList:any;
|
||||||
StateList: any;
|
subProductList:any;
|
||||||
LenderList: any;
|
lenderList:any;
|
||||||
|
customerSegmentList:any;
|
||||||
ProductList: any;
|
stateList:any;
|
||||||
SubProductList: any;
|
cityList:any;
|
||||||
CustomerSegmentList: any;
|
pdTypeList:any;
|
||||||
PDTypeList: any;
|
|
||||||
ApplicantTypeList: any;
|
|
||||||
errorMessage: any;
|
errorMessage: any;
|
||||||
// Dynamic co applicant
|
// Dynamic co applicant
|
||||||
createWithLongContent = false;
|
createWithLongContent = false;
|
||||||
dynamicCoApplicant = [];
|
dynamicCoApplicant = [];
|
||||||
|
allocationTypeModel: number;
|
||||||
|
allocationTypeCheck: boolean;
|
||||||
|
subAllocationTypeCheck: boolean;
|
||||||
|
allocationLabel: string;
|
||||||
|
subAllocationLabel: string;
|
||||||
constructor(private _fb: FormBuilder,
|
constructor(private _fb: FormBuilder,
|
||||||
private _pd: PdTrigerService, private _aws:AwsService) { }
|
private _pd: PdTrigerService, private _aws:AwsService, notifier: NotifierService) {
|
||||||
|
this.notifier = notifier;
|
||||||
|
}
|
||||||
public totalfiles: Array<File> =[];
|
public totalfiles: Array<File> =[];
|
||||||
public totalFileName = [];
|
public totalFileName = [];
|
||||||
public lengthCheckToaddMore =0;
|
public lengthCheckToaddMore =0;
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.getLenderList();
|
||||||
this.PDtriggerForm = this._fb.group({
|
this.getProductsList();
|
||||||
|
this.getCustomerSegmentList();
|
||||||
|
this.getStateCityList();
|
||||||
|
this.getPDTypeList();
|
||||||
|
this._PDtriggerForm = this._fb.group({
|
||||||
fk_lender_id: [null, Validators.compose([Validators.required])],
|
fk_lender_id: [null, Validators.compose([Validators.required])],
|
||||||
lender_applicant_id: [null, Validators.compose([Validators.required])],
|
lender_applicant_id: [null, Validators.compose([Validators.required])],
|
||||||
fk_product_id: [null, Validators.compose([Validators.required])],
|
fk_product_id: [null, Validators.compose([Validators.required])],
|
||||||
@ -53,100 +61,102 @@ export class AddPdComponent implements OnInit {
|
|||||||
fk_city: [null, Validators.compose([Validators.required])],
|
fk_city: [null, Validators.compose([Validators.required])],
|
||||||
fk_state: [null, Validators.compose([Validators.required])],
|
fk_state: [null, Validators.compose([Validators.required])],
|
||||||
pincode : [null, Validators.compose([Validators.required])],
|
pincode : [null, Validators.compose([Validators.required])],
|
||||||
|
allocation_type: [null],
|
||||||
|
sub_allocation_type: [null],
|
||||||
items: this._fb.array([]),
|
items: this._fb.array([]),
|
||||||
documents: this._fb.array([])
|
documents: this._fb.array([])
|
||||||
});
|
});
|
||||||
|
|
||||||
this._pd.getAllMasterDatas('CITY')
|
|
||||||
.subscribe(
|
|
||||||
data => {
|
|
||||||
if (data.status == 200) {
|
|
||||||
this.CityList = data.records;
|
|
||||||
this.CityList = this.CityList.filter(city=>city.isactive == 1 );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}, error => this.errorMessage = <any> error);
|
|
||||||
|
|
||||||
this._pd.getAllMasterDatas('STATE')
|
|
||||||
.subscribe(
|
|
||||||
data => {
|
|
||||||
if (data.status == 200) {
|
|
||||||
this.StateList = data.records;
|
|
||||||
this.StateList = this.StateList.filter(city=>city.isactive == 1 );
|
|
||||||
}
|
|
||||||
|
|
||||||
}, error => this.errorMessage = <any> error);
|
|
||||||
|
|
||||||
this._pd.getAllMasterDatas('LENDERHIERARCHY')
|
|
||||||
.subscribe(
|
|
||||||
data => {
|
|
||||||
|
|
||||||
if (data.status == 200) {
|
|
||||||
this.LenderList = data.records;
|
|
||||||
this.LenderList = this.LenderList.filter(city=>city.isactive == 1 );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}, error => this.errorMessage = <any> error);
|
|
||||||
|
|
||||||
this._pd.getAllMasterDatas('PRODUCTS')
|
|
||||||
.subscribe(
|
|
||||||
data => {
|
|
||||||
|
|
||||||
if (data.status == 200) {
|
|
||||||
this.ProductList = data.records;
|
|
||||||
this.ProductList = this.ProductList.filter(city=>city.isactive == 1 );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}, error => this.errorMessage = <any> error);
|
|
||||||
|
|
||||||
this._pd.getAllMasterDatas('SUBPRODUCTS')
|
|
||||||
.subscribe(
|
|
||||||
data => {
|
|
||||||
if (data.status == 200) {
|
|
||||||
this.SubProductList = data.records;
|
|
||||||
this.SubProductList = this.SubProductList.filter(city=>city.isactive == 1 );
|
|
||||||
}
|
|
||||||
}, error => this.errorMessage = <any> error);
|
|
||||||
|
|
||||||
|
|
||||||
this._pd.getAllMasterDatas('CUSTOMERSEGMENT')
|
|
||||||
.subscribe(
|
|
||||||
data => {
|
|
||||||
|
|
||||||
if (data.status == 200) {
|
|
||||||
this.CustomerSegmentList = data.records;
|
|
||||||
this.CustomerSegmentList = this.CustomerSegmentList.filter(city=>city.isactive == 1 );
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}, error => this.errorMessage = <any> error);
|
|
||||||
|
|
||||||
this._pd.getAllMasterDatas('PDTYPE')
|
|
||||||
.subscribe(
|
|
||||||
data => {
|
|
||||||
|
|
||||||
if (data.status == 200) {
|
|
||||||
this.PDTypeList = data.records;
|
|
||||||
this.PDTypeList = this.PDTypeList.filter(city=>city.isactive == 1 );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}, error => this.errorMessage = <any> error);
|
|
||||||
}
|
}
|
||||||
|
getLenderList(){
|
||||||
|
this._pd.getLenderDetails().subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.lenderList=data.records
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
}
|
||||||
|
getProductsList(){
|
||||||
|
this._pd.getProductsDetails().subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.productList=data.records
|
||||||
|
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
}
|
||||||
|
getCustomerSegmentList(){
|
||||||
|
this._pd.getCustomersDetails().subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.customerSegmentList=data.records
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
}
|
||||||
|
getStateCityList(){
|
||||||
|
this._pd.getStateCityDetails().subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.stateList=data.records
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
}
|
||||||
|
getPDTypeList(){
|
||||||
|
this._pd.getPDTypeDetails().subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.pdTypeList=data.records.pd_type;
|
||||||
|
if(data.records.pd_allocation_type){
|
||||||
|
let getDefaultAllocation= data.records.pd_allocation_type.filter(item => item.default == 1);
|
||||||
|
if(getDefaultAllocation[0].pd_allocation_type_id==1){
|
||||||
|
this.allocationTypeModel=1;
|
||||||
|
this.allocationTypeCheck=false;
|
||||||
|
this.subAllocationTypeCheck=false;
|
||||||
|
this.allocationLabel="Auto";
|
||||||
|
this.subAllocationLabel="Load Balance";
|
||||||
|
}
|
||||||
|
else if(this.allocationTypeModel[0].pd_allocation_type_id==2){
|
||||||
|
this.allocationTypeModel=2;
|
||||||
|
this.allocationTypeCheck=false;
|
||||||
|
this.subAllocationTypeCheck=true;
|
||||||
|
this.allocationLabel="Auto";
|
||||||
|
this.subAllocationLabel="Nearest";
|
||||||
|
}
|
||||||
|
else if(this.allocationTypeModel[0].pd_allocation_type_id==3){
|
||||||
|
this.allocationTypeModel=3;
|
||||||
|
this.allocationTypeCheck=true;
|
||||||
|
this.allocationLabel="Manual";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
}
|
||||||
|
//get sub product list based on prokduct id
|
||||||
|
getSubproductList(productID:string){
|
||||||
|
|
||||||
|
this.subProductList= this.productList.filter(item => item.product_id == productID);
|
||||||
|
this.subProductList=this.subProductList[0].subproducts;
|
||||||
|
}
|
||||||
|
|
||||||
|
//get city list details based on state id
|
||||||
|
getCityList(stateID:string){
|
||||||
|
this.cityList= this.stateList.filter(item => item.state_id == stateID);
|
||||||
|
this.cityList=this.cityList[0].cities;
|
||||||
|
}
|
||||||
createItem(): FormGroup {
|
createItem(): FormGroup {
|
||||||
return this._fb.group({
|
return this._fb.group({
|
||||||
label: ['Co Applicant Details'],
|
label: ['Co Applicant'],
|
||||||
coapplicantName: [null, Validators.compose([Validators.required])],
|
coapplicantName: [null, Validators.compose([Validators.required])],
|
||||||
|
coapplicant_mobile_no: [],
|
||||||
relationship: [null],
|
relationship: [null],
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
addCoApplicant() {
|
addCoApplicant() {
|
||||||
if(this.PDtriggerForm.valid){
|
if(this._PDtriggerForm.valid){
|
||||||
this.items = this.PDtriggerForm.get('items') as FormArray;
|
this.items = this._PDtriggerForm.get('items') as FormArray;
|
||||||
this.items.push(this.createItem());
|
this.items.push(this.createItem());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -174,8 +184,11 @@ this._pd.getAllMasterDatas('PDTYPE')
|
|||||||
}
|
}
|
||||||
|
|
||||||
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 pdCoApplicant() { return this._PDtriggerForm.get('items') as FormArray; }
|
||||||
|
|
||||||
|
|
||||||
removeItem(index: number) {
|
removeItem(index: number) {
|
||||||
this.totalfiles.splice(index,1);
|
this.totalfiles.splice(index,1);
|
||||||
@ -212,23 +225,24 @@ this._pd.getAllMasterDatas('PDTYPE')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
submitPdDetails(formValue: any) {
|
submitPdDetails(formValue: any) {
|
||||||
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,
|
||||||
"fk_product_id":formValue.fk_product_id.product_id,
|
"fk_product_id":formValue.fk_product_id,
|
||||||
"fk_subproduct_id":formValue.fk_subproduct_id.subproduct_id,
|
"fk_subproduct_id":formValue.fk_subproduct_id,
|
||||||
"fk_pd_type":formValue.fk_pd_type,
|
"fk_pd_type":formValue.fk_pd_type,
|
||||||
"fk_customer_segment":formValue.fk_customer_segment,
|
"fk_customer_segment":formValue.fk_customer_segment,
|
||||||
"loan_amount":formValue.loan_amount,
|
"loan_amount":formValue.loan_amount,
|
||||||
"addressline1":formValue.addressline1,
|
"addressline1":formValue.addressline1,
|
||||||
"addressline2":formValue.addressline2,
|
"addressline2":formValue.addressline2,
|
||||||
"addressline3":formValue.addressline3,
|
"addressline3":formValue.addressline3,
|
||||||
"fk_city":formValue.fk_city.city_id,
|
"fk_city":formValue.fk_city,
|
||||||
"fk_state":formValue.fk_state.state_id,
|
"fk_state":formValue.fk_state,
|
||||||
"pincode ":formValue.pincode ,
|
"pincode":formValue.pincode ,
|
||||||
|
"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',' ')
|
||||||
};
|
};
|
||||||
@ -237,14 +251,14 @@ this._pd.getAllMasterDatas('PDTYPE')
|
|||||||
"email":formValue.email,
|
"email":formValue.email,
|
||||||
"mobile_no":formValue.mobile_no,
|
"mobile_no":formValue.mobile_no,
|
||||||
"applicant_type":1,
|
"applicant_type":1,
|
||||||
"relationship":"",
|
"relation":"",
|
||||||
}];
|
}];
|
||||||
formValue.items.forEach((itemElement, itemIndex) => {
|
formValue.items.forEach((itemElement, itemIndex) => {
|
||||||
let obj1 = {
|
let obj1 = {
|
||||||
"applicant_name":itemElement.coapplicantName,
|
"applicant_name":itemElement.coapplicantName,
|
||||||
"relationship":itemElement.relationship,
|
"relation":itemElement.relationship,
|
||||||
"email":"",
|
"email":"",
|
||||||
"mobile_no":"",
|
"mobile_no":itemElement.coapplicant_mobile_no,
|
||||||
"applicant_type":0,
|
"applicant_type":0,
|
||||||
}
|
}
|
||||||
pd_applicant_details.push(obj1)
|
pd_applicant_details.push(obj1)
|
||||||
@ -255,8 +269,7 @@ this._pd.getAllMasterDatas('PDTYPE')
|
|||||||
|
|
||||||
for(let j=0;j<this.totalfiles.length; j++)
|
for(let j=0;j<this.totalfiles.length; j++)
|
||||||
{
|
{
|
||||||
|
pd_form.append('pddocuments[]',<File>this.totalfiles[j])
|
||||||
pd_form.append(this.totalFileName[j],<File>this.totalfiles[j])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//reverseFileNames=this.totalFileName.reverse();
|
//reverseFileNames=this.totalFileName.reverse();
|
||||||
@ -275,7 +288,40 @@ this._pd.getAllMasterDatas('PDTYPE')
|
|||||||
pd_form.append("pd_applicant_details",JSON.stringify(pd_applicant_details))
|
pd_form.append("pd_applicant_details",JSON.stringify(pd_applicant_details))
|
||||||
pd_form.append("pd_document_titles",JSON.stringify(AllFilesObj))
|
pd_form.append("pd_document_titles",JSON.stringify(AllFilesObj))
|
||||||
|
|
||||||
this._pd.addPdDetails(pd_form).subscribe();
|
this._pd.addPdDetails(pd_form).subscribe(result => {
|
||||||
|
if (result.status == 200) {
|
||||||
|
this.notifier.notify('success', 'PD Saved Successfully.!');
|
||||||
|
this.loadPdListCompoent();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
|
}
|
||||||
|
}, error => {
|
||||||
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
changeAllocationType(status: boolean) {
|
||||||
|
if(status){
|
||||||
|
this.allocationTypeModel=3;
|
||||||
|
this.allocationLabel="Manual";
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.allocationTypeModel=1;
|
||||||
|
this.allocationLabel="Auto";
|
||||||
|
this.subAllocationLabel="Load Balance";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
changeSubAllocationType(status: boolean){
|
||||||
|
if(status){
|
||||||
|
this.allocationTypeModel=2;
|
||||||
|
this.allocationLabel="Auto";
|
||||||
|
this.subAllocationLabel="Nearest";
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.allocationTypeModel=1;
|
||||||
|
this.allocationLabel="Auto";
|
||||||
|
this.subAllocationLabel="Load Balance";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
loadPdListCompoent() {
|
loadPdListCompoent() {
|
||||||
|
|||||||
@ -0,0 +1,74 @@
|
|||||||
|
<mat-card class="p-1">
|
||||||
|
<form [formGroup]="_EditApplicantForm" (submit)="updatePdApplicant(_EditApplicantForm.value)">
|
||||||
|
<mat-card-content>
|
||||||
|
|
||||||
|
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||||
|
<div class="column" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||||
|
<mat-card class="p-2">
|
||||||
|
<h5>Main Applicant</h5>
|
||||||
|
|
||||||
|
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<input matInput placeholder="Name" formControlName="applicant_name" required>
|
||||||
|
<mat-error *ngIf="pdMainApplicant.applicant_name.hasError('required')">Name is required.</mat-error>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<input matInput placeholder="Email" formControlName="email" type="email" required>
|
||||||
|
<mat-error *ngIf="pdMainApplicant.email.hasError('required')">Email number is required.</mat-error>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<input matInput placeholder="Phone" formControlName="mobile_no" type="text" required>
|
||||||
|
<mat-error *ngIf="pdMainApplicant.mobile_no.hasError('required')">Mobile number is required.</mat-error>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
</mat-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div fxLayout="row" fxLayoutWrap="wrap" formArrayName="coApplicantItems" *ngFor="let coDetails of pdCoApplicant.controls; let i = index;">
|
||||||
|
<div class="column" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||||
|
|
||||||
|
<mat-card class="p-2">
|
||||||
|
<h5>{{coDetails.controls.label.value}} {{i+1}}</h5>
|
||||||
|
|
||||||
|
<div [formGroupName]="i">
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<input matInput placeholder="Name" formControlName="coapplicantName" type="text" required>
|
||||||
|
<!-- <mat-error *ngIf="pdCoApplicant.coapplicantName.hasError('required')">Name is required.</mat-error> -->
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<input matInput placeholder="Phone" formControlName="coapplicant_mobile_no" type="text">
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<input matInput placeholder="Relation" formControlName="relationship" type="text">
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||||
|
|
||||||
|
<div class="column" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||||
|
<mat-card class="p-2" style="opacity: 0.5;">
|
||||||
|
<button _ngcontent-c39="" class="mr-1 mb-1 mat-button" type="button"><span style="opacity: 0.5;" (click)="addCoApplicant(emptyData)" class="mat-button-wrapper">Add More Co-Applicant</span><div class="mat-button-ripple mat-ripple" matripple=""></div><div class="mat-button-focus-overlay"></div></button>
|
||||||
|
|
||||||
|
</mat-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</mat-card-content>
|
||||||
|
<mat-card-actions style="text-align: right">
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button"
|
||||||
|
(click)="loadPdMasterCompoent()"><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>
|
||||||
|
</mat-card-actions>
|
||||||
|
</form>
|
||||||
|
</mat-card>
|
||||||
|
<notifier-container></notifier-container>
|
||||||
|
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { EditPdApplicantComponent } from './edit-pd-applicant.component';
|
||||||
|
|
||||||
|
describe('EditPdApplicantComponent', () => {
|
||||||
|
let component: EditPdApplicantComponent;
|
||||||
|
let fixture: ComponentFixture<EditPdApplicantComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ EditPdApplicantComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(EditPdApplicantComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,122 @@
|
|||||||
|
import { Component, OnInit,ViewEncapsulation, EventEmitter, Input, Output } from '@angular/core';
|
||||||
|
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
|
||||||
|
import { CustomValidators } from 'ng2-validation';
|
||||||
|
import { NotifierService } from 'angular-notifier';
|
||||||
|
import { PdTrigerService } from '../pd-service/pd-triger.service';
|
||||||
|
@Component({
|
||||||
|
selector: 'app-edit-pd-applicant',
|
||||||
|
templateUrl: './edit-pd-applicant.component.html',
|
||||||
|
styleUrls: ['./edit-pd-applicant.component.scss'],
|
||||||
|
encapsulation: ViewEncapsulation.None,
|
||||||
|
})
|
||||||
|
export class EditPdApplicantComponent implements OnInit {
|
||||||
|
errorMessage: any;
|
||||||
|
@Input() applicantChild: any;
|
||||||
|
@Output() loadPdView = new EventEmitter<string>();
|
||||||
|
public _EditApplicantForm:FormGroup;
|
||||||
|
public notifier: NotifierService;
|
||||||
|
mainApplicantData: any[];
|
||||||
|
coApplicantData: any[];
|
||||||
|
coApplicantItems:FormArray;
|
||||||
|
emptyData:any;
|
||||||
|
constructor(private _fb: FormBuilder,
|
||||||
|
private _pd: PdTrigerService, notifier: NotifierService,) {
|
||||||
|
this.notifier=notifier
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.mainApplicantData= this.applicantChild.filter(item => item.applicant_type == 1);
|
||||||
|
this.coApplicantData= this.applicantChild.filter(item => item.applicant_type == 0);
|
||||||
|
this.loadApplicantFormData();
|
||||||
|
}
|
||||||
|
loadApplicantFormData() {
|
||||||
|
this._EditApplicantForm = this._fb.group({
|
||||||
|
fk_applicant_primary_id: [this.mainApplicantData[0].pd_co_applicant_id],
|
||||||
|
applicant_name: [this.mainApplicantData[0].applicant_name, Validators.compose([Validators.required])],
|
||||||
|
mobile_no: [this.mainApplicantData[0].mobile_no, Validators.compose([Validators.required])],
|
||||||
|
email: [this.mainApplicantData[0].email, Validators.compose([Validators.required, CustomValidators.email])],
|
||||||
|
applicant_type: [this.mainApplicantData[0].applicant_type, Validators.compose([Validators.required])],
|
||||||
|
coApplicantItems: this._fb.array([]),
|
||||||
|
});
|
||||||
|
// bind dynamic co applicant data
|
||||||
|
if(this.coApplicantData.length > 0){
|
||||||
|
for(let value of this.coApplicantData){
|
||||||
|
this.addCoApplicant(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
createItem(listData): FormGroup {
|
||||||
|
if(listData){
|
||||||
|
return this._fb.group({
|
||||||
|
label: ['Co Applicant'],
|
||||||
|
fk_applicant_primary_id: [listData.pd_co_applicant_id],
|
||||||
|
coapplicantName: [listData.applicant_name, Validators.compose([Validators.required])],
|
||||||
|
coapplicant_mobile_no: [listData.mobile_no],
|
||||||
|
relationship: [listData.relation],
|
||||||
|
applicant_type: [listData.applicant_type, Validators.compose([Validators.required])],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return this._fb.group({
|
||||||
|
label: ['Co Applicant'],
|
||||||
|
fk_applicant_primary_id: [null],
|
||||||
|
coapplicantName: [null, Validators.compose([Validators.required])],
|
||||||
|
coapplicant_mobile_no: [],
|
||||||
|
relationship: [null],
|
||||||
|
applicant_type: [0],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
addCoApplicant(listData) {
|
||||||
|
if(this._EditApplicantForm.valid){
|
||||||
|
this.coApplicantItems = this._EditApplicantForm.get('coApplicantItems') as FormArray;
|
||||||
|
this.coApplicantItems.push(this.createItem(listData));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
get pdMainApplicant() { return this._EditApplicantForm.controls; }
|
||||||
|
get pdCoApplicant() { return this._EditApplicantForm.get('coApplicantItems') as FormArray; }
|
||||||
|
updatePdApplicant(formValue: any) {
|
||||||
|
if(this._EditApplicantForm.valid){
|
||||||
|
let pd_applicant_details : any=[{
|
||||||
|
"fk_pd_id": this.mainApplicantData[0].fk_pd_id,
|
||||||
|
"pd_co_applicant_id": formValue.fk_applicant_primary_id,
|
||||||
|
"applicant_name":formValue.applicant_name,
|
||||||
|
"email":formValue.email,
|
||||||
|
"mobile_no":formValue.mobile_no,
|
||||||
|
"applicant_type":formValue.applicant_type,
|
||||||
|
"relation":formValue.relationship,
|
||||||
|
"isactive":1
|
||||||
|
}];
|
||||||
|
formValue.coApplicantItems.forEach((itemElement, itemIndex) => {
|
||||||
|
let obj1 = {
|
||||||
|
"fk_pd_id": this.mainApplicantData[0].fk_pd_id,
|
||||||
|
"pd_co_applicant_id": itemElement.fk_applicant_primary_id,
|
||||||
|
"applicant_name":itemElement.coapplicantName,
|
||||||
|
"relation":itemElement.relationship,
|
||||||
|
"email":"",
|
||||||
|
"mobile_no":itemElement.coapplicant_mobile_no,
|
||||||
|
"applicant_type":itemElement.applicant_type,
|
||||||
|
"isactive":1
|
||||||
|
}
|
||||||
|
pd_applicant_details.push(obj1)
|
||||||
|
});
|
||||||
|
|
||||||
|
this._pd.updatePdApplicant(pd_applicant_details).subscribe(result => {
|
||||||
|
if (result.status == 200) {
|
||||||
|
this.notifier.notify('success', 'PD Saved Successfully.!');
|
||||||
|
this.loadPdMasterCompoent();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
|
}
|
||||||
|
}, error => {
|
||||||
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
loadPdMasterCompoent() {
|
||||||
|
this.loadPdView.emit('2')
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,118 @@
|
|||||||
|
<mat-card>
|
||||||
|
<form [formGroup]="_EditPDtriggerForm" (submit)="submitPdDetails(_EditPDtriggerForm.value)">
|
||||||
|
<mat-card-content>
|
||||||
|
<div class="mb-2"></div>
|
||||||
|
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||||
|
<div class="column" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||||
|
<div fxLayout="column" fxLayoutAlign="start stretch">
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<mat-select placeholder="Lender Name" formControlName="fk_lender_id" required>
|
||||||
|
<mat-option *ngFor="let LL of lenderList" [value]="LL.entity_id" >
|
||||||
|
{{LL.full_name}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="pdMain.fk_lender_id.hasError('required')" class="mat-text-warn">Lender name is required.</mat-error>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<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-form-field>
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<mat-select placeholder="Product Name" formControlName="fk_product_id" (selectionChange)="getSubproductList(pdMain.fk_product_id.value)" required>
|
||||||
|
<mat-option *ngFor="let PL of productList" [value]="PL.product_id" >
|
||||||
|
{{PL.product_name}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="pdMain.fk_product_id.hasError('required')">Product is required.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
|
||||||
|
<mat-select placeholder="Sub product Name" formControlName="fk_subproduct_id" required>
|
||||||
|
<mat-option *ngFor="let SPL of subProductList" [value]="SPL.subproduct_id" >
|
||||||
|
{{SPL.subproduct_name}}
|
||||||
|
</mat-option>
|
||||||
|
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="pdMain.fk_subproduct_id.hasError('required')">Sub product is required.</mat-error>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<mat-select placeholder="Customer Segment" formControlName="fk_customer_segment" required>
|
||||||
|
<mat-option *ngFor="let CSL of customerSegmentList" [value]="CSL.customer_segment_id" >
|
||||||
|
{{CSL.customer_segment}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="pdMain.fk_customer_segment.hasError('required')">Customer segment is required.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<mat-select placeholder="PD Type" formControlName="fk_pd_type" required>
|
||||||
|
<mat-option *ngFor="let PDL of pdTypeList" [value]="PDL.pd_type_id" >
|
||||||
|
{{PDL.type_name}}
|
||||||
|
</mat-option>
|
||||||
|
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="pdMain.fk_pd_type.hasError('required')">PD type is required.</mat-error>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<input matInput placeholder="Loan Amount" formControlName="loan_amount" required>
|
||||||
|
<mat-error *ngIf="pdMain.loan_amount.hasError('required')">Amount is required.</mat-error>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<textarea matInput placeholder="Address 1" formControlName="addressline1" required></textarea>
|
||||||
|
<mat-error *ngIf="pdMain.addressline1.hasError('required')">Address1 required.</mat-error>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<textarea matInput placeholder="Address 2" formControlName="addressline2"></textarea>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<textarea matInput placeholder="Address 3" formControlName="addressline3"></textarea>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 100%;">
|
||||||
|
<mat-select placeholder="Select State" formControlName="fk_state" (selectionChange)="getCityList(pdMain.fk_state.value)" required>
|
||||||
|
<mat-option *ngFor="let SL of stateList" [value]="SL.state_id">
|
||||||
|
{{SL.state_name}}
|
||||||
|
</mat-option>
|
||||||
|
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="pdMain.fk_state.hasError('required')">State is required.</mat-error>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 100%;">
|
||||||
|
<mat-select placeholder="Select City" formControlName="fk_city" required>
|
||||||
|
` <mat-option *ngFor="let CL of cityList" [value]="CL.city_id">
|
||||||
|
{{CL.city_name}}
|
||||||
|
</mat-option>
|
||||||
|
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="pdMain.fk_city.hasError('required')">City is required.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
|
||||||
|
<mat-form-field style="width: 100%;">
|
||||||
|
<input matInput placeholder="Pincode" formControlName="pincode" required>
|
||||||
|
<mat-error *ngIf="pdMain.pincode.hasError('required')">Pincode is required.</mat-error>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</mat-card-content>
|
||||||
|
<mat-card-actions style="text-align: right">
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button"
|
||||||
|
(click)="loadPdMasterCompoent()"><mat-icon>close</mat-icon></button>
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
|
||||||
|
</mat-card-actions>
|
||||||
|
</form>
|
||||||
|
</mat-card>
|
||||||
|
<notifier-container></notifier-container>
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { EditPdMasterComponent } from './edit-pd-master.component';
|
||||||
|
|
||||||
|
describe('EditPdMasterComponent', () => {
|
||||||
|
let component: EditPdMasterComponent;
|
||||||
|
let fixture: ComponentFixture<EditPdMasterComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ EditPdMasterComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(EditPdMasterComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,130 @@
|
|||||||
|
import { Component, OnInit,ViewEncapsulation, EventEmitter, Input, Output } from '@angular/core';
|
||||||
|
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
|
||||||
|
import { CustomValidators } from 'ng2-validation';
|
||||||
|
import { NotifierService } from 'angular-notifier';
|
||||||
|
import { PdTrigerService } from '../pd-service/pd-triger.service';
|
||||||
|
@Component({
|
||||||
|
selector: 'app-edit-pd-master',
|
||||||
|
templateUrl: './edit-pd-master.component.html',
|
||||||
|
styleUrls: ['./edit-pd-master.component.scss'],
|
||||||
|
encapsulation: ViewEncapsulation.None
|
||||||
|
})
|
||||||
|
export class EditPdMasterComponent implements OnInit {
|
||||||
|
errorMessage: any;
|
||||||
|
productList:any;
|
||||||
|
subProductList:any;
|
||||||
|
lenderList:any;
|
||||||
|
customerSegmentList:any;
|
||||||
|
stateList:any;
|
||||||
|
cityList:any;
|
||||||
|
pdTypeList:any;
|
||||||
|
@Input() masterChild: any;
|
||||||
|
@Output() loadPdView = new EventEmitter<string>();
|
||||||
|
public _EditPDtriggerForm:FormGroup;
|
||||||
|
private notifier: NotifierService;
|
||||||
|
constructor(private _fb: FormBuilder,
|
||||||
|
private _pd: PdTrigerService, notifier: NotifierService,) {
|
||||||
|
this.notifier=notifier
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.getLenderList();
|
||||||
|
this.getProductsList();
|
||||||
|
this.getCustomerSegmentList();
|
||||||
|
this.getStateCityList();
|
||||||
|
this.getPDTypeList();
|
||||||
|
this.loadFormData();
|
||||||
|
}
|
||||||
|
|
||||||
|
getLenderList(){
|
||||||
|
this._pd.getLenderDetails().subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.lenderList=data.records
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
}
|
||||||
|
getProductsList(){
|
||||||
|
this._pd.getProductsDetails().subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.productList=data.records
|
||||||
|
this.getSubproductList(this.masterChild.fk_product_id);
|
||||||
|
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
}
|
||||||
|
getCustomerSegmentList(){
|
||||||
|
this._pd.getCustomersDetails().subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.customerSegmentList=data.records
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
}
|
||||||
|
getStateCityList(){
|
||||||
|
this._pd.getStateCityDetails().subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.stateList=data.records
|
||||||
|
this.getCityList(this.masterChild.fk_state);
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
}
|
||||||
|
getPDTypeList(){
|
||||||
|
this._pd.getPDTypeDetails().subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.pdTypeList=data.records.pd_type;
|
||||||
|
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
}
|
||||||
|
|
||||||
|
loadFormData() {
|
||||||
|
this._EditPDtriggerForm = this._fb.group({
|
||||||
|
fk_primary_id: [this.masterChild.pd_id],
|
||||||
|
fk_lender_id: [this.masterChild.fk_lender_id, Validators.compose([Validators.required])],
|
||||||
|
lender_applicant_id: [this.masterChild.lender_applicant_id, Validators.compose([Validators.required])],
|
||||||
|
fk_product_id: [this.masterChild.fk_product_id, Validators.compose([Validators.required])],
|
||||||
|
fk_subproduct_id: [this.masterChild.fk_subproduct_id, Validators.compose([Validators.required])],
|
||||||
|
fk_pd_type: [this.masterChild.fk_pd_type, Validators.compose([Validators.required])],
|
||||||
|
fk_customer_segment: [this.masterChild.fk_customer_segment, Validators.compose([Validators.required])],
|
||||||
|
loan_amount: [this.masterChild.loan_amount, Validators.compose([Validators.required])],
|
||||||
|
addressline1: [this.masterChild.addressline1, Validators.compose([Validators.required])],
|
||||||
|
addressline2: [this.masterChild.addressline2],
|
||||||
|
addressline3: [this.masterChild.addressline3],
|
||||||
|
fk_city: [this.masterChild.fk_city, Validators.compose([Validators.required])],
|
||||||
|
fk_state: [this.masterChild.fk_state, Validators.compose([Validators.required])],
|
||||||
|
pincode : [this.masterChild.pincode, Validators.compose([Validators.required])],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
get pdMain() { return this._EditPDtriggerForm.controls; }
|
||||||
|
|
||||||
|
//get sub product list based on prokduct id
|
||||||
|
getSubproductList(productID:string){
|
||||||
|
|
||||||
|
this.subProductList= this.productList.filter(item => item.product_id == productID);
|
||||||
|
this.subProductList=this.subProductList[0].subproducts;
|
||||||
|
}
|
||||||
|
|
||||||
|
//get city list details based on state id
|
||||||
|
getCityList(stateID:string){
|
||||||
|
this.cityList= this.stateList.filter(item => item.state_id == stateID);
|
||||||
|
this.cityList=this.cityList[0].cities;
|
||||||
|
}
|
||||||
|
submitPdDetails(formValue: any) {
|
||||||
|
if(this._EditPDtriggerForm.valid){
|
||||||
|
let my_array = this._EditPDtriggerForm.value;
|
||||||
|
Object.keys(my_array).forEach((key) => ( my_array[key] == null) && delete my_array[key]);
|
||||||
|
this._pd.editPdMasterDetails(my_array).subscribe();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
loadPdMasterCompoent() {
|
||||||
|
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||||
|
|
||||||
|
this.loadPdView.emit('1')
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,11 +1,123 @@
|
|||||||
<mat-card class="p-1">
|
<mat-card class="p-1">
|
||||||
|
<form [formGroup]="_EditPDtriggerForm" (submit)="submitPdDetails(_EditPDtriggerForm.value)">
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
{{ childData }}
|
<div class="mb-2"></div>
|
||||||
|
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||||
|
<div class="column" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||||
|
<mat-card class="p-2">
|
||||||
|
<h5>PD Details</h5>
|
||||||
|
|
||||||
|
<div fxLayout="column" fxLayoutAlign="start stretch">
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<mat-select placeholder="Lender Name" formControlName="fk_lender_id" required>
|
||||||
|
<mat-option *ngFor="let LL of lenderList" [value]="LL.entity_id" >
|
||||||
|
{{LL.full_name}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="pdMain.fk_lender_id.hasError('required')" class="mat-text-warn">Lender name is required.</mat-error>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<input matInput placeholder="Lender Applicant ID" formControlName="lender_applicant_id" type="text">
|
||||||
|
<mat-error *ngIf="pdMain.lender_applicant_id.hasError('required')">Applicant id is required.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<mat-select placeholder="Product Name" formControlName="fk_product_id" (selectionChange)="getSubproductList(pdMain.fk_product_id.value.product_id)">
|
||||||
|
<mat-option *ngFor="let PL of productList" [value]="PL" >
|
||||||
|
{{PL.product_name}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="pdMain.fk_product_id.hasError('required')">Product is required.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
|
||||||
|
<mat-select placeholder="Sub product Name" formControlName="fk_subproduct_id">
|
||||||
|
<mat-option *ngFor="let SPL of subProductList" [value]="SPL" >
|
||||||
|
{{SPL.subproduct_name}}
|
||||||
|
</mat-option>
|
||||||
|
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="pdMain.fk_subproduct_id.hasError('required')">Sub product is required.</mat-error>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<mat-select placeholder="Customer Segment" formControlName="fk_customer_segment">
|
||||||
|
<mat-option *ngFor="let CSL of customerSegmentList" [value]="CSL.customer_segment_id" >
|
||||||
|
{{CSL.customer_segment}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="pdMain.fk_customer_segment.hasError('required')">Customer segment is required.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<mat-select placeholder="PD Type" formControlName="fk_pd_type">
|
||||||
|
<mat-option *ngFor="let PDL of pdTypeList" [value]="PDL.pd_type_id" >
|
||||||
|
{{PDL.type_name}}
|
||||||
|
</mat-option>
|
||||||
|
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="pdMain.fk_pd_type.hasError('required')">PD type is required.</mat-error>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<input matInput placeholder="Loan Amount" formControlName="loan_amount">
|
||||||
|
<mat-error *ngIf="pdMain.loan_amount.hasError('required')">Amount is required.</mat-error>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<textarea matInput placeholder="Address 1" formControlName="addressline1"></textarea>
|
||||||
|
<mat-error *ngIf="pdMain.addressline1.hasError('required')">Address1 required.</mat-error>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<textarea matInput placeholder="Address 2" formControlName="addressline2"></textarea>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width: 100%">
|
||||||
|
<textarea matInput placeholder="Address 3" formControlName="addressline3"></textarea>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 100%;">
|
||||||
|
<mat-select placeholder="Select State" formControlName="fk_state" >
|
||||||
|
<mat-option *ngFor="let SL of stateList" [value]="SL">
|
||||||
|
{{SL.state_name}}
|
||||||
|
</mat-option>
|
||||||
|
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="pdMain.fk_state.hasError('required')">State is required.</mat-error>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field style="width: 100%;">
|
||||||
|
<mat-select placeholder="Select City" (selectionChange)="getCityList(pdMain.fk_state.value.state_id)" formControlName="fk_city" >
|
||||||
|
` <mat-option *ngFor="let CL of cityList" [value]="CL">
|
||||||
|
{{CL.name}}
|
||||||
|
</mat-option>
|
||||||
|
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="pdMain.fk_city.hasError('required')">City is required.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
|
||||||
|
<mat-form-field style="width: 100%;">
|
||||||
|
<input matInput placeholder="Pincode" formControlName="pincode">
|
||||||
|
<mat-error *ngIf="pdMain.pincode.hasError('required')">Pincode is required.</mat-error>
|
||||||
|
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</mat-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<hr>
|
<hr>
|
||||||
<mat-card-actions>
|
<!-- <mat-card-actions style="text-align: right">
|
||||||
<button mat-button color="accent" type="button" (click)="loadPdListCompoent()">Cancel</button>
|
<button mat-button color="accent" type="button" (click)="loadPdListCompoent()">Cancel</button>
|
||||||
</mat-card-actions>
|
|
||||||
|
<button mat-button color="primary" type="submit" [disabled]="!PDtriggerForm.valid">Submit</button>
|
||||||
|
</mat-card-actions> -->
|
||||||
|
</form>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|
||||||
@ -1,6 +1,8 @@
|
|||||||
import { Component, OnInit,ViewEncapsulation, EventEmitter, Input, Output } from '@angular/core';
|
import { Component, OnInit,ViewEncapsulation, EventEmitter, Input, Output } from '@angular/core';
|
||||||
import { ListPdComponent } from '../list-pd/list-pd.component';
|
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
|
||||||
|
import { CustomValidators } from 'ng2-validation';
|
||||||
|
import { PdTrigerService } from '../pd-service/pd-triger.service';
|
||||||
|
import { AwsService } from '../../AwsService/aws.service';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-edit-pd',
|
selector: 'app-edit-pd',
|
||||||
templateUrl: './edit-pd.component.html',
|
templateUrl: './edit-pd.component.html',
|
||||||
@ -8,16 +10,147 @@ import { ListPdComponent } from '../list-pd/list-pd.component';
|
|||||||
encapsulation: ViewEncapsulation.None
|
encapsulation: ViewEncapsulation.None
|
||||||
})
|
})
|
||||||
export class EditPdComponent implements OnInit {
|
export class EditPdComponent implements OnInit {
|
||||||
|
errorMessage: any;
|
||||||
|
public editData: any;
|
||||||
|
public productList:any;
|
||||||
|
subProductList:any;
|
||||||
|
lenderList:any;
|
||||||
|
customerSegmentList:any;
|
||||||
|
public stateList:any;
|
||||||
|
cityList:any;
|
||||||
|
pdTypeList:any;
|
||||||
@Input() childData: string;
|
@Input() childData: string;
|
||||||
@Output() loadParent = new EventEmitter<string>();
|
@Output() loadParent = new EventEmitter<string>();
|
||||||
constructor() {
|
public _EditPDtriggerForm:FormGroup;
|
||||||
|
constructor(private _fb: FormBuilder,
|
||||||
|
private _pd: PdTrigerService, private _aws:AwsService) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.getLenderList();
|
||||||
|
this.getProductsList();
|
||||||
|
this.getCustomerSegmentList();
|
||||||
|
this.getStateCityList();
|
||||||
|
this.getPDTypeList();
|
||||||
|
this.editPdDetails(this.childData);
|
||||||
|
this.beforeLoadFormData();
|
||||||
}
|
}
|
||||||
|
editPdDetails(editID:string){
|
||||||
|
this._pd.editPdDetails(editID).subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.editData=data.records
|
||||||
|
this.afterLoadFormData();
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
}
|
||||||
|
|
||||||
loadPdListCompoent() {
|
loadPdListCompoent() {
|
||||||
this.loadParent.emit('2')
|
this.loadParent.emit('2')
|
||||||
}
|
}
|
||||||
|
getLenderList(){
|
||||||
|
this._pd.getLenderDetails().subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.lenderList=data.records
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
}
|
||||||
|
getProductsList(){
|
||||||
|
this._pd.getProductsDetails().subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.productList=data.records
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
}
|
||||||
|
getCustomerSegmentList(){
|
||||||
|
this._pd.getCustomersDetails().subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.customerSegmentList=data.records
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
}
|
||||||
|
getStateCityList(){
|
||||||
|
this._pd.getStateCityDetails().subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.stateList=data.records
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
}
|
||||||
|
getPDTypeList(){
|
||||||
|
this._pd.getPDTypeDetails().subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.pdTypeList=data.records.pd_type;
|
||||||
|
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
beforeLoadFormData(){
|
||||||
|
this._EditPDtriggerForm = this._fb.group({
|
||||||
|
fk_lender_id: [null, Validators.compose([Validators.required])],
|
||||||
|
lender_applicant_id: [null, Validators.compose([Validators.required])],
|
||||||
|
fk_product_id: [null, Validators.compose([Validators.required])],
|
||||||
|
fk_subproduct_id: [null, Validators.compose([Validators.required])],
|
||||||
|
fk_pd_type: [null, Validators.compose([Validators.required])],
|
||||||
|
fk_customer_segment: [null, Validators.compose([Validators.required])],
|
||||||
|
loan_amount: [null, Validators.compose([Validators.required])],
|
||||||
|
applicant_name: [null, Validators.compose([Validators.required])],
|
||||||
|
mobile_no: [null, Validators.compose([Validators.required])],
|
||||||
|
email: [null, Validators.compose([Validators.required, CustomValidators.email])],
|
||||||
|
addressline1: [null, Validators.compose([Validators.required])],
|
||||||
|
addressline2: [null],
|
||||||
|
addressline3: [null],
|
||||||
|
fk_city: [null, Validators.compose([Validators.required])],
|
||||||
|
fk_state: [null, Validators.compose([Validators.required])],
|
||||||
|
pincode : [null, Validators.compose([Validators.required])],
|
||||||
|
items: this._fb.array([]),
|
||||||
|
documents: this._fb.array([])
|
||||||
|
});
|
||||||
|
}
|
||||||
|
afterLoadFormData() {
|
||||||
|
this._EditPDtriggerForm = this._fb.group({
|
||||||
|
fk_lender_id: [null, Validators.compose([Validators.required])],
|
||||||
|
lender_applicant_id: [null, Validators.compose([Validators.required])],
|
||||||
|
fk_product_id: [null, Validators.compose([Validators.required])],
|
||||||
|
fk_subproduct_id: [null, Validators.compose([Validators.required])],
|
||||||
|
fk_pd_type: [null, Validators.compose([Validators.required])],
|
||||||
|
fk_customer_segment: [null, Validators.compose([Validators.required])],
|
||||||
|
loan_amount: [null, Validators.compose([Validators.required])],
|
||||||
|
applicant_name: [null, Validators.compose([Validators.required])],
|
||||||
|
mobile_no: [null, Validators.compose([Validators.required])],
|
||||||
|
email: [null, Validators.compose([Validators.required, CustomValidators.email])],
|
||||||
|
addressline1: [null, Validators.compose([Validators.required])],
|
||||||
|
addressline2: [null],
|
||||||
|
addressline3: [null],
|
||||||
|
fk_city: [null, Validators.compose([Validators.required])],
|
||||||
|
fk_state: [null, Validators.compose([Validators.required])],
|
||||||
|
pincode : [null, Validators.compose([Validators.required])],
|
||||||
|
items: this._fb.array([]),
|
||||||
|
documents: this._fb.array([])
|
||||||
|
});
|
||||||
|
}
|
||||||
|
get pdMain() { return this._EditPDtriggerForm.controls; }
|
||||||
|
|
||||||
|
//get sub product list based on prokduct id
|
||||||
|
getSubproductList(productID:string){
|
||||||
|
this.subProductList= this.productList.filter(item => item.product_id == productID);
|
||||||
|
this.subProductList=this.subProductList[0].subproducts;
|
||||||
|
}
|
||||||
|
|
||||||
|
//get city list details based on state id
|
||||||
|
getCityList(stateID:string){
|
||||||
|
this.cityList= this.stateList.filter(item => item.state_id == stateID);
|
||||||
|
this.cityList=this.cityList[0].city;
|
||||||
|
}
|
||||||
|
submitPdDetails(formValue: any) {
|
||||||
|
if(this._EditPDtriggerForm.valid){
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,104 +5,49 @@
|
|||||||
<mat-tab-group>
|
<mat-tab-group>
|
||||||
<mat-tab>
|
<mat-tab>
|
||||||
<ng-template mat-tab-label>All PD Details</ng-template>
|
<ng-template mat-tab-label>All PD Details</ng-template>
|
||||||
<mat-card-content>
|
|
||||||
<div class="card-comment-widget">
|
<div class="card-comment-widget">
|
||||||
<mat-list>
|
<mat-list *ngIf="pdList.length > 0">
|
||||||
<mat-list-item *ngFor="let details of pdList">
|
<mat-list-item *ngFor="let details of dataSource.connect() | async">
|
||||||
<img mat-list-avatar src="assets/images/face3.jpg" alt="">
|
<img mat-list-avatar src="assets/images/face3.jpg" alt="">
|
||||||
|
<!-- {{details.applicat_details[0].applicant_name}} -->
|
||||||
<p mat-line>{{details.applicat_details[0].applicant_name}} </p>
|
<p mat-line>{{details.applicat_details[0].applicant_name}} </p>
|
||||||
|
|
||||||
<p mat-line>{{details.lender_applicant_id}} {{details.pd_date_of_initiation}}</p>
|
<p mat-line>{{details.lender_full_name}} {{details.lender_applicant_id}} {{details.pd_date_of_initiation}}</p>
|
||||||
<p mat-line>{{details.product_abbr}}/{{details.subproduct_abbr}}/{{details.customer_segment_abbr}} <i class="fa-1x fa fa-dollar"> </i>{{details.loan_amount}} <i class="fa-1x fa fa-map-marker"> </i> {{details.state_name}}/{{details.city_name}}</p>
|
<p mat-line>{{details.product_abbr}}/{{details.subproduct_abbr}}/{{details.customer_segment_abbr}} <span class="hover-icon"><i class="fa-1x fa fa-rupee"> </i>{{details.loan_amount}}</span> <span class="hover-icon"><i class="fa-1x fa fa-map-marker"> </i> {{details.city_name}}/{{details.state_name}}-{{details.pincode}}</span></p>
|
||||||
<!-- <span class="text-mat mat-text-muted">Chennai</span> -->
|
<!-- <span class="text-mat mat-text-muted">Chennai</span> -->
|
||||||
|
|
||||||
<div class="comment-time">
|
<!-- <div class="comment-time">
|
||||||
<!-- <a> <i class="fa ic-change fa-edit fa-lg"></i></a> -->
|
<button mat-raised-button mat-icon-button mat-button-sm class="mr-1 mb-1" type="button" color="primary" (click)="editPdDetails(details.pd_id)"><mat-icon>edit</mat-icon></button>
|
||||||
<button mat-raised-button mat-icon-button mat-button-sm class="mr-1 mb-1" color="primary" (click)="editPdDetails(details.pd_id)"><mat-icon>edit</mat-icon></button>
|
|
||||||
|
|
||||||
</div>
|
</div> -->
|
||||||
<div class="comment-time">
|
<div class="comment-time">
|
||||||
|
|
||||||
<!-- <a> <i class="fa ic-change fa-eye fa-lg"></i></a> -->
|
<!-- <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"><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>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<mat-divider></mat-divider>
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
<hr>
|
|
||||||
<mat-list-item *ngFor="let details of pdList">
|
|
||||||
<img mat-list-avatar src="assets/images/face3.jpg" alt="">
|
|
||||||
<p mat-line>{{details.applicat_details[0].applicant_name}} </p>
|
|
||||||
|
|
||||||
<p mat-line>{{details.lender_applicant_id}} {{details.pd_date_of_initiation}}</p>
|
</mat-list>
|
||||||
<p mat-line>{{details.product_abbr}}/{{details.subproduct_abbr}}/{{details.customer_segment_abbr}} <i class="fa-1x fa fa-dollar"> </i>{{details.loan_amount}} <i class="fa-1x fa fa-map-marker"> </i> {{details.state_name}}/{{details.city_name}}</p>
|
<mat-list *ngIf="recordStatus">
|
||||||
<!-- <span class="text-mat mat-text-muted">Chennai</span> -->
|
<mat-list-item>
|
||||||
|
<p mat-line>No Record Found ...</p>
|
||||||
|
|
||||||
<div class="comment-time">
|
</mat-list-item>
|
||||||
<!-- <a> <i class="fa ic-change fa-edit fa-lg"></i></a> -->
|
|
||||||
<button mat-raised-button mat-icon-button mat-button-sm class="mr-1 mb-1" color="primary"><mat-icon>edit</mat-icon></button>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="comment-time">
|
|
||||||
|
|
||||||
<!-- <a> <i class="fa ic-change fa-eye fa-lg"></i></a> -->
|
|
||||||
<button mat-raised-button mat-icon-button mat-button-sm class="mr-1 mb-1" color="accent"><mat-icon>visibility</mat-icon></button>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</mat-list-item>
|
|
||||||
<hr>
|
|
||||||
<mat-list-item *ngFor="let details of pdList">
|
|
||||||
<img mat-list-avatar src="assets/images/face3.jpg" alt="">
|
|
||||||
<p mat-line>{{details.applicat_details[0].applicant_name}} </p>
|
|
||||||
|
|
||||||
<p mat-line>{{details.lender_applicant_id}} {{details.pd_date_of_initiation}}</p>
|
|
||||||
<p mat-line>{{details.product_abbr}}/{{details.subproduct_abbr}}/{{details.customer_segment_abbr}} <i class="fa-1x fa fa-dollar"> </i>{{details.loan_amount}} <i class="fa-1x fa fa-map-marker"> </i> {{details.state_name}}/{{details.city_name}}</p>
|
|
||||||
<!-- <span class="text-mat mat-text-muted">Chennai</span> -->
|
|
||||||
|
|
||||||
<div class="comment-time">
|
|
||||||
<!-- <a> <i class="fa ic-change fa-edit fa-lg"></i></a> -->
|
|
||||||
<button mat-raised-button mat-icon-button mat-button-sm class="mr-1 mb-1" color="primary"><mat-icon>edit</mat-icon></button>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="comment-time">
|
|
||||||
|
|
||||||
<!-- <a> <i class="fa ic-change fa-eye fa-lg"></i></a> -->
|
|
||||||
<button mat-raised-button mat-icon-button mat-button-sm class="mr-1 mb-1" color="accent"><mat-icon>visibility</mat-icon></button>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</mat-list-item>
|
|
||||||
<hr>
|
|
||||||
<mat-list-item *ngFor="let details of pdList">
|
|
||||||
<img mat-list-avatar src="assets/images/face3.jpg" alt="">
|
|
||||||
<p mat-line>{{details.applicat_details[0].applicant_name}} </p>
|
|
||||||
|
|
||||||
<p mat-line>{{details.lender_applicant_id}} {{details.pd_date_of_initiation}}</p>
|
|
||||||
<p mat-line>{{details.product_abbr}}/{{details.subproduct_abbr}}/{{details.customer_segment_abbr}} <i class="fa-1x fa fa-dollar"> </i>{{details.loan_amount}} <i class="fa-1x fa fa-map-marker"> </i> {{details.state_name}}/{{details.city_name}}</p>
|
|
||||||
<!-- <span class="text-mat mat-text-muted">Chennai</span> -->
|
|
||||||
|
|
||||||
<div class="comment-time">
|
|
||||||
<!-- <a> <i class="fa ic-change fa-edit fa-lg"></i></a> -->
|
|
||||||
<button mat-raised-button mat-icon-button mat-button-sm class="mr-1 mb-1" color="primary"><mat-icon>edit</mat-icon></button>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="comment-time">
|
|
||||||
|
|
||||||
<!-- <a> <i class="fa ic-change fa-eye fa-lg"></i></a> -->
|
|
||||||
<button mat-raised-button mat-icon-button mat-button-sm class="mr-1 mb-1" color="accent"><mat-icon>visibility</mat-icon></button>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</mat-list-item>
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
</mat-list>
|
|
||||||
|
|
||||||
|
</mat-list>
|
||||||
</div>
|
</div>
|
||||||
</mat-card-content>
|
|
||||||
<mat-card-actions>
|
<mat-card-actions *ngIf="!recordStatus">
|
||||||
<button mat-button (click)="addTileCols()" color="primary">ADD COLSPAN (THREE)</button>
|
<mat-paginator #paginator [length]="pdList.length" [pageIndex]="pageIndex" [pageSize]="pageSize"
|
||||||
</mat-card-actions>
|
[pageSizeOptions]="[5, 10, 25, 100]" (page)="pageEvent = $event; pageChange($event)">
|
||||||
|
</mat-paginator>
|
||||||
|
</mat-card-actions>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
<mat-tab>
|
<!-- <mat-tab>
|
||||||
<ng-template mat-tab-label>Confirmed PD Details</ng-template>
|
<ng-template mat-tab-label>Confirmed PD Details</ng-template>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-grid-list cols="2" [rowHeight]="ratio" gutterSize="4px">
|
<mat-grid-list cols="2" [rowHeight]="ratio" gutterSize="4px">
|
||||||
@ -135,37 +80,11 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-tab>
|
|
||||||
<!-- <mat-tab>
|
|
||||||
<ng-template mat-tab-label>Headers</ng-template>
|
|
||||||
<mat-card-content class="pa-0">
|
|
||||||
<mat-grid-list cols="3" rowHeight="200px">
|
|
||||||
<mat-grid-tile *ngFor="let dog of dogs" style="background:gray">
|
|
||||||
<mat-grid-tile-header>
|
|
||||||
<mat-icon mat-grid-avatar>info_outline</mat-icon>
|
|
||||||
{{dog.name}}
|
|
||||||
</mat-grid-tile-header>
|
|
||||||
</mat-grid-tile>
|
|
||||||
</mat-grid-list>
|
|
||||||
</mat-card-content>
|
|
||||||
</mat-tab>
|
|
||||||
<mat-tab>
|
|
||||||
<ng-template mat-tab-label>Footers</ng-template>
|
|
||||||
<mat-card-content class="pa-0">
|
|
||||||
<mat-grid-list cols="3" rowHeight="200px">
|
|
||||||
<mat-grid-tile *ngFor="let dog of dogs">
|
|
||||||
<img [alt]="dog.name" src="https://material.angularjs.org/material2_assets/ngconf/{{dog.name}}.png">
|
|
||||||
<mat-grid-tile-footer>
|
|
||||||
<h3 mat-line>{{dog.name}}</h3>
|
|
||||||
<span mat-line>Human: {{dog.human}}</span>
|
|
||||||
<mat-icon>star_border</mat-icon>
|
|
||||||
</mat-grid-tile-footer>
|
|
||||||
</mat-grid-tile>
|
|
||||||
</mat-grid-list>
|
|
||||||
</mat-card-content>
|
|
||||||
</mat-tab> -->
|
</mat-tab> -->
|
||||||
|
|
||||||
</mat-tab-group>
|
</mat-tab-group>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|
||||||
<app-edit-pd *ngIf="showEditComponent" [childData]="parentEditData" (loadParent)="updateParentComponent($event)"></app-edit-pd>
|
<app-edit-pd *ngIf="showEditComponent" [childData]="parentEditData" (loadParent)="updateParentComponent($event)"></app-edit-pd>
|
||||||
<app-add-pd *ngIf="showAddComponent" (loadParent)="updateParentComponent($event)"></app-add-pd>
|
<app-add-pd *ngIf="showAddComponent" (loadParent)="updateParentComponent($event)"></app-add-pd>
|
||||||
|
<app-view-pd *ngIf="showViewComponent" [childData]="parentViewData" (loadParent)="updateParentComponent($event)"></app-view-pd>
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import { Component, OnInit, ViewEncapsulation, EventEmitter, Output } from '@angular/core';
|
import { Component, ViewChild, OnInit, ViewEncapsulation, EventEmitter, Output } from '@angular/core';
|
||||||
|
import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/material';
|
||||||
import { PdTrigerService } from '../pd-service/pd-triger.service';
|
import { PdTrigerService } from '../pd-service/pd-triger.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -8,12 +9,28 @@ import { PdTrigerService } from '../pd-service/pd-triger.service';
|
|||||||
encapsulation: ViewEncapsulation.None
|
encapsulation: ViewEncapsulation.None
|
||||||
})
|
})
|
||||||
export class ListPdComponent implements OnInit {
|
export class ListPdComponent implements OnInit {
|
||||||
|
recordStatus: boolean;
|
||||||
parentEditData :string;
|
parentEditData :string;
|
||||||
|
parentViewData :string;
|
||||||
showParentComponent:boolean;
|
showParentComponent:boolean;
|
||||||
showAddComponent:boolean;
|
showAddComponent:boolean;
|
||||||
showEditComponent:boolean;
|
showEditComponent:boolean;
|
||||||
|
showViewComponent:boolean;
|
||||||
errorMessage: any;
|
errorMessage: any;
|
||||||
pdList:any[];
|
public paginationList: any[] = [];
|
||||||
|
// pagination variable details
|
||||||
|
length = 50;
|
||||||
|
pageIndex = 0;
|
||||||
|
pageSize = 10;
|
||||||
|
pageEvent: PageEvent;
|
||||||
|
|
||||||
|
// data source variable details
|
||||||
|
pdListData = null;
|
||||||
|
public dataLength: number;
|
||||||
|
public dataSource = new MatTableDataSource();
|
||||||
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
pdList:any[] = [];
|
||||||
tiles: any[] = [{
|
tiles: any[] = [{
|
||||||
text: 'One',
|
text: 'One',
|
||||||
cols: 3,
|
cols: 3,
|
||||||
@ -70,31 +87,52 @@ export class ListPdComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.recordStatus=false
|
||||||
this.showParentComponent=true
|
this.showParentComponent=true
|
||||||
this.showAddComponent=false
|
this.showAddComponent=false
|
||||||
this.showEditComponent=false
|
this.showEditComponent=false
|
||||||
|
this.showViewComponent=false
|
||||||
this._pd.getPdDetails()
|
this._pd.getPdDetails()
|
||||||
.subscribe(
|
.subscribe(
|
||||||
data => {
|
data => {
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
this.pdList = data.records;
|
this.pdList = data.records;
|
||||||
|
this.pdListData = data.records;
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
this.dataSource.data = this.pdListData;
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.pdList=[];
|
||||||
|
this.dataLength = null;
|
||||||
|
this.recordStatus=true;
|
||||||
}
|
}
|
||||||
}, error => this.errorMessage = <any> error);
|
}, error => this.errorMessage = <any> error);
|
||||||
}
|
}
|
||||||
|
ngAfterViewInit() {
|
||||||
|
this.dataSource.paginator = this.paginator;
|
||||||
|
}
|
||||||
addPdDetails(){
|
addPdDetails(){
|
||||||
this.showParentComponent=false
|
this.showParentComponent=false
|
||||||
this.showEditComponent=false
|
this.showEditComponent=false
|
||||||
|
this.showViewComponent=false
|
||||||
this.showAddComponent=!this.showAddComponent
|
this.showAddComponent=!this.showAddComponent
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
editPdDetails(editID:string){
|
editPdDetails(editID:string){
|
||||||
this.showParentComponent=false
|
this.showParentComponent=false
|
||||||
this.showAddComponent=false
|
this.showAddComponent=false
|
||||||
|
this.showViewComponent=false
|
||||||
this.showEditComponent=!this.showEditComponent
|
this.showEditComponent=!this.showEditComponent
|
||||||
this.parentEditData=editID
|
this.parentEditData=editID
|
||||||
}
|
}
|
||||||
|
viewPdDetails(editID:string){
|
||||||
|
this.showParentComponent=false
|
||||||
|
this.showAddComponent=false
|
||||||
|
this.showEditComponent=false
|
||||||
|
this.showViewComponent=!this.showViewComponent
|
||||||
|
this.parentViewData=editID
|
||||||
|
}
|
||||||
updateParentComponent(event:string) {
|
updateParentComponent(event:string) {
|
||||||
this.showParentComponent=!this.showParentComponent
|
this.showParentComponent=!this.showParentComponent
|
||||||
if(event=='1'){
|
if(event=='1'){
|
||||||
@ -102,14 +140,30 @@ export class ListPdComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
else if(event=='2'){
|
else if(event=='2'){
|
||||||
this.showEditComponent=!this.showEditComponent
|
this.showEditComponent=!this.showEditComponent
|
||||||
|
}
|
||||||
|
else if(event=='3'){
|
||||||
|
this.showViewComponent=!this.showViewComponent
|
||||||
}
|
}
|
||||||
this._pd.getPdDetails()
|
this._pd.getPdDetails()
|
||||||
.subscribe(
|
.subscribe(
|
||||||
data => {
|
data => {
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
this.pdList = data.records;
|
this.pdList = data.records;
|
||||||
|
this.pdListData = data.records;
|
||||||
|
this.dataLength = data.records.length;
|
||||||
|
this.dataSource.data = this.pdListData;
|
||||||
|
this.recordStatus=false;
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.pdList=[];
|
||||||
|
this.dataLength = null;
|
||||||
|
this.recordStatus=true;
|
||||||
}
|
}
|
||||||
}, error => this.errorMessage = <any> error);
|
}, error => this.errorMessage = <any> error);
|
||||||
}
|
}
|
||||||
|
pageChange(e) {
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,27 @@
|
|||||||
|
<mat-card>
|
||||||
|
<mat-card-header>
|
||||||
|
<mat-card-title>{{pageTitle}}</mat-card-title>
|
||||||
|
</mat-card-header>
|
||||||
|
<mat-card-content>
|
||||||
|
|
||||||
|
<form [formGroup]="_pdAllocationForm" (submit)="onSubmit()">
|
||||||
|
<!--<div class="form-group">-->
|
||||||
|
<div fxLayout="row" fxLayoutAlign="start none">
|
||||||
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
|
<mat-select placeholder="Select Name" formControlName="allocation_id">
|
||||||
|
<mat-option *ngFor="let ct of pdOfficerList" [value]="ct">{{ ct.categroy_name }}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="readForm.allocation_id.hasError('required')" class="mat-text-warn">Select name.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
<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 class="mr-1 mb-1 hover-icon" type="submit"><mat-icon>save</mat-icon></button>
|
||||||
|
</div>
|
||||||
|
<!--</div>-->
|
||||||
|
</form>
|
||||||
|
</mat-card-content>
|
||||||
|
</mat-card>
|
||||||
|
|
||||||
|
<notifier-container></notifier-container>
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { PdAllocationComponent } from './pd-allocation.component';
|
||||||
|
|
||||||
|
describe('PdAllocationComponent', () => {
|
||||||
|
let component: PdAllocationComponent;
|
||||||
|
let fixture: ComponentFixture<PdAllocationComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ PdAllocationComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(PdAllocationComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,85 @@
|
|||||||
|
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;
|
||||||
|
constructor( notifier: NotifierService,
|
||||||
|
private _fb: FormBuilder,
|
||||||
|
private dialogRef: MatDialogRef<PdAllocationComponent>,
|
||||||
|
private _pd: PdTrigerService,
|
||||||
|
@Inject(MAT_DIALOG_DATA) public data: any) {
|
||||||
|
this.notifier=notifier;
|
||||||
|
console.log(this.data)
|
||||||
|
this.getPDOfficerList();
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this._pdAllocationForm = this._fb.group({
|
||||||
|
pd_primary_id: [null],
|
||||||
|
allocation_id: [null, Validators.compose([Validators.required])],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// convenience getter for easy access to form fields
|
||||||
|
get readForm() { return this._pdAllocationForm.controls; }
|
||||||
|
|
||||||
|
// pd officer list
|
||||||
|
getPDOfficerList(){
|
||||||
|
this._pd.getPdOfficerList().subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.pdOfficerList=data.records.pd_master_details;
|
||||||
|
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
|
||||||
|
}
|
||||||
|
/** To Save/Edited Popup Data */
|
||||||
|
onSubmit() {
|
||||||
|
// stop here if form is invalid
|
||||||
|
if (this._pdAllocationForm.invalid) {
|
||||||
|
this.errorMessage = "Please Fill All Mandate Fields.";
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
var updateData = this._pdAllocationForm.value;
|
||||||
|
|
||||||
|
//To Remove The "Null" With Key also
|
||||||
|
Object.keys(updateData).forEach((key) => (updateData[key] == null) && delete updateData[key]);
|
||||||
|
|
||||||
|
//Add BRANCH data with help Service File
|
||||||
|
this._pd.updatePdOfficer(updateData).subscribe(
|
||||||
|
result => {
|
||||||
|
if (result.status == 200) {
|
||||||
|
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||||
|
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();
|
||||||
|
});
|
||||||
|
//After Saving the BRANCH data then popup close
|
||||||
|
// this.dialogRef.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/** For Popup Close Button */
|
||||||
|
closeAllocationComponent(): void {
|
||||||
|
this.dialogRef.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,7 +1,7 @@
|
|||||||
/** Common Import Section */
|
/** Common Import Section */
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Observable } from 'rxjs';//for Datatables
|
import { Observable } from 'rxjs';//for Datatables
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient,HttpParams } from '@angular/common/http';
|
||||||
import { catchError } from 'rxjs/operators';
|
import { catchError } from 'rxjs/operators';
|
||||||
import { of } from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
|
|
||||||
@ -21,6 +21,8 @@ export interface Master {
|
|||||||
export class PdTrigerService {
|
export class PdTrigerService {
|
||||||
|
|
||||||
private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
||||||
|
//private apiUrl = "http://192.168.15.5:9999/AWSEC2/sparqapi/api/";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
constructor(private _http: HttpClient,
|
constructor(private _http: HttpClient,
|
||||||
@ -32,12 +34,56 @@ export class PdTrigerService {
|
|||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
//get product and subproduct master details
|
||||||
|
getProductsDetails(): Observable<any> {
|
||||||
|
return this._http.get<any>(this.apiUrl+'getListOfProducts')
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('role', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
// get lenders list
|
||||||
|
getLenderDetails(): Observable<any> {
|
||||||
|
return this._http.get<any>(this.apiUrl+'getListOfLenders')
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('role', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
// get customers list
|
||||||
|
getCustomersDetails(): Observable<any> {
|
||||||
|
return this._http.get<any>(this.apiUrl+'getListOfCustomerSegments')
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('role', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
// get Pd Allocation type details list
|
||||||
|
getPDAllocationDetails(): Observable<any> {
|
||||||
|
return this._http.get<any>(this.apiUrl+'getListOfPDAllocationTypes')
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('role', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
// get state and city details
|
||||||
|
getStateCityDetails(): Observable<any> {
|
||||||
|
return this._http.get<any>(this.apiUrl+'getListOfStatesAndCities')
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('role', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
// get pd type and allocation type details
|
||||||
|
getPDTypeDetails():Observable<any> {
|
||||||
|
return this._http.get<any>(this.apiUrl+'getListOfPDAllocationTypes')
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('role', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
// add pd details
|
||||||
addPdDetails(pdForm: any): Observable<any> {
|
addPdDetails(pdForm: any): Observable<any> {
|
||||||
return this._http.post<any>(this.apiUrl+"triggerNewPD", pdForm)
|
return this._http.post<any>(this.apiUrl+"triggerNewPD", pdForm)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
// get pd details
|
||||||
getPdDetails(): Observable<any> {
|
getPdDetails(): Observable<any> {
|
||||||
return this._http.get<any>(this.apiUrl+"listLessPDDetails/get")
|
return this._http.get<any>(this.apiUrl+"listLessPDDetails/get")
|
||||||
.pipe(
|
.pipe(
|
||||||
@ -45,9 +91,53 @@ export class PdTrigerService {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private handleError<T>(operation = 'operation', result?: T) {
|
// get edit row pd details
|
||||||
return (error: any): Observable<T> => {
|
editPdDetails(editId:string):Observable<any>{
|
||||||
return of(result as T);
|
let httpParams = new HttpParams().set('pdid', editId);
|
||||||
};
|
return this._http.post<any>(this.apiUrl+"getFullPDDetails",httpParams)
|
||||||
}
|
.pipe(
|
||||||
|
catchError(this.handleError('operation', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
// update pd master details
|
||||||
|
editPdMasterDetails(editData:any):Observable<any>{
|
||||||
|
editData.fk_updatedby = this._aws.getlocale();
|
||||||
|
editData.updatedon = currentdate;
|
||||||
|
return this._http.post<any>(this.apiUrl+"triggerNewPD",{records:editData})
|
||||||
|
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('operation', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
// update pd applicant
|
||||||
|
updatePdApplicant(editData:any):Observable<any>{
|
||||||
|
// editData.fk_updatedby = this._aws.getlocale();
|
||||||
|
// editData.updatedon = currentdate;
|
||||||
|
return this._http.post<any>(this.apiUrl+"updatePDApplicants",{"pd_applicant_details":editData})
|
||||||
|
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('operation', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// get pd allocation to details
|
||||||
|
getPdOfficerList(): Observable<any> {
|
||||||
|
return this._http.get<any>(this.apiUrl+"getListPDOfficers")
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('operation', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
// update pd officer
|
||||||
|
updatePdOfficer(updateData: any): Observable<any> {
|
||||||
|
return this._http.post<any>(this.apiUrl+"updatePDApplicants",{"pd_applicant_details":updateData})
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('operation', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
private handleError<T>(operation = 'operation', result?: T) {
|
||||||
|
return (error: any): Observable<T> => {
|
||||||
|
return of(result as T);
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,8 +15,12 @@ import { FileUploadModule } from 'ng2-file-upload/ng2-file-upload';
|
|||||||
import { TreeModule } from 'angular-tree-component';
|
import { TreeModule } from 'angular-tree-component';
|
||||||
import { NgxDatatableModule } from '@swimlane/ngx-datatable';
|
import { NgxDatatableModule } from '@swimlane/ngx-datatable';
|
||||||
import { FlexLayoutModule } from '@angular/flex-layout';
|
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||||
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||||
|
|
||||||
import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
|
import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
|
||||||
|
import { NotifierModule, NotifierOptions } from 'angular-notifier';
|
||||||
|
import {MatDatepickerModule} from '@angular/material/datepicker';
|
||||||
|
|
||||||
|
|
||||||
import 'hammerjs';
|
import 'hammerjs';
|
||||||
import { PdTrigerRoutes } from './pd-triger-routing.module';
|
import { PdTrigerRoutes } from './pd-triger-routing.module';
|
||||||
@ -24,11 +28,58 @@ import { AddPdComponent } from './add-pd/add-pd.component';
|
|||||||
import { PdTrigerService } from './pd-service/pd-triger.service';
|
import { PdTrigerService } from './pd-service/pd-triger.service';
|
||||||
import { ListPdComponent } from './list-pd/list-pd.component';
|
import { ListPdComponent } from './list-pd/list-pd.component';
|
||||||
import { EditPdComponent } from './edit-pd/edit-pd.component';
|
import { EditPdComponent } from './edit-pd/edit-pd.component';
|
||||||
|
import { ViewPdComponent } from './view-pd/view-pd.component';
|
||||||
|
import { EditPdMasterComponent } from './edit-pd-master/edit-pd-master.component';
|
||||||
|
import { EditPdApplicantComponent } from './edit-pd-applicant/edit-pd-applicant.component';
|
||||||
|
import { PdAllocationComponent } from './pd-allocation/pd-allocation.component';
|
||||||
|
/**
|
||||||
|
* Custom angular notifier options
|
||||||
|
*/
|
||||||
|
const customNotifierOptions: NotifierOptions = {
|
||||||
|
position: {
|
||||||
|
horizontal: {
|
||||||
|
position: 'right',
|
||||||
|
distance: 12
|
||||||
|
},
|
||||||
|
vertical: {
|
||||||
|
position: 'top',
|
||||||
|
distance: 32,
|
||||||
|
gap: 10
|
||||||
|
}
|
||||||
|
},
|
||||||
|
theme: 'material',
|
||||||
|
behaviour: {
|
||||||
|
autoHide: 5000,
|
||||||
|
onClick: 'hide',
|
||||||
|
onMouseover: 'pauseAutoHide',
|
||||||
|
showDismissButton: true,
|
||||||
|
stacking: 4
|
||||||
|
},
|
||||||
|
animations: {
|
||||||
|
enabled: true,
|
||||||
|
show: {
|
||||||
|
preset: 'slide',
|
||||||
|
speed: 300,
|
||||||
|
easing: 'ease'
|
||||||
|
},
|
||||||
|
hide: {
|
||||||
|
preset: 'fade',
|
||||||
|
speed: 300,
|
||||||
|
easing: 'ease',
|
||||||
|
offset: 50
|
||||||
|
},
|
||||||
|
shift: {
|
||||||
|
speed: 300,
|
||||||
|
easing: 'ease'
|
||||||
|
},
|
||||||
|
overlap: 150
|
||||||
|
}
|
||||||
|
};
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
RouterModule.forChild(PdTrigerRoutes),
|
RouterModule.forChild(PdTrigerRoutes),
|
||||||
|
NotifierModule.withConfig(customNotifierOptions),
|
||||||
MatCardModule,
|
MatCardModule,
|
||||||
MatIconModule,
|
MatIconModule,
|
||||||
MatInputModule,
|
MatInputModule,
|
||||||
@ -45,10 +96,11 @@ import { EditPdComponent } from './edit-pd/edit-pd.component';
|
|||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
FileUploadModule,
|
FileUploadModule,
|
||||||
TreeModule,
|
TreeModule,
|
||||||
MatDialogModule,
|
MatDialogModule,MatSortModule,
|
||||||
NgxMatSelectSearchModule
|
NgxMatSelectSearchModule,MatTooltipModule, MatDatepickerModule,
|
||||||
],
|
],
|
||||||
declarations: [AddPdComponent, ListPdComponent, EditPdComponent],
|
declarations: [AddPdComponent, ListPdComponent, EditPdComponent, ViewPdComponent, EditPdMasterComponent, EditPdApplicantComponent, PdAllocationComponent],
|
||||||
|
entryComponents: [PdAllocationComponent],
|
||||||
providers: [PdTrigerService]
|
providers: [PdTrigerService]
|
||||||
})
|
})
|
||||||
export class PdTrigerModule { }
|
export class PdTrigerModule { }
|
||||||
|
|||||||
96
ng6-seed/src/app/pd-triger/view-pd/view-pd.component.html
Normal file
96
ng6-seed/src/app/pd-triger/view-pd/view-pd.component.html
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
<div class="row" style="text-align:left;">
|
||||||
|
<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>
|
||||||
|
<div *ngIf="!showEditMasterComponent">
|
||||||
|
<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> <span>{{master.city_name}} / {{master.state_name}}-{{master.pincode}}</span></mat-card-subtitle>
|
||||||
|
|
||||||
|
</mat-card-header>
|
||||||
|
<mat-divider></mat-divider>
|
||||||
|
<mat-card-content>
|
||||||
|
<p>{{master.product_name}} / {{master.subproduct_name}}</p>
|
||||||
|
<p><span>{{master.pd_type_name}} {{master.pd_allocation_type_name}} {{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"> </i>{{master.loan_amount}}</span> <span>{{master.pd_status_name}}</span> <span>{{master.pd_date_of_initiation}}</span></p>
|
||||||
|
|
||||||
|
</mat-card-content>
|
||||||
|
</mat-card>
|
||||||
|
</div>
|
||||||
|
<app-edit-pd-master *ngIf="showEditMasterComponent" [masterChild]="editMasterData" (loadPdView)="updateViewComponent($event)"></app-edit-pd-master>
|
||||||
|
|
||||||
|
<!-- applicant card -->
|
||||||
|
<mat-card *ngIf="!showEditApplicantComponent">
|
||||||
|
<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-divider></mat-divider>
|
||||||
|
<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>
|
||||||
|
{{applicant.applicant_name}} </span> <span *ngIf="applicant.mobile_no!=null" class="mb-2 text-center hover-icon">
|
||||||
|
<i class="fa-1x fa fa-phone"></i>
|
||||||
|
{{applicant.mobile_no}} </span> <span *ngIf="applicant.applicant_type=='1';else codetails"> Main Applicant</span>
|
||||||
|
<ng-template #codetails> <span>{{applicant.relation}}</span></ng-template>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</mat-list-item>
|
||||||
|
</mat-list>
|
||||||
|
|
||||||
|
|
||||||
|
</mat-card>
|
||||||
|
<app-edit-pd-applicant *ngIf="showEditApplicantComponent" [applicantChild]="editApplicantData" (loadPdView)="updateViewComponent($event)"></app-edit-pd-applicant>
|
||||||
|
<!-- 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> {{master.city_name}} / {{master.state_name}}-{{master.pincode}}</mat-card-subtitle> -->
|
||||||
|
</mat-card-header>
|
||||||
|
<mat-divider></mat-divider>
|
||||||
|
<mat-list *ngFor="let documents of pdDocumentsData">
|
||||||
|
<mat-list-item>
|
||||||
|
<p><span>
|
||||||
|
{{documents.pd_document_title}} </span> <span class="mb-2 text-center hover-icon">
|
||||||
|
<i class="fa-1x fa fa-file"></i>
|
||||||
|
{{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>
|
||||||
|
|
||||||
|
<!-- <mat-form-field>
|
||||||
|
<input matInput [matDatepicker]="picker" placeholder="Choose a date">
|
||||||
|
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||||
|
<mat-datepicker #picker></mat-datepicker>
|
||||||
|
</mat-form-field> -->
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
.cardEdit {
|
||||||
|
display: inline;float:right;
|
||||||
|
}
|
||||||
25
ng6-seed/src/app/pd-triger/view-pd/view-pd.component.spec.ts
Normal file
25
ng6-seed/src/app/pd-triger/view-pd/view-pd.component.spec.ts
Normal 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();
|
||||||
|
});
|
||||||
|
});
|
||||||
90
ng6-seed/src/app/pd-triger/view-pd/view-pd.component.ts
Normal file
90
ng6-seed/src/app/pd-triger/view-pd/view-pd.component.ts
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
import { Component, OnInit,ViewEncapsulation, EventEmitter, Input, Output } from '@angular/core';
|
||||||
|
import { MatDialog } from '@angular/material';
|
||||||
|
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
|
||||||
|
import { NotifierService } from 'angular-notifier';
|
||||||
|
import { PdTrigerService } from '../pd-service/pd-triger.service';
|
||||||
|
import { PdAllocationComponent } from '../pd-allocation/pd-allocation.component';
|
||||||
|
@Component({
|
||||||
|
selector: 'app-view-pd',
|
||||||
|
templateUrl: './view-pd.component.html',
|
||||||
|
styleUrls: ['./view-pd.component.scss'],
|
||||||
|
encapsulation: ViewEncapsulation.None
|
||||||
|
})
|
||||||
|
export class ViewPdComponent implements OnInit {
|
||||||
|
public notifier:NotifierService;
|
||||||
|
errorMessage: any;
|
||||||
|
pdMasterData: any;
|
||||||
|
pdApplicantData: any;
|
||||||
|
pdDocumentsData: any;
|
||||||
|
pdLogsData: any;
|
||||||
|
editMasterData: any[];
|
||||||
|
editApplicantData: any[];
|
||||||
|
showEditMasterComponent: boolean;
|
||||||
|
showEditApplicantComponent: boolean;
|
||||||
|
showEditDocumentComponent: boolean;
|
||||||
|
@Input() childData: string;
|
||||||
|
@Output() loadParent = new EventEmitter<string>();
|
||||||
|
public _EditPDtriggerForm:FormGroup;
|
||||||
|
constructor(private _fb: FormBuilder,
|
||||||
|
private _pd: PdTrigerService, notifier:NotifierService, private dialog: MatDialog,) {
|
||||||
|
this.notifier=notifier
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
|
||||||
|
this.viewPdDetails(this.childData);
|
||||||
|
this.showEditMasterComponent=false;
|
||||||
|
this.showEditApplicantComponent=false;
|
||||||
|
this.showEditDocumentComponent=false;
|
||||||
|
}
|
||||||
|
viewPdDetails(editID:string){
|
||||||
|
this._pd.editPdDetails(editID).subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.pdMasterData=data.records.pd_master_details;
|
||||||
|
this.pdApplicantData= data.records.applicants_details;
|
||||||
|
this.pdDocumentsData=data.records.pd_documnets;
|
||||||
|
this.pdLogsData=data.records.pd_logs;
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
}
|
||||||
|
|
||||||
|
loadPdListCompoent() {
|
||||||
|
this.loadParent.emit('3')
|
||||||
|
}
|
||||||
|
|
||||||
|
editPdMaster(masterData:any){
|
||||||
|
this.editMasterData=masterData;
|
||||||
|
this.showEditMasterComponent=!this.showEditMasterComponent;
|
||||||
|
}
|
||||||
|
editPdApplicant(applicantData:any){
|
||||||
|
this.editApplicantData=applicantData;
|
||||||
|
this.showEditApplicantComponent=!this.showEditApplicantComponent;
|
||||||
|
}
|
||||||
|
// pd allocation to
|
||||||
|
// edit questions master details popup model
|
||||||
|
pdAllocationTo(pdID:any) {
|
||||||
|
const dialogRef = this.dialog.open(PdAllocationComponent, {
|
||||||
|
data: pdID,
|
||||||
|
disableClose: true
|
||||||
|
});
|
||||||
|
dialogRef.afterClosed()
|
||||||
|
.subscribe(dataresult => {
|
||||||
|
//this.getQuestionsMasters();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addBranch()"> + Add Branch</button>
|
<button mat-stroked-button [color]="color" (click)="addBranch()"> + Add Branch</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addCity()"> + Add City</button>
|
<button mat-stroked-button [color]="color" (click)="addCity()"> + Add City</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div *ngIf="loader">
|
<div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addCommentsOnLocality()" > + Add Comments On Locality</button>
|
<button mat-stroked-button [color]="color" (click)="addCommentsOnLocality()" > + Add Comments On Locality</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addCompany()" > + Add Company</button>
|
<button mat-stroked-button [color]="color" (click)="addCompany()" > + Add Company</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addCustomerBehaviour()" > + Add CustomerBehaviour</button>
|
<button mat-stroked-button [color]="color" (click)="addCustomerBehaviour()" > + Add CustomerBehaviour</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addCustomerSegment()" > + Add CustomerSegment</button>
|
<button mat-stroked-button [color]="color" (click)="addCustomerSegment()" > + Add CustomerSegment</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addDesignation()" > + Add Designation</button>
|
<button mat-stroked-button [color]="color" (click)="addDesignation()" > + Add Designation</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addFrequency()" > + Add Frequency</button>
|
<button mat-stroked-button [color]="color" (click)="addFrequency()" > + Add Frequency</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addIndustryClassification()" > + Add Industry Classification</button>
|
<button mat-stroked-button [color]="color" (click)="addIndustryClassification()" > + Add Industry Classification</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addLenderHierarchy()" > + Add LenderHierarchy</button>
|
<button mat-stroked-button [color]="color" (click)="addLenderHierarchy()" > + Add LenderHierarchy</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addMemberOccupation()" > + Add Member's Occupation</button>
|
<button mat-stroked-button [color]="color" (click)="addMemberOccupation()" > + Add Member's Occupation</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addPdLocationApproach()" > + Add Pd Location Approach</button>
|
<button mat-stroked-button [color]="color" (click)="addPdLocationApproach()" > + Add Pd Location Approach</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -29,6 +29,7 @@ selectedValueForLender: any;
|
|||||||
selectedValueForCity: any;
|
selectedValueForCity: any;
|
||||||
tempArray: Array<{lenderid: number, cityid: number}> = [];
|
tempArray: Array<{lenderid: number, cityid: number}> = [];
|
||||||
PDTeamMapping: any[];
|
PDTeamMapping: any[];
|
||||||
|
AllPDTeamMapData: any[];
|
||||||
PDTeamMaplen:any = 0;
|
PDTeamMaplen:any = 0;
|
||||||
|
|
||||||
|
|
||||||
@ -43,15 +44,22 @@ ngOnInit() {
|
|||||||
this.PdTeamFormDatas();
|
this.PdTeamFormDatas();
|
||||||
if(isNaN(this.data.pdteam_id)){}
|
if(isNaN(this.data.pdteam_id)){}
|
||||||
else{
|
else{
|
||||||
this._pdTeamService.getAllPdTeamMapList(this.data.pdteam_id) // note, removed this.countries =
|
this._pdTeamService.getAllPdTeamMapListWithPK(this.data.pdteam_id) // note, removed this.countries =
|
||||||
.subscribe(
|
.subscribe(
|
||||||
dataresult => {
|
dataresult => {
|
||||||
if(dataresult.dataStatus == true){
|
if(dataresult.dataStatus == true){
|
||||||
this.PDTeamMapping = dataresult.records;
|
this.PDTeamMapping = dataresult.records;
|
||||||
this.PDTeamMaplen = this.PDTeamMapping.length;
|
this.PDTeamMaplen = this.PDTeamMapping.length;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
this._pdTeamService.getAllPdTeamMapList() // note, removed this.countries =
|
||||||
|
.subscribe(
|
||||||
|
dataresult => {
|
||||||
|
if(dataresult.dataStatus == true){
|
||||||
|
this.AllPDTeamMapData = dataresult.records;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
/** For City Drop Datas*/
|
/** For City Drop Datas*/
|
||||||
this._masterService.getAllMasterData('CITY')
|
this._masterService.getAllMasterData('CITY')
|
||||||
@ -141,40 +149,56 @@ removevalue(i:number) {
|
|||||||
if (i !== -1) {
|
if (i !== -1) {
|
||||||
this.tempArray.splice(i, 1);
|
this.tempArray.splice(i, 1);
|
||||||
}
|
}
|
||||||
console.log('delete function',this.tempArray);
|
//console.log('delete function',this.tempArray);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
doSomething(){
|
doSomething(){
|
||||||
var check = 0 ;
|
var check = 0 ;
|
||||||
// console.log(this.selectedValueForLender);
|
// console.log(this._pdTeamForm.controls['fk_city_id'].value.city_id);
|
||||||
// console.log(this.selectedValueForCity);
|
// console.log(this._pdTeamForm.controls['fk_lender_id'].value.entity_id);
|
||||||
|
if((this._pdTeamForm.controls['fk_city_id'].value.city_id != '')
|
||||||
|
&&(this._pdTeamForm.controls['fk_lender_id'].value.entity_id != ''))
|
||||||
|
{
|
||||||
|
|
||||||
this.tempArray.forEach(item => {
|
this.tempArray.forEach(item => {
|
||||||
if((item.cityid['city_id'] == this._pdTeamForm.controls['fk_city_id'].value.city_id) &&
|
if((item.cityid['city_id'] == this._pdTeamForm.controls['fk_city_id'].value.city_id) &&
|
||||||
(item.lenderid['entity_id'] == this._pdTeamForm.controls['fk_lender_id'].value.entity_id))
|
(item.lenderid['entity_id'] == this._pdTeamForm.controls['fk_lender_id'].value.entity_id))
|
||||||
{
|
{
|
||||||
check++;
|
check++;
|
||||||
alert('Already Exists');
|
alert('Already Exists');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if(this.AllPDTeamMapData !== undefined){
|
||||||
|
|
||||||
|
this.AllPDTeamMapData.forEach(item => {
|
||||||
|
if(item.fk_team_id != this._pdTeamForm.controls['pdteam_id'].value){
|
||||||
|
if((item.fk_city_id == this._pdTeamForm.controls['fk_city_id'].value.city_id) &&
|
||||||
|
(item.fk_lender_id == this._pdTeamForm.controls['fk_lender_id'].value.entity_id))
|
||||||
|
{
|
||||||
|
check++;
|
||||||
|
alert('Already Exists on Other Team "'+item.team_name+'"');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if(isNaN(this.data.pdteam_id)) {}
|
if(isNaN(this.data.pdteam_id)) {}
|
||||||
else{
|
else{
|
||||||
//console.log(this.PDTeamMapping);
|
|
||||||
// console.log(this.PDTeamMapping.length);
|
// console.log(this.PDTeamMapping.length);
|
||||||
if(this.PDTeamMapping !== undefined){
|
if(this.PDTeamMapping !== undefined){
|
||||||
this.PDTeamMapping.forEach(item => {
|
this.PDTeamMapping.forEach(item => {
|
||||||
if((item.fk_city_id == this._pdTeamForm.controls['fk_city_id'].value.city_id) &&
|
if((item.fk_city_id == this._pdTeamForm.controls['fk_city_id'].value.city_id) &&
|
||||||
(item.fk_lender_id == this._pdTeamForm.controls['fk_lender_id'].value.entity_id))
|
(item.fk_lender_id == this._pdTeamForm.controls['fk_lender_id'].value.entity_id))
|
||||||
{
|
{
|
||||||
check++;
|
check++;
|
||||||
alert('Already Exists');
|
alert('Already Exists');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// this.tempArray.forEach(this.data, function (value, key) {
|
// this.tempArray.forEach(this.data, function (value, key) {
|
||||||
|
|
||||||
// if((value.cityid.city_id == this._pdTeamForm.controls['fk_city_id'].value.city_id) &&
|
// if((value.cityid.city_id == this._pdTeamForm.controls['fk_city_id'].value.city_id) &&
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addPdTeam()" > + Add PD Team</button>
|
<button mat-stroked-button [color]="color" (click)="addPdTeam()" > + Add PD Team</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addPDType()" > + Add PDType</button>
|
<button mat-stroked-button [color]="color" (click)="addPDType()" > + Add PDType</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addProductMaster()" > + Add Product</button>
|
<button mat-stroked-button [color]="color" (click)="addProductMaster()" > + Add Product</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addQuestionCategory()" > + Add Question Category</button>
|
<button mat-stroked-button [color]="color" (click)="addQuestionCategory()" > + Add Question Category</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addregions()" > + Add regions</button>
|
<button mat-stroked-button [color]="color" (click)="addregions()" > + Add regions</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
@ -96,17 +96,17 @@
|
|||||||
class="example-margin"
|
class="example-margin"
|
||||||
matTooltip="Active" matTooltipPosition="above"
|
matTooltip="Active" matTooltipPosition="above"
|
||||||
checked="true" [color]="color"
|
checked="true" [color]="color"
|
||||||
(change)="isactiveregions(row.regions_id,row.isactive)"
|
(change)="isactiveregions(row.region_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
onclick="return confirm('Are you sure?')">
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
<ng-template #notactive >
|
<ng-template #notactive >
|
||||||
<mat-slide-toggle
|
<mat-slide-toggle
|
||||||
class="example-margin"
|
class="example-margin"
|
||||||
matTooltip="Inactive" matTooltipPosition="above"
|
matTooltip="Inactive" matTooltipPosition="above"
|
||||||
checked="false" [color]="color"
|
checked="false" [color]="color"
|
||||||
(change)="isactiveregions(row.regions_id,row.isactive)"
|
(change)="isactiveregions(row.region_id,row.isactive)"
|
||||||
onclick="return confirm('Are you sure?')">
|
onclick="return confirm('Are you sure?')">
|
||||||
</mat-slide-toggle></ng-template>
|
</mat-slide-toggle></ng-template>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import { MatDialog,
|
|||||||
MatSort,
|
MatSort,
|
||||||
MatTableDataSource } from '@angular/material';
|
MatTableDataSource } from '@angular/material';
|
||||||
|
|
||||||
import 'rxjs/add/operator/map';
|
|
||||||
/** Service */
|
/** Service */
|
||||||
import { MastersService } from '../../../../service/masters/masters.service';
|
import { MastersService } from '../../../../service/masters/masters.service';
|
||||||
/** Dialog Component */
|
/** Dialog Component */
|
||||||
@ -39,22 +39,12 @@ export class RegionsListComponent implements OnInit {
|
|||||||
|
|
||||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
ngOnInit() {}
|
||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private _regionsService: MastersService) {
|
private _regionsService: MastersService) {
|
||||||
this.getregions();
|
this.getregions();
|
||||||
}
|
}
|
||||||
|
|
||||||
// get regionsList() {
|
|
||||||
// return this._regionsService.getAllregions();
|
|
||||||
// }
|
|
||||||
|
|
||||||
//dataSource = new UserDataSource(this._regionsService);
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
addregions() {
|
addregions() {
|
||||||
this.isPopupOpened = true;
|
this.isPopupOpened = true;
|
||||||
@ -78,31 +68,12 @@ this.getregions();
|
|||||||
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
this.getregions();
|
||||||
this.isPopupOpened = false;
|
this.isPopupOpened = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/** For Changing Active States., which means both Changing Active And Inactive alternatively */
|
|
||||||
isactiveregions(id: number,isactive : number) {
|
|
||||||
|
|
||||||
let ActiveDatas = isactive == 0
|
|
||||||
? { 'region_id':id,'isactive': '1'}
|
|
||||||
: { 'region_id':id,'isactive': '0'}
|
|
||||||
|
|
||||||
//this._mastersService.IsactiveMasterDetails(ActiveDatas,'BRANCH')
|
|
||||||
this._regionsService.editMasterDetails(ActiveDatas,'REGIONS')
|
|
||||||
.subscribe(dataresult=>{
|
|
||||||
if (dataresult.dataStatus == true){
|
|
||||||
//alert("my check");
|
|
||||||
this.getregions();
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
alert("SomeThing Wents Wrong Try Again !");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
//To get data for listing
|
//To get data for listing
|
||||||
getregions() {
|
getregions() {
|
||||||
this._regionsService.getAllMasterData('REGIONS').subscribe(
|
this._regionsService.getAllMasterData('REGIONS').subscribe(
|
||||||
data => {
|
data => {
|
||||||
if(data.dataStatus == true){
|
if(data.dataStatus == true){
|
||||||
@ -122,12 +93,36 @@ this.getregions();
|
|||||||
}
|
}
|
||||||
})}
|
})}
|
||||||
|
|
||||||
|
/** For Changing Active States., which means both Changing Active And Inactive alternatively */
|
||||||
|
isactiveregions(id: number,isactive : number) {
|
||||||
|
|
||||||
|
let ActiveDatas = isactive == 0
|
||||||
|
? { 'region_id':id,'isactive': '1'}
|
||||||
|
: { 'region_id':id,'isactive': '0'}
|
||||||
|
|
||||||
|
//this._mastersService.IsactiveMasterDetails(ActiveDatas,'BRANCH')
|
||||||
|
this._regionsService.editMasterDetails(ActiveDatas,'REGIONS')
|
||||||
|
.subscribe(dataresult=>{
|
||||||
|
|
||||||
|
|
||||||
|
if (dataresult.dataStatus == true){
|
||||||
|
|
||||||
|
this.getregions();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
alert("SomeThing Wents Wrong Try Again !");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
deleteregions(id: number) {
|
deleteregions(id: number) {
|
||||||
var PrimaryKeyWithValue ={'region_id':id};
|
var PrimaryKeyWithValue ={'region_id':id};
|
||||||
this._regionsService.deleteMasterDetails(PrimaryKeyWithValue,'REGIONS').subscribe( data => { });
|
this._regionsService.deleteMasterDetails(PrimaryKeyWithValue,'REGIONS').subscribe( data => { });
|
||||||
this.getregions();
|
this.getregions();
|
||||||
//this._regionsService.deleteMasterDetails('region_id',id,'REGIONS');
|
//this._regionsService.deleteMasterDetails('region_id',id,'REGIONS');
|
||||||
}
|
}
|
||||||
|
|
||||||
/** For Display Tables Pagination And Sorting */
|
/** For Display Tables Pagination And Sorting */
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.dataSource.paginator = this.paginator;
|
this.dataSource.paginator = this.paginator;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addRelationShip()" > + Add Relation ship</button>
|
<button mat-stroked-button [color]="color" (click)="addRelationShip()" > + Add Relation ship</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button color="primary" (click)="addState()" > + Add State</button>
|
<button mat-stroked-button color="primary" (click)="addState()" > + Add State</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addSubProductMaster()" > + Add Sub Product</button>
|
<button mat-stroked-button [color]="color" (click)="addSubProductMaster()" > + Add Sub Product</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addTitle()" > + Add Title</button>
|
<button mat-stroked-button [color]="color" (click)="addTitle()" > + Add Title</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addActivity()" > + Add Activity</button>
|
<button mat-stroked-button [color]="color" (click)="addActivity()" > + Add Activity</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;">
|
<div style="text-align: right;">
|
||||||
<button mat-raised-button [color]="color" (click)="addUOM()" > + Add UOM</button>
|
<button mat-stroked-button [color]="color" (click)="addUOM()" > + Add UOM</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<!-- <div *ngIf="loader">
|
<!-- <div *ngIf="loader">
|
||||||
|
|||||||
@ -66,7 +66,7 @@ return this._http.post<any>(this.apiUrl+"saveMaster", ArrayData)
|
|||||||
* 2nd argument is "MasterName" :string - Table Name
|
* 2nd argument is "MasterName" :string - Table Name
|
||||||
*/
|
*/
|
||||||
editMasterDetails(Records: any,MasterName:string): Observable<any> {
|
editMasterDetails(Records: any,MasterName:string): Observable<any> {
|
||||||
|
console.log('Service Data',Records);
|
||||||
Records.fk_updatedby = this._aws.getlocale();//to get user id for who is update the record
|
Records.fk_updatedby = this._aws.getlocale();//to get user id for who is update the record
|
||||||
Records.updatedon = currentdate;//to get Current date and Time for when the Record is updated
|
Records.updatedon = currentdate;//to get Current date and Time for when the Record is updated
|
||||||
|
|
||||||
|
|||||||
@ -143,12 +143,12 @@ return this._http.post<any>(this.apiUrl+"savePDTeam", ArrayData)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Get All PD Team Child Data using API call With master Keyword */
|
/** Get All PD Team Child Data using API call Based on Primary Key */
|
||||||
getAllPdTeamMapList(Primarykey): Observable<any> {
|
getAllPdTeamMapListWithPK(Primarykey): Observable<any> {
|
||||||
var pk = { "primary_key":Primarykey }
|
var pk = { "primary_key":Primarykey }
|
||||||
|
|
||||||
//var Primar = Primarykey
|
//var Primar = Primarykey
|
||||||
//console.log('FromServiceArrayData',ArrayData);
|
//console.log('FromServiceArrayData',ArrayData);
|
||||||
|
|
||||||
return this._http.post<any>(this.apiUrl+'getListOfPDTeamMap',pk)
|
return this._http.post<any>(this.apiUrl+'getListOfPDTeamMap',pk)
|
||||||
.pipe(
|
.pipe(
|
||||||
@ -156,6 +156,14 @@ return this._http.post<any>(this.apiUrl+"savePDTeam", ArrayData)
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Get All PD Team Child Data using API call */
|
||||||
|
getAllPdTeamMapList(): Observable<any> {
|
||||||
|
|
||||||
|
return this._http.post<any>(this.apiUrl+'getListOfPDTeamMap','')
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('role', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user