hayun-vite 0.15.0 → 0.15.1
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.
- package/package.json +1 -1
- package/src/Forms/Forms.js +11 -4
package/package.json
CHANGED
package/src/Forms/Forms.js
CHANGED
@@ -11,6 +11,8 @@ import templAudiometry from "../../assets/templates/templAudiometry.js"
|
|
11
11
|
// کلاس جدید که فرمهای مختلف را نمایش میدهد
|
12
12
|
export default class Forms {
|
13
13
|
constructor({ assets, container, templates, defaultTemplateIndex = 0, mode = 'production' } = {}) {
|
14
|
+
console.log('I`M FROM Forms.constructor METHOD !!!!!!!!!!!!!!');
|
15
|
+
|
14
16
|
this.container = container
|
15
17
|
this.mode = mode;
|
16
18
|
this.forms = [] // آرایه آبجکت های فرم های مختلف
|
@@ -108,10 +110,15 @@ export default class Forms {
|
|
108
110
|
|
109
111
|
// این تابع یک بار از بیرون کلاس فراخوانی میشه و یک بار وقتی از داخل تمپلت فرم را عوض میکنیم
|
110
112
|
update({ officeData, patientData, sessionIndex = 0 }) {
|
111
|
-
|
112
|
-
|
113
|
-
//
|
114
|
-
|
113
|
+
console.log('I`M FROM Forms.update METHOD !!!!!!!!!!!!!!');
|
114
|
+
|
115
|
+
// اگر هر دو دیتا وجود داشت ادامه بده
|
116
|
+
if (officeData && patientData) {
|
117
|
+
// ذخیره کل دیتا برای استفاده داخلی آپدیت فرم انتخاب شده
|
118
|
+
this.dataParams = { officeData, patientData, sessionIndex }
|
119
|
+
// this.selectedForm.update({ officeData, patientData, sessionIndex })
|
120
|
+
this.forms[this.selectedIndex].update(this.dataParams)
|
121
|
+
}
|
115
122
|
}
|
116
123
|
|
117
124
|
// توابع داخلی ایجاد دکمه و لینک های بالای فرم
|