@pisell/private-materials 3.4.78 → 3.4.80
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 +8 -8
- 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/Date/state.js +3 -1
- package/es/components/appointmentBooking/locales.d.ts +240 -0
- package/es/components/appointmentBooking/locales.js +276 -0
- package/es/components/authentication/admin/AuthMethods/locales.d.ts +164 -0
- package/es/components/authentication/admin/AuthMethods/locales.js +164 -0
- package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/index.js +27 -9
- package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/locales.d.ts +54 -0
- package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/locales.js +54 -0
- package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/types.d.ts +2 -0
- package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/index.js +2 -0
- package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/locales.d.ts +46 -0
- package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/locales.js +46 -0
- package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/types.d.ts +2 -0
- package/es/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.js +17 -9
- package/es/components/authentication/admin/ChannelAuthSetting/PageSetting/locales.d.ts +16 -0
- package/es/components/authentication/admin/ChannelAuthSetting/PageSetting/locales.js +16 -0
- package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/index.js +10 -2
- package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/locales.d.ts +42 -0
- package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/locales.js +42 -0
- package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/types.d.ts +2 -0
- package/es/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.js +17 -9
- package/es/components/authentication/admin/ChannelAuthSetting/locales.d.ts +24 -0
- package/es/components/authentication/admin/ChannelAuthSetting/locales.js +24 -0
- package/es/components/authentication/admin/CustomerAuth/locales.d.ts +42 -0
- package/es/components/authentication/admin/CustomerAuth/locales.js +42 -0
- package/es/components/authentication/admin/CustomerOAuthConfig/locales.d.ts +70 -0
- package/es/components/authentication/admin/CustomerOAuthConfig/locales.js +70 -0
- package/es/components/authentication/admin/DeviceAuth/locales.d.ts +36 -0
- package/es/components/authentication/admin/DeviceAuth/locales.js +36 -0
- package/es/components/authentication/admin/OAuthConfig/locales.d.ts +58 -0
- package/es/components/authentication/admin/OAuthConfig/locales.js +58 -0
- package/es/components/authentication/admin/OrgAdminAuth/locales.d.ts +34 -0
- package/es/components/authentication/admin/OrgAdminAuth/locales.js +34 -0
- package/es/components/authentication/admin/POSOperatorAuth/locales.d.ts +30 -0
- package/es/components/authentication/admin/POSOperatorAuth/locales.js +30 -0
- package/es/components/authentication/admin/SaaSAdminAuth/locales.d.ts +34 -0
- package/es/components/authentication/admin/SaaSAdminAuth/locales.js +34 -0
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/editBookingModal/locales.d.ts +12 -0
- package/es/components/booking/editBookingModal/locales.js +12 -0
- package/es/components/booking/editBookingModal/mock.d.ts +186 -2
- package/es/components/booking/editBookingModal/mock.js +22 -0
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/mock.d.ts +2 -0
- package/es/components/booking/info2/service/addService/mock.js +4 -0
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/locales.d.ts +628 -0
- package/es/components/booking/locales.js +722 -0
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/ecocup/components/AddCustomerModal/index.js +3 -3
- package/es/components/ecocup/components/CupInfoCard/index.d.ts +3 -1
- package/es/components/ecocup/components/CupInfoCard/index.js +4 -2
- package/es/components/ecocup/components/CupStatusModal/hooks.d.ts +32 -1
- package/es/components/ecocup/components/CupStatusModal/hooks.js +109 -1
- package/es/components/ecocup/components/CupStatusModal/index.js +164 -30
- package/es/components/ecocup/components/CupStatusModal/index.less +48 -10
- package/es/components/ecocup/components/CustomerAndCupModal/index.js +1 -1
- package/es/components/ecocup/components/CustomerCard/index.d.ts +3 -1
- package/es/components/ecocup/components/CustomerCard/index.js +9 -6
- package/es/components/ecocup/components/PageHeader/index.d.ts +2 -0
- package/es/components/ecocup/components/PageHeader/index.js +15 -5
- package/es/components/ecocup/components/PageHeader/index.less +16 -4
- package/es/components/ecocup/components/SearchBar/index.d.ts +1 -0
- package/es/components/ecocup/components/SearchBar/index.js +33 -3
- package/es/components/ecocup/components/SettingModal/const.d.ts +6 -0
- package/es/components/ecocup/components/SettingModal/const.js +17 -0
- package/es/components/ecocup/components/SettingModal/index.d.ts +9 -0
- package/es/components/ecocup/components/SettingModal/index.js +253 -0
- package/es/components/ecocup/components/SettingModal/index.less +9 -0
- package/es/components/ecocup/cupList/const.d.ts +8 -1
- package/es/components/ecocup/cupList/const.js +14 -1
- package/es/components/ecocup/cupList/hooks/index.d.ts +2 -2
- package/es/components/ecocup/cupList/hooks/index.js +2 -2
- package/es/components/ecocup/cupList/hooks/useColumns.d.ts +2 -1
- package/es/components/ecocup/cupList/hooks/useColumns.js +4 -6
- package/es/components/ecocup/cupList/hooks/useCupApi.d.ts +12 -3
- package/es/components/ecocup/cupList/hooks/useCupApi.js +148 -8
- package/es/components/ecocup/cupList/hooks/useSummary.js +9 -7
- package/es/components/ecocup/cupList/index.js +60 -12
- package/es/components/ecocup/cupList/index.less +62 -16
- package/es/components/ecocup/cupProject/const.js +8 -2
- package/es/components/ecocup/cupProject/index.js +10 -1
- package/es/components/ecocup/hooks.d.ts +8 -0
- package/es/components/ecocup/hooks.js +18 -1
- package/es/components/ecocup/locales.d.ts +316 -2
- package/es/components/ecocup/locales.js +352 -25
- package/es/components/ecocup/utils/download.d.ts +7 -0
- package/es/components/ecocup/utils/download.js +34 -0
- package/es/components/ecocup/utils/index.d.ts +2 -0
- package/es/components/ecocup/utils/index.js +2 -0
- package/es/components/eftpos/hooks.d.ts +1 -0
- package/es/components/eftpos/locales.d.ts +64 -0
- package/es/components/eftpos/locales.js +80 -0
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/locales.d.ts +242 -0
- package/es/components/eftposPay/locales.js +326 -0
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Voucher/components/locales.d.ts +22 -0
- package/es/components/eventBooking/components/Voucher/components/locales.js +22 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/es/components/eventBooking/locales.d.ts +162 -0
- package/es/components/eventBooking/locales.js +186 -0
- package/es/components/kioskSkuDetail/locales.d.ts +16 -0
- package/es/components/kioskSkuDetail/locales.js +16 -0
- package/es/components/login/locales.d.ts +14 -0
- package/es/components/login/locales.js +14 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/es/components/pay/toC/locales.d.ts +204 -0
- package/es/components/pay/toC/locales.js +244 -0
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/pay/toC/serve.d.ts +2 -0
- package/es/components/pinModal/locales.d.ts +16 -0
- package/es/components/pinModal/locales.js +16 -0
- package/es/components/pinVerifyModal/locales.d.ts +14 -0
- package/es/components/pinVerifyModal/locales.js +14 -0
- package/es/components/pisellSelectCustomerModal/locales.d.ts +52 -0
- package/es/components/pisellSelectCustomerModal/locales.js +52 -0
- package/es/components/productExtension/locales.d.ts +30 -0
- package/es/components/productExtension/locales.js +30 -0
- package/es/components/productSelect/components/pisellPriceText/index.js +8 -4
- package/es/components/productSelect/locales.d.ts +20 -0
- package/es/components/productSelect/locales.js +23 -3
- package/es/components/ruleSetting/locales.d.ts +30 -0
- package/es/components/ruleSetting/locales.js +30 -0
- package/es/components/schedules/locales.d.ts +56 -0
- package/es/components/schedules/locales.js +56 -0
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/shoppingCart/locales.d.ts +20 -0
- package/es/components/shoppingCart/locales.js +24 -0
- package/es/components/stepController/locales.d.ts +16 -0
- package/es/components/stepController/locales.js +20 -0
- package/es/components/subTotal/locales.d.ts +26 -0
- package/es/components/subTotal/locales.js +26 -0
- package/es/components/systemSettings/registry/components/DataSourceTreeSelect/index.d.ts +59 -0
- package/es/components/systemSettings/registry/components/DataSourceTreeSelect/index.js +390 -0
- package/es/components/systemSettings/registry/components/DataSourceTreeSelect/serve.d.ts +70 -0
- package/es/components/systemSettings/registry/components/DataSourceTreeSelect/serve.js +367 -0
- package/es/components/systemSettings/registry/components/ItemModal.js +169 -35
- package/es/components/systemSettings/registry/components/OptionDataSource/OptionTable.d.ts +8 -0
- package/es/components/systemSettings/registry/components/OptionDataSource/OptionTable.js +163 -0
- package/es/components/systemSettings/registry/components/OptionDataSource/index.d.ts +10 -0
- package/es/components/systemSettings/registry/components/OptionDataSource/index.js +127 -0
- package/es/components/systemSettings/registry/components/OptionDataSource/index.less +37 -0
- package/es/components/systemSettings/registry/index.js +20 -16
- package/es/components/systemSettings/registry/index.less +6 -7
- package/es/components/systemSettings/registry/locales.d.ts +253 -0
- package/es/components/systemSettings/registry/locales.js +262 -3
- package/es/components/systemSettings/registry/services.d.ts +20 -0
- package/es/components/systemSettings/registry/types.d.ts +15 -2
- package/es/components/taxSelect/locales.d.ts +14 -0
- package/es/components/taxSelect/locales.js +14 -0
- package/es/components/ticketBooking/locales.d.ts +130 -0
- package/es/components/ticketBooking/locales.js +156 -0
- package/es/components/ticketBooking/utils/formatTime.d.ts +2 -0
- package/es/components/ticketBooking/utils/formatTime.js +8 -2
- package/es/components/wallet/utils.d.ts +1 -1
- package/es/components/walletList/index.js +10 -0
- package/es/components/walletList/locales.d.ts +16 -0
- package/es/components/walletList/locales.js +16 -0
- package/es/components/walletList/types/index.d.ts +2 -0
- package/es/hooks/usePaymentLogger.d.ts +1 -0
- package/es/plus/clientCard/locales.d.ts +10 -0
- package/es/plus/clientCard/locales.js +10 -0
- package/es/plus/clinetSearch/locales.d.ts +70 -0
- package/es/plus/clinetSearch/locales.js +70 -0
- package/es/plus/contactInfo/locales.d.ts +8 -0
- package/es/plus/contactInfo/locales.js +8 -0
- package/es/plus/contactInfoModal/locales.d.ts +42 -0
- package/es/plus/contactInfoModal/locales.js +42 -0
- package/es/plus/orderList/locales.d.ts +246 -0
- package/es/plus/orderList/locales.js +274 -0
- package/es/plus/productSelect/components/pisellPriceText/index.js +8 -4
- package/es/plus/productSelect/locales.d.ts +20 -0
- package/es/plus/productSelect/locales.js +23 -3
- package/es/plus/saasAttendance/locales.d.ts +210 -0
- package/es/plus/saasAttendance/locales.js +234 -0
- package/es/plus/saasAttendance/settings/components/MapField.js +4 -2
- package/es/plus/saasAttendance/settings/types.d.ts +2 -0
- package/es/plus/saasCreateOrganization/locales.d.ts +8 -0
- package/es/plus/saasCreateOrganization/locales.js +8 -0
- package/es/plus/saasLogin/locales.d.ts +32 -0
- package/es/plus/saasLogin/locales.js +32 -0
- package/es/plus/saasRegister/locales.d.ts +76 -0
- package/es/plus/saasRegister/locales.js +76 -0
- package/es/plus/saasRole/locales.d.ts +126 -0
- package/es/plus/saasRole/locales.js +126 -0
- package/es/plus/saasRole/types.d.ts +2 -0
- package/es/plus/saasTeamMembers/locales.d.ts +216 -0
- package/es/plus/saasTeamMembers/locales.js +216 -0
- package/es/plus/saasTeamMembers/type.d.ts +2 -0
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/es/plus/selectHolder/locales.d.ts +9 -1
- package/es/plus/selectHolder/locales.js +17 -5
- package/es/plus/skuOptionsSelection/components/NormalCard/index.js +3 -1
- package/es/plus/skuOptionsSelection/components/OptionsCard/index.js +3 -2
- package/es/plus/skuOptionsSelection/locales.d.ts +20 -0
- package/es/plus/skuOptionsSelection/locales.js +20 -0
- package/es/plus/skuOptionsSelection/store/store.js +2 -1
- package/es/plus/skuOptionsSelection/types.d.ts +14 -0
- package/es/plus/skuOptionsSelection/types.js +4 -0
- package/es/plus/skuOptionsSelection/utils/transformBundleGroup.js +10 -1
- package/es/plus/skuOptionsSelection/utils/transformOptionGroup.js +10 -1
- package/es/plus/skuOptionsSelection/utils/transformVariantGroup.js +8 -2
- package/es/plus/walletEditor/components/sortableWalletPassTypes/index.d.ts +2 -0
- package/es/plus/walletEditor/components/sortableWalletPassTypes/index.js +12 -4
- package/es/plus/walletEditor/locales.d.ts +88 -0
- package/es/plus/walletEditor/locales.js +100 -0
- package/es/plus/walletEditor/types.d.ts +2 -0
- package/es/plus/walletPassGallery/locales.d.ts +188 -0
- package/es/plus/walletPassGallery/locales.js +192 -0
- package/es/plus/walletPassGallery/utils.d.ts +1 -1
- package/es/pro/Cards/components/SKUCard/index.d.ts +1 -56
- package/es/pro/Cards/components/SKUCard/index.js +39 -18
- package/es/pro/Cards/components/SKUCard/index.less +21 -0
- package/es/pro/Cards/components/SKUCard/locales.d.ts +12 -0
- package/es/pro/Cards/components/SKUCard/locales.js +11 -0
- package/es/pro/Cards/components/SKUCard/types.d.ts +68 -0
- package/es/pro/Cards/components/SKUCard/types.js +1 -0
- package/es/pro/Login2.0/locales.d.ts +360 -0
- package/es/pro/Login2.0/locales.js +360 -0
- package/es/pro/Login2.0/shared/types.d.ts +2 -0
- package/es/pro/Selector/locales.d.ts +22 -0
- package/es/pro/Selector/locales.js +58 -0
- package/es/pro/comprehensiveSearch/components/searchSection/locales.d.ts +8 -0
- package/es/pro/comprehensiveSearch/components/searchSection/locales.js +8 -0
- package/es/pro/comprehensiveSearch/locales.d.ts +8 -0
- package/es/pro/comprehensiveSearch/locales.js +8 -0
- package/es/pro/keyboards/locales.d.ts +14 -0
- package/es/pro/keyboards/locales.js +22 -0
- package/es/pro/numberKeyboard/locales.d.ts +6 -0
- package/es/pro/numberKeyboard/locales.js +6 -0
- package/es/pro/pisellPhoneKeyboard/locales.d.ts +6 -0
- package/es/pro/pisellPhoneKeyboard/locales.js +6 -0
- package/lib/components/appointmentBooking/components/Date/state.js +3 -1
- package/lib/components/appointmentBooking/locales.d.ts +240 -0
- package/lib/components/appointmentBooking/locales.js +240 -0
- package/lib/components/authentication/admin/AuthMethods/locales.d.ts +164 -0
- package/lib/components/authentication/admin/AuthMethods/locales.js +164 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/index.js +17 -9
- package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/locales.d.ts +54 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/locales.js +54 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/types.d.ts +2 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/index.js +2 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/locales.d.ts +46 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/locales.js +46 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/types.d.ts +2 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.js +14 -6
- package/lib/components/authentication/admin/ChannelAuthSetting/PageSetting/locales.d.ts +16 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/PageSetting/locales.js +16 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/index.js +10 -2
- package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/locales.d.ts +42 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/locales.js +42 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/types.d.ts +2 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.js +14 -6
- package/lib/components/authentication/admin/ChannelAuthSetting/locales.d.ts +24 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/locales.js +24 -0
- package/lib/components/authentication/admin/CustomerAuth/locales.d.ts +42 -0
- package/lib/components/authentication/admin/CustomerAuth/locales.js +42 -0
- package/lib/components/authentication/admin/CustomerOAuthConfig/locales.d.ts +70 -0
- package/lib/components/authentication/admin/CustomerOAuthConfig/locales.js +70 -0
- package/lib/components/authentication/admin/DeviceAuth/locales.d.ts +36 -0
- package/lib/components/authentication/admin/DeviceAuth/locales.js +36 -0
- package/lib/components/authentication/admin/OAuthConfig/locales.d.ts +58 -0
- package/lib/components/authentication/admin/OAuthConfig/locales.js +58 -0
- package/lib/components/authentication/admin/OrgAdminAuth/locales.d.ts +34 -0
- package/lib/components/authentication/admin/OrgAdminAuth/locales.js +34 -0
- package/lib/components/authentication/admin/POSOperatorAuth/locales.d.ts +30 -0
- package/lib/components/authentication/admin/POSOperatorAuth/locales.js +30 -0
- package/lib/components/authentication/admin/SaaSAdminAuth/locales.d.ts +34 -0
- package/lib/components/authentication/admin/SaaSAdminAuth/locales.js +34 -0
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/editBookingModal/locales.d.ts +12 -0
- package/lib/components/booking/editBookingModal/locales.js +12 -0
- package/lib/components/booking/editBookingModal/mock.d.ts +186 -2
- package/lib/components/booking/editBookingModal/mock.js +22 -0
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/mock.d.ts +2 -0
- package/lib/components/booking/info2/service/addService/mock.js +4 -0
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/locales.d.ts +628 -0
- package/lib/components/booking/locales.js +680 -0
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/ecocup/components/AddCustomerModal/index.js +2 -2
- package/lib/components/ecocup/components/CupInfoCard/index.d.ts +3 -1
- package/lib/components/ecocup/components/CupInfoCard/index.js +2 -2
- package/lib/components/ecocup/components/CupStatusModal/hooks.d.ts +32 -1
- package/lib/components/ecocup/components/CupStatusModal/hooks.js +62 -2
- package/lib/components/ecocup/components/CupStatusModal/index.js +103 -22
- package/lib/components/ecocup/components/CupStatusModal/index.less +48 -10
- package/lib/components/ecocup/components/CustomerAndCupModal/index.js +1 -1
- package/lib/components/ecocup/components/CustomerCard/index.d.ts +3 -1
- package/lib/components/ecocup/components/CustomerCard/index.js +13 -3
- package/lib/components/ecocup/components/PageHeader/index.d.ts +2 -0
- package/lib/components/ecocup/components/PageHeader/index.js +10 -3
- package/lib/components/ecocup/components/PageHeader/index.less +16 -4
- package/lib/components/ecocup/components/SearchBar/index.d.ts +1 -0
- package/lib/components/ecocup/components/SearchBar/index.js +15 -2
- package/lib/components/ecocup/components/SettingModal/const.d.ts +6 -0
- package/lib/components/ecocup/components/SettingModal/const.js +48 -0
- package/lib/components/ecocup/components/SettingModal/index.d.ts +9 -0
- package/lib/components/ecocup/components/SettingModal/index.js +199 -0
- package/lib/components/ecocup/components/SettingModal/index.less +9 -0
- package/lib/components/ecocup/cupList/const.d.ts +8 -1
- package/lib/components/ecocup/cupList/const.js +18 -0
- package/lib/components/ecocup/cupList/hooks/index.d.ts +2 -2
- package/lib/components/ecocup/cupList/hooks/index.js +4 -0
- package/lib/components/ecocup/cupList/hooks/useColumns.d.ts +2 -1
- package/lib/components/ecocup/cupList/hooks/useColumns.js +2 -4
- package/lib/components/ecocup/cupList/hooks/useCupApi.d.ts +12 -3
- package/lib/components/ecocup/cupList/hooks/useCupApi.js +123 -8
- package/lib/components/ecocup/cupList/hooks/useSummary.js +22 -14
- package/lib/components/ecocup/cupList/index.js +70 -16
- package/lib/components/ecocup/cupList/index.less +62 -16
- package/lib/components/ecocup/cupProject/const.js +8 -1
- package/lib/components/ecocup/cupProject/index.js +10 -1
- package/lib/components/ecocup/hooks.d.ts +8 -0
- package/lib/components/ecocup/hooks.js +15 -1
- package/lib/components/ecocup/locales.d.ts +316 -2
- package/lib/components/ecocup/locales.js +342 -25
- package/lib/components/ecocup/utils/download.d.ts +7 -0
- package/lib/components/ecocup/utils/download.js +47 -0
- package/lib/components/ecocup/utils/index.d.ts +2 -0
- package/lib/components/ecocup/utils/index.js +42 -0
- package/lib/components/eftpos/hooks.d.ts +1 -0
- package/lib/components/eftpos/locales.d.ts +64 -0
- package/lib/components/eftpos/locales.js +76 -0
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/locales.d.ts +242 -0
- package/lib/components/eftposPay/locales.js +250 -0
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Voucher/components/locales.d.ts +22 -0
- package/lib/components/eventBooking/components/Voucher/components/locales.js +22 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/lib/components/eventBooking/locales.d.ts +162 -0
- package/lib/components/eventBooking/locales.js +162 -0
- package/lib/components/kioskSkuDetail/locales.d.ts +16 -0
- package/lib/components/kioskSkuDetail/locales.js +16 -0
- package/lib/components/login/locales.d.ts +14 -0
- package/lib/components/login/locales.js +14 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/lib/components/pay/toC/locales.d.ts +204 -0
- package/lib/components/pay/toC/locales.js +204 -0
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/pay/toC/serve.d.ts +2 -0
- package/lib/components/pinModal/locales.d.ts +16 -0
- package/lib/components/pinModal/locales.js +16 -0
- package/lib/components/pinVerifyModal/locales.d.ts +14 -0
- package/lib/components/pinVerifyModal/locales.js +14 -0
- package/lib/components/pisellSelectCustomerModal/locales.d.ts +52 -0
- package/lib/components/pisellSelectCustomerModal/locales.js +52 -0
- package/lib/components/productExtension/locales.d.ts +30 -0
- package/lib/components/productExtension/locales.js +30 -0
- package/lib/components/productSelect/components/pisellPriceText/index.js +6 -4
- package/lib/components/productSelect/locales.d.ts +20 -0
- package/lib/components/productSelect/locales.js +23 -3
- package/lib/components/ruleSetting/locales.d.ts +30 -0
- package/lib/components/ruleSetting/locales.js +30 -0
- package/lib/components/schedules/locales.d.ts +56 -0
- package/lib/components/schedules/locales.js +56 -0
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/shoppingCart/locales.d.ts +20 -0
- package/lib/components/shoppingCart/locales.js +20 -0
- package/lib/components/stepController/locales.d.ts +16 -0
- package/lib/components/stepController/locales.js +16 -0
- package/lib/components/subTotal/locales.d.ts +26 -0
- package/lib/components/subTotal/locales.js +26 -0
- package/lib/components/systemSettings/registry/components/DataSourceTreeSelect/index.d.ts +59 -0
- package/lib/components/systemSettings/registry/components/DataSourceTreeSelect/index.js +228 -0
- package/lib/components/systemSettings/registry/components/DataSourceTreeSelect/serve.d.ts +70 -0
- package/lib/components/systemSettings/registry/components/DataSourceTreeSelect/serve.js +195 -0
- package/lib/components/systemSettings/registry/components/ItemModal.js +294 -225
- package/lib/components/systemSettings/registry/components/OptionDataSource/OptionTable.d.ts +8 -0
- package/lib/components/systemSettings/registry/components/OptionDataSource/OptionTable.js +166 -0
- package/lib/components/systemSettings/registry/components/OptionDataSource/index.d.ts +10 -0
- package/lib/components/systemSettings/registry/components/OptionDataSource/index.js +210 -0
- package/lib/components/systemSettings/registry/components/OptionDataSource/index.less +37 -0
- package/lib/components/systemSettings/registry/index.js +20 -16
- package/lib/components/systemSettings/registry/index.less +6 -7
- package/lib/components/systemSettings/registry/locales.d.ts +253 -0
- package/lib/components/systemSettings/registry/locales.js +262 -3
- package/lib/components/systemSettings/registry/services.d.ts +20 -0
- package/lib/components/systemSettings/registry/types.d.ts +15 -2
- package/lib/components/taxSelect/locales.d.ts +14 -0
- package/lib/components/taxSelect/locales.js +14 -0
- package/lib/components/ticketBooking/locales.d.ts +130 -0
- package/lib/components/ticketBooking/locales.js +136 -0
- package/lib/components/ticketBooking/utils/formatTime.d.ts +2 -0
- package/lib/components/ticketBooking/utils/formatTime.js +8 -2
- package/lib/components/wallet/utils.d.ts +1 -1
- package/lib/components/walletList/index.js +10 -0
- package/lib/components/walletList/locales.d.ts +16 -0
- package/lib/components/walletList/locales.js +16 -0
- package/lib/components/walletList/types/index.d.ts +2 -0
- package/lib/hooks/usePaymentLogger.d.ts +1 -0
- package/lib/plus/clientCard/locales.d.ts +10 -0
- package/lib/plus/clientCard/locales.js +10 -0
- package/lib/plus/clinetSearch/locales.d.ts +70 -0
- package/lib/plus/clinetSearch/locales.js +70 -0
- package/lib/plus/contactInfo/locales.d.ts +8 -0
- package/lib/plus/contactInfo/locales.js +8 -0
- package/lib/plus/contactInfoModal/locales.d.ts +42 -0
- package/lib/plus/contactInfoModal/locales.js +42 -0
- package/lib/plus/orderList/locales.d.ts +246 -0
- package/lib/plus/orderList/locales.js +266 -0
- package/lib/plus/productSelect/components/pisellPriceText/index.js +6 -4
- package/lib/plus/productSelect/locales.d.ts +20 -0
- package/lib/plus/productSelect/locales.js +23 -3
- package/lib/plus/saasAttendance/locales.d.ts +210 -0
- package/lib/plus/saasAttendance/locales.js +210 -0
- package/lib/plus/saasAttendance/settings/components/MapField.js +2 -2
- package/lib/plus/saasAttendance/settings/types.d.ts +2 -0
- package/lib/plus/saasCreateOrganization/locales.d.ts +8 -0
- package/lib/plus/saasCreateOrganization/locales.js +8 -0
- package/lib/plus/saasLogin/locales.d.ts +32 -0
- package/lib/plus/saasLogin/locales.js +32 -0
- package/lib/plus/saasRegister/locales.d.ts +76 -0
- package/lib/plus/saasRegister/locales.js +76 -0
- package/lib/plus/saasRole/locales.d.ts +126 -0
- package/lib/plus/saasRole/locales.js +126 -0
- package/lib/plus/saasRole/types.d.ts +2 -0
- package/lib/plus/saasTeamMembers/locales.d.ts +216 -0
- package/lib/plus/saasTeamMembers/locales.js +216 -0
- package/lib/plus/saasTeamMembers/type.d.ts +2 -0
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/lib/plus/selectHolder/locales.d.ts +9 -1
- package/lib/plus/selectHolder/locales.js +13 -5
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.js +8 -6
- package/lib/plus/skuOptionsSelection/components/OptionsCard/index.js +3 -2
- package/lib/plus/skuOptionsSelection/locales.d.ts +20 -0
- package/lib/plus/skuOptionsSelection/locales.js +20 -0
- package/lib/plus/skuOptionsSelection/store/store.js +2 -1
- package/lib/plus/skuOptionsSelection/types.d.ts +14 -0
- package/lib/plus/skuOptionsSelection/utils/transformBundleGroup.js +15 -9
- package/lib/plus/skuOptionsSelection/utils/transformOptionGroup.js +9 -6
- package/lib/plus/skuOptionsSelection/utils/transformVariantGroup.js +8 -7
- package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.d.ts +2 -0
- package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.js +12 -4
- package/lib/plus/walletEditor/locales.d.ts +88 -0
- package/lib/plus/walletEditor/locales.js +100 -0
- package/lib/plus/walletEditor/types.d.ts +2 -0
- package/lib/plus/walletPassGallery/locales.d.ts +188 -0
- package/lib/plus/walletPassGallery/locales.js +192 -0
- package/lib/plus/walletPassGallery/utils.d.ts +1 -1
- package/lib/pro/Cards/components/SKUCard/index.d.ts +1 -56
- package/lib/pro/Cards/components/SKUCard/index.js +53 -14
- package/lib/pro/Cards/components/SKUCard/index.less +21 -0
- package/lib/pro/Cards/components/SKUCard/locales.d.ts +12 -0
- package/lib/pro/Cards/components/SKUCard/locales.js +35 -0
- package/lib/pro/Cards/components/SKUCard/types.d.ts +68 -0
- package/lib/pro/Cards/components/SKUCard/types.js +17 -0
- package/lib/pro/Login2.0/locales.d.ts +360 -0
- package/lib/pro/Login2.0/locales.js +360 -0
- package/lib/pro/Login2.0/shared/types.d.ts +2 -0
- package/lib/pro/Selector/locales.d.ts +22 -0
- package/lib/pro/Selector/locales.js +50 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/locales.d.ts +8 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +8 -0
- package/lib/pro/comprehensiveSearch/locales.d.ts +8 -0
- package/lib/pro/comprehensiveSearch/locales.js +8 -0
- package/lib/pro/keyboards/locales.d.ts +14 -0
- package/lib/pro/keyboards/locales.js +14 -0
- package/lib/pro/numberKeyboard/locales.d.ts +6 -0
- package/lib/pro/numberKeyboard/locales.js +6 -0
- package/lib/pro/pisellPhoneKeyboard/locales.d.ts +6 -0
- package/lib/pro/pisellPhoneKeyboard/locales.js +6 -0
- package/lowcode/eco-cup-list/meta.ts +1 -1
- package/lowcode/eco-customer-list/meta.ts +1 -1
- package/lowcode/sku-options-selection/meta.ts +106 -2
- package/package.json +4 -4
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
amountSymbol: string;
|
|
3
4
|
apis: {
|
|
@@ -108,4 +109,11 @@ export declare const walkInData: {
|
|
|
108
109
|
id: number;
|
|
109
110
|
nickname: string;
|
|
110
111
|
};
|
|
111
|
-
export declare const Provider: any, Context:
|
|
112
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
113
|
+
state: FormState;
|
|
114
|
+
} & {
|
|
115
|
+
dispatch: (params: {
|
|
116
|
+
type: string;
|
|
117
|
+
payload: any;
|
|
118
|
+
}) => void;
|
|
119
|
+
}>;
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -166,10 +166,10 @@ export declare const getProductTotalPrice: (item: any) => number;
|
|
|
166
166
|
export declare const getDuration: (duration: number | {
|
|
167
167
|
type: string;
|
|
168
168
|
value: number;
|
|
169
|
-
}) => number | {
|
|
169
|
+
}) => number | "flexible" | {
|
|
170
170
|
type: string;
|
|
171
171
|
value: number;
|
|
172
|
-
}
|
|
172
|
+
};
|
|
173
173
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
174
174
|
export declare const getIsEdit: (state: any) => boolean;
|
|
175
175
|
export {};
|
|
@@ -199,9 +199,9 @@ var AddCustomerModal = (props) => {
|
|
|
199
199
|
label: import_utils.locales.getText(
|
|
200
200
|
"pisell2.text.ecocup.add-customer-modal.membership"
|
|
201
201
|
),
|
|
202
|
-
defaultValue: "
|
|
202
|
+
defaultValue: "regular",
|
|
203
203
|
options: [
|
|
204
|
-
{ label: "
|
|
204
|
+
{ label: "Regular", value: "regular" },
|
|
205
205
|
{ label: "Business", value: "business" },
|
|
206
206
|
{ label: "Admin", value: "admin" }
|
|
207
207
|
]
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './index.less';
|
|
3
3
|
interface IProps {
|
|
4
|
-
type: 'rentInfo' | 'markInfo' | 'belongInfo';
|
|
4
|
+
type: 'rentInfo' | 'markInfo' | 'belongInfo' | 'otherBelongInfo';
|
|
5
5
|
data: Record<string, any>;
|
|
6
|
+
isMultipleShop?: boolean;
|
|
7
|
+
isMultipleTime?: boolean;
|
|
6
8
|
}
|
|
7
9
|
declare const CupInfoCard: (props: IProps) => React.JSX.Element;
|
|
8
10
|
export default CupInfoCard;
|
|
@@ -37,7 +37,7 @@ var import_utils = require("@pisell/utils");
|
|
|
37
37
|
var import_dayjs = __toESM(require("dayjs"));
|
|
38
38
|
var import_index = require("./index.less");
|
|
39
39
|
var CupInfoCard = (props) => {
|
|
40
|
-
const { type, data } = props;
|
|
41
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell2-ecocup-cup-info-card" }, /* @__PURE__ */ import_react.default.createElement("div", null, import_utils.locales.getText(`pisell2.text.ecocup.cup-info-card.title.${type}`)), /* @__PURE__ */ import_react.default.createElement("div", null, (data == null ? void 0 : data.shop) || "-"), /* @__PURE__ */ import_react.default.createElement("div", null, (data == null ? void 0 : data.time) ? (0, import_dayjs.default)(data == null ? void 0 : data.time).format("HH:mm DD/MM/YYYY") : "-"));
|
|
40
|
+
const { type, data, isMultipleShop, isMultipleTime } = props;
|
|
41
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell2-ecocup-cup-info-card" }, /* @__PURE__ */ import_react.default.createElement("div", null, import_utils.locales.getText(`pisell2.text.ecocup.cup-info-card.title.${type}`)), isMultipleShop ? import_utils.locales.getText("pisell2.text.ecocup.cup-info-card.title.multiple-shop") : /* @__PURE__ */ import_react.default.createElement("div", null, (data == null ? void 0 : data.shop) || "-"), isMultipleTime ? import_utils.locales.getText("pisell2.text.ecocup.cup-info-card.title.multiple-time") : /* @__PURE__ */ import_react.default.createElement("div", null, (data == null ? void 0 : data.time) ? (0, import_dayjs.default)(data == null ? void 0 : data.time).format("HH:mm DD/MM/YYYY") : "-"));
|
|
42
42
|
};
|
|
43
43
|
var CupInfoCard_default = CupInfoCard;
|
|
@@ -1,5 +1,36 @@
|
|
|
1
|
-
import { ECupActionType } from '../../types';
|
|
1
|
+
import { ECupActionType, ICup } from '../../types';
|
|
2
2
|
export declare const useCupAction: () => {
|
|
3
3
|
run: (this: unknown, cupId: string, action: ECupActionType) => Promise<boolean>;
|
|
4
4
|
loading: boolean;
|
|
5
5
|
};
|
|
6
|
+
/**
|
|
7
|
+
* @description: 批量归还杯子
|
|
8
|
+
* @return {*}
|
|
9
|
+
*/
|
|
10
|
+
export declare const useBatchCupAction: () => {
|
|
11
|
+
run: (this: unknown, eco_cup_ids: number[] | string[]) => Promise<boolean>;
|
|
12
|
+
loading: boolean;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* @description: 统计杯子列表中的客户、店铺、时间数量
|
|
16
|
+
* @param {ICup[]} cupList - 杯子列表
|
|
17
|
+
* @return {object} 返回统计信息和是否为多个的标识
|
|
18
|
+
*/
|
|
19
|
+
export declare const useCupListStatistics: (cupList: ICup[]) => {
|
|
20
|
+
hasMultipleCustomers: boolean;
|
|
21
|
+
hasMultipleShops: boolean;
|
|
22
|
+
hasMultipleTimes: boolean;
|
|
23
|
+
uniqueCustomer: import("../../types").ICustomer | undefined;
|
|
24
|
+
uniqueShop: {
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
} | undefined;
|
|
28
|
+
uniqueTime: string | undefined;
|
|
29
|
+
} | {
|
|
30
|
+
hasMultipleCustomers: boolean;
|
|
31
|
+
hasMultipleShops: boolean;
|
|
32
|
+
hasMultipleTimes: boolean;
|
|
33
|
+
uniqueCustomer: null;
|
|
34
|
+
uniqueShop: null;
|
|
35
|
+
uniqueTime: null;
|
|
36
|
+
};
|
|
@@ -19,7 +19,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
// src/components/ecocup/components/CupStatusModal/hooks.ts
|
|
20
20
|
var hooks_exports = {};
|
|
21
21
|
__export(hooks_exports, {
|
|
22
|
-
|
|
22
|
+
useBatchCupAction: () => useBatchCupAction,
|
|
23
|
+
useCupAction: () => useCupAction,
|
|
24
|
+
useCupListStatistics: () => useCupListStatistics
|
|
23
25
|
});
|
|
24
26
|
module.exports = __toCommonJS(hooks_exports);
|
|
25
27
|
var import_react = require("react");
|
|
@@ -49,7 +51,65 @@ var useCupAction = () => {
|
|
|
49
51
|
loading
|
|
50
52
|
};
|
|
51
53
|
};
|
|
54
|
+
var useBatchCupAction = () => {
|
|
55
|
+
const { post } = (0, import_hooks.useRequest)();
|
|
56
|
+
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
57
|
+
const run = (0, import_ahooks.useMemoizedFn)(async (eco_cup_ids) => {
|
|
58
|
+
try {
|
|
59
|
+
setLoading(true);
|
|
60
|
+
const res = await post("/shop/wallet/eco/cups-return", { eco_cup_ids });
|
|
61
|
+
if ((res == null ? void 0 : res.code) == 200) {
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
return false;
|
|
65
|
+
} catch (error) {
|
|
66
|
+
console.error(error);
|
|
67
|
+
return false;
|
|
68
|
+
} finally {
|
|
69
|
+
setLoading(false);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
return {
|
|
73
|
+
run,
|
|
74
|
+
loading
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
var useCupListStatistics = (cupList) => {
|
|
78
|
+
return (0, import_react.useMemo)(() => {
|
|
79
|
+
var _a, _b, _c;
|
|
80
|
+
if (cupList.length === 0) {
|
|
81
|
+
return {
|
|
82
|
+
hasMultipleCustomers: false,
|
|
83
|
+
hasMultipleShops: false,
|
|
84
|
+
hasMultipleTimes: false,
|
|
85
|
+
uniqueCustomer: null,
|
|
86
|
+
uniqueShop: null,
|
|
87
|
+
uniqueTime: null
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
const customerIds = new Set(
|
|
91
|
+
cupList.map((cup) => cup == null ? void 0 : cup.customer_id).filter((id) => id)
|
|
92
|
+
);
|
|
93
|
+
const shopIds = new Set(
|
|
94
|
+
cupList.map((cup) => cup == null ? void 0 : cup.current_shop_id).filter((id) => id)
|
|
95
|
+
);
|
|
96
|
+
const times = new Set(
|
|
97
|
+
cupList.map((cup) => cup == null ? void 0 : cup.operated_at).filter((time) => time)
|
|
98
|
+
);
|
|
99
|
+
const result = {
|
|
100
|
+
hasMultipleCustomers: customerIds.size > 1,
|
|
101
|
+
hasMultipleShops: shopIds.size > 1,
|
|
102
|
+
hasMultipleTimes: times.size > 1,
|
|
103
|
+
uniqueCustomer: (_a = cupList[0]) == null ? void 0 : _a.customer,
|
|
104
|
+
uniqueShop: (_b = cupList[0]) == null ? void 0 : _b.current_shop,
|
|
105
|
+
uniqueTime: (_c = cupList[0]) == null ? void 0 : _c.operated_at
|
|
106
|
+
};
|
|
107
|
+
return result;
|
|
108
|
+
}, [cupList]);
|
|
109
|
+
};
|
|
52
110
|
// Annotate the CommonJS export names for ESM import in node:
|
|
53
111
|
0 && (module.exports = {
|
|
54
|
-
|
|
112
|
+
useBatchCupAction,
|
|
113
|
+
useCupAction,
|
|
114
|
+
useCupListStatistics
|
|
55
115
|
});
|
|
@@ -40,12 +40,28 @@ var import_index = require("./index.less");
|
|
|
40
40
|
var import_CupInfoCard = __toESM(require("../CupInfoCard"));
|
|
41
41
|
var import_CustomerCard = __toESM(require("../CustomerCard"));
|
|
42
42
|
var import_hooks = require("./hooks");
|
|
43
|
+
var import_SearchBar = __toESM(require("../SearchBar"));
|
|
44
|
+
var SCAN_LISTENER_KEY = "eco-cup-status-modal-scan-listener";
|
|
43
45
|
var CupStatusModal = (props) => {
|
|
44
|
-
var _a;
|
|
46
|
+
var _a, _b, _c;
|
|
45
47
|
const { visible, onCancel, onOk, data } = props;
|
|
46
48
|
const { scanStatus, cupData } = data || {};
|
|
47
49
|
const cupAction = (0, import_hooks.useCupAction)();
|
|
48
|
-
const
|
|
50
|
+
const [cupList, setCupList] = (0, import_react.useState)([]);
|
|
51
|
+
const batchCupAction = (0, import_hooks.useBatchCupAction)();
|
|
52
|
+
(0, import_react.useEffect)(() => {
|
|
53
|
+
if (!cupData) {
|
|
54
|
+
setCupList([]);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const initialCups = Array.isArray(cupData) ? cupData : [cupData];
|
|
58
|
+
setCupList(initialCups);
|
|
59
|
+
}, [cupData]);
|
|
60
|
+
const otherRentStatus = (0, import_react.useMemo)(() => {
|
|
61
|
+
return scanStatus === import_types.ECupScanStatus.OTHER_RENT;
|
|
62
|
+
}, [scanStatus]);
|
|
63
|
+
const isRed = !otherRentStatus;
|
|
64
|
+
const cupStatistics = (0, import_hooks.useCupListStatistics)(cupList);
|
|
49
65
|
const lineStyle = (0, import_react.useMemo)(() => {
|
|
50
66
|
if (isRed) {
|
|
51
67
|
return {
|
|
@@ -59,10 +75,13 @@ var CupStatusModal = (props) => {
|
|
|
59
75
|
};
|
|
60
76
|
}, [isRed]);
|
|
61
77
|
const cupInfoCardType = (0, import_react.useMemo)(() => {
|
|
62
|
-
if (scanStatus === import_types.ECupScanStatus.OTHER_IN_STOCK
|
|
78
|
+
if (scanStatus === import_types.ECupScanStatus.OTHER_IN_STOCK) {
|
|
79
|
+
return "otherBelongInfo";
|
|
80
|
+
}
|
|
81
|
+
if (scanStatus === import_types.ECupScanStatus.IN_STOCK) {
|
|
63
82
|
return "belongInfo";
|
|
64
83
|
}
|
|
65
|
-
if (
|
|
84
|
+
if (otherRentStatus || scanStatus === import_types.ECupScanStatus.RENT) {
|
|
66
85
|
return "rentInfo";
|
|
67
86
|
}
|
|
68
87
|
if (scanStatus === import_types.ECupScanStatus.MISSING || scanStatus === import_types.ECupScanStatus.BROKEN) {
|
|
@@ -76,15 +95,18 @@ var CupStatusModal = (props) => {
|
|
|
76
95
|
};
|
|
77
96
|
const _onOk = async () => {
|
|
78
97
|
if (cupAction == null ? void 0 : cupAction.loading) return;
|
|
79
|
-
const type =
|
|
98
|
+
const type = otherRentStatus ? import_types.ECupActionType.RETURN : "";
|
|
80
99
|
if (!type) {
|
|
81
100
|
onOk == null ? void 0 : onOk();
|
|
82
101
|
return;
|
|
83
102
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
103
|
+
let result;
|
|
104
|
+
if (otherRentStatus) {
|
|
105
|
+
const ids = cupList.map((cup) => (cup == null ? void 0 : cup.eco_cup_id) || (cup == null ? void 0 : cup.id));
|
|
106
|
+
result = await batchCupAction.run(ids);
|
|
107
|
+
} else {
|
|
108
|
+
result = await cupAction.run((cupData == null ? void 0 : cupData.eco_cup_id) || (cupData == null ? void 0 : cupData.id), type);
|
|
109
|
+
}
|
|
88
110
|
if (result) {
|
|
89
111
|
(0, import_materials.PisellToast)({
|
|
90
112
|
content: import_utils.locales.getText(`pisell2.text.ecocup.toast.success-${type}`)
|
|
@@ -92,6 +114,39 @@ var CupStatusModal = (props) => {
|
|
|
92
114
|
onOk == null ? void 0 : onOk();
|
|
93
115
|
}
|
|
94
116
|
};
|
|
117
|
+
const onSearchResult = (result) => {
|
|
118
|
+
var _a2;
|
|
119
|
+
if (cupList.find((c) => {
|
|
120
|
+
var _a3;
|
|
121
|
+
return (c == null ? void 0 : c.id) === ((_a3 = result == null ? void 0 : result.data) == null ? void 0 : _a3.id);
|
|
122
|
+
})) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
if (((_a2 = result == null ? void 0 : result.data) == null ? void 0 : _a2.status) !== import_types.ECupStatus.RENT) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
setCupList([...cupList, result == null ? void 0 : result.data]);
|
|
129
|
+
};
|
|
130
|
+
const removeCupFromList = (cupId) => {
|
|
131
|
+
setCupList(cupList.filter((cup) => (cup == null ? void 0 : cup.id) !== cupId));
|
|
132
|
+
};
|
|
133
|
+
const renderSearchBar = () => {
|
|
134
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell2-ecocup-customer-first-modal-search-bar" }, /* @__PURE__ */ import_react.default.createElement(
|
|
135
|
+
import_SearchBar.default,
|
|
136
|
+
{
|
|
137
|
+
scanListenerKey: SCAN_LISTENER_KEY,
|
|
138
|
+
searchType: "cup",
|
|
139
|
+
placeholder: import_utils.locales.getText(
|
|
140
|
+
"pisell2.text.ecocup.customer-first-modal.search-bar.placeholder"
|
|
141
|
+
),
|
|
142
|
+
onSearchResult,
|
|
143
|
+
onCupStatusValidate: onSearchResult
|
|
144
|
+
}
|
|
145
|
+
));
|
|
146
|
+
};
|
|
147
|
+
const showRemove = (0, import_react.useMemo)(() => {
|
|
148
|
+
return (cupList == null ? void 0 : cupList.length) > 1 && otherRentStatus;
|
|
149
|
+
}, [cupList.length, otherRentStatus]);
|
|
95
150
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
96
151
|
import_materials.PisellModal,
|
|
97
152
|
{
|
|
@@ -99,23 +154,30 @@ var CupStatusModal = (props) => {
|
|
|
99
154
|
open: visible,
|
|
100
155
|
onCancel: _onCancel,
|
|
101
156
|
onOk: _onOk,
|
|
102
|
-
title: import_utils.locales.getText(
|
|
157
|
+
title: otherRentStatus ? import_utils.locales.getText(
|
|
158
|
+
`pisell2.text.ecocup.cup-status-modal.title-${scanStatus}`
|
|
159
|
+
)(cupList.length) : import_utils.locales.getText(
|
|
103
160
|
`pisell2.text.ecocup.cup-status-modal.title-${scanStatus}`
|
|
104
161
|
),
|
|
105
|
-
cancelText: import_utils.locales.getText("pisell2.text.ecocup.button.dismiss"),
|
|
106
|
-
okText: isRed ? import_utils.locales.getText("pisell2.text.ecocup.button.confirm") :
|
|
162
|
+
cancelText: otherRentStatus ? import_utils.locales.getText("pisell2.text.ecocup.button.cancel") : import_utils.locales.getText("pisell2.text.ecocup.button.dismiss"),
|
|
163
|
+
okText: isRed ? import_utils.locales.getText("pisell2.text.ecocup.button.confirm") : import_utils.locales.getText("pisell2.text.ecocup.button.return"),
|
|
107
164
|
okButtonProps: { loading: cupAction == null ? void 0 : cupAction.loading },
|
|
108
165
|
cancelVisible: !isRed,
|
|
109
166
|
width: 580
|
|
110
167
|
},
|
|
111
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell2-ecocup-cup-status-modal-content" }, /* @__PURE__ */ import_react.default.createElement(
|
|
168
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell2-ecocup-cup-status-modal-content", style: { gap: otherRentStatus ? "20px" : "32px" } }, otherRentStatus ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell2-ecocup-cup-status-modal-content-search" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "tip-text" }, import_utils.locales.getText(
|
|
169
|
+
"pisell2.text.ecocup.cup-status-modal.search-bar.title"
|
|
170
|
+
)), renderSearchBar()) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell2-ecocup-cup-status-modal-content-cup-lists" }, cupList.map((cup, index) => /* @__PURE__ */ import_react.default.createElement(
|
|
112
171
|
"div",
|
|
113
172
|
{
|
|
173
|
+
key: (cup == null ? void 0 : cup.id) || index,
|
|
114
174
|
className: "pisell2-ecocup-cup-status-modal-content-cup",
|
|
115
|
-
style: {
|
|
175
|
+
style: {
|
|
176
|
+
...lineStyle,
|
|
177
|
+
justifyContent: showRemove ? "space-between" : "center"
|
|
178
|
+
}
|
|
116
179
|
},
|
|
117
|
-
/* @__PURE__ */ import_react.default.createElement(import_materials.Icon, { type: "RestOutlined", size: 24 }),
|
|
118
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
180
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell2-ecocup-cup-status-modal-content-cup-info" }, /* @__PURE__ */ import_react.default.createElement(import_materials.Icon, { type: "RestOutlined", size: 24 }), /* @__PURE__ */ import_react.default.createElement(
|
|
119
181
|
"span",
|
|
120
182
|
{
|
|
121
183
|
style: {
|
|
@@ -123,18 +185,37 @@ var CupStatusModal = (props) => {
|
|
|
123
185
|
}
|
|
124
186
|
},
|
|
125
187
|
import_utils.locales.getText("pisell2.text.ecocup.cup-id")
|
|
126
|
-
),
|
|
127
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
128
|
-
|
|
188
|
+
), /* @__PURE__ */ import_react.default.createElement("span", null, (cup == null ? void 0 : cup.eco_cup_code) || (cup == null ? void 0 : cup.code) || "")),
|
|
189
|
+
showRemove && /* @__PURE__ */ import_react.default.createElement(
|
|
190
|
+
import_materials.Button,
|
|
191
|
+
{
|
|
192
|
+
type: "primary",
|
|
193
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_materials.Icon, { type: "pisell2-trash-01", size: 24, color: "#7F56DA" }),
|
|
194
|
+
onClick: () => removeCupFromList(cup == null ? void 0 : cup.id),
|
|
195
|
+
className: "info-remove"
|
|
196
|
+
},
|
|
197
|
+
import_utils.locales.getText("pisell2.text.ecocup.button.remove")
|
|
198
|
+
)
|
|
199
|
+
))), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell2-ecocup-cup-status-modal-content-info" }, /* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1 } }, ((cupStatistics == null ? void 0 : cupStatistics.uniqueShop) || (cupStatistics == null ? void 0 : cupStatistics.hasMultipleShops)) && cupInfoCardType ? /* @__PURE__ */ import_react.default.createElement(
|
|
129
200
|
import_CupInfoCard.default,
|
|
130
201
|
{
|
|
131
202
|
type: cupInfoCardType,
|
|
132
203
|
data: {
|
|
133
|
-
shop: (_a =
|
|
134
|
-
time:
|
|
204
|
+
shop: (_a = cupStatistics == null ? void 0 : cupStatistics.uniqueShop) == null ? void 0 : _a.name,
|
|
205
|
+
time: cupStatistics == null ? void 0 : cupStatistics.uniqueTime,
|
|
206
|
+
isMultipleTime: cupStatistics == null ? void 0 : cupStatistics.hasMultipleTimes,
|
|
207
|
+
isMultipleShop: cupStatistics == null ? void 0 : cupStatistics.hasMultipleShops
|
|
135
208
|
}
|
|
136
209
|
}
|
|
137
|
-
) : null), /* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1 } }, (
|
|
210
|
+
) : null), /* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1 } }, ((_b = cupList == null ? void 0 : cupList[0]) == null ? void 0 : _b.status) === import_types.ECupStatus.RENT ? (cupStatistics == null ? void 0 : cupStatistics.uniqueCustomer) || (cupStatistics == null ? void 0 : cupStatistics.hasMultipleCustomers) ? /* @__PURE__ */ import_react.default.createElement(
|
|
211
|
+
import_CustomerCard.default,
|
|
212
|
+
{
|
|
213
|
+
...(cupStatistics == null ? void 0 : cupStatistics.uniqueCustomer) || {},
|
|
214
|
+
isMultiple: cupStatistics == null ? void 0 : cupStatistics.hasMultipleCustomers
|
|
215
|
+
}
|
|
216
|
+
) : null : /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell2-ecocup-cup-status-modal-content-info-tip" }, ((_c = cupList == null ? void 0 : cupList[0]) == null ? void 0 : _c.status) === import_types.ECupStatus.IN_STOCK ? import_utils.locales.getText(
|
|
217
|
+
"pisell2.text.ecocup.cup-status-modal.tip-in-stock"
|
|
218
|
+
) : import_utils.locales.getText("pisell2.text.ecocup.cup-status-modal.tip")))))
|
|
138
219
|
);
|
|
139
220
|
};
|
|
140
221
|
var CupStatusModal_default = CupStatusModal;
|
|
@@ -4,32 +4,70 @@
|
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
gap: 32px;
|
|
6
6
|
|
|
7
|
+
&-cup-lists {
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
gap: 4px;
|
|
12
|
+
}
|
|
13
|
+
|
|
7
14
|
&-cup {
|
|
8
15
|
height: 60px;
|
|
9
16
|
padding: 0 16px;
|
|
10
17
|
display: flex;
|
|
11
18
|
flex-direction: row;
|
|
12
19
|
align-items: center;
|
|
13
|
-
justify-content:
|
|
20
|
+
justify-content: space-between;
|
|
14
21
|
border-radius: 8px;
|
|
15
22
|
gap: 8px;
|
|
23
|
+
width: 100%;
|
|
24
|
+
|
|
25
|
+
.info-remove {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: row;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
border-radius: 8px;
|
|
31
|
+
border: 1px solid #7f56da;
|
|
32
|
+
background: #f6f2ff;
|
|
33
|
+
color: #7F56DA;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&-cup-info {
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
gap: 8px;
|
|
16
41
|
|
|
17
|
-
|
|
42
|
+
&>span {
|
|
18
43
|
font-size: 20px;
|
|
19
44
|
font-weight: 300;
|
|
20
45
|
}
|
|
21
46
|
}
|
|
22
47
|
|
|
48
|
+
&-search {
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
gap: 8px;
|
|
52
|
+
.tip-text {
|
|
53
|
+
font-size: 14px;
|
|
54
|
+
font-weight: 500;
|
|
55
|
+
color: rgb(127, 86, 218);
|
|
56
|
+
text-align: center;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
23
60
|
&-info {
|
|
24
61
|
display: flex;
|
|
25
62
|
align-items: center;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
color: #d92d20;
|
|
31
|
-
font-size: 16px;
|
|
32
|
-
font-weight: 400;
|
|
63
|
+
gap: 8px;
|
|
64
|
+
&>div:nth-child(2) {
|
|
65
|
+
display: flex;
|
|
66
|
+
justify-content: flex-end;
|
|
33
67
|
}
|
|
34
68
|
}
|
|
35
|
-
|
|
69
|
+
|
|
70
|
+
.comprehensive-search__search-section .comprehensive-search__search-button {
|
|
71
|
+
min-width: 60px !important;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -147,7 +147,7 @@ var CustomerAndCupModal = (props) => {
|
|
|
147
147
|
onCancel: _onCancel,
|
|
148
148
|
onOk: _onOk,
|
|
149
149
|
okText: import_utils.locales.getText("pisell2.text.ecocup.button.confirm"),
|
|
150
|
-
cancelText: import_utils.locales.getText("pisell2.text.ecocup.button.
|
|
150
|
+
cancelText: import_utils.locales.getText("pisell2.text.ecocup.button.dismiss"),
|
|
151
151
|
okButtonProps: {
|
|
152
152
|
disabled: newCups.length === 0 || isOverMax || isLoading || !(customerData == null ? void 0 : customerData.id),
|
|
153
153
|
loading: isLoading
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './index.less';
|
|
3
3
|
import { ICustomer } from '../../types';
|
|
4
|
-
interface IProps extends ICustomer {
|
|
4
|
+
interface IProps extends Partial<ICustomer> {
|
|
5
|
+
/** 是否为多个客户,为 true 时显示 "Multiple customers" */
|
|
6
|
+
isMultiple?: boolean;
|
|
5
7
|
}
|
|
6
8
|
declare const CustomerCard: (props: IProps) => React.JSX.Element | null;
|
|
7
9
|
export default CustomerCard;
|
|
@@ -37,12 +37,22 @@ var import_utils = require("@pisell/utils");
|
|
|
37
37
|
var import_index = require("./index.less");
|
|
38
38
|
var CustomerCard = (props) => {
|
|
39
39
|
var _a;
|
|
40
|
-
const {
|
|
41
|
-
|
|
40
|
+
const {
|
|
41
|
+
id,
|
|
42
|
+
nickname,
|
|
43
|
+
display_name,
|
|
44
|
+
phone,
|
|
45
|
+
country_calling_code,
|
|
46
|
+
cover,
|
|
47
|
+
isMultiple
|
|
48
|
+
} = props;
|
|
49
|
+
if (!id && !nickname && !display_name && !phone && !isMultiple) {
|
|
42
50
|
return null;
|
|
43
51
|
}
|
|
44
52
|
const phoneStr = phone ? `${country_calling_code} ${phone}` : "-";
|
|
45
53
|
const name = display_name || nickname || "";
|
|
46
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell2-ecocup-customer-card" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell2-ecocup-customer-card-avatar" }, cover ? /* @__PURE__ */ import_react.default.createElement("img", { src: import_utils.image.ali(cover, 360), alt: "avatar" }) : /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell2-ecocup-customer-card-avatar-text" }, ((_a = name == null ? void 0 : name.charAt(0)) == null ? void 0 : _a.toUpperCase()) || "")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell2-ecocup-customer-card-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell2-ecocup-customer-card-info-name" },
|
|
54
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell2-ecocup-customer-card" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell2-ecocup-customer-card-avatar" }, isMultiple ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell2-ecocup-customer-card-avatar-text" }) : cover ? /* @__PURE__ */ import_react.default.createElement("img", { src: import_utils.image.ali(cover, 360), alt: "avatar" }) : /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell2-ecocup-customer-card-avatar-text" }, ((_a = name == null ? void 0 : name.charAt(0)) == null ? void 0 : _a.toUpperCase()) || "")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell2-ecocup-customer-card-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell2-ecocup-customer-card-info-name" }, isMultiple ? import_utils.locales.getText(
|
|
55
|
+
"pisell2.text.ecocup.cup-info-card.title.multiple-customer"
|
|
56
|
+
) : name || ""), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell2-ecocup-customer-card-info-phone" }, isMultiple ? "-" : phoneStr || ""), isMultiple ? /* @__PURE__ */ import_react.default.createElement("div", null, "-") : null));
|
|
47
57
|
};
|
|
48
58
|
var CustomerCard_default = CustomerCard;
|
|
@@ -2,6 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import './index.less';
|
|
3
3
|
interface CustomPageHeaderProps {
|
|
4
4
|
title: string;
|
|
5
|
+
rightContent?: React.ReactNode;
|
|
6
|
+
isReturn?: boolean;
|
|
5
7
|
}
|
|
6
8
|
declare const CustomPageHeader: (props: CustomPageHeaderProps) => React.JSX.Element;
|
|
7
9
|
export default CustomPageHeader;
|
|
@@ -41,19 +41,26 @@ var import_index = require("./index.less");
|
|
|
41
41
|
var prefixCls = "ecocup-page-header";
|
|
42
42
|
var CustomPageHeader = (props) => {
|
|
43
43
|
var _a;
|
|
44
|
-
const { title } = props;
|
|
44
|
+
const { title, rightContent, isReturn = true } = props;
|
|
45
45
|
const context = (0, import_useEngineContext.default)();
|
|
46
46
|
const { history } = ((_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) || {};
|
|
47
47
|
const app = (0, import_hooks.useGetApp)();
|
|
48
48
|
const onBack = () => {
|
|
49
49
|
var _a2, _b;
|
|
50
|
-
|
|
50
|
+
if (!isReturn) return;
|
|
51
51
|
if (app == null ? void 0 : app.history) {
|
|
52
52
|
(_a2 = app.history) == null ? void 0 : _a2.goBack();
|
|
53
53
|
} else {
|
|
54
54
|
(_b = history == null ? void 0 : history.goBack) == null ? void 0 : _b.call(history);
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: prefixCls, onClick: onBack }, /* @__PURE__ */ import_react.default.createElement(import_icons.LeftOutlined, { style: { fontSize: 18 } }), /* @__PURE__ */ import_react.default.createElement(import_materials.PageHeader, { title, showTitle: true }))
|
|
57
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: prefixCls, onClick: onBack }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-left-container` }, isReturn ? /* @__PURE__ */ import_react.default.createElement(import_icons.LeftOutlined, { style: { fontSize: 18 } }) : null, /* @__PURE__ */ import_react.default.createElement(import_materials.PageHeader, { title, showTitle: true })), /* @__PURE__ */ import_react.default.createElement(
|
|
58
|
+
"div",
|
|
59
|
+
{
|
|
60
|
+
className: `${prefixCls}-right-container`,
|
|
61
|
+
onClick: (e) => e.stopPropagation()
|
|
62
|
+
},
|
|
63
|
+
rightContent || ""
|
|
64
|
+
));
|
|
58
65
|
};
|
|
59
66
|
var PageHeader_default = CustomPageHeader;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
.@{prefixCls} {
|
|
4
4
|
display: flex;
|
|
5
5
|
align-items: center;
|
|
6
|
-
|
|
7
|
-
width:
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
width: 100%;
|
|
8
8
|
margin-bottom: 12px;
|
|
9
9
|
cursor: pointer;
|
|
10
10
|
color: #fff;
|
|
@@ -13,7 +13,19 @@
|
|
|
13
13
|
margin: 0;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.pisell-lowcode-page-header-title{
|
|
16
|
+
.pisell-lowcode-page-header-title {
|
|
17
17
|
color: #fff !important;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
|
|
20
|
+
&-left-container {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: 16px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&-right-container {
|
|
27
|
+
flex-shrink: 0;
|
|
28
|
+
display: flex;
|
|
29
|
+
justify-content: flex-end;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -8,6 +8,7 @@ interface SearchBarProps {
|
|
|
8
8
|
searchType?: 'customer' | 'cup';
|
|
9
9
|
onSearchResult?: (v: any) => void;
|
|
10
10
|
customerId?: string;
|
|
11
|
+
onCupStatusValidate?: (data: any) => void;
|
|
11
12
|
}
|
|
12
13
|
declare const SearchBar: (props: SearchBarProps) => React.JSX.Element;
|
|
13
14
|
export default SearchBar;
|