@pisell/private-materials 3.3.89 → 3.3.91
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 +13 -13
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +11 -11
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +11 -11
- package/es/businessModel/SalesModel/Sales/index.js +4 -37
- package/es/components/Sales/Cart/index.js +1 -5
- package/es/components/Sales/Cart/utils.d.ts +0 -40
- package/es/components/Sales/Cart/utils.js +0 -167
- package/es/components/Sales/Checkout/index.d.ts +0 -4
- package/es/components/Sales/Checkout/index.js +8 -52
- package/es/components/Sales/Checkout/serve.d.ts +0 -13
- package/es/components/Sales/Checkout/serve.js +2 -16
- package/es/components/Sales/Checkout/utils.js +1 -7
- package/es/components/Sales/Resource/index.js +2 -2
- package/es/components/Sales/Resource/serve.d.ts +0 -7
- package/es/components/Sales/Resource/serve.js +0 -10
- package/es/components/Sales/Summary/index.d.ts +0 -10
- package/es/components/Sales/Summary/index.js +2 -17
- package/es/components/Sales/Summary/serve.d.ts +0 -1
- package/es/components/Sales/Summary/serve.js +0 -6
- package/es/components/Sales/Summary/utils.d.ts +1 -16
- package/es/components/Sales/Summary/utils.js +1 -43
- package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/es/components/appointmentBooking/components/Content/index.less +1 -1
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -6
- package/es/components/appointmentBooking/components/Deposit/index.js +7 -27
- package/es/components/appointmentBooking/components/Services/index.js +27 -23
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +20 -25
- package/es/components/appointmentBooking/deposit/index.js +2 -4
- package/es/components/appointmentBooking/index.js +0 -14
- package/es/components/appointmentBooking/index.less +1 -1
- package/es/components/booking/components/footer/utils.d.ts +0 -1
- package/es/components/booking/components/footer/utils.js +1 -1
- package/es/components/booking/components/voucher/index.js +2 -2
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info/service2/utils.js +2 -3
- package/es/components/booking/info2/service/addService/utils.d.ts +0 -10
- package/es/components/booking/info2/service/addService/utils.js +13 -44
- package/es/components/booking/info2/service/editService/Resources/index.js +8 -22
- package/es/components/booking/info2/service/editService/Resources/index.less +0 -6
- package/es/components/booking/info2/utilsByBooking.js +0 -9
- package/es/components/booking/locales.d.ts +0 -3
- package/es/components/booking/locales.js +0 -3
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/const.d.ts +1 -4
- package/es/components/eftposPay/const.js +1 -3
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/hooks.js +1 -3
- package/es/components/eftposPay/index.js +1 -1
- package/es/components/eftposPay/manufacturer.d.ts +0 -1
- package/es/components/eftposPay/manufacturer.js +0 -4
- package/es/components/eftposPay/pay.d.ts +1 -1
- package/es/components/eftposPay/pay.js +2 -6
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +17 -29
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.js +6 -10
- package/es/components/eventBooking/components/Provider/Cart/Item/index.js +2 -4
- package/es/components/eventBooking/components/Provider/Event/index.js +4 -13
- package/es/components/eventBooking/components/bookingDetailModal/index.js +4 -22
- package/es/components/eventBooking/index.js +7 -21
- package/es/components/eventBooking/locales.d.ts +0 -24
- package/es/components/eventBooking/locales.js +6 -30
- package/es/components/index.d.ts +1 -3
- package/es/components/index.js +1 -3
- package/es/components/pay/toC/PaymentMethods/index.js +4 -5
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/components/ticketBooking/index.js +138 -257
- package/es/components/ticketBooking/locales.d.ts +146 -164
- package/es/components/ticketBooking/locales.js +147 -195
- package/es/index.d.ts +0 -2
- package/es/index.js +1 -3
- package/es/utils/index.d.ts +1 -1
- package/lib/businessModel/SalesModel/Sales/index.js +8 -22
- package/lib/components/Sales/Cart/index.js +0 -1
- package/lib/components/Sales/Cart/utils.d.ts +0 -40
- package/lib/components/Sales/Cart/utils.js +0 -117
- package/lib/components/Sales/Checkout/index.d.ts +0 -4
- package/lib/components/Sales/Checkout/index.js +7 -39
- package/lib/components/Sales/Checkout/serve.d.ts +0 -13
- package/lib/components/Sales/Checkout/serve.js +2 -7
- package/lib/components/Sales/Checkout/utils.js +0 -2
- package/lib/components/Sales/Resource/index.js +1 -1
- package/lib/components/Sales/Resource/serve.d.ts +0 -7
- package/lib/components/Sales/Resource/serve.js +2 -9
- package/lib/components/Sales/Summary/index.d.ts +0 -10
- package/lib/components/Sales/Summary/index.js +1 -7
- package/lib/components/Sales/Summary/serve.d.ts +0 -1
- package/lib/components/Sales/Summary/serve.js +0 -32
- package/lib/components/Sales/Summary/utils.d.ts +1 -16
- package/lib/components/Sales/Summary/utils.js +1 -30
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/lib/components/appointmentBooking/components/Content/index.less +1 -1
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -6
- package/lib/components/appointmentBooking/components/Deposit/index.js +4 -36
- package/lib/components/appointmentBooking/components/Services/index.js +11 -6
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +4 -8
- package/lib/components/appointmentBooking/deposit/index.js +2 -4
- package/lib/components/appointmentBooking/index.js +0 -11
- package/lib/components/appointmentBooking/index.less +1 -1
- package/lib/components/booking/components/footer/utils.d.ts +0 -1
- package/lib/components/booking/components/footer/utils.js +0 -2
- package/lib/components/booking/components/voucher/index.js +2 -2
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info/service2/utils.js +2 -2
- package/lib/components/booking/info2/service/addService/utils.d.ts +0 -10
- package/lib/components/booking/info2/service/addService/utils.js +4 -27
- package/lib/components/booking/info2/service/editService/Resources/index.js +10 -54
- package/lib/components/booking/info2/service/editService/Resources/index.less +0 -6
- package/lib/components/booking/info2/utilsByBooking.js +0 -6
- package/lib/components/booking/locales.d.ts +0 -3
- package/lib/components/booking/locales.js +0 -3
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/const.d.ts +1 -4
- package/lib/components/eftposPay/const.js +0 -2
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/hooks.js +4 -11
- package/lib/components/eftposPay/index.js +1 -1
- package/lib/components/eftposPay/manufacturer.d.ts +0 -1
- package/lib/components/eftposPay/manufacturer.js +0 -6
- package/lib/components/eftposPay/pay.d.ts +1 -1
- package/lib/components/eftposPay/pay.js +2 -13
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +3 -16
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.js +5 -8
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +2 -4
- package/lib/components/eventBooking/components/Provider/Event/index.js +3 -10
- package/lib/components/eventBooking/components/bookingDetailModal/index.js +4 -10
- package/lib/components/eventBooking/index.js +7 -11
- package/lib/components/eventBooking/locales.d.ts +0 -24
- package/lib/components/eventBooking/locales.js +6 -30
- package/lib/components/index.d.ts +1 -3
- package/lib/components/index.js +0 -6
- package/lib/components/pay/toC/PaymentMethods/index.js +9 -10
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +139 -263
- package/lib/components/ticketBooking/locales.d.ts +146 -164
- package/lib/components/ticketBooking/locales.js +4 -22
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -6
- package/lib/utils/index.d.ts +1 -1
- package/package.json +3 -3
- package/es/components/booking/editBookingModal/index.d.ts +0 -5
- package/es/components/booking/editBookingModal/index.js +0 -386
- package/es/components/booking/editBookingModal/index.less +0 -8
- package/es/components/booking/editBookingModal/locales.d.ts +0 -21
- package/es/components/booking/editBookingModal/locales.js +0 -20
- package/es/components/booking/editBookingModal/mock.d.ts +0 -807
- package/es/components/booking/editBookingModal/mock.js +0 -2993
- package/es/components/booking/editBookingModal/serve.d.ts +0 -51
- package/es/components/booking/editBookingModal/serve.js +0 -288
- package/es/components/booking/editBookingModal/type.d.ts +0 -12
- package/es/components/booking/editBookingModal/type.js +0 -1
- package/es/components/booking/editBookingModal/utils.d.ts +0 -12
- package/es/components/booking/editBookingModal/utils.js +0 -157
- package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +0 -7
- package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +0 -26
- package/es/components/booking/info2/service/editService/ResourcesV2/index.d.ts +0 -10
- package/es/components/booking/info2/service/editService/ResourcesV2/index.js +0 -308
- package/es/components/booking/info2/service/editService/ResourcesV2/index.less +0 -44
- package/es/components/eftposPay/linkly/const.d.ts +0 -23
- package/es/components/eftposPay/linkly/const.js +0 -82
- package/es/components/eftposPay/linkly/hooks/index.d.ts +0 -2
- package/es/components/eftposPay/linkly/hooks/index.js +0 -2
- package/es/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
- package/es/components/eftposPay/linkly/hooks/normal.js +0 -318
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +0 -273
- package/es/components/eftposPay/linkly/index.d.ts +0 -2
- package/es/components/eftposPay/linkly/index.js +0 -197
- package/es/components/eftposPay/linkly/service.d.ts +0 -32
- package/es/components/eftposPay/linkly/service.js +0 -73
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -2
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.js +0 -17
- package/es/components/stepController/components/Content/index.d.ts +0 -7
- package/es/components/stepController/components/Content/index.js +0 -9
- package/es/components/stepController/components/Content/index.less +0 -8
- package/es/components/stepController/components/Footer/index.d.ts +0 -8
- package/es/components/stepController/components/Footer/index.js +0 -15
- package/es/components/stepController/components/Footer/index.less +0 -39
- package/es/components/stepController/components/Header/index.d.ts +0 -20
- package/es/components/stepController/components/Header/index.js +0 -97
- package/es/components/stepController/components/Header/index.less +0 -21
- package/es/components/stepController/index.d.ts +0 -5
- package/es/components/stepController/index.js +0 -64
- package/es/components/stepController/index.less +0 -11
- package/es/components/stepController/locales.d.ts +0 -27
- package/es/components/stepController/locales.js +0 -32
- package/es/components/stepController/types.d.ts +0 -23
- package/es/components/stepController/types.js +0 -1
- package/es/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
- package/es/components/ticketBooking/utils/formatProductMessage.js +0 -62
- package/es/components/ticketBooking/utils/formatTime.d.ts +0 -31
- package/es/components/ticketBooking/utils/formatTime.js +0 -144
- package/es/hooks/useWindowSize.d.ts +0 -5
- package/es/hooks/useWindowSize.js +0 -26
- package/lib/components/booking/editBookingModal/index.d.ts +0 -5
- package/lib/components/booking/editBookingModal/index.js +0 -363
- package/lib/components/booking/editBookingModal/index.less +0 -8
- package/lib/components/booking/editBookingModal/locales.d.ts +0 -21
- package/lib/components/booking/editBookingModal/locales.js +0 -44
- package/lib/components/booking/editBookingModal/mock.d.ts +0 -807
- package/lib/components/booking/editBookingModal/mock.js +0 -3314
- package/lib/components/booking/editBookingModal/serve.d.ts +0 -51
- package/lib/components/booking/editBookingModal/serve.js +0 -178
- package/lib/components/booking/editBookingModal/type.d.ts +0 -12
- package/lib/components/booking/editBookingModal/type.js +0 -17
- package/lib/components/booking/editBookingModal/utils.d.ts +0 -12
- package/lib/components/booking/editBookingModal/utils.js +0 -158
- package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +0 -7
- package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +0 -53
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.d.ts +0 -10
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +0 -311
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.less +0 -44
- package/lib/components/eftposPay/linkly/const.d.ts +0 -23
- package/lib/components/eftposPay/linkly/const.js +0 -102
- package/lib/components/eftposPay/linkly/hooks/index.d.ts +0 -2
- package/lib/components/eftposPay/linkly/hooks/index.js +0 -25
- package/lib/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
- package/lib/components/eftposPay/linkly/hooks/normal.js +0 -239
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +0 -222
- package/lib/components/eftposPay/linkly/index.d.ts +0 -2
- package/lib/components/eftposPay/linkly/index.js +0 -208
- package/lib/components/eftposPay/linkly/service.d.ts +0 -32
- package/lib/components/eftposPay/linkly/service.js +0 -55
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -2
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.js +0 -55
- package/lib/components/stepController/components/Content/index.d.ts +0 -7
- package/lib/components/stepController/components/Content/index.js +0 -40
- package/lib/components/stepController/components/Content/index.less +0 -8
- package/lib/components/stepController/components/Footer/index.d.ts +0 -8
- package/lib/components/stepController/components/Footer/index.js +0 -49
- package/lib/components/stepController/components/Footer/index.less +0 -39
- package/lib/components/stepController/components/Header/index.d.ts +0 -20
- package/lib/components/stepController/components/Header/index.js +0 -104
- package/lib/components/stepController/components/Header/index.less +0 -21
- package/lib/components/stepController/index.d.ts +0 -5
- package/lib/components/stepController/index.js +0 -89
- package/lib/components/stepController/index.less +0 -11
- package/lib/components/stepController/locales.d.ts +0 -27
- package/lib/components/stepController/locales.js +0 -50
- package/lib/components/stepController/types.d.ts +0 -23
- package/lib/components/stepController/types.js +0 -17
- package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
- package/lib/components/ticketBooking/utils/formatProductMessage.js +0 -84
- package/lib/components/ticketBooking/utils/formatTime.d.ts +0 -31
- package/lib/components/ticketBooking/utils/formatTime.js +0 -139
- package/lib/hooks/useWindowSize.d.ts +0 -5
- package/lib/hooks/useWindowSize.js +0 -51
- package/lowcode/edit-booking-modal/meta.ts +0 -53
- package/lowcode/step-controller/meta.ts +0 -88
|
@@ -22,22 +22,14 @@ import { getErrorList } from "../../../utilsByBooking";
|
|
|
22
22
|
import { isArray } from 'lodash';
|
|
23
23
|
import { getAutoAllocationStorage, setAutoAllocationStorage } from "../utils";
|
|
24
24
|
import { useUpdate } from 'ahooks';
|
|
25
|
-
import { QuestionCircleOutlined } from
|
|
25
|
+
import { QuestionCircleOutlined } from "@ant-design/icons";
|
|
26
26
|
var Resources = function Resources(_ref, ref) {
|
|
27
27
|
var _cacheItem$_data2, _cacheItem$_data4;
|
|
28
28
|
var state = _ref.state,
|
|
29
29
|
cacheItem = _ref.cacheItem,
|
|
30
30
|
getCurrentCacheItem = _ref.getCurrentCacheItem,
|
|
31
31
|
onChange = _ref.onChange,
|
|
32
|
-
value = _ref.value
|
|
33
|
-
_ref$config = _ref.config,
|
|
34
|
-
config = _ref$config === void 0 ? {
|
|
35
|
-
// 是否显示自动分配
|
|
36
|
-
autoAllocation: true,
|
|
37
|
-
// 是否显示资源错误图标
|
|
38
|
-
resourceErrorIcon: true,
|
|
39
|
-
disabled: false
|
|
40
|
-
} : _ref$config;
|
|
32
|
+
value = _ref.value;
|
|
41
33
|
var _useState = useState(false),
|
|
42
34
|
_useState2 = _slicedToArray(_useState, 2),
|
|
43
35
|
showError = _useState2[0],
|
|
@@ -152,7 +144,7 @@ var Resources = function Resources(_ref, ref) {
|
|
|
152
144
|
relation_type: d.relation_type
|
|
153
145
|
}), d[label]);
|
|
154
146
|
});
|
|
155
|
-
}, [
|
|
147
|
+
}, []);
|
|
156
148
|
|
|
157
149
|
/**
|
|
158
150
|
* @title: 检查当前资源最小选择数量
|
|
@@ -201,7 +193,6 @@ var Resources = function Resources(_ref, ref) {
|
|
|
201
193
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
202
194
|
label: item.title,
|
|
203
195
|
required: true,
|
|
204
|
-
labelCol: config === null || config === void 0 ? void 0 : config.labelCol,
|
|
205
196
|
extra: showError && item.select_type.min > (cur === null || cur === void 0 ? void 0 : cur.length) ? /*#__PURE__*/React.createElement("span", {
|
|
206
197
|
style: {
|
|
207
198
|
color: '#ff4d4f'
|
|
@@ -210,17 +201,13 @@ var Resources = function Resources(_ref, ref) {
|
|
|
210
201
|
}, /*#__PURE__*/React.createElement("div", {
|
|
211
202
|
className: "resource-col"
|
|
212
203
|
}, item.select_type.type === 'multiple' ? null : /*#__PURE__*/React.createElement(Button, {
|
|
213
|
-
className: "resource-col-like-wrap
|
|
204
|
+
className: "resource-col-like-wrap",
|
|
214
205
|
onClick: function onClick() {
|
|
215
206
|
var _cur$;
|
|
216
|
-
if (config !== null && config !== void 0 && config.disabled) {
|
|
217
|
-
return;
|
|
218
|
-
}
|
|
219
207
|
setLikeStatus((cur === null || cur === void 0 || (_cur$ = cur[0]) === null || _cur$ === void 0 ? void 0 : _cur$.like_status) === 'like' ? 'common' : 'like', item.form_id, 'like_status');
|
|
220
208
|
}
|
|
221
209
|
}, /*#__PURE__*/React.createElement(Like, {
|
|
222
|
-
status: cur === null || cur === void 0 || (_cur$2 = cur[0]) === null || _cur$2 === void 0 ? void 0 : _cur$2.like_status
|
|
223
|
-
className: "".concat(config !== null && config !== void 0 && config.disabled ? 'like-icon-disabled' : '')
|
|
210
|
+
status: cur === null || cur === void 0 || (_cur$2 = cur[0]) === null || _cur$2 === void 0 ? void 0 : _cur$2.like_status
|
|
224
211
|
})), /*#__PURE__*/React.createElement(MaxLengthSelect, {
|
|
225
212
|
className: "resource-col-select",
|
|
226
213
|
size: "large",
|
|
@@ -241,16 +228,15 @@ var Resources = function Resources(_ref, ref) {
|
|
|
241
228
|
showSearch: true,
|
|
242
229
|
filterOption: function filterOption(str, option) {
|
|
243
230
|
return ((option === null || option === void 0 ? void 0 : option.labelText) || '').toLowerCase().includes((str || '').toLowerCase());
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
}, renderOptions(item.renderList, 'id', config !== null && config !== void 0 && config.resourceErrorIcon ? 'label' : 'labelText', 'resource')), config !== null && config !== void 0 && config.autoAllocation ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Checkbox, {
|
|
231
|
+
}
|
|
232
|
+
}, renderOptions(item.renderList, 'id', 'label', 'resource')), /*#__PURE__*/React.createElement(Checkbox, {
|
|
247
233
|
checked: getIsAutoAllocation(item.form_id),
|
|
248
234
|
onChange: function onChange(e) {
|
|
249
235
|
handleCheckAutoAllocation(item.form_id, e.target.checked);
|
|
250
236
|
}
|
|
251
237
|
}), /*#__PURE__*/React.createElement(Tooltip, {
|
|
252
238
|
title: locales.getText('page.booking.text.resource.check-auto-allocation-tip')
|
|
253
|
-
}, /*#__PURE__*/React.createElement(QuestionCircleOutlined, null)))
|
|
239
|
+
}, /*#__PURE__*/React.createElement(QuestionCircleOutlined, null)))), state.renderType !== 'eventBooking' && (errors || []).map(function (d) {
|
|
254
240
|
return /*#__PURE__*/React.createElement(Alert, {
|
|
255
241
|
key: d.type,
|
|
256
242
|
message: d.label,
|
|
@@ -260,15 +260,6 @@ export var getErrorList = function getErrorList(resource, cacheItem) {
|
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
|
|
264
|
-
// 平行资源日历拖动优化需求
|
|
265
|
-
// 拖入到未绑定的资源中
|
|
266
|
-
if (resource.unbound) {
|
|
267
|
-
list.push({
|
|
268
|
-
label: locales.getText('pisell1.text.resource-error-message-unbound'),
|
|
269
|
-
type: "time"
|
|
270
|
-
});
|
|
271
|
-
}
|
|
272
263
|
return list;
|
|
273
264
|
};
|
|
274
265
|
|
|
@@ -110,7 +110,6 @@ declare const _default: {
|
|
|
110
110
|
'pisell1.text.resource-error-message-1': (x: string, y: string) => string;
|
|
111
111
|
'pisell1.text.resource-error-message-2': (x: string, y: string, z: string) => string;
|
|
112
112
|
'pisell1.text.resource-error-message-3': (x: string, y: string, z: string) => string;
|
|
113
|
-
'pisell1.text.resource-error-message-unbound': string;
|
|
114
113
|
'pisell1.text.no-addons': string;
|
|
115
114
|
'pisell1.text.no-resource': string;
|
|
116
115
|
'pisell1.text.no-payments': string;
|
|
@@ -390,7 +389,6 @@ declare const _default: {
|
|
|
390
389
|
'pisell1.text.resource-error-message-1': (x: string, y: string) => string;
|
|
391
390
|
'pisell1.text.resource-error-message-2': (x: string, y: string, z: string) => string;
|
|
392
391
|
'pisell1.text.resource-error-message-3': (x: string, y: string, z: string) => string;
|
|
393
|
-
'pisell1.text.resource-error-message-unbound': string;
|
|
394
392
|
'pisell2.text.flexible': string;
|
|
395
393
|
'pisell2.text.order-discount': string;
|
|
396
394
|
'pisell2.text.no-product-added': string;
|
|
@@ -662,7 +660,6 @@ declare const _default: {
|
|
|
662
660
|
'pisell1.text.resource-error-message-1': (x: string, y: string) => string;
|
|
663
661
|
'pisell1.text.resource-error-message-2': (x: string, y: string, z: string) => string;
|
|
664
662
|
'pisell1.text.resource-error-message-3': (x: string, y: string, z: string) => string;
|
|
665
|
-
'pisell1.text.resource-error-message-unbound': string;
|
|
666
663
|
'pisell2.text.flexible': string;
|
|
667
664
|
'pisell2.text.order-discount': string;
|
|
668
665
|
'pisell2.text.no-product-added': string;
|
|
@@ -128,7 +128,6 @@ export default {
|
|
|
128
128
|
'pisell1.text.resource-error-message-3': function pisell1TextResourceErrorMessage3(x, y, z) {
|
|
129
129
|
return "".concat(x, " is fully booked between ").concat(y, " and ").concat(z, ", but your team member can still book appointments.");
|
|
130
130
|
},
|
|
131
|
-
'pisell1.text.resource-error-message-unbound': 'This booking product is not associated with the target resource.',
|
|
132
131
|
'pisell1.text.no-addons': 'No addons',
|
|
133
132
|
'pisell1.text.no-resource': 'No resource',
|
|
134
133
|
'pisell1.text.no-payments': 'No payments',
|
|
@@ -455,7 +454,6 @@ export default {
|
|
|
455
454
|
'pisell1.text.resource-error-message-3': function pisell1TextResourceErrorMessage3(x, y, z) {
|
|
456
455
|
return "".concat(x, "\u5728").concat(y, "\u5230").concat(z, "\u4E4B\u95F4\u5DF2\u7EA6\u6EE1\uFF0C\u4F46\u60A8\u7684\u56E2\u961F\u6210\u5458\u4ECD\u7136\u53EF\u4EE5\u9884\u7EA6\u3002");
|
|
457
456
|
},
|
|
458
|
-
'pisell1.text.resource-error-message-unbound': '该预约商品未关联目标资源。',
|
|
459
457
|
'pisell2.text.flexible': "灵活",
|
|
460
458
|
'pisell2.text.order-discount': "折扣",
|
|
461
459
|
'pisell2.text.no-product-added': '未添加商品',
|
|
@@ -774,7 +772,6 @@ export default {
|
|
|
774
772
|
'pisell1.text.resource-error-message-3': function pisell1TextResourceErrorMessage3(x, y, z) {
|
|
775
773
|
return "".concat(x, "\u5728").concat(y, "\u5230").concat(z, "\u4E4B\u9593\u5DF2\u7D04\u6EFF\uFF0C\u4F46\u60A8\u7684\u5718\u968A\u6210\u54E1\u4ECD\u7136\u53EF\u4EE5\u9810\u7D04\u3002");
|
|
776
774
|
},
|
|
777
|
-
'pisell1.text.resource-error-message-unbound': '該預約商品未關聯目標資源。',
|
|
778
775
|
'pisell2.text.flexible': "靈活",
|
|
779
776
|
'pisell2.text.order-discount': "折扣",
|
|
780
777
|
'pisell2.text.no-product-added': '未添加商品',
|
|
@@ -8,7 +8,7 @@ import { PosProps } from './const';
|
|
|
8
8
|
*/
|
|
9
9
|
declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
|
|
10
10
|
className?: string | undefined;
|
|
11
|
-
onChange?: ((status: "
|
|
11
|
+
onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
12
12
|
[keys: string]: unknown;
|
|
13
13
|
} | undefined, other?: any) => void) | undefined;
|
|
14
14
|
onClose: () => void;
|
|
@@ -5,8 +5,7 @@ export declare enum EftposEnum {
|
|
|
5
5
|
Tyro = "tyro",
|
|
6
6
|
/** 后端支付 - 支付 + 退款 */
|
|
7
7
|
Windcave = "windcave",
|
|
8
|
-
Stripe = "stripe"
|
|
9
|
-
Linkly = "linkly"
|
|
8
|
+
Stripe = "stripe"
|
|
10
9
|
}
|
|
11
10
|
export declare enum StatusEnum {
|
|
12
11
|
Loading = "loading",
|
|
@@ -148,8 +147,6 @@ export declare enum PayStatus {
|
|
|
148
147
|
'Success' = "200",
|
|
149
148
|
/** 未生成交易记录 */
|
|
150
149
|
'NoPay' = "4004",
|
|
151
|
-
/** 配对失效 */
|
|
152
|
-
'PairingFailure' = "606020",
|
|
153
150
|
/** 支付失败 */
|
|
154
151
|
'Unknown' = "701000",
|
|
155
152
|
/** 交易请求超时 */
|
|
@@ -3,9 +3,8 @@ export var EftposEnum = /*#__PURE__*/function (EftposEnum) {
|
|
|
3
3
|
EftposEnum["Tyro"] = "tyro";
|
|
4
4
|
EftposEnum["Windcave"] = "windcave";
|
|
5
5
|
EftposEnum["Stripe"] = "stripe";
|
|
6
|
-
EftposEnum["Linkly"] = "linkly";
|
|
7
6
|
return EftposEnum;
|
|
8
|
-
}({});
|
|
7
|
+
}({}); // Eftpos = 'eftpos',
|
|
9
8
|
export var StatusEnum = /*#__PURE__*/function (StatusEnum) {
|
|
10
9
|
StatusEnum["Loading"] = "loading";
|
|
11
10
|
StatusEnum["Warn"] = "warn";
|
|
@@ -65,7 +64,6 @@ export var PayRouteEnum = /*#__PURE__*/function (PayRouteEnum) {
|
|
|
65
64
|
export var PayStatus = /*#__PURE__*/function (PayStatus) {
|
|
66
65
|
PayStatus["Success"] = "200";
|
|
67
66
|
PayStatus["NoPay"] = "4004";
|
|
68
|
-
PayStatus["PairingFailure"] = "606020";
|
|
69
67
|
PayStatus["Unknown"] = "701000";
|
|
70
68
|
PayStatus["Timeout"] = "701001";
|
|
71
69
|
PayStatus["PayOtherEftposFailed"] = "701003";
|
|
@@ -10,7 +10,7 @@ import './device.less';
|
|
|
10
10
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
|
|
11
11
|
api: PayProps['api'];
|
|
12
12
|
className?: string | undefined;
|
|
13
|
-
onChange?: ((status: "
|
|
13
|
+
onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
14
14
|
[keys: string]: unknown;
|
|
15
15
|
} | undefined, other?: any) => void) | undefined;
|
|
16
16
|
onClose: () => void;
|
|
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
|
|
|
15
15
|
readonly numRef: React.MutableRefObject<string | number | undefined>;
|
|
16
16
|
readonly orderIdRef: React.MutableRefObject<string | number>;
|
|
17
17
|
readonly modeRef: React.MutableRefObject<ModeEnum>;
|
|
18
|
-
readonly statusRef: React.MutableRefObject<"
|
|
18
|
+
readonly statusRef: React.MutableRefObject<"loading" | "warn" | "success" | "fail" | "pedding" | "resove" | "reject" | "question">;
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"stripe" | "tyro" | "windcave" | "payo">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -139,7 +139,6 @@ export var useFail = function useFail(index) {
|
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
141
|
var code = "".concat(res.code);
|
|
142
|
-
console.log('code---->>>>>>>', code);
|
|
143
142
|
if (code === PayStatus.Unknown) {
|
|
144
143
|
// 前往报错页 不可标记
|
|
145
144
|
steps[index].title = locales.getText('page.eftpos-pay.text.failed')(modeRef.current);
|
|
@@ -225,7 +224,6 @@ export var useFail = function useFail(index) {
|
|
|
225
224
|
dispatch(updateComponent('Fail'));
|
|
226
225
|
return;
|
|
227
226
|
}
|
|
228
|
-
|
|
229
227
|
// 重新支付 最多到重新发起2次
|
|
230
228
|
ref.current += 1;
|
|
231
229
|
dispatch(updateState({
|
|
@@ -302,7 +300,7 @@ export var useFail = function useFail(index) {
|
|
|
302
300
|
}));
|
|
303
301
|
return;
|
|
304
302
|
}
|
|
305
|
-
if (code === PayStatus.UserConfigError
|
|
303
|
+
if (code === PayStatus.UserConfigError) {
|
|
306
304
|
// 前往错误页 不可标记状态
|
|
307
305
|
steps[index].title = locales.getText('page.eftpos-pay.text.transaction.user.config.title');
|
|
308
306
|
steps[index].fail = locales.getText('page.eftpos-pay.text.transaction.user.config.text');
|
|
@@ -163,7 +163,7 @@ export default (function (props) {
|
|
|
163
163
|
}, [mode, state]);
|
|
164
164
|
useEffect(function () {
|
|
165
165
|
document.body.id = 'body';
|
|
166
|
-
console.log('初始化 ........
|
|
166
|
+
console.log('初始化 ........11221801');
|
|
167
167
|
}, []);
|
|
168
168
|
|
|
169
169
|
// console.log('action = ', action);
|
|
@@ -3,5 +3,4 @@ export { getAmonunt } from './helper';
|
|
|
3
3
|
export { default as Payo } from './payo';
|
|
4
4
|
export { default as Windcave } from './windcave/windcave';
|
|
5
5
|
export { default as Tyro } from './tyro';
|
|
6
|
-
export { default as Linkly } from './linkly';
|
|
7
6
|
export declare const getInitState: (type: string, params?: any) => State;
|
|
@@ -2,12 +2,10 @@ import { EftposEnum } from "./const";
|
|
|
2
2
|
import getPayoInitState from "./payo/const";
|
|
3
3
|
import getTyroInitState from "./tyro/const";
|
|
4
4
|
import getWindcaveInitState from "./windcave/const";
|
|
5
|
-
import getLinklyInitState from "./linkly/const";
|
|
6
5
|
export { getAmonunt } from "./helper";
|
|
7
6
|
export { default as Payo } from "./payo";
|
|
8
7
|
export { default as Windcave } from "./windcave/windcave";
|
|
9
8
|
export { default as Tyro } from "./tyro";
|
|
10
|
-
export { default as Linkly } from "./linkly";
|
|
11
9
|
export var getInitState = function getInitState(type, params) {
|
|
12
10
|
switch (type) {
|
|
13
11
|
case EftposEnum.Payo:
|
|
@@ -16,8 +14,6 @@ export var getInitState = function getInitState(type, params) {
|
|
|
16
14
|
return getWindcaveInitState(params);
|
|
17
15
|
case EftposEnum.Tyro:
|
|
18
16
|
return getTyroInitState(params);
|
|
19
|
-
case EftposEnum.Linkly:
|
|
20
|
-
return getLinklyInitState(params);
|
|
21
17
|
default:
|
|
22
18
|
throw new Error('未知的厂商类型');
|
|
23
19
|
}
|
|
@@ -6,7 +6,7 @@ import './index.less';
|
|
|
6
6
|
* @Author: hongbing.wang
|
|
7
7
|
* @Date: 2024-08-20 14:59
|
|
8
8
|
*/
|
|
9
|
-
declare const Pay: ({ api, onChange: onChangeStatus, className, terminal, net, isMobile, tyroUrl, tyroVersion, formatAmount, client
|
|
9
|
+
declare const Pay: ({ api, onChange: onChangeStatus, className, terminal, net, isMobile, tyroUrl, tyroVersion, formatAmount, client }: PayProps & {
|
|
10
10
|
terminal: {
|
|
11
11
|
network: boolean;
|
|
12
12
|
};
|
|
@@ -10,7 +10,7 @@ import { getPayParams } from "./helper";
|
|
|
10
10
|
import Manual from "./component/manual";
|
|
11
11
|
import Signature from "./component/signature";
|
|
12
12
|
import { StatusEnum, PayRouteEnum, ClientEnum } from "./const";
|
|
13
|
-
import { Payo, Windcave, Tyro
|
|
13
|
+
import { Payo, Windcave, Tyro } from "./manufacturer";
|
|
14
14
|
import { useContextData, useDispatch, updateStatus, backUpProduction, updateComponent, backUpFree, updateState } from "./store";
|
|
15
15
|
import "./index.less";
|
|
16
16
|
|
|
@@ -150,7 +150,7 @@ var Pay = function Pay(_ref) {
|
|
|
150
150
|
}
|
|
151
151
|
};
|
|
152
152
|
}, []);
|
|
153
|
-
console.log('
|
|
153
|
+
// console.log("pay2222 = ",'pay 222' , data.render,data.type)
|
|
154
154
|
return /*#__PURE__*/React.createElement(React.Fragment, null, data.render ? /*#__PURE__*/React.createElement("div", {
|
|
155
155
|
className: "pisell-lowcode__eft-pay-box ".concat(className),
|
|
156
156
|
style: data.type === 'step' ? {} : {
|
|
@@ -178,10 +178,6 @@ var Pay = function Pay(_ref) {
|
|
|
178
178
|
onChange: onChange,
|
|
179
179
|
key: data.key,
|
|
180
180
|
formatAmount: formatAmount
|
|
181
|
-
}) : null, data.eftpos === 'linkly' ? /*#__PURE__*/React.createElement(Linkly, {
|
|
182
|
-
key: data.key,
|
|
183
|
-
api: api,
|
|
184
|
-
onChange: onChange
|
|
185
181
|
}) : null) : null, data.type === PayRouteEnum.Unset && Comm ? /*#__PURE__*/React.createElement(Comm, {
|
|
186
182
|
onChange: onChange,
|
|
187
183
|
api: api,
|
|
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
|
|
|
174
174
|
export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
|
|
175
175
|
type: EActionTypes;
|
|
176
176
|
payload: {
|
|
177
|
-
status: "
|
|
177
|
+
status: "loading" | "warn" | "success" | "fail" | "question";
|
|
178
178
|
};
|
|
179
179
|
};
|
|
180
180
|
/**
|
|
@@ -297,18 +297,18 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
297
297
|
amount?: string | number | undefined;
|
|
298
298
|
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
|
-
eftpos?: "
|
|
300
|
+
eftpos?: "stripe" | "tyro" | "windcave" | "payo" | undefined;
|
|
301
301
|
action?: "amount" | "pay" | "deviceList" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|
|
304
304
|
title?: string | undefined;
|
|
305
305
|
subTitle?: string | undefined;
|
|
306
|
-
type?: "
|
|
306
|
+
type?: "step" | "unset" | undefined;
|
|
307
307
|
render?: boolean | undefined;
|
|
308
308
|
net?: boolean | undefined;
|
|
309
309
|
component?: string | undefined;
|
|
310
310
|
form?: string | undefined;
|
|
311
|
-
status?: "
|
|
311
|
+
status?: "loading" | "warn" | "success" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
|
312
312
|
warn?: string | undefined;
|
|
313
313
|
steps?: {
|
|
314
314
|
/** 用于重置当前步骤 */
|
|
@@ -16,7 +16,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
16
16
|
import React, { useMemo, useState } from 'react';
|
|
17
17
|
import { locales } from '@pisell/utils';
|
|
18
18
|
import { Button, PisellToast } from '@pisell/materials';
|
|
19
|
-
import { useCart, useHolder, useStep, useCheckout, useSales, useCustomer
|
|
19
|
+
import { useCart, useHolder, useStep, useCheckout, useSales, useCustomer } from "../../../../../Sales";
|
|
20
20
|
import { formatValues, getFormParams } from "../../../../../Sales/Checkout/utils";
|
|
21
21
|
import OrderProductModal from "../../OrderProductModal/index";
|
|
22
22
|
import EmptyHolderModal from "../../EmptyHolderModal";
|
|
@@ -24,7 +24,6 @@ import { getProductPrice } from "../../../../../Sales/Event/serve";
|
|
|
24
24
|
import { useRequest } from 'ahooks';
|
|
25
25
|
import useEngineContext from "../../../../../../hooks/useEngineContext";
|
|
26
26
|
import "./index.less";
|
|
27
|
-
import { Toast } from "../../../../../appointmentBooking/utils";
|
|
28
27
|
var ContinueButton = function ContinueButton() {
|
|
29
28
|
var _context$appHelper, _cartData$cartItems;
|
|
30
29
|
var _useSales = useSales(),
|
|
@@ -44,14 +43,10 @@ var ContinueButton = function ContinueButton() {
|
|
|
44
43
|
onCheckout = _useCheckout.onCheckout,
|
|
45
44
|
createBooking = _useCheckout.createBooking,
|
|
46
45
|
onCheckBeforeBooking = _useCheckout.onCheckBeforeBooking,
|
|
47
|
-
checkBeforeBooking = _useCheckout.checkBeforeBooking
|
|
48
|
-
freePay = _useCheckout.freePay;
|
|
46
|
+
checkBeforeBooking = _useCheckout.checkBeforeBooking;
|
|
49
47
|
var _useCustomer = useCustomer(),
|
|
50
48
|
openLoginModal = _useCustomer.openLoginModal,
|
|
51
49
|
isLogin = _useCustomer.isLogin;
|
|
52
|
-
var _useSummary = useSummary(),
|
|
53
|
-
deposit = _useSummary.deposit,
|
|
54
|
-
isAgreeDepositPolicy = _useSummary.isAgreeDepositPolicy;
|
|
55
50
|
|
|
56
51
|
// 下单之前是否检测失败
|
|
57
52
|
var _useState = useState(false),
|
|
@@ -389,48 +384,41 @@ var ContinueButton = function ContinueButton() {
|
|
|
389
384
|
*/
|
|
390
385
|
var handleContinue = /*#__PURE__*/function () {
|
|
391
386
|
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
392
|
-
var
|
|
387
|
+
var value, checkRes, emptyHolders;
|
|
393
388
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
394
389
|
while (1) switch (_context6.prev = _context6.next) {
|
|
395
390
|
case 0:
|
|
396
391
|
if (!isLastStep) {
|
|
397
|
-
_context6.next =
|
|
398
|
-
break;
|
|
399
|
-
}
|
|
400
|
-
value = formatValues(data); // 如果未同意定金政策,则提示
|
|
401
|
-
if (!(deposit !== null && deposit !== void 0 && deposit.hasDeposit && (deposit === null || deposit === void 0 || (_deposit$protocols = deposit.protocols) === null || _deposit$protocols === void 0 ? void 0 : _deposit$protocols.length) > 0 && !isAgreeDepositPolicy)) {
|
|
402
|
-
_context6.next = 5;
|
|
392
|
+
_context6.next = 14;
|
|
403
393
|
break;
|
|
404
394
|
}
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
case 5:
|
|
408
|
-
_context6.next = 7;
|
|
395
|
+
value = formatValues(data); // 检测商品是否可以下单
|
|
396
|
+
_context6.next = 4;
|
|
409
397
|
return onCheckBeforeBooking(value);
|
|
410
|
-
case
|
|
398
|
+
case 4:
|
|
411
399
|
checkRes = _context6.sent;
|
|
412
400
|
if (!((checkRes === null || checkRes === void 0 ? void 0 : checkRes.result) === false)) {
|
|
413
|
-
_context6.next =
|
|
401
|
+
_context6.next = 9;
|
|
414
402
|
break;
|
|
415
403
|
}
|
|
416
404
|
setCheckedNumber(checkRes === null || checkRes === void 0 ? void 0 : checkRes.num);
|
|
417
405
|
setOpenCheckout(true);
|
|
418
406
|
return _context6.abrupt("return");
|
|
419
|
-
case
|
|
407
|
+
case 9:
|
|
420
408
|
// 验证holder是否为空
|
|
421
409
|
emptyHolders = getWithoutCartItemsHolderNames();
|
|
422
410
|
if (!((emptyHolders === null || emptyHolders === void 0 ? void 0 : emptyHolders.length) > 0)) {
|
|
423
|
-
_context6.next =
|
|
411
|
+
_context6.next = 12;
|
|
424
412
|
break;
|
|
425
413
|
}
|
|
426
414
|
return _context6.abrupt("return", setOpenEmptyHolder(true));
|
|
427
|
-
case
|
|
415
|
+
case 12:
|
|
428
416
|
// 关闭购物车弹窗
|
|
429
417
|
onCloseCart();
|
|
430
418
|
return _context6.abrupt("return", handleCheckout());
|
|
431
|
-
case
|
|
419
|
+
case 14:
|
|
432
420
|
if (isLogin()) {
|
|
433
|
-
_context6.next =
|
|
421
|
+
_context6.next = 17;
|
|
434
422
|
break;
|
|
435
423
|
}
|
|
436
424
|
onCloseCart();
|
|
@@ -460,9 +448,9 @@ var ContinueButton = function ContinueButton() {
|
|
|
460
448
|
return callback;
|
|
461
449
|
}()
|
|
462
450
|
}));
|
|
463
|
-
case
|
|
451
|
+
case 17:
|
|
464
452
|
handleHolder();
|
|
465
|
-
case
|
|
453
|
+
case 18:
|
|
466
454
|
case "end":
|
|
467
455
|
return _context6.stop();
|
|
468
456
|
}
|
|
@@ -499,8 +487,8 @@ var ContinueButton = function ContinueButton() {
|
|
|
499
487
|
*/
|
|
500
488
|
var confirmLoading = useMemo(function () {
|
|
501
489
|
if (!isLastStep) return false;
|
|
502
|
-
return (createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading) || (checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading)
|
|
503
|
-
}, [isLastStep, createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading, checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading
|
|
490
|
+
return (createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading) || (checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading);
|
|
491
|
+
}, [isLastStep, createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading, checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading]);
|
|
504
492
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
505
493
|
disabled: !(cartData !== null && cartData !== void 0 && (_cartData$cartItems = cartData.cartItems) !== null && _cartData$cartItems !== void 0 && _cartData$cartItems.length),
|
|
506
494
|
size: "large",
|
|
@@ -5,25 +5,21 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { locales } from '@pisell/utils';
|
|
7
7
|
import { PisellText } from '@pisell/materials';
|
|
8
|
-
import {
|
|
8
|
+
import { useSummary } from "../../../../../Sales";
|
|
9
9
|
import useEngineContext from "../../../../../../hooks/useEngineContext";
|
|
10
10
|
import "./index.less";
|
|
11
11
|
import classNames from 'classnames';
|
|
12
12
|
var Total = function Total(_ref) {
|
|
13
|
-
var _context$appHelper, _context$appHelper$ge,
|
|
13
|
+
var _context$appHelper, _context$appHelper$ge, _context$appHelper2, _context$appHelper2$g;
|
|
14
14
|
var className = _ref.className,
|
|
15
15
|
isFooter = _ref.isFooter;
|
|
16
|
-
var _useCart = useCart(),
|
|
17
|
-
cartData = _useCart.cartData;
|
|
18
16
|
var _useSummary = useSummary(),
|
|
19
17
|
taxTitle = _useSummary.taxTitle,
|
|
20
18
|
totalTaxFee = _useSummary.totalTaxFee,
|
|
21
19
|
isPriceIncludeTax = _useSummary.isPriceIncludeTax,
|
|
22
|
-
total = _useSummary.total
|
|
23
|
-
deposit = _useSummary.deposit;
|
|
20
|
+
total = _useSummary.total;
|
|
24
21
|
var context = useEngineContext();
|
|
25
|
-
console.log(taxTitle, isPriceIncludeTax, totalTaxFee, total, 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$ge = _context$appHelper.getSymbolic) === null || _context$appHelper$ge === void 0 ? void 0 : _context$appHelper$ge.call(_context$appHelper),
|
|
26
|
-
var showDeposit = (cartData === null || cartData === void 0 || (_cartData$cartItems = cartData.cartItems) === null || _cartData$cartItems === void 0 ? void 0 : _cartData$cartItems.length) > 0 && (deposit === null || deposit === void 0 ? void 0 : deposit.hasDeposit);
|
|
22
|
+
console.log(taxTitle, isPriceIncludeTax, totalTaxFee, total, 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$ge = _context$appHelper.getSymbolic) === null || _context$appHelper$ge === void 0 ? void 0 : _context$appHelper$ge.call(_context$appHelper), 'wh97978');
|
|
27
23
|
return /*#__PURE__*/React.createElement("div", {
|
|
28
24
|
className: "event-total-wrap ".concat(className)
|
|
29
25
|
}, !isPriceIncludeTax && Number(totalTaxFee) > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -35,8 +31,8 @@ var Total = function Total(_ref) {
|
|
|
35
31
|
className: classNames('event-total', _defineProperty({}, ['total-gst-wrap'], !isPriceIncludeTax && Number(totalTaxFee) > 0))
|
|
36
32
|
}, /*#__PURE__*/React.createElement("div", {
|
|
37
33
|
className: "left"
|
|
38
|
-
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null,
|
|
39
|
-
value:
|
|
34
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.event.total'), isFooter ? ': ' : ''), isFooter ? /*#__PURE__*/React.createElement(PisellText.Amount, {
|
|
35
|
+
value: total,
|
|
40
36
|
showCurrencySymbol: true,
|
|
41
37
|
className: "event-amount"
|
|
42
38
|
}) : null), isPriceIncludeTax && Number(totalTaxFee) > 0 ? /*#__PURE__*/React.createElement("span", {
|
|
@@ -5,10 +5,8 @@ import { useCart, useHolder, useSummary, useStep } from "../../../../../Sales";
|
|
|
5
5
|
import SelectHolderModal from "../../SelectHolderModal";
|
|
6
6
|
import ContinueButton from "../ContinueButton";
|
|
7
7
|
import Total from "./Total";
|
|
8
|
-
import Deposit from "../Deposit";
|
|
9
8
|
import "./index.less";
|
|
10
9
|
var CartItem = function CartItem() {
|
|
11
|
-
var _cartData$cartItems;
|
|
12
10
|
var _useHolder = useHolder(),
|
|
13
11
|
open = _useHolder.open,
|
|
14
12
|
holderData = _useHolder.holderData,
|
|
@@ -19,7 +17,7 @@ var CartItem = function CartItem() {
|
|
|
19
17
|
cartData = _useCart.cartData,
|
|
20
18
|
addNoteToCartItem = _useCart.addNoteToCartItem;
|
|
21
19
|
var _useSummary = useSummary(),
|
|
22
|
-
|
|
20
|
+
subtotal = _useSummary.subtotal;
|
|
23
21
|
var _useStep = useStep(),
|
|
24
22
|
isLastStep = _useStep.isLastStep;
|
|
25
23
|
var handleClickCard = function handleClickCard(e, type, key) {
|
|
@@ -58,7 +56,7 @@ var CartItem = function CartItem() {
|
|
|
58
56
|
}
|
|
59
57
|
})), /*#__PURE__*/React.createElement("div", {
|
|
60
58
|
className: "event-footer"
|
|
61
|
-
}, /*#__PURE__*/React.createElement(Total, null),
|
|
59
|
+
}, /*#__PURE__*/React.createElement(Total, null), /*#__PURE__*/React.createElement(ContinueButton, null))), /*#__PURE__*/React.createElement(SelectHolderModal, {
|
|
62
60
|
open: open
|
|
63
61
|
}));
|
|
64
62
|
};
|
|
@@ -7,7 +7,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
7
7
|
import React, { useEffect, useState } from 'react';
|
|
8
8
|
import { isMobile, locales } from '@pisell/utils';
|
|
9
9
|
import { Skeleton } from 'antd';
|
|
10
|
-
import { useEvent, useSales, useEventDetail, useStep
|
|
10
|
+
import { useEvent, useSales, useEventDetail, useStep } from "../../../../Sales";
|
|
11
11
|
import BookingServiceList from "../../bookingServiceList";
|
|
12
12
|
import BookingDetailModal from "../../bookingDetailModal";
|
|
13
13
|
import "./index.less";
|
|
@@ -31,8 +31,6 @@ var Event = function Event() {
|
|
|
31
31
|
lists = _useState2[0],
|
|
32
32
|
setLists = _useState2[1];
|
|
33
33
|
var customer = useLoginUser();
|
|
34
|
-
var _useCustomer = useCustomer(),
|
|
35
|
-
appUtils = _useCustomer.appUtils;
|
|
36
34
|
useEffect(function () {
|
|
37
35
|
var _data$stepData;
|
|
38
36
|
var eventList = (eventData === null || eventData === void 0 ? void 0 : eventData.eventList) || [];
|
|
@@ -47,23 +45,16 @@ var Event = function Event() {
|
|
|
47
45
|
}
|
|
48
46
|
}, [eventData === null || eventData === void 0 ? void 0 : eventData.eventList]);
|
|
49
47
|
useEffect(function () {
|
|
50
|
-
var _data$resourceData
|
|
48
|
+
var _data$resourceData;
|
|
51
49
|
var id = data === null || data === void 0 || (_data$resourceData = data.resourceData) === null || _data$resourceData === void 0 || (_data$resourceData = _data$resourceData.currentResourceItem) === null || _data$resourceData === void 0 ? void 0 : _data$resourceData.id;
|
|
52
50
|
if (!id) return;
|
|
53
|
-
|
|
54
|
-
var query = history === null || history === void 0 || (_history$location = history.location) === null || _history$location === void 0 ? void 0 : _history$location.query;
|
|
55
|
-
var params = {
|
|
51
|
+
getEventList.run({
|
|
56
52
|
event_item_resource_id: id,
|
|
57
53
|
skip: 1,
|
|
58
54
|
num: 100,
|
|
59
55
|
customer_id: customer === null || customer === void 0 ? void 0 : customer.id,
|
|
60
56
|
open_quotation: 1
|
|
61
|
-
};
|
|
62
|
-
if (query !== null && query !== void 0 && query.ids) {
|
|
63
|
-
var _query$ids;
|
|
64
|
-
params.ids = query === null || query === void 0 || (_query$ids = query.ids) === null || _query$ids === void 0 ? void 0 : _query$ids.split(',');
|
|
65
|
-
}
|
|
66
|
-
getEventList.run(params);
|
|
57
|
+
});
|
|
67
58
|
}, [data === null || data === void 0 || (_data$resourceData2 = data.resourceData) === null || _data$resourceData2 === void 0 || (_data$resourceData2 = _data$resourceData2.currentResourceItem) === null || _data$resourceData2 === void 0 ? void 0 : _data$resourceData2.id, customer === null || customer === void 0 ? void 0 : customer.id]);
|
|
68
59
|
|
|
69
60
|
/**
|