changes : ps
This commit is contained in:
parent
fda7d9028d
commit
216ca42eca
@ -22,7 +22,8 @@
|
||||
<mat-option>
|
||||
Select
|
||||
</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}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
@ -49,6 +50,17 @@
|
||||
<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-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-select placeholder="Product Name" formControlName="fk_product_id" (selectionChange)="getSubproductList(pdMain.fk_product_id.value)">
|
||||
<mat-option>
|
||||
@ -152,8 +164,9 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<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 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 *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, '')"><mat-icon>save</mat-icon></button>
|
||||
</div>
|
||||
</mat-dialog-actions>
|
||||
|
||||
|
||||
@ -21,6 +21,7 @@ export class EditPdMasterComponent implements OnInit {
|
||||
cityList:any;
|
||||
pdTypeList:any;
|
||||
billingList:any;
|
||||
lenderBranchList: any;
|
||||
pincodeList: any = [];
|
||||
applicantLength:number;
|
||||
// draftStatus: string;
|
||||
@ -66,10 +67,20 @@ export class EditPdMasterComponent implements OnInit {
|
||||
this._pd.getLenderDetails().subscribe(
|
||||
data => {
|
||||
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);
|
||||
}
|
||||
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(){
|
||||
this._pd.getProductsDetails().subscribe(
|
||||
data => {
|
||||
@ -122,7 +133,7 @@ export class EditPdMasterComponent implements OnInit {
|
||||
}
|
||||
|
||||
loadFormData() {
|
||||
console.log('this.data.record',this.data.records);
|
||||
// console.log('this.data.record',this.data.records);
|
||||
let stdcode;
|
||||
let landline;
|
||||
if(this.data.records.pd_contact_landline){
|
||||
@ -143,6 +154,7 @@ export class EditPdMasterComponent implements OnInit {
|
||||
pd_id: [this.data.records.pd_id],
|
||||
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])],
|
||||
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_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)])],
|
||||
@ -269,7 +281,8 @@ export class EditPdMasterComponent implements OnInit {
|
||||
}
|
||||
|
||||
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) {
|
||||
this.validateAllFormFields(this._EditPDtriggerForm);
|
||||
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
|
||||
@ -301,6 +314,7 @@ export class EditPdMasterComponent implements OnInit {
|
||||
"pd_id": my_array.pd_id,
|
||||
"fk_lender_id": my_array.fk_lender_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_mobileno": my_array.pd_contact_mobileno,
|
||||
"pd_contact_landline": concat_landline,
|
||||
@ -316,7 +330,7 @@ export class EditPdMasterComponent implements OnInit {
|
||||
"remarks": my_array.remarks,
|
||||
}
|
||||
|
||||
console.log(lenderMasterArray);
|
||||
// console.log(lenderMasterArray);
|
||||
this._pd.editPdMasterDetails(lenderMasterArray, updateStatus).subscribe(result => {
|
||||
if (result.status == 200) {
|
||||
this.notifier.notify('success', 'PD Details Updated.');
|
||||
|
||||
@ -86,7 +86,6 @@
|
||||
<mat-accordion
|
||||
*ngFor="let itemrow of bankingForm.controls.itemRows['controls']; let i=index;let last=last"
|
||||
[formGroupName]="i">
|
||||
<!-- {{bankingForm.controls.itemRows['controls']}} -->
|
||||
<mat-expansion-panel class="banlFields" [expanded]="step == i">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
@ -103,24 +102,10 @@
|
||||
</mat-optgroup>
|
||||
</mat-select>
|
||||
</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%">
|
||||
<input matInput placeholder="Specify Applicant Name" formControlName="other_applicant" autocomplete="off">
|
||||
</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-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>
|
||||
@ -136,14 +121,6 @@
|
||||
<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-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 *ngIf="pd_cus_segment!='SAL'">
|
||||
@ -170,10 +147,6 @@
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="itemrow.get('limit').value != ''">{{"₹"}} {{amtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!-- <mat-form-field>
|
||||
<input matInput placeholder="Approximate Vintage"
|
||||
formControlName="vintage" >
|
||||
</mat-form-field>-->
|
||||
<div>
|
||||
<label>Number of Years / Months since account was started</label>
|
||||
<br>
|
||||
@ -186,14 +159,13 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<mat-action-row>
|
||||
<button type="button" mat-flat-button (click)="addBankdetails(i, $event)"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
<button type="button" mat-button (click)="addBankdetails(i, $event)" color="accent"
|
||||
matTooltip="Add More" matTooltipPosition="left" *ngIf="last">
|
||||
<strong>Add More Banking Details</strong>
|
||||
</button>
|
||||
<button type="button" mat-flat-button (click)="deleteBankdetails(i)"
|
||||
matTooltip="Delete"matTooltipPosition="left" color="primary" *ngIf="!last">
|
||||
<button type="button" mat-button (click)="deleteBankdetails(i)" color="warn"
|
||||
matTooltip="Delete"matTooltipPosition="left" *ngIf="!last">
|
||||
<strong>Delete Banking Details</strong>
|
||||
</button>
|
||||
|
||||
|
||||
@ -19,7 +19,6 @@
|
||||
<mat-card>
|
||||
<mat-card>
|
||||
<mat-card-content class="matcard">
|
||||
<!-- <div fxLayout="row wrap"> -->
|
||||
<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">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"₹"}} {{loanAmtInWords}} Only</mat-hint>
|
||||
@ -94,20 +93,6 @@
|
||||
<input matInput placeholder="Specify Other Sources" formControlName="other_source" autocomplete="off">
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
<!--<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>
|
||||
|
||||
|
||||
@ -127,26 +112,10 @@
|
||||
</mat-select>
|
||||
</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">
|
||||
@ -177,28 +146,12 @@
|
||||
</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 != ''">{{"₹"}} {{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 != ''">{{"₹"}} {{valAsPerAgmtInWords}} Only</mat-hint>
|
||||
</mat-form-field> -->
|
||||
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</mat-card>
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
<span *ngIf="master.pd_status==pdStatusCheck.QC_COMPLETED " style="text-align:left">QC Completed</span>
|
||||
</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>
|
||||
<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>
|
||||
@ -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.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>
|
||||
<!-- {{master | json}} -->
|
||||
|
||||
</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>
|
||||
</div>
|
||||
@ -91,7 +94,8 @@
|
||||
<div fxLayout="row">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
|
||||
<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 fxFlex="90">
|
||||
<span *ngIf="master.state_name" class="hover-icon"> {{master.addressline1}},<br> {{master.city_name}},<br>{{master.state_name}}-{{master.pincode}} </span>
|
||||
|
||||
@ -48,7 +48,8 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
{'backEnd_FieldName':"pd_contact_person",'frontEnd_FieldName':"Lender Contact Person"},
|
||||
{'backEnd_FieldName':"pd_contact_mobileno",'frontEnd_FieldName':"Lender's Mobile Number"},
|
||||
{'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=
|
||||
// ['fk_lender_id',
|
||||
// 'lender_applicant_id',
|
||||
@ -122,6 +123,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
pd_QC_Rating: Number;
|
||||
|
||||
viewPdDetails(editID:string){
|
||||
this.pdMasterData = [];
|
||||
this._pd.editPdDetails(editID).subscribe(
|
||||
data => {
|
||||
if (data.status == 200) {
|
||||
@ -161,6 +163,12 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
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){
|
||||
let record = {
|
||||
"records":masterData,
|
||||
@ -179,7 +187,8 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
this.FilteredFieldNames.forEach(field => {
|
||||
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 => {
|
||||
@ -294,9 +303,43 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
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
|
||||
directTriggerPD(data: any,masterdetail : any){
|
||||
/** */
|
||||
|
||||
let pdid = masterdetail.pd_id;
|
||||
let getValues = data.filter(val =>val).map(Val => Val);
|
||||
this.FilteredFieldNames = getValues.map(x => {
|
||||
@ -304,22 +347,12 @@ this.FilteredFieldNames = getValues.map(x => {
|
||||
return this.localMandatoryFields[findIndex];
|
||||
});
|
||||
|
||||
|
||||
|
||||
if(data.length>0){
|
||||
|
||||
// FilteredFieldNames.forEach(field => {
|
||||
|
||||
// });
|
||||
this.localcount = 1;
|
||||
this.editPdMaster(masterdetail);
|
||||
|
||||
// alert(this.localMandatoryFields);
|
||||
}
|
||||
else {
|
||||
let lenderMasterArray = {
|
||||
"pd_id": pdid,
|
||||
}
|
||||
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.');
|
||||
@ -327,10 +360,10 @@ this.FilteredFieldNames = getValues.map(x => {
|
||||
}
|
||||
else {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
}//else
|
||||
}
|
||||
}, error => {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
});//error closed
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user