ui-soxo-bootstrap-core 2.5.2 → 2.5.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.
@@ -108,6 +108,7 @@ export default function RangePickerComponent({
108
108
 
109
109
  return (
110
110
  <RangePicker
111
+ dropdownClassName="responsive-rangepicker-dropdown"
111
112
  allowClear={allowClear}
112
113
  inputReadOnly={inputReadOnly}
113
114
  format={format}
@@ -16,3 +16,9 @@
16
16
  box-shadow: none !important;
17
17
  }
18
18
  }
19
+
20
+ @media (max-width: 767px) {
21
+ .responsive-rangepicker-dropdown .ant-picker-panels {
22
+ flex-direction: column;
23
+ }
24
+ }
@@ -121,9 +121,11 @@ function LoginPhone({ history, appSettings }) {
121
121
  .then((result) => {
122
122
  setLoading(false);
123
123
 
124
- const { user, access_token, refresh_token } = result;
124
+ const { user, access_token, refresh_token, insider_token } = result;
125
125
  if (access_token) localStorage.access_token = access_token;
126
126
 
127
+ if (insider_token) localStorage.insider_token = insider_token;
128
+
127
129
  if (result.success) {
128
130
  //two_factor_authentication variable is present then proceed Two factor authentication
129
131
  if (result.data && result.data.two_factor_authentication) {
@@ -516,28 +518,28 @@ function LoginPhone({ history, appSettings }) {
516
518
  return user.username;
517
519
  };
518
520
 
519
- const { globalCustomerHeader = () => {} } = appSettings;
521
+ const { globalCustomerHeader = () => { } } = appSettings;
520
522
 
521
523
  const themeName = process.env.REACT_APP_THEME; // e.g., 'purple'
522
524
  const isPurple = themeName === 'purple';
523
525
 
524
526
  const sectionStyle = isPurple
525
527
  ? {
526
- width: '100%',
527
- height: '100vh',
528
- backgroundImage: `${state.theme.colors.loginPageBackground}`,
529
- backgroundPosition: 'center bottom, center',
530
- backgroundRepeat: 'no-repeat, no-repeat',
531
- backgroundSize: 'cover, cover',
532
- }
528
+ width: '100%',
529
+ height: '100vh',
530
+ backgroundImage: `${state.theme.colors.loginPageBackground}`,
531
+ backgroundPosition: 'center bottom, center',
532
+ backgroundRepeat: 'no-repeat, no-repeat',
533
+ backgroundSize: 'cover, cover',
534
+ }
533
535
  : {
534
- width: '100%',
535
- height: '100vh',
536
- backgroundImage: `url(${backgroundImage}), ${state.theme.colors.loginPageBackground}`,
537
- backgroundPosition: 'center bottom, center',
538
- backgroundRepeat: 'no-repeat, no-repeat',
539
- backgroundSize: 'cover, cover',
540
- };
536
+ width: '100%',
537
+ height: '100vh',
538
+ backgroundImage: `url(${backgroundImage}), ${state.theme.colors.loginPageBackground}`,
539
+ backgroundPosition: 'center bottom, center',
540
+ backgroundRepeat: 'no-repeat, no-repeat',
541
+ backgroundSize: 'cover, cover',
542
+ };
541
543
 
542
544
  return (
543
545
  <section className="full-page" style={sectionStyle}>
@@ -613,7 +615,7 @@ function LoginPhone({ history, appSettings }) {
613
615
  Email <MailOutlined className="otp-icon" style={{ marginLeft: 6 }} />
614
616
  </Radio>
615
617
  <Radio checked={communicationMode === 'mobile'} onChange={() => setCommunicationMode('mobile')}>
616
- SMS <MessageOutlined className="otp-icon" style={{ marginLeft: 6 }} />
618
+ SMS <MessageOutlined className="otp-icon" style={{ marginLeft: 6 }} />
617
619
  </Radio>
618
620
  </div>
619
621
  {modeError && <p className="otp-mode-error">Please select a communication mode.</p>}
@@ -2,7 +2,7 @@ import React, { useState, useEffect, useContext } from 'react';
2
2
 
3
3
  import { useLocation } from 'react-router-dom';
4
4
 
5
- import { Skeleton, Typography, message, Switch, Form, Input, Select, Checkbox, Row, Col } from 'antd';
5
+ import { Skeleton, Typography, message, Switch, Form, Input, Select, Checkbox } from 'antd';
6
6
 
7
7
  import AsyncSelect from 'react-select/async';
8
8
 
@@ -11,32 +11,26 @@ import { Table, Card, Button, JSONInput, GlobalContext } from './../../../../lib
11
11
  import { ModelsAPI, PagesAPI } from '../../..';
12
12
 
13
13
  import { UsersAPI } from '../../..';
14
- import DoctorAdd from '../../../doctor/components/doctor-add/doctor-add';
15
14
 
16
15
  const { Title } = Typography;
17
16
 
18
17
  const { Option } = Select;
19
18
 
20
- const UserAdd = ({ model, callback, edit, history, formContent, match, additional_queries, props, mode = 'Add', attributes }) => {
19
+ const UserAdd = ({ model, callback, edit, history, formContent, match, additional_queries, props }) => {
21
20
  /**Getting user data */
22
21
  const { user = {} } = useContext(GlobalContext);
23
- // let mode = 'Add';
22
+ let mode = 'Add';
24
23
 
25
24
  const [disabled, setDisabled] = useState(true);
26
25
 
27
26
  const [selectedOption, setSelectedOption] = useState(null);
28
- // for selected branches
29
- const [selectedBranches, setSelectedBranches] = useState([]);
30
27
 
31
- // for default branch
32
- const [defaultBranch, setDefaultBranch] = useState(null);
33
28
  //Need to check this condition
34
29
  const [authentication, setAuthentication] = useState(false);
35
30
 
36
31
  /**To store user values */
37
32
  const [users, setUsers] = useState([]);
38
- const [doctorID, setDoctorID] = useState(false);
39
- const [selectedDoctor, setSelectedDoctor] = useState(null);
33
+
40
34
  /**Converting to JSON */
41
35
  let firmDetails = JSON.parse(user.firm.f_otherdetails1);
42
36
 
@@ -50,46 +44,31 @@ const UserAdd = ({ model, callback, edit, history, formContent, match, additiona
50
44
  mobileRequired = false;
51
45
  }
52
46
 
53
- if (formContent?.id) {
47
+ if (formContent.id) {
54
48
  mode = 'Edit';
55
- } else if (formContent?.copy) {
49
+ } else if (formContent.copy) {
56
50
  mode = 'Copy';
57
51
  }
58
52
 
59
- if (formContent?.attributes) {
53
+ if (formContent.attributes) {
60
54
  if (typeof formContent.attributes === 'string') {
61
55
  if (formContent.attributes !== '') {
62
56
  formContent.attributes = JSON.parse(formContent.attributes);
63
57
  } else {
64
- if (formContent) {
65
- formContent.attributes = {};
66
- }
58
+ formContent.attributes = {};
67
59
  }
68
60
  }
69
61
  } else {
70
- if (formContent) {
71
- formContent.attributes = {};
72
- }
62
+ formContent.attributes = {};
73
63
  }
74
64
 
75
65
  const [loading, setLoading] = useState(true);
76
- // user type state
77
- const [userType, setUserType] = useState('general');
78
- // state for branches list
79
- const [branches, setBranches] = useState([]);
80
- // designation list state
81
- const [designations, setDesignations] = useState([]);
82
- // department list state
83
- const [departments, setDepartments] = useState([]);
84
- // doctor list state
85
- const [doctorList, setDoctorList] = useState([]);
86
66
 
87
67
  const [form] = Form.useForm();
88
68
 
89
69
  const [body, setBody] = useState(formContent);
90
70
 
91
71
  const [isPasswordVisible, setIsPasswordVisible] = useState(false);
92
- const [visible, setVisible] = useState(false);
93
72
 
94
73
  const formData = {
95
74
  ...body,
@@ -113,20 +92,13 @@ const UserAdd = ({ model, callback, edit, history, formContent, match, additiona
113
92
  }
114
93
 
115
94
  useEffect(() => {
116
- if (!loading && formContent) {
117
- form.resetFields(); // clear previous values
118
- form.setFieldsValue(formContent);
119
- }
120
- }, [loading, formContent]);
121
-
122
- useEffect(() => {
123
- if (formContent?.auth_user) {
95
+ if (formContent.auth_user) {
124
96
  setSelectedOption({
125
97
  value: formContent.auth_user,
126
98
  label: formContent.auth_user, // Add a helper function to capitalize
127
99
  });
128
100
  }
129
- }, [formContent?.auth_user]);
101
+ }, [formContent.auth_user]);
130
102
 
131
103
  useEffect(() => {
132
104
  loadUsers();
@@ -153,159 +125,16 @@ const UserAdd = ({ model, callback, edit, history, formContent, match, additiona
153
125
  }
154
126
  }
155
127
  }, []);
156
- /**
157
- *Define the options dynamically
158
- */
159
- const getUserTypeOptions = () => [
160
- { label: 'General', value: 'GEN' },
161
- { label: 'Doctor', value: 'RAD' },
162
- { label: 'Radiographer', value: 'TECH' },
163
- ];
164
-
165
- /**
166
- * Get Branch List
167
- */
168
- const getBranches = () => {
169
- setLoading(true);
170
- UsersAPI.getBranches().then(async (result) => {
171
- const details = await result.result.map((ele) => {
172
- return {
173
- ...ele,
174
- ...(ele.br_otherdet1 ? JSON.parse(ele.br_otherdet1) : {}),
175
- };
176
- });
177
- setBranches(details);
178
- setLoading(false);
179
- });
180
- };
181
-
182
- /** Get Designation List */
183
- const getDesignations = () => {
184
- setLoading(true);
185
- UsersAPI.getDesignations()
186
- .then((result) => {
187
- if (result?.success && Array.isArray(result.result)) {
188
- const details = result.result.map((ele) => ({
189
- label: ele.dg_desc?.trim() || '',
190
- value: ele.dg_code,
191
- }));
192
- setDesignations(details);
193
- } else {
194
- setDesignations([]);
195
- }
196
- })
197
- .catch((error) => {
198
- console.error('Error fetching designations:', error);
199
- setDesignations([]);
200
- })
201
- .finally(() => setLoading(false));
202
- };
203
-
204
- /** Get Department List */
205
- const getDepartments = () => {
206
- setLoading(true);
207
- UsersAPI.getDepartments()
208
- .then((result) => {
209
- if (result?.success && Array.isArray(result.result)) {
210
- const details = result.result.map((ele) => ({
211
- label: ele.dp_desc?.trim() || '',
212
- value: ele.dp_id,
213
- }));
214
- setDepartments(details);
215
- } else {
216
- setDepartments([]);
217
- }
218
- })
219
- .catch((error) => {
220
- console.error('Error fetching departments:', error);
221
- setDepartments([]);
222
- })
223
- .finally(() => setLoading(false));
224
- };
225
-
226
- /** Get Doctor List */
227
- const getDoctors = () => {
228
- UsersAPI.getDoctors()
229
- .then((res) => {
230
- if (res?.success && Array.isArray(res.result)) {
231
- const list = res.result.map((doc) => ({
232
- label: `${doc.do_name} (${doc.do_code})`,
233
- value: doc.do_code,
234
- }));
235
- setDoctorList(list);
236
- }
237
- })
238
- .catch((err) => console.error('Doctor API Error:', err));
239
- };
240
-
241
- // Function to handle user type change
242
- const handleUserTypeChange = (value) => {
243
- setUserType(value);
244
-
245
- if (value === 'RAD') {
246
- getDoctors(); // load doctor list
247
- } else {
248
- form.setFieldsValue({ default_code: undefined });
249
- }
250
- };
251
-
252
- useEffect(() => {
253
- getBranches();
254
- getDesignations();
255
- getDepartments();
256
- getDoctors(); // load doctor list
257
- }, []);
258
-
259
- useEffect(() => {
260
- if (formContent && formContent.user_type) {
261
- form.setFieldsValue({ user_type: formContent.user_type });
262
- setUserType(formContent.user_type);
263
-
264
- if (formContent.user_type === 'RAD' && formContent.doctor_code) {
265
- form.setFieldsValue({ default_code: formContent.doctor_code });
266
- }
267
- }
268
- if (formContent?.id && formContent?.organization_details) {
269
- try {
270
- const org = JSON.parse(formContent.organization_details);
271
- const branchIds = org.branch_ids?.map((b) => b.id) || [];
272
- const defaultBranchObj = org.branch_ids?.find((b) => b.DefaultBranch === 'true');
273
- const defaultBr = defaultBranchObj?.id || null;
274
-
275
- setSelectedBranches(branchIds);
276
- setDefaultBranch(defaultBr);
277
-
278
- form.setFieldsValue({
279
- selectedBranches: branchIds,
280
- defaultBranch: defaultBr,
281
- });
282
- } catch (err) {
283
- console.error('Invalid organization_details JSON', err);
284
- }
285
- }
286
- }, [formContent]);
287
- // Generate branch options for Select component
288
- const branchOptions = branches.map((branch) => ({
289
- label: branch.br_desc,
290
- value: branch.br_code,
291
- }));
292
128
 
293
129
  /**
294
130
  * Submit values
295
131
  */
296
132
  const onSubmit = (values) => {
297
- console.log('values____________', values);
298
133
  /**If PanelOpen is open and edit mode then password will be existing password else new password*/
299
134
  if (!isPasswordVisible && mode === 'Edit') {
300
135
  values.password = body.password;
301
136
  }
302
- values.user_type = values.user_type;
303
137
 
304
- if (values.user_type === 'RAD') {
305
- values.doctor_code = values.default_code;
306
- } else {
307
- values.doctor_code = null;
308
- }
309
138
  values = {
310
139
  ...values,
311
140
  auth_type: 'LDAP',
@@ -314,8 +143,8 @@ const UserAdd = ({ model, callback, edit, history, formContent, match, additiona
314
143
 
315
144
  setLoading(true);
316
145
 
317
- let id = formContent?.id;
318
- if (props?.ldap && selectedOption && selectedOption.value) {
146
+ let id = formContent.id;
147
+ if (props.ldap && selectedOption && selectedOption.value) {
319
148
  values = {
320
149
  ...values,
321
150
  addAllBranches: props.ldap.addAllBranches,
@@ -336,7 +165,6 @@ const UserAdd = ({ model, callback, edit, history, formContent, match, additiona
336
165
 
337
166
  if (id) {
338
167
  // Update of model
339
-
340
168
  UsersAPI.updateUser({ id, formBody: values }).then((result) => {
341
169
  if (result.success) message.success(result.message);
342
170
  else message.error(result.message);
@@ -347,14 +175,9 @@ const UserAdd = ({ model, callback, edit, history, formContent, match, additiona
347
175
  });
348
176
  } else {
349
177
  // Append the additional queries to the object
350
- // additional_queries.forEach(({ field, value }) => {
351
- // values[field] = value;
352
- // });
353
- if (Array.isArray(additional_queries)) {
354
- additional_queries.forEach(({ field, value }) => {
355
- values[field] = value;
356
- });
357
- }
178
+ additional_queries.forEach(({ field, value }) => {
179
+ values[field] = value;
180
+ });
358
181
 
359
182
  // add new model
360
183
  UsersAPI.create(values).then((result) => {
@@ -423,181 +246,63 @@ const UserAdd = ({ model, callback, edit, history, formContent, match, additiona
423
246
  <Skeleton />
424
247
  ) : (
425
248
  <Form initialValues={formData} form={form} layout="vertical" onFinish={onSubmit}>
426
- {/* user type */}
427
- <Row gutter={16}>
428
- <Col span={6}>
429
- <Form.Item
430
- name="user_type"
431
- label="User Type"
432
- allowClear
433
- showSearch
434
- initialValue="GEN"
435
- rules={[{ required: true, message: 'Please select a user type' }]}
436
- >
437
- <Select options={getUserTypeOptions()} onChange={handleUserTypeChange} />
438
- </Form.Item>
439
- </Col>
440
- <Col span={12}>
441
- {/* username */}
442
- <Form.Item name={'name'} label="Name" rules={[{ required: true, message: 'Please enter your user name' }]}>
443
- <Input placeholder="Enter Name" autoFocus />
444
- </Form.Item>
445
- </Col>
446
- <Col span={6}>
447
- {' '}
448
- {/* Show extra dropdown only if user type is Doctor */}
449
- {userType === 'RAD' && (
450
- <Form.Item name="default_code" label="Default Code" rules={[{ required: true, message: 'Please select a default code' }]}>
451
- <Select
452
- placeholder="Select Code"
453
- options={doctorList}
454
- showSearch
455
- optionFilterProp="label"
456
- dropdownRender={(menu) => (
457
- <>
458
- {menu}
459
- <div
460
- style={{
461
- padding: '8px',
462
- cursor: 'pointer',
463
- borderTop: '1px solid #f0f0f0',
464
- color: '#1890ff',
465
- }}
466
- onClick={() => setVisible(true)}
467
- >
468
- + Add New Doctor
469
- </div>
470
- </>
471
- )}
472
- />
473
- {/* Render DoctorAdd OUTSIDE the Select */}
474
- <DoctorAdd
475
- visible={visible}
476
- onCancel={() => setVisible(false)}
477
- attributes={attributes}
478
- doctorData={selectedDoctor}
479
- doctorId={doctorID}
480
- onSuccess={getDoctors}
481
- />
482
- </Form.Item>
483
- )}
484
- </Col>
485
- </Row>
486
- <Row gutter={16}>
487
- <Col span={8}>
488
- {/* email */}
489
- <Form.Item name={'email'} label="User Name / Email" rules={[{ required: true, message: 'Please enter your email' }]}>
490
- <Input placeholder="Enter Email Address" />
491
- </Form.Item>
492
- </Col>
493
- <Col span={8}>
494
- {/* Mobile */}
495
- <Form.Item name="mobile" label="Mobile" rules={[{ required: true, message: 'Please enter your mobile number' }]}>
496
- <Input placeholder="Enter Mobile" />
497
- </Form.Item>
498
- </Col>
499
- <Col span={8}>
500
- {/* Designation */}
501
- <Form.Item name="designation" label="Designation">
502
- <Select placeholder="Select Designation" options={designations} allowClear showSearch optionFilterProp="label" />
503
- </Form.Item>
504
- </Col>
505
- </Row>
506
- <Row gutter={16}>
507
- {' '}
508
- <Col span={8}>
509
- {/* Department */}
510
- <Form.Item name="department" label="Department">
511
- <Select placeholder="Select Department" options={departments} allowClear showSearch optionFilterProp="label" />
512
- </Form.Item>
513
- </Col>
514
- <Col span={8}>
515
- {/* Branch */}
516
- <Form.Item label="Branches" name="selectedBranches" rules={[{ required: true, message: 'Please select at least one branch' }]}>
517
- <Select
518
- mode="multiple"
519
- placeholder="Select Branches"
520
- value={selectedBranches}
521
- onChange={(value) => {
522
- setSelectedBranches(value);
523
-
524
- // ⬅NEW: remove defaultBranch if it’s not in selectedBranches
525
- if (!value.includes(defaultBranch)) {
526
- setDefaultBranch(undefined);
527
- form.setFieldsValue({ defaultBranch: undefined });
528
- }
529
- }}
530
- options={branchOptions}
531
- allowClear
532
- showSearch
533
- optionFilterProp="label"
534
- maxTagCount={5} // Show only 5 tags
535
- maxTagPlaceholder={(omittedValues) => `+${omittedValues.length}`} // Show "+n"
536
- />
537
- </Form.Item>
538
- </Col>
539
- <Col span={8}>
540
- {/* Default Branch */}
541
- <Form.Item label="Default Branch" name="defaultBranch" rules={[{ required: true, message: 'Please select default branch' }]}>
542
- <Select placeholder="Select Default Branch" onChange={setDefaultBranch}>
543
- {branchOptions
544
- .filter((opt) => selectedBranches.includes(opt.value))
545
- .map((opt) => (
546
- <Option key={opt.value} value={opt.value}>
547
- {opt.label}
548
- </Option>
549
- ))}
550
- </Select>
249
+ {/* Caption */}
250
+ <Form.Item name={'name'} label="Name" required>
251
+ <Input placeholder="Enter name" />
252
+ </Form.Item>
253
+ {/* Caption Ends */}
254
+
255
+ {/* Name */}
256
+ <Form.Item name={'email'} label="Email" required>
257
+ <Input placeholder="Enter email" />
258
+ </Form.Item>
259
+ {/* Name Ends */}
260
+
261
+ {formContent.id ? (
262
+ <>
263
+ <Form.Item>
264
+ <div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
265
+ <Checkbox onChange={handleCheackChange} />
266
+ <span>Select the option if you want to change the password</span>
267
+ </div>
551
268
  </Form.Item>
552
- </Col>
553
- </Row>
554
- <Row gutter={16}>
555
- <Col span={8}>
556
- {formContent?.id ? (
557
- <>
558
- <Form.Item>
559
- <div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
560
- <Checkbox onChange={handleCheackChange} />
561
- <span>Select the option if you want to change the password</span>
562
- </div>
563
- </Form.Item>
564
-
565
- {isPasswordVisible && (
566
- <Form.Item
567
- name="password"
568
- label="Password"
569
- rules={[
570
- { required: true, message: 'Please enter your password' },
571
- { pattern: passwordRegex, message: passwordRegexMessage },
572
- ]}
573
- >
574
- <Input.Password placeholder="Enter password" autoComplete="new-password" />
575
- </Form.Item>
576
- )}
577
- </>
578
- ) : (
269
+
270
+ {isPasswordVisible && (
579
271
  <Form.Item
580
272
  name="password"
581
273
  label="Password"
582
274
  rules={[
583
- {
584
- required: true,
585
- message: 'Please enter your password',
586
- },
587
- {
588
- pattern: new RegExp(passwordRegex),
589
- message: passwordRegexMessage,
590
- },
275
+ { required: true, message: 'Please enter your password' },
276
+ { pattern: passwordRegex, message: passwordRegexMessage },
591
277
  ]}
592
278
  >
593
- <Input.Password visibilityToggle={false} placeholder="Enter password" autoComplete="new-password" />
279
+ <Input.Password placeholder="Enter password" autoComplete="new-password" />
594
280
  </Form.Item>
595
281
  )}
596
- </Col>
597
- {/* </Form.Item> */}
282
+ </>
283
+ ) : (
284
+ <Form.Item
285
+ name="password"
286
+ label="Password"
287
+ rules={[
288
+ {
289
+ required: true,
290
+ message: 'Please enter your password',
291
+ },
292
+ {
293
+ pattern: new RegExp(passwordRegex),
294
+ message: passwordRegexMessage,
295
+ },
296
+ ]}
297
+ >
298
+ <Input.Password visibilityToggle={false} placeholder="Enter password" autoComplete="new-password" />
299
+ </Form.Item>
300
+ )}
301
+
302
+ {/* </Form.Item> */}
598
303
 
599
- {/* Path */}
600
- {/* <Form.Item name="password" label="Password"
304
+ {/* Path */}
305
+ {/* <Form.Item name="password" label="Password"
601
306
  rules={[
602
307
  {
603
308
  required: true,
@@ -610,25 +315,23 @@ const UserAdd = ({ model, callback, edit, history, formContent, match, additiona
610
315
  ]}>
611
316
  <Input.Password visibilityToggle={false} placeholder="Enter password" autoComplete='new-password' />
612
317
  </Form.Item> */}
613
- {/* Path Ends */}
318
+ {/* Path Ends */}
614
319
 
615
- {/* Path */}
616
- <Col span={8}>
617
- <Form.Item name="user_group" label="User Group" rules={[{ required: true, message: 'Please enter your user group' }]}>
618
- <Input placeholder="Enter User Group" />
619
- </Form.Item>
620
- </Col>
320
+ {/* Path */}
321
+ <Form.Item name="user_group" label="User Group" required>
322
+ <Input placeholder="Enter User Group" />
323
+ </Form.Item>
621
324
 
622
- {/* <Form.Item name="mobile" label="Mobile" required={mobileRequired}>
325
+ <Form.Item name="mobile" label="Mobile" required={mobileRequired}>
623
326
  <Input placeholder="Enter Mobile" />
624
- </Form.Item> */}
327
+ </Form.Item>
625
328
 
626
- {props?.ldap && (
627
- <>
628
- <Form.Item name="auth_type" label="auth_type">
629
- <Input placeholder="Enter auth_type" value={'LDAP'} disabled />
329
+ {props.ldap && (
330
+ <>
331
+ <Form.Item name="auth_type" label="auth_type">
332
+ <Input placeholder="Enter auth_type" value={'LDAP'} disabled />
630
333
 
631
- {/* <Select
334
+ {/* <Select
632
335
 
633
336
  placeholder="Auth Type"
634
337
  defaultValue={'LDAP'}
@@ -641,7 +344,7 @@ const UserAdd = ({ model, callback, edit, history, formContent, match, additiona
641
344
  </Option>
642
345
  </Select> */}
643
346
 
644
- {/* <div style={{ display: 'flex', justifyContent: 'space-between' }}>
347
+ {/* <div style={{ display: 'flex', justifyContent: 'space-between' }}>
645
348
 
646
349
  <div style={{ width: '40%' }}>
647
350
 
@@ -650,46 +353,30 @@ const UserAdd = ({ model, callback, edit, history, formContent, match, additiona
650
353
 
651
354
 
652
355
  </div> */}
653
- </Form.Item>
654
-
655
- {/* Path */}
656
- <Form.Item name="auth_user" label="User Name" required>
657
- <Input placeholder="Enter User Name" />
658
- </Form.Item>
659
- </>
660
- )}
661
- </Row>
662
- <Row gutter={16}>
663
- <Col span={8}>
664
- <Form.Item>
665
- <div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
666
- <Switch
667
- disabled={disabled}
668
- // defaultChecked={view}
669
- onChange={changeView}
670
- checked={authentication}
671
- // disabled={disabled}
672
- defaultChecked
673
- // checkedChildren={<OrderedListOutlined />}
674
- // unCheckedChildren={<PicCenterOutlined />}
675
- />
676
- <span>Enable Two Factor Authentication</span>
677
- </div>
678
356
  </Form.Item>
679
- </Col>
680
- <Col span={8}>
681
- {/* <label>User Status</label> */}
682
- <Form.Item
683
- name="active"
684
- valuePropName="checked"
685
- getValueFromEvent={(e) => (e.target.checked ? true : false)}
686
- getValueProps={(value) => ({ checked: value === true })}
687
- style={{ marginBottom: 0 }}
688
- >
689
- <Checkbox>Active</Checkbox>
357
+
358
+ {/* Path */}
359
+ <Form.Item name="auth_user" label="User Name" required>
360
+ <Input placeholder="Enter User Name" />
690
361
  </Form.Item>
691
- </Col>
692
- </Row>
362
+ </>
363
+ )}
364
+
365
+ <Form.Item>
366
+ <div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
367
+ <Switch
368
+ disabled={disabled}
369
+ // defaultChecked={view}
370
+ onChange={changeView}
371
+ checked={authentication}
372
+ // disabled={disabled}
373
+ defaultChecked
374
+ // checkedChildren={<OrderedListOutlined />}
375
+ // unCheckedChildren={<PicCenterOutlined />}
376
+ />
377
+ <span>Enable Two Factor Authentication</span>
378
+ </div>
379
+ </Form.Item>
693
380
  {/* Path Ends */}
694
381
 
695
382
  {/* Path */}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui-soxo-bootstrap-core",
3
- "version": "2.5.2",
3
+ "version": "2.5.3",
4
4
  "description": "All the Core Components for you to start",
5
5
  "keywords": [
6
6
  "all in one"