diff --git a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/1.json b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/1.json index 6179faf..8d09e13 100644 --- a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/1.json +++ b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/1.json @@ -49,7 +49,8 @@ "field_width":"100", "api_properties":null, "answers":null, - "onchange_properties":[{ + "onchange_properties":[ + { "purpose":"FORM_CTRL", "form_controls":[ { @@ -76,6 +77,8 @@ } ], "onchange_properties":null, + "is_subfield":"1", + "parent_question_key":"entity_type", "is_repeatable":null, "validations":[ { @@ -88,7 +91,67 @@ ] } ] - } + }, + { + "insert_index":"relationship", + "expression":"(String('entity_type').toLowerCase() != String('borrower'))", + "value_keys":[ + "entity_type" + ], + "questions":[ + { + "question":"Age", + "question_key":"borrower_age", + "type":"1", + "field_type":"num", + "field_width":"45", + "api_properties":null, + "answers":null, + "onchange_properties":null, + "is_subfield":"1", + "parent_question_key":"entity_type", + "is_repeatable":null, + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Field Required", + "value":null + } + ] + } + ]}, + { + "insert_index":"relationship", + "expression":"(String('entity_type').toLowerCase() != String('guarantor'))", + "value_keys":[ + "entity_type" + ], + "questions":[ + { + "question":"Numbers of years for which the business has been running", + "question_key":"numbers_of_years_business_running", + "type":"1", + "field_width":"45", + "field_type":"num", + "api_properties":null, + "answers":null, + "onchange_properties":null, + "is_subfield":"1", + "parent_question_key":"entity_type", + "is_repeatable":null, + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Field Required", + "value":null + } + ] + } + ]} ] }, { @@ -98,7 +161,18 @@ "entity_type" ], "insert_control":"numbers_of_years_business_running" - }], + }, + { + "purpose":"validations", + "validations":[{ + "value_keys":["entity_type"], + "value":"(String('entity_type').toLowerCase() != String('guarantor'))", + "validation_to":"borrower_age", + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required" + }]}], "is_repeatable":null, "validations":[ { @@ -166,51 +240,27 @@ "value":null } ] - }, - - { - "question":"Age", - "question_key":"borrower_age", - "type":"1", - "field_type":"num", - "field_width":"45", - "api_properties":null, - "answers":null, - "onchange_properties":null, - "is_repeatable":null, - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Field Required", - "value":null - } - ] - }, - { - "question":"Numbers of years for which the business has been running", - "question_key":"numbers_of_years_business_running", - "type":"1", - "field_width":"45", - "field_type":"num", - "api_properties":null, - "answers":null, - "onchange_properties":null, - "is_repeatable":null, - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Field Required", - "value":null - } - ] } + + + ], "is_repeatable":"1", "group_key":"borrower_details", - "group_title":"Borrower Details"} + "group_title":"Borrower Details"}, + { + "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":[ + ] + } ] } diff --git a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/10.json b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/10.json index b94f412..ac83557 100644 --- a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/10.json +++ b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/10.json @@ -267,26 +267,6 @@ } ] }, - { - "question":"Debtor Days as per CM Discussion", - "question_key":"debtor_days_cm", - "type":"1", - "field_width":"45", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - ] - }, { "question":"Creditor Days as per CET", "sub_title":"In Case of credit purchases, what is the average no. of days taken to pay the money?", @@ -309,26 +289,6 @@ ] }, - { - "question":"Creditor Days as per CM Discussion", - "question_key":"creditor_days_cm", - "type":"1", - "field_width":"45", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - ] - }, { "question":"Inventory Days as per CET", "sub_title":"What is the average no. of days for which stock lies unsold during the year?", @@ -349,29 +309,9 @@ "value":null } - ] - }, - { - "question":"Inventory Days as per CM Discussion", - "question_key":"inventory_days_cm", - "type":"1", - "field_width":"45", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - ] } + ], @@ -379,6 +319,67 @@ "group_key":"financial_info", "group_title":"Financial Information" }, + { + "question":"Debtor Days as per CM Discussion", + "question_key":"debtor_days_cm", + "type":"1", + "field_width":"45", + "answers":null, + "api_properties":null, + "onchange_properties":null, + "is_repeatable":null, + "field_type":"num", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } + ] + }, + { + "question":"Creditor Days as per CM Discussion", + "question_key":"creditor_days_cm", + "type":"1", + "field_width":"45", + "answers":null, + "api_properties":null, + "onchange_properties":null, + "is_repeatable":null, + "field_type":"num", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } + ] + }, + { + "question":"Inventory Days as per CM Discussion", + "question_key":"inventory_days_cm", + "type":"1", + "field_width":"45", + "answers":null, + "api_properties":null, + "onchange_properties":null, + "is_repeatable":null, + "field_type":"num", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } + + ] + }, { "question":"Broken Period starting from (Month)", "question_key":"broken_period_from_month", @@ -388,7 +389,7 @@ "api_properties":null, "onchange_properties":null, "is_repeatable":null, - "field_type":"num", + "field_type":"string", "validations":[ { "name":"required", @@ -409,7 +410,7 @@ "api_properties":null, "onchange_properties":null, "is_repeatable":null, - "field_type":"num", + "field_type":"string", "validations":[ { "name":"required", @@ -502,67 +503,6 @@ ] }, - { - "question":"Sales / Revenue (Rs) for the broken period of the Current FY as per applicant", - "question_key":"broken_period_sales_amount", - "type":"1", - "field_width":"45", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - ] - }, - { - "question":"Net Profit / (Net Loss) (Rs) for the broken period of the Current FY as per applicant ", - "question_key":"broken_period_netprofit_amount", - "type":"1", - "field_width":"45", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - ] - }, - { - "question":"% of Net Profit / (Net Loss) over Sales for the broken period of the Current FY as per applicant ", - "question_key":"broken_period_netprofit_percent", - "type":"1", - "field_width":"45", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - - ] - }, { "question":"Does the business have any working capital facility from any lender other than Moneywise?", "question_key":"is_any_other_working_captial_facility", @@ -590,6 +530,28 @@ "is_any_other_working_captial_facility" ], "questions":[ + { + "question":"Details of above facilities need to be entered", + "question_key":"facility_details_specify", + "type":"7", + "placeholder":"Enter the text", + "answers":null, + "api_properties":null, + "onchange_properties":null, + "is_repeatable":null, + "is_subfield":"1", + "parent_question_key":"is_any_other_working_captial_facility", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } + + ] + }, { "question":"Facility details i.e. Letter of Credit/ Bank guarantee, CC limit etc.", "question_key":"facility_details_other_lender", @@ -607,32 +569,47 @@ { "answer":"CC limit", "answer_id":"CC limit" - } + }, + { + "answer":"Others", + "answer_id":"Others" + } ], "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "is_subfield":"1", - "parent_question_key":"is_any_other_working_captial_facility", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null + "onchange_properties": [ + { + "purpose":"FORM_CTRL", + "form_controls":[{ + "insert_index":"facility_details_other_lender", + "expression":"(String('facility_details_other_lender').toLowerCase() == String('others'))", + "value_keys":[ + "facility_details_other_lender" + ], + "questions":[ + { + "question": "Specify Facility details", + "question_key": "facility_details_other", + "type": "1", + "field_width": "45", + "field_type": "string", + "api_properties": null, + "answers": null, + "onchange_properties": null, + "is_repeatable": null, + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Field Required", + "value": null + } + ] + } + ] + }] } - - ] - }, - { - "question":"Details of above facilities need to be entered", - "question_key":"facility_details_specify", - "type":"7", - "placeholder":"Enter the text", - "answers":null, - "api_properties":null, - "onchange_properties":null, + ], "is_repeatable":null, "is_subfield":"1", "parent_question_key":"is_any_other_working_captial_facility", @@ -647,6 +624,7 @@ ] } + ] } ] @@ -770,6 +748,20 @@ "insert_control":"net_profit_to_sales_percent" } ] + }, + { + "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":[ + ] } ] diff --git a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/12.json b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/12.json index 318e9b3..809c231 100644 --- a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/12.json +++ b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/12.json @@ -239,7 +239,7 @@ ], "questions":[ { - "question":"No. of credit period provided by client", + "question":"No. of days of credit period provided by client", "question_key":"credit_period_no", "type":"1", "field_type":"num", @@ -261,7 +261,7 @@ ] }, { - "question":"What % of total purchases are done on credit?", + "question":"What % of total sales are done on credit?", "question_key":"credit_total_purchase", "type":"1", "field_type":"num", diff --git a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/15.json b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/15.json index fe79dac..b0e7857 100644 --- a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/15.json +++ b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/15.json @@ -83,7 +83,7 @@ ] }, { - "question": "Instalment Amount", + "question": "Installment Amount", "question_key": "instalment_amount", "type": "1", "field_width": "100", @@ -158,7 +158,16 @@ "field_type": "num", "api_properties": null, "answers": null, - "onchange_properties": null, + "onchange_properties": [ + { + "purpose":"answer_value", + "expression":"(Number(original_tenure_months)-Number(current_tenure_months))", + "value_keys":[ + "original_tenure_months", "current_tenure_months" + ], + "insert_control":"elapsed_tenure_months" + } + ], "is_repeatable": null, "validations": [ { @@ -178,7 +187,16 @@ "field_width": "100", "api_properties": null, "answers": null, - "onchange_properties": null, + "onchange_properties": [ + { + "purpose":"answer_value", + "expression":"(Number(original_tenure_months)-Number(current_tenure_months))", + "value_keys":[ + "original_tenure_months", "current_tenure_months" + ], + "insert_control":"elapsed_tenure_months" + } + ], "is_repeatable": null, "validations": [ { @@ -214,6 +232,20 @@ "is_repeatable": "1", "group_title": "Existing Loan Obligations", "group_key": "existing_loan_details" - } + }, + { + "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":[ + ] + } ] } \ No newline at end of file diff --git a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/17.json b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/17.json index 9b13eaa..70f7337 100644 --- a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/17.json +++ b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/17.json @@ -124,13 +124,6 @@ "parent_question_key":"know_business_operation", "answers":null, "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Field required", - "value":null - } ] } @@ -229,7 +222,19 @@ "answer_id":"Could Not Verify" } ], - "onchange_properties":null, + "onchange_properties":[ + { + "purpose":"validations", + "validations":[{ + "value_keys":["neighbourhood_status"], + "value":"(String('neighbourhood_status').toLowerCase() != String('positive'))", + "validation_to":"neighbourhood_remarks", + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required" + }]} + ], "is_repeatable":null, "validations":[ { diff --git a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/2.json b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/2.json index 4927a89..33fc031 100644 --- a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/2.json +++ b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/2.json @@ -103,7 +103,43 @@ ] }, "answers":null, - "onchange_properties":null, + "onchange_properties": [{ + "purpose":"FORM_CTRL", + "form_controls":[ + { + "insert_index":"address_type", + "expression":"(String('address_type') == String('1'))", + "value_keys":[ + "address_type" + ], + "questions":[ + { + "question":"Specify the Address Type", + "question_key":"address_type_others", + "place_holder":"", + "field_type":"string", + "type":"1", + "field_width":"100", + "api_properties":null, + "onchange_properties":null, + "is_repeatable":null, + "is_subfield":"1", + "parent_question_key":"uom", + "answers":null, + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Field required", + "value":null + } + ] + } + ] + } + ] + }], "is_repeatable":null, "validations":[ { diff --git a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/3.json b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/3.json index e2bf318..119cb4b 100644 --- a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/3.json +++ b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/3.json @@ -11,7 +11,44 @@ "field_width":"100", "answers":null, "api_properties":null, - "onchange_properties":null, + "onchange_properties":[ + { + "purpose":"FORM_CTRL", + "form_controls":[ + { + "insert_index":"total_fund_requirement", + "expression":" typeof(total_fund_requirement) == 'number' && (Number(total_fund_requirement) < Number(loan_amount))", + "value_keys":[ + "total_fund_requirement","loan_amount" + ], + "questions":[ + { + "question":"Remarks on source of funds for balance amount required", + "question_key":"remarks_fund_source_balance", + "place_holder":"", + "field_type":"string", + "type":"1", + "field_width":"100", + "api_properties":null, + "onchange_properties":null, + "is_repeatable":null, + "is_subfield":"1", + "parent_question_key":"total_fund_requirement", + "answers":null, + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Field required", + "value":null + } + ] + } + ] + }] + } + ], "is_repeatable":null, "validations":[ { @@ -134,6 +171,42 @@ ] } ] + }, + { + "purpose":"FORM_CTRL", + "form_controls":[ + { + "insert_index":"total_fund_requirement", + "expression":" typeof(total_fund_requirement) == 'number' && (Number(total_fund_requirement) < Number(loan_amount))", + "value_keys":[ + "total_fund_requirement","loan_amount" + ], + "questions":[ + { + "question":"Remarks on source of funds for balance amount required", + "question_key":"remarks_fund_source_balance", + "place_holder":"", + "field_type":"string", + "type":"1", + "field_width":"100", + "api_properties":null, + "onchange_properties":null, + "is_repeatable":null, + "is_subfield":"1", + "parent_question_key":"total_fund_requirement", + "answers":null, + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Field required", + "value":null + } + ] + } + ] + }] }], "is_repeatable":null, "validations":[ @@ -281,7 +354,7 @@ { "question":"Name of Owner", "question_key":"owner_name", - "type":"3", + "type":"4", "field_width":"45", "api_properties": { diff --git a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/4.json b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/4.json index 846129f..83dc374 100644 --- a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/4.json +++ b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/4.json @@ -56,8 +56,8 @@ "answer_id":"Export" }, { - "answer":"Both", - "answer_id":"Both" + "answer":"Both (within India and Export)", + "answer_id":"Both (within India and Export)" }], "onchange_properties":null, @@ -99,10 +99,59 @@ { "question_key":"low_sale_month", "question":"Months in which sales/services is low?", - "place_holder":"Enter the number", - "type":"1", + "place_holder":"", + "type":"4", "api_properties":null, - "answers":null, + "answers":[ + { + "answer_id":"January", + "answer":"January" + }, + { + "answer_id":"February", + "answer":"February" + }, + { + "answer_id":"March", + "answer":"March" + }, + { + "answer_id":"April", + "answer":"April" + }, + { + "answer_id":"May", + "answer":"May" + }, + { + "answer_id":"June", + "answer":"June" + }, + { + "answer_id":"July", + "answer":"July" + }, + { + "answer_id":"August", + "answer":"August" + }, + { + "answer_id":"September", + "answer":"September" + }, + { + "answer_id":"October", + "answer":"October" + }, + { + "answer_id":"November", + "answer":"November" + }, + { + "answer_id":"December", + "answer":"December" + } + ], "onchange_properties":null, "is_repeatable":null, "field_type":"num", @@ -157,7 +206,21 @@ "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":[ + ] + } ] } \ No newline at end of file diff --git a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/5.json b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/5.json index 2fd83bf..2bd4021 100644 --- a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/5.json +++ b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/5.json @@ -54,7 +54,7 @@ ] }, { - "question":"Vintage in Current Business", + "question":"Vintage in Current Business (in years)", "question_key":"vintage_in_current_biz", "place_holder":"Enter in years", "type":"1", @@ -111,7 +111,7 @@ ] }, { - "question":"Total Work Experience", + "question":"Total Work Experience (in years)", "question_key":"total_work_exp", "place_holder":"Enter in years", "type":"1", diff --git a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/7.json b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/7.json index 129263e..e036637 100644 --- a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/7.json +++ b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/7.json @@ -37,13 +37,6 @@ "field_type":"num", "field_width":"45", "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } ] }, { @@ -80,13 +73,6 @@ "field_type":"num", "field_width":"45", "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } ] }, { @@ -123,13 +109,6 @@ "field_type":"numtoword", "field_width":"45", "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } ] } diff --git a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/8.json b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/8.json index f883d6c..ce3f38f 100644 --- a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/8.json +++ b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/8.json @@ -3,6 +3,25 @@ "section_name":"Business Assets", "onsubmit":null, "questions":[ + { + "question":"Address", + "question_key":"initiated_address", + "type":"7", + "field_width":"100", + "answers":null, + "api_properties":null, + "onchange_properties":null, + "is_repeatable":null, + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Field Required", + "value":null + } + ] + }, { "question":" Is this the business address?", "question_key":"is_business_address", diff --git a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/9.json b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/9.json index f47f4ba..2765688 100644 --- a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/9.json +++ b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/9.json @@ -6,7 +6,7 @@ { "question": [ { - "question": "Business Account holder name", + "question": "Account holder name", "question_key": "applicant_name", "type": "1", "api_properties": { @@ -51,43 +51,46 @@ ] }, { - "question": "Business Account type", + "question": "Account type", "question_key": "account_type", "type": "1", "field_width": "45", - "api_properties": { - "api": "getListOfMaster", - "api_method": "POST", - "params": { - "master_name": "ACCOUNTTYPE" - }, - "fields": [ - "bt_lender_list_id", - "lender_name" - ] - }, + "api_properties":null, "answers": null, - "onchange_properties": null, - "is_repeatable": null, - "validations": [ + "onchange_properties": [ { - "name": "required", - "isactive": "1", - "validator": "Validators.required", - "message": "Field Required", - "value": null + "purpose":"FORM_CTRL", + "form_controls":[{ + "insert_index":"account_type", + "expression":"(String('account_type').toLowerCase() == String('savings'))", + "value_keys":[ + "account_type" + ], + "questions":[ + { + "question": "OD/CC Limit", + "question_key": "cc_limit", + "type": "1", + "field_width": "45", + "field_type": "num", + "api_properties": null, + "answers": null, + "onchange_properties": null, + "is_repeatable": null, + "validations": [ + { + "name": "required", + "isactive": "1", + "validator": "Validators.required", + "message": "Field Required", + "value": null + } + ] + } + ] + }] } - ] - }, - { - "question": "OD/CC Limit", - "question_key": "cc_limit", - "type": "1", - "field_width": "45", - "field_type": "num", - "api_properties": null, - "answers": null, - "onchange_properties": null, + ], "is_repeatable": null, "validations": [ { @@ -99,6 +102,7 @@ } ] } + ], "is_repeatable": "1", "group_title": "Banking Details", diff --git a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/WCTL/3.json b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/WCTL/3.json index 6195577..0dbf310 100644 --- a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/WCTL/3.json +++ b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/WCTL/3.json @@ -3,26 +3,63 @@ "section_name":"Loan details", "onsubmit":null, "questions":[ - { - "question":"Loan amount applied for", - "question_key":"loan_amount", - "type":"1", - "field_typ":"numtoword", - "field_width":"100", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Field Required", - "value":null - } - ] - }, + { + "question":"Loan amount applied for", + "question_key":"loan_amount", + "type":"1", + "field_type":"numtoword", + "field_width":"100", + "answers":null, + "api_properties":null, + "onchange_properties":[ + { + "purpose":"FORM_CTRL", + "form_controls":[ + { + "insert_index":"total_fund_requirement", + "expression":" typeof(total_fund_requirement) == 'number' && (Number(total_fund_requirement) < Number(loan_amount))", + "value_keys":[ + "total_fund_requirement","loan_amount" + ], + "questions":[ + { + "question":"Remarks on source of funds for balance amount required", + "question_key":"remarks_fund_source_balance", + "place_holder":"", + "field_type":"string", + "type":"1", + "field_width":"100", + "api_properties":null, + "onchange_properties":null, + "is_repeatable":null, + "is_subfield":"1", + "parent_question_key":"total_fund_requirement", + "answers":null, + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Field required", + "value":null + } + ] + } + ] + }] + } + ], + "is_repeatable":null, + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Field Required", + "value":null + } + ] + }, { "question":"Loan Tenure", "question_key":"loan_tenure", @@ -105,6 +142,42 @@ ] } ] + }, + { + "purpose":"FORM_CTRL", + "form_controls":[ + { + "insert_index":"total_fund_requirement", + "expression":" typeof(total_fund_requirement) == 'number' && (Number(total_fund_requirement) < Number(loan_amount))", + "value_keys":[ + "total_fund_requirement","loan_amount" + ], + "questions":[ + { + "question":"Remarks on source of funds for balance amount required", + "question_key":"remarks_fund_source_balance", + "place_holder":"", + "field_type":"string", + "type":"1", + "field_width":"100", + "api_properties":null, + "onchange_properties":null, + "is_repeatable":null, + "is_subfield":"1", + "parent_question_key":"total_fund_requirement", + "answers":null, + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Field required", + "value":null + } + ] + } + ] + }] }], "is_repeatable":null, "validations":[