Fairoj : Validation removal in templates

This commit is contained in:
venbatechnologies@gmail.com 2021-01-29 20:09:26 +05:30
parent 5656f6bbd4
commit 10f664e22b
2 changed files with 747 additions and 927 deletions

View File

@ -22,18 +22,11 @@
"is_repeatable": null, "is_repeatable": null,
"field_type": "num", "field_type": "num",
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
},
{ {
"name": "pattern", "name": "pattern",
"isactive": "1", "isactive": "1",
"validator": "[0-9]*", "validator": "[0-9]*",
"message":"alphabets only ", "message": "Numeric only ",
"value": null "value": null
} }
] ]
@ -45,22 +38,13 @@
"question_key": "fy", "question_key": "fy",
"type": "3", "type": "3",
"field_width": "45", "field_width": "45",
"answers":[ "answers": [],
],
"answer_value": "GET_FY_YEARS", "answer_value": "GET_FY_YEARS",
"api_properties": null, "api_properties": null,
"onchange_properties": null, "onchange_properties": null,
"is_repeatable": null, "is_repeatable": null,
"field_type": "num", "field_type": "num",
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Fin Yr Required",
"value":null
}
] ]
}, },
{ {
@ -75,13 +59,17 @@
"purpose": "answer_value", "purpose": "answer_value",
"expression": "((Number(net_profit)/Number(sales_revenue))*100).toFixed(2)", "expression": "((Number(net_profit)/Number(sales_revenue))*100).toFixed(2)",
"value_keys": [ "value_keys": [
"sales_revenue","net_profit" "sales_revenue",
"net_profit"
], ],
"insert_control": "net_profit_sales_percent" "insert_control": "net_profit_sales_percent"
}, },
{ {
"purpose": "answer_value_arr", "purpose": "answer_value_arr",
"arr_include":["py","now"], "arr_include": [
"py",
"now"
],
"expression": "((Number(sales_revenue[now])-Number(sales_revenue[py]))/Number(sales_revenue[py]))*100", "expression": "((Number(sales_revenue[now])-Number(sales_revenue[py]))/Number(sales_revenue[py]))*100",
"value_keys": [ "value_keys": [
"sales_revenue" "sales_revenue"
@ -90,7 +78,10 @@
}, },
{ {
"purpose": "answer_value_arr", "purpose": "answer_value_arr",
"arr_include":["py","now"], "arr_include": [
"py",
"now"
],
"expression": "(((Number(net_profit_sales_percent[now])-Number(net_profit_sales_percent[py]))/Number(net_profit_sales_percent[py]))*100).toFixed(2)", "expression": "(((Number(net_profit_sales_percent[now])-Number(net_profit_sales_percent[py]))/Number(net_profit_sales_percent[py]))*100).toFixed(2)",
"value_keys": [ "value_keys": [
"net_profit_sales_percent" "net_profit_sales_percent"
@ -101,13 +92,6 @@
"is_repeatable": null, "is_repeatable": null,
"field_type": "numtoword", "field_type": "numtoword",
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
] ]
}, },
@ -123,13 +107,17 @@
"purpose": "answer_value", "purpose": "answer_value",
"expression": "((Number(net_profit)/Number(sales_revenue))*100).toFixed(2)", "expression": "((Number(net_profit)/Number(sales_revenue))*100).toFixed(2)",
"value_keys": [ "value_keys": [
"sales_revenue","net_profit" "sales_revenue",
"net_profit"
], ],
"insert_control": "net_profit_sales_percent" "insert_control": "net_profit_sales_percent"
}, },
{ {
"purpose": "answer_value_arr", "purpose": "answer_value_arr",
"arr_include":["py","now"], "arr_include": [
"py",
"now"
],
"expression": "((Number(net_profit[now])-Number(net_profit[py]))/Number(net_profit[py]))*100", "expression": "((Number(net_profit[now])-Number(net_profit[py]))/Number(net_profit[py]))*100",
"value_keys": [ "value_keys": [
"net_profit" "net_profit"
@ -138,7 +126,10 @@
}, },
{ {
"purpose": "answer_value_arr", "purpose": "answer_value_arr",
"arr_include":["py","now"], "arr_include": [
"py",
"now"
],
"expression": "(((Number(net_profit_sales_percent[now])-Number(net_profit_sales_percent[py]))/Number(net_profit_sales_percent[py]))*100).toFixed(2)", "expression": "(((Number(net_profit_sales_percent[now])-Number(net_profit_sales_percent[py]))/Number(net_profit_sales_percent[py]))*100).toFixed(2)",
"value_keys": [ "value_keys": [
"net_profit_sales_percent" "net_profit_sales_percent"
@ -149,13 +140,6 @@
"is_repeatable": null, "is_repeatable": null,
"field_type": "numtoword", "field_type": "numtoword",
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
] ]
}, },
@ -170,7 +154,10 @@
"onchange_properties": [ "onchange_properties": [
{ {
"purpose": "answer_value_arr", "purpose": "answer_value_arr",
"arr_include":["py","now"], "arr_include": [
"py",
"now"
],
"expression": "(((Number(net_profit_sales_percent[now])-Number(net_profit_sales_percent[py]))/Number(net_profit_sales_percent[py]))*100).toFixed(2)", "expression": "(((Number(net_profit_sales_percent[now])-Number(net_profit_sales_percent[py]))/Number(net_profit_sales_percent[py]))*100).toFixed(2)",
"value_keys": [ "value_keys": [
"net_profit_sales_percent" "net_profit_sales_percent"
@ -181,17 +168,11 @@
"is_repeatable": null, "is_repeatable": null,
"field_type": "num", "field_type": "num",
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
] ]
}, },
{ {
"question":"% (↑ /↓) in Sales over PY", "question": "% (? /?) in Sales over PY",
"question_key": "sales_py", "question_key": "sales_py",
"type": "1", "type": "1",
"is_disabled": "1", "is_disabled": "1",
@ -202,17 +183,11 @@
"is_repeatable": null, "is_repeatable": null,
"field_type": "num", "field_type": "num",
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
] ]
}, },
{ {
"question":"% (↑ /↓) in Net Profit over PY", "question": "% (? /?) in Net Profit over PY",
"question_key": "netprofit_py", "question_key": "netprofit_py",
"type": "1", "type": "1",
"is_disabled": "1", "is_disabled": "1",
@ -223,18 +198,11 @@
"is_repeatable": null, "is_repeatable": null,
"field_type": "num", "field_type": "num",
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
] ]
}, },
{ {
"question":"% (↑ /↓) in Net Profit % over PY", "question": "% (? /?) in Net Profit % over PY",
"question_key": "netprofit_py_percent", "question_key": "netprofit_py_percent",
"type": "1", "type": "1",
"is_disabled": "1", "is_disabled": "1",
@ -245,16 +213,9 @@
"is_repeatable": null, "is_repeatable": null,
"field_type": "num", "field_type": "num",
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
] ]
}, },
{ {
"question": "Debtor Days as per CET", "question": "Debtor Days as per CET",
"sub_title": "In Case of credit sales, what is the average no. of days taken to receive the money?", "sub_title": "In Case of credit sales, what is the average no. of days taken to receive the money?",
@ -267,13 +228,7 @@
"is_repeatable": null, "is_repeatable": null,
"field_type": "num", "field_type": "num",
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
] ]
}, },
{ {
@ -288,13 +243,6 @@
"is_repeatable": null, "is_repeatable": null,
"field_type": "num", "field_type": "num",
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
] ]
}, },
@ -310,19 +258,9 @@
"is_repeatable": null, "is_repeatable": null,
"field_type": "num", "field_type": "num",
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
] ]
} }
], ],
"is_repeatable": "1", "is_repeatable": "1",
"group_key": "financial_info", "group_key": "financial_info",
@ -339,13 +277,7 @@
"is_repeatable": null, "is_repeatable": null,
"field_type": "num", "field_type": "num",
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
] ]
}, },
{ {
@ -359,13 +291,7 @@
"is_repeatable": null, "is_repeatable": null,
"field_type": "num", "field_type": "num",
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
] ]
}, },
{ {
@ -379,13 +305,6 @@
"is_repeatable": null, "is_repeatable": null,
"field_type": "num", "field_type": "num",
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
] ]
}, },
@ -402,7 +321,8 @@
"purpose": "answer_value", "purpose": "answer_value",
"expression": "(function (){let final_value = ''; if(String('broken_period_to_month') && String('broken_period_from_month')) {let from_date = new Date((String('broken_period_from_month')).split('-').reverse().join('-'));let to_date = new Date((String('broken_period_to_month')).split('-').reverse().join('-'));console.log(to_date);if(!from_date || !to_date || !from_date instanceof Date || !to_date instanceof Date || isNaN(from_date) || isNaN(to_date)) {final_value = '';return;}final_value = to_date.getMonth() - from_date.getMonth() + (12 * (to_date.getFullYear() - from_date.getFullYear()))};return final_value}())", "expression": "(function (){let final_value = ''; if(String('broken_period_to_month') && String('broken_period_from_month')) {let from_date = new Date((String('broken_period_from_month')).split('-').reverse().join('-'));let to_date = new Date((String('broken_period_to_month')).split('-').reverse().join('-'));console.log(to_date);if(!from_date || !to_date || !from_date instanceof Date || !to_date instanceof Date || isNaN(from_date) || isNaN(to_date)) {final_value = '';return;}final_value = to_date.getMonth() - from_date.getMonth() + (12 * (to_date.getFullYear() - from_date.getFullYear()))};return final_value}())",
"value_keys": [ "value_keys": [
"broken_period_to_month", "broken_period_from_month" "broken_period_to_month",
"broken_period_from_month"
], ],
"insert_control": "broken_period_no_of_months" "insert_control": "broken_period_no_of_months"
} }
@ -410,13 +330,6 @@
"is_repeatable": null, "is_repeatable": null,
"field_type": "string", "field_type": "string",
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
] ]
}, },
@ -433,7 +346,8 @@
"purpose": "answer_value", "purpose": "answer_value",
"expression": "(function (){let final_value = ''; if(String('broken_period_to_month') && String('broken_period_from_month')) {let from_date = new Date((String('broken_period_from_month')).split('-').reverse().join('-'));let to_date = new Date((String('broken_period_to_month')).split('-').reverse().join('-'));console.log(to_date);if(!from_date || !to_date || !from_date instanceof Date || !to_date instanceof Date || isNaN(from_date) || isNaN(to_date)) {final_value = '';return;}final_value = to_date.getMonth() - from_date.getMonth() + (12 * (to_date.getFullYear() - from_date.getFullYear()))};return final_value}())", "expression": "(function (){let final_value = ''; if(String('broken_period_to_month') && String('broken_period_from_month')) {let from_date = new Date((String('broken_period_from_month')).split('-').reverse().join('-'));let to_date = new Date((String('broken_period_to_month')).split('-').reverse().join('-'));console.log(to_date);if(!from_date || !to_date || !from_date instanceof Date || !to_date instanceof Date || isNaN(from_date) || isNaN(to_date)) {final_value = '';return;}final_value = to_date.getMonth() - from_date.getMonth() + (12 * (to_date.getFullYear() - from_date.getFullYear()))};return final_value}())",
"value_keys": [ "value_keys": [
"broken_period_to_month", "broken_period_from_month" "broken_period_to_month",
"broken_period_from_month"
], ],
"insert_control": "broken_period_no_of_months" "insert_control": "broken_period_no_of_months"
} }
@ -441,13 +355,6 @@
"is_repeatable": null, "is_repeatable": null,
"field_type": "string", "field_type": "string",
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
] ]
}, },
@ -462,13 +369,7 @@
"is_repeatable": null, "is_repeatable": null,
"field_type": "num", "field_type": "num",
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
] ]
}, },
{ {
@ -483,7 +384,8 @@
"purpose": "answer_value", "purpose": "answer_value",
"expression": "(((Number(broken_period_turnover_cy)-Number(broken_period_turnover_py))/Number(broken_period_turnover_cy))*100).toFixed(2)", "expression": "(((Number(broken_period_turnover_cy)-Number(broken_period_turnover_py))/Number(broken_period_turnover_cy))*100).toFixed(2)",
"value_keys": [ "value_keys": [
"broken_period_turnover_py","broken_period_turnover_cy" "broken_period_turnover_py",
"broken_period_turnover_cy"
], ],
"insert_control": "broken_period_turnover_percent" "insert_control": "broken_period_turnover_percent"
} }
@ -491,13 +393,7 @@
"is_repeatable": null, "is_repeatable": null,
"field_type": "numtoword", "field_type": "numtoword",
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
] ]
}, },
{ {
@ -512,7 +408,8 @@
"purpose": "answer_value", "purpose": "answer_value",
"expression": "(((Number(broken_period_turnover_cy)-Number(broken_period_turnover_py))/Number(broken_period_turnover_cy))*100).toFixed(2)", "expression": "(((Number(broken_period_turnover_cy)-Number(broken_period_turnover_py))/Number(broken_period_turnover_cy))*100).toFixed(2)",
"value_keys": [ "value_keys": [
"broken_period_turnover_py","broken_period_turnover_cy" "broken_period_turnover_py",
"broken_period_turnover_cy"
], ],
"insert_control": "broken_period_turnover_percent" "insert_control": "broken_period_turnover_percent"
} }
@ -520,13 +417,7 @@
"is_repeatable": null, "is_repeatable": null,
"field_type": "numtoword", "field_type": "numtoword",
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
] ]
}, },
{ {
@ -540,13 +431,6 @@
"is_repeatable": null, "is_repeatable": null,
"field_type": "num", "field_type": "num",
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
] ]
}, },
@ -589,13 +473,6 @@
"is_subfield": "1", "is_subfield": "1",
"parent_question_key": "is_any_other_working_captial_facility", "parent_question_key": "is_any_other_working_captial_facility",
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
] ]
}, },
@ -626,7 +503,8 @@
"onchange_properties": [ "onchange_properties": [
{ {
"purpose": "FORM_CTRL", "purpose": "FORM_CTRL",
"form_controls":[{ "form_controls": [
{
"insert_index": "facility_details_other_lender", "insert_index": "facility_details_other_lender",
"expression": "(String('facility_details_other_lender').toLowerCase() == String('others'))", "expression": "(String('facility_details_other_lender').toLowerCase() == String('others'))",
"value_keys": [ "value_keys": [
@ -643,28 +521,20 @@
"answers": null, "answers": null,
"onchange_properties": null, "onchange_properties": null,
"is_repeatable": null, "is_repeatable": null,
"validations": [ "validations": []
}
] ]
} }
] ]
}]
} }
], ],
"is_repeatable": null, "is_repeatable": null,
"is_subfield": "1", "is_subfield": "1",
"parent_question_key": "is_any_other_working_captial_facility", "parent_question_key": "is_any_other_working_captial_facility",
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
] ]
} }
] ]
} }
] ]
@ -672,17 +542,9 @@
], ],
"is_repeatable": null, "is_repeatable": null,
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
] ]
}, },
{ {
"question": "Sales / Revenue (Rs)", "question": "Sales / Revenue (Rs)",
"sub_title": "Particulars of Financials for Latest Year as per person met during PD visit", "sub_title": "Particulars of Financials for Latest Year as per person met during PD visit",
@ -698,7 +560,8 @@
"purpose": "answer_value", "purpose": "answer_value",
"expression": "(function (){let final_value; Number(net_profit_to_sales_percent) ? final_value = (Number(sales_amount)*Number(net_profit_to_sales_percent))/100 : '';return final_value}())", "expression": "(function (){let final_value; Number(net_profit_to_sales_percent) ? final_value = (Number(sales_amount)*Number(net_profit_to_sales_percent))/100 : '';return final_value}())",
"value_keys": [ "value_keys": [
"sales_amount", "net_profit_to_sales_percent" "sales_amount",
"net_profit_to_sales_percent"
], ],
"insert_control": "net_profit_rs" "insert_control": "net_profit_rs"
}, },
@ -706,20 +569,15 @@
"purpose": "answer_value", "purpose": "answer_value",
"expression": "(function (){let final_value; Number(net_profit_rs) ? final_value = (Number(net_profit_rs)/Number(sales_amount))*100 : '';return final_value.toFixed(2)}())", "expression": "(function (){let final_value; Number(net_profit_rs) ? final_value = (Number(net_profit_rs)/Number(sales_amount))*100 : '';return final_value.toFixed(2)}())",
"value_keys": [ "value_keys": [
"sales_amount", "net_profit_rs" "sales_amount",
"net_profit_rs"
], ],
"insert_control": "net_profit_to_sales_percent" "insert_control": "net_profit_to_sales_percent"
} }
], ],
"is_repeatable": null, "is_repeatable": null,
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
] ]
}, },
{ {
@ -735,7 +593,8 @@
"purpose": "answer_value", "purpose": "answer_value",
"expression": "(Number(sales_amount)*Number(net_profit_to_sales_percent))/100", "expression": "(Number(sales_amount)*Number(net_profit_to_sales_percent))/100",
"value_keys": [ "value_keys": [
"sales_amount", "net_profit_to_sales_percent" "sales_amount",
"net_profit_to_sales_percent"
], ],
"insert_control": "net_profit_rs" "insert_control": "net_profit_rs"
} }
@ -743,13 +602,7 @@
"is_repeatable": null, "is_repeatable": null,
"field_type": "num", "field_type": "num",
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
},
{ {
"name": "max", "name": "max",
"validator": "100", "validator": "100",
@ -770,20 +623,15 @@
"is_repeatable": null, "is_repeatable": null,
"field_type": "numtoword", "field_type": "numtoword",
"validations": [ "validations": [
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
], ],
"onchange_properties": [ "onchange_properties": [
{ {
"purpose": "answer_value", "purpose": "answer_value",
"expression": "((Number(net_profit_rs)/Number(sales_amount))*100).toFixed(2)", "expression": "((Number(net_profit_rs)/Number(sales_amount))*100).toFixed(2)",
"value_keys": [ "value_keys": [
"sales_amount", "net_profit_rs" "sales_amount",
"net_profit_rs"
], ],
"insert_control": "net_profit_to_sales_percent" "insert_control": "net_profit_to_sales_percent"
} }
@ -800,9 +648,7 @@
"is_repeatable": null, "is_repeatable": null,
"field_type": "string", "field_type": "string",
"field_width": "45", "field_width": "45",
"validations":[ "validations": []
] }
}
] ]
} }

