dynamic template correction

This commit is contained in:
bitbucket 2022-01-20 14:01:09 +05:30
parent 70caeb9efc
commit 1b0f3e8514
12 changed files with 16724 additions and 790 deletions

17345
ng6-seed/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -51,7 +51,7 @@
</div>
<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"
matTooltipPosition="above" (click)="saveForm()" [disabled]="disableAfterSubmit===true">
matTooltipPosition="above" (click)="saveForm()" >
<mat-icon>save</mat-icon>
</button>
</div>

View File

@ -8,7 +8,7 @@
.mat-card-actions {
background-color: white;
}
mat-form-field {
margin: 0 2%;
}

View File

@ -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'" -->
<mat-hint
*ngIf="formGroupN.value[parent_ques.question_key] != '' && (parent_ques.field_type == 'numtoword' || parent_ques.field_type == 'str&numtoword')"
align="end" style="font-size: 12px;">{{"&#8377;"}} {{formGroupN.value[parent_ques.question_key] | numberToWords}}
align="end" style="font-size: 12px;">{{"&#8377;"}} {{formGroupN.value[parent_ques.question_key] }}
</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">
@ -35,7 +35,7 @@
</mat-autocomplete>
<mat-hint
*ngIf="formGroupN.value[parent_ques.question_key] != '' && (parent_ques.field_type == 'numtoword' || parent_ques.field_type == 'str&numtoword')"
align="end" style="font-size: 12px;">{{"&#8377;"}} {{formGroupN.value[parent_ques.question_key] | numberToWords}}
align="end" style="font-size: 12px;">{{"&#8377;"}} {{formGroupN.value[parent_ques.question_key] }}
</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">

View File

@ -6,7 +6,7 @@
height: 120px;
}
form{
display: inline-table !important
display: grid !important;
}
.example-margin {

View File

@ -25,13 +25,12 @@ export class ImagesAllComponent implements OnInit { imageData: any;
}
ngOnInit() {
console.log(this.pd_all_details)
this.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'}
// console.log(params);
this._pd.getPDImgDetails(params).subscribe(result=>{

View File

@ -79,7 +79,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
MatTreeModule,
NgxViewerModule
],
declarations: [StartPdComponent, StartPd2Component,FormComponent,DynamicFormComponent,DynamicQuestionTemplateComponent, AnswerOptionCreateDialogComponent,FormGroupComponent],
entryComponents:[FormComponent,FormGroupComponent,AnswerOptionCreateDialogComponent]
declarations: [ DynamicFormComponent,DynamicQuestionTemplateComponent],
entryComponents:[]
})
export class StartPdModule { }

View File

@ -459,11 +459,12 @@ getLevel = (node: TodoItemFlatNode) => node.level;
}
}else{
console.log("3")
console.log( this.val.questions)
this.val.questions.forEach(element => {
console.log(element)
if(element.question == node.item ){
if(b==false){
element.disable = true
}else{

View File

@ -1,13 +1,13 @@
<div>
<mat-card>
<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap style="padding-top:1%">
<div fxFlex="80%" style="padding-left: 250px;">
<mat-card-title><span style="font-size:24px"> Lender product and Customer Segment (Add / Edit)</span></mat-card-title>
<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap style="padding-top:1% !important">
<div fxFlex="80%" style="padding-left: 250px !important;">
<mat-card-title><span style="font-size:24px !important"> Lender product and Customer Segment (Add / Edit)</span></mat-card-title>
</div>
</div>
<mat-card-content>
<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" matTooltip="Clear Changes" matTooltipPosition="above" type="button" (click)="reset()"><mat-icon>settings_backup_restore</mat-icon></button>

View File

@ -0,0 +1,3 @@
form{
display: unset !important;
}

View File

@ -174,65 +174,85 @@
]
},
{
"question":"Pincode",
"question_key":"Pincode_list",
"type":"3",
"disable":false,
{
"question": "Pincode",
"question_key": "pincode2",
"type": "3",
"answers": null,
"field_width":"25",
"api_properties":{
"api":"getListOfMaster",
"api_method":"POST",
"params":{
"master_name":"COMMENTSONLOCALITY"
},
"fields":[
"comments_on_locality_id",
"rating"
]
},
"answers":null,
"onchange_properties":null,
"is_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field Required",
"value":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
}
]
}, {
"question":"City",
"question_key":"City_list",
"type":"3",
"disable":false,
}, {
"question": "City",
"question_key": "city2",
"type": "3",
"answers": null,
"field_width":"25",
"api_properties":{
"api":"getListOfMaster",
"api_method":"POST",
"params":{
"master_name":"COMMENTSONLOCALITY"
},
"fields":[
"comments_on_locality_id",
"rating"
]
},
"answers":null,
"onchange_properties":null,
"is_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field Required",
"value":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":"State",
"question_key":"State_list",

View File

@ -141,7 +141,7 @@
"master_name":"TITLES"
},
"fields":[
"id",
"title_id",
"name"
]
},
@ -293,7 +293,7 @@
"question_key":"Type_of_Business_Activity",
"question":"Type of Business Activity",
"place_holder":"Enter the text",
"type":"5",
"type":"2",
"api_properties":{
"api":"getListOfMaster",
"api_method":"POST",