address form family details form and banking details
This commit is contained in:
parent
c826296f63
commit
507cc1c2fd
@ -1,8 +1,13 @@
|
|||||||
<mat-card style="min-height:540px;">
|
<mat-card style="min-height:540px;">
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-sidenav-container class="app-inner background-none shadow-none mail-db">
|
<mat-sidenav-container class="app-inner background-none shadow-none mail-db">
|
||||||
<mat-sidenav #mailnav [mode]="isOver() ? 'over' : 'side'" [opened]="!isOver()" class="mail-sidebar pl-xs pr-xs">
|
<mat-sidenav #mailnav [mode]="isOver() ? 'over' : 'side'" [opened]="!isOver()"
|
||||||
<button _ngcontent-c21="" [disabled]="currentPDStatus !=pdStatusCheck.INPROGRESS || actualQuestions!=answeredQuestions" class="compose-btn mat-warn mat-raised-button mb-1" (click)="changePDStatus(pdStatusCheck.COMPLETED);"> <span>{{currentPDStatus==pdStatusCheck.INPROGRESS ? 'COMPLETE':(currentPDStatus==pdStatusCheck.QC_COMPLETED ? 'QC COMPLETED' : currentPDStatus ) }}</span></button>
|
class="mail-sidebar pl-xs pr-xs">
|
||||||
|
<button _ngcontent-c21=""
|
||||||
|
[disabled]="currentPDStatus !=pdStatusCheck.INPROGRESS || actualQuestions!=answeredQuestions"
|
||||||
|
class="compose-btn mat-warn mat-raised-button mb-1"
|
||||||
|
(click)="changePDStatus(pdStatusCheck.COMPLETED);"><span>{{currentPDStatus==pdStatusCheck.INPROGRESS ? 'COMPLETE':(currentPDStatus==pdStatusCheck.QC_COMPLETED ? 'QC COMPLETED' : currentPDStatus ) }}</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
<!-- {{ (currentPDStatus==pdStatusCheck.INPROGRESS)? 'COMPLETE':(currentPDStatus) }} -->
|
<!-- {{ (currentPDStatus==pdStatusCheck.INPROGRESS)? 'COMPLETE':(currentPDStatus) }} -->
|
||||||
<mat-expansion-panel *ngFor="let category of categoryList;let catIndex = index; ">
|
<mat-expansion-panel *ngFor="let category of categoryList;let catIndex = index; ">
|
||||||
@ -14,8 +19,13 @@
|
|||||||
</mat-expansion-panel-header>
|
</mat-expansion-panel-header>
|
||||||
|
|
||||||
<mat-list>
|
<mat-list>
|
||||||
<mat-list-item class="custm-list-item" *ngFor="let questions of category.questions; let quesIndex=index" [ngStyle]="{'color':quesIndex === selectedQuestionIndex && catIndex === selectedCategoryIndex ? 'red' : 'black' }" (click)="OnSelectDirectQuestions(questions, catIndex,quesIndex)">
|
<mat-list-item class="custm-list-item"
|
||||||
<small>{{ (questions.question.length>15)? (questions.question | slice:0:15)+'..':(questions.question) }}</small>
|
*ngFor="let questions of category.questions; let quesIndex=index"
|
||||||
|
[ngStyle]="{'color':quesIndex === selectedQuestionIndex && catIndex === selectedCategoryIndex ? 'red' : 'black' }"
|
||||||
|
(click)="OnSelectDirectQuestions(questions, catIndex,quesIndex)">
|
||||||
|
<small>{{ (questions.question.length>15)? (questions.question |
|
||||||
|
slice:0:15)+'..':(questions.question) }}
|
||||||
|
</small>
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
|
|
||||||
|
|
||||||
@ -42,8 +52,11 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
|
|
||||||
<div fxLayout="row">
|
<div fxLayout="row">
|
||||||
<button mat-raised-button mat-icon-button class="hover-icon start_close_btn" type="button" matTooltip="Close" matTooltipPosition="above"
|
<button mat-raised-button mat-icon-button class="hover-icon start_close_btn" type="button"
|
||||||
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>
|
matTooltip="Close" matTooltipPosition="above"
|
||||||
|
(click)="loadPdViewCompoent()">
|
||||||
|
<mat-icon>close</mat-icon>
|
||||||
|
</button>
|
||||||
<div fxFlex="33" class="text-xs-left">
|
<div fxFlex="33" class="text-xs-left">
|
||||||
<h4 class="mt-0">{{mainApplicantName}}</h4>
|
<h4 class="mt-0">{{mainApplicantName}}</h4>
|
||||||
<small>{{pdMasterList.customer_segment_name}}</small>
|
<small>{{pdMasterList.customer_segment_name}}</small>
|
||||||
@ -81,8 +94,11 @@
|
|||||||
|
|
||||||
<mat-radio-group formControlName="modelValue">
|
<mat-radio-group formControlName="modelValue">
|
||||||
|
|
||||||
<mat-list-item *ngFor="let option of optionsForm.controls.items.value">
|
<mat-list-item
|
||||||
<mat-radio-button [value]="option.pd_answer_id">{{option.pd_answer}}</mat-radio-button>
|
*ngFor="let option of optionsForm.controls.items.value">
|
||||||
|
<mat-radio-button [value]="option.pd_answer_id">
|
||||||
|
{{option.pd_answer}}
|
||||||
|
</mat-radio-button>
|
||||||
|
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
|
|
||||||
@ -91,21 +107,26 @@
|
|||||||
</mat-list>
|
</mat-list>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex="40" class="text-xs-right" *ngIf="optionsForm.controls.documents.length>0">
|
<div fxFlex="40" class="text-xs-right"
|
||||||
|
*ngIf="optionsForm.controls.documents.length>0">
|
||||||
|
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card-content style="display: flex;
|
<mat-card-content style="display: flex;
|
||||||
overflow: auto;min-height: 200px; max-height: 240px;">
|
overflow: auto;min-height: 200px; max-height: 240px;">
|
||||||
<div fxLayout="row wrap">
|
<div fxLayout="row wrap">
|
||||||
<div fxFlex="50" class="m-gap p-gap" *ngFor="let docs of optionsForm.controls.documents.value; let docIndex=index">
|
<div fxFlex="50" class="m-gap p-gap"
|
||||||
|
*ngFor="let docs of optionsForm.controls.documents.value; let docIndex=index">
|
||||||
<div class="p-list-main mb-2">
|
<div class="p-list-main mb-2">
|
||||||
<div class="p-list">
|
<div class="p-list">
|
||||||
|
|
||||||
<div class="top"><img [src]="docs.pd_document_url" alt=""/></div>
|
<div class="top"><img
|
||||||
|
[src]="docs.pd_document_url" alt=""/>
|
||||||
|
</div>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<div class="details">
|
<div class="details">
|
||||||
<small>{{docs.pd_document_title}}</small>
|
<small>{{docs.pd_document_title}}
|
||||||
|
</small>
|
||||||
<!-- <p>{{docs.pd_document_name}}</p> -->
|
<!-- <p>{{docs.pd_document_name}}</p> -->
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
||||||
@ -129,17 +150,36 @@
|
|||||||
<div fxFlex="60" class="pb-0 text-sm-left">
|
<div fxFlex="60" class="pb-0 text-sm-left">
|
||||||
<mat-form-field appearance="outline" style="width: 100%">
|
<mat-form-field appearance="outline" style="width: 100%">
|
||||||
<mat-label>Remarks</mat-label>
|
<mat-label>Remarks</mat-label>
|
||||||
<textarea matInput placeholder="Remarks" formControlName="pd_answer_remark"></textarea>
|
<textarea matInput placeholder="Remarks"
|
||||||
|
formControlName="pd_answer_remark"></textarea>
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<!-- this section for questions type options button actions -->
|
<!-- this section for questions type options button actions -->
|
||||||
<div fxFlex="40" class="pb-0 text-sm-right">
|
<div fxFlex="40" class="pb-0 text-sm-right">
|
||||||
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
||||||
<mat-button-toggle value="bold" matTooltip="Save&Previous" *ngIf="currentPDStatus !=pdStatusCheck.COMPLETED && currentPDStatus !=pdStatusCheck.QC_COMPLETED" (click)="saveNextPrevious(optionsForm.controls,previous)" matTooltipPosition="below"><mat-icon>skip_previous</mat-icon></mat-button-toggle>
|
<mat-button-toggle value="bold" matTooltip="Save&Previous"
|
||||||
<mat-button-toggle value="bold" matTooltip="Skip&Previous" (click)="skipNextPrevious(previous)" matTooltipPosition="below"><mat-icon>chevron_left</mat-icon></mat-button-toggle>
|
*ngIf="currentPDStatus !=pdStatusCheck.COMPLETED && currentPDStatus !=pdStatusCheck.QC_COMPLETED"
|
||||||
<mat-button-toggle value="bold" matTooltip="Skip&Next" (click)="skipNextPrevious(next)" matTooltipPosition="below"><mat-icon>chevron_right</mat-icon></mat-button-toggle>
|
(click)="saveNextPrevious(optionsForm.controls,previous)"
|
||||||
<mat-button-toggle value="bold" matTooltip="Save&Next" (click)="saveNextPrevious(optionsForm.controls,next)" *ngIf="currentPDStatus !=pdStatusCheck.COMPLETED && currentPDStatus !=pdStatusCheck.QC_COMPLETED" matTooltipPosition="below"><mat-icon>skip_next</mat-icon></mat-button-toggle>
|
matTooltipPosition="below">
|
||||||
|
<mat-icon>skip_previous</mat-icon>
|
||||||
|
</mat-button-toggle>
|
||||||
|
<mat-button-toggle value="bold" matTooltip="Skip&Previous"
|
||||||
|
(click)="skipNextPrevious(previous)"
|
||||||
|
matTooltipPosition="below">
|
||||||
|
<mat-icon>chevron_left</mat-icon>
|
||||||
|
</mat-button-toggle>
|
||||||
|
<mat-button-toggle value="bold" matTooltip="Skip&Next"
|
||||||
|
(click)="skipNextPrevious(next)"
|
||||||
|
matTooltipPosition="below">
|
||||||
|
<mat-icon>chevron_right</mat-icon>
|
||||||
|
</mat-button-toggle>
|
||||||
|
<mat-button-toggle value="bold" matTooltip="Save&Next"
|
||||||
|
(click)="saveNextPrevious(optionsForm.controls,next)"
|
||||||
|
*ngIf="currentPDStatus !=pdStatusCheck.COMPLETED && currentPDStatus !=pdStatusCheck.QC_COMPLETED"
|
||||||
|
matTooltipPosition="below">
|
||||||
|
<mat-icon>skip_next</mat-icon>
|
||||||
|
</mat-button-toggle>
|
||||||
</mat-button-toggle-group>
|
</mat-button-toggle-group>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -159,8 +199,16 @@
|
|||||||
|
|
||||||
<div fxFlex="100" class="pb-0 text-sm-right">
|
<div fxFlex="100" class="pb-0 text-sm-right">
|
||||||
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
||||||
<mat-button-toggle value="bold" matTooltip="Skip&Previous" (click)="skipNextPrevious(previous)" matTooltipPosition="below"><mat-icon>chevron_left</mat-icon></mat-button-toggle>
|
<mat-button-toggle value="bold" matTooltip="Skip&Previous"
|
||||||
<mat-button-toggle value="bold" matTooltip="Skip&Next" (click)="skipNextPrevious(next)" matTooltipPosition="below"><mat-icon>chevron_right</mat-icon></mat-button-toggle>
|
(click)="skipNextPrevious(previous)"
|
||||||
|
matTooltipPosition="below">
|
||||||
|
<mat-icon>chevron_left</mat-icon>
|
||||||
|
</mat-button-toggle>
|
||||||
|
<mat-button-toggle value="bold" matTooltip="Skip&Next"
|
||||||
|
(click)="skipNextPrevious(next)"
|
||||||
|
matTooltipPosition="below">
|
||||||
|
<mat-icon>chevron_right</mat-icon>
|
||||||
|
</mat-button-toggle>
|
||||||
</mat-button-toggle-group>
|
</mat-button-toggle-group>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -182,33 +230,41 @@
|
|||||||
<div fxFlex="60" class="text-xs-left">
|
<div fxFlex="60" class="text-xs-left">
|
||||||
|
|
||||||
<mat-list [formArrayName]="'items'" style="padding-top:10%">
|
<mat-list [formArrayName]="'items'" style="padding-top:10%">
|
||||||
<mat-list-item *ngFor="let control of textBoxForm.controls.items.controls; let i = index;" [formGroup]="control">
|
<mat-list-item
|
||||||
|
*ngFor="let control of textBoxForm.controls.items.controls; let i = index;"
|
||||||
|
[formGroup]="control">
|
||||||
|
|
||||||
<mat-form-field appearance="outline" style="width: 100%">
|
<mat-form-field appearance="outline" style="width: 100%">
|
||||||
<mat-label>Answers</mat-label>
|
<mat-label>Answers</mat-label>
|
||||||
<textarea matInput placeholder="Answers" formControlName="pd_answer"></textarea>
|
<textarea matInput placeholder="Answers"
|
||||||
|
formControlName="pd_answer"></textarea>
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
|
|
||||||
</mat-list>
|
</mat-list>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex="40" class="text-xs-right" *ngIf="textBoxForm.controls.documents.length>0">
|
<div fxFlex="40" class="text-xs-right"
|
||||||
|
*ngIf="textBoxForm.controls.documents.length>0">
|
||||||
|
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card-content style="display: flex;
|
<mat-card-content style="display: flex;
|
||||||
overflow: auto;min-height: 200px; max-height: 240px;">
|
overflow: auto;min-height: 200px; max-height: 240px;">
|
||||||
<div fxLayout="row wrap">
|
<div fxLayout="row wrap">
|
||||||
|
|
||||||
<div fxFlex="50" class="m-gap p-gap" *ngFor="let docs of textBoxForm.controls.documents.value; let docIndex=index">
|
<div fxFlex="50" class="m-gap p-gap"
|
||||||
|
*ngFor="let docs of textBoxForm.controls.documents.value; let docIndex=index">
|
||||||
<div class="p-list-main mb-2">
|
<div class="p-list-main mb-2">
|
||||||
<div class="p-list">
|
<div class="p-list">
|
||||||
|
|
||||||
<div class="top"><img [src]="docs.pd_document_url" alt=""/></div>
|
<div class="top"><img
|
||||||
|
[src]="docs.pd_document_url" alt=""/>
|
||||||
|
</div>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<div class="details">
|
<div class="details">
|
||||||
<small>{{docs.pd_document_title}}</small>
|
<small>{{docs.pd_document_title}}
|
||||||
|
</small>
|
||||||
<!-- <p>{{docs.pd_document_name}}</p> -->
|
<!-- <p>{{docs.pd_document_name}}</p> -->
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
||||||
@ -232,17 +288,37 @@
|
|||||||
<div fxFlex="60" class="pb-0 text-sm-left">
|
<div fxFlex="60" class="pb-0 text-sm-left">
|
||||||
<mat-form-field appearance="outline" style="width: 100%">
|
<mat-form-field appearance="outline" style="width: 100%">
|
||||||
<mat-label>Remarks</mat-label>
|
<mat-label>Remarks</mat-label>
|
||||||
<textarea matInput placeholder="Remarks" formControlName="pd_answer_remark"></textarea>
|
<textarea matInput placeholder="Remarks"
|
||||||
|
formControlName="pd_answer_remark"></textarea>
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<!-- this section for questions type options button actions -->
|
<!-- this section for questions type options button actions -->
|
||||||
<div fxFlex="40" class="pb-0 text-sm-right">
|
<div fxFlex="40" class="pb-0 text-sm-right">
|
||||||
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
||||||
<mat-button-toggle value="bold" matTooltip="Save&Previous" *ngIf="currentPDStatus !=pdStatusCheck.COMPLETED && currentPDStatus !=pdStatusCheck.QC_COMPLETED" (click)="saveNextPreviousText(textBoxForm.controls,previous)" matTooltipPosition="below"><mat-icon>skip_previous</mat-icon></mat-button-toggle>
|
<mat-button-toggle value="bold" matTooltip="Save&Previous"
|
||||||
<mat-button-toggle value="bold" matTooltip="Skip&Previous" matTooltipPosition="below" (click)="skipNextPrevious(previous)"><mat-icon>chevron_left</mat-icon></mat-button-toggle>
|
*ngIf="currentPDStatus !=pdStatusCheck.COMPLETED && currentPDStatus !=pdStatusCheck.QC_COMPLETED"
|
||||||
<mat-button-toggle value="bold" matTooltip="Skip&Next" (click)="skipNextPrevious(next)" matTooltipPosition="below"><mat-icon>chevron_right</mat-icon></mat-button-toggle>
|
(click)="saveNextPreviousText(textBoxForm.controls,previous)"
|
||||||
<mat-button-toggle value="bold" *ngIf="currentPDStatus !=pdStatusCheck.COMPLETED && currentPDStatus !=pdStatusCheck.QC_COMPLETED" matTooltip="Save&Next" (click)="saveNextPreviousText(textBoxForm.controls,next)" matTooltipPosition="below"><mat-icon>skip_next</mat-icon></mat-button-toggle>
|
matTooltipPosition="below">
|
||||||
|
<mat-icon>skip_previous</mat-icon>
|
||||||
|
</mat-button-toggle>
|
||||||
|
<mat-button-toggle value="bold" matTooltip="Skip&Previous"
|
||||||
|
matTooltipPosition="below"
|
||||||
|
(click)="skipNextPrevious(previous)">
|
||||||
|
<mat-icon>chevron_left</mat-icon>
|
||||||
|
</mat-button-toggle>
|
||||||
|
<mat-button-toggle value="bold" matTooltip="Skip&Next"
|
||||||
|
(click)="skipNextPrevious(next)"
|
||||||
|
matTooltipPosition="below">
|
||||||
|
<mat-icon>chevron_right</mat-icon>
|
||||||
|
</mat-button-toggle>
|
||||||
|
<mat-button-toggle value="bold"
|
||||||
|
*ngIf="currentPDStatus !=pdStatusCheck.COMPLETED && currentPDStatus !=pdStatusCheck.QC_COMPLETED"
|
||||||
|
matTooltip="Save&Next"
|
||||||
|
(click)="saveNextPreviousText(textBoxForm.controls,next)"
|
||||||
|
matTooltipPosition="below">
|
||||||
|
<mat-icon>skip_next</mat-icon>
|
||||||
|
</mat-button-toggle>
|
||||||
</mat-button-toggle-group>
|
</mat-button-toggle-group>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -261,8 +337,16 @@
|
|||||||
|
|
||||||
<div fxFlex="100" class="pb-0 text-sm-right">
|
<div fxFlex="100" class="pb-0 text-sm-right">
|
||||||
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
||||||
<mat-button-toggle value="bold" matTooltip="Skip&Previous" (click)="skipNextPrevious(previous)" matTooltipPosition="below"><mat-icon>chevron_left</mat-icon></mat-button-toggle>
|
<mat-button-toggle value="bold" matTooltip="Skip&Previous"
|
||||||
<mat-button-toggle value="bold" matTooltip="Skip&Next" (click)="skipNextPrevious(next)" matTooltipPosition="below"><mat-icon>chevron_right</mat-icon></mat-button-toggle>
|
(click)="skipNextPrevious(previous)"
|
||||||
|
matTooltipPosition="below">
|
||||||
|
<mat-icon>chevron_left</mat-icon>
|
||||||
|
</mat-button-toggle>
|
||||||
|
<mat-button-toggle value="bold" matTooltip="Skip&Next"
|
||||||
|
(click)="skipNextPrevious(next)"
|
||||||
|
matTooltipPosition="below">
|
||||||
|
<mat-icon>chevron_right</mat-icon>
|
||||||
|
</mat-button-toggle>
|
||||||
</mat-button-toggle-group>
|
</mat-button-toggle-group>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -282,29 +366,42 @@
|
|||||||
<div fxFlex="60" class="text-xs-left">
|
<div fxFlex="60" class="text-xs-left">
|
||||||
|
|
||||||
<mat-list [formArrayName]="'items'">
|
<mat-list [formArrayName]="'items'">
|
||||||
<mat-list-item *ngFor="let control of checkBoxForm.controls.items.controls; let i = index;" [formGroup]="control">
|
<mat-list-item
|
||||||
|
*ngFor="let control of checkBoxForm.controls.items.controls; let i = index;"
|
||||||
|
[formGroup]="control">
|
||||||
|
|
||||||
<small><mat-checkbox class="example-margin" formControlName="checkbox" id="{{ control.controls.pd_answer_id.value }}"> {{ control.controls.pd_answer.value }}</mat-checkbox> </small>
|
<small>
|
||||||
|
<mat-checkbox class="example-margin"
|
||||||
|
formControlName="checkbox"
|
||||||
|
id="{{ control.controls.pd_answer_id.value }}">
|
||||||
|
{{ control.controls.pd_answer.value }}
|
||||||
|
</mat-checkbox>
|
||||||
|
</small>
|
||||||
|
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
|
|
||||||
</mat-list>
|
</mat-list>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex="40" class="text-xs-right" *ngIf="checkBoxForm.controls.documents.length>0">
|
<div fxFlex="40" class="text-xs-right"
|
||||||
|
*ngIf="checkBoxForm.controls.documents.length>0">
|
||||||
|
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card-content style="display: flex;
|
<mat-card-content style="display: flex;
|
||||||
overflow: auto;min-height: 200px; max-height: 240px;">
|
overflow: auto;min-height: 200px; max-height: 240px;">
|
||||||
<div fxLayout="row wrap">
|
<div fxLayout="row wrap">
|
||||||
<div fxFlex="50" class="m-gap p-gap" *ngFor="let docs of textBoxForm.controls.documents.value; let docIndex=index">
|
<div fxFlex="50" class="m-gap p-gap"
|
||||||
|
*ngFor="let docs of textBoxForm.controls.documents.value; let docIndex=index">
|
||||||
<div class="p-list-main mb-2">
|
<div class="p-list-main mb-2">
|
||||||
<div class="p-list">
|
<div class="p-list">
|
||||||
|
|
||||||
<div class="top"><img [src]="docs.pd_document_url" alt=""/></div>
|
<div class="top"><img
|
||||||
|
[src]="docs.pd_document_url" alt=""/>
|
||||||
|
</div>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<div class="details">
|
<div class="details">
|
||||||
<small>{{docs.pd_document_title}}</small>
|
<small>{{docs.pd_document_title}}
|
||||||
|
</small>
|
||||||
<!-- <p>{{docs.pd_document_name}}</p> -->
|
<!-- <p>{{docs.pd_document_name}}</p> -->
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
<!-- <div class="buy"><i class="material-icons">add_shopping_cart</i></div> -->
|
||||||
@ -328,17 +425,40 @@
|
|||||||
<div fxFlex="60" class="pb-0 text-sm-left">
|
<div fxFlex="60" class="pb-0 text-sm-left">
|
||||||
<mat-form-field appearance="outline" style="width: 100%">
|
<mat-form-field appearance="outline" style="width: 100%">
|
||||||
<mat-label>Remarks</mat-label>
|
<mat-label>Remarks</mat-label>
|
||||||
<textarea matInput placeholder="Remarks" formControlName="pd_answer_remark"></textarea>
|
<textarea matInput placeholder="Remarks"
|
||||||
|
formControlName="pd_answer_remark"></textarea>
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<!-- this section for questions type options button actions -->
|
<!-- this section for questions type options button actions -->
|
||||||
<div fxFlex="40" class="pb-0 text-sm-right">
|
<div fxFlex="40" class="pb-0 text-sm-right">
|
||||||
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
||||||
<mat-button-toggle value="bold" *ngIf="currentPDStatus !=pdStatusCheck.COMPLETED && currentPDStatus !=pdStatusCheck.QC_COMPLETED" matTooltip="Save&Previous" (click)="saveNextPrevious(checkBoxForm.controls,previous)" matTooltip="Save&Previous" (click)="saveNextPrevious(checkBoxForm.controls,previous)" matTooltipPosition="below"><mat-icon>skip_previous</mat-icon></mat-button-toggle>
|
<mat-button-toggle value="bold"
|
||||||
<mat-button-toggle value="bold" matTooltip="Skip&Previous" (click)="skipNextPrevious(previous)" matTooltipPosition="below"><mat-icon>chevron_left</mat-icon></mat-button-toggle>
|
*ngIf="currentPDStatus !=pdStatusCheck.COMPLETED && currentPDStatus !=pdStatusCheck.QC_COMPLETED"
|
||||||
<mat-button-toggle value="bold" matTooltip="Skip&Next" (click)="skipNextPrevious(next)" matTooltipPosition="below"><mat-icon>chevron_right</mat-icon></mat-button-toggle>
|
matTooltip="Save&Previous"
|
||||||
<mat-button-toggle value="bold" *ngIf="currentPDStatus !=pdStatusCheck.COMPLETED && currentPDStatus !=pdStatusCheck.QC_COMPLETED" matTooltip="Save&Next" (click)="saveNextPrevious(checkBoxForm.controls,next)" matTooltipPosition="below"><mat-icon>skip_next</mat-icon></mat-button-toggle>
|
(click)="saveNextPrevious(checkBoxForm.controls,previous)"
|
||||||
|
matTooltip="Save&Previous"
|
||||||
|
(click)="saveNextPrevious(checkBoxForm.controls,previous)"
|
||||||
|
matTooltipPosition="below">
|
||||||
|
<mat-icon>skip_previous</mat-icon>
|
||||||
|
</mat-button-toggle>
|
||||||
|
<mat-button-toggle value="bold" matTooltip="Skip&Previous"
|
||||||
|
(click)="skipNextPrevious(previous)"
|
||||||
|
matTooltipPosition="below">
|
||||||
|
<mat-icon>chevron_left</mat-icon>
|
||||||
|
</mat-button-toggle>
|
||||||
|
<mat-button-toggle value="bold" matTooltip="Skip&Next"
|
||||||
|
(click)="skipNextPrevious(next)"
|
||||||
|
matTooltipPosition="below">
|
||||||
|
<mat-icon>chevron_right</mat-icon>
|
||||||
|
</mat-button-toggle>
|
||||||
|
<mat-button-toggle value="bold"
|
||||||
|
*ngIf="currentPDStatus !=pdStatusCheck.COMPLETED && currentPDStatus !=pdStatusCheck.QC_COMPLETED"
|
||||||
|
matTooltip="Save&Next"
|
||||||
|
(click)="saveNextPrevious(checkBoxForm.controls,next)"
|
||||||
|
matTooltipPosition="below">
|
||||||
|
<mat-icon>skip_next</mat-icon>
|
||||||
|
</mat-button-toggle>
|
||||||
</mat-button-toggle-group>
|
</mat-button-toggle-group>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -357,8 +477,16 @@
|
|||||||
|
|
||||||
<div fxFlex="100" class="pb-0 text-sm-right">
|
<div fxFlex="100" class="pb-0 text-sm-right">
|
||||||
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
||||||
<mat-button-toggle value="bold" matTooltip="Skip&Previous" (click)="skipNextPrevious(previous)" matTooltipPosition="below"><mat-icon>chevron_left</mat-icon></mat-button-toggle>
|
<mat-button-toggle value="bold" matTooltip="Skip&Previous"
|
||||||
<mat-button-toggle value="bold" matTooltip="Skip&Next" (click)="skipNextPrevious(next)" matTooltipPosition="below"><mat-icon>chevron_right</mat-icon></mat-button-toggle>
|
(click)="skipNextPrevious(previous)"
|
||||||
|
matTooltipPosition="below">
|
||||||
|
<mat-icon>chevron_left</mat-icon>
|
||||||
|
</mat-button-toggle>
|
||||||
|
<mat-button-toggle value="bold" matTooltip="Skip&Next"
|
||||||
|
(click)="skipNextPrevious(next)"
|
||||||
|
matTooltipPosition="below">
|
||||||
|
<mat-icon>chevron_right</mat-icon>
|
||||||
|
</mat-button-toggle>
|
||||||
</mat-button-toggle-group>
|
</mat-button-toggle-group>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -392,6 +520,307 @@
|
|||||||
<p>Personal</p>
|
<p>Personal</p>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<!-- end personal type questions -->
|
<!-- end personal type questions -->
|
||||||
|
<ng-container *ngSwitchCase="4">
|
||||||
|
<p>Address</p>
|
||||||
|
<form class="address" [formGroup]="addressForm">
|
||||||
|
<mat-form-field>
|
||||||
|
<input matInput placeholder="Address" formControlName="address">
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-select placeholder="Address Type" formControlName="address_type">
|
||||||
|
<mat-option value="Office">Office</mat-option>
|
||||||
|
<mat-option value="Clinic">Clinic</mat-option>
|
||||||
|
<mat-option value="Factory">Factory</mat-option>
|
||||||
|
<mat-option value="Warehouse">Warehouse</mat-option>
|
||||||
|
<mat-option value="Shop">Shop</mat-option>
|
||||||
|
<mat-option value="ResidencecumOffice">Residence cum Office</mat-option>
|
||||||
|
<mat-option value="Residence">Residence</mat-option>
|
||||||
|
<mat-option value="Other">Other (PD officer to fill)</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-select placeholder="Locality" formControlName="locality">
|
||||||
|
<mat-option value="CommercialOffice">Commercial (Office type) Area
|
||||||
|
</mat-option>
|
||||||
|
<mat-option value="CommercialShop">Commercial (shop type) Area</mat-option>
|
||||||
|
<mat-option value="Industrial">Industrial Area</mat-option>
|
||||||
|
<mat-option value="Residential">Residential Area</mat-option>
|
||||||
|
<mat-option value="Mix">Mix use (Comment mandatory)</mat-option>
|
||||||
|
<mat-option value="Rural">Rural (Village) area</mat-option>
|
||||||
|
<mat-option value="Others">Others (Please specify)</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-select placeholder="Approach to PD location" formControlName="pd_location">
|
||||||
|
<mat-option value="{{data.pd_location_approach_id}}"
|
||||||
|
*ngFor="let data of locationdata">{{data.description}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-select placeholder="Comment on locality" formControlName="comment_locality">
|
||||||
|
<mat-option value="{{data.comments_on_locality_id}}"
|
||||||
|
*ngFor="let data of commentData">{{data.rating}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-select placeholder="Customer Behaviour"
|
||||||
|
formControlName="customer_behaviour">
|
||||||
|
<mat-option value="{{data.customer_behaviour_id}}"
|
||||||
|
*ngFor="let data of customerData">{{data.description}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-card>
|
||||||
|
<mat-card-header>
|
||||||
|
<p>Neighbour hood
|
||||||
|
<p>
|
||||||
|
</mat-card-header>
|
||||||
|
<div formArrayName="neighbourhood">
|
||||||
|
<div *ngFor="let item of addressForm.get('neighbourhood').controls; let i=index">
|
||||||
|
<mat-card-content class="matcard" [formGroup]="item">
|
||||||
|
<mat-form-field>
|
||||||
|
<input matInput placeholder="Neighbour name"
|
||||||
|
formControlName="name">
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-select placeholder="Do you know"
|
||||||
|
formControlName="do_you_know">
|
||||||
|
<mat-option value="yes">Yes</mat-option>
|
||||||
|
<mat-option value="no">No</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<input matInput placeholder="How long do you know the applicant"
|
||||||
|
formControlName="how_long">
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-select placeholder="Is the applicant owner"
|
||||||
|
formControlName="is_owner">
|
||||||
|
<mat-option value="yes">Yes</mat-option>
|
||||||
|
<mat-option value="no">No</mat-option>
|
||||||
|
<mat-option value="dont_know">Dont Know</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<button type="button" mat-raised-button mat-icon-button *ngIf="i==0" (click)="addNeighbour($event)"
|
||||||
|
style="float: right;">
|
||||||
|
<mat-icon>add</mat-icon>
|
||||||
|
</button>
|
||||||
|
<button type="button" mat-raised-button mat-icon-button *ngIf="i>0"
|
||||||
|
(click)="removeNeighbour(i)"
|
||||||
|
style="float: right;">
|
||||||
|
<mat-icon>close</mat-icon>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</mat-card-content>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
<button mat-raised-button type="submit" class="button" (click)="onSubmit()">Submit
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
<!-- end personal type questions -->
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngSwitchCase="5">
|
||||||
|
<p>Family</p>
|
||||||
|
<form class="address" [formGroup]="familyForm">
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-select placeholder="Person Met" formControlName="person">
|
||||||
|
<mat-option *ngFor="let state of filteredStates" [value]="state">
|
||||||
|
{{state}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field *ngIf="person.value =='Other'">
|
||||||
|
<input matInput placeholder="Enter the relationship" formControlName="personOther">
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<input matInput placeholder="No. Of family members" formControlName="members">
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-card>
|
||||||
|
<mat-card-header>
|
||||||
|
<p>Earning Members
|
||||||
|
<p>
|
||||||
|
</mat-card-header>
|
||||||
|
<div formArrayName="earningMembers">
|
||||||
|
<div *ngFor="let item of familyForm.get('earningMembers').controls; let i=index" [formGroupName]="i">
|
||||||
|
<mat-card-content class="matcard">
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-select placeholder="Relation" formControlName="relation">
|
||||||
|
<mat-option value="{{relation.relationship_id}}"
|
||||||
|
*ngFor="let relation of relationData">
|
||||||
|
{{relation.name}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-select placeholder="Segment" formControlName="segment">
|
||||||
|
<mat-option value="Salaried">Salaried</mat-option>
|
||||||
|
<mat-option value="SENP">SENP</mat-option>
|
||||||
|
<mat-option value="SEP">SEP</mat-option>
|
||||||
|
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<input matInput placeholder="Income / Revenue"
|
||||||
|
formControlName="income">
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<input matInput placeholder="Name of Employer / Business"
|
||||||
|
formControlName="employerName">
|
||||||
|
</mat-form-field>
|
||||||
|
<button type="button" mat-raised-button mat-icon-button *ngIf="i==0" (click)="addearningMembers()">
|
||||||
|
<mat-icon >add</mat-icon>
|
||||||
|
</button>
|
||||||
|
<button type="button" mat-raised-button mat-icon-button (click)="deleteEarningMembers(i)" *ngIf="i>0">
|
||||||
|
<mat-icon>close</mat-icon>
|
||||||
|
</button>
|
||||||
|
</mat-card-content>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
<mat-card>
|
||||||
|
<mat-card-header>
|
||||||
|
<p>Non Earning Members
|
||||||
|
<p>
|
||||||
|
</mat-card-header>
|
||||||
|
<div formArrayName="nonEarningMembers">
|
||||||
|
<div *ngFor="let members of familyForm.get('nonEarningMembers').controls; let i=index" [formGroupName]="i">
|
||||||
|
<mat-card-content class="matcard">
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-select placeholder="Relation"
|
||||||
|
formControlName="relationship">
|
||||||
|
<mat-option value="{{relation.relationship_id}}"
|
||||||
|
*ngFor="let relation of relationData">
|
||||||
|
{{relation.name}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-select placeholder="Occupation"
|
||||||
|
formControlName="occupation">
|
||||||
|
<mat-option value="{{occupation.occupation_non_earning_member_id}}" *ngFor="let occupation of occupationData">{{occupation.name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<input matInput placeholder="Retired From"
|
||||||
|
formControlName="retired">
|
||||||
|
</mat-form-field>
|
||||||
|
<button type="button" mat-raised-button mat-icon-button (click)="addMembers()" *ngIf="i==0">
|
||||||
|
<mat-icon>add</mat-icon>
|
||||||
|
</button>
|
||||||
|
<button type="button" mat-raised-button mat-icon-button (click)="deleteMembers(i)" *ngIf="i>0">
|
||||||
|
<mat-icon>close</mat-icon>
|
||||||
|
</button>
|
||||||
|
</mat-card-content>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
|
<mat-card>
|
||||||
|
<mat-card-header>
|
||||||
|
<p>Residence
|
||||||
|
<p>
|
||||||
|
</mat-card-header>
|
||||||
|
<mat-card-content class="matcard">
|
||||||
|
<mat-form-field>
|
||||||
|
<input matInput placeholder="Where is the residence"
|
||||||
|
formControlName="residence">
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<input matInput placeholder="No.of yrs" formControlName="years">
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-select placeholder="Ownership" formControlName="ownership">
|
||||||
|
<mat-option value="Self">Self Owned</mat-option>
|
||||||
|
<mat-option value="Family">Family Owned</mat-option>
|
||||||
|
<mat-option value="Rented">Rented</mat-option>
|
||||||
|
<mat-option value="Others">Others</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field *ngIf="ownership.value =='Others'">
|
||||||
|
<input matInput placeholder="Please specify" formControlName="ownershipOther">
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field *ngIf="ownership.value =='Rented'">
|
||||||
|
<input matInput placeholder="what rent"
|
||||||
|
formControlName="rent">
|
||||||
|
</mat-form-field>
|
||||||
|
</mat-card-content>
|
||||||
|
</mat-card>
|
||||||
|
<button mat-raised-button class="button" (click)="submitFamily()">Submit</button>
|
||||||
|
</form>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngSwitchCase="6">
|
||||||
|
<!--<p>Banking details</p>-->
|
||||||
|
<form [formGroup]="bankingForm" class="bankForm">
|
||||||
|
<div formArrayName="itemRows">
|
||||||
|
<mat-accordion
|
||||||
|
*ngFor="let itemrow of bankingForm.controls.itemRows.controls; let i=index"
|
||||||
|
[formGroupName]="i">
|
||||||
|
<mat-expansion-panel class="banlFields" [expanded]="step == i">
|
||||||
|
<mat-expansion-panel-header>
|
||||||
|
<mat-panel-title>
|
||||||
|
<h4>{{i+1}} Banking details<span *ngIf="i==0" style="float: right;">
|
||||||
|
<mat-icon (click)="addBankdetails(i)">add</mat-icon>
|
||||||
|
</span>
|
||||||
|
<span *ngIf="i > 0">
|
||||||
|
<mat-icon (click)="deleteBankdetails(i)">delete</mat-icon>
|
||||||
|
</span></h4>
|
||||||
|
</mat-panel-title>
|
||||||
|
</mat-expansion-panel-header>
|
||||||
|
<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="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-select placeholder="Salary Credited in this account"
|
||||||
|
formControlName="salary">
|
||||||
|
<mat-option value="Yes">Yes</mat-option>
|
||||||
|
<mat-option value="No">No</mat-option>
|
||||||
|
<mat-option value="NA">NA</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<input matInput placeholder="Limit in case of OD / CC account"
|
||||||
|
formControlName="limit">
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-select placeholder="Is this the main business account"
|
||||||
|
formControlName="is_main">
|
||||||
|
<mat-option value="Yes">Yes</mat-option>
|
||||||
|
<mat-option value="No">No</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<input matInput placeholder="Approximate Vintage"
|
||||||
|
formControlName="vintage">
|
||||||
|
</mat-form-field>
|
||||||
|
</mat-expansion-panel>
|
||||||
|
|
||||||
|
</mat-accordion>
|
||||||
|
</div>
|
||||||
|
<button mat-raised-button class="button" (click)="bankSubmit()">Submit
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
<!-- end personal type questions -->
|
||||||
|
</ng-container>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
<!-- end form based questions -->
|
<!-- end form based questions -->
|
||||||
|
|||||||
@ -121,3 +121,34 @@ mat-icon{
|
|||||||
right: 69px;
|
right: 69px;
|
||||||
top: 112px;
|
top: 112px;
|
||||||
}
|
}
|
||||||
|
.address {
|
||||||
|
display: flex;
|
||||||
|
padding: 0 2%;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.address > * {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.matcard mat-form-field {
|
||||||
|
margin: 0 2%;
|
||||||
|
}
|
||||||
|
.address .button {
|
||||||
|
float: right;
|
||||||
|
width: 10px;
|
||||||
|
background: #62B013;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.banlFields mat-form-field {
|
||||||
|
width: 100%;
|
||||||
|
margin: 0 2%;
|
||||||
|
}
|
||||||
|
.bankForm .button {
|
||||||
|
float: right;
|
||||||
|
width: 10px;
|
||||||
|
background: #62B013;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.has-danger{
|
||||||
|
border: solid thin #f44336!important;
|
||||||
|
}
|
||||||
@ -1,5 +1,5 @@
|
|||||||
import {Component, ViewChild, OnInit, ViewEncapsulation, OnDestroy} from '@angular/core';
|
import {Component, ViewChild, OnInit, ViewEncapsulation, OnDestroy} from '@angular/core';
|
||||||
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
|
import {FormBuilder, FormGroup, Validators, FormControl, FormArray, AbstractControl} from '@angular/forms';
|
||||||
import {ActivatedRoute, Router} from '@angular/router';
|
import {ActivatedRoute, Router} from '@angular/router';
|
||||||
import {NotifierService} from 'angular-notifier';
|
import {NotifierService} from 'angular-notifier';
|
||||||
import {ListPdComponent} from './../list-pd.component';
|
import {ListPdComponent} from './../list-pd.component';
|
||||||
@ -11,7 +11,6 @@ import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
|||||||
styleUrls: ['./start-pd.component.scss']
|
styleUrls: ['./start-pd.component.scss']
|
||||||
})
|
})
|
||||||
export class StartPdComponent implements OnInit, OnDestroy {
|
export class StartPdComponent implements OnInit, OnDestroy {
|
||||||
private notifier: NotifierService;
|
|
||||||
public startPD: string;
|
public startPD: string;
|
||||||
public mainApplicantName: string;
|
public mainApplicantName: string;
|
||||||
//public remarks: string;
|
//public remarks: string;
|
||||||
@ -29,7 +28,16 @@ selectedQuestionIndex:number;
|
|||||||
getQuestionsLength: number;
|
getQuestionsLength: number;
|
||||||
answerList: any = [];
|
answerList: any = [];
|
||||||
ansPDList: any = [];
|
ansPDList: any = [];
|
||||||
|
filteredStates: any = [
|
||||||
|
'Co-Applicant 1 to x',
|
||||||
|
'Accountant',
|
||||||
|
'Manager',
|
||||||
|
'Relative of the applicant',
|
||||||
|
'Friend of the Applicant',
|
||||||
|
'DSA',
|
||||||
|
'Other'
|
||||||
|
];
|
||||||
|
relationDetails: any = [1];
|
||||||
// category static form buttons
|
// category static form buttons
|
||||||
categoryFormButtons: any = [
|
categoryFormButtons: any = [
|
||||||
{
|
{
|
||||||
@ -44,13 +52,22 @@ categoryFormButtons : any=[
|
|||||||
"form_id": 3,
|
"form_id": 3,
|
||||||
"form_name": "Personal Details",
|
"form_name": "Personal Details",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"form_id": 4,
|
||||||
|
"form_name": "Address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"form_id": 5,
|
||||||
|
"form_name": "Family",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"form_id": 6,
|
||||||
|
"form_name": "Banking",
|
||||||
|
},
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
formsCategoryEnable: boolean = false;
|
formsCategoryEnable: boolean = false;
|
||||||
selectedFormsCategory: any;
|
selectedFormsCategory: any;
|
||||||
|
|
||||||
|
|
||||||
// create values for status check
|
// create values for status check
|
||||||
pdStatusCheck: any = {
|
pdStatusCheck: any = {
|
||||||
"DRAFT": 'DRAFT',
|
"DRAFT": 'DRAFT',
|
||||||
@ -64,6 +81,36 @@ pdStatusCheck :any={
|
|||||||
currentPDStatus: string;
|
currentPDStatus: string;
|
||||||
actualQuestions: number;
|
actualQuestions: number;
|
||||||
answeredQuestions: number;
|
answeredQuestions: number;
|
||||||
|
locationdata: any = [];
|
||||||
|
commentData: any = [];
|
||||||
|
customerData: any = [];
|
||||||
|
relationData: any = [];
|
||||||
|
occupationData: any = [];
|
||||||
|
public addressForm: FormGroup;
|
||||||
|
public familyForm: FormGroup;
|
||||||
|
public bankingForm: FormGroup;
|
||||||
|
|
||||||
|
public address: AbstractControl;
|
||||||
|
public addressType: AbstractControl;
|
||||||
|
public locality: AbstractControl;
|
||||||
|
public pdLocation: AbstractControl;
|
||||||
|
public commentlocality: AbstractControl;
|
||||||
|
public customerBehaviour: AbstractControl;
|
||||||
|
|
||||||
|
public person: AbstractControl;
|
||||||
|
public personOther: AbstractControl;
|
||||||
|
|
||||||
|
public members: AbstractControl;
|
||||||
|
public residence: AbstractControl;
|
||||||
|
public years: AbstractControl;
|
||||||
|
public ownership: AbstractControl;
|
||||||
|
public ownershipOther: AbstractControl;
|
||||||
|
public rent: AbstractControl;
|
||||||
|
step: any;
|
||||||
|
|
||||||
|
private notifier: NotifierService;
|
||||||
|
|
||||||
|
|
||||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private listPDComponent: ListPdComponent, private _pd: PdTrigerService,) {
|
private listPDComponent: ListPdComponent, private _pd: PdTrigerService,) {
|
||||||
@ -73,6 +120,16 @@ constructor(notifier: NotifierService, private fb: FormBuilder,private route: Ac
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.step = 0;
|
||||||
|
this.getLocation();
|
||||||
|
this.getComment();
|
||||||
|
this.getCustomer();
|
||||||
|
this.getRelation();
|
||||||
|
this.getOccupation();
|
||||||
|
|
||||||
|
this.initAddressForm();
|
||||||
|
this.initFamilyForm();
|
||||||
|
this.initBankingForm();
|
||||||
this.listPDComponent.showListView(false);
|
this.listPDComponent.showListView(false);
|
||||||
const elemSidebar = <HTMLElement>document.querySelector('.app-inner .mail-sidebar');
|
const elemSidebar = <HTMLElement>document.querySelector('.app-inner .mail-sidebar');
|
||||||
const elemContent = <HTMLElement>document.querySelector('.app-inner .main-content');
|
const elemContent = <HTMLElement>document.querySelector('.app-inner .main-content');
|
||||||
@ -86,6 +143,86 @@ constructor(notifier: NotifierService, private fb: FormBuilder,private route: Ac
|
|||||||
this.next = 1;
|
this.next = 1;
|
||||||
this.previous = 2;
|
this.previous = 2;
|
||||||
}
|
}
|
||||||
|
public initAddressForm(): void {
|
||||||
|
this.addressForm = this.fb.group({
|
||||||
|
address: ['', Validators.compose([Validators.required])],
|
||||||
|
address_type: ['', Validators.compose([Validators.required])],
|
||||||
|
locality: ['', Validators.compose([Validators.required])],
|
||||||
|
pd_location: ['', Validators.compose([Validators.required])],
|
||||||
|
comment_locality: ['', Validators.compose([Validators.required])],
|
||||||
|
customer_behaviour: ['', Validators.compose([Validators.required])],
|
||||||
|
neighbourhood: this.fb.array([ this.createNeighbour() ])
|
||||||
|
});
|
||||||
|
this.address = this.addressForm.controls['address'];
|
||||||
|
this.addressType = this.addressForm.controls['address_type'];
|
||||||
|
this.locality = this.addressForm.controls['locality'];
|
||||||
|
this.pdLocation = this.addressForm.controls['pd_location'];
|
||||||
|
this.commentlocality = this.addressForm.controls['comment_locality'];
|
||||||
|
this.customerBehaviour = this.addressForm.controls['customer_behaviour'];
|
||||||
|
}
|
||||||
|
createNeighbour(): FormGroup {
|
||||||
|
return this.fb.group({
|
||||||
|
name: ['', Validators.compose([Validators.required])],
|
||||||
|
do_you_know: ['', Validators.compose([Validators.required])],
|
||||||
|
how_long: ['', Validators.compose([Validators.required])],
|
||||||
|
is_owner: ['', Validators.compose([Validators.required])],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public initFamilyForm(): void {
|
||||||
|
this.familyForm = this.fb.group({
|
||||||
|
person: ['', Validators.compose([Validators.required])],
|
||||||
|
personOther: [''],
|
||||||
|
members: ['', Validators.compose([Validators.required])],
|
||||||
|
residence: ['', Validators.compose([Validators.required])],
|
||||||
|
years: ['', Validators.compose([Validators.required])],
|
||||||
|
ownership: ['', Validators.compose([Validators.required])],
|
||||||
|
ownershipOther: [''],
|
||||||
|
rent: [''],
|
||||||
|
earningMembers: this.fb.array([ this.createMembers()]),
|
||||||
|
nonEarningMembers: this.fb.array([ this.createNonMembers()])
|
||||||
|
});
|
||||||
|
this.person = this.familyForm.controls['person'];
|
||||||
|
this.personOther = this.familyForm.controls['personOther'];
|
||||||
|
this.members = this.familyForm.controls['members'];
|
||||||
|
this.residence = this.familyForm.controls['residence'];
|
||||||
|
this.years = this.familyForm.controls['years'];
|
||||||
|
this.ownership = this.familyForm.controls['ownership'];
|
||||||
|
this.ownershipOther = this.familyForm.controls['ownershipOther'];
|
||||||
|
|
||||||
|
this.rent = this.familyForm.controls['rent'];
|
||||||
|
}
|
||||||
|
public initBankingForm(): void {
|
||||||
|
this.bankingForm = this.fb.group({
|
||||||
|
itemRows: this.fb.array([this.createBankarray()])
|
||||||
|
});
|
||||||
|
}
|
||||||
|
createBankarray() {
|
||||||
|
return this.fb.group({
|
||||||
|
applicant_name: ['', Validators.compose([Validators.required])],
|
||||||
|
bank_name: ['', Validators.compose([Validators.required])],
|
||||||
|
account_type: ['', Validators.compose([Validators.required])],
|
||||||
|
salary: ['', Validators.compose([Validators.required])],
|
||||||
|
limit: ['', Validators.compose([Validators.required])],
|
||||||
|
is_main: ['', Validators.compose([Validators.required])],
|
||||||
|
vintage: ['', Validators.compose([Validators.required])],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
createMembers(): FormGroup {
|
||||||
|
return this.fb.group({
|
||||||
|
relation: ['', Validators.compose([Validators.required])],
|
||||||
|
segment: ['', Validators.compose([Validators.required])],
|
||||||
|
income: ['', Validators.compose([Validators.required])],
|
||||||
|
employerName: ['', Validators.compose([Validators.required])],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
createNonMembers(): FormGroup {
|
||||||
|
return this.fb.group({
|
||||||
|
relationship: ['', Validators.compose([Validators.required])],
|
||||||
|
occupation: ['', Validators.compose([Validators.required])],
|
||||||
|
retired: ['', Validators.compose([Validators.required])],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
isMac(): boolean {
|
isMac(): boolean {
|
||||||
let bool = false;
|
let bool = false;
|
||||||
if (navigator.platform.toUpperCase().indexOf('MAC') >= 0 || navigator.platform.toUpperCase().indexOf('IPAD') >= 0) {
|
if (navigator.platform.toUpperCase().indexOf('MAC') >= 0 || navigator.platform.toUpperCase().indexOf('IPAD') >= 0) {
|
||||||
@ -93,6 +230,7 @@ constructor(notifier: NotifierService, private fb: FormBuilder,private route: Ac
|
|||||||
}
|
}
|
||||||
return bool;
|
return bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
// load pd template details
|
// load pd template details
|
||||||
loadTemplates(startID: string) {
|
loadTemplates(startID: string) {
|
||||||
this._pd.loadPDTemplates(startID).subscribe(
|
this._pd.loadPDTemplates(startID).subscribe(
|
||||||
@ -122,7 +260,6 @@ loadTemplates(startID:string){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
isOver(): boolean {
|
isOver(): boolean {
|
||||||
return window.matchMedia(`(max-width: 960px)`).matches;
|
return window.matchMedia(`(max-width: 960px)`).matches;
|
||||||
}
|
}
|
||||||
@ -172,7 +309,6 @@ loadTemplates(startID:string){
|
|||||||
}, error => this.errorMessage = <any> error);
|
}, error => this.errorMessage = <any> error);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// load check box form
|
// load check box form
|
||||||
@ -271,6 +407,7 @@ optionsMapItems(items) {
|
|||||||
let optionSelectedItems = items.filter((item) => item.options == true).map((item) => item);
|
let optionSelectedItems = items.filter((item) => item.options == true).map((item) => item);
|
||||||
return optionSelectedItems.length ? optionSelectedItems : null;
|
return optionSelectedItems.length ? optionSelectedItems : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// map options type while change options
|
// map options type while change options
|
||||||
updateOptionsMapItems(key, items) {
|
updateOptionsMapItems(key, items) {
|
||||||
|
|
||||||
@ -349,6 +486,7 @@ optionsMapItems(items) {
|
|||||||
}, error => {
|
}, error => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// next save and previous save for text type questions
|
// next save and previous save for text type questions
|
||||||
saveNextPreviousText(details: any, type: number) {
|
saveNextPreviousText(details: any, type: number) {
|
||||||
let fetchAns = [];
|
let fetchAns = [];
|
||||||
@ -452,15 +590,240 @@ optionsMapItems(items) {
|
|||||||
OnSelectDirectForms(details: any) {
|
OnSelectDirectForms(details: any) {
|
||||||
this.formsCategoryEnable = true;
|
this.formsCategoryEnable = true;
|
||||||
this.selectedFormsCategory = details;
|
this.selectedFormsCategory = details;
|
||||||
|
if(details.form_id == '4') {
|
||||||
|
let params: any = {};
|
||||||
|
params.pd_id = '250';
|
||||||
|
params.pd_form_id = '250';
|
||||||
|
this._pd.retriveForm(params).subscribe(data => {
|
||||||
|
console.log('data', data);
|
||||||
|
var result = Object.keys(data.records.neighbourhood).map(function(key) {
|
||||||
|
return data.records.neighbourhood[key];
|
||||||
|
});
|
||||||
|
this.addressForm.controls.address.setValue(data.records.address);
|
||||||
|
this.addressForm.controls.pd_location.setValue(data.records.pd_location);
|
||||||
|
this.addressForm.controls.address_type.setValue(data.records.address_type);
|
||||||
|
this.addressForm.controls.comment_locality.setValue(data.records.comment_locality);
|
||||||
|
this.addressForm.controls.customer_behaviour.setValue(data.records.customer_behaviour);
|
||||||
|
this.addressForm.controls.locality.setValue(data.records.locality);
|
||||||
|
this.addressForm.controls.neighbourhood.setValue(result);
|
||||||
|
console.log('result', result);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if(details.form_id == '5') {
|
||||||
|
let params: any = {};
|
||||||
|
params.pd_id = '251';
|
||||||
|
params.pd_form_id = '251';
|
||||||
|
this._pd.retriveForm(params).subscribe(data => {
|
||||||
|
console.log('data', data);
|
||||||
|
var result = Object.keys(data.records.non_earning_members).map(function(key) {
|
||||||
|
return data.records.non_earning_members[key];
|
||||||
|
});
|
||||||
|
var earning = Object.keys(data.records.earning_members).map(function(key) {
|
||||||
|
return data.records.earning_members[key];
|
||||||
|
});
|
||||||
|
this.familyForm.controls.person.setValue(data.records.person_met);
|
||||||
|
this.familyForm.controls.members.setValue(data.records.family_members);
|
||||||
|
this.familyForm.controls.years.setValue(data.records.no_of_years);
|
||||||
|
this.familyForm.controls.ownership.setValue(data.records.ownership);
|
||||||
|
this.familyForm.controls.rent.setValue(data.records.what_rent);
|
||||||
|
this.familyForm.controls.nonEarningMembers.setValue(result);
|
||||||
|
this.familyForm.controls.earningMembers.setValue(earning);
|
||||||
|
this.familyForm.controls.residence.setValue(residence);
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if(details.form_id == '6') {
|
||||||
|
let params: any = {};
|
||||||
|
params.pd_id = '252';
|
||||||
|
params.pd_form_id = '252';
|
||||||
|
this._pd.retriveForm(params).subscribe(data => {
|
||||||
|
console.log('data', data);
|
||||||
|
var result = Object.keys(data.records.banking_details).map(function(key) {
|
||||||
|
return data.records.banking_details[key];
|
||||||
|
});
|
||||||
|
this.bankingForm.controls.itemRows.setValue(result);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
addNeighbour() {
|
||||||
|
const control = <FormArray>this.addressForm.controls['neighbourhood'];
|
||||||
|
if (control.length <= 1) {
|
||||||
|
control.push(this.createNeighbour());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
removeNeighbour(index) {
|
||||||
|
const control = <FormArray>this.addressForm.controls['neighbourhood'];
|
||||||
|
control.removeAt(index);
|
||||||
|
}
|
||||||
|
addearningMembers() {
|
||||||
|
const control = <FormArray>this.familyForm.controls['earningMembers'];
|
||||||
|
control.push(this.createMembers());
|
||||||
|
}
|
||||||
|
addMembers() {
|
||||||
|
const control = <FormArray>this.familyForm.controls['nonEarningMembers'];
|
||||||
|
control.push(this.createNonMembers());
|
||||||
|
}
|
||||||
|
deleteEarningMembers(index) {
|
||||||
|
const control = <FormArray>this.familyForm.controls['earningMembers'];
|
||||||
|
control.removeAt(index);
|
||||||
|
}
|
||||||
|
deleteMembers(index) {
|
||||||
|
const control = <FormArray>this.familyForm.controls['nonEarningMembers'];
|
||||||
|
control.removeAt(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getLocation() {
|
||||||
|
let master_name = 'PDLOCATIONAPPROACH';
|
||||||
|
this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
||||||
|
console.log('data', data);
|
||||||
|
data.records.forEach(val => {
|
||||||
|
if (val.isactive == 1) {
|
||||||
|
this.locationdata.push(val);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
getComment() {
|
||||||
|
let master_name = 'COMMENTSONLOCALITY';
|
||||||
|
this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
||||||
|
console.log('data', data);
|
||||||
|
data.records.forEach(val => {
|
||||||
|
if (val.isactive == 1) {
|
||||||
|
this.commentData.push(val);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
getCustomer() {
|
||||||
|
let master_name = 'CUSTOMERBEHAVIOUR';
|
||||||
|
this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
||||||
|
console.log('data', data);
|
||||||
|
data.records.forEach(val => {
|
||||||
|
if (val.isactive == 1) {
|
||||||
|
this.customerData.push(val);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
getRelation() {
|
||||||
|
let master_name = 'RELATIONSHIPS';
|
||||||
|
this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
||||||
|
console.log('data', data);
|
||||||
|
data.records.forEach(val => {
|
||||||
|
if (val.isactive == 1) {
|
||||||
|
this.relationData.push(val);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
getOccupation() {
|
||||||
|
let master_name = 'OCCUPATIONMEMBERS';
|
||||||
|
this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
||||||
|
console.log('data', data);
|
||||||
|
data.records.forEach(val => {
|
||||||
|
if (val.isactive == 1) {
|
||||||
|
this.occupationData.push(val);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
addBankdetails(i) {
|
||||||
|
this.step = i++;
|
||||||
|
const control = <FormArray>this.bankingForm.controls['itemRows'];
|
||||||
|
control.push(this.createBankarray());
|
||||||
|
}
|
||||||
|
deleteBankdetails(index: number) {
|
||||||
|
const control = <FormArray>this.bankingForm.controls['itemRows'];
|
||||||
|
control.removeAt(index);
|
||||||
|
}
|
||||||
// load pd view component
|
// load pd view component
|
||||||
loadPdViewCompoent() {
|
loadPdViewCompoent() {
|
||||||
this.router.navigate(['../../viewpd', this.startPD], {relativeTo: this.route});
|
this.router.navigate(['../../viewpd', this.startPD], {relativeTo: this.route});
|
||||||
|
}
|
||||||
|
onSubmit() {
|
||||||
|
if (!this.addressForm.valid) {
|
||||||
|
this.validateAllFormFields(this.addressForm);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
console.log('form', this.addressForm.value);
|
||||||
|
let records: any = {};
|
||||||
|
records.address = this.address.value;
|
||||||
|
records.address_type = this.addressType.value;
|
||||||
|
records.locality = this.locality.value;
|
||||||
|
records.pd_location = this.pdLocation.value;
|
||||||
|
records.comment_locality = this.commentlocality.value;
|
||||||
|
records.customer_behaviour = this.commentlocality.value;
|
||||||
|
records.neighbourhood = this.addressForm.value.items;
|
||||||
|
records.pdid = '250';
|
||||||
|
records.formid = '250';
|
||||||
|
records.fk_createdby = '250';
|
||||||
|
console.log('params', records);
|
||||||
|
this._pd.saveForm(records).subscribe(data => {
|
||||||
|
console.log('data', data);
|
||||||
|
let params: any = {};
|
||||||
|
params.pd_id = '250';
|
||||||
|
params.pd_form_id = '250';
|
||||||
|
console.log('param', params);
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
submitFamily() {
|
||||||
|
if (!this.familyForm.valid) {
|
||||||
|
this.validateAllFormFields(this.familyForm);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
console.log('data', this.familyForm.value);
|
||||||
|
let records: any = {};
|
||||||
|
records.no_of_years = this.years.value;
|
||||||
|
if (this.ownership.value == 'Others') {
|
||||||
|
records.ownership = this.ownershipOther.value;
|
||||||
|
} else {
|
||||||
|
records.ownership = this.ownership.value;
|
||||||
|
}
|
||||||
|
records.residence = this.residence.value;
|
||||||
|
if (this.ownership.value == 'Rented') {
|
||||||
|
records.what_rent = this.rent.value;
|
||||||
|
}
|
||||||
|
if (this.person.value == 'Other') {
|
||||||
|
records.person_met = this.personOther.value;
|
||||||
|
} else {
|
||||||
|
records.person_met = this.person.value;
|
||||||
|
}
|
||||||
|
records.family_members = this.members.value;
|
||||||
|
records.earning_members = this.familyForm.controls['earningMembers'].value;
|
||||||
|
records.non_earning_members = this.familyForm.controls['nonEarningMembers'].value;
|
||||||
|
records.pdid = '251';
|
||||||
|
records.formid = '251';
|
||||||
|
records.fk_createdby = '251';
|
||||||
|
console.log('params', records);
|
||||||
|
this._pd.saveForm(records).subscribe(data => {
|
||||||
|
console.log('data', data);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
bankSubmit() {
|
||||||
|
if (!this.bankingForm.valid) {
|
||||||
|
this.validateAllFormFields(this.bankingForm);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let records: any = {};
|
||||||
|
records.pdid = '252';
|
||||||
|
records.formid = '252';
|
||||||
|
records.fk_createdby = '252';
|
||||||
|
records.banking_details = this.bankingForm.controls['itemRows'].value;
|
||||||
|
console.log('data', records);
|
||||||
|
this._pd.saveForm(records).subscribe(data => {
|
||||||
|
console.log('data', data);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
validateAllFormFields(formGroup: FormGroup) {
|
||||||
|
Object.keys(formGroup.controls).forEach(field => {
|
||||||
|
const control = formGroup.get(field);
|
||||||
|
if (control instanceof FormControl) {
|
||||||
|
control.markAsTouched({onlySelf: true});
|
||||||
|
} else if (control instanceof FormGroup) {
|
||||||
|
this.validateAllFormFields(control);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,10 @@ import {
|
|||||||
MatRadioModule,
|
MatRadioModule,
|
||||||
MatButtonModule, MatTableModule, MatPaginatorModule,
|
MatButtonModule, MatTableModule, MatPaginatorModule,
|
||||||
MatProgressBarModule, MatDialogModule, MatSortModule,
|
MatProgressBarModule, MatDialogModule, MatSortModule,
|
||||||
MatToolbarModule,MatSelectModule, MatListModule, MatGridListModule, MatTabsModule, MatCheckboxModule, MatBadgeModule, MatExpansionModule, MatStepperModule ,MatSidenavModule ,MatMenuModule, MatButtonToggleModule } from '@angular/material';
|
MatToolbarModule, MatSelectModule, MatListModule, MatGridListModule, MatTabsModule, MatCheckboxModule,
|
||||||
|
MatBadgeModule, MatExpansionModule, MatStepperModule, MatSidenavModule, MatMenuModule, MatButtonToggleModule,
|
||||||
|
MatAutocompleteModule
|
||||||
|
} from '@angular/material';
|
||||||
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
||||||
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
|
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
|
||||||
import {FileUploadModule} from 'ng2-file-upload/ng2-file-upload';
|
import {FileUploadModule} from 'ng2-file-upload/ng2-file-upload';
|
||||||
@ -45,6 +48,7 @@ import { QcCompletedPdComponent } from './list-pd/qc-completed-pd/qc-completed-p
|
|||||||
import {ClientInfoComponent} from './list-pd/start-pd/forms/client-info/client-info.component';
|
import {ClientInfoComponent} from './list-pd/start-pd/forms/client-info/client-info.component';
|
||||||
import {SupplierInfoComponent} from './list-pd/start-pd/forms/supplier-info/supplier-info.component';
|
import {SupplierInfoComponent} from './list-pd/start-pd/forms/supplier-info/supplier-info.component';
|
||||||
import {PersonalInfoComponent} from './list-pd/start-pd/forms/personal-info/personal-info.component';
|
import {PersonalInfoComponent} from './list-pd/start-pd/forms/personal-info/personal-info.component';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Custom angular notifier options
|
* Custom angular notifier options
|
||||||
*/
|
*/
|
||||||
@ -102,10 +106,12 @@ const pdCustomNotifierOptions: NotifierOptions = {
|
|||||||
MatPaginatorModule,
|
MatPaginatorModule,
|
||||||
MatButtonModule,
|
MatButtonModule,
|
||||||
MatProgressBarModule,
|
MatProgressBarModule,
|
||||||
|
MatAutocompleteModule,
|
||||||
MatToolbarModule,
|
MatToolbarModule,
|
||||||
FlexLayoutModule,
|
FlexLayoutModule,
|
||||||
NgxDatatableModule,
|
NgxDatatableModule,
|
||||||
FormsModule,MatSlideToggleModule,
|
FormsModule,
|
||||||
|
MatSlideToggleModule,
|
||||||
MatSelectModule, MatListModule, MatGridListModule, MatTabsModule, MatBadgeModule, MatCheckboxModule, MatStepperModule, MatSidenavModule, MatMenuModule, MatButtonToggleModule,
|
MatSelectModule, MatListModule, MatGridListModule, MatTabsModule, MatBadgeModule, MatCheckboxModule, MatStepperModule, MatSidenavModule, MatMenuModule, MatButtonToggleModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
FileUploadModule,
|
FileUploadModule,
|
||||||
@ -120,4 +126,5 @@ const pdCustomNotifierOptions: NotifierOptions = {
|
|||||||
providers: [PdTrigerService, GetGeometricLocationService],
|
providers: [PdTrigerService, GetGeometricLocationService],
|
||||||
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent]
|
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent]
|
||||||
})
|
})
|
||||||
export class ManagePdModule { }
|
export class ManagePdModule {
|
||||||
|
}
|
||||||
|
|||||||
@ -12,12 +12,14 @@ import { AwsService } from '../../AwsService/aws.service';
|
|||||||
import {environment} from 'environments/environment'
|
import {environment} from 'environments/environment'
|
||||||
|
|
||||||
const currentdate = new Date().toJSON().slice(0, 19).replace('T', ' ');
|
const currentdate = new Date().toJSON().slice(0, 19).replace('T', ' ');
|
||||||
|
|
||||||
/** Master Interface */
|
/** Master Interface */
|
||||||
export interface Master {
|
export interface Master {
|
||||||
master_id: number;
|
master_id: number;
|
||||||
master_name: string;
|
master_name: string;
|
||||||
constant_name: string;
|
constant_name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
|
|
||||||
|
|
||||||
@ -25,22 +27,41 @@ export class PdTrigerService {
|
|||||||
|
|
||||||
// private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
// private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
||||||
// private apiUrl = "http://192.168.0.5:9999/AWSEC2/sparqapi/api/";
|
// private apiUrl = "http://192.168.0.5:9999/AWSEC2/sparqapi/api/";
|
||||||
//private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
|
||||||
private apiUrl = environment.apiEndpoint;
|
|
||||||
MAP_API_KEY: string;
|
MAP_API_KEY: string;
|
||||||
MAP_API_URL: string;
|
MAP_API_URL: string;
|
||||||
|
// private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
||||||
|
private apiUrl = environment.apiEndpoint;
|
||||||
|
|
||||||
constructor(private _http: HttpClient,
|
constructor(private _http: HttpClient,
|
||||||
private _aws: AwsService) {
|
private _aws: AwsService) {
|
||||||
this.MAP_API_KEY = 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'
|
this.MAP_API_KEY = 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'
|
||||||
this.MAP_API_URL = `https://maps.googleapis.com/maps/api/geocode/json?key=${this.MAP_API_KEY}&address=`;
|
this.MAP_API_URL = `https://maps.googleapis.com/maps/api/geocode/json?key=${this.MAP_API_KEY}&address=`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// get add pd master details
|
// get add pd master details
|
||||||
getAllMasterDatas(TableName: string): Observable<any> {
|
getAllMasterDatas(TableName: string): Observable<any> {
|
||||||
return this._http.post<any>(this.apiUrl+'getListOfMaster', { "master_name":TableName })
|
console.log('table', TableName);
|
||||||
|
return this._http.post(this.apiUrl + 'getListOfMaster', {"master_name": TableName})
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
saveForm(records): Observable<any> {
|
||||||
|
console.log('table', records);
|
||||||
|
let params = {records}
|
||||||
|
return this._http.post(this.apiUrl + 'savePDFormDetails', params)
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('role', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
retriveForm(params): Observable<any> {
|
||||||
|
console.log('data', params);
|
||||||
|
return this._http.post(this.apiUrl + 'getPDFormDetails', params)
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('role', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
//get product and subproduct master details
|
//get product and subproduct master details
|
||||||
getProductsDetails(): Observable<any> {
|
getProductsDetails(): Observable<any> {
|
||||||
return this._http.get<any>(this.apiUrl + 'getListOfProducts')
|
return this._http.get<any>(this.apiUrl + 'getListOfProducts')
|
||||||
@ -48,6 +69,7 @@ export class PdTrigerService {
|
|||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// get lenders list
|
// get lenders list
|
||||||
getLenderDetails(): Observable<any> {
|
getLenderDetails(): Observable<any> {
|
||||||
return this._http.get<any>(this.apiUrl + 'getListOfLenders')
|
return this._http.get<any>(this.apiUrl + 'getListOfLenders')
|
||||||
@ -55,6 +77,7 @@ export class PdTrigerService {
|
|||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// get customers list
|
// get customers list
|
||||||
getCustomersDetails(): Observable<any> {
|
getCustomersDetails(): Observable<any> {
|
||||||
return this._http.get<any>(this.apiUrl + 'getListOfCustomerSegments')
|
return this._http.get<any>(this.apiUrl + 'getListOfCustomerSegments')
|
||||||
@ -62,6 +85,7 @@ export class PdTrigerService {
|
|||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// get Pd Allocation type details list
|
// get Pd Allocation type details list
|
||||||
getPDAllocationDetails(): Observable<any> {
|
getPDAllocationDetails(): Observable<any> {
|
||||||
return this._http.get<any>(this.apiUrl + 'getListOfPDAllocationTypes')
|
return this._http.get<any>(this.apiUrl + 'getListOfPDAllocationTypes')
|
||||||
@ -69,6 +93,7 @@ export class PdTrigerService {
|
|||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// get state and city details
|
// get state and city details
|
||||||
getStateCityDetails(): Observable<any> {
|
getStateCityDetails(): Observable<any> {
|
||||||
return this._http.get<any>(this.apiUrl + 'getListOfStatesAndCities')
|
return this._http.get<any>(this.apiUrl + 'getListOfStatesAndCities')
|
||||||
@ -76,6 +101,7 @@ export class PdTrigerService {
|
|||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// get pd type and allocation type details
|
// get pd type and allocation type details
|
||||||
getPDTypeDetails(): Observable<any> {
|
getPDTypeDetails(): Observable<any> {
|
||||||
return this._http.get<any>(this.apiUrl + 'getListOfPDAllocationTypes')
|
return this._http.get<any>(this.apiUrl + 'getListOfPDAllocationTypes')
|
||||||
@ -83,6 +109,7 @@ export class PdTrigerService {
|
|||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// add pd details
|
// 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)
|
||||||
@ -90,6 +117,7 @@ export class PdTrigerService {
|
|||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// get pd details
|
// 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")
|
||||||
@ -116,6 +144,7 @@ export class PdTrigerService {
|
|||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// update pd master details
|
// update pd master details
|
||||||
editPdMasterDetails(editData: any, status: string): Observable<any> {
|
editPdMasterDetails(editData: any, status: string): Observable<any> {
|
||||||
editData.pd_status = status;
|
editData.pd_status = status;
|
||||||
@ -127,6 +156,7 @@ export class PdTrigerService {
|
|||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// update pd applicant
|
// update pd applicant
|
||||||
updatePdApplicant(editData: any): Observable<any> {
|
updatePdApplicant(editData: any): Observable<any> {
|
||||||
// editData.fk_updatedby = this._aws.getlocale();
|
// editData.fk_updatedby = this._aws.getlocale();
|
||||||
@ -145,6 +175,7 @@ export class PdTrigerService {
|
|||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// update pd officer
|
// update pd officer
|
||||||
updatePdOfficer(updateData: any): Observable<any> {
|
updatePdOfficer(updateData: any): Observable<any> {
|
||||||
updateData.fk_updatedby = this._aws.getlocale();
|
updateData.fk_updatedby = this._aws.getlocale();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user