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
- const validateSerial = (_, value) => {
167
- if (!value) {
168
- return Promise.resolve();
169
- }
170
- const exists = staffList.some((staff) => {
171
- // Ignore current staff in edit mode
172
- if (editMode && staff.id === staffId) return false;
173
- return String(staff.slNo) === value;
174
- });
175
- if (exists) {
176
- return Promise.reject('Serial Number already exists');
177
- }
178
- return Promise.resolve();
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}>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui-soxo-bootstrap-core",
3
- "version": "2.4.25-dev.44",
3
+ "version": "2.4.25-dev.46",
4
4
  "description": "All the Core Components for you to start",
5
5
  "keywords": [
6
6
  "all in one"