ui-soxo-bootstrap-core 2.4.25-dev.44 → 2.4.25-dev.46
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.
|
@@ -163,20 +163,20 @@ const StaffAdd = ({ visible, onCancel, staffId, staffData, onSuccess }) => {
|
|
|
163
163
|
return Promise.resolve();
|
|
164
164
|
};
|
|
165
165
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
return
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
166
|
+
const validateSerial = (_, value) => {
|
|
167
|
+
if (!value) {
|
|
168
|
+
return Promise.resolve();
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// Allow same serial number for the same staff in edit mode
|
|
172
|
+
if (editMode && String(value) === String(staffData?.slNo)) {
|
|
173
|
+
return Promise.resolve();
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const exists = staffList.some((staff) => String(staff.slNo) === String(value));
|
|
177
|
+
|
|
178
|
+
return exists ? Promise.reject('Serial Number already exists') : Promise.resolve();
|
|
179
|
+
};
|
|
180
180
|
|
|
181
181
|
/** -------------------------------
|
|
182
182
|
* UTIL – Enter Key Navigation
|
|
@@ -316,7 +316,7 @@ const StaffAdd = ({ visible, onCancel, staffId, staffData, onSuccess }) => {
|
|
|
316
316
|
</Col>
|
|
317
317
|
</Row>
|
|
318
318
|
|
|
319
|
-
<Tabs defaultActiveKey="1">
|
|
319
|
+
<Tabs defaultActiveKey="1" destroyInactiveTabPane={false}>
|
|
320
320
|
{/* GENERAL TAB */}
|
|
321
321
|
<Tabs.TabPane tab="GENERAL" key="1">
|
|
322
322
|
<Row gutter={16}>
|