changes : ps

This commit is contained in:
venbatechnologies@gmail.com 2019-01-21 23:36:46 +05:30
parent fda7d9028d
commit 216ca42eca
6 changed files with 155 additions and 166 deletions

View File

@ -22,7 +22,8 @@
<mat-option> <mat-option>
Select Select
</mat-option> </mat-option>
<mat-option *ngFor="let LL of lenderList" [value]="LL.entity_id" > <!-- <mat-option *ngFor="let LL of lenderList" [value]="LL.entity_id" > -->
<mat-option (click)="selectedLender(LL)" *ngFor="let LL of lenderList" [value]="LL.entity_id" >
{{LL.full_name}} {{LL.full_name}}
</mat-option> </mat-option>
</mat-select> </mat-select>
@ -49,6 +50,17 @@
<input matInput placeholder="LandLine Number" formControlName="lender_landline" type="text" (keypress)="keyPress($event)"> <input matInput placeholder="LandLine Number" formControlName="lender_landline" type="text" (keypress)="keyPress($event)">
<mat-error *ngIf="pdMain.lender_landline.hasError('maxlength') || pdMain.lender_landline.hasError('minlength')">Enter Valid Landline Number. </mat-error> <mat-error *ngIf="pdMain.lender_landline.hasError('maxlength') || pdMain.lender_landline.hasError('minlength')">Enter Valid Landline Number. </mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 21.5%">
<mat-select placeholder="Branch" formControlName="pd_branch_id">
<!-- (selectionChange)="getBillingDetails(pdMain.fk_lender_id.value)" -->
<mat-option>
Select
</mat-option>
<mat-option *ngFor="let LB of lenderBranchList" [value]="LB.entity_lender_branch_id" >
{{LB.branch_name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width: 29%"> <mat-form-field style="width: 29%">
<mat-select placeholder="Product Name" formControlName="fk_product_id" (selectionChange)="getSubproductList(pdMain.fk_product_id.value)"> <mat-select placeholder="Product Name" formControlName="fk_product_id" (selectionChange)="getSubproductList(pdMain.fk_product_id.value)">
<mat-option> <mat-option>
@ -152,8 +164,9 @@
</mat-form-field> </mat-form-field>
</div> </div>
<div fxFlex="30" align="end"> <div fxFlex="30" align="end">
<button *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" (click)="saveDraftPD(this._EditPDtriggerForm.value,pdStatusCheck.DRAFT)" type="button" matTooltip="Save As Draft" matTooltipPosition="above"><mat-icon>insert_drive_file</mat-icon></button> <!-- <button *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" (click)="saveDraftPD(this._EditPDtriggerForm.value,pdStatusCheck.DRAFT)" type="button" matTooltip="Save As Draft" matTooltipPosition="above"><mat-icon>insert_drive_file</mat-icon></button> -->
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Trigger PD" matTooltipPosition="above" type="button" (click)="triggerPD(_EditPDtriggerForm.value, pdStatusCheck.TRIGGERED)"><mat-icon>save</mat-icon></button> <!-- <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Trigger PD" matTooltipPosition="above" type="button" (click)="triggerPD(_EditPDtriggerForm.value, pdStatusCheck.TRIGGERED)"><mat-icon>save</mat-icon></button> -->
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Trigger PD" matTooltipPosition="above" type="button" (click)="triggerPD(_EditPDtriggerForm.value, '')"><mat-icon>save</mat-icon></button>
</div> </div>
</mat-dialog-actions> </mat-dialog-actions>

View File

@ -21,6 +21,7 @@ export class EditPdMasterComponent implements OnInit {
cityList:any; cityList:any;
pdTypeList:any; pdTypeList:any;
billingList:any; billingList:any;
lenderBranchList: any;
pincodeList: any = []; pincodeList: any = [];
applicantLength:number; applicantLength:number;
// draftStatus: string; // draftStatus: string;
@ -66,10 +67,20 @@ export class EditPdMasterComponent implements OnInit {
this._pd.getLenderDetails().subscribe( this._pd.getLenderDetails().subscribe(
data => { data => {
if (data.status == 200) { if (data.status == 200) {
this.lenderList=data.records this.lenderList=data.records;
let x = this.lenderList.filter(item => item.entity_id == this.data.records.fk_lender_id)
this.lenderBranchList = x[0]['branches'];
} }
}, error => this.errorMessage = <any> error); }, error => this.errorMessage = <any> error);
} }
selectedLender(lender){
// console.log(JSON.stringify(lender));
// alert(JSON.stringify(lender['branches ']));
this.lenderBranchList = lender['branches'];
// console.log(this.lenderBranchList);
this._EditPDtriggerForm.controls.pd_branch_id.setValue(null);
}
getProductsList(){ getProductsList(){
this._pd.getProductsDetails().subscribe( this._pd.getProductsDetails().subscribe(
data => { data => {
@ -122,7 +133,7 @@ export class EditPdMasterComponent implements OnInit {
} }
loadFormData() { loadFormData() {
console.log('this.data.record',this.data.records); // console.log('this.data.record',this.data.records);
let stdcode; let stdcode;
let landline; let landline;
if(this.data.records.pd_contact_landline){ if(this.data.records.pd_contact_landline){
@ -143,6 +154,7 @@ export class EditPdMasterComponent implements OnInit {
pd_id: [this.data.records.pd_id], pd_id: [this.data.records.pd_id],
fk_lender_id: [this.data.records.fk_lender_id, Validators.compose([Validators.required])], fk_lender_id: [this.data.records.fk_lender_id, Validators.compose([Validators.required])],
lender_applicant_id: [this.data.records.lender_applicant_id, Validators.compose([Validators.required])], lender_applicant_id: [this.data.records.lender_applicant_id, Validators.compose([Validators.required])],
pd_branch_id:[this.data.records.pd_branch_id, Validators.compose([Validators.required])],
pd_contact_person: [this.data.records.pd_contact_person, Validators.compose([Validators.required])], pd_contact_person: [this.data.records.pd_contact_person, Validators.compose([Validators.required])],
pd_contact_mobileno: [this.data.records.pd_contact_mobileno, Validators.compose([Validators.minLength(10),Validators.maxLength(12),Validators.pattern('^[0-9]*$')])], pd_contact_mobileno: [this.data.records.pd_contact_mobileno, Validators.compose([Validators.minLength(10),Validators.maxLength(12),Validators.pattern('^[0-9]*$')])],
lender_stdcode: [stdcode, Validators.compose([Validators.minLength(3),Validators.maxLength(5)])], lender_stdcode: [stdcode, Validators.compose([Validators.minLength(3),Validators.maxLength(5)])],
@ -269,7 +281,8 @@ export class EditPdMasterComponent implements OnInit {
} }
submitPdDetails(formValue: any, status:string) { submitPdDetails(formValue: any, status:string) {
let updateStatus = this.currentPDStatus == this.pdStatusCheck.DRAFT ? status : this.currentPDStatus == this.pdStatusCheck.TRIGGERED ? status : this.currentPDStatus; // let updateStatus = this.currentPDStatus == this.pdStatusCheck.DRAFT ? status : this.currentPDStatus == this.pdStatusCheck.TRIGGERED ? status : this.currentPDStatus;
let updateStatus = this.currentPDStatus;
if(this._EditPDtriggerForm.invalid) { if(this._EditPDtriggerForm.invalid) {
this.validateAllFormFields(this._EditPDtriggerForm); this.validateAllFormFields(this._EditPDtriggerForm);
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!'); this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
@ -301,6 +314,7 @@ export class EditPdMasterComponent implements OnInit {
"pd_id": my_array.pd_id, "pd_id": my_array.pd_id,
"fk_lender_id": my_array.fk_lender_id, "fk_lender_id": my_array.fk_lender_id,
"lender_applicant_id": my_array.lender_applicant_id, "lender_applicant_id": my_array.lender_applicant_id,
"pd_branch_id":my_array.pd_branch_id,
"pd_contact_person": my_array.pd_contact_person, "pd_contact_person": my_array.pd_contact_person,
"pd_contact_mobileno": my_array.pd_contact_mobileno, "pd_contact_mobileno": my_array.pd_contact_mobileno,
"pd_contact_landline": concat_landline, "pd_contact_landline": concat_landline,
@ -316,7 +330,7 @@ export class EditPdMasterComponent implements OnInit {
"remarks": my_array.remarks, "remarks": my_array.remarks,
} }
console.log(lenderMasterArray); // console.log(lenderMasterArray);
this._pd.editPdMasterDetails(lenderMasterArray, updateStatus).subscribe(result => { this._pd.editPdMasterDetails(lenderMasterArray, updateStatus).subscribe(result => {
if (result.status == 200) { if (result.status == 200) {
this.notifier.notify('success', 'PD Details Updated.'); this.notifier.notify('success', 'PD Details Updated.');

View File

@ -86,7 +86,6 @@
<mat-accordion <mat-accordion
*ngFor="let itemrow of bankingForm.controls.itemRows['controls']; let i=index;let last=last" *ngFor="let itemrow of bankingForm.controls.itemRows['controls']; let i=index;let last=last"
[formGroupName]="i"> [formGroupName]="i">
<!-- {{bankingForm.controls.itemRows['controls']}} -->
<mat-expansion-panel class="banlFields" [expanded]="step == i"> <mat-expansion-panel class="banlFields" [expanded]="step == i">
<mat-expansion-panel-header> <mat-expansion-panel-header>
<mat-panel-title> <mat-panel-title>
@ -103,24 +102,10 @@
</mat-optgroup> </mat-optgroup>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<!-- <mat-select placeholder="Account Name" formControlName="applicant_name" (selectionChange)="selectedBorrower($event.value,i)">
<mat-option value="{{owner.pd_co_applicant_id}}" *ngFor="let owner of applicants">{{owner.applicant_name}}</mat-option>
</mat-select> --
!-- <mat-form-field *ngIf="itemrow.get('applicant_name').value == 0"> --
!-- <mat-form-field *ngIf="this.OtherFlag[i]"> -->
<mat-form-field *ngIf="checkOthers(itemrow.get('applicant_name').value)===true" style="width:45%"> <mat-form-field *ngIf="checkOthers(itemrow.get('applicant_name').value)===true" style="width:45%">
<input matInput placeholder="Specify Applicant Name" formControlName="other_applicant" autocomplete="off"> <input matInput placeholder="Specify Applicant Name" formControlName="other_applicant" autocomplete="off">
</mat-form-field> </mat-form-field>
<!-- <mat-form-field>
<input matInput placeholder="Applicant Name"
formControlName="applicant_name">
</mat-form-field> -->
<!-- <mat-form-field>
<input matInput placeholder="Bank Name" formControlName="bank_name" >
</mat-form-field> -->
<mat-form-field> <mat-form-field>
<mat-select placeholder="Bank Name" formControlName="bank_name" > <mat-select placeholder="Bank Name" formControlName="bank_name" >
<mat-option *ngFor="let btLen of m_btLenderList" [value]="btLen.bt_lender_list_id">{{ btLen.lender_name }}</mat-option> <mat-option *ngFor="let btLen of m_btLenderList" [value]="btLen.bt_lender_list_id">{{ btLen.lender_name }}</mat-option>
@ -136,14 +121,6 @@
<mat-select (selectionChange)="selectedAccTypeChanges($event.value,i)" placeholder="Account Type" formControlName="account_type" > <mat-select (selectionChange)="selectedAccTypeChanges($event.value,i)" placeholder="Account Type" formControlName="account_type" >
<mat-option *ngFor="let prop of m_accountType" [value]="prop.id">{{ prop.name }}</mat-option> <mat-option *ngFor="let prop of m_accountType" [value]="prop.id">{{ prop.name }}</mat-option>
</mat-select> </mat-select>
<!--<mat-select placeholder="Account Type"
formControlName="account_type">
<mat-option value="Savings">Savings</mat-option>
<mat-option value="Current">Current</mat-option>
<mat-option value="OD">OD</mat-option>
<mat-option value="CC">CC</mat-option>
</mat-select>-->
</mat-form-field> </mat-form-field>
<mat-form-field *ngIf="pd_cus_segment!='SAL'"> <mat-form-field *ngIf="pd_cus_segment!='SAL'">
@ -170,10 +147,6 @@
<mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('limit').value != ''">{{"&#8377;"}} {{amtInwords[i]}} Only</mat-hint> <mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('limit').value != ''">{{"&#8377;"}} {{amtInwords[i]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
</div> </div>
<!-- <mat-form-field>
<input matInput placeholder="Approximate Vintage"
formControlName="vintage" >
</mat-form-field>-->
<div> <div>
<label>Number of Years / Months since account was started</label> <label>Number of Years / Months since account was started</label>
<br> <br>
@ -186,14 +159,13 @@
</mat-form-field> </mat-form-field>
</div> </div>
</div> </div>
<mat-action-row> <mat-action-row>
<button type="button" mat-flat-button (click)="addBankdetails(i, $event)" <button type="button" mat-button (click)="addBankdetails(i, $event)" color="accent"
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last"> matTooltip="Add More" matTooltipPosition="left" *ngIf="last">
<strong>Add More Banking Details</strong> <strong>Add More Banking Details</strong>
</button> </button>
<button type="button" mat-flat-button (click)="deleteBankdetails(i)" <button type="button" mat-button (click)="deleteBankdetails(i)" color="warn"
matTooltip="Delete"matTooltipPosition="left" color="primary" *ngIf="!last"> matTooltip="Delete"matTooltipPosition="left" *ngIf="!last">
<strong>Delete Banking Details</strong> <strong>Delete Banking Details</strong>
</button> </button>

View File

@ -19,7 +19,6 @@
<mat-card> <mat-card>
<mat-card> <mat-card>
<mat-card-content class="matcard"> <mat-card-content class="matcard">
<!-- <div fxLayout="row wrap"> -->
<mat-form-field style="width: 64%"> <mat-form-field style="width: 64%">
<input matInput placeholder="Loan Amount Applied for ? " formControlName="loan_amount" (keypress)="keyPress($event)" (keyup)="inWords($event,1)" (change)="loanCalc()" autocomplete="off"> <input matInput placeholder="Loan Amount Applied for ? " formControlName="loan_amount" (keypress)="keyPress($event)" (keyup)="inWords($event,1)" (change)="loanCalc()" autocomplete="off">
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"&#8377;"}} {{loanAmtInWords}} Only</mat-hint> <mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"&#8377;"}} {{loanAmtInWords}} Only</mat-hint>
@ -94,21 +93,7 @@
<input matInput placeholder="Specify Other Sources" formControlName="other_source" autocomplete="off"> <input matInput placeholder="Specify Other Sources" formControlName="other_source" autocomplete="off">
</mat-form-field> </mat-form-field>
</span>
<!--<mat-form-field>
<mat-select placeholder="Source"
formControlName="source">
<mat-option value="borrowed">Borrowed from Relatives & Friends</mat-option>
<mat-option value="own_money">Own money</mat-option>
<mat-option value="other">Loan from another lender</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="loanDetailsForm.controls['source'].value =='other'" style="width: 35%">
<input matInput placeholder="Specify Lender Name and Type" formControlName="lender_name_type" autocomplete="off">
</mat-form-field>-->
</span>
<mat-form-field style="width: 64%"> <mat-form-field style="width: 64%">
@ -117,89 +102,57 @@
</mat-form-field> </mat-form-field>
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>
<!-- <div *ngIf="productAbbr === 'HL' || productAbbr === 'LL' || productAbbr === 'LAP' "> --> <!-- <div *ngIf="productAbbr === 'HL' || productAbbr === 'LL' || productAbbr === 'LAP' "> -->
<mat-card *ngIf="mortageCardAccess"> <mat-card *ngIf="mortageCardAccess">
<mat-card-header><p>Details of Property being Mortgaged</p></mat-card-header> <mat-card-header><p>Details of Property being Mortgaged</p></mat-card-header>
<mat-card-content class="matcard"> <mat-card-content class="matcard">
<mat-form-field> <mat-form-field>
<mat-select placeholder="Type of Property" formControlName="property_type" (selectionChange)="mortage_type($event.value)" > <mat-select placeholder="Type of Property" formControlName="property_type" (selectionChange)="mortage_type($event.value)" >
<mat-option *ngFor="let typeprop of m_mortageTypeProperty" [value]="typeprop.mortage_property_id">{{ typeprop.property_name }}</mat-option> <mat-option *ngFor="let typeprop of m_mortageTypeProperty" [value]="typeprop.mortage_property_id">{{ typeprop.property_name }}</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<!--<mat-select placeholder="Type of property" formControlName="property_type">
<mat-option value="bungalow">Bungalow</mat-option>
<mat-option value="flat">Flat</mat-option>
<mat-option value="row_house">Row House</mat-option>
<mat-option value="floor">Floor</mat-option>
<mat-option value="chawl">Chawl</mat-option>
<mat-option value="shed">Shed</mat-option>
<mat-option value="office">Office</mat-option>
<mat-option value="shop_in_market">Shop in a market</mat-option>
<mat-option value="shop_in_mall">shop in a mall</mat-option>
<mat-option value="standalone_shop">standalone shop</mat-option>
<mat-option value="clinic">clinic</mat-option>
<mat-option value="factory">Factory</mat-option>
<mat-option value="vacant_land">Vacant Land</mat-option>
<mat-option value="others">Others</mat-option>
</mat-select>-->
{{CompanyApplicantGroupList2 | json}}
<mat-form-field *ngIf="mortageAccess">
<input matInput placeholder="Specify Type of Property" formControlName="property_type_others" autocomplete="off">
</mat-form-field>
<mat-form-field>
<mat-select multiple placeholder="Name of Owner"
formControlName="owner_name">
<mat-option *ngFor="let status of applicants" [value]="status.pd_co_applicant_id">{{ status.applicant_name }}</mat-option> <mat-form-field *ngIf="mortageAccess">
<input matInput placeholder="Specify Type of Property" formControlName="property_type_others" autocomplete="off">
</mat-form-field>
<mat-form-field>
<mat-select multiple placeholder="Name of Owner"
formControlName="owner_name">
<mat-option *ngFor="let status of applicants" [value]="status.pd_co_applicant_id">{{ status.applicant_name }}</mat-option>
<!-- *ngFor='let data of dataValues' -->
<!-- <mat-optgroup *ngFor="let GROUP of CompanyApplicantGroupList2" [label]="GROUP.groupName">
<mat-option value="owner" *ngFor="let owner of GROUP.groupValues">{{owner.name}}</mat-option>
</mat-optgroup> -->
</mat-select>
<!-- <mat-select placeholder="Name of Owner" formControlName="owner_name">
<mat-optgroup *ngFor="let group of CompanyApplicantGroupList" [label]="group.groupName">
<mat-option *ngFor="let val of group.groupValues" [value]="val">
{{val.name}}
</mat-option>
</mat-optgroup>
</mat-select> -->
</mat-form-field>
<!-- <mat-form-field *ngIf="checkOthers(sup.get('business_name_of_the_owner').value)===true">
<input matInput placeholder="Specify Other Owner Name" formControlName="other_owners_name" autocomplete="off">
</mat-form-field> -->
<mat-form-field>
<mat-select placeholder="Status of Construction" formControlName="construction_status" >
<mat-option *ngFor="let status of m_statusofCunstruction" [value]="status.id">{{ status.name }}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:50%">
<input matInput placeholder="Estimate Market Value as Per Customer"
formControlName="emv_per_customer" (keypress)="keyPress($event)" (keyup)="inWords($event,7)" autocomplete="off">
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['emv_per_customer'].value != ''">{{"&#8377;"}} {{emvAmtInWords}} Only</mat-hint>
</mat-form-field>
<!-- *ngFor='let data of dataValues' --> </mat-card-content>
<!-- <mat-optgroup *ngFor="let GROUP of CompanyApplicantGroupList2" [label]="GROUP.groupName">
<mat-option value="owner" *ngFor="let owner of GROUP.groupValues">{{owner.name}}</mat-option>
</mat-optgroup> -->
</mat-select>
<!-- <mat-select placeholder="Name of Owner" formControlName="owner_name">
<mat-optgroup *ngFor="let group of CompanyApplicantGroupList" [label]="group.groupName">
<mat-option *ngFor="let val of group.groupValues" [value]="val">
{{val.name}}
</mat-option>
</mat-optgroup>
</mat-select> -->
</mat-form-field>
<!-- <mat-form-field *ngIf="checkOthers(sup.get('business_name_of_the_owner').value)===true">
<input matInput placeholder="Specify Other Owner Name" formControlName="other_owners_name" autocomplete="off">
</mat-form-field> -->
<mat-form-field>
<mat-select placeholder="Status of Construction" formControlName="construction_status" >
<mat-option *ngFor="let status of m_statusofCunstruction" [value]="status.id">{{ status.name }}</mat-option>
</mat-select>
</mat-form-field>
<!-- <mat-form-field *ngIf="loanDetailsForm.controls['construction_status'].value == 4">
<input matInput placeholder="What is the approximate stage of construction (%)?"
formControlName="percentage_of_construction" (keypress)="keyPress($event)">
</mat-form-field> -->
<!--<mat-select placeholder="Status of construction"
formControlName="construction_status">
<mat-option value="other_purpose">Under-construction</mat-option>
<mat-option value="other_purpose">Complete</mat-option>
<mat-option value="other_purpose">Vacant Land</mat-option>
</mat-select>-->
<mat-form-field style="width:50%">
<input matInput placeholder="Estimate Market Value as Per Customer"
formControlName="emv_per_customer" (keypress)="keyPress($event)" (keyup)="inWords($event,7)" autocomplete="off">
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['emv_per_customer'].value != ''">{{"&#8377;"}} {{emvAmtInWords}} Only</mat-hint>
</mat-form-field>
<!-- <mat-form-field>
<input matInput placeholder="Value as Per Agreement"
formControlName="value_per_agreement" (keypress)="keyPress($event)" (keyup)="inWords($event,3)">
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"&#8377;"}} {{valAsPerAgmtInWords}} Only</mat-hint>
</mat-form-field> -->
</mat-card-content>
</mat-card> </mat-card>
</mat-card> </mat-card>
</div> </div>

View File

@ -21,6 +21,7 @@
<span *ngIf="master.pd_status==pdStatusCheck.QC_COMPLETED " style="text-align:left">QC Completed</span> <span *ngIf="master.pd_status==pdStatusCheck.QC_COMPLETED " style="text-align:left">QC Completed</span>
</button>&nbsp;&nbsp; </button>&nbsp;&nbsp;
<button *ngIf="currentPDStatus==pdStatusCheck.DRAFT" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger" matTooltipPosition="above" (click)="directTriggerPD(mandatoryFieldsValidations,master)"><mat-icon>flash_on</mat-icon></button> <button *ngIf="currentPDStatus==pdStatusCheck.DRAFT" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger" matTooltipPosition="above" (click)="directTriggerPD(mandatoryFieldsValidations,master)"><mat-icon>flash_on</mat-icon></button>
<!-- <button *ngIf="currentPDStatus==pdStatusCheck.DRAFT && mandatoryFieldsValidations.length==0" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger" matTooltipPosition="above" (click)="directTriggerPD(mandatoryFieldsValidations,master.pd_id)"><mat-icon>flash_on</mat-icon></button> -->
<br> <br>
<small *ngIf="master.pd_allocated_to && master.fk_pd_type==1" style="text-align:left" matTooltip="PD Officer" matTooltipPosition="above">{{master.pd_allocated_to | titlecase}}</small> <small *ngIf="master.pd_allocated_to && master.fk_pd_type==1" style="text-align:left" matTooltip="PD Officer" matTooltipPosition="above">{{master.pd_allocated_to | titlecase}}</small>
<small *ngIf="master.executive_name && master.centralofficer && master.fk_pd_type==2" style="text-align:left" matTooltip="PD Officer" matTooltipPosition="above">{{master.executive_name | titlecase}}/{{master.centralofficer | titlecase}}</small> <small *ngIf="master.executive_name && master.centralofficer && master.fk_pd_type==2" style="text-align:left" matTooltip="PD Officer" matTooltipPosition="above">{{master.executive_name | titlecase}}/{{master.centralofficer | titlecase}}</small>
@ -48,6 +49,8 @@
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master)"><mat-icon>schedule</mat-icon></button> <button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master)"><mat-icon>schedule</mat-icon></button>
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.TRIGGERED && currentPDStatus!=pdStatusCheck.DRAFT && enableStartPD" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(viewID)"><mat-icon>question_answer</mat-icon></button> <button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.TRIGGERED && currentPDStatus!=pdStatusCheck.DRAFT && enableStartPD" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(viewID)"><mat-icon>question_answer</mat-icon></button>
<button *ngIf="master.pd_type_name && currentPDStatus===pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above" (click)="getPDIDReport(viewID)"><mat-icon>ballot</mat-icon></button> <button *ngIf="master.pd_type_name && currentPDStatus===pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above" (click)="getPDIDReport(viewID)"><mat-icon>ballot</mat-icon></button>
<!-- {{master | json}} -->
</span> </span>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" (click)="loadPdListCompoent()"><mat-icon>close</mat-icon></button> <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" (click)="loadPdListCompoent()"><mat-icon>close</mat-icon></button>
</div> </div>
@ -91,7 +94,8 @@
<div fxLayout="row"> <div fxLayout="row">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center"> <div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
<div fxFlex="10"> <div fxFlex="10">
<span><i class="fa-1x fa fa-map-marker" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i></span> <!-- <span><i class="fa-1x fa fa-map-marker" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i></span> -->
<span><i class="fa-1x fa fa-map-marker" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;" (click)="Maponclick(master)"></i></span>
</div> </div>
<div fxFlex="90"> <div fxFlex="90">
<span *ngIf="master.state_name" class="hover-icon"> {{master.addressline1}},<br> {{master.city_name}},<br>{{master.state_name}}-{{master.pincode}} </span> <span *ngIf="master.state_name" class="hover-icon"> {{master.addressline1}},<br> {{master.city_name}},<br>{{master.state_name}}-{{master.pincode}} </span>

View File

@ -48,7 +48,8 @@ export class ViewPdComponent implements OnInit, OnDestroy {
{'backEnd_FieldName':"pd_contact_person",'frontEnd_FieldName':"Lender Contact Person"}, {'backEnd_FieldName':"pd_contact_person",'frontEnd_FieldName':"Lender Contact Person"},
{'backEnd_FieldName':"pd_contact_mobileno",'frontEnd_FieldName':"Lender's Mobile Number"}, {'backEnd_FieldName':"pd_contact_mobileno",'frontEnd_FieldName':"Lender's Mobile Number"},
{'backEnd_FieldName':"pd_branch_id",'frontEnd_FieldName':"Branch"}, {'backEnd_FieldName':"pd_branch_id",'frontEnd_FieldName':"Branch"},
{'backEnd_FieldName':"pd_contact_landline",'frontEnd_FieldName':"Lender's Landline Number"}]; {'backEnd_FieldName':"pd_contact_landline",'frontEnd_FieldName':"Lender's Landline Number"},
{'backEnd_FieldName':"main_applicant",'frontEnd_FieldName':"Applicant Master"}];
// localMandatoryFields: any= // localMandatoryFields: any=
// ['fk_lender_id', // ['fk_lender_id',
// 'lender_applicant_id', // 'lender_applicant_id',
@ -122,6 +123,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
pd_QC_Rating: Number; pd_QC_Rating: Number;
viewPdDetails(editID:string){ viewPdDetails(editID:string){
this.pdMasterData = [];
this._pd.editPdDetails(editID).subscribe( this._pd.editPdDetails(editID).subscribe(
data => { data => {
if (data.status == 200) { if (data.status == 200) {
@ -161,6 +163,12 @@ export class ViewPdComponent implements OnInit, OnDestroy {
this.ListPdComponent.pdListLoad(true); this.ListPdComponent.pdListLoad(true);
} }
Maponclick(master : any){
let url = "https://www.google.com/maps/place/"
let concat_url = url+master.addressline1+'/'+master.city_name+','+master.pincode+','+master.state_name;
window.open(concat_url,'_blank');
}
editPdMaster(masterData:any){ editPdMaster(masterData:any){
let record = { let record = {
"records":masterData, "records":masterData,
@ -179,7 +187,8 @@ export class ViewPdComponent implements OnInit, OnDestroy {
this.FilteredFieldNames.forEach(field => { this.FilteredFieldNames.forEach(field => {
ffd.push(field.frontEnd_FieldName); ffd.push(field.frontEnd_FieldName);
}); });
this.notifier.notify('info', 'Please Fill ' + ffd.join(',') + ' are Fields.!'); // this.notifier.notify('info', 'Please Fill ' + ffd.join(',') + ' are Fields.!');
this.notifier.notify('warn', 'Please Fill ' + ffd.join(' , ') + ' Fields.!');
} }
}); });
dialogPDMaster.afterClosed().subscribe(dataresult => { dialogPDMaster.afterClosed().subscribe(dataresult => {
@ -294,43 +303,67 @@ export class ViewPdComponent implements OnInit, OnDestroy {
this.router.navigate([ '../../pdRecord',pdID], { relativeTo: this.route }); this.router.navigate([ '../../pdRecord',pdID], { relativeTo: this.route });
} }
// // direct trigger the pd
// directTriggerPD(data: any,masterdetail : any){
// let pdid = masterdetail.pd_id;
// if(data.length>0){
// let getValues = data.filter(val =>val).map(Val => Val);
// this.FilteredFieldNames = getValues.map(x => {
// let findIndex = this.localMandatoryFields.map(val => val.backEnd_FieldName).indexOf(x);
// return this.localMandatoryFields[findIndex];
// });
// this.localcount = 1;
// this.editPdMaster(masterdetail);
// }
// else {
// let lenderMasterArray = {
// "pd_id": pdid,
// }
// this._pd.editPdMasterDetails(lenderMasterArray, this.pdStatusCheck.TRIGGERED).subscribe(result => {
// if (result.status == 200) {
// this.notifier.notify('success', 'PD Status Updated.');
// this.viewPdDetails(this.viewID);
// }
// else {
// this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
// }//else
// }, error => {
// this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
// });//error closed
// }
// }
// direct trigger the pd // direct trigger the pd
directTriggerPD(data: any,masterdetail : any){ directTriggerPD(data: any,masterdetail : any){
/** */
let pdid = masterdetail.pd_id;
let getValues = data.filter(val =>val).map(Val => Val);
this.FilteredFieldNames = getValues.map(x => {
let findIndex = this.localMandatoryFields.map(val => val.backEnd_FieldName).indexOf(x);
return this.localMandatoryFields[findIndex];
});
let pdid = masterdetail.pd_id;
let getValues = data.filter(val =>val).map(Val => Val);
this.FilteredFieldNames = getValues.map(x => {
let findIndex = this.localMandatoryFields.map(val => val.backEnd_FieldName).indexOf(x);
return this.localMandatoryFields[findIndex];
});
if(data.length>0){ if(data.length>0){
this.localcount = 1;
// FilteredFieldNames.forEach(field => { this.editPdMaster(masterdetail);
// });
this.localcount = 1;
this.editPdMaster(masterdetail);
// alert(this.localMandatoryFields);
} }
else { else {
let lenderMasterArray = { let lenderMasterArray = {"pd_id": pdid}
"pd_id": pdid,
}
this._pd.editPdMasterDetails(lenderMasterArray, this.pdStatusCheck.TRIGGERED).subscribe(result => { this._pd.editPdMasterDetails(lenderMasterArray, this.pdStatusCheck.TRIGGERED).subscribe(result => {
if (result.status == 200) { if (result.status == 200) {
this.notifier.notify('success', 'PD Status Updated.'); this.notifier.notify('success', 'PD Status Updated.');
this.viewPdDetails(this.viewID); this.viewPdDetails(this.viewID);
} }
else { else {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
}//else }
}, error => { }, error => {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
});//error closed });
} }
} }