@pisell/private-materials 6.3.89 → 6.3.90
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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +10 -10
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +10 -10
- package/es/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +1 -0
- package/es/components/booking/info/date/index.d.ts +0 -1
- package/es/components/ecocup/components/CupInfoCard/index.d.ts +1 -0
- package/es/components/ecocup/components/CustomerCard/index.d.ts +1 -0
- package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/plus/saasAttendance/index.d.ts +6 -0
- package/es/plus/saasAttendance/index.js +5 -0
- package/es/plus/saasAttendance/locales.d.ts +318 -0
- package/es/plus/saasAttendance/locales.js +354 -0
- package/es/plus/saasAttendance/settings/BasicInfoTab.d.ts +5 -0
- package/es/plus/saasAttendance/settings/BasicInfoTab.js +96 -0
- package/es/plus/saasAttendance/settings/ClockInMethodTab.d.ts +8 -0
- package/es/plus/saasAttendance/settings/ClockInMethodTab.js +81 -0
- package/es/plus/saasAttendance/settings/CorrectionPolicyTab.d.ts +8 -0
- package/es/plus/saasAttendance/settings/CorrectionPolicyTab.js +293 -0
- package/es/plus/saasAttendance/settings/ShiftScheduleTab.d.ts +5 -0
- package/es/plus/saasAttendance/settings/ShiftScheduleTab.js +109 -0
- package/es/plus/saasAttendance/settings/components/MapField.d.ts +78 -0
- package/es/plus/saasAttendance/settings/components/MapField.js +810 -0
- package/es/plus/saasAttendance/settings/components/index.d.ts +3 -0
- package/es/plus/saasAttendance/settings/components/index.js +2 -0
- package/es/plus/saasAttendance/settings/components/membersField/index.d.ts +7 -0
- package/es/plus/saasAttendance/settings/components/membersField/index.js +216 -0
- package/es/plus/saasAttendance/settings/components/membersField/index.less +70 -0
- package/es/plus/saasAttendance/settings/components/shiftModal/index.d.ts +18 -0
- package/es/plus/saasAttendance/settings/components/shiftModal/index.js +438 -0
- package/es/plus/saasAttendance/settings/index.d.ts +18 -0
- package/es/plus/saasAttendance/settings/index.js +255 -0
- package/es/plus/saasAttendance/settings/index.less +495 -0
- package/es/plus/saasAttendance/settings/serve.d.ts +27 -0
- package/es/plus/saasAttendance/settings/serve.js +83 -0
- package/es/plus/saasAttendance/settings/types.d.ts +128 -0
- package/es/plus/saasAttendance/settings/types.js +1 -0
- package/es/plus/selectHolder/locales.d.ts +6 -0
- package/es/plus/selectHolder/locales.js +6 -0
- package/es/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/VariantCard/index.d.ts +1 -0
- package/es/pro/Selector/demo.d.ts +1 -0
- package/lib/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +1 -0
- package/lib/components/booking/info/date/index.d.ts +0 -1
- package/lib/components/ecocup/components/CupInfoCard/index.d.ts +1 -0
- package/lib/components/ecocup/components/CustomerCard/index.d.ts +1 -0
- package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/plus/saasAttendance/index.d.ts +6 -0
- package/lib/plus/saasAttendance/index.js +39 -0
- package/lib/plus/saasAttendance/locales.d.ts +318 -0
- package/lib/plus/saasAttendance/locales.js +342 -0
- package/lib/plus/saasAttendance/settings/BasicInfoTab.d.ts +5 -0
- package/lib/plus/saasAttendance/settings/BasicInfoTab.js +152 -0
- package/lib/plus/saasAttendance/settings/ClockInMethodTab.d.ts +8 -0
- package/lib/plus/saasAttendance/settings/ClockInMethodTab.js +88 -0
- package/lib/plus/saasAttendance/settings/CorrectionPolicyTab.d.ts +8 -0
- package/lib/plus/saasAttendance/settings/CorrectionPolicyTab.js +369 -0
- package/lib/plus/saasAttendance/settings/ShiftScheduleTab.d.ts +5 -0
- package/lib/plus/saasAttendance/settings/ShiftScheduleTab.js +106 -0
- package/lib/plus/saasAttendance/settings/components/MapField.d.ts +78 -0
- package/lib/plus/saasAttendance/settings/components/MapField.js +631 -0
- package/lib/plus/saasAttendance/settings/components/index.d.ts +3 -0
- package/lib/plus/saasAttendance/settings/components/index.js +42 -0
- package/lib/plus/saasAttendance/settings/components/membersField/index.d.ts +7 -0
- package/lib/plus/saasAttendance/settings/components/membersField/index.js +247 -0
- package/lib/plus/saasAttendance/settings/components/membersField/index.less +70 -0
- package/lib/plus/saasAttendance/settings/components/shiftModal/index.d.ts +18 -0
- package/lib/plus/saasAttendance/settings/components/shiftModal/index.js +447 -0
- package/lib/plus/saasAttendance/settings/index.d.ts +18 -0
- package/lib/plus/saasAttendance/settings/index.js +283 -0
- package/lib/plus/saasAttendance/settings/index.less +495 -0
- package/lib/plus/saasAttendance/settings/serve.d.ts +27 -0
- package/lib/plus/saasAttendance/settings/serve.js +54 -0
- package/lib/plus/saasAttendance/settings/types.d.ts +128 -0
- package/lib/plus/saasAttendance/settings/types.js +17 -0
- package/lib/plus/selectHolder/locales.d.ts +6 -0
- package/lib/plus/selectHolder/locales.js +6 -0
- package/lib/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/VariantCard/index.d.ts +1 -0
- package/lib/pro/Selector/demo.d.ts +1 -0
- package/lowcode/eco-cup-list/meta.ts +1 -1
- package/lowcode/eco-customer-list/meta.ts +1 -1
- package/lowcode/saas-attendance-settings/meta.ts +56 -0
- package/package.json +3 -3
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _excluded = ["members"];
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
9
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
13
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
14
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
15
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
+
import React, { createContext, forwardRef, useCallback, useEffect, useMemo, useImperativeHandle, useRef, useState } from 'react';
|
|
17
|
+
import classNames from 'classnames';
|
|
18
|
+
import { Form, Tabs, Spin } from 'antd';
|
|
19
|
+
import { Icon } from '@pisell/materials';
|
|
20
|
+
import { locales } from '@pisell/utils';
|
|
21
|
+
import { useRequest } from 'ahooks';
|
|
22
|
+
import useEngineContext from "../../../hooks/useEngineContext";
|
|
23
|
+
import { request } from "../../../utils";
|
|
24
|
+
import localeTexts from "../locales";
|
|
25
|
+
import BasicInfoTab from "./BasicInfoTab";
|
|
26
|
+
import ShiftScheduleTab from "./ShiftScheduleTab";
|
|
27
|
+
import ClockInMethodTab from "./ClockInMethodTab";
|
|
28
|
+
import CorrectionPolicyTab from "./CorrectionPolicyTab";
|
|
29
|
+
import { getAllMembers } from "./serve";
|
|
30
|
+
import "./index.less";
|
|
31
|
+
// Tab 配置
|
|
32
|
+
var TAB_CONFIGS = [{
|
|
33
|
+
key: 'basic',
|
|
34
|
+
icon: 'pisell2-settings-02',
|
|
35
|
+
labelKey: 'pisell2.attendance.group-settings.basic-info'
|
|
36
|
+
}, {
|
|
37
|
+
key: 'shift',
|
|
38
|
+
icon: 'pisell2-calendar',
|
|
39
|
+
labelKey: 'pisell2.attendance.group-settings.shift-schedule'
|
|
40
|
+
}, {
|
|
41
|
+
key: 'clock',
|
|
42
|
+
icon: 'pisell2-marker-pin-01',
|
|
43
|
+
labelKey: 'pisell2.attendance.group-settings.clock-in-method'
|
|
44
|
+
}, {
|
|
45
|
+
key: 'correction',
|
|
46
|
+
icon: 'pisell2-clock',
|
|
47
|
+
labelKey: 'pisell2.attendance.group-settings.correction-policy'
|
|
48
|
+
}];
|
|
49
|
+
|
|
50
|
+
// 生成简单的唯一 ID
|
|
51
|
+
var generateSimpleUUID = function generateSimpleUUID() {
|
|
52
|
+
return Math.random().toString(36).substring(2) + Date.now().toString(36);
|
|
53
|
+
};
|
|
54
|
+
export var settingsContext = /*#__PURE__*/createContext({
|
|
55
|
+
members: []
|
|
56
|
+
});
|
|
57
|
+
var Settings = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
58
|
+
var _context$engine, _context$appHelper;
|
|
59
|
+
var value = props.value,
|
|
60
|
+
customScrollParent = props.customScrollParent;
|
|
61
|
+
var context = useEngineContext();
|
|
62
|
+
locales.init(localeTexts, (context === null || context === void 0 || (_context$engine = context.engine) === null || _context$engine === void 0 || (_context$engine = _context$engine.props) === null || _context$engine === void 0 ? void 0 : _context$engine.locale) || 'en');
|
|
63
|
+
if (context !== null && context !== void 0 && (_context$appHelper = context.appHelper) !== null && _context$appHelper !== void 0 && (_context$appHelper = _context$appHelper.utils) !== null && _context$appHelper !== void 0 && _context$appHelper.request) {
|
|
64
|
+
request.setRequest(context.appHelper.utils.request);
|
|
65
|
+
}
|
|
66
|
+
var _Form$useForm = Form.useForm(),
|
|
67
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
68
|
+
form = _Form$useForm2[0];
|
|
69
|
+
var _useState = useState('basic'),
|
|
70
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
71
|
+
activeKey = _useState2[0],
|
|
72
|
+
setActiveKey = _useState2[1];
|
|
73
|
+
var uniqueIdRef = useRef(generateSimpleUUID().substring(0, 8));
|
|
74
|
+
var _uniqueId = uniqueIdRef.current;
|
|
75
|
+
|
|
76
|
+
// 手动切换索引时,不触发滚动监听回调
|
|
77
|
+
var isManualChangeRef = useRef(false);
|
|
78
|
+
useEffect(function () {
|
|
79
|
+
document.body.id = 'body';
|
|
80
|
+
}, []);
|
|
81
|
+
var _useRequest = useRequest(getAllMembers, {
|
|
82
|
+
defaultParams: [{
|
|
83
|
+
page: 1,
|
|
84
|
+
size: 499,
|
|
85
|
+
with: ['account']
|
|
86
|
+
}]
|
|
87
|
+
}),
|
|
88
|
+
membersResp = _useRequest.data;
|
|
89
|
+
|
|
90
|
+
// 同步外部 value 到 form
|
|
91
|
+
useEffect(function () {
|
|
92
|
+
if (!value) return;
|
|
93
|
+
var valueAny = value;
|
|
94
|
+
var rawMembers = valueAny === null || valueAny === void 0 ? void 0 : valueAny.members;
|
|
95
|
+
var memberIdsFromMembers = Array.isArray(rawMembers) ? Array.from(new Set(rawMembers.map(function (item) {
|
|
96
|
+
return item === null || item === void 0 ? void 0 : item.tenant_account_id;
|
|
97
|
+
}).filter(function (id) {
|
|
98
|
+
return typeof id === 'number' && !Number.isNaN(id);
|
|
99
|
+
}))) : [];
|
|
100
|
+
var existingMemberIds = Array.isArray(valueAny === null || valueAny === void 0 ? void 0 : valueAny.member_ids) ? valueAny.member_ids : [];
|
|
101
|
+
var resolvedMemberIds = existingMemberIds.length > 0 ? existingMemberIds : memberIdsFromMembers;
|
|
102
|
+
var members = valueAny.members,
|
|
103
|
+
rest = _objectWithoutProperties(valueAny, _excluded);
|
|
104
|
+
form.setFieldsValue(_objectSpread(_objectSpread({}, rest), {}, {
|
|
105
|
+
member_ids: resolvedMemberIds
|
|
106
|
+
}));
|
|
107
|
+
}, [value, form]);
|
|
108
|
+
|
|
109
|
+
// 防抖指示器
|
|
110
|
+
var debounceIndicator = useCallback(function (delay) {
|
|
111
|
+
isManualChangeRef.current = true;
|
|
112
|
+
var timeoutId = setTimeout(function () {
|
|
113
|
+
isManualChangeRef.current = false;
|
|
114
|
+
}, delay);
|
|
115
|
+
return function () {
|
|
116
|
+
return clearTimeout(timeoutId);
|
|
117
|
+
};
|
|
118
|
+
}, []);
|
|
119
|
+
useImperativeHandle(ref, function () {
|
|
120
|
+
return _objectSpread({}, form);
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
// 切换 tab 并滚动到对应区域
|
|
124
|
+
var switchTab = useCallback(function (key) {
|
|
125
|
+
setActiveKey(key);
|
|
126
|
+
debounceIndicator(300);
|
|
127
|
+
|
|
128
|
+
// 获取可滚动祖先元素
|
|
129
|
+
var scrollParent = null;
|
|
130
|
+
var formContainer = document.getElementById("saas-attendance-group-settings-".concat(_uniqueId));
|
|
131
|
+
if (typeof customScrollParent === 'string') {
|
|
132
|
+
scrollParent = document.querySelector(customScrollParent);
|
|
133
|
+
} else {
|
|
134
|
+
scrollParent = customScrollParent || formContainer;
|
|
135
|
+
}
|
|
136
|
+
if (!scrollParent || !formContainer) return;
|
|
137
|
+
var target = document.getElementById("saas-attendance-settings-section-".concat(_uniqueId, "-").concat(key));
|
|
138
|
+
if (!target) return;
|
|
139
|
+
|
|
140
|
+
// 使用 getBoundingClientRect 计算更准确的滚动位置
|
|
141
|
+
var scrollParentRect = scrollParent.getBoundingClientRect();
|
|
142
|
+
var tabIndex = TAB_CONFIGS.findIndex(function (item) {
|
|
143
|
+
return item.key === key;
|
|
144
|
+
});
|
|
145
|
+
if (tabIndex === 0) {
|
|
146
|
+
// 如果是第一个 tab,滚动到容器顶部
|
|
147
|
+
scrollParent.scrollTop = 0;
|
|
148
|
+
} else {
|
|
149
|
+
// 其他 tab,滚动到对应区域,需要减去标签页高度
|
|
150
|
+
var targetRect = target.getBoundingClientRect();
|
|
151
|
+
var scrollOffset = targetRect.top - scrollParentRect.top + scrollParent.scrollTop;
|
|
152
|
+
scrollParent.scrollTop = scrollOffset - 16;
|
|
153
|
+
}
|
|
154
|
+
}, [customScrollParent, debounceIndicator, _uniqueId]);
|
|
155
|
+
|
|
156
|
+
// 滚动监听 - 更新当前激活的 tab
|
|
157
|
+
useEffect(function () {
|
|
158
|
+
var scrollParent = null;
|
|
159
|
+
var formContainer = document.getElementById("saas-attendance-group-settings-".concat(_uniqueId));
|
|
160
|
+
if (typeof customScrollParent === 'string') {
|
|
161
|
+
scrollParent = document.querySelector(customScrollParent);
|
|
162
|
+
} else {
|
|
163
|
+
scrollParent = customScrollParent || formContainer;
|
|
164
|
+
}
|
|
165
|
+
if (!scrollParent || !formContainer) return;
|
|
166
|
+
var handleScroll = function handleScroll() {
|
|
167
|
+
if (isManualChangeRef.current) return;
|
|
168
|
+
var tabsWrapper = document.getElementById("saas-attendance-settings-".concat(_uniqueId, "_tabs"));
|
|
169
|
+
var tabsHeight = (tabsWrapper === null || tabsWrapper === void 0 ? void 0 : tabsWrapper.offsetHeight) || 0;
|
|
170
|
+
|
|
171
|
+
// 使用 getBoundingClientRect 计算当前可见的 section
|
|
172
|
+
var scrollParentRect = scrollParent.getBoundingClientRect();
|
|
173
|
+
// 检测点位于 tabs 下方一点的位置
|
|
174
|
+
var checkPoint = scrollParentRect.top + tabsHeight + 20;
|
|
175
|
+
|
|
176
|
+
// 找到当前可见的 section
|
|
177
|
+
var currentKey = 'basic';
|
|
178
|
+
for (var _i = 0, _TAB_CONFIGS = TAB_CONFIGS; _i < _TAB_CONFIGS.length; _i++) {
|
|
179
|
+
var config = _TAB_CONFIGS[_i];
|
|
180
|
+
var section = document.getElementById("saas-attendance-settings-section-".concat(_uniqueId, "-").concat(config.key));
|
|
181
|
+
if (section) {
|
|
182
|
+
var sectionRect = section.getBoundingClientRect();
|
|
183
|
+
// 如果 section 的顶部在检测点之上,说明这个 section 已经滚动到可见区域
|
|
184
|
+
if (sectionRect.top <= checkPoint) {
|
|
185
|
+
currentKey = config.key;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
if (currentKey !== activeKey) {
|
|
190
|
+
setActiveKey(currentKey);
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
scrollParent.addEventListener('scroll', handleScroll);
|
|
194
|
+
return function () {
|
|
195
|
+
var _scrollParent;
|
|
196
|
+
(_scrollParent = scrollParent) === null || _scrollParent === void 0 || _scrollParent.removeEventListener('scroll', handleScroll);
|
|
197
|
+
};
|
|
198
|
+
}, [customScrollParent, _uniqueId, activeKey]);
|
|
199
|
+
|
|
200
|
+
// Tab items - 仅用于渲染 tab 头部
|
|
201
|
+
var tabItems = useMemo(function () {
|
|
202
|
+
return TAB_CONFIGS.map(function (config) {
|
|
203
|
+
return {
|
|
204
|
+
key: config.key,
|
|
205
|
+
label: /*#__PURE__*/React.createElement("span", {
|
|
206
|
+
className: "saas-attendance-group-settings__tab-label"
|
|
207
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
208
|
+
type: config.icon,
|
|
209
|
+
size: 20
|
|
210
|
+
}), locales.getText(config.labelKey)),
|
|
211
|
+
children: null // 不在 tab content 中渲染内容
|
|
212
|
+
};
|
|
213
|
+
});
|
|
214
|
+
}, []);
|
|
215
|
+
return /*#__PURE__*/React.createElement(settingsContext.Provider, {
|
|
216
|
+
value: {
|
|
217
|
+
members: (membersResp === null || membersResp === void 0 ? void 0 : membersResp.list) || []
|
|
218
|
+
}
|
|
219
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
220
|
+
className: classNames('saas-attendance-group-settings', props.className),
|
|
221
|
+
style: props.style
|
|
222
|
+
}, props.loading ? /*#__PURE__*/React.createElement("div", {
|
|
223
|
+
className: "saas-attendance-group-settings__loading"
|
|
224
|
+
}, /*#__PURE__*/React.createElement(Spin, null)) : null, /*#__PURE__*/React.createElement("div", {
|
|
225
|
+
className: "saas-attendance-group-settings__tabs-wrapper",
|
|
226
|
+
id: "saas-attendance-settings-".concat(_uniqueId, "_tabs")
|
|
227
|
+
}, /*#__PURE__*/React.createElement(Tabs, {
|
|
228
|
+
activeKey: activeKey,
|
|
229
|
+
items: tabItems,
|
|
230
|
+
onChange: switchTab,
|
|
231
|
+
renderTabBar: function renderTabBar(tabBarProps, DefaultTabBar) {
|
|
232
|
+
return /*#__PURE__*/React.createElement(DefaultTabBar, tabBarProps);
|
|
233
|
+
}
|
|
234
|
+
})), /*#__PURE__*/React.createElement(Form, {
|
|
235
|
+
id: "saas-attendance-group-settings-".concat(_uniqueId),
|
|
236
|
+
className: "saas-attendance-group-settings__form",
|
|
237
|
+
form: form,
|
|
238
|
+
layout: "vertical",
|
|
239
|
+
size: "large",
|
|
240
|
+
onValuesChange: props.onValuesChange,
|
|
241
|
+
onFinish: props.onFinish,
|
|
242
|
+
scrollToFirstError: true
|
|
243
|
+
}, /*#__PURE__*/React.createElement(BasicInfoTab, {
|
|
244
|
+
id: "saas-attendance-settings-section-".concat(_uniqueId, "-basic")
|
|
245
|
+
}), /*#__PURE__*/React.createElement(ShiftScheduleTab, {
|
|
246
|
+
id: "saas-attendance-settings-section-".concat(_uniqueId, "-shift")
|
|
247
|
+
}), /*#__PURE__*/React.createElement(ClockInMethodTab, {
|
|
248
|
+
form: form,
|
|
249
|
+
id: "saas-attendance-settings-section-".concat(_uniqueId, "-clock")
|
|
250
|
+
}), /*#__PURE__*/React.createElement(CorrectionPolicyTab, {
|
|
251
|
+
form: form,
|
|
252
|
+
id: "saas-attendance-settings-section-".concat(_uniqueId, "-correction")
|
|
253
|
+
}))));
|
|
254
|
+
});
|
|
255
|
+
export default Settings;
|