Fairoj : cliq feedback changes
This commit is contained in:
parent
9bde5be0ab
commit
260e96b8b1
@ -263,7 +263,8 @@
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="38%" fxFlex.xs="100%">
|
||||
<input matInput autocomplete="off" placeholder="Name of Individual Applicant" formControlName="applicant_name"
|
||||
<mat-label>Name of <span *ngIf="lenderShortName != 'MWISE'">Individual </span>Applicant</mat-label>
|
||||
<input matInput autocomplete="off" placeholder="" formControlName="applicant_name"
|
||||
[value]="pdMain.applicant_name.value | titlecase" (change)="checkExistPd($event.target.value,2)">
|
||||
<!-- <mat-error *ngIf="pdMain.applicant_name.hasError('required')">Name is Required.</mat-error> -->
|
||||
</mat-form-field>
|
||||
@ -304,7 +305,8 @@
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="38%" fxFlex.xs="100%">
|
||||
<input matInput autocomplete="off" placeholder="Name of Individual Applicant" formControlName="coapplicant_name" type="text"
|
||||
<mat-label>Name of <span *ngIf="lenderShortName != 'MWISE'">Individual </span>Applicant</mat-label>
|
||||
<input matInput autocomplete="off" placeholder="" formControlName="coapplicant_name" type="text"
|
||||
[value]="coDetails['controls'].coapplicant_name.value | titlecase" required>
|
||||
<!-- <mat-error *ngIf="pdMain.applicant_name.hasError('required')">Name is Required.</mat-error> -->
|
||||
</mat-form-field>
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
[whole_json]="parent_ques.group_questions[g_i]" [json_index]="g_i" (generateGroupControls) = generateGroupControls($event)></app-dynamic-question-template>
|
||||
</div>
|
||||
<br/>
|
||||
<div fxLayout="row" fxLayoutAlign="flex-end" fxFlex="100" style="margin-top: 1%;">
|
||||
<div fxLayout="row" fxLayoutAlign="flex-end" fxFlex="100" style="margin-top: 3%;">
|
||||
<div >
|
||||
<!-- <ion-button class="ion-float-right" fill="clear" color="optblue" *ngIf="g_i != 0" (click)="removeData(g_i,parent_ques)">
|
||||
<ion-icon style="font-size: 22px" name="md-trash"></ion-icon>
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<br style="clear: both;"/>
|
||||
</div>
|
||||
<!-- {{formGroupN.value | json}} -->
|
||||
<mat-form-field style="width: 100%" *ngIf="parent_ques.type == '1'"
|
||||
<mat-form-field style="width: 100%" *ngIf="parent_ques.type == '1' && !parent_ques.is_hidden"
|
||||
>
|
||||
|
||||
<mat-label>{{parent_ques.question}}</mat-label>
|
||||
@ -67,6 +67,7 @@
|
||||
<mat-form-field style="width: 100%" *ngIf="parent_ques.type == '3'">
|
||||
<mat-label>{{parent_ques.question}}</mat-label>
|
||||
<mat-select [formControlName]="parent_ques.question_key" (selectionChange)="onChangeProperty($event,parent_ques,'','','')">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let val of parent_ques.answers"
|
||||
[value]="val.hasOwnProperty('answer_id') ? val.answer_id : val.answer">{{val.answer}}</mat-option>
|
||||
</mat-select>
|
||||
@ -92,6 +93,7 @@
|
||||
<mat-label>{{parent_ques.question}}</mat-label>
|
||||
<mat-select multiple [formControlName]="parent_ques.question_key"
|
||||
(selectionChange)="onChangeProperty($event,parent_ques,'','','')">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let val of parent_ques.answers"
|
||||
[value]="val.hasOwnProperty('answer_id') ? val.answer_id : val.answer">{{val.answer}}</mat-option>
|
||||
</mat-select>
|
||||
@ -160,7 +162,7 @@
|
||||
</ng-container>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 100%" *ngIf="parent_ques.type == '8'">
|
||||
<mat-form-field style="width: 100%" *ngIf="parent_ques.type == '8'" (click)="ngxFilteredValue.next(parent_ques.answers)">
|
||||
<mat-label>{{parent_ques.question}}</mat-label>
|
||||
<mat-select [formControlName]="parent_ques.question_key" (selectionChange)="onChangeProperty($event,parent_ques,'','','')">
|
||||
<mat-option>
|
||||
@ -169,7 +171,7 @@
|
||||
<mat-icon ngxMatSelectSearchClear>close</mat-icon>
|
||||
</ngx-mat-select-search>
|
||||
</mat-option>
|
||||
<mat-option>--</mat-option>
|
||||
<mat-option>Select</mat-option>
|
||||
|
||||
<mat-option
|
||||
*ngFor="let val of ngxFilteredValue | async"
|
||||
|
||||
@ -324,6 +324,13 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
||||
if(index_str == 'py') {
|
||||
if(curr_index == 0) {
|
||||
formArray.controls[curr_index].controls[curr_obj.insert_control].setValue(0)
|
||||
// curr_obj.is_hidden = true;
|
||||
|
||||
this.whole_json.filter(vv=>{
|
||||
if(vv.question_key == curr_obj.insert_control) {
|
||||
vv.is_hidden = true
|
||||
}})
|
||||
console.log("sdfffffffffff",this.whole_json,curr_obj.insert_control);
|
||||
}
|
||||
if(formArray.value.length < 2) {
|
||||
return;
|
||||
|
||||
@ -452,6 +452,7 @@ export class QuesFormService {
|
||||
for(let i=0;i<=2;i++){
|
||||
fy.push({fy_year:(fy[i].curr-2)+'-'+(fy[i].curr-1),curr:fy[i].curr-1})
|
||||
}
|
||||
fy.reverse();
|
||||
return fy.map(val=>({answer:val.fy_year,answer_id:val.fy_year}))
|
||||
}
|
||||
// END OF GETCURRFYYEARS FUN
|
||||
|
||||
@ -74,7 +74,7 @@ export class FormComponent implements OnInit {
|
||||
// this.pdTriggerService.loadTemplate(Number(this.pd_all_details.form_id)).subscribe(result=>{
|
||||
let params = {"fk_entity_id":"35","fk_product_id":this.pd_all_details.pdmaster_details.fk_product_id,"pd_form_id":this.pd_all_details.form_id,"fk_pd_id":this.pd_all_details.pdmaster_details.pd_id}
|
||||
this.pdTriggerService.loadCreditPDTemplate(params).subscribe(result=>{
|
||||
// result.dataStatus = false
|
||||
// result.dataStatus = false
|
||||
if(result.dataStatus) {
|
||||
let question_template: any = result.records
|
||||
if (question_template && question_template != null && question_template != undefined
|
||||
@ -275,7 +275,7 @@ export class FormComponent implements OnInit {
|
||||
if(result['dataStatus']) {
|
||||
this.notifier.notify("success","Saved successfully..")
|
||||
setTimeout(()=>{
|
||||
this.dialogRef.close()
|
||||
this.dialogRef.close('refresh')
|
||||
},1500)
|
||||
}
|
||||
else {
|
||||
@ -379,6 +379,8 @@ export class FormComponent implements OnInit {
|
||||
return sum_val == 100}());`
|
||||
let exp1 = `(function (){let sum_val=null;let ques_key=[];
|
||||
control.forEach(ques_obj=>{ques_key.push(ques_obj[submitProperty.key_name])});console.log('none',ques_key);return new Set(ques_key).size === ques_key.length}())`
|
||||
let exp2 = `(function (){let sum_val=null;let ques_key=[];
|
||||
control.forEach(ques_obj=>{ques_key.push(ques_obj[submitProperty.key_name])});console.log('none',ques_key);return new Set(ques_key).size === ques_key.length}())`
|
||||
|
||||
//for image total check
|
||||
// let exp=`
|
||||
@ -401,8 +403,8 @@ export class FormComponent implements OnInit {
|
||||
// return sum_val }());`
|
||||
|
||||
|
||||
// let val= eval(submitProperty.expression);
|
||||
let val= eval(exp1);
|
||||
let val= eval(submitProperty.expression);
|
||||
// let val= eval(exp1);
|
||||
console.log(val)
|
||||
return val
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
</div>
|
||||
<div fxFlex="25" 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>
|
||||
matTooltipPosition="right" [mat-dialog-close]="pd_all_details.is_answered != '1' ? 'refresh' : ''">
|
||||
<mat-icon>close</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@ -8,6 +8,7 @@ import {PdTrigerService} from '../../../pd-service/pd-triger.service';
|
||||
import { PdStatusChangeDialogueComponent } from '../pd-status-change-dialogue/pd-status-change-dialogue.component';
|
||||
import { FormComponent } from './forms/form/form.component';
|
||||
import { ImageCaptureComponent } from './forms/image-capture/image-capture.component';
|
||||
import { LoaderService } from 'app/shared/loaderService/loader.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-start-pd',
|
||||
@ -47,7 +48,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
||||
|
||||
constructor(notifier: NotifierService, private dialog: MatDialog, private fb: FormBuilder, private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private listPDComponent: ListPdComponent, private _pd: PdTrigerService) {
|
||||
private listPDComponent: ListPdComponent, private _pd: PdTrigerService,private loaderService:LoaderService) {
|
||||
this.startPD = this.route.snapshot.params['pdid'];
|
||||
this.randomString = this.route.snapshot.params['rdmstr'];
|
||||
// console.log(this.route.snapshot.params['pdid'],this.route.snapshot.params['rdmstr']);
|
||||
@ -101,6 +102,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
||||
|
||||
// load templates details
|
||||
loadTemplates(startID:string,type:number,randomString:string){
|
||||
this.loaderService.showMatSpinnerDialog('Please wait')
|
||||
// console.log('start pd component inside - loadTemplates params are,',startID,type,randomString);
|
||||
this._pd.loadPDTemplates(startID,randomString).subscribe(
|
||||
data => {
|
||||
@ -146,7 +148,10 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
||||
this.currentPDStatus = false;
|
||||
}
|
||||
// this.getAnswers(serachQuestions);
|
||||
this.loaderService.closeMatSpinnerDialog()
|
||||
|
||||
},err=>{
|
||||
this.loaderService.closeMatSpinnerDialog()
|
||||
});
|
||||
}
|
||||
|
||||
@ -210,7 +215,9 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||
// if(dataresult == 'refresh') {
|
||||
this.loadTemplates(this.startPD,2,this.randomString);
|
||||
// }
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<div fxLayout="column" fxLayoutAlign="center">
|
||||
<mat-spinner style="text-align: center;margin-left: 85px;" fxLayoutAlign="center"></mat-spinner>
|
||||
<mat-spinner style="text-align: center;" fxLayoutAlign="center"></mat-spinner>
|
||||
<p style="font-weight: bold;color: white;text-align: center;"> {{spinnerMsg}}</p>
|
||||
</div>
|
||||
@ -2,4 +2,9 @@
|
||||
box-shadow: none;
|
||||
background: rgba(0, 0, 0, 0.0);
|
||||
}
|
||||
mat-spinner {
|
||||
@media(min-width:600px) {
|
||||
margin-left: 75px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -201,24 +201,13 @@
|
||||
{
|
||||
"purpose": "validations",
|
||||
"validations": [
|
||||
|
||||
{
|
||||
"name": "required",
|
||||
"isactive": "1",
|
||||
"validator": "",
|
||||
"message": "Required",
|
||||
"value": "(String('estimated_quantity') != String('')) || (String('estimated_stock_value') != String('')) ",
|
||||
"validation_to": null,
|
||||
"value_keys": [
|
||||
"estimated_quantity",
|
||||
"estimated_stock_value"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "required",
|
||||
"isactive": "1",
|
||||
"validator": "",
|
||||
"message": "Required",
|
||||
"value": "(String('estimated_quantity') != String('')) || (String('estimated_stock_value') != String('')) ",
|
||||
"message": "Either Estimated Stock value or Estimated Quantity is required",
|
||||
"value": "(String('estimated_quantity') === String(''))",
|
||||
"validation_to": "estimated_stock_value",
|
||||
"value_keys": [
|
||||
"estimated_quantity",
|
||||
@ -232,7 +221,15 @@
|
||||
"is_subfield": "1",
|
||||
"parent_question_key": "provider_observed",
|
||||
"answers": null,
|
||||
"validations": []
|
||||
"validations": [
|
||||
{
|
||||
"name": "required",
|
||||
"isactive": "1",
|
||||
"validator": "Validators.required",
|
||||
"message": "Either Estimated Stock value or Estimated Quantity is required",
|
||||
"value": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"question": "UOM",
|
||||
@ -280,23 +277,10 @@
|
||||
"name": "required",
|
||||
"isactive": "1",
|
||||
"validator": "",
|
||||
"message": "Required",
|
||||
"value": "(String('estimated_quantity') != String('')) || (String('estimated_stock_value') != String('')) ",
|
||||
"validation_to": null,
|
||||
"value_keys": [
|
||||
"estimated_quantity",
|
||||
"estimated_stock_value"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "required",
|
||||
"isactive": "1",
|
||||
"validator": "",
|
||||
"message": "Required",
|
||||
"value": "(String('estimated_quantity') != String('')) || (String('estimated_stock_value') != String('')) ",
|
||||
"message": "Either Estimated Stock value or Estimated Quantity is required",
|
||||
"value": "(String('estimated_stock_value') === String(''))",
|
||||
"validation_to": "estimated_quantity",
|
||||
"value_keys": [
|
||||
"estimated_quantity",
|
||||
"estimated_stock_value"
|
||||
]
|
||||
}
|
||||
@ -345,6 +329,20 @@
|
||||
"value": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"question_key":"common_remarks",
|
||||
"question":"Remarks",
|
||||
"place_holder":"Enter the text",
|
||||
"type":"7",
|
||||
"api_properties":null,
|
||||
"answers":null,
|
||||
"onchange_properties":null,
|
||||
"is_repeatable":null,
|
||||
"field_type":"string",
|
||||
"field_width":"45",
|
||||
"validations":[
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -201,24 +201,13 @@
|
||||
{
|
||||
"purpose": "validations",
|
||||
"validations": [
|
||||
|
||||
{
|
||||
"name": "required",
|
||||
"isactive": "1",
|
||||
"validator": "",
|
||||
"message": "Required",
|
||||
"value": "(String('estimated_quantity') != String('')) || (String('estimated_stock_value') != String('')) ",
|
||||
"validation_to": null,
|
||||
"value_keys": [
|
||||
"estimated_quantity",
|
||||
"estimated_stock_value"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "required",
|
||||
"isactive": "1",
|
||||
"validator": "",
|
||||
"message": "Required",
|
||||
"value": "(String('estimated_quantity') != String('')) || (String('estimated_stock_value') != String('')) ",
|
||||
"message": "Either Estimated Stock value or Estimated Quantity is required",
|
||||
"value": "(String('estimated_quantity') === String(''))",
|
||||
"validation_to": "estimated_stock_value",
|
||||
"value_keys": [
|
||||
"estimated_quantity",
|
||||
@ -232,7 +221,15 @@
|
||||
"is_subfield": "1",
|
||||
"parent_question_key": "provider_observed",
|
||||
"answers": null,
|
||||
"validations": []
|
||||
"validations": [
|
||||
{
|
||||
"name": "required",
|
||||
"isactive": "1",
|
||||
"validator": "Validators.required",
|
||||
"message": "Either Estimated Stock value or Estimated Quantity is required",
|
||||
"value": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"question": "UOM",
|
||||
@ -280,23 +277,10 @@
|
||||
"name": "required",
|
||||
"isactive": "1",
|
||||
"validator": "",
|
||||
"message": "Required",
|
||||
"value": "(String('estimated_quantity') != String('')) || (String('estimated_stock_value') != String('')) ",
|
||||
"validation_to": null,
|
||||
"value_keys": [
|
||||
"estimated_quantity",
|
||||
"estimated_stock_value"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "required",
|
||||
"isactive": "1",
|
||||
"validator": "",
|
||||
"message": "Required",
|
||||
"value": "(String('estimated_quantity') != String('')) || (String('estimated_stock_value') != String('')) ",
|
||||
"message": "Either Estimated Stock value or Estimated Quantity is required",
|
||||
"value": "(String('estimated_stock_value') === String(''))",
|
||||
"validation_to": "estimated_quantity",
|
||||
"value_keys": [
|
||||
"estimated_quantity",
|
||||
"estimated_stock_value"
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user