View File

@ -22,13 +22,6 @@
"is_repeatable": null, "is_repeatable": null,
"field_type": "string", "field_type": "string",
"validations": [ "validations": [
{
"name": "required",
"isactive": "1",
"validator": "Validators.required",
"message": "Required",
"value": null
}
] ]
}, },
{ {
@ -41,13 +34,6 @@
"onchange_properties": null, "onchange_properties": null,
"is_repeatable": null, "is_repeatable": null,
"validations": [ "validations": [
{
"name": "required",
"isactive": "1",
"validator": "Validators.required",
"message": "Field Required",
"value": null
}
] ]
}, },
{ {
@ -77,7 +63,8 @@
"onchange_properties": [ "onchange_properties": [
{ {
"purpose": "FORM_CTRL", "purpose": "FORM_CTRL",
"form_controls":[{ "form_controls": [
{
"insert_index": "account_type", "insert_index": "account_type",
"expression": "(String('account_type').toLowerCase() != String('savings') && String('account_type').toLowerCase() != String('current'))", "expression": "(String('account_type').toLowerCase() != String('savings') && String('account_type').toLowerCase() != String('current'))",
"value_keys": [ "value_keys": [
@ -95,31 +82,19 @@
"onchange_properties": null, "onchange_properties": null,
"is_repeatable": null, "is_repeatable": null,
"validations": [ "validations": [
{
"name": "required", ]
"isactive": "1",
"validator": "Validators.required",
"message": "Field Required",
"value": null
} }
] ]
} }
] ]
}]
} }
], ],
"is_repeatable": null, "is_repeatable": null,
"validations": [ "validations": [
{
"name": "required",
"isactive": "1",
"validator": "Validators.required",
"message": "Field Required",
"value": null
}
] ]
} }
], ],
"is_repeatable": "1", "is_repeatable": "1",
"group_title": "Banking Details", "group_title": "Banking Details",
@ -136,8 +111,7 @@
"is_repeatable": null, "is_repeatable": null,
"field_type": "string", "field_type": "string",
"field_width": "45", "field_width": "45",
"validations":[ "validations": []
]
} }
] ]
} }