hayun-vite 0.7.1 → 0.7.3
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
CHANGED
package/src/Form/Forms.js
CHANGED
@@ -12,13 +12,13 @@ import '../style.css'
|
|
12
12
|
|
13
13
|
// کلاس جدید که فرمهای مختلف را نمایش میدهد
|
14
14
|
export default class Forms {
|
15
|
-
constructor({ assets, container } = {}) {
|
15
|
+
constructor({ assets, container, defaultFormIndex = 1 } = {}) {
|
16
16
|
this.container = container
|
17
|
-
this.addForms({ templates: [rasaAud, rasaTymp, combo] })
|
17
|
+
this.addForms({ templates: [rasaAud, rasaTymp, combo], defaultFormIndex })
|
18
18
|
}
|
19
19
|
|
20
20
|
// افزودن فرم
|
21
|
-
addForms({ templates }) {
|
21
|
+
addForms({ templates, defaultFormIndex }) {
|
22
22
|
const container = this.container
|
23
23
|
// ایجاد یک دیو برای قرار دادن دکمه ها و لینک های فرم
|
24
24
|
const div = document.createElement('div');
|
@@ -42,12 +42,12 @@ export default class Forms {
|
|
42
42
|
});
|
43
43
|
|
44
44
|
const printBtn = this.putButton({ container: div, text: 'چاپ', className });
|
45
|
-
|
45
|
+
|
46
46
|
// تعریف رویداد دکمه چاپ فرم نمایشی
|
47
47
|
printBtn.addEventListener('click', () => { printForm({ container: this.selectedForm.form }) });
|
48
48
|
|
49
49
|
// انتخاب فرم پیشفرض
|
50
|
-
let selectedIndex =
|
50
|
+
let selectedIndex = defaultFormIndex;
|
51
51
|
forms[selectedIndex].form.style.display = 'block';
|
52
52
|
this.selectedForm = this.forms[selectedIndex]
|
53
53
|
btns[selectedIndex].style.backgroundColor = ' #1c15e1'
|
package/src/Form/printForm.js
CHANGED
@@ -103,23 +103,23 @@ const rasaTymp = {
|
|
103
103
|
this.patient.elements = [
|
104
104
|
{ type: 'line', x1: 0, y1: 20, x2: width, y2: 20 },
|
105
105
|
{ type: 'text', x: width, y: 5, value: 'نام:' },
|
106
|
-
{ type: 'text', x: width -
|
107
|
-
{ type: 'text', x: width -
|
108
|
-
{ type: 'text', x: width - 120, y: 5, value: 'ارجاع از:' },
|
106
|
+
{ type: 'text', x: width - 42, y: 5, value: 'نام خانوادگی:' },
|
107
|
+
{ type: 'text', x: width - 95, y: 5, value: 'سن:' },
|
108
|
+
// { type: 'text', x: width - 120, y: 5, value: 'ارجاع از:' },
|
109
109
|
{ type: 'text', x: width - 170, y: 5, value: 'تاریخ:' }
|
110
110
|
]
|
111
111
|
this.patient.inputs = [
|
112
112
|
{ name: 'name', x: width - 6, y: 5 },
|
113
|
-
{ name: 'lastName', x: width -
|
114
|
-
{ name: 'age', x: width -
|
115
|
-
{ name: 'referrer', x: width - 132, y: 5 },
|
113
|
+
{ name: 'lastName', x: width - 62, y: 5 },
|
114
|
+
{ name: 'age', x: width - 102, y: 5 },
|
115
|
+
// { name: 'referrer', x: width - 132, y: 5 },
|
116
116
|
{ name: 'date', x: width - 180, y: 5 }
|
117
117
|
]
|
118
118
|
this.patient.forceInputs = [
|
119
119
|
{ name: 'name', x: width - 10, y: 4 },
|
120
120
|
{ name: 'lastName', x: width - 47, y: 5 },
|
121
121
|
{ name: 'age', x: width - 97, y: 5 },
|
122
|
-
{ name: 'referrer', x: width - 142, y: 5 }
|
122
|
+
// { name: 'referrer', x: width - 142, y: 5 }
|
123
123
|
]
|
124
124
|
|
125
125
|
width = this.history.width = this.getWidth(this.history)
|
package/src/main.js
CHANGED
@@ -39,7 +39,7 @@ LAudiogram.update({
|
|
39
39
|
})
|
40
40
|
|
41
41
|
*/
|
42
|
-
const forms = new Forms({ container: document.getElementById('forms-div')
|
42
|
+
const forms = new Forms({ container: document.getElementById('forms-div') });
|
43
43
|
forms.update({ officeData, patientData, sessionIndex: 0 })
|
44
44
|
|
45
45
|
|