dynamic template correction
This commit is contained in:
parent
70caeb9efc
commit
1b0f3e8514
17345
ng6-seed/package-lock.json
generated
17345
ng6-seed/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -51,7 +51,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div fxFlex="40" align="end">
|
<div fxFlex="40" align="end">
|
||||||
<button style="float: right;" type="submit" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Submit"
|
<button style="float: right;" type="submit" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Submit"
|
||||||
matTooltipPosition="above" (click)="saveForm()" [disabled]="disableAfterSubmit===true">
|
matTooltipPosition="above" (click)="saveForm()" >
|
||||||
<mat-icon>save</mat-icon>
|
<mat-icon>save</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
<!-- [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
|
<mat-hint
|
||||||
*ngIf="formGroupN.value[parent_ques.question_key] != '' && (parent_ques.field_type == 'numtoword' || parent_ques.field_type == 'str&numtoword')"
|
*ngIf="formGroupN.value[parent_ques.question_key] != '' && (parent_ques.field_type == 'numtoword' || parent_ques.field_type == 'str&numtoword')"
|
||||||
align="end" style="font-size: 12px;">{{"₹"}} {{formGroupN.value[parent_ques.question_key] | numberToWords}}
|
align="end" style="font-size: 12px;">{{"₹"}} {{formGroupN.value[parent_ques.question_key] }}
|
||||||
</mat-hint>
|
</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> -->
|
||||||
<ng-container *ngFor="let validation of parent_ques.validations" ngProjectAs="mat-error">
|
<ng-container *ngFor="let validation of parent_ques.validations" ngProjectAs="mat-error">
|
||||||
@ -35,7 +35,7 @@
|
|||||||
</mat-autocomplete>
|
</mat-autocomplete>
|
||||||
<mat-hint
|
<mat-hint
|
||||||
*ngIf="formGroupN.value[parent_ques.question_key] != '' && (parent_ques.field_type == 'numtoword' || parent_ques.field_type == 'str&numtoword')"
|
*ngIf="formGroupN.value[parent_ques.question_key] != '' && (parent_ques.field_type == 'numtoword' || parent_ques.field_type == 'str&numtoword')"
|
||||||
align="end" style="font-size: 12px;">{{"₹"}} {{formGroupN.value[parent_ques.question_key] | numberToWords}}
|
align="end" style="font-size: 12px;">{{"₹"}} {{formGroupN.value[parent_ques.question_key] }}
|
||||||
</mat-hint>
|
</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> -->
|
||||||
<ng-container *ngFor="let validation of parent_ques.validations" ngProjectAs="mat-error">
|
<ng-container *ngFor="let validation of parent_ques.validations" ngProjectAs="mat-error">
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
height: 120px;
|
height: 120px;
|
||||||
}
|
}
|
||||||
form{
|
form{
|
||||||
display: inline-table !important
|
display: grid !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.example-margin {
|
.example-margin {
|
||||||
|
|||||||
@ -25,13 +25,12 @@ export class ImagesAllComponent implements OnInit { imageData: any;
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
console.log(this.pd_all_details)
|
||||||
this.getPDImageDetails();
|
this.getPDImageDetails();
|
||||||
}
|
}
|
||||||
getPDImageDetails() {
|
getPDImageDetails() {
|
||||||
console.log(this.pd_all_details)
|
|
||||||
|
|
||||||
let params = {"pd_id":"","random_string":this.pd_all_details.pdMasterList.random_string}
|
let params = {"pd_id":"","random_string":this.pd_all_details.pdmaster_details.random_string}
|
||||||
//let params = {"pd_id":"","random_string":'i2PnHMA7cdGx8zkz'}
|
//let params = {"pd_id":"","random_string":'i2PnHMA7cdGx8zkz'}
|
||||||
// console.log(params);
|
// console.log(params);
|
||||||
this._pd.getPDImgDetails(params).subscribe(result=>{
|
this._pd.getPDImgDetails(params).subscribe(result=>{
|
||||||
|
|||||||
@ -79,7 +79,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
|
|||||||
MatTreeModule,
|
MatTreeModule,
|
||||||
NgxViewerModule
|
NgxViewerModule
|
||||||
],
|
],
|
||||||
declarations: [StartPdComponent, StartPd2Component,FormComponent,DynamicFormComponent,DynamicQuestionTemplateComponent, AnswerOptionCreateDialogComponent,FormGroupComponent],
|
declarations: [ DynamicFormComponent,DynamicQuestionTemplateComponent],
|
||||||
entryComponents:[FormComponent,FormGroupComponent,AnswerOptionCreateDialogComponent]
|
entryComponents:[]
|
||||||
})
|
})
|
||||||
export class StartPdModule { }
|
export class StartPdModule { }
|
||||||
|
|||||||
@ -459,8 +459,9 @@ getLevel = (node: TodoItemFlatNode) => node.level;
|
|||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
console.log("3")
|
console.log("3")
|
||||||
|
console.log( this.val.questions)
|
||||||
this.val.questions.forEach(element => {
|
this.val.questions.forEach(element => {
|
||||||
|
console.log(element)
|
||||||
if(element.question == node.item ){
|
if(element.question == node.item ){
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
<div>
|
<div>
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap style="padding-top:1%">
|
<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap style="padding-top:1% !important">
|
||||||
<div fxFlex="80%" style="padding-left: 250px;">
|
<div fxFlex="80%" style="padding-left: 250px !important;">
|
||||||
<mat-card-title><span style="font-size:24px"> Lender product and Customer Segment (Add / Edit)</span></mat-card-title>
|
<mat-card-title><span style="font-size:24px !important"> Lender product and Customer Segment (Add / Edit)</span></mat-card-title>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<form [formGroup]="_editTempLenderFrom" (submit)="onSubmit()">
|
<form [formGroup]="_editTempLenderFrom" (submit)="onSubmit()">
|
||||||
<div class="row" style="text-align:right;">
|
<div class="row" style="text-align:right !important;">
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" color="primary" matTooltip="Add More Lender Details" matTooltipPosition="above" (click)="addLanguage(null, $event); false"><mat-icon>add</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" color="primary" matTooltip="Add More Lender Details" matTooltipPosition="above" (click)="addLanguage(null, $event); false"><mat-icon>add</mat-icon></button>
|
||||||
|
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Clear Changes" matTooltipPosition="above" type="button" (click)="reset()"><mat-icon>settings_backup_restore</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Clear Changes" matTooltipPosition="above" type="button" (click)="reset()"><mat-icon>settings_backup_restore</mat-icon></button>
|
||||||
|
|||||||
@ -0,0 +1,3 @@
|
|||||||
|
form{
|
||||||
|
display: unset !important;
|
||||||
|
}
|
||||||
@ -175,61 +175,81 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"question":"Pincode",
|
"question": "Pincode",
|
||||||
"question_key":"Pincode_list",
|
"question_key": "pincode2",
|
||||||
"type":"3",
|
"type": "3",
|
||||||
"disable":false,
|
"answers": null,
|
||||||
"field_width":"25",
|
"field_width":"25",
|
||||||
"api_properties":{
|
"api_properties": "local_pincode",
|
||||||
"api":"getListOfMaster",
|
"onchange_properties": [
|
||||||
"api_method":"POST",
|
|
||||||
"params":{
|
|
||||||
"master_name":"COMMENTSONLOCALITY"
|
|
||||||
},
|
|
||||||
"fields":[
|
|
||||||
"comments_on_locality_id",
|
|
||||||
"rating"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"answers":null,
|
|
||||||
"onchange_properties":null,
|
|
||||||
"is_repeatable":null,
|
|
||||||
"validations":[
|
|
||||||
{
|
{
|
||||||
"name":"required",
|
"purpose": "FORM_CTRL",
|
||||||
"isactive":"1",
|
"form_controls": [
|
||||||
"validator":"Validators.required",
|
{
|
||||||
"message":"Field Required",
|
"insert_index": "pincode",
|
||||||
"value":null
|
"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
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}, {
|
}, {
|
||||||
"question":"City",
|
"question": "City",
|
||||||
"question_key":"City_list",
|
"question_key": "city2",
|
||||||
"type":"3",
|
"type": "3",
|
||||||
"disable":false,
|
"answers": null,
|
||||||
"field_width":"25",
|
"field_width":"25",
|
||||||
"api_properties":{
|
"api_properties": "local_city",
|
||||||
"api":"getListOfMaster",
|
"onchange_properties": null,
|
||||||
"api_method":"POST",
|
"is_repeatable": null,
|
||||||
"params":{
|
"validations": [
|
||||||
"master_name":"COMMENTSONLOCALITY"
|
|
||||||
},
|
|
||||||
"fields":[
|
|
||||||
"comments_on_locality_id",
|
|
||||||
"rating"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"answers":null,
|
|
||||||
"onchange_properties":null,
|
|
||||||
"is_repeatable":null,
|
|
||||||
"validations":[
|
|
||||||
{
|
{
|
||||||
"name":"required",
|
"name": "required",
|
||||||
"isactive":"1",
|
"isactive": "1",
|
||||||
"validator":"Validators.required",
|
"validator": "Validators.required",
|
||||||
"message":"Field Required",
|
"message": "CIty Required",
|
||||||
"value":null
|
"value": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@ -141,7 +141,7 @@
|
|||||||
"master_name":"TITLES"
|
"master_name":"TITLES"
|
||||||
},
|
},
|
||||||
"fields":[
|
"fields":[
|
||||||
"id",
|
"title_id",
|
||||||
"name"
|
"name"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -293,7 +293,7 @@
|
|||||||
"question_key":"Type_of_Business_Activity",
|
"question_key":"Type_of_Business_Activity",
|
||||||
"question":"Type of Business Activity",
|
"question":"Type of Business Activity",
|
||||||
"place_holder":"Enter the text",
|
"place_holder":"Enter the text",
|
||||||
"type":"5",
|
"type":"2",
|
||||||
"api_properties":{
|
"api_properties":{
|
||||||
"api":"getListOfMaster",
|
"api":"getListOfMaster",
|
||||||
"api_method":"POST",
|
"api_method":"POST",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user