ui-soxo-bootstrap-core 2.5.7 → 2.6.0

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.
@@ -156,35 +156,44 @@ const DoctorAdd = ({ visible, onCancel, attributes, doctorId, doctorData, onSucc
156
156
  setLoading(true);
157
157
 
158
158
  const payload = {
159
- dbkey: values.dbkey ? Number(values.dbkey) : null,
160
- code: values.code || '',
161
- name: values.name || '',
162
- regno1: values.regno1 || '',
163
- regno2: '',
164
- qualification: values.qualification || '',
165
- desg: values.designation || '',
166
- add1: values.address || '',
167
- add2: '',
168
- place: values.places || '',
169
- phone: values.phone_number || '',
170
- fax: values.fax || '',
171
- mobile: values.alternate_phone || '',
172
- email: values.email_id || '',
173
- remarks: values.remarks || '',
174
- deptptr: '',
175
- regfee: values.regfee ? Number(values.regfee) : null,
176
- consfee: values.consfee ? Number(values.consfee) : null,
177
- gpfee: values.gpfee ? Number(values.gpfee) : null,
178
- consdays: values.consdays ? Number(values.consdays) : null,
179
- slno: values.slno ? Number(values.slno) : null,
159
+ dbkey: values.dbkey ?? doctorData?.dbkey ?? null,
160
+ code: values.code ?? doctorData?.code ?? '',
161
+ name: values.name ?? doctorData?.name ?? '',
162
+ regno1: values.regno1 ?? doctorData?.regno1 ?? '',
163
+ regno2: doctorData?.regno2 ?? '',
164
+ qualification: values.qualification ?? doctorData?.qualification ?? '',
165
+ desg: values.designation ?? doctorData?.designation ?? '',
166
+
167
+ add1: values.address ?? doctorData?.address1 ?? '',
168
+ add2: doctorData?.address2 ?? '',
169
+
170
+ place: values.places ?? doctorData?.place ?? '',
171
+ zip: values.pincode ?? doctorData?.zip ?? '',
172
+
173
+ phone: values.phone_number ?? doctorData?.phone ?? '',
174
+ mobile: values.alternate_phone ?? doctorData?.mobile ?? '',
175
+ email: values.email_id ?? doctorData?.email ?? '',
176
+ fax: values.fax ?? doctorData?.fax ?? '',
177
+
178
+ remarks: values.remarks ?? doctorData?.remarks ?? '',
179
+
180
+ deptptr: doctorData?.deptptr ?? '',
181
+
182
+ regfee: values.regfee ?? doctorData?.regfee ?? null,
183
+ consfee: values.consfee ?? doctorData?.consfee ?? null,
184
+ gpfee: values.gpfee ?? doctorData?.gpfee ?? null,
185
+ consdays: values.consdays ?? doctorData?.consdays ?? null,
186
+ slno: values.slno ?? doctorData?.slno ?? null,
187
+ timeperpatient: values.timeperpatient ?? doctorData?.timeperpatient ?? null,
188
+
180
189
  active: values.active === 'Y' ? 'Y' : 'N',
181
- timeperpatient: values.timeperpatient ? Number(values.timeperpatient) : null,
182
- username: '',
183
- type: values.type || '',
184
- signature: fileUrl || '',
185
- zip: values.pincode || '',
186
- };
187
190
 
191
+ username: doctorData?.username ?? '',
192
+
193
+ type: values.type ?? doctorData?.type ?? '',
194
+
195
+ signature: fileUrl ?? doctorData?.signature ?? '',
196
+ };
188
197
  try {
189
198
  let res;
190
199
  if (editMode) {
@@ -384,11 +393,7 @@ const DoctorAdd = ({ visible, onCancel, attributes, doctorId, doctorData, onSucc
384
393
  </Col>
385
394
 
386
395
  <Col span={8}>
387
- <Form.Item
388
- label="Email ID"
389
- name="email_id"
390
- rules={[{ type: 'email', message: 'Please enter a valid email address' }]}
391
- >
396
+ <Form.Item label="Email ID" name="email_id" rules={[{ type: 'email', message: 'Please enter a valid email address' }]}>
392
397
  <Input placeholder="Enter Email ID" onKeyDown={handleEnterKey} />
393
398
  </Form.Item>
394
399
  </Col>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui-soxo-bootstrap-core",
3
- "version": "2.5.7",
3
+ "version": "2.6.0",
4
4
  "description": "All the Core Components for you to start",
5
5
  "keywords": [
6
6
  "all in one"