ui-soxo-bootstrap-core 2.4.25-dev.49 → 2.4.25-dev.50

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