@xuda.io/ai_module 1.1.4853 → 1.1.4855

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.mjs +7 -4
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2807,26 +2807,29 @@ export const update_ai_agent_properties = async function (doc, app_id, uid, fiel
2807
2807
  step: 1,
2808
2808
  title: "Core Loan Details",
2809
2809
  description: "Enter the fundamental numbers for your loan.",
2810
- fields: ["loan_amount", "down_payment", "loan_type"],
2810
+ fields: (obj) => ["loan_amount", "down_payment", "loan_type"],
2811
2811
  isValid: (obj) => { return obj.loanAmount?.length ? true : false; }
2812
2812
  },
2813
2813
  {
2814
2814
  step: 2,
2815
2815
  title: "Rates & Terms",
2816
2816
  description: "Define the interest and duration of the loan.",
2817
- fields: ["interest_rate", "interest_type", "loan_term"]
2817
+ fields: (obj) => obj.loan_type === 'personal' ? ["interest_rate"] : ["interest_rate", "interest_type", "loan_term"] ,
2818
+ if: (obj) => obj.loan_type === 'personal' ? true : false,
2818
2819
  },
2819
2820
  {
2820
2821
  step: 3,
2821
2822
  title: "Payment Schedule",
2822
2823
  description: "How and when would you like to make payments?",
2823
- fields: ["payment_frequency", "start_date"]
2824
+ fields: (obj) =>["payment_frequency", "start_date"],
2825
+ if: (obj) => obj.loan_type === 'personal' ? true : false,
2824
2826
  },
2825
2827
  {
2826
2828
  step: 4,
2827
2829
  title: "Additional Options",
2828
2830
  description: "Finalize your calculation with extra payments or schedules.",
2829
- fields: ["extra_payments", "amortization_schedule"]
2831
+ fields: (obj) =>["extra_payments", "amortization_schedule"],
2832
+ if: (obj) => obj.loan_type === 'personal' ? true : false,
2830
2833
  }
2831
2834
  ]
2832
2835
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4853",
3
+ "version": "1.1.4855",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",