ui-soxo-bootstrap-core 2.6.7 → 2.6.8
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.
|
@@ -21,7 +21,7 @@ import ExtraInfo from './extra-info';
|
|
|
21
21
|
|
|
22
22
|
const { TabPane } = Tabs;
|
|
23
23
|
|
|
24
|
-
export default function ExtraInfoDetail({ modeValue, icon, title, tabPosition = 'left', showDrawerData, dbPtr, callback, ...record }) {
|
|
24
|
+
export default function ExtraInfoDetail({ modeValue, icon, title, tabPosition = 'left', showDrawerData, dbPtr, callback, drawerWidth = '35%', ...record }) {
|
|
25
25
|
// State to control drawer
|
|
26
26
|
const [open, setOpen] = useState(false);
|
|
27
27
|
|
|
@@ -121,7 +121,7 @@ export default function ExtraInfoDetail({ modeValue, icon, title, tabPosition =
|
|
|
121
121
|
{/* */}
|
|
122
122
|
|
|
123
123
|
{/* */}
|
|
124
|
-
<Drawer width={
|
|
124
|
+
<Drawer width={drawerWidth} title={title} onClose={onClose} open={open}>
|
|
125
125
|
<div className="main-drawer-content">
|
|
126
126
|
<div className="drawer-container">
|
|
127
127
|
<div className="drawer-click">
|
|
@@ -95,7 +95,11 @@ const UserAdd = ({ model, callback, edit, history, formContent, match, additiona
|
|
|
95
95
|
const [body, setBody] = useState(formContent);
|
|
96
96
|
|
|
97
97
|
const [isPasswordVisible, setIsPasswordVisible] = useState(false);
|
|
98
|
-
|
|
98
|
+
|
|
99
|
+
// state for doctor and staff visibility
|
|
100
|
+
const [doctorVisible, setDoctorVisible] = useState(false);
|
|
101
|
+
const [staffVisible, setStaffVisible] = useState(false);
|
|
102
|
+
|
|
99
103
|
|
|
100
104
|
const formData = {
|
|
101
105
|
...body,
|
|
@@ -541,7 +545,7 @@ const UserAdd = ({ model, callback, edit, history, formContent, match, additiona
|
|
|
541
545
|
borderTop: '1px solid #f0f0f0',
|
|
542
546
|
color: '#1890ff',
|
|
543
547
|
}}
|
|
544
|
-
onClick={() =>
|
|
548
|
+
onClick={() => setDoctorVisible(true)}
|
|
545
549
|
>
|
|
546
550
|
+ Add New Doctor
|
|
547
551
|
</div>
|
|
@@ -570,7 +574,7 @@ const UserAdd = ({ model, callback, edit, history, formContent, match, additiona
|
|
|
570
574
|
borderTop: '1px solid #f0f0f0',
|
|
571
575
|
color: '#1890ff',
|
|
572
576
|
}}
|
|
573
|
-
onClick={() =>
|
|
577
|
+
onClick={() => setStaffVisible(true)}
|
|
574
578
|
>
|
|
575
579
|
+ Add New Staff
|
|
576
580
|
</div>
|
|
@@ -832,15 +836,15 @@ const UserAdd = ({ model, callback, edit, history, formContent, match, additiona
|
|
|
832
836
|
)}
|
|
833
837
|
{/* Render DoctorAdd OUTSIDE the Select */}
|
|
834
838
|
<DoctorAdd
|
|
835
|
-
visible={
|
|
836
|
-
onCancel={() =>
|
|
839
|
+
visible={doctorVisible}
|
|
840
|
+
onCancel={() => setDoctorVisible(false)}
|
|
837
841
|
attributes={attributes}
|
|
838
842
|
doctorData={selectedDoctor}
|
|
839
843
|
doctorId={doctorID}
|
|
840
844
|
onSuccess={getDoctors}
|
|
841
845
|
/>
|
|
842
846
|
|
|
843
|
-
<StaffAdd visible={
|
|
847
|
+
<StaffAdd visible={staffVisible} onCancel={() => setStaffVisible(false)} staffData={selectedStaff} staffId={staffID} onSuccess={getStaff} />
|
|
844
848
|
</section>
|
|
845
849
|
);
|
|
846
850
|
};
|