Fairoj : vendor discussion enabled and vendor forms related changes
This commit is contained in:
parent
a40bf2e304
commit
f1ba8b8f0e
@ -63,7 +63,7 @@ export class PdAllocationComponent implements OnInit {
|
||||
else {
|
||||
let updateData = {
|
||||
"pd_id":this.data.pd_id,
|
||||
"fk_pd_allocated_to":allocateDetails.userid,
|
||||
"vendor_pdofficer":allocateDetails.userid,
|
||||
"vendor_status":"ALLOCATED",
|
||||
}
|
||||
this._pd.updatePdOfficer(updateData).subscribe(
|
||||
|
||||
@ -0,0 +1,977 @@
|
||||
<h2 mat-dialog-title class="paragraph_change">
|
||||
<div fxFlex="70" align="left" style="padding: 10px !important;">
|
||||
<span>{{pdDetails.applicants_details[0].applicant_name}} {{pdDetails.lender_applicant_id ? '('+pdDetails.lender_applicant_id+')' : ''}}, {{pdDetails.customer_segment_abbr}} <span
|
||||
*ngIf="pdDetails.subproduct_abbr">-
|
||||
{{pdDetails.subproduct_abbr}} </span></span><br>
|
||||
FI Questions
|
||||
</div>
|
||||
<div fxFlex="30" align="end" style="padding: 10px !important;">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close"
|
||||
matTooltipPosition="right" mat-dialog-close style="color:#e24533;background: white">
|
||||
<mat-icon>close</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</h2>
|
||||
|
||||
<!-- <mat-dialog-content style="border-bottom: 2px solid #e2412f8f;"> -->
|
||||
<div class="whole_form">
|
||||
<form [formGroup]="firstFormGroup">
|
||||
<mat-vertical-stepper formArrayName="questions" #stepper>
|
||||
<mat-step formGroupName="0" [stepControl]="questions?.get([0])">
|
||||
<!-- <form [formGroup]="firstFormGroup"> -->
|
||||
<!-- {{firstFormGroup.get('questions').at(0).value | json}} -->
|
||||
<ng-template matStepLabel>General Section</ng-template>
|
||||
<div formArrayName="individuals" fxLayout="column">
|
||||
<div fxLayout="row">
|
||||
<div fxLayout="column" fxFlex="80%">
|
||||
<strong> Applicants</strong>
|
||||
</div>
|
||||
<div fxLayout="column" align="end">
|
||||
<strong> Is Person Met</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngFor="let applicant of getQuestionControl().at(0).get('individuals')['controls'];let a_i=index" [formGroupName]="a_i" style="margin-top: 1%">
|
||||
<div fxLayout="row">
|
||||
<div fxLayout="column" fxFlex="80%">
|
||||
{{applicant.value.applicant_name}}
|
||||
</div>
|
||||
<div fxLayout="column" align="end">
|
||||
<!-- <mat-label>Is Person Met</mat-label> -->
|
||||
<mat-slide-toggle
|
||||
class="example-margin"
|
||||
formControlName="is_person_met">
|
||||
|
||||
</mat-slide-toggle>
|
||||
</div>
|
||||
</div><br/>
|
||||
<div *ngIf="applicant.value.is_person_met == true">
|
||||
<div fxLayout="row" fxLayoutAlign="space-evenly">
|
||||
<div fxLayout="column" align="center" >
|
||||
<!-- <ion-thumbnail slot="center"> -->
|
||||
<div fxLayout="row" align="center">
|
||||
<img ngxViewer text="PD Photos" title="Person Met Pic" class="ion-text-center" *ngIf="applicant.value.is_person_met_pic != ''"
|
||||
src="{{applicant.value.is_person_met_pic}}" style="max-width: 70px;max-height: 70px" >
|
||||
</div>
|
||||
<!-- </ion-thumbnail> -->
|
||||
|
||||
<!-- <ion-button (click)="saveApplicantInfo(applicant,'is_person_met_pic')"
|
||||
fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon></ion-button><br/> -->
|
||||
<mat-label>Selfie of the Person Met</mat-label>
|
||||
</div>
|
||||
<div fxLayout="column" align="center" fxLayoutAlign="center">
|
||||
<div fxLayout="row" fxLayoutAlign="center center">
|
||||
<img ngxViewer text="PD Photos" title="ID Proof" class="ion-text-center" *ngIf="applicant.value.is_person_met_id_proof != ''"
|
||||
src="{{applicant.value.is_person_met_id_proof}}" style="max-width: 70px;max-height: 70px" >
|
||||
</div>
|
||||
<!-- <ion-button
|
||||
(click)="saveApplicantInfo(applicant,'is_person_met_id_proof')"
|
||||
fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon></ion-button><br/> -->
|
||||
<mat-label>ID Proof of the person</mat-label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr style=" width: 100%;
|
||||
background-color: #dcd7d7;
|
||||
border: 10px;
|
||||
height: 2px;"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div *ngIf="remarksEnableFun()">
|
||||
<!-- <div fxLayout="row">
|
||||
<div fxLayout="column"> -->
|
||||
<mat-form-field appearance="fill" style="margin-top: 1%;justify-content: center">
|
||||
<mat-label>Name of Person Met</mat-label>
|
||||
<input matInput type="text" formControlName="person_met_entered" />
|
||||
<mat-error align="end" style="font-size:13px" *ngIf="getQuestionControl().at(0)['controls']['person_met_entered'].errors?.required || getQuestionControl().at(0)['controls']['person_met_entered'].touched">Person Name required</mat-error>
|
||||
</mat-form-field>
|
||||
<!-- </div> -->
|
||||
<!-- <div fxLayout="column" size="3" align="center" *ngIf="getQuestionControl().at(0).value.person_met_entered != ''">
|
||||
<div fxLayout="row" fxLayoutAlign="center center">
|
||||
<img ngxViewer text="PD Photos" title="Person Met Image" *ngIf="getQuestionControl().at(0).value.person_met_entered_pic != ''"
|
||||
src="{{getQuestionControl().at(0).value.person_met_entered_pic}}" style="max-width: 80px;max-height: 80px">
|
||||
</div>
|
||||
|
||||
<ion-button (click)="capturePic(getQuestionControl().at(0)['controls'].person_met_entered_pic, 'Person Met Pic',getQuestionControl().at(0).value.form_id)"
|
||||
fill="clear" ><ion-icon style="font-size: 20px" name="camera"></ion-icon><span style="color: red;
|
||||
font-size: 18px;
|
||||
padding: 0px;
|
||||
margin: 0px;">*</span></ion-button>
|
||||
<mat-label *ngIf="getQuestionControl().at(0).value.person_met_entered_pic == ''" style="font-size: 11px">Capture the Image </mat-label>
|
||||
<mat-error align="end" style="font-size:12px" *ngIf="getQuestionControl().at(0)['controls']['person_met_entered_pic'].errors?.required || getQuestionControl().at(0)['controls']['person_met_entered_pic'].touched">Person Met pic is Required</mat-error>
|
||||
</div> -->
|
||||
<!-- </div> -->
|
||||
<div *ngIf="getQuestionControl().at(0).value.person_met_entered != ''">
|
||||
<div fxLayout="row" fxLayoutAlign="space-evenly">
|
||||
<div fxLayout="column" align="center" fxLayoutAlign="center center">
|
||||
<!-- <ion-thumbnail slot="center"> -->
|
||||
<div fxLayout="row" fxLayoutAlign="center center">
|
||||
<img ngxViewer text="PD Photos" title="Person Met Pic" class="ion-text-center" *ngIf="getQuestionControl().at(0).value.person_met_entered_pic != ''"
|
||||
src="{{getQuestionControl().at(0).value.person_met_entered_pic}}" style="max-width: 70px;max-height: 70px" >
|
||||
</div>
|
||||
<!-- </ion-thumbnail> -->
|
||||
|
||||
<!-- <ion-button (click)="capturePic(getQuestionControl().at(0)['controls'].person_met_entered_pic, 'Person Met Pic',getQuestionControl().at(0).value.form_id)"
|
||||
fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon><span style="color: red;
|
||||
font-size: 18px;
|
||||
padding: 0px;
|
||||
margin: 0px;">*</span></ion-button><br/> -->
|
||||
<mat-label>Selfie of the Person Met</mat-label>
|
||||
<mat-error align="end" style="font-size:12px" *ngIf="getQuestionControl().at(0)['controls']['person_met_entered_pic'].errors?.required ">Required</mat-error>
|
||||
</div>
|
||||
<div fxLayout="column" align="center" fxLayoutAlign="center center">
|
||||
<div fxLayout="row" fxLayoutAlign="center center">
|
||||
<img ngxViewer text="PD Photos" title="ID Proof" class="ion-text-center" *ngIf="getQuestionControl().at(0).value.person_met_entered_id_proof != ''"
|
||||
src="{{getQuestionControl().at(0).value.person_met_entered_id_proof}}" style="max-width: 70px;max-height: 70px" >
|
||||
</div>
|
||||
<!-- <ion-button
|
||||
(click)="capturePic(getQuestionControl().at(0)['controls'].person_met_entered_id_proof, 'Id Proof Pic',getQuestionControl().at(0).value.form_id)"
|
||||
fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon></ion-button><br/> -->
|
||||
<mat-label>ID Proof of the person</mat-label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<mat-form-field appearance="fill">
|
||||
<mat-label>Designation</mat-label>
|
||||
<mat-select formControlName="designation_entered">
|
||||
<ngx-mat-select-search [formControl]="designationFilterCtrl"
|
||||
[placeholderLabel]="'Search Designation...'"
|
||||
[noEntriesFoundLabel]="'no matching records found'"></ngx-mat-select-search>
|
||||
<mat-option *ngFor="let item of filteredcompanyRelationshipList | async" [value]="item.name.split('of')[0]">{{item.name.split('of')[0]}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error align="end" style="font-size:13px" *ngIf="getQuestionControl().at(0)['controls']['designation_entered'].errors?.required || getQuestionControl().at(0)['controls']['designation_entered'].touched">Designation required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="fill">
|
||||
<mat-label>Relation</mat-label>
|
||||
<mat-select formControlName="relation_entered">
|
||||
<ngx-mat-select-search [formControl]="relationFilterCtrl"
|
||||
[placeholderLabel]="'Search Relation...'"
|
||||
[noEntriesFoundLabel]="'no matching records found'"></ngx-mat-select-search>
|
||||
<mat-option *ngFor="let item of filteredrelationshipList | async" [value]="item.name">{{item.name}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error align="end" style="font-size:13px" *ngIf="getQuestionControl().at(0)['controls']['relation_entered'].errors?.required || getQuestionControl().at(0)['controls']['relation_entered'].touched">Relation required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="fill">
|
||||
<mat-label>Relation to</mat-label>
|
||||
<mat-select formControlName="relation_to">
|
||||
<mat-option *ngFor="let applicant of getQuestionControl().at(0).get('individuals')['controls'];let a_i=index" [value]="applicant.value.applicant_name">{{applicant.value.applicant_name}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error align="end" style="font-size:13px" *ngIf="getQuestionControl().at(0)['controls']['relation_to'].errors?.required || getQuestionControl().at(0)['controls']['relation_to'].touched">Relation to required</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!-- <mat-form-field *ngIf="remarksEnableFun()" appearance="fill">
|
||||
<mat-label>Remarks</mat-label>
|
||||
<textarea matInput type="text" formControlName="general_remark"></textarea>
|
||||
<mat-error align="end" style="font-size:13px" *ngIf="getQuestionControl().at(0)['controls']['general_remark'].errors?.required || getQuestionControl().at(0)['controls']['general_remark'].touched">Remarks Required</mat-error>
|
||||
</mat-form-field> -->
|
||||
<!-- <mat-form-field>
|
||||
<mat-label>Name</mat-label>
|
||||
<input matInput placeholder="Last name, First name" formControlName="firstCtrl" required>
|
||||
</mat-form-field>
|
||||
<mat-select placeholder="Sample Select">
|
||||
<mat-option value = "0">Value 1</mat-option>
|
||||
<mat-option value = "1">Value 2</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>Name</mat-label>
|
||||
<input matInput placeholder="another Text" required>
|
||||
</mat-form-field> -->
|
||||
<div class="mat-button-div">
|
||||
<button mat-raised-button matStepperNext>Next <mat-icon>keyboard_arrow_right</mat-icon></button>
|
||||
<!-- <ion-button class="ion-class="ion-float-right"" matStepperNext>next <ion-icon name="arrow-forward-circle-outline"></ion-icon></ion-button> -->
|
||||
</div>
|
||||
<!-- </form> -->
|
||||
</mat-step>
|
||||
|
||||
<mat-step formGroupName="1" [stepControl]="questions?.get([1])">
|
||||
<!-- {{getQuestionControl().at(1) | json}} -->
|
||||
<!-- <form [formGroup]="secondFormGroup"> -->
|
||||
<ng-template matStepLabel>Address Information</ng-template>
|
||||
<mat-form-field style="width: 100%">
|
||||
|
||||
<textarea matInput style="text-transform: uppercase;" placeholder="Address at which FI was initiated" type="text" name="address" formControlName="address" rows = "{{countRowsForTextarea(getQuestionControl().at(1).get('address').value)}}"></textarea>
|
||||
|
||||
<!-- <textarea matInput style="text-transform: uppercase" placeholder="Address" name="address" formControlName="address"
|
||||
cdkTextareaAutosize
|
||||
#autosize="cdkTextareaAutosize"
|
||||
cdkAutosizeMinRows="2"
|
||||
cdkAutosizeMaxRows="5"></textarea> -->
|
||||
<!-- <mat-error *ngIf="pdforms.controls['lenAppID'].hasError('required')">Applicant ID Required</mat-error> -->
|
||||
<mat-error align="end" style="font-size:13px" *ngIf="getQuestionControl().at(1)['controls']['address'].errors?.required || getQuestionControl().at(1)['controls']['address'].touched">Address is Required</mat-error>
|
||||
</mat-form-field>
|
||||
<!-- -->
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="State" formControlName="state" (selectionChange)="getCityAndPincodeDetails($event.value,0,1)">
|
||||
<mat-option>
|
||||
<ngx-mat-select-search formControlName="stateSearch" (keyup)="searchFun('',0,'state',1)"
|
||||
[placeholderLabel]="'Find State'" [noEntriesFoundLabel]="'No Matching Result'">
|
||||
<mat-icon ngxMatSelectSearchClear>close</mat-icon>
|
||||
</ngx-mat-select-search>
|
||||
|
||||
</mat-option>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let SL of filteredState | async" [value]="SL.state_id">{{SL.name}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error align="end" style="font-size:13px" *ngIf="getQuestionControl().at(1)['controls']['state'].errors?.required || getQuestionControl().at(1)['controls']['state'].touched">State is Required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="City" formControlName="city">
|
||||
<mat-option>
|
||||
<ngx-mat-select-search formControlName="citySearch" (keyup)="searchFun(getQuestionControl().at(1),0,'city',1)"
|
||||
[placeholderLabel]="'Find City'"
|
||||
[noEntriesFoundLabel]="'No Matching Result'">
|
||||
<mat-icon ngxMatSelectSearchClear>close</mat-icon>
|
||||
</ngx-mat-select-search>
|
||||
</mat-option>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let CL of cityDataValue[0]" [value]="CL.city_id">{{CL.city_name}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error align="end" style="font-size:13px" *ngIf="getQuestionControl().at(1)['controls']['city'].errors?.required || getQuestionControl().at(1)['controls']['city'].touched">City is Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Pincode" formControlName="pincode">
|
||||
<mat-option>
|
||||
<ngx-mat-select-search formControlName="pinSearch" (keyup)="searchFun(getQuestionControl().at(1),0,'pin',1)"
|
||||
[placeholderLabel]="'Search Pincode'"
|
||||
[noEntriesFoundLabel]="'No Matching Result'">
|
||||
<mat-icon ngxMatSelectSearchClear>close</mat-icon>
|
||||
</ngx-mat-select-search>
|
||||
</mat-option>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let PL of pincodeDataValue[0]" [value]="PL.pincode_id">{{PL.pincode}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error align="end" style="font-size:13px" *ngIf="getQuestionControl().at(1)['controls']['pincode'].errors?.required || getQuestionControl().at(1)['controls']['pincode'].touched">Pincode is Required</mat-error>
|
||||
</mat-form-field>
|
||||
<div>
|
||||
<div fxLayout="row">
|
||||
<div fxLayout="column" class="ion-align-self-start">
|
||||
<label class="toggle_label"> Is this the address where FI visit is being done ? <strong>(
|
||||
{{getQuestionControl().at(1)['controls']['is_pd_done_on_initiated_address'].value===true ? 'Yes' : 'No'}}
|
||||
)</strong></label>
|
||||
</div>
|
||||
<div fxLayout="column" class="ion-align-self-end">
|
||||
<mat-slide-toggle class="ion-float-right" color="primary" formControlName="is_pd_done_on_initiated_address"
|
||||
></mat-slide-toggle>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="getQuestionControl().at(1)['controls']['is_pd_done_on_initiated_address'].value === false">
|
||||
<br/> <hr class="line">
|
||||
<div formArrayName="alternative_addresses" >
|
||||
<div *ngFor="let alternative of getQuestionControl().at(1)['controls'].alternative_addresses['controls']; let i=index" [formGroupName]="i">
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Enter actual FI address" formControlName="alternative_address"
|
||||
[value]="alternative.get('alternative_address').value | titlecase" autocomplete="off">
|
||||
<mat-error *ngIf="alternative.controls['alternative_address'].hasError('required')">Alternative Address Required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="State" formControlName="alternative_state"
|
||||
(selectionChange)="getCityAndPincodeDetails($event.value,i,2)">
|
||||
<mat-option>
|
||||
<ngx-mat-select-search formControlName="stateSearch" (keyup)="searchFun(alternative,i,'state','')"
|
||||
[placeholderLabel]="'Find State'" [noEntriesFoundLabel]="'No Matching Result'">
|
||||
<mat-icon ngxMatSelectSearchClear>close</mat-icon>
|
||||
</ngx-mat-select-search>
|
||||
|
||||
</mat-option>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let SL of filteredState | async" [value]="SL.state_id">{{SL.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="City" formControlName="alternative_city">
|
||||
<mat-option>
|
||||
<ngx-mat-select-search formControlName="citySearch" (keyup)="searchFun(alternative,i,'city',2)"
|
||||
[placeholderLabel]="'Find City'"
|
||||
[noEntriesFoundLabel]="'No Matching Result'">
|
||||
<mat-icon ngxMatSelectSearchClear>close</mat-icon>
|
||||
</ngx-mat-select-search>
|
||||
</mat-option>
|
||||
<mat-option> Select </mat-option>
|
||||
<mat-option *ngFor="let CL of alertnativeCityData[i]" [value]="CL.city_id">{{CL.city_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Pincode" formControlName="alternative_pincode">
|
||||
<mat-option>
|
||||
<ngx-mat-select-search formControlName="pinSearch" (keyup)="searchFun(alternative,i,'pin',2)"
|
||||
[placeholderLabel]="'Search Pincode'"
|
||||
[noEntriesFoundLabel]="'No Matching Result'">
|
||||
<mat-icon ngxMatSelectSearchClear>close</mat-icon>
|
||||
</ngx-mat-select-search>
|
||||
</mat-option>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let PL of alertnativePincodeData[i]" [value]="PL.pincode_id">{{PL.pincode}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 100%" *ngIf="alternative.get('alternative_pincode').value == 1">
|
||||
<input matInput autocomplete="off" placeholder="Specify Pincode " required
|
||||
formControlName="alternative_pincode_others" OnlyNumber type="text">
|
||||
<mat-error *ngIf="alternative.controls['alternative_pincode_others'].hasError('required')">Pincode Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
|
||||
<mat-form-field style="width: 96%">
|
||||
<input matInput placeholder="Reason for change in FI visit address" formControlName="reason_for_alternative_address" autocomplete="off">
|
||||
<mat-error *ngIf="alternative.controls['reason_for_alternative_address'].hasError('required')">Reason Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<hr class="line">
|
||||
</div>
|
||||
<mat-form-field style="width: 100%">
|
||||
<!-- (selectionChange)="setOthers($event.value,'',3);selectedAddressType($event.source.triggerValue)" -->
|
||||
<mat-select placeholder="Address Type" name="address_type" formControlName="address_type" (selectionChange)="selectedAddressType($event.source.triggerValue)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let m_addressType of addressTypes" [value]="m_addressType.address_type_id"> {{m_addressType.address_type}} </mat-option>
|
||||
</mat-select>
|
||||
<mat-error align="end" style="font-size:13px" *ngIf="getQuestionControl().at(1)['controls']['address_type'].errors?.required || getQuestionControl().at(1)['controls']['address_type'].touched">Address Type is Required</mat-error>
|
||||
</mat-form-field>
|
||||
<div fxLayout="column" fxLayoutAlign="start stretch" *ngIf="getQuestionControl().at(1).get('address_type').value == 1 ">
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Specify Address Type" type="text" name="address_type_others" formControlName="address_type_others" autocomplete="off" (change)="selectedAddressType($event.target.value)">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select matInput placeholder="Locality" name="locality" formControlName="locality" required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="{{m_locality.locality_id}}"
|
||||
*ngFor="let m_locality of locality">{{m_locality.locality_name}}
|
||||
</mat-option>
|
||||
|
||||
</mat-select>
|
||||
<mat-error align="end" style="font-size:13px" *ngIf="getQuestionControl().at(1)['controls']['locality'].errors?.required || getQuestionControl().at(1)['controls']['locality'].touched">Locality is Required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%" *ngIf="getQuestionControl().at(1).get('locality').value == 1">
|
||||
<input matInput placeholder="Specify Locality" name="locality_others"
|
||||
formControlName="locality_others" autocomplete="off">
|
||||
</mat-form-field>
|
||||
<!-- <span *ngIf="split_customer_abbr != 'SAL'"> -->
|
||||
<!-- [placeholder]="placeholderName[0] ? placeholderName[0] : 'Estimated area of the (Address Type)' " -->
|
||||
<mat-form-field style="width: 100%" *ngIf="getQuestionControl().at(1)['controls']['estimated_area']">
|
||||
<input matInput [placeholder]=" placeholderName != '' ? placeholderName : 'Estimated area of the (Address Type)'" formControlName="estimated_area"
|
||||
type="number">
|
||||
<mat-error align="end" style="font-size:13px" *ngIf="getQuestionControl().at(1)['controls']['estimated_area'].errors?.required || getQuestionControl().at(1)['controls']['estimated_area'].touched">Estimated area is Required</mat-error>
|
||||
</mat-form-field>
|
||||
<div *ngIf="getQuestionControl().at(1)['controls']['uom']">
|
||||
<mat-form-field style="width: 100%" >
|
||||
<mat-select placeholder="Unit of Measurement" formControlName="uom" >
|
||||
<mat-option >Select</mat-option>
|
||||
<mat-option *ngFor="let uom of uomData" value="{{uom.uom_id}}">{{uom.name}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error align="end" style="font-size:13px" *ngIf="getQuestionControl().at(1)['controls']['uom'].errors?.required || getQuestionControl().at(1)['controls']['uom'].touched">UOM is Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="getQuestionControl().at(1).get('uom').value == 1 " style="width: 100%">
|
||||
<input matInput placeholder="Specify UOM" formControlName="uom_others"
|
||||
autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!-- </span> -->
|
||||
|
||||
<div fxLayout="row">
|
||||
<div fxLayout="column" fxFlex="85%">
|
||||
<mat-form-field appearance="fill" >
|
||||
<mat-label>Approach to FI location</mat-label>
|
||||
<mat-select formControlName="pd_location">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let data of pdlocation" [value]="data.pd_location_approach_id">{{data.description}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error align="end" style="font-size:13px" *ngIf="getQuestionControl().at(1)['controls']['pd_location'].errors?.required || getQuestionControl().at(1)['controls']['pd_location'].touched">Approach to pd location is Required</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="column" align="center" *ngIf="getQuestionControl().at(1).value.pd_location != ''">
|
||||
<div fxLayout="row" fxLayoutAlign="center center">
|
||||
<img ngxViewer text="PD Photos" title="Approach to FI Location" *ngIf="getQuestionControl().at(1).value.pd_location_pic != ''"
|
||||
src="{{getQuestionControl().at(1).value.pd_location_pic}}" style="max-width: 80px;max-height: 80px">
|
||||
</div>
|
||||
|
||||
<!-- <ion-button (click)="capturePic(getQuestionControl().at(1)['controls'].pd_location_pic, 'Approach to PD Location ( ' + currentDate + ' )',getQuestionControl().at(1).value.form_id)"
|
||||
fill="clear" ><ion-icon style="font-size: 20px" name="camera"></ion-icon><span style="color: red;
|
||||
font-size: 18px;
|
||||
padding: 0px;
|
||||
margin: 0px;">*</span></ion-button> -->
|
||||
<!-- <mat-label *ngIf="getQuestionControl().at(1).value.pd_location_pic == ''" style="font-size: 11px">Capture the Image </mat-label> -->
|
||||
<mat-error align="end" style="font-size:12px" *ngIf="getQuestionControl().at(1)['controls']['pd_location_pic'].errors?.required || getQuestionControl().at(1)['controls']['pd_location_pic'].touched">Approach to pd location pic is Required</mat-error>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row">
|
||||
<div fxLayout="column" fxFlex="85%">
|
||||
<mat-form-field appearance="fill">
|
||||
<mat-label>Comment on locality</mat-label>
|
||||
<mat-select formControlName="comment_locality">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="{{data.comments_on_locality_id}}"
|
||||
*ngFor="let data of cmtlocality">{{data.rating | titlecase}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error align="end" style="font-size:12px" *ngIf="getQuestionControl().at(1)['controls']['comment_locality'].errors?.required || getQuestionControl().at(1)['controls']['comment_locality'].touched">Comment on locality is Required</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mat-button-div">
|
||||
<button mat-stroked-button matStepperPrevious>Back</button>
|
||||
<button mat-raised-button matStepperNext>Next <mat-icon>keyboard_arrow_right</mat-icon></button>
|
||||
</div>
|
||||
<!-- </form> -->
|
||||
</mat-step>
|
||||
|
||||
<mat-step formGroupName="2" [stepControl]="questions?.get([2])" *ngIf="customer_seg_abbr != 'SAL'">
|
||||
<!-- <form [formGroup]="secondFormGroup"> -->
|
||||
<!-- START OF BUSINESS GROUP -->
|
||||
<ng-template matStepLabel>Business Information</ng-template>
|
||||
|
||||
<div formArrayName="business_group">
|
||||
<!-- START OF BUSINESS INFO -->
|
||||
<div formGroupName="0">
|
||||
<mat-form-field appearance="fill">
|
||||
<mat-label>No. of employees sighted by FI officer during visit</mat-label>
|
||||
<input matInput type="number" formControlName="officer_total">
|
||||
<mat-error align="end" style="font-size:12px" *ngIf="getBusinessInfoControls().at(0)['controls']['officer_total'].errors?.required || getBusinessInfoControls().at(0)['controls']['officer_total'].touched"> Required</mat-error>
|
||||
</mat-form-field>
|
||||
<!-- *ngIf="getQuestionControl().at(2).get('business_group').at(0).value.was_the_company_name_board_sighted" -->
|
||||
<div fxLayout="row">
|
||||
<div fxLayout="column" fxFlex="85%">
|
||||
<mat-form-field appearance="fill">
|
||||
<mat-label>Was the company name board sighted? </mat-label>
|
||||
<mat-select placeholder="Select" formControlName="was_the_company_name_board_sighted">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
<mat-error align="end" style="font-size:12px" *ngIf="getBusinessInfoControls().at(0)['controls']['was_the_company_name_board_sighted'].errors?.required || getBusinessInfoControls().at(0)['controls']['was_the_company_name_board_sighted'].touched"> Required</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="column" align="center" *ngIf="getBusinessInfoControls().at(0).value.was_the_company_name_board_sighted == 'yes' || getBusinessInfoControls().at(0).value.was_the_company_name_board_sighted == 'no'">
|
||||
<div fxLayout="row" fxLayoutAlign="center center">
|
||||
<img ngxViewer text="PD Photos" title="Name Board" *ngIf="getBusinessInfoControls().at(0).value.name_board_sighted_pic != ''"
|
||||
src="{{getBusinessInfoControls().at(0).value.name_board_sighted_pic}}" style="max-width: 80px;max-height: 80px">
|
||||
</div>
|
||||
<!-- <ion-button (click)="capturePic(getBusinessInfoControls().at(0)['controls'].name_board_sighted_pic,'Name Board Seen',getBusinessInfoControls().at(0).value.form_id)"
|
||||
fill="clear" ><ion-icon name="camera"></ion-icon><span style="color: red;
|
||||
font-size: 18px;
|
||||
padding: 0px;
|
||||
margin: 0px;">*</span></ion-button><br/> -->
|
||||
<!-- <mat-label *ngIf="getBusinessInfoControls().at(0).value.name_board_sighted_pic == ''" style="font-size: 11px">Capture the Image</mat-label> -->
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row">
|
||||
<div fxLayout="column" fxFlex="85%">
|
||||
<mat-form-field appearance="fill">
|
||||
<mat-label>Business Documents sighted </mat-label>
|
||||
<mat-select placeholder="Select" formControlName="documents_sighted" (selectionChange)= "onDocsSightedChange($event.value,1)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
<mat-error align="end" style="font-size:12px" *ngIf="getBusinessInfoControls().at(0)['controls']['documents_sighted'].errors?.required || getBusinessInfoControls().at(0)['controls']['documents_sighted'].touched"> Required</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!-- <div fxLayout="column" size="3" align="center">
|
||||
<ion-button fill="clear" ><ion-icon name="camera"></ion-icon></ion-button><br/>
|
||||
<mat-label style="font-size: 11px">Capture the Image</mat-label>
|
||||
</div> -->
|
||||
</div>
|
||||
<mat-card formArrayName="documents_info" *ngIf="getBusinessInfoControls().at(0).value.documents_sighted == 'yes'" style="padding:2%">
|
||||
<div *ngFor="let documents of getBusinessInfoDocsControl();let d_i = index;let d_last=last" [formGroupName]="d_i">
|
||||
<div fxLayout="row">
|
||||
<div fxLayout="column" fxFlex="85%">
|
||||
<mat-form-field >
|
||||
<mat-label>Choose the Documents</mat-label>
|
||||
<mat-select placeholder="Select" formControlName="document_name">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor= "let _doc of documents_list" [value]="_doc.key">{{_doc.dis_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="column" size="3" align="center" *ngIf="documents.value.document_name != ''">
|
||||
<div fxLayout="row" fxLayoutAlign="center center">
|
||||
<img ngxViewer text="PD Photos" title="{{documents.value.document_name}}" *ngIf="documents.value.document_image != ''"
|
||||
src = "{{documents.value.document_image}}" style="max-width: 80px;max-height: 80px">
|
||||
</div>
|
||||
<!-- <ion-button (click)="capturePic(documents['controls'].document_image,documents.value.document_name,getBusinessInfoControls().at(0).value.form_id)"
|
||||
fill="clear" ><ion-icon name="camera"></ion-icon></ion-button><br/> -->
|
||||
<!-- <mat-label *ngIf="documents.value.document_image == ''" style="font-size: 11px">Capture the Image</mat-label> -->
|
||||
</div>
|
||||
</div>
|
||||
<!--<div fxLayout="row"> -->
|
||||
<div align="end" style="justify-content: flex-end">
|
||||
<div fxFlex="100" align="center">
|
||||
<button type="button" mat-flat-button color="primary" (click)="addDocumentsGroup()"
|
||||
matTooltip="Add More" matTooltipPosition="above" *ngIf="d_last">
|
||||
<strong>Add More Document</strong>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div align="right">
|
||||
<button mat-raised-button mat-icon-button matTooltip="Delete Document"
|
||||
matTooltipPosition="above" (click)="removeDocumentsGroup(d_i)" >
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<!-- <div fxLayout="column" size="3" style="text-align: center;"> -->
|
||||
<!-- <ion-button fill="clear" (click)="removeDocumentsGroup(d_i)" >
|
||||
<ion-icon name="trash" color="optblue" style="font-size: 22px;"></ion-icon>
|
||||
</ion-button> -->
|
||||
<!-- </div> -->
|
||||
<!-- <div fxLayout="column" size="2" style="text-align: center;"> -->
|
||||
<!-- <ion-button fill="clear" (click)="addDocumentsGroup()" *ngIf="d_last">
|
||||
<ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon>
|
||||
</ion-button> -->
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
<!--</div> -->
|
||||
</div>
|
||||
</mat-card><br/>
|
||||
<mat-form-field appearance="fill">
|
||||
<mat-label>Do You Want to Add Other Documents?</mat-label>
|
||||
<mat-select formControlName="other_documents" (selectionChange)= "onDocsSightedChange($event.value,2)">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
<!-- <mat-option value="not applicable">Not Applicable</mat-option> -->
|
||||
</mat-select>
|
||||
<!-- <mat-error *ngIf="businessForm.controls['other_documents'].hasError('required')">Do You Want to Add Other Documents? Required</mat-error> -->
|
||||
<mat-error align="end" style="font-size:12px" *ngIf="getBusinessInfoControls().at(0)['controls']['other_documents'].errors?.required || getBusinessInfoControls().at(0)['controls']['other_documents'].touched"> Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-card formArrayName="other_documents_info" *ngIf="getBusinessInfoControls().at(0).value.other_documents == 'yes'" style="padding:2%">
|
||||
<div *ngFor="let documents of getBusinessInfoOtherDocsControl();let d_i = index;let d_last=last" [formGroupName]="d_i">
|
||||
<div fxLayout="row">
|
||||
<div fxLayout="column" fxFlex="85%">
|
||||
<mat-form-field >
|
||||
<input matInput placeholder="Specify Other Document Details" formControlName="document">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="column" size="3" align="center" *ngIf="documents.value.document != ''">
|
||||
<div fxLayout="row" fxLayoutAlign="center center">
|
||||
<img ngxViewer text="PD Photos" title="{{documents.value.document}}" *ngIf="documents.value.document_pic != ''"
|
||||
src = "{{documents.value.document_pic}}" style="max-width: 80px;max-height: 80px">
|
||||
</div>
|
||||
<!-- <ion-button (click)="capturePic(documents['controls'].document_pic,documents.value.document,getBusinessInfoControls().at(0).value.form_id)"
|
||||
fill="clear" ><ion-icon name="camera"></ion-icon></ion-button><br/>
|
||||
<mat-label *ngIf="documents.value.document_pic == ''" style="font-size: 11px">Capture the Image</mat-label> -->
|
||||
</div>
|
||||
</div>
|
||||
<!--<div fxLayout="row"> -->
|
||||
<div align="end" style="justify-content: flex-end">
|
||||
<div fxFlex="100" align="center">
|
||||
<button type="button" mat-flat-button color="primary" (click)="addOtherDocumentsGroup()"
|
||||
matTooltip="Add More" matTooltipPosition="above" *ngIf="d_last">
|
||||
<strong>Add More Other Document</strong>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div align="right">
|
||||
<button mat-raised-button mat-icon-button matTooltip="Delete Document"
|
||||
matTooltipPosition="above" (click)="removeOtherDocumentsGroup(d_i)" >
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<!-- <div fxLayout="column" size="3" style="text-align: center;"> -->
|
||||
<!-- <ion-button fill="clear" (click)="removeOtherDocumentsGroup(d_i)" >
|
||||
<ion-icon name="trash" color="optblue" style="font-size: 22px;"></ion-icon>
|
||||
</ion-button> -->
|
||||
<!-- </div> -->
|
||||
<!-- <div fxLayout="column" size="2" style="text-align: center;"> -->
|
||||
<!-- <ion-button fill="clear" (click)="addOtherDocumentsGroup()" *ngIf="d_last">
|
||||
<ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon>
|
||||
</ion-button> -->
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
<!--</div> -->
|
||||
</div>
|
||||
</mat-card>
|
||||
<br/>
|
||||
<mat-label>Office Photographs</mat-label>
|
||||
<div fxLayout="row" fxLayoutAlign="space-evenly" formArrayName="office_photographs">
|
||||
<div fxLayout="column" size="6" align="center" fxLayoutAlign="center center" *ngFor="let val of getBusinessInfoOfficePhotControls();let i=index" [formGroupName]="i">
|
||||
<!-- {{val.value | json}} -->
|
||||
<div fxLayout="row" fxLayoutAlign="center center">
|
||||
<img ngxViewer text="PD Photos" title="Office Photograph {{i+1}}" src="{{val.value.image}}" style="max-width: 80px;max-height: 80px"><br/>
|
||||
</div>
|
||||
<!-- <ion-button fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon></ion-button><br/> -->
|
||||
<div fxLayout="row" fxLayoutAlign="center center">
|
||||
<mat-label style="font-size: 12px;text-align:left">Office Photograph {{i+1}}</mat-label>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="getBusinessInfoOfficePhotControls().length == 0" style="text-align: center;margin-top: 15px;">
|
||||
No Photographs Found</div>
|
||||
<!-- <div fxLayout="column" align="center" fxLayoutAlign="center center"> -->
|
||||
<!-- <img src="https://lh3.googleusercontent.com/proxy/euOnni6JKoCJKwXq9Hq8c6fkRaxI5SYQVsHUwx_w_Wt_9zGXsABxnFsjRv7_E3Xer35VR1oalGBRKWdlwQPMo9SoDqOrmx9h7zqmAXMG37rcrpaU_jPXMXAdffKjB0M_zy3yQNJRpOKvqUlx2JmvB68r8cDCGbVUQvW8Zk2yoR4I23i4ZM7U" style="max-width: 80px;max-height: 80px"/><br/> -->
|
||||
<!-- <ion-button (click)="addMoreBusinessOfficeImage(getBusinessInfoControls().at(0).value.form_id)"
|
||||
fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon></ion-button><br/>
|
||||
<mat-label>Add More</mat-label> -->
|
||||
<!-- </div> -->
|
||||
</div><br/><br/>
|
||||
</div>
|
||||
<!-- END OF BUSINESS INFO -->
|
||||
|
||||
|
||||
<!-- START OF BUSINESS ASSETS -->
|
||||
<div formGroupName="1">
|
||||
<!-- <div fxLayout="column"> -->
|
||||
<mat-form-field appearance="fill">
|
||||
<mat-label>Was any business activities seen during visit?</mat-label>
|
||||
<mat-select placeholder="Select" formControlName="business_is_pd_visited">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
<mat-error align="end" style="font-size:12px" *ngIf="getBusinessInfoControls().at(1)['controls']['business_is_pd_visited'].errors?.required || getBusinessInfoControls().at(1)['controls']['business_is_pd_visited'].touched"> Required</mat-error>
|
||||
</mat-form-field>
|
||||
<div *ngIf="getBusinessInfoControls().at(1)['controls']['business_is_pd_visited'].value == 'yes'">
|
||||
<mat-form-field>
|
||||
<mat-label>Choose</mat-label>
|
||||
<mat-select multiple formControlName="business_is_pd_visited_yes" >
|
||||
<mat-option *ngFor="let item of businessAssetLisany" [value]="item">{{item}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error align="end" style="font-size:12px" *ngIf="getBusinessInfoControls().at(1)['controls']['business_is_pd_visited_yes'].errors?.required || getBusinessInfoControls().at(1)['controls']['business_is_pd_visited_yes'].touched">Please choose the value</mat-error>
|
||||
</mat-form-field>
|
||||
<!-- {{getBusinessInfoControls().at(1)['controls']['business_is_pd_visited_yes'].value | json}} -->
|
||||
<mat-form-field *ngIf="checkSpecifyField()">
|
||||
<mat-label>Please Specify</mat-label>
|
||||
<input matInput type="text" formControlName="specify_pd_visited"/>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<mat-form-field appearance="fill">
|
||||
<mat-label>Is Business Asset Sighted</mat-label>
|
||||
<mat-select placeholder="Select" formControlName="business_asset_sight">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
<mat-error align="end" style="font-size:12px" *ngIf="getBusinessInfoControls().at(1)['controls']['business_asset_sight'].errors?.required || getBusinessInfoControls().at(1)['controls']['business_asset_sight'].touched"> Required</mat-error>
|
||||
</mat-form-field>
|
||||
<br/>
|
||||
<mat-label>Business Asset Sighted Photographs</mat-label>
|
||||
<div fxLayout="row" fxLayoutAlign="space-evenly" formArrayName="business_sight_image" *ngIf="getBusinessInfoControls().at(1).value.business_asset_sight == 'yes'" style="margin-bottom: 20px;">
|
||||
|
||||
<div fxLayout="column" size="6" align="center" fxLayoutAlign="center center" *ngFor="let val of getBusinessAssetSightImage();let i=index" [formGroupName]="i">
|
||||
<!-- {{val.value | json}} -->
|
||||
<div fxLayout="row" fxLayoutAlign="center center">
|
||||
<img ngxViewer text="PD Photos" title="Business Sight {{i+1}}" src="{{val.value.image}}" style="max-width: 80px;max-height: 80px"><br/>
|
||||
</div>
|
||||
<!-- <ion-button fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon></ion-button><br/> -->
|
||||
<div fxLayout="row" fxLayoutAlign="center center">
|
||||
<mat-label style="font-size: 12px;text-align:left">Business Sight {{i+1}}</mat-label>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="getBusinessAssetSightImage().length == 0" style="text-align: center;margin-top: 15px;">
|
||||
No Photographs Found</div>
|
||||
<div fxLayout="column" align="center" fxLayoutAlign="center center">
|
||||
<!-- <img src="https://lh3.googleusercontent.com/proxy/euOnni6JKoCJKwXq9Hq8c6fkRaxI5SYQVsHUwx_w_Wt_9zGXsABxnFsjRv7_E3Xer35VR1oalGBRKWdlwQPMo9SoDqOrmx9h7zqmAXMG37rcrpaU_jPXMXAdffKjB0M_zy3yQNJRpOKvqUlx2JmvB68r8cDCGbVUQvW8Zk2yoR4I23i4ZM7U" style="max-width: 80px;max-height: 80px"/><br/> -->
|
||||
<!-- <ion-button (click)="addMoreBusinessAssetSightImage(getBusinessInfoControls().at(1).value.form_id)"
|
||||
fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon></ion-button><br/>
|
||||
<mat-label>Add More</mat-label> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<!-- <div fxLayout="column" size="3" align="center" *ngIf="getBusinessInfoControls().at(1).value.business_is_pd_visited == 'yes'">
|
||||
<img *ngIf="getBusinessInfoControls().at(1).value.business_is_pd_visited_pic != ''"
|
||||
src="{{getBusinessInfoControls().at(1).value.business_is_pd_visited_pic}}" style="max-width: 80px;max-height: 80px"/><br/>
|
||||
<ion-button (click)="capturePic(getBusinessInfoControls().at(1)['controls'].business_is_pd_visited_pic)"
|
||||
fill="clear" ><ion-icon name="camera"></ion-icon></ion-button><br/>
|
||||
<mat-label style="font-size: 11px;">Capture the Image</mat-label>
|
||||
</div> -->
|
||||
<!-- <mat-form-field appearance="fill">
|
||||
<mat-label>Remarks</mat-label>
|
||||
<textarea matInput type="text" formControlName="business_pd_visited_remark"></textarea>
|
||||
</mat-form-field> -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- START OF STOCK PHOTOGRAPH -->
|
||||
<div formGroupName="2" >
|
||||
<mat-label>Stock Photograph</mat-label><br/><br/>
|
||||
<mat-form-field appearance="fill">
|
||||
<mat-label>Stock Photograph</mat-label>
|
||||
<mat-select formControlName="is_stock_photo">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
<mat-error align="end" style="font-size:12px" *ngIf="getBusinessInfoControls().at(2)['controls']['is_stock_photo'].errors?.required || getBusinessInfoControls().at(2)['controls']['is_stock_photo'].touched">Please choose the value</mat-error>
|
||||
</mat-form-field>
|
||||
<div fxLayout="row" fxLayoutAlign="space-evenly" formArrayName="images" *ngIf="getBusinessInfoControls().at(2).value.is_stock_photo == 'yes'">
|
||||
<div fxLayout="column" size="6" align="center" fxLayoutAlign="center center" *ngFor="let val of getStockControl();let i=index" [formGroupName]="i">
|
||||
<!-- {{val.value | json}} -->
|
||||
<div fxLayout="row" fxLayoutAlign="center center">
|
||||
<img ngxViewer text="PD Photos" title="Stock Photograph {{i+1}}" src="{{val.value.image}}" style="max-width: 80px;max-height: 80px"><br/>
|
||||
</div>
|
||||
<!-- <ion-button fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon></ion-button><br/> -->
|
||||
<div fxLayout="row" fxLayoutAlign="center center">
|
||||
<mat-label style="font-size: 12px;text-align:left">Stock Photograph {{i+1}}</mat-label>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="getStockControl().length == 0" style="text-align: center;margin-top: 15px;">
|
||||
No Photographs Found</div>
|
||||
<div fxLayout="column" align="center" fxLayoutAlign="center center">
|
||||
<!-- <img src="https://lh3.googleusercontent.com/proxy/euOnni6JKoCJKwXq9Hq8c6fkRaxI5SYQVsHUwx_w_Wt_9zGXsABxnFsjRv7_E3Xer35VR1oalGBRKWdlwQPMo9SoDqOrmx9h7zqmAXMG37rcrpaU_jPXMXAdffKjB0M_zy3yQNJRpOKvqUlx2JmvB68r8cDCGbVUQvW8Zk2yoR4I23i4ZM7U" style="max-width: 80px;max-height: 80px"/><br/> -->
|
||||
<!-- <ion-button (click)="addMoreStockImage(getBusinessInfoControls().at(2).value.form_id)"
|
||||
fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon></ion-button><br/>
|
||||
<mat-label>Add More</mat-label> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END OF STOCK PHOTOGRAPH -->
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!-- END OF BUSINESS GROUP -->
|
||||
|
||||
|
||||
|
||||
<div class="mat-button-div">
|
||||
<button mat-stroked-button matStepperPrevious>Back</button>
|
||||
<button mat-raised-button matStepperNext>Next <mat-icon>keyboard_arrow_right</mat-icon></button>
|
||||
</div>
|
||||
<!-- </form> -->
|
||||
</mat-step>
|
||||
|
||||
<div *ngIf="docs_tobe_collect != null && docs_tobe_collect != undefined && docs_tobe_collect.length > 0" >
|
||||
<mat-step formGroupName="6" [stepControl] ="questions?.get([6])">
|
||||
<ng-template matStepLabel>Credit Manager Special Requests</ng-template>
|
||||
|
||||
<!-- START OF CREDIT MANAGER QUERIES -->
|
||||
<div >
|
||||
|
||||
<app-dynamic-docs-form [docs_array_value] = "docs_tobe_collect" [doc_answers] = "creditManagerAnswer" [form_group] = "getQuestionControl().at(6)"
|
||||
(eventCapturePic) ="capturePic($event.controls,$event.img_name,$event.form_id)"></app-dynamic-docs-form>
|
||||
|
||||
</div>
|
||||
<div class="mat-button-div">
|
||||
<button mat-stroked-button matStepperPrevious>Back</button>
|
||||
<button mat-raised-button matStepperNext>Next <mat-icon>keyboard_arrow_right</mat-icon></button>
|
||||
</div>
|
||||
<!-- END OF CREDIT MANAGER QUERIES -->
|
||||
|
||||
</mat-step>
|
||||
</div>
|
||||
|
||||
<mat-step formGroupName="3" [stepControl] = "questions?.get([3])">
|
||||
<ng-template matStepLabel>Neighbourhood Check Details (2 checks to be done)</ng-template>
|
||||
<mat-accordion formArrayName="neighbourhood_list">
|
||||
<mat-expansion-panel *ngFor="let neighbourhood of getNeibhourControl(); let n = index;let last=last;"
|
||||
[formGroupName]="n" [expanded]="matExpanded == n">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title>
|
||||
Neighbour details {{n+1}}
|
||||
</mat-panel-title>
|
||||
</mat-expansion-panel-header>
|
||||
|
||||
<div >
|
||||
<div >
|
||||
|
||||
<!-- <h5>Neighbour Details {{n+1}}</h5><br/> -->
|
||||
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Name of person met in the neighbouring shop / office / other establishment" formControlName="neighbourhood_name" type="text" required>
|
||||
<mat-error style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="neighbourhood['controls'].neighbourhood_name.errors?.required || neighbourhood['controls'].neighbourhood_name.touched">Neighbourhood Name is Required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Do you know about the applicants or their business?" formControlName="do_know" required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
</mat-select>
|
||||
<mat-error style="font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="neighbourhood['controls'].do_know.errors?.required || neighbourhood['controls'].do_know.touched">Please Choose</mat-error>
|
||||
</mat-form-field>
|
||||
<div *ngIf="neighbourhood.controls.do_know.value!=''">
|
||||
<br/>
|
||||
<div >
|
||||
|
||||
<label>As per you how long has this business been in operation? </label><br/>
|
||||
<label style="font-size: 13px;font-weight: bold" class="ion-float-right" color="primary">Do not know
|
||||
<mat-slide-toggle style="zoom: 0.9;" class="ion-float-right" color="primary" formControlName="did_not_know_the_business_operation" (change)="toggleVisibility($event.checked,n,1)"></mat-slide-toggle></label>
|
||||
<mat-form-field style="width: 100%" *ngIf="!isDisplay[n]">
|
||||
<input matInput type="number" placeholder="Years" formControlName="how_long_do_know_in_year" >
|
||||
<mat-error style="font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="neighbourhood['controls'].how_long_do_know_in_year.errors?.required || neighbourhood['controls'].how_long_do_know_in_year.touched">Year is Required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%" *ngIf="!isDisplay[n]">
|
||||
<input matInput type="number" placeholder="Months" formControlName="how_long_do_know_in_month" (change)="ConvertMonthintoYear(neighbourhood,$event.target.value,1)" >
|
||||
<mat-error style="font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="neighbourhood['controls'].how_long_do_know_in_month.errors?.required || neighbourhood['controls'].how_long_do_know_in_month.touched">Month is Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
<br/>
|
||||
<div *ngIf="neighbourhood.controls.do_know.value!='' ">
|
||||
<mat-form-field *ngIf="!isDisplay2[n]">
|
||||
<!-- <mat-select placeholder="Who is the owner of the organisation?" formControlName="organisation_owner">
|
||||
<mat-option *ngFor="let list of applicants" [value]="list.pd_co_applicant_id">{{list.applicant_name}}</mat-option>
|
||||
</mat-select> -->
|
||||
<mat-select multiple placeholder="Who is the owner of the organisation?" formControlName="organisation_owner" [compareWith]="compareObjects" (selectionChange)="getOtherOrganisationOwner($event.value,n)" >
|
||||
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
||||
<mat-option *ngFor="let app of group.groupValues" [value]="app">{{app.name}}</mat-option>
|
||||
</mat-optgroup>
|
||||
</mat-select>
|
||||
<mat-error style="font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="neighbourhood['controls'].organisation_owner.errors?.required || neighbourhood['controls'].organisation_owner.touched">pick atleast one organisation owner</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="isOrganisationOwner[n]">
|
||||
<input matInput autocomplete="off" placeholder="Specify Owner name" formControlName="other_organisation_owner" type="text" >
|
||||
<mat-error style="font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="neighbourhood['controls'].organisation_owner.errors?.required || neighbourhood['controls'].organisation_owner.touched">organisation owner is required</mat-error>
|
||||
</mat-form-field>
|
||||
<label *ngIf="isDisplay2[n]">Who is the owner of the organisation?</label><br/>
|
||||
<label style="font-size: 13px;font-weight: bold" class="ion-float-right" color="primary">Do not know
|
||||
<mat-slide-toggle style="zoom: 0.9;" class="ion-float-right" formControlName="did_not_know_the_owner" color="primary" (change)="toggleVisibility($event.checked,n,2)"></mat-slide-toggle></label>
|
||||
</div><br/><br/>
|
||||
</div>
|
||||
<div align="end" style="justify-content: flex-end">
|
||||
<!-- <div fxLayout="column" size="3" style="text-align: center;">
|
||||
<a (click)="removeneighbourhoodGroup(n)" >
|
||||
|
||||
<mat-icon>delete</mat-icon>
|
||||
</a>
|
||||
</div>
|
||||
<div fxLayout="column" size="2" style="text-align: center;">
|
||||
<a (click)="addNeighbourhoodGroup()" *ngIf="last">
|
||||
|
||||
<mat-icon>add</mat-icon>
|
||||
</a>
|
||||
</div> -->
|
||||
<div fxFlex="100" align="center">
|
||||
<button type="button" mat-flat-button color="primary" (click)="addNeighbourhoodGroup()"
|
||||
matTooltip="Add More" matTooltipPosition="above" *ngIf="last">
|
||||
<strong>Add More Neighbour Details</strong>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div align="right">
|
||||
<button mat-raised-button mat-icon-button matTooltip="Delete Neighbour"
|
||||
matTooltipPosition="above" (click)="removeneighbourhoodGroup(n)" >
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</mat-expansion-panel>
|
||||
</mat-accordion><br/>
|
||||
<mat-form-field appearance="fill">
|
||||
<mat-label>Status of the check as per PD officer?</mat-label>
|
||||
<mat-select formControlName="neighbourhood_status" placeholder="Select" required (selectionChange)="setValidationForRemarks($event.value)">
|
||||
<mat-option *ngFor="let item of neighbour_status_list" [value]="item.id">{{item.name}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error align="end" style="font-size:12px" *ngIf="getQuestionControl().at(3)['controls']['neighbourhood_status'].errors?.required || getQuestionControl().at(3)['controls']['neighbourhood_status'].touched"> Required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="fill">
|
||||
<mat-label>Remarks</mat-label>
|
||||
<textarea matInput formControlName="neighbour_reference_remark"></textarea>
|
||||
<mat-error align="end" style="font-size:12px" *ngIf="getQuestionControl().at(3)['controls']['neighbour_reference_remark'].errors?.required || getQuestionControl().at(3)['controls']['neighbour_reference_remark'].touched"> Required</mat-error>
|
||||
</mat-form-field>
|
||||
<div class="mat-button-div">
|
||||
<button mat-stroked-button matStepperPrevious>Back</button>
|
||||
<button mat-raised-button matStepperNext>Next <mat-icon>keyboard_arrow_right</mat-icon></button>
|
||||
</div>
|
||||
</mat-step>
|
||||
<div *ngIf="pdDetails.lender_short_name == 'CLIX' || pdDetails.lender_short_name == 'MWISE' || pdDetails.prod_catagory == 'LAEP'">
|
||||
<mat-step formGroupName="4" [stepControl]="questions?.get([4])">
|
||||
<!-- <form [formGroup]="secondFormGroup"> -->
|
||||
<ng-template matStepLabel>Final Remarks</ng-template>
|
||||
|
||||
<div *ngIf="pdDetails.prod_catagory == 'LAEP'">
|
||||
<p>Comment on Footfall in the market where the B2C outlet is located…</p>
|
||||
<mat-radio-group formControlName="outlet_location" required>
|
||||
|
||||
<mat-radio-button class="outlet" value="heavy_footfall"></mat-radio-button><span>Heavy Footfall ( lots of customers in the locality / marketplace ).</span><br/>
|
||||
<mat-radio-button class="outlet" value="medium_footfall"></mat-radio-button><span>Medium Footfall ( Medium no of customers in the locality / marketplace ).</span><br/>
|
||||
<mat-radio-button class="outlet" value="low_footfall"></mat-radio-button><span>Low Footfall ( Few customers seen in the locality / marketplace ).</span><br/>
|
||||
|
||||
</mat-radio-group><br/>
|
||||
<div align="end" style="font-size:12px" *ngIf="getQuestionControl().at(4)['controls']['outlet_location'].errors?.required || getQuestionControl().at(4)['controls']['outlet_location'].touched"> Required</div>
|
||||
</div>
|
||||
|
||||
<mat-form-field appearance="fill">
|
||||
<mat-label>Is there a competetion to the applicant's business in the location </mat-label>
|
||||
<mat-select formControlName="is_competition" required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value = "yes">Yes</mat-option>
|
||||
<mat-option value = "no">No</mat-option>
|
||||
</mat-select>
|
||||
<mat-error align="end" style="font-size:12px" *ngIf="getQuestionControl().at(4)['controls']['is_competition'].errors?.required || getQuestionControl().at(4)['controls']['is_competition'].touched"> Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="getQuestionControl().at(4).value.is_competition == 'yes'">
|
||||
|
||||
<input matInput type="number" placeholder="Approximate No of similar outlets / stores seen by PD officer during the visit to that location"
|
||||
formControlName="appx_outlet_or_stores" />
|
||||
<mat-error align="end" style="font-size:12px" *ngIf="getQuestionControl().at(4)['controls']['appx_outlet_or_stores'].errors?.required || getQuestionControl().at(4)['controls']['appx_outlet_or_stores'].touched"> Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field appearance="fill">
|
||||
<mat-label>Any demolition activity seen in the locality by PD officer</mat-label>
|
||||
<mat-select formControlName="demolition_activity" required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value = "yes">Yes</mat-option>
|
||||
<mat-option value = "no">No</mat-option>
|
||||
</mat-select>
|
||||
<mat-error align="end" style="font-size:12px" *ngIf="getQuestionControl().at(4)['controls']['demolition_activity'].errors?.required || getQuestionControl().at(4)['controls']['demolition_activity'].touched"> Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="getQuestionControl().at(4).value.demolition_activity == 'yes'">
|
||||
|
||||
<input matInput autocomplete="off" type="text" placeholder="Comment on any demolition activity observed" formControlName="comment_of_demolition_activity" />
|
||||
<mat-error align="end" style="font-size:12px" *ngIf="getQuestionControl().at(4)['controls']['comment_of_demolition_activity'].errors?.required || getQuestionControl().at(4)['controls']['comment_of_demolition_activity'].touched"> Required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="fill">
|
||||
<mat-label>Any sealing activity observed in the locality by PD officer</mat-label>
|
||||
<mat-select formControlName="sealing_activity" required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value = "yes">Yes</mat-option>
|
||||
<mat-option value = "no">No</mat-option>
|
||||
</mat-select>
|
||||
<mat-error align="end" style="font-size:12px" *ngIf="getQuestionControl().at(4)['controls']['sealing_activity'].errors?.required || getQuestionControl().at(4)['controls']['sealing_activity'].touched"> Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="getQuestionControl().at(4).value.sealing_activity == 'yes'">
|
||||
|
||||
<input matInput type="text" placeholder="Comment on any sealing activity observed in area " formControlName="comment_of_sealing_activity" />
|
||||
<mat-error align="end" style="font-size:12px" *ngIf="getQuestionControl().at(4)['controls']['comment_of_sealing_activity'].errors?.required || getQuestionControl().at(4)['controls']['comment_of_sealing_activity'].touched"> Required</mat-error>
|
||||
</mat-form-field>
|
||||
<div class="mat-button-div">
|
||||
<button mat-stroked-button matStepperPrevious>Back</button>
|
||||
<button mat-raised-button matStepperNext>Next <mat-icon>keyboard_arrow_right</mat-icon></button>
|
||||
</div>
|
||||
<!-- </form> -->
|
||||
</mat-step>
|
||||
</div>
|
||||
|
||||
<mat-step formGroupName="5" [stepControl]="questions?.get([5])">
|
||||
<ng-template matStepLabel>Submit</ng-template>
|
||||
<mat-form-field appearance="fill">
|
||||
<mat-label>Final Status of visit</mat-label>
|
||||
<!-- <textarea matInput type="text" placeholder="Any other comments" formControlName="final_comments"></textarea> -->
|
||||
<mat-select formControlName="final_visit_status">
|
||||
<mat-option value="Positive">Positive</mat-option>
|
||||
<mat-option value="Negative">Negative</mat-option>
|
||||
<mat-option value="Could not verify">Could not verify</mat-option>
|
||||
</mat-select>
|
||||
<mat-error align="end" style="font-size:12px" *ngIf="getQuestionControl().at(5)['controls']['final_visit_status'].errors?.required || getQuestionControl().at(5)['controls']['final_visit_status'].touched"> Required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field appearance="fill">
|
||||
<mat-label>Comments</mat-label>
|
||||
<textarea matInput type="text" placeholder="Any other comments" formControlName="final_comments"></textarea>
|
||||
</mat-form-field>
|
||||
<div class="mat-button-div">
|
||||
<button mat-stroked-button matStepperPrevious>Back</button>
|
||||
<!-- <button mat-stroked-button (click)="stepper.reset();firstFormGroup.reset()">Reset</button> -->
|
||||
<button mat-raised-button (click)="onSubmit()"><span *ngIf="!spinner_access">Submit</span> <span *ngIf="spinner_access"> Submitting...
|
||||
<!-- <ion-spinner color="light" name="dots" ></ion-spinner> -->
|
||||
<!-- <mat-spinner diameter="5"></mat-spinner> -->
|
||||
</span></button>
|
||||
|
||||
</div>
|
||||
</mat-step>
|
||||
</mat-vertical-stepper>
|
||||
</form>
|
||||
</div>
|
||||
<notifier-container></notifier-container>
|
||||
<!-- </mat-dialog-content> -->
|
||||
@ -0,0 +1,56 @@
|
||||
.paragraph_change {
|
||||
color: #fff !important;
|
||||
background-color: #e00201 !important;
|
||||
}
|
||||
|
||||
.mat-button, .mat-raised-button{
|
||||
background-color: #e24533;
|
||||
color: white;
|
||||
|
||||
}
|
||||
.mat-stroked-button {
|
||||
color: #e24533;
|
||||
margin-right: 10px
|
||||
}
|
||||
.mat-button-div{
|
||||
float: right;
|
||||
margin-top: 5%;
|
||||
margin-bottom: 2%;
|
||||
}
|
||||
.mat-radio-group > .mat-radio-button,span {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
|
||||
::ng-deep .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-thumb {
|
||||
background-color: blue; /*replace with your color*/
|
||||
}
|
||||
|
||||
::ng-deep .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-bar {
|
||||
background-color: skyblue; /*replace with your color*/
|
||||
}
|
||||
|
||||
::ng-deep .mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{
|
||||
border-color:rgb(66, 134, 244);
|
||||
}
|
||||
|
||||
::ng-deep .mat-radio-button.mat-accent .mat-radio-inner-circle{
|
||||
color:rgb(66, 134, 244);
|
||||
background-color:rgb(66, 134, 244) ;
|
||||
}
|
||||
|
||||
.mat-radio-button.mat-accent .mat-radio-ripple .mat-ripple-element {
|
||||
background-color:rgb(255, 37, 37);
|
||||
}
|
||||
.mat-form-field {
|
||||
// margin-top: 16px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.whole_form {
|
||||
@media(min-width:500px) {
|
||||
margin-left: 5%;
|
||||
margin-right: 5%;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { CommonQuesComponent } from './common-ques.component';
|
||||
|
||||
describe('CommonQuesComponent', () => {
|
||||
let component: CommonQuesComponent;
|
||||
let fixture: ComponentFixture<CommonQuesComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ CommonQuesComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(CommonQuesComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,44 @@
|
||||
<mat-card *ngIf="docs_array_value.length !=0 " [formGroup]="form_group">
|
||||
<mat-card-header>
|
||||
<mat-card-title>
|
||||
<h5 >Documents to be photographed/scanned</h5>
|
||||
</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content formArrayName="docs_to_be_sighted">
|
||||
<div *ngFor="let item of form_group.controls.docs_to_be_sighted['controls'];let i=index" [formGroupName]="i">
|
||||
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="60">
|
||||
<div >
|
||||
<mat-label>{{item.value.placeholder}}</mat-label><br/>
|
||||
<mat-radio-group [formControlName]="item.value.control_name" (change)="docs_change_fun(i,$event.value)"><br/>
|
||||
<mat-radio-button value="yes">Yes</mat-radio-button>
|
||||
<mat-radio-button value="no">No</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
</div><br/>
|
||||
</div>
|
||||
<div fxFlex="40">
|
||||
<div *ngIf="item.controls['img'] && item.value.img != ''">
|
||||
<img [src]="item.value.img" ngxViewer style="width:85px; height: 85px;float:right">
|
||||
</div>
|
||||
|
||||
<!-- <div style="width: 100%"> -->
|
||||
<!-- <ion-buttons slot="end"> -->
|
||||
<!-- <ion-button style="color:#E00201" *ngIf="camera_btn[i] == true" slot="end" fill="clear" size="small" class="ion-float-right" (click)="capture(i,item)"><ion-icon style="font-size:30px;float:right;" name="camera"></ion-icon></ion-button> -->
|
||||
<!-- </ion-buttons> -->
|
||||
<!-- </div> -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<mat-form-field *ngIf="item.controls['reason']" style="width: 100%">
|
||||
<textarea matInput autocomplete="off" formControlName="reason" placeholder="Enter the Reason"></textarea>
|
||||
<!-- <mat-hint align="end" style="color: #E00201" *> -->
|
||||
<mat-error align="end" style="font-size: 13px;color:red" *ngIf="item.controls['reason'].errors?.required">Required</mat-error>
|
||||
</mat-form-field>
|
||||
<br/>
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
@ -0,0 +1,17 @@
|
||||
input{
|
||||
height:40px;
|
||||
}
|
||||
|
||||
.mat-form-field-label {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
textarea.mat-input-element {
|
||||
padding: 0px 0;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.mat-input-placeholder {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { DynamicDocsFormComponent } from './dynamic-docs-form.component';
|
||||
|
||||
describe('DynamicDocsFormComponent', () => {
|
||||
let component: DynamicDocsFormComponent;
|
||||
let fixture: ComponentFixture<DynamicDocsFormComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ DynamicDocsFormComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(DynamicDocsFormComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,84 @@
|
||||
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, FormArray, FormControl, Validators } from '@angular/forms';
|
||||
|
||||
@Component({
|
||||
selector: 'app-dynamic-docs-form',
|
||||
templateUrl: './dynamic-docs-form.component.html',
|
||||
styleUrls: ['./dynamic-docs-form.component.scss']
|
||||
})
|
||||
export class DynamicDocsFormComponent implements OnInit {
|
||||
@Input() docs_array_value:any;
|
||||
@Input() form_group:FormGroup;
|
||||
@Output() eventCapturePic = new EventEmitter<any>();
|
||||
camera_btn: any =[];
|
||||
@Input() doc_answers:any
|
||||
constructor(private fb:FormBuilder) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.log("child >>>",this.docs_array_value,this.form_group,this.doc_answers)
|
||||
// this.docs_array_value=res['records'].docs_to_be_collected
|
||||
if(this.docs_array_value.length !=0){
|
||||
// this.docsCollectedForm.addControl('docs_to_be_sighted', this.fb.array([]))
|
||||
let control:any=<FormArray>this.form_group.controls['docs_to_be_sighted']
|
||||
this.docs_array_value.forEach((data,index)=>{
|
||||
control.push(this.createDocsArray(data))
|
||||
control.controls[index].addControl(data.pd_doc_to_be_collect_id,new FormControl('',Validators.required))
|
||||
})
|
||||
console.log(this.form_group);
|
||||
}
|
||||
}
|
||||
ngOnChanges() {
|
||||
console.log(this.doc_answers);
|
||||
// debugger;
|
||||
setTimeout(()=>{
|
||||
console.log(this.doc_answers);
|
||||
if(this.doc_answers != null) {
|
||||
if(this.doc_answers.docs_to_be_sighted != null && this.doc_answers.docs_to_be_sighted.length > 0){
|
||||
this.doc_answers.docs_to_be_sighted.forEach((doc_value,index)=>{
|
||||
if(doc_value.hasOwnProperty('img')){
|
||||
this.docs_change_fun(index,'yes')
|
||||
}
|
||||
else if(doc_value.hasOwnProperty('reason')){
|
||||
this.docs_change_fun(index,'no');
|
||||
}
|
||||
})
|
||||
console.log(this.form_group,this.form_group.get('docs_to_be_sighted'))
|
||||
this.form_group.get('docs_to_be_sighted').patchValue(this.doc_answers.docs_to_be_sighted)
|
||||
}
|
||||
}
|
||||
},1000)
|
||||
}
|
||||
createDocsArray(data){
|
||||
console.log(data);
|
||||
return this.fb.group({
|
||||
control_name:[data.pd_doc_to_be_collect_id],
|
||||
placeholder:[data.doc_name],
|
||||
|
||||
})
|
||||
}
|
||||
docs_change_fun(index,value){
|
||||
console.log(index,value);
|
||||
let control:any=<FormArray>this.form_group.controls['docs_to_be_sighted']
|
||||
if(value == 'yes'){
|
||||
this.camera_btn[index]=true
|
||||
control.controls[index].removeControl('reason')
|
||||
control.controls[index].addControl('img',new FormControl(''))
|
||||
control.controls[index].addControl('is_new',new FormControl(''))
|
||||
}
|
||||
else if(value == 'no'){
|
||||
|
||||
this.camera_btn[index]=false
|
||||
control.controls[index].removeControl('img')
|
||||
control.controls[index].removeControl('is_new')
|
||||
control.controls[index].addControl('reason',new FormControl('',Validators.required));
|
||||
}
|
||||
|
||||
}
|
||||
// capture(index,item_obj) {
|
||||
// item_obj.controls['is_new'].setValue(1);
|
||||
// this.eventCapturePic.emit({controls:item_obj.controls['img'],img_name:item_obj.value.placeholder,form_id:'24'})
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,60 @@
|
||||
.paragraph_change {
|
||||
color: #fff !important;
|
||||
background-color: #e00201 !important;
|
||||
}
|
||||
|
||||
.mat-button, .mat-raised-button{
|
||||
background-color: #e24533;
|
||||
color: white;
|
||||
|
||||
}
|
||||
.mat-stroked-button {
|
||||
color: #e24533;
|
||||
margin-right: 10px
|
||||
}
|
||||
.mat-button-div{
|
||||
float: right;
|
||||
margin-top: 5%;
|
||||
margin-bottom: 2%;
|
||||
}
|
||||
.mat-radio-group > .mat-radio-button,span {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
|
||||
::ng-deep .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-thumb {
|
||||
background-color: blue; /*replace with your color*/
|
||||
}
|
||||
|
||||
::ng-deep .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-bar {
|
||||
background-color: skyblue; /*replace with your color*/
|
||||
}
|
||||
|
||||
::ng-deep .mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{
|
||||
border-color:rgb(66, 134, 244);
|
||||
}
|
||||
|
||||
::ng-deep .mat-radio-button.mat-accent .mat-radio-inner-circle{
|
||||
color:rgb(66, 134, 244);
|
||||
background-color:rgb(66, 134, 244) ;
|
||||
}
|
||||
|
||||
.mat-radio-button.mat-accent .mat-radio-ripple .mat-ripple-element {
|
||||
background-color:rgb(255, 37, 37);
|
||||
}
|
||||
.mat-form-field {
|
||||
// margin-top: 16px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.whole_form {
|
||||
@media(min-width:500px) {
|
||||
margin-left: 5%;
|
||||
margin-right: 5%;
|
||||
}
|
||||
}
|
||||
|
||||
hr{
|
||||
width: 100%;
|
||||
border-bottom: 2px solid lightcoral;
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { EmployerInfoComponent } from './employer-info.component';
|
||||
|
||||
describe('EmployerInfoComponent', () => {
|
||||
let component: EmployerInfoComponent;
|
||||
let fixture: ComponentFixture<EmployerInfoComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ EmployerInfoComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(EmployerInfoComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,16 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
import { CommonQuesComponent } from './common-ques/common-ques.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path:'',
|
||||
component:CommonQuesComponent
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class PdQuestionsRoutingModule { }
|
||||
@ -0,0 +1,13 @@
|
||||
import { PdQuestionsModule } from './pd-questions.module';
|
||||
|
||||
describe('PdQuestionsModule', () => {
|
||||
let pdQuestionsModule: PdQuestionsModule;
|
||||
|
||||
beforeEach(() => {
|
||||
pdQuestionsModule = new PdQuestionsModule();
|
||||
});
|
||||
|
||||
it('should create an instance', () => {
|
||||
expect(pdQuestionsModule).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,16 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
import { PdQuestionsRoutingModule } from './pd-questions-routing.module';
|
||||
import { CommonQuesComponent } from './common-ques/common-ques.component';
|
||||
import { EmployerInfoComponent } from './employer-info/employer-info.component';
|
||||
import { DynamicDocsFormComponent } from './dynamic-docs-form/dynamic-docs-form.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
PdQuestionsRoutingModule
|
||||
],
|
||||
declarations: []
|
||||
})
|
||||
export class PdQuestionsModule { }
|
||||
@ -60,8 +60,9 @@ export class PdStatusChangeDialogueComponent implements OnInit {
|
||||
changePDStatus(status: string): void {
|
||||
let update_status = {
|
||||
"pd_id":this.data.pdid,
|
||||
"vendor_status":status
|
||||
};
|
||||
this.pd.editPdMasterDetails(update_status, status).subscribe(result => {
|
||||
this.pd.updatePdOfficer(update_status).subscribe(result => {
|
||||
if (result.status == 200) {
|
||||
this.dialogRef.close({update_status:true});
|
||||
this.notifier.notify('success', this.data.vendor_status=='INPROGRESS' ? 'Discussions Started Successfully' : this.data.vendor_status=='COMPLETED' ? 'Discussions Completed Successfully' : 'Discussions Updated Successfully');
|
||||
|
||||
@ -152,14 +152,15 @@
|
||||
<!-- <span><button mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" [matTooltip]="master.fk_primary_address_id ? 'Initiate PD for this address' : 'Initiate Address for PD Process'" matTooltipPosition="above" (click)="initiateAddtionalPD(master,addresses,master.fk_primary_address_id ? true : false)"><mat-icon>where_to_vote</mat-icon></button></span> -->
|
||||
<button *ngIf="VendorRoleID != 22" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master,addresses)"><mat-icon>verified_user</mat-icon></button>
|
||||
<span><button mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master,addresses)"><mat-icon>schedule</mat-icon></button></span>
|
||||
<span *ngIf="VendorRoleID != 22"><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].vendor_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].vendor_status!=pdStatusCheck.TRIGGERED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(addresses,addresses.addtional_pd_data[0].vendor_status)"><mat-icon>question_answer</mat-icon></button></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row nowrap">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="40" align="left" style="color: #e00201">
|
||||
<div *ngIf="master.pd_allocated_to">
|
||||
{{master.pd_allocated_to | titlecase}}
|
||||
<div *ngIf="master.vendor_pdofficer_name">
|
||||
{{master.vendor_pdofficer_name | titlecase}}
|
||||
</div>
|
||||
<div *ngIf="master.executive_name && master.centralofficer && master.fk_pd_type==2">
|
||||
{{master.executive_name | titlecase}}
|
||||
@ -192,13 +193,13 @@
|
||||
<div fxFlex="60" align="right">
|
||||
<span><button *ngIf="VendorRoleID != 22" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master,addresses)"><mat-icon>verified_user</mat-icon></button></span>
|
||||
<span><button mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master,addresses)"><mat-icon>schedule</mat-icon></button></span>
|
||||
<!-- <span *ngIf="userRoleID == 3 || userRoleID == 4 || userRoleID == 5 || userRoleID == 10 "><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].vendor_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].vendor_status!=pdStatusCheck.TRIGGERED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(addresses,addresses.addtional_pd_data[0].vendor_status)"><mat-icon>question_answer</mat-icon></button></span> -->
|
||||
<span *ngIf="VendorRoleID != 22"><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].vendor_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].vendor_status!=pdStatusCheck.TRIGGERED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(addresses,addresses.addtional_pd_data[0].vendor_status)"><mat-icon>question_answer</mat-icon></button></span>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row nowrap">
|
||||
<div fxFlex="40" align="left" style="color: #e00201">
|
||||
<div *ngIf="addresses.addtional_pd_data[0].pd_allocated_to && addresses.addtional_pd_data[0].fk_pd_type==1">
|
||||
{{addresses.addtional_pd_data[0].pd_allocated_to | titlecase}}
|
||||
<div *ngIf="addresses.addtional_pd_data[0].vendor_pdofficer_name && addresses.addtional_pd_data[0].fk_pd_type==2">
|
||||
{{addresses.addtional_pd_data[0].vendor_pdofficer_name | titlecase}}
|
||||
</div>
|
||||
<div *ngIf="addresses.addtional_pd_data[0].executive_name && addresses.addtional_pd_data[0].centralofficer && addresses.addtional_pd_data[0].fk_pd_type==2">
|
||||
{{addresses.addtional_pd_data[0].executive_name | titlecase}}
|
||||
@ -414,4 +415,4 @@
|
||||
</mat-tab-group>
|
||||
</mat-card>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</mat-card>
|
||||
|
||||
@ -18,6 +18,8 @@ import { InitiateAdditionalPdComponent } from './../initiate-additional-pd/initi
|
||||
/**sweet alert */
|
||||
import Swal from 'sweetalert2';
|
||||
import { SchedulePdComponent } from '../schedule-pd/schedule-pd.component';
|
||||
import { CommonQuesComponent } from '../pd-questions/common-ques/common-ques.component';
|
||||
import { EmployerInfoComponent } from '../pd-questions/employer-info/employer-info.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-pd',
|
||||
@ -367,14 +369,42 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
if (dataresult.update_status == true) {
|
||||
this.router.navigate(['../../startpd',pdDetails.assigned_pd], { relativeTo: this.route });
|
||||
// this.router.navigate(['../../startpd',pdDetails.assigned_pd], { relativeTo: this.route });
|
||||
this.openQuesComp(pdDetails)
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.router.navigate(['../../startpd', pdDetails.assigned_pd], { relativeTo: this.route });
|
||||
this.openQuesComp(pdDetails)
|
||||
|
||||
// this._pd.pdQuestionMasterData = temp;
|
||||
// this.router.navigate(['../../../pd-questions', pdDetails.assigned_pd,this.masterRandomString], {relativeTo: this.route });
|
||||
|
||||
}
|
||||
}
|
||||
openQuesComp(pdDetails) {
|
||||
let quesComponent:any = CommonQuesComponent
|
||||
if(this.CustomerSegmentAbbr == 'SAL') {
|
||||
quesComponent = EmployerInfoComponent
|
||||
}
|
||||
let temp:any = pdDetails.addtional_pd_data[0]
|
||||
temp.applicants_details = this.pdApplicantData
|
||||
temp.docs_collected = this.pdCollectedDocument
|
||||
const dialogRef = this.dialog.open(quesComponent, {
|
||||
data: temp,
|
||||
// position: { right: '0'},
|
||||
maxWidth: '100vw',
|
||||
maxHeight: '100vh',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
disableClose: true
|
||||
});
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||
// this.loadTemplates(this.startPD,2,this.randomString);
|
||||
});
|
||||
}
|
||||
|
||||
getPDIDReport(pdID: any) {
|
||||
this.destroyType = 3;
|
||||
|
||||
@ -123,6 +123,9 @@ import { GetAnswerableFormsPipe } from './../pd-pipes/get-answerable-forms.pipe'
|
||||
// import { FuturePlansAndBusinessEnvironmentComponent } from './list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component';
|
||||
// import { ImageCropComponent } from './list-pd/start-pd/forms/dialogue/image-crop/image-crop.component';
|
||||
import {AngularSplitModule} from 'angular-split'
|
||||
import { CommonQuesComponent } from './list-pd/pd-questions/common-ques/common-ques.component';
|
||||
import { EmployerInfoComponent } from './list-pd/pd-questions/employer-info/employer-info.component';
|
||||
import { DynamicDocsFormComponent } from './list-pd/pd-questions/dynamic-docs-form/dynamic-docs-form.component';
|
||||
|
||||
/**
|
||||
* Custom angular notifier options
|
||||
@ -169,7 +172,9 @@ const pdCustomNotifierOptions: NotifierOptions = {
|
||||
};
|
||||
|
||||
@NgModule({
|
||||
declarations: [SchedulePdComponent,PdAllocationComponent,TelePdAllocationComponent, ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, SmartPdAllocationComponent, EditPdApplicantComponent, EditPdMasterComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, PdReportComponent, PdRequirementComponent, ModelEditPdReportComponent, DialogChangeCurrentVenrsion, QcReviewComponent, SearchRelationPipe, RupeeCurrencyFormatPipe, NumberToWordsPipe, DeleteRecordsCountPipe, PdLocatedMapViewDirective, ViewLocationComponent, GetAnswerableFormsPipe,PdStatusChangeDialogueComponent,InitiateAdditionalPdComponent],
|
||||
declarations: [SchedulePdComponent,PdAllocationComponent,TelePdAllocationComponent, ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, SmartPdAllocationComponent, EditPdApplicantComponent, EditPdMasterComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, PdReportComponent, PdRequirementComponent, ModelEditPdReportComponent, DialogChangeCurrentVenrsion, QcReviewComponent, SearchRelationPipe, RupeeCurrencyFormatPipe, NumberToWordsPipe, DeleteRecordsCountPipe, PdLocatedMapViewDirective, ViewLocationComponent, GetAnswerableFormsPipe,PdStatusChangeDialogueComponent,InitiateAdditionalPdComponent,
|
||||
CommonQuesComponent,EmployerInfoComponent,DynamicDocsFormComponent
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
ManagePdRoutingModule,
|
||||
@ -209,7 +214,8 @@ const pdCustomNotifierOptions: NotifierOptions = {
|
||||
{provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]},
|
||||
{provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}, PdLocatedMapViewDirective],
|
||||
|
||||
entryComponents: [SchedulePdComponent,PdAllocationComponent,SmartPdAllocationComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, PdRequirementComponent, ModelEditPdReportComponent, DialogChangeCurrentVenrsion, QcReviewComponent, ViewLocationComponent,PdStatusChangeDialogueComponent,InitiateAdditionalPdComponent],
|
||||
entryComponents: [SchedulePdComponent,PdAllocationComponent,SmartPdAllocationComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, PdRequirementComponent, ModelEditPdReportComponent, DialogChangeCurrentVenrsion, QcReviewComponent, ViewLocationComponent,PdStatusChangeDialogueComponent,InitiateAdditionalPdComponent,
|
||||
CommonQuesComponent,EmployerInfoComponent],
|
||||
})
|
||||
export class ManagePdModule {
|
||||
}
|
||||
@ -6,6 +6,8 @@ import { MapPdViewComponent } from './list-pd/map-pd-view/map-pd-view.component'
|
||||
import { AddPdComponent } from '../manage-pd/list-pd/add-pd/add-pd.component';
|
||||
import { ViewPdComponent } from '../manage-pd/list-pd/view-pd/view-pd.component';
|
||||
import { PdReportComponent } from './list-pd/pd-report/pd-report.component';
|
||||
import { CommonQuesComponent } from './list-pd/pd-questions/common-ques/common-ques.component';
|
||||
import { PdQuestionsModule } from './list-pd/pd-questions/pd-questions.module';
|
||||
/*
|
||||
* manage pd router
|
||||
*/
|
||||
@ -37,7 +39,13 @@ const routes: Routes = [
|
||||
{
|
||||
path: 'pd_report/:pdid/:string',
|
||||
component: PdReportComponent,
|
||||
}
|
||||
},
|
||||
// {
|
||||
// path:'pd-questions/:pdid/:string',
|
||||
// // component:PdQuestionsModule,
|
||||
// loadChildren:'./list-pd/pd-questions/pd-questions.module#PdQuestionsModule'
|
||||
// // loadChildren: () => import('./list-pd/pd-questions/pd-questions.module').then( m => m.PdQuestionsModule)
|
||||
// }
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@ -29,6 +29,7 @@ export interface Master {
|
||||
|
||||
|
||||
export class PdTrigerService {
|
||||
pdQuestionMasterData:any=null
|
||||
|
||||
// private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
||||
// private apiUrl = "http://192.168.0.5:9999/AWSEC2/sparqapi/api/";
|
||||
@ -180,7 +181,7 @@ export class PdTrigerService {
|
||||
if(VendorRoleID == '22'){
|
||||
console.log('check else',VendorRoleID)
|
||||
vendorParam= userid ?
|
||||
{ params: new HttpParams().set('pdofficerid', userid).set('pdagencyid', ven_id) } : {};
|
||||
{ params: new HttpParams().set('vendor_pdofficer', userid).set('pdagencyid', ven_id) } : {};
|
||||
}
|
||||
else {
|
||||
vendorParam= userid ?
|
||||
@ -209,7 +210,7 @@ export class PdTrigerService {
|
||||
let vendorParam;
|
||||
if(VendorRoleID == '22'){
|
||||
vendorParam= userid_local && status ?
|
||||
{ params: new HttpParams().set('pdofficerid', userid_local).set('pdagencyid', ven_id).set('status',status) } : {};
|
||||
{ params: new HttpParams().set('vendor_pdofficer', userid_local).set('pdagencyid', ven_id).set('status',status) } : {};
|
||||
}
|
||||
else {
|
||||
vendorParam= userid_local && status ?
|
||||
@ -347,12 +348,12 @@ export class PdTrigerService {
|
||||
};
|
||||
}
|
||||
// common Pd form details get for the Pd Process
|
||||
// getPDFormDetailsWithID(params: any): Observable<any> {
|
||||
// return this._http.post<any>(this.apiUrl + "getPDFormDetails", params)
|
||||
// .pipe(
|
||||
// catchError(this.handleError('operation', []))
|
||||
// )
|
||||
// }
|
||||
getPDFormDetailsWithID(params: any): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + "getPDFormDetails", params)
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// common Pd form details get for the Pd Process
|
||||
// getPDFormDetailsWithCompanyID(pdID, formID,companyID): Observable<any> {
|
||||
@ -363,16 +364,16 @@ export class PdTrigerService {
|
||||
// }
|
||||
|
||||
// save Pd form details
|
||||
// savePDFormDetailsWithID(saveData: any): Observable<any> {
|
||||
// saveData.fk_createdby = this._aws.getlocale();
|
||||
// // saveData[0].fk_updatedby = this._aws.getlocale();
|
||||
// // saveData[0].updatedon = currentdate;
|
||||
savePDFormDetailsWithID(saveData: any): Observable<any> {
|
||||
saveData.fk_createdby = this._aws.getlocale();
|
||||
// saveData[0].fk_updatedby = this._aws.getlocale();
|
||||
// saveData[0].updatedon = currentdate;
|
||||
|
||||
// return this._http.post<any>(this.apiUrl + "savePDFormDetails", { "records": saveData })
|
||||
// .pipe(
|
||||
// catchError(this.handleError('operation', []))
|
||||
// )
|
||||
// }
|
||||
return this._http.post<any>(this.apiUrl + "savePDFormDetails", { "records": saveData })
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// save pd answers
|
||||
// savePDQuestions(saveData: any): Observable<any> {
|
||||
@ -602,12 +603,12 @@ export class PdTrigerService {
|
||||
// }
|
||||
|
||||
|
||||
// getCompaniesListsForBusiness(pdid: any): Observable<any> {
|
||||
// return this._http.post<any>(this.apiUrl + "getCompaniesListsForBusiness", { "records":{ "pd_id" : pdid}})
|
||||
// .pipe(
|
||||
// catchError(this.handleError('operation', []))
|
||||
// )
|
||||
// }
|
||||
getCompaniesListsForBusiness(pdid: any): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + "getCompaniesListsForBusiness", { "records":{ "pd_id" : pdid}})
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
/** To get StateWise City List For
|
||||
* 1) Family Form
|
||||
@ -842,5 +843,12 @@ checkExistPDDetails(datas,entity_id){
|
||||
.pipe(catchError(this.handleError("checkExistPDDetails",[])))
|
||||
}
|
||||
|
||||
getBusinessDocsToVendorForm(editId) {
|
||||
const options = editId ?
|
||||
{ params: new HttpParams().set('pdid', editId) } : {};
|
||||
return this._http.get(this.apiUrl+'getBusinessDocsToVendorForm',options)
|
||||
.pipe(catchError(this.handleError("getBusinessDocsToVendorForm",[])))
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user