feedbacks issue fix
This commit is contained in:
parent
a130ae554c
commit
9660b8944a
@ -3,8 +3,8 @@
|
|||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"production": "node --max_old_space_size=6144 node_modules/@angular/cli/bin/ng build --prod --build-optimizer=true --base-href /salespdpwa/",
|
"production": "node --max_old_space_size=6144 node_modules/@angular/cli/bin/ng build --prod --build-optimizer=true --base-href",
|
||||||
"staging": "node --max_old_space_size=6144 node_modules/@angular/cli/bin/ng build --prod --configuration=staging --base-href /salespdpwa/",
|
"staging": "node --max_old_space_size=6144 node_modules/@angular/cli/bin/ng build --prod --configuration=staging --base-href",
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"build": "ng build",
|
"build": "ng build",
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<button (click)="capture($event)" mat-button mat-raised-button>Capture
|
<button (click)="capture($event)" mat-button mat-raised-button [disabled]="sales_pd_type == '2'">Capture
|
||||||
<mat-icon name="camera" *ngIf="!addMoreBtn">camera_alt</mat-icon>
|
<mat-icon name="camera" *ngIf="!addMoreBtn">camera_alt</mat-icon>
|
||||||
<mat-icon name="camera" *ngIf="addMoreBtn">add_a_photo</mat-icon>
|
<mat-icon name="camera" *ngIf="addMoreBtn">add_a_photo</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';
|
import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';
|
||||||
import { Ng2ImgMaxService } from 'ng2-img-max';
|
import { Ng2ImgMaxService } from 'ng2-img-max';
|
||||||
|
import { LoaderService } from 'app/shared/loaderService/loader.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-capture-btn',
|
selector: 'app-capture-btn',
|
||||||
@ -11,19 +12,27 @@ export class CaptureBtnComponent implements OnInit {
|
|||||||
@Input() addMoreBtn;
|
@Input() addMoreBtn;
|
||||||
@Output() imageDataEmitter = new EventEmitter
|
@Output() imageDataEmitter = new EventEmitter
|
||||||
@Output() singleDataEmitter = new EventEmitter
|
@Output() singleDataEmitter = new EventEmitter
|
||||||
|
sales_pd_type: string;
|
||||||
|
|
||||||
constructor(private ng2ImgMax:Ng2ImgMaxService) { }
|
constructor(private ng2ImgMax:Ng2ImgMaxService,private loaderService:LoaderService) {
|
||||||
|
this.sales_pd_type = localStorage.getItem('sales_pd_type')
|
||||||
|
console.log(this.sales_pd_type)
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
console.log(this.addMoreBtn)
|
console.log(this.addMoreBtn)
|
||||||
}
|
}
|
||||||
capturedImage(event){
|
capturedImage(event){
|
||||||
|
this.loaderService.showMatSpinnerDialog('Fetching Data...')
|
||||||
console.log(event);
|
console.log(event);
|
||||||
let imageData= event.target.files[0]
|
let imageData= event.target.files[0]
|
||||||
|
|
||||||
this.ng2ImgMax.resizeImage(imageData, 450, 650).subscribe(
|
this.ng2ImgMax.resizeImage(imageData, 450, 650).subscribe(
|
||||||
result => {
|
result => {
|
||||||
|
|
||||||
this.imageDataEmitter.emit(result)
|
this.imageDataEmitter.emit(result)
|
||||||
this.singleDataEmitter.emit(result)
|
this.singleDataEmitter.emit(result)
|
||||||
|
this.loaderService.closeMatSpinnerDialog()
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
console.log('😢 Oh no!', error);
|
console.log('😢 Oh no!', error);
|
||||||
|
|||||||
@ -10,12 +10,18 @@
|
|||||||
<div *ngIf="parent_ques.get('is_repeatable').value != '1'">
|
<div *ngIf="parent_ques.get('is_repeatable').value != '1'">
|
||||||
|
|
||||||
<mat-form-field style="width: 100%" *ngIf="parent_ques.get('type').value == '1'" [ngStyle]="{'margin-bottom':parent_ques.get('field_type').value == 'numtoword' ? '5%' : '0' }">
|
<mat-form-field style="width: 100%" *ngIf="parent_ques.get('type').value == '1'" [ngStyle]="{'margin-bottom':parent_ques.get('field_type').value == 'numtoword' ? '5%' : '0' }">
|
||||||
|
|
||||||
<mat-label>{{parent_ques.get('question').value}}</mat-label>
|
<mat-label>{{parent_ques.get('question').value}}</mat-label>
|
||||||
<input matInput [type]="parent_ques.get('field_type').value == 'num' || parent_ques.get('field_type').value == 'numtoword' ? 'number' : parent_ques.get('field_type').value == 'string' ? 'text' : parent_ques.get('field_type').value" formControlName="answer_value"
|
<textarea style="overflow: hidden !important;" matInput cdkTextareaAutosize
|
||||||
|
#autosize="cdkTextareaAutosize"
|
||||||
|
cdkAutosizeMinRows="1"
|
||||||
|
cdkAutosizeMaxRows="5"
|
||||||
|
[type]="parent_ques.get('field_type').value == 'num' || parent_ques.get('field_type').value == 'numtoword' ? 'number' : parent_ques.get('field_type').value == 'string' ? 'text' : parent_ques.get('field_type').value" formControlName="answer_value"
|
||||||
|
[placeholder]="parent_ques.value.hasOwnProperty('place_holder') ? parent_ques.get('place_holder').value : ''"
|
||||||
|
autocomplete="off" (change)="onChangeProperty($event,parent_ques,'','',p_i)"></textarea>
|
||||||
|
<!--<input matInput [type]="parent_ques.get('field_type').value == 'num' || parent_ques.get('field_type').value == 'numtoword' ? 'number' : parent_ques.get('field_type').value == 'string' ? 'text' : parent_ques.get('field_type').value" formControlName="answer_value"
|
||||||
[placeholder]="parent_ques.value.hasOwnProperty('place_holder') ? parent_ques.get('place_holder').value : ''"
|
[placeholder]="parent_ques.value.hasOwnProperty('place_holder') ? parent_ques.get('place_holder').value : ''"
|
||||||
autocomplete="off" (change)="onChangeProperty($event,parent_ques,'','',p_i)"
|
autocomplete="off" (change)="onChangeProperty($event,parent_ques,'','',p_i)"
|
||||||
>
|
> -->
|
||||||
<!--[placeholder]="parent_ques.get('field_type').value == 'num' || parent_ques.get('field_type').value == 'numtoword' ? 'Entert the Number' : 'Enter the Text'" -->
|
<!--[placeholder]="parent_ques.get('field_type').value == 'num' || parent_ques.get('field_type').value == 'numtoword' ? 'Entert the Number' : 'Enter the Text'" -->
|
||||||
<mat-hint *ngIf="parent_ques.get('answer_value').value != '' && parent_ques.get('field_type').value == 'numtoword'" align="end" style="font-size: 12px;">{{"₹"}}{{parent_ques.get('answer_value').value | numberToWords}}</mat-hint>
|
<mat-hint *ngIf="parent_ques.get('answer_value').value != '' && parent_ques.get('field_type').value == 'numtoword'" align="end" style="font-size: 12px;">{{"₹"}}{{parent_ques.get('answer_value').value | numberToWords}}</mat-hint>
|
||||||
<!-- <mat-hint align="end" style="font-size: 11.5px;color: gray;" *ngIf="parent_ques.get('is_amt_in_words').value == true">One Lack</mat-hint> -->
|
<!-- <mat-hint align="end" style="font-size: 11.5px;color: gray;" *ngIf="parent_ques.get('is_amt_in_words').value == true">One Lack</mat-hint> -->
|
||||||
@ -52,7 +58,6 @@
|
|||||||
<mat-error align="end" *ngIf="parent_ques.get('answer_value').hasError(validation.name.toLowerCase())">{{validation.message}}</mat-error>
|
<mat-error align="end" *ngIf="parent_ques.get('answer_value').hasError(validation.name.toLowerCase())">{{validation.message}}</mat-error>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<mat-form-field style="width: 100%" *ngIf="parent_ques.get('type').value == '4'">
|
<mat-form-field style="width: 100%" *ngIf="parent_ques.get('type').value == '4'">
|
||||||
<mat-label>{{parent_ques.get('question').value}}</mat-label>
|
<mat-label>{{parent_ques.get('question').value}}</mat-label>
|
||||||
<mat-select multiple formControlName="answer_value" (selectionChange)="onChangeProperty($event,parent_ques,'','',p_i)">
|
<mat-select multiple formControlName="answer_value" (selectionChange)="onChangeProperty($event,parent_ques,'','',p_i)">
|
||||||
@ -103,7 +108,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<hr/>
|
<hr/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- </ion-grid> -->
|
<!-- </ion-grid> -->
|
||||||
<ng-container *ngFor="let validation of parent_ques.get('validations').value;" ngProjectAs="mat-error">
|
<ng-container *ngFor="let validation of parent_ques.get('validations').value;" ngProjectAs="mat-error">
|
||||||
<mat-error align="end" *ngIf="parent_ques.get('answer_value').hasError(validation.name.toLowerCase())">{{validation.message}}</mat-error>
|
<mat-error align="end" *ngIf="parent_ques.get('answer_value').hasError(validation.name.toLowerCase())">{{validation.message}}</mat-error>
|
||||||
@ -112,10 +116,12 @@
|
|||||||
<mat-error align="end">Please capture the image</mat-error>
|
<mat-error align="end">Please capture the image</mat-error>
|
||||||
</ng-container>-->
|
</ng-container>-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<mat-form-field style="width: 100%" *ngIf="parent_ques.get('type').value == '7'">
|
<mat-form-field style="width: 100%" *ngIf="parent_ques.get('type').value == '7'">
|
||||||
<mat-label>{{parent_ques.get('question').value}}</mat-label>
|
<mat-label>{{parent_ques.get('question').value}}</mat-label>
|
||||||
<textarea matInput type="text" rows="3" formControlName="answer_value" placeholder="Enter the Text"
|
<textarea style="overflow: hidden !important;" matInput type="text" cdkTextareaAutosize
|
||||||
|
#autosize="cdkTextareaAutosize"
|
||||||
|
cdkAutosizeMinRows="1"
|
||||||
|
cdkAutosizeMaxRows="5" formControlName="answer_value" placeholder="Enter the Text"
|
||||||
autocomplete="off" ></textarea>
|
autocomplete="off" ></textarea>
|
||||||
<!-- <mat-error align="end" style="font-style: italic;margin-right: 5px;">Field is Required</mat-error> -->
|
<!-- <mat-error align="end" style="font-style: italic;margin-right: 5px;">Field is Required</mat-error> -->
|
||||||
<ng-container *ngFor="let validation of parent_ques.get('validations').value;" ngProjectAs="mat-error">
|
<ng-container *ngFor="let validation of parent_ques.get('validations').value;" ngProjectAs="mat-error">
|
||||||
@ -178,9 +184,16 @@
|
|||||||
|
|
||||||
<mat-form-field style="width: 100%" *ngIf="single_ques.get('type').value == '1'" [ngStyle]="{'margin-bottom':single_ques.value.hasOwnProperty('field_type') ? single_ques.get('field_type').value == 'numtoword' ? '5%' : '0' : '' }">
|
<mat-form-field style="width: 100%" *ngIf="single_ques.get('type').value == '1'" [ngStyle]="{'margin-bottom':single_ques.value.hasOwnProperty('field_type') ? single_ques.get('field_type').value == 'numtoword' ? '5%' : '0' : '' }">
|
||||||
<mat-label>{{single_ques.get('question').value}}</mat-label>
|
<mat-label>{{single_ques.get('question').value}}</mat-label>
|
||||||
<input matInput [type]="single_ques.value.hasOwnProperty('field_type') ? single_ques.get('field_type').value == 'num' || single_ques.get('field_type').value == 'numtoword' ? 'number' : single_ques.get('field_type').value == 'string' ? 'text' : single_ques.get('field_type').value: ''" formControlName="answer_value"
|
<textarea style="overflow: hidden !important;" matInput cdkTextareaAutosize
|
||||||
|
#autosize="cdkTextareaAutosize"
|
||||||
|
cdkAutosizeMinRows="1"
|
||||||
|
cdkAutosizeMaxRows="5"
|
||||||
|
[type]="single_ques.value.hasOwnProperty('field_type') ? single_ques.get('field_type').value == 'num' || single_ques.get('field_type').value == 'numtoword' ? 'number' : single_ques.get('field_type').value == 'string' ? 'text' : single_ques.get('field_type').value: ''" formControlName="answer_value"
|
||||||
[placeholder]="single_ques.value.hasOwnProperty('place_holder') ? single_ques.get('place_holder').value : ''"
|
[placeholder]="single_ques.value.hasOwnProperty('place_holder') ? single_ques.get('place_holder').value : ''"
|
||||||
autocomplete="off" (change)="onChangeProperty($event,single_ques,group_ques,2,s_i)">
|
autocomplete="off" (change)="onChangeProperty($event,single_ques,group_ques,2,s_i)"></textarea>
|
||||||
|
<!-- <input matInput [type]="single_ques.value.hasOwnProperty('field_type') ? single_ques.get('field_type').value == 'num' || single_ques.get('field_type').value == 'numtoword' ? 'number' : single_ques.get('field_type').value == 'string' ? 'text' : single_ques.get('field_type').value: ''" formControlName="answer_value"
|
||||||
|
[placeholder]="single_ques.value.hasOwnProperty('place_holder') ? single_ques.get('place_holder').value : ''"
|
||||||
|
autocomplete="off" (change)="onChangeProperty($event,single_ques,group_ques,2,s_i)"> -->
|
||||||
<mat-hint *ngIf="single_ques.get('answer_value').value != '' && single_ques.value.hasOwnProperty('field_type') && single_ques.get('field_type').value == 'numtoword'" align="end" style="font-size: 10px;">{{"₹"}}{{single_ques.get('answer_value').value | numberToWords}}</mat-hint>
|
<mat-hint *ngIf="single_ques.get('answer_value').value != '' && single_ques.value.hasOwnProperty('field_type') && single_ques.get('field_type').value == 'numtoword'" align="end" style="font-size: 10px;">{{"₹"}}{{single_ques.get('answer_value').value | numberToWords}}</mat-hint>
|
||||||
<!-- <mat-error align="end" style="font-style: italic;margin-right: 5px;">Field is Required</mat-error> -->
|
<!-- <mat-error align="end" style="font-style: italic;margin-right: 5px;">Field is Required</mat-error> -->
|
||||||
<ng-container *ngFor="let validation of single_ques.get('validations').value;" ngProjectAs="mat-error">
|
<ng-container *ngFor="let validation of single_ques.get('validations').value;" ngProjectAs="mat-error">
|
||||||
@ -230,8 +243,11 @@
|
|||||||
|
|
||||||
<mat-form-field style="width: 100%" *ngIf="single_ques.get('type').value == '7'">
|
<mat-form-field style="width: 100%" *ngIf="single_ques.get('type').value == '7'">
|
||||||
<mat-label>{{single_ques.get('question').value}}</mat-label>
|
<mat-label>{{single_ques.get('question').value}}</mat-label>
|
||||||
<textarea matInput type="text" rows="3" formControlName="answer_value" placeholder="Enter the Text"
|
<textarea style="overflow: hidden !important;" cdkTextareaAutosize
|
||||||
autocomplete="off" ></textarea>
|
#autosize="cdkTextareaAutosize"
|
||||||
|
cdkAutosizeMinRows="1"
|
||||||
|
cdkAutosizeMaxRows="5" matInput type="text" rows="3" formControlName="answer_value" placeholder="Enter the Text"
|
||||||
|
></textarea>
|
||||||
<!-- <mat-error align="end" style="font-style: italic;margin-right: 5px;">Field is Required</mat-error> -->
|
<!-- <mat-error align="end" style="font-style: italic;margin-right: 5px;">Field is Required</mat-error> -->
|
||||||
<ng-container *ngFor="let validation of single_ques.get('validations').value;" ngProjectAs="mat-error">
|
<ng-container *ngFor="let validation of single_ques.get('validations').value;" ngProjectAs="mat-error">
|
||||||
<mat-error align="end" *ngIf="single_ques.get('answer_value').hasError(validation.name.toLowerCase())">{{validation.message}}</mat-error>
|
<mat-error align="end" *ngIf="single_ques.get('answer_value').hasError(validation.name.toLowerCase())">{{validation.message}}</mat-error>
|
||||||
@ -263,8 +279,14 @@
|
|||||||
<mat-form-field style="width: 100%" >
|
<mat-form-field style="width: 100%" >
|
||||||
|
|
||||||
<mat-label>{{single_ques.get('subfield_caption').value}}</mat-label>
|
<mat-label>{{single_ques.get('subfield_caption').value}}</mat-label>
|
||||||
<input matInput type="text" formControlName="subfield_value" placeholder="Enter the Text"
|
<textarea style="overflow: hidden !important;" matInput cdkTextareaAutosize
|
||||||
autocomplete="off">
|
#autosize="cdkTextareaAutosize"
|
||||||
|
cdkAutosizeMinRows="1"
|
||||||
|
cdkAutosizeMaxRows="5"
|
||||||
|
type="text" formControlName="subfield_value" placeholder="Enter the Text"
|
||||||
|
autocomplete="off"></textarea>
|
||||||
|
<!-- <input matInput type="text" formControlName="subfield_value" placeholder="Enter the Text"
|
||||||
|
autocomplete="off"> -->
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
</div>
|
</div>
|
||||||
@ -400,8 +422,14 @@
|
|||||||
<mat-form-field style="width: 100%" >
|
<mat-form-field style="width: 100%" >
|
||||||
|
|
||||||
<mat-label>{{parent_ques.get('subfield_caption').value}}</mat-label>
|
<mat-label>{{parent_ques.get('subfield_caption').value}}</mat-label>
|
||||||
<input matInput type="text" formControlName="subfield_value" placeholder="Enter the Text"
|
<textarea style="overflow: hidden !important;" matInput cdkTextareaAutosize
|
||||||
autocomplete="off">
|
#autosize="cdkTextareaAutosize"
|
||||||
|
cdkAutosizeMinRows="1"
|
||||||
|
cdkAutosizeMaxRows="5"
|
||||||
|
type="text" formControlName="subfield_value" placeholder="Enter the Text"
|
||||||
|
autocomplete="off"></textarea>
|
||||||
|
<!-- <input matInput type="text" formControlName="subfield_value" placeholder="Enter the Text"
|
||||||
|
autocomplete="off"> -->
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -46,3 +46,29 @@
|
|||||||
// background-color: red;
|
// background-color: red;
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
// textarea.mat-input-element {
|
||||||
|
// overflow: hidden !important;
|
||||||
|
// }
|
||||||
|
::ng-deep .mat-select-value-text{
|
||||||
|
line-height: initial !important;
|
||||||
|
word-wrap: break-word !important;
|
||||||
|
white-space: pre-wrap !important;
|
||||||
|
}
|
||||||
|
::ng-deep .mat-select-value-text {
|
||||||
|
margin: 1rem 0;
|
||||||
|
overflow: visible;
|
||||||
|
line-height: initial;
|
||||||
|
word-wrap: break-word;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mat-option-text.mat-option-text {
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
::ng-deep .mat-select-panel mat-option.mat-option {
|
||||||
|
height: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
::ng-deep .mat-option-text.mat-option-text {
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
@ -9,6 +9,7 @@ import { FormGroup, FormArray, FormBuilder, FormControl,FormControlName } from '
|
|||||||
import { NotifierService } from 'angular-notifier';
|
import { NotifierService } from 'angular-notifier';
|
||||||
import { takeUntil, single } from 'rxjs/operators';
|
import { takeUntil, single } from 'rxjs/operators';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
|
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
|
||||||
//import { LoadingProvider } from '../../../../providers/common-provider/loading';
|
//import { LoadingProvider } from '../../../../providers/common-provider/loading';
|
||||||
//import { NavController } from 'ionic-angular/navigation/nav-controller';
|
//import { NavController } from 'ionic-angular/navigation/nav-controller';
|
||||||
import { Section9, Section1, Section2, Section3, Section4, Section5, Section6, Section7, Section8 } from '../../home/home';
|
import { Section9, Section1, Section2, Section3, Section4, Section5, Section6, Section7, Section8 } from '../../home/home';
|
||||||
@ -62,6 +63,7 @@ export class QuesTemplateComponent {
|
|||||||
original_result_data: any={is_complete:''};
|
original_result_data: any={is_complete:''};
|
||||||
// spinner_access:boolean=false
|
// spinner_access:boolean=false
|
||||||
raw_data_Section: any={status:''};
|
raw_data_Section: any={status:''};
|
||||||
|
@ViewChild('autosize') autosize: CdkTextareaAutosize;
|
||||||
@ViewChild('accordion') Accordion: MatAccordion
|
@ViewChild('accordion') Accordion: MatAccordion
|
||||||
@ViewChild('mapanel') matExpansionPanel:MatExpansionPanel
|
@ViewChild('mapanel') matExpansionPanel:MatExpansionPanel
|
||||||
@Output() imageDataEmitter = new EventEmitter
|
@Output() imageDataEmitter = new EventEmitter
|
||||||
@ -109,7 +111,7 @@ export class QuesTemplateComponent {
|
|||||||
if(raw_data_ques.hasOwnProperty('sections') ){
|
if(raw_data_ques.hasOwnProperty('sections') ){
|
||||||
|
|
||||||
console.log("FROM COMPONENT",this.questions_JSON);
|
console.log("FROM COMPONENT",this.questions_JSON);
|
||||||
//this.local_ques_JSON={"section_id":"1","section_name":"General Section","onsubmit":null,"questions":[{"question":"Name of The Main Loan Applicant","question_key":"main_loan_applicant","place_holder":"Enter text","type":"1","answers":null,"api_properties":null,"is_repeatable":null,"field_type":"string","validations":[{"name":"required","isactive":"1","validator":"Validators.required","message":"Main Loan Applicant Name Required","value":null},{"name":"pattern","isactive":"1","validator":"[A-Za-z ]*","message":"alphabets only ","value":null}],"onchange_properties":null},{"question":"Name of the Company/Firm","question_key":"company_name","place_holder":"Enter text","type":"1","answers":null,"api_properties":null,"onchange_properties":null,"is_repeatable":null,"field_type":"string","validations":[{"name":"required","isactive":"1","validator":"Validators.required","message":"Company Name Required","value":null}]},{"question":"Name of Person Met during visit","question_key":"person_met_during_visit","place_holder":"Enter text","type":"1","answers":null,"api_properties":null,"onchange_properties":null,"is_repeatable":null,"field_type":"string","validations":[{"name":"required","isactive":"1","validator":"Validators.required","message":"Person Met Name Required","value":null},{"name":"pattern","isactive":"1","validator":"[A-Za-z ]*","message":"alphabets only ","value":null}]},{"question":"Address Visited","question_key":"address_visited","place_holder":"Enter door no,street","type":"1","answers":null,"api_properties":null,"onchange_properties":null,"is_repeatable":null,"field_type":"string","validations":[{"name":"required","isactive":"1","validator":"Validators.required","message":"Address Required","value":null}]},{"question":"State","question_key":"state","type":"8","answers":null,"api_properties":{"api":"getListOfMaster","api_method":"POST","params":{"master_name":"STATE"},"fields":["state_id","name"]},"onchange_properties":[{"purpose":"api","api":"getListOfStatesAndCities","api_method":"POST","params":"{records:{state_id:'value_of_answer'}}","fields":["state_id","name"],"local_variable":"local_city"}],"is_repeatable":null,"validations":[{"name":"required","isactive":"1","validator":"Validators.required","message":"State Required","value":null}]},{"question":"City","question_key":"city","type":"8","answers":null,"api_properties":"local_city","onchange_properties":null,"is_repeatable":null,"validations":[{"name":"required","isactive":"1","validator":"Validators.required","message":"CIty Required","value":null}]},{"question":"Pincode","question_key":"pincode","type":"8","answers":null,"api_properties":"local_pincode","onchange_properties":[{"purpose":"FORM_CTRL","form_controls":[{"insert_index":"pincode","expression":"(pincode == 1)","value_keys":["pincode"],"questions":[{"question_key":"pincode_others","question":"Specify the Pincode","place_holder":"Enter the Pincode","type":"1","api_properties":null,"answers":null,"onchange_properties":null,"is_repeatable":null,"field_type":"num","validations":[{"name":"required","isactive":"1","validator":"Validators.required","message":"Pincode is Required","value":null},{"name":"pattern","isactive":"1","validator":"[0-9]{6}","message":"Pincode should be 6 digit","value":null}]}]}]}],"is_repeatable":null,"validations":[{"name":"required","isactive":"1","validator":"Validators.required","message":"Pincode Required","value":null}]}],"order_id":1}
|
|
||||||
this.local_ques_JSON=this.questions_JSON;
|
this.local_ques_JSON=this.questions_JSON;
|
||||||
if(this.local_ques_JSON.section_id == raw_data_ques.sections[raw_data_ques.sections.length -1].section_id){
|
if(this.local_ques_JSON.section_id == raw_data_ques.sections[raw_data_ques.sections.length -1].section_id){
|
||||||
this.submit_btn=true
|
this.submit_btn=true
|
||||||
@ -119,6 +121,7 @@ export class QuesTemplateComponent {
|
|||||||
|
|
||||||
this.quesAnsForm = this.questionService.assignFormControl_array(this.quesAnsForm,this.local_ques_JSON.questions)
|
this.quesAnsForm = this.questionService.assignFormControl_array(this.quesAnsForm,this.local_ques_JSON.questions)
|
||||||
console.log(this.quesAnsForm);
|
console.log(this.quesAnsForm);
|
||||||
|
|
||||||
// localStorage.setItem('sales_pd_id_PRIMARYKEY', 'null')
|
// localStorage.setItem('sales_pd_id_PRIMARYKEY', 'null')
|
||||||
let key_value = localStorage.getItem('sales_pd_id_PRIMARYKEY')
|
let key_value = localStorage.getItem('sales_pd_id_PRIMARYKEY')
|
||||||
|
|
||||||
@ -161,7 +164,7 @@ this.sales_pd_type = localStorage.getItem('sales_pd_type')
|
|||||||
getSalesPDSectionFromApi(sales_pd_id){
|
getSalesPDSectionFromApi(sales_pd_id){
|
||||||
// alert('pass');
|
// alert('pass');
|
||||||
console.log(sales_pd_id)
|
console.log(sales_pd_id)
|
||||||
this.loaderService.showMatSpinnerDialog('Fetching Data...')
|
// this.loaderService.showMatSpinnerDialog('Fetching Data...')
|
||||||
// this.checkGroupandPatchValues()
|
// this.checkGroupandPatchValues()
|
||||||
// this.loadingProvider.pdloader("Fetching Data...")
|
// this.loadingProvider.pdloader("Fetching Data...")
|
||||||
let params={sales_pd_id:sales_pd_id,section_id:this.local_ques_JSON.section_id}
|
let params={sales_pd_id:sales_pd_id,section_id:this.local_ques_JSON.section_id}
|
||||||
@ -187,7 +190,8 @@ this.sales_pd_type = localStorage.getItem('sales_pd_type')
|
|||||||
// FOR DISPLAYING THE CUSTOMER CAPTURED IMAGE (STRUCTURED DYNAMICALLY CREATED IN FRONTEND) (***TELE PD ONLY***)
|
// FOR DISPLAYING THE CUSTOMER CAPTURED IMAGE (STRUCTURED DYNAMICALLY CREATED IN FRONTEND) (***TELE PD ONLY***)
|
||||||
|
|
||||||
if(sales_pd_id && this.sales_pd_type && this.sales_pd_type == '2' && this.local_ques_JSON.section_id == '9' && !this. sales_pd_id.includes('local')) {
|
if(sales_pd_id && this.sales_pd_type && this.sales_pd_type == '2' && this.local_ques_JSON.section_id == '9' && !this. sales_pd_id.includes('local')) {
|
||||||
this.SalesPdService.getData_fromLocal('sales_rand_string').then((sales_rand_string)=>{
|
let sales_rand_string = localStorage.getItem('sales_rand_string')
|
||||||
|
// this.SalesPdService.getData_fromLocal('sales_rand_string').then((sales_rand_string)=>{
|
||||||
let params = {"rand_string":sales_rand_string}
|
let params = {"rand_string":sales_rand_string}
|
||||||
this.SalesPdService.getSalesPDImgDataCusLink(params).subscribe(result=>{
|
this.SalesPdService.getSalesPDImgDataCusLink(params).subscribe(result=>{
|
||||||
if(result['dataStatus']){
|
if(result['dataStatus']){
|
||||||
@ -198,7 +202,7 @@ this.sales_pd_type = localStorage.getItem('sales_pd_type')
|
|||||||
},err=>{
|
},err=>{
|
||||||
this.loaderService.closeMatSpinnerDialog()
|
this.loaderService.closeMatSpinnerDialog()
|
||||||
})
|
})
|
||||||
})
|
// })
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
// alert('5th');
|
// alert('5th');
|
||||||
@ -1319,6 +1323,7 @@ this.proceedonChangeProperty(modified)
|
|||||||
return updateMsg;
|
return updateMsg;
|
||||||
}
|
}
|
||||||
onSubmitProperty(sales_pd_id = this.sales_pd_id){
|
onSubmitProperty(sales_pd_id = this.sales_pd_id){
|
||||||
|
// this.loaderService.showMatSpinnerDialog('Please wait...')
|
||||||
console.log(this.sales_pd_id)
|
console.log(this.sales_pd_id)
|
||||||
let return_val=[]
|
let return_val=[]
|
||||||
let send_val:boolean=true
|
let send_val:boolean=true
|
||||||
@ -1640,6 +1645,9 @@ this.proceedonChangeProperty(modified)
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
sendSectiontoApi(params){
|
sendSectiontoApi(params){
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.loaderService.showMatSpinnerDialog('Please wait...')
|
||||||
|
},1200)
|
||||||
// alert('lastsave');
|
// alert('lastsave');
|
||||||
console.log('lastsave');
|
console.log('lastsave');
|
||||||
console.log(params);
|
console.log(params);
|
||||||
@ -1649,7 +1657,7 @@ this.proceedonChangeProperty(modified)
|
|||||||
if(response.dataStatus){
|
if(response.dataStatus){
|
||||||
console.log('response',response);
|
console.log('response',response);
|
||||||
// alert('saved successfully');
|
// alert('saved successfully');
|
||||||
this.loaderService.closeMatSpinnerDialog()
|
// this.loaderService.closeMatSpinnerDialog()
|
||||||
this.notifier.notify("success","Saved Successfully");
|
this.notifier.notify("success","Saved Successfully");
|
||||||
// let product_id=localStorage.getItem('product_id_salesPD')
|
// let product_id=localStorage.getItem('product_id_salesPD')
|
||||||
// this.router.navigate(['../../sectionlist',product_id,this.sales_pd_type],{ relativeTo: this.route })
|
// this.router.navigate(['../../sectionlist',product_id,this.sales_pd_type],{ relativeTo: this.route })
|
||||||
@ -1780,7 +1788,7 @@ this.proceedonChangeProperty(modified)
|
|||||||
// this.navCtrl.pop();
|
// this.navCtrl.pop();
|
||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
this.loaderService.closeMatSpinnerDialog();
|
// this.loaderService.closeMatSpinnerDialog();
|
||||||
this.loaderService.closeMatSpinnerDialog()
|
this.loaderService.closeMatSpinnerDialog()
|
||||||
},err=>{
|
},err=>{
|
||||||
this.loaderService.closeMatSpinnerDialog();
|
this.loaderService.closeMatSpinnerDialog();
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<button (click)="singlecapture($event)" mat-button mat-raised-button>Capture
|
<button (click)="singlecapture($event)" mat-button mat-raised-button [disabled]="sales_pd_type == '2'">Capture
|
||||||
<mat-icon name="camera" *ngIf="!addMoreBtn">camera_alt</mat-icon>
|
<mat-icon name="camera" *ngIf="!addMoreBtn">camera_alt</mat-icon>
|
||||||
<mat-icon name="camera" *ngIf="addMoreBtn">add_a_photo</mat-icon>
|
<mat-icon name="camera" *ngIf="addMoreBtn">add_a_photo</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';
|
import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';
|
||||||
import { Ng2ImgMaxService } from 'ng2-img-max';
|
import { Ng2ImgMaxService } from 'ng2-img-max';
|
||||||
|
import { LoaderService } from 'app/shared/loaderService/loader.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-single-capture-btn',
|
selector: 'app-single-capture-btn',
|
||||||
@ -12,19 +13,26 @@ export class SingleCaptureBtnComponent implements OnInit {
|
|||||||
@Input() addMoreBtn;
|
@Input() addMoreBtn;
|
||||||
|
|
||||||
@Output() singleDataEmitter = new EventEmitter
|
@Output() singleDataEmitter = new EventEmitter
|
||||||
|
sales_pd_type: string;
|
||||||
|
|
||||||
constructor(private ng2ImgMax:Ng2ImgMaxService) { }
|
constructor(private ng2ImgMax:Ng2ImgMaxService,private loaderService:LoaderService) {
|
||||||
|
this.sales_pd_type = localStorage.getItem('sales_pd_type')
|
||||||
|
console.log(this.sales_pd_type)
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
console.log(this.addMoreBtn)
|
console.log(this.addMoreBtn)
|
||||||
}
|
}
|
||||||
singlecapturedImage(event){
|
singlecapturedImage(event){
|
||||||
|
this.loaderService.showMatSpinnerDialog('Fetching Data...')
|
||||||
console.log(event);
|
console.log(event);
|
||||||
let imageData= event.target.files[0]
|
let imageData= event.target.files[0]
|
||||||
|
|
||||||
this.ng2ImgMax.resizeImage(imageData, 450, 650).subscribe(
|
this.ng2ImgMax.resizeImage(imageData, 450, 650).subscribe(
|
||||||
result => {
|
result => {
|
||||||
|
|
||||||
this.singleDataEmitter.emit(result)
|
this.singleDataEmitter.emit(result)
|
||||||
|
this.loaderService.closeMatSpinnerDialog()
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
console.log('😢 Oh no!', error);
|
console.log('😢 Oh no!', error);
|
||||||
|
|||||||
@ -63,7 +63,7 @@ export class SalesPdComponent implements OnInit {
|
|||||||
this.is_sales_login = false
|
this.is_sales_login = false
|
||||||
this.getListofPD()
|
this.getListofPD()
|
||||||
}
|
}
|
||||||
},1000)
|
},2000)
|
||||||
|
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
this.common = JSON.parse(localStorage.getItem('commonSettings'))
|
this.common = JSON.parse(localStorage.getItem('commonSettings'))
|
||||||
|
|||||||
@ -6,6 +6,13 @@
|
|||||||
<h4 class="mt-0">Section List</h4>
|
<h4 class="mt-0">Section List</h4>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex="33" align="end">
|
<div fxFlex="33" align="end">
|
||||||
|
|
||||||
|
<button *ngIf="customer_link != '' && sales_pd_type == '2'" mat-raised-button mat-icon-button class="hover-icon" type="button" matTooltip="Copy Link" matTooltipPosition="above" (click)="copyToClipBoard(customer_link_with_text, 'Customer Link is copied')"><mat-icon>file_copy</mat-icon></button>
|
||||||
|
|
||||||
|
<!-- <button *ngIf="customer_link != '' && sales_pd_type == '2'" mat-raised-button mat-icon-button class="hover-icon" type="button" matTooltip="Send Link vai SMS" matTooltipPosition="above" (click)="shareViaSMS()" ><mat-icon>textsms</mat-icon>
|
||||||
|
<ion-label >Send Link via SMS</ion-label>
|
||||||
|
</button> -->
|
||||||
|
|
||||||
<!-- <a href={{link}} target={{link}}>
|
<!-- <a href={{link}} target={{link}}>
|
||||||
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="link" matTooltipPosition="above"><mat-icon>link</mat-icon></button></a> -->
|
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="link" matTooltipPosition="above"><mat-icon>link</mat-icon></button></a> -->
|
||||||
|
|
||||||
|
|||||||
@ -392,10 +392,12 @@ export class SectionListComponent implements OnInit {
|
|||||||
this.getSectionStats()
|
this.getSectionStats()
|
||||||
this.loadTemplates(this.product_id,2,this.sales_pd_type);
|
this.loadTemplates(this.product_id,2,this.sales_pd_type);
|
||||||
// }
|
// }
|
||||||
if(dataresult.is_completed == true){
|
if(dataresult != undefined){
|
||||||
|
if(dataresult.hasOwnProperty('is_completed') && dataresult.is_completed == true){
|
||||||
console.log('396')
|
console.log('396')
|
||||||
this.loadPdViewCompoent()
|
this.loadPdViewCompoent()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
// setTimeout(()=>{
|
// setTimeout(()=>{
|
||||||
//this.router.navigate(['Section9',section_id],{ relativeTo: this.route })
|
//this.router.navigate(['Section9',section_id],{ relativeTo: this.route })
|
||||||
@ -440,23 +442,24 @@ export class SectionListComponent implements OnInit {
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
// copyToClipBoard(message,user_msg?) {
|
copyToClipBoard(message,user_msg?) {
|
||||||
// const selBox = document.createElement('textarea');
|
const selBox = document.createElement('textarea');
|
||||||
// selBox.style.position = 'fixed';
|
selBox.style.position = 'fixed';
|
||||||
// selBox.style.left = '0';
|
selBox.style.left = '0';
|
||||||
// selBox.style.top = '0';
|
selBox.style.top = '0';
|
||||||
// selBox.style.opacity = '0';
|
selBox.style.opacity = '0';
|
||||||
// selBox.value = message;
|
selBox.value = message;
|
||||||
// document.body.appendChild(selBox);
|
document.body.appendChild(selBox);
|
||||||
// selBox.focus();
|
selBox.focus();
|
||||||
// selBox.select();
|
selBox.select();
|
||||||
// document.execCommand('copy');
|
document.execCommand('copy');
|
||||||
// document.body.removeChild(selBox);
|
document.body.removeChild(selBox);
|
||||||
// if(message == '') {
|
if(message == '') {
|
||||||
// user_msg = "Something went wrong"
|
user_msg = "Something went wrong"
|
||||||
// }
|
}
|
||||||
|
this.notifier.notify("warning",user_msg);
|
||||||
// this.toastProvider.lenderappmessage(user_msg)
|
// this.toastProvider.lenderappmessage(user_msg)
|
||||||
// }
|
}
|
||||||
|
|
||||||
// shareViaSMS() {
|
// shareViaSMS() {
|
||||||
// this.socialSharing.shareViaSMS(this.customer_link_with_text,'').then(result=>{
|
// this.socialSharing.shareViaSMS(this.customer_link_with_text,'').then(result=>{
|
||||||
|
|||||||
@ -9,7 +9,8 @@ import { FormGroup, FormControl, FormArray, FormBuilder, Validators } from '@ang
|
|||||||
//import { SalesPdProvider } from '../sales-pd/sales-pd';
|
//import { SalesPdProvider } from '../sales-pd/sales-pd';
|
||||||
|
|
||||||
import { DatePipe } from '@angular/common';
|
import { DatePipe } from '@angular/common';
|
||||||
import { SalesPdService } from './sales-pd.service';
|
import { SalesPdService } from './sales-pd.service';2
|
||||||
|
import { ApiServiceService } from 'app/lender-credit-pd/services/apiService/api-service.service';
|
||||||
const api_url = environment.apiEndpoint;
|
const api_url = environment.apiEndpoint;
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
@ -17,13 +18,13 @@ const api_url = environment.apiEndpoint;
|
|||||||
export class QuestionServiceService {
|
export class QuestionServiceService {
|
||||||
datepipe: DatePipe;
|
datepipe: DatePipe;
|
||||||
curr_pd_info: any;
|
curr_pd_info: any;
|
||||||
constructor(public http: HttpClient,private _fb:FormBuilder,private salesPDProvider:SalesPdService) {
|
constructor(public http: HttpClient,private _fb:FormBuilder,private salesPDProvider:SalesPdService,private apiService:ApiServiceService) {
|
||||||
this.datepipe=new DatePipe('en-US')
|
this.datepipe=new DatePipe('en-US')
|
||||||
}
|
}
|
||||||
// FOR CREATING A FORM CONTROL DYNAMICALLY
|
// FOR CREATING A FORM CONTROL DYNAMICALLY
|
||||||
assignFormControl_array(formgroup: FormGroup, ques_data: any) {
|
assignFormControl_array(formgroup: FormGroup, ques_data: any) {
|
||||||
// alert('question');
|
// alert('question');
|
||||||
// this.curr_pd_info = this.apiService.curr_credit_pd_data
|
this.curr_pd_info = this.apiService.curr_credit_pd_data
|
||||||
console.log(formgroup, ques_data)
|
console.log(formgroup, ques_data)
|
||||||
const control: any = formgroup.get('questions') as FormArray
|
const control: any = formgroup.get('questions') as FormArray
|
||||||
ques_data.forEach((val, index) => {
|
ques_data.forEach((val, index) => {
|
||||||
@ -145,7 +146,9 @@ export class QuestionServiceService {
|
|||||||
console.log(formgroup)
|
console.log(formgroup)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
console.log('149')
|
||||||
}, err => console.log(err))
|
}, err => console.log(err))
|
||||||
|
console.log('151')
|
||||||
return formgroup
|
return formgroup
|
||||||
}
|
}
|
||||||
// END OF FORM CREATION
|
// END OF FORM CREATION
|
||||||
@ -279,12 +282,14 @@ export class QuestionServiceService {
|
|||||||
|
|
||||||
//FOR CHECKBOX CHANGE THE VALUE STORAGE AS ARRAY
|
//FOR CHECKBOX CHANGE THE VALUE STORAGE AS ARRAY
|
||||||
if(data.type == '5'){
|
if(data.type == '5'){
|
||||||
|
console.log('305')
|
||||||
curr_control.controls[curr_index].removeControl('answer_value');
|
curr_control.controls[curr_index].removeControl('answer_value');
|
||||||
curr_control.controls[curr_index].addControl('answer_value',this._fb.array([]))
|
curr_control.controls[curr_index].addControl('answer_value',this._fb.array([]))
|
||||||
}
|
}
|
||||||
|
|
||||||
//FOR numeric of string field
|
//FOR numeric of string field
|
||||||
if(data.type == '1'){
|
if(data.type == '1'){
|
||||||
|
console.log('292')
|
||||||
curr_control.controls[curr_index].addControl('field_type',new FormControl(data.field_type))
|
curr_control.controls[curr_index].addControl('field_type',new FormControl(data.field_type))
|
||||||
curr_control.controls[curr_index].addControl('place_holder',new FormControl(data.place_holder))
|
curr_control.controls[curr_index].addControl('place_holder',new FormControl(data.place_holder))
|
||||||
}
|
}
|
||||||
@ -305,24 +310,35 @@ export class QuestionServiceService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(data.hasOwnProperty('question_enable') && data.question_enable != null && data.question_enable) {
|
if(data.hasOwnProperty('question_enable') && data.question_enable != null && data.question_enable) {
|
||||||
|
console.log('313',data.hasOwnProperty('question_enable') && data.question_enable != null && data.question_enable)
|
||||||
let expression= data.question_enable;
|
let expression= data.question_enable;
|
||||||
console.log("Check started",expression,expression.includes('PD_FORM_VALUES'));
|
console.log("Check started",expression,expression.includes('PD_FORM_VALUES'));
|
||||||
if(expression.includes('PD_FORM_VALUES')) {
|
if(expression.includes('PD_FORM_VALUES')) {
|
||||||
|
console.log('311',expression.includes('PD_FORM_VALUES'))
|
||||||
let sales_pd_id = localStorage.getItem('sales_pd_id_PRIMARYKEY')
|
let sales_pd_id = localStorage.getItem('sales_pd_id_PRIMARYKEY')
|
||||||
|
console.log('319',sales_pd_id)
|
||||||
// this.salesPDProvider.getData_fromLocal('sales_pd_id_PRIMARYKEY').then(sales_pd_id => {
|
// this.salesPDProvider.getData_fromLocal('sales_pd_id_PRIMARYKEY').then(sales_pd_id => {
|
||||||
|
setTimeout(()=>{
|
||||||
if(sales_pd_id) {
|
if(sales_pd_id) {
|
||||||
|
console.log('322',sales_pd_id)
|
||||||
let PD_FORM_VALUES = localStorage.getItem('PD_FORM_VALUES-'+sales_pd_id)
|
let PD_FORM_VALUES = localStorage.getItem('PD_FORM_VALUES-'+sales_pd_id)
|
||||||
|
console.log('324',PD_FORM_VALUES)
|
||||||
if(PD_FORM_VALUES) {
|
if(PD_FORM_VALUES) {
|
||||||
|
console.log('326',PD_FORM_VALUES)
|
||||||
PD_FORM_VALUES = JSON.parse(PD_FORM_VALUES)
|
PD_FORM_VALUES = JSON.parse(PD_FORM_VALUES)
|
||||||
|
console.log('328',PD_FORM_VALUES)
|
||||||
// expression = expression.split('PD_FORM_VALUES').join(local_pd_form_values)
|
// expression = expression.split('PD_FORM_VALUES').join(local_pd_form_values)
|
||||||
console.log("ex",expression)
|
console.log("ex",expression)
|
||||||
let result = eval(expression)
|
let result = eval(expression)
|
||||||
console.log(result);
|
console.log(result);
|
||||||
if(!result) {
|
if(!result) {
|
||||||
|
console.log('324',!result,curr_control.removeAt(curr_index))
|
||||||
curr_control.removeAt(curr_index);
|
curr_control.removeAt(curr_index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},500)
|
||||||
|
|
||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
// expression = expression.split(res).join(control_value_obj.answer_value)
|
// expression = expression.split(res).join(control_value_obj.answer_value)
|
||||||
@ -334,7 +350,7 @@ export class QuestionServiceService {
|
|||||||
|
|
||||||
// FOR SETTING THE ARRAY OF VALIDATORS COMING FROM JSON Temp,
|
// FOR SETTING THE ARRAY OF VALIDATORS COMING FROM JSON Temp,
|
||||||
settingArrayofValidators(data,curr_control,curr_index){
|
settingArrayofValidators(data,curr_control,curr_index){
|
||||||
console.log("entered 334",data);
|
console.log("entered 334",data,curr_control,curr_index);
|
||||||
if(data.hasOwnProperty('validations') && data.validations.length > 0 ){
|
if(data.hasOwnProperty('validations') && data.validations.length > 0 ){
|
||||||
const validList :any= [];
|
const validList :any= [];
|
||||||
let validator_value
|
let validator_value
|
||||||
@ -361,7 +377,7 @@ export class QuestionServiceService {
|
|||||||
console.log( '358',validList)
|
console.log( '358',validList)
|
||||||
// curr_control.controls[curr_index].controls.answer_value.setValidators(validList)
|
// curr_control.controls[curr_index].controls.answer_value.setValidators(validList)
|
||||||
curr_control.controls.answer_value.setValidators(validList)
|
curr_control.controls.answer_value.setValidators(validList)
|
||||||
console.log("ddvdeeqq 361",validList)
|
console.log("ddvdeeqq 361", curr_control.controls.answer_value.setValidators(validList),validList)
|
||||||
curr_control.controls.answer_value.updateValueAndValidity()
|
curr_control.controls.answer_value.updateValueAndValidity()
|
||||||
console.log("after setting validators 363",curr_control)
|
console.log("after setting validators 363",curr_control)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -346,7 +346,7 @@ getData_fromLocal(key){
|
|||||||
// console.log("all key in storage",this.storage.keys())
|
// console.log("all key in storage",this.storage.keys())
|
||||||
return key;
|
return key;
|
||||||
// return this.storage.get(key);
|
// return this.storage.get(key);
|
||||||
// return localStorage.getItem(key);
|
// return localStorage.getItem(key)
|
||||||
}
|
}
|
||||||
getSalesPdpdf(pdfdetail): Observable<any> {
|
getSalesPdpdf(pdfdetail): Observable<any> {
|
||||||
return this._http.get<any[]>(api_url + "downloadSalesPDReport/" + pdfdetail)
|
return this._http.get<any[]>(api_url + "downloadSalesPDReport/" + pdfdetail)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user