@feedmepos/mf-connect 0.0.9 → 0.0.11-prod
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/dist/{Analytic-CwaN0mge.js → Analytic-CpXLcGWV.js} +7 -7
- package/dist/{Broadcast-Cjx5xzUC.js → Broadcast-CEMQS5PI.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D4mO5aik.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D0Kvpl_V.js} +8 -8
- package/dist/{Card-DbY6YaXk.js → Card-BqX-aRK9.js} +182 -187
- package/dist/{Collections-DRN2gzwh.js → Collections-SRmluAj0.js} +102 -84
- package/dist/{Credit-DOcrzykJ.js → Credit-DdBKFsII.js} +7 -7
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BYNpBySQ.js +2600 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-EF_rHfwT.js → EffectSheet.vue_vue_type_style_index_0_lang-admNNBWu.js} +1864 -1830
- package/dist/{Experience-aQj-3H2Y.js → Experience-CSfRrWqI.js} +7 -7
- package/dist/Game-BV--qn0e.js +250 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CG-GBVMP.js → ImageInput.vue_vue_type_script_setup_true_lang-DpYjrT3G.js} +1 -1
- package/dist/{MainLayout-Cxl9yLPs.js → MainLayout-B_ZXQrMD.js} +1 -1
- package/dist/{Marketing-BYUcbcMU.js → Marketing-Bac3EbOu.js} +16 -16
- package/dist/{Member-D7K9fm_Q.js → Member-CGMRVEuI.js} +2 -2
- package/dist/{MemberList-DbXkxUzF.js → MemberList-CSyb4bNE.js} +196 -195
- package/dist/{MemberTransactions-DED1SYwX.js → MemberTransactions-BdraBHg6.js} +2 -2
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CLqIp5wR.js → MessageInput.vue_vue_type_script_setup_true_lang-BvAFOoym.js} +2 -2
- package/dist/Mission-D8-D99g-.js +248 -0
- package/dist/Point-BOI4mT-K.js +220 -0
- package/dist/{Promotion-DzVXy_C9.js → Promotion-D0MLMo9m.js} +8 -8
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CeS6KlhP.js → RuleGroup.vue_vue_type_script_setup_true_lang-1L68zx5t.js} +58 -58
- package/dist/Segment-BeUbkVj7.js +444 -0
- package/dist/{Setting-pCzenLoL.js → Setting-uM4iKdyM.js} +386 -379
- package/dist/{Store-DEwEIFYD.js → Store-BkccNTnM.js} +432 -413
- package/dist/{StoreRewards-D7vnZN4f.js → StoreRewards-BLgP6Mfv.js} +9 -9
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-ALzQU3th.js → StoreTransactions.vue_vue_type_script_setup_true_lang-Z0nqQyi8.js} +39 -38
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-GMIztWCj.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C771jjYx.js} +1 -1
- package/dist/{Tier-BJbX5CPB.js → Tier-DwKAfz6f.js} +17 -16
- package/dist/{Title-C9xV6rBg.js → Title-B1_yd9pC.js} +16 -15
- package/dist/{Transaction-C8OHlhzR.js → Transaction-DcVCMUY4.js} +1 -1
- package/dist/{Voucher-eZwm7N1D.js → Voucher-Djvai5vL.js} +30 -30
- package/dist/{app-DgbDbhL-.js → app-BvizV9z5.js} +3192 -3178
- package/dist/app.js +1 -1
- package/dist/{campaign-BkvrUTEJ.js → campaign-BdSwq7MJ.js} +31 -27
- package/dist/dto-CkH5Zama.js +1150 -0
- package/dist/{effect-f7DAPYC8.js → effect-DT4ivttr.js} +1 -1
- package/dist/{export-BXbCXTfd.js → export-BAJL8_2G.js} +3 -3
- package/dist/{helper-BhvQ9m6d.js → helper-CiIZ1pUo.js} +21 -8
- package/dist/{index-CdtrQ9tR.js → index-7uOMMdXt.js} +245 -184
- package/dist/{index-Cfo2A0Se.js → index-8nrxC9d5.js} +1 -1
- package/dist/{index-FWp9M1yS.js → index-B5gJ6P15.js} +269 -21
- package/dist/{index-BhacKx5B.js → index-BLWw_MlC.js} +1363 -1341
- package/dist/{index-VmFlM704.js → index-C5N8jeJ1.js} +1 -1
- package/dist/{index-Cz5RZlYh.js → index-C8dIiNQb.js} +1 -1
- package/dist/{index-Dd3hrFcQ.js → index-Ccn7PGoB.js} +268 -267
- package/dist/{index-oQLJE4Uw.js → index-CjZxaXvZ.js} +69 -64
- package/dist/{index-DQC_1tRF.js → index-DCs4-zXS.js} +7 -17
- package/dist/{index-BsEqtUmY.js → index-DMyaEjMn.js} +26 -20
- package/dist/{loading-DQaawbHE.js → loading-C1IzY-n2.js} +1312 -1312
- package/dist/{lodash-DzdmTD20.js → lodash-BMQ4xbjY.js} +1 -1
- package/dist/membership-D3I4udu3.js +221 -0
- package/dist/{money-vzwOUBrp.js → money-BQEcWGhZ.js} +1 -1
- package/dist/{number-CBzs6rfW.js → number-DGx2QPUy.js} +1 -1
- package/dist/{rule-BR5rrmUV.js → rule-CvlhLEGy.js} +2 -2
- package/dist/{rule-builder-7GBNrPXt.js → rule-builder-Di3qiIBb.js} +1 -1
- package/dist/{template-CETJ6lkf.js → template-D6Abrya4.js} +5 -5
- package/dist/{usePagination-DdZeE4Tt.js → usePagination-MhbjQgN7.js} +1 -1
- package/dist/{xlsx-CDAKxZE_.js → xlsx-mL_3T1k3.js} +226 -226
- package/package.json +3 -3
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CUxfXaro.js +0 -2002
- package/dist/Game-Cnje-m_M.js +0 -242
- package/dist/Point-CQm8whVQ.js +0 -211
- package/dist/Segment-D3o0D3Uv.js +0 -407
- package/dist/dto-YYVhW73A.js +0 -1092
- package/dist/libs/packages/core/src/bill/bill.dto.d.ts +0 -75
- package/dist/libs/packages/core/src/bill/index.d.ts +0 -115
- package/dist/libs/packages/core/src/business/index.d.ts +0 -21
- package/dist/libs/packages/core/src/campaign/broadcast/index.d.ts +0 -36
- package/dist/libs/packages/core/src/campaign/campaign.enum.d.ts +0 -9
- package/dist/libs/packages/core/src/campaign/campaign.fn.d.ts +0 -7
- package/dist/libs/packages/core/src/campaign/dto.d.ts +0 -5517
- package/dist/libs/packages/core/src/campaign/group.d.ts +0 -25
- package/dist/libs/packages/core/src/campaign/index.d.ts +0 -33988
- package/dist/libs/packages/core/src/collectible/collectible.dto.d.ts +0 -21
- package/dist/libs/packages/core/src/collectible/collectible.enum.d.ts +0 -14
- package/dist/libs/packages/core/src/collectible/helper.d.ts +0 -195
- package/dist/libs/packages/core/src/collectible/index.d.ts +0 -1588
- package/dist/libs/packages/core/src/collectible/pool/index.d.ts +0 -1381
- package/dist/libs/packages/core/src/collection/collection.fn.d.ts +0 -5
- package/dist/libs/packages/core/src/collection/index.d.ts +0 -1014
- package/dist/libs/packages/core/src/collection/transaction.d.ts +0 -845
- package/dist/libs/packages/core/src/collection/transaction.fn.d.ts +0 -10
- package/dist/libs/packages/core/src/common/array.d.ts +0 -2
- package/dist/libs/packages/core/src/common/hash.d.ts +0 -10
- package/dist/libs/packages/core/src/common/index.d.ts +0 -42
- package/dist/libs/packages/core/src/common/number.d.ts +0 -7
- package/dist/libs/packages/core/src/common/object.d.ts +0 -5
- package/dist/libs/packages/core/src/common/objectId.d.ts +0 -2
- package/dist/libs/packages/core/src/common/string.d.ts +0 -4
- package/dist/libs/packages/core/src/counter/counter.dto.d.ts +0 -767
- package/dist/libs/packages/core/src/counter/index.d.ts +0 -1
- package/dist/libs/packages/core/src/event/index.d.ts +0 -4246
- package/dist/libs/packages/core/src/feedback/index.d.ts +0 -24
- package/dist/libs/packages/core/src/game/index.d.ts +0 -32
- package/dist/libs/packages/core/src/index.d.ts +0 -21
- package/dist/libs/packages/core/src/internal/index.d.ts +0 -56
- package/dist/libs/packages/core/src/legacy/setting/index.d.ts +0 -89
- package/dist/libs/packages/core/src/location/index.d.ts +0 -44
- package/dist/libs/packages/core/src/loyalty/card/index.d.ts +0 -1296
- package/dist/libs/packages/core/src/loyalty/index.d.ts +0 -3
- package/dist/libs/packages/core/src/loyalty/tier/helper.d.ts +0 -2
- package/dist/libs/packages/core/src/loyalty/tier/index.d.ts +0 -251
- package/dist/libs/packages/core/src/loyalty/title/index.d.ts +0 -4
- package/dist/libs/packages/core/src/marketing-material/index.d.ts +0 -186
- package/dist/libs/packages/core/src/marketing-material/marketing-material.enum.d.ts +0 -3
- package/dist/libs/packages/core/src/notification/index.d.ts +0 -130
- package/dist/libs/packages/core/src/pagination/index.d.ts +0 -25
- package/dist/libs/packages/core/src/permission/index.d.ts +0 -243
- package/dist/libs/packages/core/src/service/index.d.ts +0 -10
- package/dist/libs/packages/core/src/store/dto.d.ts +0 -1069
- package/dist/libs/packages/core/src/store/index.d.ts +0 -3942
- package/dist/libs/packages/core/src/store/store.fn.d.ts +0 -104
- package/dist/libs/packages/core/src/template/index.d.ts +0 -880
- package/dist/libs/packages/core/src/template/templates.d.ts +0 -1239
- package/dist/libs/packages/core/src/user/index.d.ts +0 -245
- package/dist/libs/packages/core/src/user/segment.dto.d.ts +0 -27
- package/dist/libs/packages/core/src/user/segmentation.d.ts +0 -28
- package/dist/libs/packages/core/src/user/user.dto.d.ts +0 -873
- package/dist/libs/packages/core/src/validation/index.d.ts +0 -1
- package/dist/libs/packages/core/src/validation/rule/builder.d.ts +0 -36
- package/dist/libs/packages/core/src/validation/rule/index.d.ts +0 -45
- package/dist/libs/packages/core/src/validation/rule/operator.enum.d.ts +0 -405
- package/dist/libs/packages/core/src/validation/rule/rule.fn.d.ts +0 -6
- package/dist/libs/packages/validation/src/index.d.ts +0 -3
- package/dist/libs/packages/validation/src/rule/rule-builder.d.ts +0 -19
- package/dist/libs/packages/validation/src/rule/rule.d.ts +0 -52
- package/dist/libs/packages/validation/src/rule/validate.d.ts +0 -2
- package/dist/membership-Dq2-b-S_.js +0 -210
- package/dist/packages/connect/src/App.vue.d.ts +0 -2
- package/dist/packages/connect/src/Entry.vue.d.ts +0 -2
- package/dist/packages/connect/src/api/auth/index.d.ts +0 -3
- package/dist/packages/connect/src/api/campaign/index.d.ts +0 -30
- package/dist/packages/connect/src/api/campaign/template.d.ts +0 -5
- package/dist/packages/connect/src/api/index.d.ts +0 -29
- package/dist/packages/connect/src/api/location/index.d.ts +0 -7
- package/dist/packages/connect/src/api/marketing-material/index.d.ts +0 -7
- package/dist/packages/connect/src/api/member/index.d.ts +0 -12
- package/dist/packages/connect/src/api/membership/index.d.ts +0 -28
- package/dist/packages/connect/src/api/segments/index.d.ts +0 -13
- package/dist/packages/connect/src/api/settings/index.d.ts +0 -4
- package/dist/packages/connect/src/api/transaction/index.d.ts +0 -9
- package/dist/packages/connect/src/api/users/index.d.ts +0 -8
- package/dist/packages/connect/src/app.d.ts +0 -16
- package/dist/packages/connect/src/components/NavigationTab.vue.d.ts +0 -2
- package/dist/packages/connect/src/components/analytic/CampaignCard.vue.d.ts +0 -24
- package/dist/packages/connect/src/components/analytic/CampaignChip.vue.d.ts +0 -47
- package/dist/packages/connect/src/components/analytic/CampaignGroup.vue.d.ts +0 -25
- package/dist/packages/connect/src/components/analytic/CampaignStat.vue.d.ts +0 -31
- package/dist/packages/connect/src/components/analytic/LinkCampaign.vue.d.ts +0 -30
- package/dist/packages/connect/src/components/campaign/CampaignChip.vue.d.ts +0 -13
- package/dist/packages/connect/src/components/campaign/CampaignSummary.vue.d.ts +0 -13
- package/dist/packages/connect/src/components/campaign/CampaignTriggerInput.vue.d.ts +0 -34
- package/dist/packages/connect/src/components/campaign/EarningOptionInput.vue.d.ts +0 -50
- package/dist/packages/connect/src/components/campaign/GameTypeInput.vue.d.ts +0 -15
- package/dist/packages/connect/src/components/campaign/MessageInput.vue.d.ts +0 -64
- package/dist/packages/connect/src/components/campaign/PromotionGameTypeInput.vue.d.ts +0 -19
- package/dist/packages/connect/src/components/campaign/ScheduleRuleInput.vue.d.ts +0 -29
- package/dist/packages/connect/src/components/campaign/TargetLocationInput.vue.d.ts +0 -32
- package/dist/packages/connect/src/components/campaign/ValidityInput.vue.d.ts +0 -59
- package/dist/packages/connect/src/components/collectible/CollectibleChip.vue.d.ts +0 -13
- package/dist/packages/connect/src/components/collectible/CollectibleOptionInput.vue.d.ts +0 -59
- package/dist/packages/connect/src/components/collection/Collections.vue.d.ts +0 -2
- package/dist/packages/connect/src/components/common/BaseTable.vue.d.ts +0 -80
- package/dist/packages/connect/src/components/common/FmTableSelection.vue.d.ts +0 -22
- package/dist/packages/connect/src/components/custom/ChipMenu.vue.d.ts +0 -96
- package/dist/packages/connect/src/components/custom/CustomSelect.vue.d.ts +0 -68
- package/dist/packages/connect/src/components/custom/DateInput.vue.d.ts +0 -24
- package/dist/packages/connect/src/components/custom/DateRangeChip.vue.d.ts +0 -25
- package/dist/packages/connect/src/components/custom/DateRangeInput.vue.d.ts +0 -28
- package/dist/packages/connect/src/components/custom/FilterChip.vue.d.ts +0 -90
- package/dist/packages/connect/src/components/custom/ImageInput.vue.d.ts +0 -115
- package/dist/packages/connect/src/components/custom/json/JsonNode.vue.d.ts +0 -36
- package/dist/packages/connect/src/components/custom/json/JsonViewer.vue.d.ts +0 -22
- package/dist/packages/connect/src/components/custom/zod/ZodTextField.vue.d.ts +0 -52
- package/dist/packages/connect/src/components/loading/ImageLoading.vue.d.ts +0 -2
- package/dist/packages/connect/src/components/loading/LottieAnimation.vue.d.ts +0 -39
- package/dist/packages/connect/src/components/loading/Splash.vue.d.ts +0 -2
- package/dist/packages/connect/src/components/loyalty/CampaignTypeDialog.vue.d.ts +0 -13
- package/dist/packages/connect/src/components/loyalty/CreditCoinDialog.vue.d.ts +0 -29
- package/dist/packages/connect/src/components/loyalty/TierExpression.vue.d.ts +0 -32
- package/dist/packages/connect/src/components/marketing/HeadlineStyleSideSheet.vue.d.ts +0 -42
- package/dist/packages/connect/src/components/marketing/ImageSideSheet.vue.d.ts +0 -40
- package/dist/packages/connect/src/components/marketing/LinkRewardSideSheet.vue.d.ts +0 -30
- package/dist/packages/connect/src/components/marketing/MarketingSheet.vue.d.ts +0 -2
- package/dist/packages/connect/src/components/marketing/RewardDropDown.vue.d.ts +0 -26
- package/dist/packages/connect/src/components/marketing/RightSheet.vue.d.ts +0 -66
- package/dist/packages/connect/src/components/marketing/SlideUpDown.vue.d.ts +0 -27
- package/dist/packages/connect/src/components/marketing/platform/BrandAppImage.vue.d.ts +0 -103
- package/dist/packages/connect/src/components/marketing/platform/FacebookPost.vue.d.ts +0 -103
- package/dist/packages/connect/src/components/marketing/platform/FacebookStory.vue.d.ts +0 -103
- package/dist/packages/connect/src/components/marketing/platform/ImageCanvas.vue.d.ts +0 -81
- package/dist/packages/connect/src/components/marketing/platform/InstagramPost.vue.d.ts +0 -102
- package/dist/packages/connect/src/components/marketing/platform/InstagramReel.vue.d.ts +0 -102
- package/dist/packages/connect/src/components/marketing/platform/InstagramStory.vue.d.ts +0 -102
- package/dist/packages/connect/src/components/marketing/platform/TvImage.vue.d.ts +0 -103
- package/dist/packages/connect/src/components/member/MemberDetail.vue.d.ts +0 -2
- package/dist/packages/connect/src/components/member/MemberList.vue.d.ts +0 -2
- package/dist/packages/connect/src/components/member/MemberOverview.vue.d.ts +0 -2
- package/dist/packages/connect/src/components/member/MemberStatsDialog.vue.d.ts +0 -21
- package/dist/packages/connect/src/components/rule/BillRuleGroup.vue.d.ts +0 -19
- package/dist/packages/connect/src/components/rule/CustomRuleDialog.vue.d.ts +0 -30
- package/dist/packages/connect/src/components/rule/FeedbackRuleGroup.vue.d.ts +0 -19
- package/dist/packages/connect/src/components/rule/PresetRuleDialog.vue.d.ts +0 -20
- package/dist/packages/connect/src/components/rule/RuleConfigurator.vue.d.ts +0 -37
- package/dist/packages/connect/src/components/rule/RuleEntry.vue.d.ts +0 -19
- package/dist/packages/connect/src/components/rule/RuleEquator.vue.d.ts +0 -31
- package/dist/packages/connect/src/components/rule/RuleGroup.vue.d.ts +0 -30
- package/dist/packages/connect/src/components/rule/SegmentConfigurator.vue.d.ts +0 -17
- package/dist/packages/connect/src/components/rule/TimeRuleGroup.vue.d.ts +0 -19
- package/dist/packages/connect/src/components/rule/UserRuleGroup.vue.d.ts +0 -19
- package/dist/packages/connect/src/components/rule/equators/BirthdayInput.vue.d.ts +0 -15
- package/dist/packages/connect/src/components/rule/equators/IsDayInput.vue.d.ts +0 -24
- package/dist/packages/connect/src/components/rule/equators/IsInMonthInput.vue.d.ts +0 -16
- package/dist/packages/connect/src/components/rule/equators/IsRangeInput.vue.d.ts +0 -55
- package/dist/packages/connect/src/components/rule/equators/RruleInput.vue.d.ts +0 -37
- package/dist/packages/connect/src/components/rule/presets.d.ts +0 -18
- package/dist/packages/connect/src/components/segment/ReviewSegment.vue.d.ts +0 -16
- package/dist/packages/connect/src/components/setting/LinkDeviceDialog.vue.d.ts +0 -2
- package/dist/packages/connect/src/components/store/AddBundleCard.vue.d.ts +0 -6
- package/dist/packages/connect/src/components/store/CategoryDialog.vue.d.ts +0 -23
- package/dist/packages/connect/src/components/store/StoreBundleCard.vue.d.ts +0 -20
- package/dist/packages/connect/src/components/store/StoreTransactions.vue.d.ts +0 -10
- package/dist/packages/connect/src/components/stripe/StripeSetting.vue.d.ts +0 -21
- package/dist/packages/connect/src/components/tax/TaxInclusiveSetting.vue.d.ts +0 -30
- package/dist/packages/connect/src/components/tax/TaxVariantSetting.vue.d.ts +0 -24
- package/dist/packages/connect/src/components/template/TemplateDialog.vue.d.ts +0 -24
- package/dist/packages/connect/src/components/template/TemplateInput.vue.d.ts +0 -54
- package/dist/packages/connect/src/components/tier/TierCard.vue.d.ts +0 -39
- package/dist/packages/connect/src/components/transactions/CollectionTransactions.vue.d.ts +0 -10
- package/dist/packages/connect/src/components/transactions/MemberTransactions.vue.d.ts +0 -2
- package/dist/packages/connect/src/composables/export.d.ts +0 -11
- package/dist/packages/connect/src/composables/index.d.ts +0 -2
- package/dist/packages/connect/src/composables/loading.d.ts +0 -19
- package/dist/packages/connect/src/composables/template.d.ts +0 -7
- package/dist/packages/connect/src/composables/usePagination.d.ts +0 -32
- package/dist/packages/connect/src/export/base.export.d.ts +0 -7
- package/dist/packages/connect/src/export/card.export.d.ts +0 -9
- package/dist/packages/connect/src/export/collection-transaction.export.d.ts +0 -14
- package/dist/packages/connect/src/export/collection.export.d.ts +0 -9
- package/dist/packages/connect/src/export/index.d.ts +0 -11
- package/dist/packages/connect/src/export/member.export.d.ts +0 -33
- package/dist/packages/connect/src/export/store-transaction.export.d.ts +0 -14
- package/dist/packages/connect/src/helpers/campaign.d.ts +0 -94
- package/dist/packages/connect/src/helpers/collectible.d.ts +0 -58
- package/dist/packages/connect/src/helpers/common.d.ts +0 -1
- package/dist/packages/connect/src/helpers/country.d.ts +0 -21
- package/dist/packages/connect/src/helpers/currency.d.ts +0 -2
- package/dist/packages/connect/src/helpers/effect.d.ts +0 -7
- package/dist/packages/connect/src/helpers/message.d.ts +0 -32
- package/dist/packages/connect/src/helpers/number.d.ts +0 -3
- package/dist/packages/connect/src/helpers/qr.d.ts +0 -7
- package/dist/packages/connect/src/helpers/rrule.d.ts +0 -26
- package/dist/packages/connect/src/helpers/rule.d.ts +0 -91
- package/dist/packages/connect/src/helpers/string.d.ts +0 -16
- package/dist/packages/connect/src/helpers/tax.d.ts +0 -74
- package/dist/packages/connect/src/helpers/trigger.d.ts +0 -59
- package/dist/packages/connect/src/helpers/user.d.ts +0 -6
- package/dist/packages/connect/src/helpers/zod.d.ts +0 -27
- package/dist/packages/connect/src/layouts/MainLayout.vue.d.ts +0 -2
- package/dist/packages/connect/src/main.d.ts +0 -2
- package/dist/packages/connect/src/router/index.d.ts +0 -5
- package/dist/packages/connect/src/router/name.d.ts +0 -2
- package/dist/packages/connect/src/router/shared.d.ts +0 -11
- package/dist/packages/connect/src/sheets/analytic/AnalyticSheet.vue.d.ts +0 -12
- package/dist/packages/connect/src/sheets/campaign/EditCampaignSheet.vue.d.ts +0 -11
- package/dist/packages/connect/src/sheets/campaign/SendVoucherSheet.vue.d.ts +0 -13
- package/dist/packages/connect/src/sheets/card/CardDesignSheet.vue.d.ts +0 -9
- package/dist/packages/connect/src/sheets/card/CreateCardSheet.vue.d.ts +0 -11
- package/dist/packages/connect/src/sheets/collectible/EditRewardSheet.vue.d.ts +0 -15
- package/dist/packages/connect/src/sheets/collectible/EditTitleSheet.vue.d.ts +0 -15
- package/dist/packages/connect/src/sheets/collection/CreateCollectionSheet.vue.d.ts +0 -9
- package/dist/packages/connect/src/sheets/effect/EffectSheet.vue.d.ts +0 -135
- package/dist/packages/connect/src/sheets/member/MemberDetailSheet.vue.d.ts +0 -22
- package/dist/packages/connect/src/sheets/store/StoreSettingSheet.vue.d.ts +0 -80
- package/dist/packages/connect/src/types/index.d.ts +0 -4
- package/dist/packages/connect/src/views/Analytic.vue.d.ts +0 -2
- package/dist/packages/connect/src/views/Marketing.vue.d.ts +0 -2
- package/dist/packages/connect/src/views/Setting.vue.d.ts +0 -2
- package/dist/packages/connect/src/views/Transaction.vue.d.ts +0 -2
- package/dist/packages/connect/src/views/campaign/Broadcast.vue.d.ts +0 -2
- package/dist/packages/connect/src/views/campaign/Promotion.vue.d.ts +0 -2
- package/dist/packages/connect/src/views/campaign/Voucher.vue.d.ts +0 -2
- package/dist/packages/connect/src/views/loyalty/Card.vue.d.ts +0 -2
- package/dist/packages/connect/src/views/loyalty/Member.vue.d.ts +0 -2
- package/dist/packages/connect/src/views/loyalty/Segment.vue.d.ts +0 -2
- package/dist/packages/connect/src/views/program/Credit.vue.d.ts +0 -2
- package/dist/packages/connect/src/views/program/Experience.vue.d.ts +0 -2
- package/dist/packages/connect/src/views/program/Game.vue.d.ts +0 -2
- package/dist/packages/connect/src/views/program/Point.vue.d.ts +0 -2
- package/dist/packages/connect/src/views/program/Tier.vue.d.ts +0 -2
- package/dist/packages/connect/src/views/program/Title.vue.d.ts +0 -2
- package/dist/packages/connect/src/views/store/Store.vue.d.ts +0 -2
- package/dist/packages/connect/src/views/store/StoreRewards.vue.d.ts +0 -2
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { defineComponent as G, computed as
|
|
1
|
+
import { defineComponent as G, computed as D, resolveComponent as V, openBlock as h, createBlock as O, withCtx as P, createElementVNode as v, createVNode as r, createElementBlock as U, toDisplayString as ae, unref as e, Fragment as z, renderList as oe, ref as A, isRef as ue, createCommentVNode as W, reactive as Ie, onMounted as me, watch as ve, toRaw as Re, createTextVNode as te, h as De } from "vue";
|
|
2
2
|
import { _ as Be } from "./tier-BJDhpH6X.js";
|
|
3
|
-
import { useDialog as
|
|
4
|
-
import { d as Q, a as
|
|
5
|
-
import { u as Ue, C as
|
|
6
|
-
import { a as je, c as
|
|
7
|
-
import { d as
|
|
8
|
-
import { F as qe, a as Ke, b as We, c as
|
|
9
|
-
import { _ as
|
|
10
|
-
import { _ as
|
|
11
|
-
import { _ as
|
|
12
|
-
import { _ as
|
|
13
|
-
import { _ as
|
|
14
|
-
import { z as Ge, a as Ze } from "./money-
|
|
15
|
-
import { F as Qe } from "./number-
|
|
16
|
-
import { t as Xe } from "./helper-
|
|
3
|
+
import { useDialog as Te, useDialogChild as Ne, components as Ae } from "@feedmepos/ui-library";
|
|
4
|
+
import { d as Q, a as Oe, u as Ee, p as ce, n as Me, f as pe } from "./loading-C1IzY-n2.js";
|
|
5
|
+
import { u as Ue, C as se } from "./membership-D3I4udu3.js";
|
|
6
|
+
import { a as je, c as Pe } from "./object-qECH92oz.js";
|
|
7
|
+
import { d as T, z as q, i as fe, S as Le, u as be, J as he, b as He } from "./app-BvizV9z5.js";
|
|
8
|
+
import { F as qe, a as Ke, b as We, c as $e } from "./index-CjZxaXvZ.js";
|
|
9
|
+
import { _ as J, Z as K, g as L, a as H } from "./ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js";
|
|
10
|
+
import { _ as de } from "./lodash-BMQ4xbjY.js";
|
|
11
|
+
import { _ as ze } from "./index-BLWw_MlC.js";
|
|
12
|
+
import { _ as Je } from "./ImageInput.vue_vue_type_script_setup_true_lang-DpYjrT3G.js";
|
|
13
|
+
import { _ as Ye } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
14
|
+
import { z as Ge, a as Ze } from "./money-BQEcWGhZ.js";
|
|
15
|
+
import { F as Qe } from "./number-DGx2QPUy.js";
|
|
16
|
+
import { t as Xe } from "./helper-CiIZ1pUo.js";
|
|
17
17
|
import { useRouter as et } from "vue-router";
|
|
18
|
-
import { m as ye } from "./index-
|
|
18
|
+
import { m as ye } from "./index-C5N8jeJ1.js";
|
|
19
19
|
function tt(f) {
|
|
20
20
|
return Q.DineroFactory(f).toUnit();
|
|
21
21
|
}
|
|
22
|
-
function ot(f, b, u,
|
|
23
|
-
const p =
|
|
24
|
-
b.map((d) => f.find((i) => i.systemCode === d.systemCode && i.taxCode === d.taxCode)).filter((d) => !!d &&
|
|
22
|
+
function ot(f, b, u, w, _ = [], a = []) {
|
|
23
|
+
const p = ze.compact(
|
|
24
|
+
b.map((d) => f.find((i) => i.systemCode === d.systemCode && i.taxCode === d.taxCode)).filter((d) => !!d && a.includes(d.systemCode))
|
|
25
25
|
), m = p.reduce(
|
|
26
26
|
(d, i) => {
|
|
27
27
|
var n;
|
|
@@ -43,7 +43,7 @@ function ot(f, b, u, F, _ = [], t = []) {
|
|
|
43
43
|
});
|
|
44
44
|
},
|
|
45
45
|
{}
|
|
46
|
-
),
|
|
46
|
+
), t = Q.Calculator.calculate({
|
|
47
47
|
items: {
|
|
48
48
|
0: {
|
|
49
49
|
quantity: 1,
|
|
@@ -52,7 +52,7 @@ function ot(f, b, u, F, _ = [], t = []) {
|
|
|
52
52
|
level: 0,
|
|
53
53
|
type: {
|
|
54
54
|
type: "BY_AMOUNT",
|
|
55
|
-
amount: Q.DineroFactory(u).subtract(Q.Dinero.fromNumber({ number:
|
|
55
|
+
amount: Q.DineroFactory(u).subtract(Q.Dinero.fromNumber({ number: w }).toObject()).toObject()
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
},
|
|
@@ -69,14 +69,14 @@ function ot(f, b, u, F, _ = [], t = []) {
|
|
|
69
69
|
taxCode: d.taxCode,
|
|
70
70
|
rate: d.rate,
|
|
71
71
|
total: Q.DineroFactory({
|
|
72
|
-
...
|
|
72
|
+
...t.items[0].taxes[d.taxCode]
|
|
73
73
|
}).convertPrecision(2).toObject()
|
|
74
74
|
}));
|
|
75
75
|
}
|
|
76
76
|
function at(f, b, u) {
|
|
77
|
-
return f ? f.reduce((
|
|
78
|
-
var
|
|
79
|
-
return (
|
|
77
|
+
return f ? f.reduce((w, _) => {
|
|
78
|
+
var a;
|
|
79
|
+
return (a = u.find((p) => p.systemCode === _.systemCode)) != null && a.inclusive || (w = Q.DineroFactory(w.toObject()).add(_.total)), w;
|
|
80
80
|
}, Q.DineroFactory(b)).toObject() : Q.DineroFactory(b).toObject();
|
|
81
81
|
}
|
|
82
82
|
const nt = { class: "absolute top-0 right-0" }, lt = { class: "relative h-[120px] aspect-video flex items-center justify-center border rounded-md border-fm-color-neutral-gray-300" }, st = ["src"], rt = { class: "fm-typo-en-body-lg-600" }, it = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, dt = { class: "flex gap-8 items-center flex-wrap" }, ut = /* @__PURE__ */ G({
|
|
@@ -86,42 +86,42 @@ const nt = { class: "absolute top-0 right-0" }, lt = { class: "relative h-[120px
|
|
|
86
86
|
},
|
|
87
87
|
emits: ["edit", "delete"],
|
|
88
88
|
setup(f, { emit: b }) {
|
|
89
|
-
const u = f,
|
|
89
|
+
const u = f, w = b, _ = D(() => {
|
|
90
90
|
const p = [];
|
|
91
91
|
return u.bundle.price.amount > 0 && p.push(
|
|
92
|
-
`${
|
|
92
|
+
`${T.Config.getCountry().currency.symbol}${tt(u.bundle.price)}`
|
|
93
93
|
), u.bundle.coinPrice && p.push(`${u.bundle.coinPrice} point(s)`), p.join(" or ");
|
|
94
|
-
}),
|
|
95
|
-
var m,
|
|
94
|
+
}), a = D(() => {
|
|
95
|
+
var m, t;
|
|
96
96
|
const p = [];
|
|
97
97
|
if (u.bundle.titles.length > 0 && p.push(`${u.bundle.titles.length} title(s)`), u.bundle.vouchers.length > 0 && p.push(`${u.bundle.vouchers.length} voucher(s)`), u.bundle.credit.normal || (m = u.bundle.credit.free) != null && m.amount) {
|
|
98
|
-
const d = u.bundle.credit.normal + (((
|
|
98
|
+
const d = u.bundle.credit.normal + (((t = u.bundle.credit.free) == null ? void 0 : t.amount) ?? 0);
|
|
99
99
|
p.push(`${d} credit(s)`);
|
|
100
100
|
}
|
|
101
101
|
return p;
|
|
102
102
|
});
|
|
103
103
|
return (p, m) => {
|
|
104
|
-
const
|
|
105
|
-
return h(),
|
|
104
|
+
const t = V("FmButton"), d = V("FmMenuItem"), i = V("FmMenu"), n = V("FmIcon"), y = V("FmChip"), l = V("FmCard");
|
|
105
|
+
return h(), O(l, {
|
|
106
106
|
variant: "outlined",
|
|
107
107
|
class: "flex flex-col gap-y-8 p-16 min-h-[240px] h-full text-center items-center relative"
|
|
108
108
|
}, {
|
|
109
|
-
default:
|
|
109
|
+
default: P(() => [
|
|
110
110
|
v("div", nt, [
|
|
111
111
|
r(i, { placement: "bottom-end" }, {
|
|
112
|
-
"menu-button":
|
|
113
|
-
r(
|
|
112
|
+
"menu-button": P(() => [
|
|
113
|
+
r(t, {
|
|
114
114
|
icon: "more_vert",
|
|
115
115
|
variant: "tertiary"
|
|
116
116
|
})
|
|
117
117
|
]),
|
|
118
|
-
default:
|
|
118
|
+
default: P(() => [
|
|
119
119
|
r(d, {
|
|
120
|
-
onClick: m[0] || (m[0] = (g) =>
|
|
120
|
+
onClick: m[0] || (m[0] = (g) => w("edit", f.bundle)),
|
|
121
121
|
label: "Edit"
|
|
122
122
|
}),
|
|
123
123
|
r(d, {
|
|
124
|
-
onClick: m[1] || (m[1] = (g) =>
|
|
124
|
+
onClick: m[1] || (m[1] = (g) => w("delete", f.bundle)),
|
|
125
125
|
label: "Delete"
|
|
126
126
|
})
|
|
127
127
|
]),
|
|
@@ -129,11 +129,11 @@ const nt = { class: "absolute top-0 right-0" }, lt = { class: "relative h-[120px
|
|
|
129
129
|
})
|
|
130
130
|
]),
|
|
131
131
|
v("div", lt, [
|
|
132
|
-
f.bundle.image ? (h(),
|
|
132
|
+
f.bundle.image ? (h(), U("img", {
|
|
133
133
|
key: 1,
|
|
134
134
|
src: f.bundle.image,
|
|
135
135
|
class: "w-full h-full object-contain aspect-video"
|
|
136
|
-
}, null, 8, st)) : (h(),
|
|
136
|
+
}, null, 8, st)) : (h(), O(n, {
|
|
137
137
|
key: 0,
|
|
138
138
|
name: "image",
|
|
139
139
|
outline: !0,
|
|
@@ -141,11 +141,11 @@ const nt = { class: "absolute top-0 right-0" }, lt = { class: "relative h-[120px
|
|
|
141
141
|
class: "text-fm-color-neutral-gray-200"
|
|
142
142
|
}))
|
|
143
143
|
]),
|
|
144
|
-
v("div", rt,
|
|
145
|
-
v("div", it,
|
|
144
|
+
v("div", rt, ae(f.bundle.name), 1),
|
|
145
|
+
v("div", it, ae(e(_) || "Free"), 1),
|
|
146
146
|
v("div", dt, [
|
|
147
|
-
(h(!0),
|
|
148
|
-
key:
|
|
147
|
+
(h(!0), U(z, null, oe(e(a), (g, I) => (h(), O(y, {
|
|
148
|
+
key: I,
|
|
149
149
|
label: g
|
|
150
150
|
}, null, 8, ["label"]))), 128))
|
|
151
151
|
])
|
|
@@ -159,14 +159,14 @@ const nt = { class: "absolute top-0 right-0" }, lt = { class: "relative h-[120px
|
|
|
159
159
|
emits: ["create"],
|
|
160
160
|
setup(f, { emit: b }) {
|
|
161
161
|
const u = b;
|
|
162
|
-
return (
|
|
163
|
-
const
|
|
164
|
-
return h(),
|
|
162
|
+
return (w, _) => {
|
|
163
|
+
const a = V("FmButton"), p = V("FmCard");
|
|
164
|
+
return h(), O(p, {
|
|
165
165
|
variant: "outlined",
|
|
166
166
|
class: "flex flex-col gap-y-8 p-16 h-full min-h-[240px] items-center justify-center"
|
|
167
167
|
}, {
|
|
168
|
-
default:
|
|
169
|
-
r(
|
|
168
|
+
default: P(() => [
|
|
169
|
+
r(a, {
|
|
170
170
|
onClick: _[0] || (_[0] = (m) => u("create")),
|
|
171
171
|
label: "Add bundle",
|
|
172
172
|
icon: "add",
|
|
@@ -190,30 +190,30 @@ const nt = { class: "absolute top-0 right-0" }, lt = { class: "relative h-[120px
|
|
|
190
190
|
}
|
|
191
191
|
},
|
|
192
192
|
setup(f) {
|
|
193
|
-
const b = f, u =
|
|
194
|
-
const i = p.safeParse(
|
|
193
|
+
const b = f, u = Te(), { emitData: w, emitAction: _ } = Ne(), a = A(b.initialValue), p = q.string().min(1), m = D(() => {
|
|
194
|
+
const i = p.safeParse(a.value);
|
|
195
195
|
return i.success ? "" : i.error.flatten().formErrors.join(`
|
|
196
196
|
`);
|
|
197
197
|
});
|
|
198
|
-
function
|
|
199
|
-
|
|
198
|
+
function t() {
|
|
199
|
+
w(a.value), _("primary"), u.close();
|
|
200
200
|
}
|
|
201
201
|
function d() {
|
|
202
|
-
|
|
202
|
+
w(null), _("primary"), u.close();
|
|
203
203
|
}
|
|
204
204
|
return (i, n) => {
|
|
205
205
|
const y = V("FmTextField"), l = V("FmButton");
|
|
206
|
-
return h(),
|
|
206
|
+
return h(), U("div", null, [
|
|
207
207
|
r(y, {
|
|
208
|
-
modelValue: e(
|
|
209
|
-
"onUpdate:modelValue": n[0] || (n[0] = (g) => ue(
|
|
208
|
+
modelValue: e(a),
|
|
209
|
+
"onUpdate:modelValue": n[0] || (n[0] = (g) => ue(a) ? a.value = g : null),
|
|
210
210
|
label: "Category name",
|
|
211
211
|
"helper-text": e(m),
|
|
212
212
|
"helper-state": e(m) ? "error" : "none"
|
|
213
213
|
}, null, 8, ["modelValue", "helper-text", "helper-state"]),
|
|
214
214
|
v("div", ct, [
|
|
215
215
|
v("div", null, [
|
|
216
|
-
f.action == "edit" ? (h(),
|
|
216
|
+
f.action == "edit" ? (h(), O(l, {
|
|
217
217
|
key: 0,
|
|
218
218
|
onClick: d,
|
|
219
219
|
label: "Delete",
|
|
@@ -229,7 +229,7 @@ const nt = { class: "absolute top-0 right-0" }, lt = { class: "relative h-[120px
|
|
|
229
229
|
r(l, {
|
|
230
230
|
label: f.action == "edit" ? "Edit" : "Add",
|
|
231
231
|
disabled: !!e(m),
|
|
232
|
-
onClick:
|
|
232
|
+
onClick: t
|
|
233
233
|
}, null, 8, ["label", "disabled"])
|
|
234
234
|
])
|
|
235
235
|
])
|
|
@@ -310,40 +310,40 @@ const yt = {
|
|
|
310
310
|
return ge(this);
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
|
-
},
|
|
313
|
+
}, re = () => T.Config.getCountry(), ie = {
|
|
314
314
|
get fullCurrency() {
|
|
315
|
-
return
|
|
315
|
+
return re().currency;
|
|
316
316
|
},
|
|
317
317
|
get currency() {
|
|
318
|
-
return
|
|
318
|
+
return re().currency.code;
|
|
319
319
|
},
|
|
320
320
|
get fullTax() {
|
|
321
|
-
return
|
|
321
|
+
return T.Country.getCountryFlattenTaxes(re().code);
|
|
322
322
|
},
|
|
323
323
|
get taxSystem() {
|
|
324
|
-
return
|
|
324
|
+
return re().taxSystems;
|
|
325
325
|
},
|
|
326
326
|
taxInclusion(f) {
|
|
327
|
-
return
|
|
327
|
+
return ie.taxSystem.map((b) => ({
|
|
328
328
|
systemCode: b.code,
|
|
329
329
|
inclusive: f !== void 0 ? f : !1
|
|
330
330
|
}));
|
|
331
331
|
},
|
|
332
332
|
groupedTaxOptions() {
|
|
333
|
-
const f =
|
|
334
|
-
return
|
|
333
|
+
const f = T.Country.getCountryFlattenTaxes(re().code);
|
|
334
|
+
return ie.taxSystem.map((b) => ({
|
|
335
335
|
code: b.code,
|
|
336
|
-
options: f.map((u) => ({ ...u, feedmeTaxCode:
|
|
336
|
+
options: f.map((u) => ({ ...u, feedmeTaxCode: ie.generateCode(u) })).filter((u) => u.systemCode === b.code)
|
|
337
337
|
}));
|
|
338
338
|
},
|
|
339
339
|
systemDefaultCode(f) {
|
|
340
|
-
const b =
|
|
340
|
+
const b = ie.groupedTaxOptions().find((u) => u.code === f);
|
|
341
341
|
return b == null ? void 0 : b.options.find((u) => u.default);
|
|
342
342
|
},
|
|
343
343
|
generateCode(f) {
|
|
344
344
|
return `${f.systemCode}/${f.taxCode}`;
|
|
345
345
|
}
|
|
346
|
-
},
|
|
346
|
+
}, Y = ie, gt = /* @__PURE__ */ G({
|
|
347
347
|
__name: "TaxInclusiveSetting",
|
|
348
348
|
props: {
|
|
349
349
|
modelValue: {
|
|
@@ -354,16 +354,16 @@ const yt = {
|
|
|
354
354
|
},
|
|
355
355
|
emits: ["update:model-value"],
|
|
356
356
|
setup(f, { emit: b }) {
|
|
357
|
-
const u = f,
|
|
357
|
+
const u = f, w = Y.taxSystem, _ = b, a = A(u.modelValue);
|
|
358
358
|
function p(i, n) {
|
|
359
|
-
const y =
|
|
359
|
+
const y = de.clone(u.modelValue), l = y.findIndex((g) => g.systemCode === i);
|
|
360
360
|
l >= 0 ? y[l].inclusive = n : y.push({
|
|
361
361
|
systemCode: i,
|
|
362
362
|
inclusive: n
|
|
363
|
-
}),
|
|
363
|
+
}), a.value = y, _("update:model-value", y);
|
|
364
364
|
}
|
|
365
365
|
function m() {
|
|
366
|
-
return
|
|
366
|
+
return w.map((i) => {
|
|
367
367
|
const n = u.modelValue ? u.modelValue.find((y) => y.systemCode === i.code) : !1;
|
|
368
368
|
return {
|
|
369
369
|
label: i.name,
|
|
@@ -376,31 +376,31 @@ const yt = {
|
|
|
376
376
|
};
|
|
377
377
|
});
|
|
378
378
|
}
|
|
379
|
-
const
|
|
379
|
+
const t = Ie(m());
|
|
380
380
|
function d(i, n) {
|
|
381
381
|
return `${i} ${n ? "Inclusive" : "Exclusive"}`;
|
|
382
382
|
}
|
|
383
383
|
return me(() => {
|
|
384
|
-
u.modelValue.length || p(
|
|
384
|
+
u.modelValue.length || p(w[0].code, !1);
|
|
385
385
|
}), ve(
|
|
386
386
|
() => u.modelValue,
|
|
387
387
|
(i, n) => {
|
|
388
|
-
i != n && !i.length && p(
|
|
388
|
+
i != n && !i.length && p(w[0].code, !1);
|
|
389
389
|
}
|
|
390
390
|
), (i, n) => {
|
|
391
391
|
const y = V("FmSwitch");
|
|
392
|
-
return h(!0),
|
|
393
|
-
var
|
|
394
|
-
return h(),
|
|
392
|
+
return h(!0), U(z, null, oe(e(t), (l, g) => {
|
|
393
|
+
var I;
|
|
394
|
+
return h(), U("div", { key: g }, [
|
|
395
395
|
r(y, {
|
|
396
|
-
"model-value": ((
|
|
396
|
+
"model-value": ((I = e(a)[g]) == null ? void 0 : I.inclusive) || !1,
|
|
397
397
|
"label-placement": "left",
|
|
398
398
|
"onUpdate:modelValue": (B) => l.input(B)
|
|
399
399
|
}, {
|
|
400
|
-
label:
|
|
400
|
+
label: P(() => {
|
|
401
401
|
var B;
|
|
402
402
|
return [
|
|
403
|
-
v("div", null,
|
|
403
|
+
v("div", null, ae(d(l.label, ((B = e(a)[g]) == null ? void 0 : B.inclusive) || !1)), 1)
|
|
404
404
|
];
|
|
405
405
|
}),
|
|
406
406
|
_: 2
|
|
@@ -421,29 +421,29 @@ const vt = { class: "space-y-8" }, ht = {
|
|
|
421
421
|
},
|
|
422
422
|
emits: ["update:modelValue"],
|
|
423
423
|
setup(f, { emit: b }) {
|
|
424
|
-
const u = f,
|
|
424
|
+
const u = f, w = b, _ = A(!1);
|
|
425
425
|
ve(_, (p, m) => {
|
|
426
|
-
m != p && (!u.modelValue && p ?
|
|
426
|
+
m != p && (!u.modelValue && p ? w("update:modelValue", {
|
|
427
427
|
apiKey: "",
|
|
428
428
|
webhookSecret: ""
|
|
429
|
-
}) : p ||
|
|
429
|
+
}) : p || w("update:modelValue", void 0));
|
|
430
430
|
});
|
|
431
|
-
const
|
|
432
|
-
const p = bt.mode === "development", m =
|
|
433
|
-
return `https://marketing${p ? "-dev" : ""}${
|
|
431
|
+
const a = D(() => {
|
|
432
|
+
const p = bt.mode === "development", m = T.Config.getCountry().code.toLowerCase(), t = m != "my" ? `.${m}` : "";
|
|
433
|
+
return `https://marketing${p ? "-dev" : ""}${t}.feedmeapi.com/stripe/${Le.getBusinessId()}/webhook`;
|
|
434
434
|
});
|
|
435
435
|
return me(() => {
|
|
436
436
|
_.value = !!u.modelValue;
|
|
437
437
|
}), (p, m) => {
|
|
438
|
-
const
|
|
439
|
-
return h(),
|
|
440
|
-
r(
|
|
438
|
+
const t = V("FmSwitch"), d = V("FmTextField"), i = V("FmButton");
|
|
439
|
+
return h(), U("div", vt, [
|
|
440
|
+
r(t, {
|
|
441
441
|
modelValue: e(_),
|
|
442
442
|
"onUpdate:modelValue": m[0] || (m[0] = (n) => ue(_) ? _.value = n : null),
|
|
443
443
|
value: "true",
|
|
444
444
|
label: "Enable Stripe"
|
|
445
445
|
}, null, 8, ["modelValue"]),
|
|
446
|
-
u.modelValue ? (h(),
|
|
446
|
+
u.modelValue ? (h(), U("div", ht, [
|
|
447
447
|
r(d, {
|
|
448
448
|
label: "API Key",
|
|
449
449
|
modelValue: u.modelValue.apiKey,
|
|
@@ -452,15 +452,15 @@ const vt = { class: "space-y-8" }, ht = {
|
|
|
452
452
|
}, null, 8, ["modelValue"]),
|
|
453
453
|
r(d, {
|
|
454
454
|
label: "Webhook URL",
|
|
455
|
-
"model-value": e(
|
|
455
|
+
"model-value": e(a),
|
|
456
456
|
readonly: "",
|
|
457
457
|
"helper-text": "Copy this URL to your Stripe dashboard"
|
|
458
458
|
}, {
|
|
459
|
-
append:
|
|
459
|
+
append: P(() => [
|
|
460
460
|
r(i, {
|
|
461
461
|
icon: "content_copy",
|
|
462
462
|
variant: "tertiary",
|
|
463
|
-
onClick: m[2] || (m[2] = (n) => e(
|
|
463
|
+
onClick: m[2] || (m[2] = (n) => e(Oe)(e(a)))
|
|
464
464
|
})
|
|
465
465
|
]),
|
|
466
466
|
_: 1
|
|
@@ -482,29 +482,29 @@ const vt = { class: "space-y-8" }, ht = {
|
|
|
482
482
|
}, Ct = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, " Company legal information ", -1), Vt = {
|
|
483
483
|
key: 0,
|
|
484
484
|
class: "space-y-16"
|
|
485
|
-
}, St = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, "Tax", -1), Ft = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, "Address", -1), wt = { class: "grid grid-cols-2 gap-x-16 gap-y-16" },
|
|
485
|
+
}, St = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, "Tax", -1), Ft = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, "Address", -1), wt = { class: "grid grid-cols-2 gap-x-16 gap-y-16" }, Pt = { class: "space-y-4" }, $t = /* @__PURE__ */ v("div", { class: "fm-typo-en-body-lg-400" }, "State", -1), Tt = { class: "space-y-16" }, Ut = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-12px]" }, " Stripe Integration ", -1), kt = { class: "flex items-center gap-8" }, It = /* @__PURE__ */ G({
|
|
486
486
|
__name: "StoreSettingSheet",
|
|
487
487
|
emits: ["update"],
|
|
488
488
|
setup(f, { expose: b, emit: u }) {
|
|
489
|
-
const
|
|
489
|
+
const w = u, _ = A(!1), a = A(), p = A(!1), m = qe.extend({
|
|
490
490
|
company: Ke.extend({
|
|
491
|
-
name:
|
|
492
|
-
regNo:
|
|
491
|
+
name: q.string().min(1, "Company name is required"),
|
|
492
|
+
regNo: q.string().min(1, "Registration number is required"),
|
|
493
493
|
address: We.extend({
|
|
494
|
-
line1:
|
|
495
|
-
line2:
|
|
496
|
-
state:
|
|
497
|
-
city:
|
|
498
|
-
postcode:
|
|
499
|
-
country:
|
|
494
|
+
line1: q.string().min(1, "Line 1 is required"),
|
|
495
|
+
line2: q.string().optional(),
|
|
496
|
+
state: q.string().min(1, "State is required"),
|
|
497
|
+
city: q.string().min(1, "City is required"),
|
|
498
|
+
postcode: q.string().min(1, "Postcode is required"),
|
|
499
|
+
country: q.string().min(1, "Country is required")
|
|
500
500
|
}),
|
|
501
|
-
phoneNo:
|
|
502
|
-
sstRegNo:
|
|
501
|
+
phoneNo: q.string().min(1, "Phone number is required"),
|
|
502
|
+
sstRegNo: q.string().optional()
|
|
503
503
|
})
|
|
504
|
-
}),
|
|
504
|
+
}), t = D(() => m.safeParse(a.value).success);
|
|
505
505
|
function d() {
|
|
506
|
-
const y = m.safeParse(
|
|
507
|
-
y.success &&
|
|
506
|
+
const y = m.safeParse(a.value);
|
|
507
|
+
y.success && w("update", y.data);
|
|
508
508
|
}
|
|
509
509
|
function i() {
|
|
510
510
|
return {
|
|
@@ -516,7 +516,7 @@ const vt = { class: "space-y-8" }, ht = {
|
|
|
516
516
|
city: "",
|
|
517
517
|
postcode: "",
|
|
518
518
|
state: "",
|
|
519
|
-
country:
|
|
519
|
+
country: T.Config.getCountry().name
|
|
520
520
|
},
|
|
521
521
|
phoneNo: "",
|
|
522
522
|
regNo: "",
|
|
@@ -526,114 +526,114 @@ const vt = { class: "space-y-8" }, ht = {
|
|
|
526
526
|
};
|
|
527
527
|
}
|
|
528
528
|
function n(y, l) {
|
|
529
|
-
_.value = y, y && (
|
|
529
|
+
_.value = y, y && (a.value = l != null && l.company ? l : i());
|
|
530
530
|
}
|
|
531
531
|
return b({
|
|
532
532
|
showSheet: n,
|
|
533
|
-
data:
|
|
533
|
+
data: a
|
|
534
534
|
}), (y, l) => {
|
|
535
|
-
const g = V("FmIcon"),
|
|
536
|
-
return h(),
|
|
535
|
+
const g = V("FmIcon"), I = V("FmMenuItem"), B = V("FmMenu"), C = V("FmSelect"), $ = V("FmButton"), k = V("FmSideSheet");
|
|
536
|
+
return h(), O(k, {
|
|
537
537
|
"max-width": 560,
|
|
538
538
|
modelValue: e(_),
|
|
539
|
-
"onUpdate:modelValue": l[15] || (l[15] = (
|
|
539
|
+
"onUpdate:modelValue": l[15] || (l[15] = (R) => ue(_) ? _.value = R : null),
|
|
540
540
|
header: "Store setting"
|
|
541
541
|
}, {
|
|
542
|
-
"side-sheet-footer":
|
|
542
|
+
"side-sheet-footer": P(() => [
|
|
543
543
|
v("div", kt, [
|
|
544
544
|
r($, {
|
|
545
545
|
label: "Submit",
|
|
546
546
|
onClick: d,
|
|
547
|
-
disabled: !e(
|
|
547
|
+
disabled: !e(t) || e(be)().isLoading,
|
|
548
548
|
loading: e(be)().isLoading
|
|
549
549
|
}, null, 8, ["disabled", "loading"]),
|
|
550
550
|
r($, {
|
|
551
551
|
label: "Cancel",
|
|
552
|
-
onClick: l[14] || (l[14] = (
|
|
552
|
+
onClick: l[14] || (l[14] = (R) => n(!1)),
|
|
553
553
|
variant: "tertiary"
|
|
554
554
|
})
|
|
555
555
|
])
|
|
556
556
|
]),
|
|
557
|
-
default:
|
|
558
|
-
var
|
|
557
|
+
default: P(() => {
|
|
558
|
+
var R, E;
|
|
559
559
|
return [
|
|
560
|
-
r(he, { json: e(
|
|
561
|
-
e(
|
|
560
|
+
r(he, { json: e(a) }, null, 8, ["json"]),
|
|
561
|
+
e(a) && e(a).company ? (h(), U("div", _t, [
|
|
562
562
|
Ct,
|
|
563
|
-
r(
|
|
564
|
-
modelValue: e(
|
|
565
|
-
"onUpdate:modelValue": l[0] || (l[0] = (c) => e(
|
|
563
|
+
r(J, {
|
|
564
|
+
modelValue: e(a).company.name,
|
|
565
|
+
"onUpdate:modelValue": l[0] || (l[0] = (c) => e(a).company.name = c),
|
|
566
566
|
label: "Company name",
|
|
567
|
-
schema: e(
|
|
567
|
+
schema: e(K).typeAtPath(e(m), "company.name")
|
|
568
568
|
}, null, 8, ["modelValue", "schema"]),
|
|
569
|
-
r(
|
|
570
|
-
modelValue: e(
|
|
571
|
-
"onUpdate:modelValue": l[1] || (l[1] = (c) => e(
|
|
569
|
+
r(J, {
|
|
570
|
+
modelValue: e(a).company.regNo,
|
|
571
|
+
"onUpdate:modelValue": l[1] || (l[1] = (c) => e(a).company.regNo = c),
|
|
572
572
|
label: "Registration number",
|
|
573
|
-
schema: e(
|
|
573
|
+
schema: e(K).typeAtPath(e(m), "company.regNo")
|
|
574
574
|
}, null, 8, ["modelValue", "schema"]),
|
|
575
|
-
r(
|
|
576
|
-
modelValue: e(
|
|
575
|
+
r(J, {
|
|
576
|
+
modelValue: e(a).company.sstRegNo,
|
|
577
577
|
"onUpdate:modelValue": [
|
|
578
|
-
l[2] || (l[2] = (c) => e(
|
|
579
|
-
l[3] || (l[3] = (c) => c ? null : e(
|
|
578
|
+
l[2] || (l[2] = (c) => e(a).company.sstRegNo = c),
|
|
579
|
+
l[3] || (l[3] = (c) => c ? null : e(a).inclusiveTaxes = [])
|
|
580
580
|
],
|
|
581
581
|
label: "Tax Registration number",
|
|
582
|
-
schema: e(
|
|
582
|
+
schema: e(K).typeAtPath(e(m), "company.sstRegNo")
|
|
583
583
|
}, null, 8, ["modelValue", "schema"]),
|
|
584
|
-
(
|
|
584
|
+
(R = e(a).company) != null && R.sstRegNo && e(a).inclusiveTaxes ? (h(), U("div", Vt, [
|
|
585
585
|
St,
|
|
586
586
|
r(gt, {
|
|
587
|
-
modelValue: e(
|
|
588
|
-
"onUpdate:modelValue": l[4] || (l[4] = (c) => e(
|
|
587
|
+
modelValue: e(a).inclusiveTaxes,
|
|
588
|
+
"onUpdate:modelValue": l[4] || (l[4] = (c) => e(a).inclusiveTaxes = c)
|
|
589
589
|
}, null, 8, ["modelValue"])
|
|
590
590
|
])) : W("", !0),
|
|
591
|
-
r(
|
|
592
|
-
modelValue: e(
|
|
593
|
-
"onUpdate:modelValue": l[5] || (l[5] = (c) => e(
|
|
591
|
+
r(J, {
|
|
592
|
+
modelValue: e(a).company.phoneNo,
|
|
593
|
+
"onUpdate:modelValue": l[5] || (l[5] = (c) => e(a).company.phoneNo = c),
|
|
594
594
|
label: "Phone number",
|
|
595
|
-
schema: e(
|
|
595
|
+
schema: e(K).typeAtPath(e(m), "company.phoneNo")
|
|
596
596
|
}, null, 8, ["modelValue", "schema"]),
|
|
597
597
|
Ft,
|
|
598
|
-
r(
|
|
599
|
-
modelValue: e(
|
|
600
|
-
"onUpdate:modelValue": l[6] || (l[6] = (c) => e(
|
|
598
|
+
r(J, {
|
|
599
|
+
modelValue: e(a).company.address.line1,
|
|
600
|
+
"onUpdate:modelValue": l[6] || (l[6] = (c) => e(a).company.address.line1 = c),
|
|
601
601
|
label: "Line 1",
|
|
602
|
-
schema: e(
|
|
602
|
+
schema: e(K).typeAtPath(e(m), "company.address.line1")
|
|
603
603
|
}, null, 8, ["modelValue", "schema"]),
|
|
604
|
-
r(
|
|
605
|
-
modelValue: e(
|
|
606
|
-
"onUpdate:modelValue": l[7] || (l[7] = (c) => e(
|
|
604
|
+
r(J, {
|
|
605
|
+
modelValue: e(a).company.address.line2,
|
|
606
|
+
"onUpdate:modelValue": l[7] || (l[7] = (c) => e(a).company.address.line2 = c),
|
|
607
607
|
label: "Line 2",
|
|
608
|
-
schema: e(
|
|
608
|
+
schema: e(K).typeAtPath(e(m), "company.address.line2")
|
|
609
609
|
}, null, 8, ["modelValue", "schema"]),
|
|
610
610
|
v("div", wt, [
|
|
611
|
-
r(
|
|
612
|
-
modelValue: e(
|
|
613
|
-
"onUpdate:modelValue": l[8] || (l[8] = (c) => e(
|
|
611
|
+
r(J, {
|
|
612
|
+
modelValue: e(a).company.address.city,
|
|
613
|
+
"onUpdate:modelValue": l[8] || (l[8] = (c) => e(a).company.address.city = c),
|
|
614
614
|
label: "City",
|
|
615
|
-
schema: e(
|
|
615
|
+
schema: e(K).typeAtPath(e(m), "company.address.city")
|
|
616
616
|
}, null, 8, ["modelValue", "schema"]),
|
|
617
|
-
r(
|
|
618
|
-
modelValue: e(
|
|
619
|
-
"onUpdate:modelValue": l[9] || (l[9] = (c) => e(
|
|
617
|
+
r(J, {
|
|
618
|
+
modelValue: e(a).company.address.postcode,
|
|
619
|
+
"onUpdate:modelValue": l[9] || (l[9] = (c) => e(a).company.address.postcode = c),
|
|
620
620
|
label: "Postcode",
|
|
621
|
-
schema: e(
|
|
621
|
+
schema: e(K).typeAtPath(e(m), "company.address.postcode")
|
|
622
622
|
}, null, 8, ["modelValue", "schema"]),
|
|
623
|
-
v("div",
|
|
624
|
-
|
|
623
|
+
v("div", Pt, [
|
|
624
|
+
$t,
|
|
625
625
|
r(B, {
|
|
626
626
|
placement: "top-end",
|
|
627
627
|
"model-value": e(p)
|
|
628
628
|
}, {
|
|
629
|
-
"menu-button":
|
|
630
|
-
r(
|
|
631
|
-
modelValue: e(
|
|
632
|
-
"onUpdate:modelValue": l[10] || (l[10] = (c) => e(
|
|
633
|
-
schema: e(
|
|
629
|
+
"menu-button": P(() => [
|
|
630
|
+
r(J, {
|
|
631
|
+
modelValue: e(a).company.address.state,
|
|
632
|
+
"onUpdate:modelValue": l[10] || (l[10] = (c) => e(a).company.address.state = c),
|
|
633
|
+
schema: e(K).typeAtPath(e(m), "company.address.state"),
|
|
634
634
|
onFocusChanged: l[11] || (l[11] = (c) => p.value = c)
|
|
635
635
|
}, {
|
|
636
|
-
append:
|
|
636
|
+
append: P(() => [
|
|
637
637
|
r(g, {
|
|
638
638
|
name: e(p) ? "keyboard_arrow_up" : "keyboard_arrow_down"
|
|
639
639
|
}, null, 8, ["name"])
|
|
@@ -641,18 +641,18 @@ const vt = { class: "space-y-8" }, ht = {
|
|
|
641
641
|
_: 1
|
|
642
642
|
}, 8, ["modelValue", "schema"])
|
|
643
643
|
]),
|
|
644
|
-
default:
|
|
645
|
-
(h(!0),
|
|
644
|
+
default: P(() => [
|
|
645
|
+
(h(!0), U(z, null, oe(e(yt)[e(T.Config).getCountry().code].stateItems.filter(
|
|
646
646
|
(c) => {
|
|
647
|
-
var N,
|
|
648
|
-
return c.label.toLowerCase().includes(((
|
|
647
|
+
var N, M;
|
|
648
|
+
return c.label.toLowerCase().includes(((M = (N = e(a)) == null ? void 0 : N.company) == null ? void 0 : M.address.state.toLowerCase()) ?? "");
|
|
649
649
|
}
|
|
650
|
-
) || [], (c) => (h(),
|
|
650
|
+
) || [], (c) => (h(), O(I, {
|
|
651
651
|
key: c.value,
|
|
652
|
-
"model-value": e(
|
|
652
|
+
"model-value": e(a).company.address.state === c.value,
|
|
653
653
|
label: c.label,
|
|
654
654
|
onClick: () => {
|
|
655
|
-
e(
|
|
655
|
+
e(a).company.address.state = c.value, p.value = !1;
|
|
656
656
|
}
|
|
657
657
|
}, null, 8, ["model-value", "label", "onClick"]))), 128))
|
|
658
658
|
]),
|
|
@@ -661,22 +661,22 @@ const vt = { class: "space-y-8" }, ht = {
|
|
|
661
661
|
]),
|
|
662
662
|
r(C, {
|
|
663
663
|
label: "Country",
|
|
664
|
-
modelValue: e(
|
|
665
|
-
"onUpdate:modelValue": l[12] || (l[12] = (c) => e(
|
|
664
|
+
modelValue: e(a).company.address.country,
|
|
665
|
+
"onUpdate:modelValue": l[12] || (l[12] = (c) => e(a).company.address.country = c),
|
|
666
666
|
items: [
|
|
667
667
|
{
|
|
668
|
-
label: e(
|
|
669
|
-
value: e(
|
|
668
|
+
label: e(T.Config).getCountry().name,
|
|
669
|
+
value: e(T.Config).getCountry().name
|
|
670
670
|
}
|
|
671
671
|
],
|
|
672
|
-
rules: [e(
|
|
672
|
+
rules: [e(K).ruleAtPath(e(m), "company.address.country")]
|
|
673
673
|
}, null, 8, ["modelValue", "items", "rules"])
|
|
674
674
|
]),
|
|
675
|
-
v("div",
|
|
675
|
+
v("div", Tt, [
|
|
676
676
|
Ut,
|
|
677
677
|
r(xt, {
|
|
678
|
-
"model-value": (
|
|
679
|
-
"onUpdate:modelValue": l[13] || (l[13] = (c) => e(
|
|
678
|
+
"model-value": (E = e(a)) == null ? void 0 : E.stripe,
|
|
679
|
+
"onUpdate:modelValue": l[13] || (l[13] = (c) => e(a).stripe = c)
|
|
680
680
|
}, null, 8, ["model-value"])
|
|
681
681
|
])
|
|
682
682
|
])) : W("", !0)
|
|
@@ -688,7 +688,7 @@ const vt = { class: "space-y-8" }, ht = {
|
|
|
688
688
|
}
|
|
689
689
|
});
|
|
690
690
|
function Rt(f, b = !0) {
|
|
691
|
-
return
|
|
691
|
+
return T.DineroFactory(f).toFormat(b);
|
|
692
692
|
}
|
|
693
693
|
const Dt = /* @__PURE__ */ G({
|
|
694
694
|
__name: "TaxVariantSetting",
|
|
@@ -701,22 +701,22 @@ const Dt = /* @__PURE__ */ G({
|
|
|
701
701
|
},
|
|
702
702
|
emits: ["update:modelValue"],
|
|
703
703
|
setup(f, { emit: b }) {
|
|
704
|
-
const u = f,
|
|
704
|
+
const u = f, w = b;
|
|
705
705
|
me(() => {
|
|
706
|
-
if (p.value.length !==
|
|
707
|
-
const d =
|
|
708
|
-
const y =
|
|
706
|
+
if (p.value.length !== a.value.length) {
|
|
707
|
+
const d = a.value.reduce((i, n) => {
|
|
708
|
+
const y = Y.systemDefaultCode(n.name);
|
|
709
709
|
if (!y) return i;
|
|
710
710
|
const { systemCode: l, taxCode: g } = y;
|
|
711
711
|
return n.value || i.push({ systemCode: l, taxCode: g }), i;
|
|
712
712
|
}, []);
|
|
713
|
-
|
|
713
|
+
t(d);
|
|
714
714
|
}
|
|
715
715
|
});
|
|
716
716
|
function _() {
|
|
717
|
-
return
|
|
717
|
+
return Y.groupedTaxOptions();
|
|
718
718
|
}
|
|
719
|
-
const
|
|
719
|
+
const a = D(() => _().map((d) => ({
|
|
720
720
|
name: d.code,
|
|
721
721
|
value: (p.value || []).find(
|
|
722
722
|
(i) => d.options.some((n) => n.feedmeTaxCode === i)
|
|
@@ -725,29 +725,29 @@ const Dt = /* @__PURE__ */ G({
|
|
|
725
725
|
label: `${i.name} (${Qe(i.rate)}%)`,
|
|
726
726
|
value: i.feedmeTaxCode
|
|
727
727
|
}))
|
|
728
|
-
}))), p =
|
|
728
|
+
}))), p = D(() => u.modelValue.map((d) => Y.generateCode(d)));
|
|
729
729
|
function m(d) {
|
|
730
730
|
const i = _().find(
|
|
731
|
-
(g) => g.options.some((
|
|
731
|
+
(g) => g.options.some((I) => I.feedmeTaxCode === d)
|
|
732
732
|
), n = i == null ? void 0 : i.options.find((g) => g.feedmeTaxCode === d);
|
|
733
733
|
if (!n) return;
|
|
734
734
|
const { systemCode: y, taxCode: l } = n;
|
|
735
|
-
|
|
735
|
+
t([{ systemCode: y, taxCode: l }]);
|
|
736
736
|
}
|
|
737
|
-
function
|
|
738
|
-
const i =
|
|
737
|
+
function t(d) {
|
|
738
|
+
const i = de.clone(u.modelValue);
|
|
739
739
|
d.forEach((n) => {
|
|
740
740
|
const y = _().find(
|
|
741
|
-
(
|
|
741
|
+
(I) => I.options.some((B) => B.feedmeTaxCode === Y.generateCode(n))
|
|
742
742
|
), l = (y == null ? void 0 : y.options) || [], g = i.findIndex(
|
|
743
|
-
(
|
|
743
|
+
(I) => l.some((B) => Y.generateCode(B) === Y.generateCode(I))
|
|
744
744
|
);
|
|
745
745
|
g >= 0 ? i.splice(g, 1, n) : i.push(n);
|
|
746
|
-
}),
|
|
746
|
+
}), w("update:modelValue", i);
|
|
747
747
|
}
|
|
748
748
|
return (d, i) => {
|
|
749
749
|
const n = V("FmRadio"), y = V("FmRadioGroup");
|
|
750
|
-
return h(!0),
|
|
750
|
+
return h(!0), U(z, null, oe(e(a), (l) => (h(), U("div", {
|
|
751
751
|
key: l.name,
|
|
752
752
|
class: "flex items-start"
|
|
753
753
|
}, [
|
|
@@ -760,9 +760,9 @@ const Dt = /* @__PURE__ */ G({
|
|
|
760
760
|
})
|
|
761
761
|
]
|
|
762
762
|
}, {
|
|
763
|
-
default:
|
|
764
|
-
(h(!0),
|
|
765
|
-
key:
|
|
763
|
+
default: P(() => [
|
|
764
|
+
(h(!0), U(z, null, oe(l.options, (g, I) => (h(), O(n, {
|
|
765
|
+
key: I,
|
|
766
766
|
value: g.value,
|
|
767
767
|
label: g.label
|
|
768
768
|
}, null, 8, ["value", "label"]))), 128))
|
|
@@ -778,16 +778,17 @@ const Dt = /* @__PURE__ */ G({
|
|
|
778
778
|
}, Nt = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Basic information", -1), At = {
|
|
779
779
|
key: 0,
|
|
780
780
|
class: "fm-typo-en-title-sm-800 !mb-[-16px]"
|
|
781
|
-
},
|
|
781
|
+
}, Ot = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Credit", -1), Et = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-16px]" }, "Taxes", -1), Mt = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, "Bundle reward", -1), jt = /* @__PURE__ */ v("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary !mb-[-16px]" }, " Let your member know what they can expect from this bundle ", -1), Lt = { class: "space-y-8" }, Ht = { class: "flex items-center justify-between" }, qt = /* @__PURE__ */ v("div", { class: "fm-typo-en-title-sm-800 !mb-[-20px]" }, "Advanced Setting", -1), Kt = { class: "space-y-8" }, Wt = { class: "flex items-center gap-8" }, zt = /* @__PURE__ */ G({
|
|
782
782
|
__name: "EditBundleSheet",
|
|
783
783
|
emits: ["update"],
|
|
784
784
|
setup(f, { expose: b, emit: u }) {
|
|
785
|
-
const
|
|
785
|
+
const w = {
|
|
786
786
|
get _id() {
|
|
787
787
|
return (/* @__PURE__ */ new Date()).toISOString();
|
|
788
788
|
},
|
|
789
789
|
name: "",
|
|
790
|
-
price:
|
|
790
|
+
price: T.Dinero.zero().toObject(),
|
|
791
|
+
originalPrice: T.Dinero.zero().toObject(),
|
|
791
792
|
vouchers: [],
|
|
792
793
|
credit: {
|
|
793
794
|
normal: 0,
|
|
@@ -804,11 +805,11 @@ const Dt = /* @__PURE__ */ G({
|
|
|
804
805
|
taxTotals: [],
|
|
805
806
|
internal: !1,
|
|
806
807
|
priceWithTaxes: Ge()
|
|
807
|
-
}, _ = u,
|
|
808
|
+
}, _ = u, a = Ue(), p = A(!1), m = A({
|
|
808
809
|
category: 0,
|
|
809
810
|
index: -1
|
|
810
|
-
}),
|
|
811
|
-
var x,
|
|
811
|
+
}), t = A(de.cloneDeep(w)), d = A(), i = $e.superRefine((s, o) => {
|
|
812
|
+
var x, F;
|
|
812
813
|
s.price.amount < 0 && o.addIssue({
|
|
813
814
|
code: "custom",
|
|
814
815
|
path: ["price"],
|
|
@@ -833,21 +834,21 @@ const Dt = /* @__PURE__ */ G({
|
|
|
833
834
|
code: "custom",
|
|
834
835
|
message: "Bundle redeem with point cannot set normal credit.",
|
|
835
836
|
path: ["credit", "normal"]
|
|
836
|
-
}), s.credit.normal >
|
|
837
|
+
}), s.credit.normal > T.Dinero.fromFdoDinero(s.price).toUnit() && o.addIssue({
|
|
837
838
|
code: "custom",
|
|
838
|
-
message: `Normal credit cannot be more than price. Max: ${
|
|
839
|
+
message: `Normal credit cannot be more than price. Max: ${T.Dinero.fromFdoDinero(s.price).toUnit()}`,
|
|
839
840
|
path: ["credit", "normal"]
|
|
840
841
|
}), s.titles.length > 0 && s.titles.some((j) => j.dayToExpire < 0) && o.addIssue({
|
|
841
842
|
code: "custom",
|
|
842
843
|
path: ["titles"],
|
|
843
844
|
message: "Title expiry must be at least 0 day (expire same day)"
|
|
844
|
-
}), (((
|
|
845
|
+
}), (((F = (x = s.config) == null ? void 0 : x.options) == null ? void 0 : F.maxPerUser) || 0) < 0 && o.addIssue({
|
|
845
846
|
code: "custom",
|
|
846
847
|
path: ["config.options.maxPerUser"],
|
|
847
848
|
message: "Max purchase per user cannot be negative"
|
|
848
849
|
});
|
|
849
|
-
}), n =
|
|
850
|
-
const s = i.safeParse(
|
|
850
|
+
}), n = D(() => {
|
|
851
|
+
const s = i.safeParse(t.value);
|
|
851
852
|
return s.success ? [] : s.error.errors;
|
|
852
853
|
}), y = [
|
|
853
854
|
{
|
|
@@ -860,7 +861,7 @@ const Dt = /* @__PURE__ */ G({
|
|
|
860
861
|
header: "Reward type",
|
|
861
862
|
accessorFn: (s) => s.collectible.type,
|
|
862
863
|
cell(s) {
|
|
863
|
-
return
|
|
864
|
+
return se[s.row.original.collectible.type].chip();
|
|
864
865
|
}
|
|
865
866
|
},
|
|
866
867
|
{
|
|
@@ -870,118 +871,118 @@ const Dt = /* @__PURE__ */ G({
|
|
|
870
871
|
var x;
|
|
871
872
|
const o = s.row.original;
|
|
872
873
|
return o.collectible.type == "VOUCHER" || o.selectedReward == null ? o.description : De(Ae.FmStepperField, {
|
|
873
|
-
"onUpdate:modelValue": (
|
|
874
|
-
|
|
875
|
-
(j) => j.id == o.collectible._id ? { ...j, dayToExpire:
|
|
874
|
+
"onUpdate:modelValue": (F) => {
|
|
875
|
+
t.value.titles = t.value.titles.map(
|
|
876
|
+
(j) => j.id == o.collectible._id ? { ...j, dayToExpire: F } : j
|
|
876
877
|
);
|
|
877
878
|
},
|
|
878
879
|
modelValue: ((x = o.selectedReward) == null ? void 0 : x.extra) ?? 0,
|
|
879
880
|
appendText: "day(s)",
|
|
880
881
|
showSteppers: !1,
|
|
881
|
-
disabled: !!
|
|
882
|
+
disabled: !!t.value.stripePriceId
|
|
882
883
|
});
|
|
883
884
|
}
|
|
884
885
|
}
|
|
885
|
-
], l = A([]), g =
|
|
886
|
-
const o =
|
|
886
|
+
], l = A([]), g = D(() => a.bundleRewards.map((s) => {
|
|
887
|
+
const o = I.value.find((F) => F.id == s._id), x = s.type === "VOUCHER" ? `${s.options.maxUse} use(s), ${Xe(s.options.validityOption || {})}` : "No expiry";
|
|
887
888
|
return {
|
|
888
889
|
collectible: s,
|
|
889
890
|
description: x,
|
|
890
891
|
selectedReward: o
|
|
891
892
|
};
|
|
892
|
-
})),
|
|
893
|
+
})), I = D(() => {
|
|
893
894
|
var s, o;
|
|
894
895
|
return [
|
|
895
|
-
...((s =
|
|
896
|
+
...((s = t.value) == null ? void 0 : s.titles.map((x) => ({
|
|
896
897
|
id: x.id,
|
|
897
898
|
extra: x.dayToExpire
|
|
898
899
|
}))) ?? [],
|
|
899
|
-
...((o =
|
|
900
|
+
...((o = t.value) == null ? void 0 : o.vouchers.map((x) => ({
|
|
900
901
|
id: x,
|
|
901
902
|
extra: void 0
|
|
902
903
|
}))) ?? []
|
|
903
904
|
];
|
|
904
|
-
}), B =
|
|
905
|
-
() =>
|
|
905
|
+
}), B = D(
|
|
906
|
+
() => t.value.stripePriceId && t.value.subscriptionValidity ? t.value.subscriptionValidity : 0
|
|
906
907
|
);
|
|
907
908
|
function C(s) {
|
|
908
|
-
|
|
909
|
-
for (const o of
|
|
909
|
+
t.value.subscriptionValidity = s;
|
|
910
|
+
for (const o of t.value.titles)
|
|
910
911
|
o.dayToExpire = s;
|
|
911
|
-
|
|
912
|
+
t.value.credit.free && (t.value.credit.free.day = s);
|
|
912
913
|
}
|
|
913
914
|
function $() {
|
|
914
|
-
const s = g.value, o =
|
|
915
|
+
const s = g.value, o = t.value;
|
|
915
916
|
if (!(!o || !s))
|
|
916
917
|
for (let x = 0; x < s.length; x++) {
|
|
917
|
-
const
|
|
918
|
-
|
|
919
|
-
(
|
|
918
|
+
const F = s[x];
|
|
919
|
+
k.value[x] ? F.collectible.type == "TITLE" ? o.titles.findIndex(
|
|
920
|
+
(ne) => ne.id == F.collectible._id
|
|
920
921
|
) < 0 && o.titles.push({
|
|
921
|
-
id:
|
|
922
|
+
id: F.collectible._id,
|
|
922
923
|
dayToExpire: B.value
|
|
923
924
|
}) : o.vouchers.findIndex(
|
|
924
|
-
(
|
|
925
|
-
) < 0 && o.vouchers.push(
|
|
926
|
-
(ee) => ee !=
|
|
925
|
+
(ne) => ne == F.collectible._id
|
|
926
|
+
) < 0 && o.vouchers.push(F.collectible._id) : (o.titles = o.titles.filter((ee) => ee.id != F.collectible._id), o.vouchers = o.vouchers.filter(
|
|
927
|
+
(ee) => ee != F.collectible._id
|
|
927
928
|
));
|
|
928
929
|
}
|
|
929
930
|
}
|
|
930
|
-
const
|
|
931
|
-
ve(
|
|
932
|
-
const
|
|
931
|
+
const k = A({});
|
|
932
|
+
ve(k, $, { deep: !0 });
|
|
933
|
+
const R = D(() => {
|
|
933
934
|
var s;
|
|
934
|
-
return (s =
|
|
935
|
-
}),
|
|
935
|
+
return (s = a.storeOption.company) == null ? void 0 : s.sstRegNo;
|
|
936
|
+
}), E = D(() => {
|
|
936
937
|
var s, o, x;
|
|
937
|
-
return (x = (o = (s =
|
|
938
|
-
}), c =
|
|
938
|
+
return (x = (o = (s = a.storeOption) == null ? void 0 : s.inclusiveTaxes) == null ? void 0 : o[0]) != null && x.inclusive ? "Inclusive" : "Exclusive";
|
|
939
|
+
}), c = D(() => {
|
|
939
940
|
var s, o;
|
|
940
941
|
return ot(
|
|
941
|
-
|
|
942
|
-
Re(
|
|
943
|
-
|
|
944
|
-
Number(
|
|
945
|
-
((s =
|
|
946
|
-
(o =
|
|
942
|
+
Y.fullTax,
|
|
943
|
+
Re(t.value.taxes),
|
|
944
|
+
t.value.price,
|
|
945
|
+
Number(t.value.credit.normal),
|
|
946
|
+
((s = a.storeOption) == null ? void 0 : s.inclusiveTaxes) ?? [],
|
|
947
|
+
(o = a.storeOption.company) != null && o.sstRegNo ? Y.taxSystem.map((x) => x.code) : []
|
|
947
948
|
);
|
|
948
|
-
}), N =
|
|
949
|
+
}), N = D(() => c.value.reduce(
|
|
949
950
|
(o, x) => o.add(x.total),
|
|
950
951
|
Ze()
|
|
951
|
-
).toFormat()),
|
|
952
|
-
var
|
|
952
|
+
).toFormat()), M = D(() => {
|
|
953
|
+
var F;
|
|
953
954
|
const s = at(
|
|
954
955
|
c.value,
|
|
955
|
-
|
|
956
|
-
((
|
|
956
|
+
t.value.price,
|
|
957
|
+
((F = a.storeOption) == null ? void 0 : F.inclusiveTaxes) ?? []
|
|
957
958
|
);
|
|
958
|
-
|
|
959
|
+
t.value.priceWithTaxes = s;
|
|
959
960
|
const o = Rt(s, !1), x = Number(o.replace(/[^\d.-]/g, ""));
|
|
960
961
|
return Number.isNaN(x) ? 0 : x;
|
|
961
962
|
});
|
|
962
963
|
function X() {
|
|
963
|
-
|
|
964
|
+
t.value.taxTotals = c.value, _("update", $e.parse(je(t.value)));
|
|
964
965
|
}
|
|
965
966
|
function Z() {
|
|
966
|
-
return
|
|
967
|
+
return de.cloneDeep(w);
|
|
967
968
|
}
|
|
968
969
|
function xe(s, o) {
|
|
969
|
-
p.value = s, s && o && (console.log(o.bundle, "set.bundle"), d.value = void 0,
|
|
970
|
+
p.value = s, s && o && (console.log(o.bundle, "set.bundle"), d.value = void 0, t.value = o.bundle || Z(), m.value.category = o.category, m.value.index = o.index, k.value = g.value.reduce((x, F, j) => (x[j] = !!F.selectedReward, x), {}));
|
|
970
971
|
}
|
|
971
972
|
return b({
|
|
972
973
|
showSheet: xe,
|
|
973
974
|
bundleImage: d,
|
|
974
975
|
target: m,
|
|
975
|
-
data:
|
|
976
|
+
data: t
|
|
976
977
|
}), (s, o) => {
|
|
977
|
-
const x = V("FmTextField"),
|
|
978
|
-
return h(),
|
|
978
|
+
const x = V("FmTextField"), F = V("FmStepperField"), j = V("FmMenuItem"), ee = V("FmTable"), ne = V("FmHelperText"), _e = V("FmSwitch"), Ce = V("FmButton"), ke = V("FmSideSheet");
|
|
979
|
+
return h(), O(ke, {
|
|
979
980
|
"max-width": 560,
|
|
980
981
|
modelValue: e(p),
|
|
981
|
-
"onUpdate:modelValue": o[
|
|
982
|
+
"onUpdate:modelValue": o[18] || (o[18] = (le) => ue(p) ? p.value = le : null),
|
|
982
983
|
header: e(m).index != -1 ? "Edit bundle" : "Create bundle"
|
|
983
984
|
}, {
|
|
984
|
-
"side-sheet-footer":
|
|
985
|
+
"side-sheet-footer": P(() => [
|
|
985
986
|
v("div", Wt, [
|
|
986
987
|
r(Ce, {
|
|
987
988
|
label: e(m).index != -1 ? "Save" : "Add",
|
|
@@ -991,234 +992,252 @@ const Dt = /* @__PURE__ */ G({
|
|
|
991
992
|
}, null, 8, ["label", "disabled", "loading"]),
|
|
992
993
|
r(Ce, {
|
|
993
994
|
label: "Cancel",
|
|
994
|
-
onClick: o[
|
|
995
|
+
onClick: o[17] || (o[17] = (le) => xe(!1)),
|
|
995
996
|
variant: "tertiary"
|
|
996
997
|
})
|
|
997
998
|
])
|
|
998
999
|
]),
|
|
999
|
-
default:
|
|
1000
|
-
var
|
|
1000
|
+
default: P(() => {
|
|
1001
|
+
var le, Ve, Se, Fe, we;
|
|
1001
1002
|
return [
|
|
1002
|
-
r(he, { json: e(
|
|
1003
|
-
e(
|
|
1003
|
+
r(he, { json: e(t) }, null, 8, ["json"]),
|
|
1004
|
+
e(t) ? (h(), U("div", Bt, [
|
|
1004
1005
|
Nt,
|
|
1005
1006
|
r(x, {
|
|
1006
1007
|
label: "Bundle name",
|
|
1007
|
-
modelValue: e(
|
|
1008
|
-
"onUpdate:modelValue": o[0] || (o[0] = (S) => e(
|
|
1009
|
-
"helper-state": e(
|
|
1010
|
-
"helper-text": e(
|
|
1008
|
+
modelValue: e(t).name,
|
|
1009
|
+
"onUpdate:modelValue": o[0] || (o[0] = (S) => e(t).name = S),
|
|
1010
|
+
"helper-state": e(L)(e(n), "name"),
|
|
1011
|
+
"helper-text": e(H)(e(n), "name")
|
|
1011
1012
|
}, null, 8, ["modelValue", "helper-state", "helper-text"]),
|
|
1012
|
-
r(
|
|
1013
|
+
r(Je, {
|
|
1013
1014
|
label: "Bundle image",
|
|
1014
1015
|
class: "w-1/2 xs:w-2/3",
|
|
1015
1016
|
"aspect-ratio": "16/9",
|
|
1016
|
-
thumbnail: e(
|
|
1017
|
+
thumbnail: e(t).image ?? void 0,
|
|
1017
1018
|
file: e(d) ?? void 0,
|
|
1018
1019
|
"onUpdate:file": o[1] || (o[1] = (S) => {
|
|
1019
1020
|
d.value = S;
|
|
1020
1021
|
}),
|
|
1021
|
-
"helper-state": e(
|
|
1022
|
-
"helper-text": e(
|
|
1022
|
+
"helper-state": e(L)(e(n), "image"),
|
|
1023
|
+
"helper-text": e(H)(e(n), "image")
|
|
1023
1024
|
}, null, 8, ["thumbnail", "file", "helper-state", "helper-text"]),
|
|
1024
|
-
r(
|
|
1025
|
-
"model-value": e(
|
|
1025
|
+
r(F, {
|
|
1026
|
+
"model-value": e(T.Dinero).fromFdoDinero(e(t).price).toUnit(),
|
|
1026
1027
|
label: "Price",
|
|
1027
1028
|
min: 0,
|
|
1028
1029
|
"max-fraction-digits": 2,
|
|
1029
1030
|
"onUpdate:modelValue": o[2] || (o[2] = (S) => {
|
|
1030
|
-
e(
|
|
1031
|
+
e(t).price.amount = S * 10 ** e(t).price.precision;
|
|
1031
1032
|
}),
|
|
1032
1033
|
"is-currency": !0,
|
|
1033
1034
|
"show-steppers": !1,
|
|
1034
|
-
"helper-text": e(
|
|
1035
|
-
"helper-state": e(
|
|
1035
|
+
"helper-text": e(H)(e(n), "price") || `${e(T.Dinero).fromNumber({ number: 1 }).toFormat(!0)} = ${e(T.Dinero).fromNumber({ number: 1 }).toUnit()} credit`,
|
|
1036
|
+
"helper-state": e(L)(e(n), "price")
|
|
1036
1037
|
}, {
|
|
1037
|
-
prepend:
|
|
1038
|
-
|
|
1038
|
+
prepend: P(() => [
|
|
1039
|
+
te(ae(e(T.Dinero).defaultCurrency()), 1)
|
|
1039
1040
|
]),
|
|
1040
1041
|
_: 1
|
|
1041
1042
|
}, 8, ["model-value", "helper-text", "helper-state"]),
|
|
1042
|
-
r(
|
|
1043
|
-
"model-value": e(
|
|
1044
|
-
label: "
|
|
1043
|
+
r(F, {
|
|
1044
|
+
"model-value": e(T.Dinero).fromFdoDinero(e(t).originalPrice).toUnit(),
|
|
1045
|
+
label: "Original Price",
|
|
1045
1046
|
min: 0,
|
|
1047
|
+
"max-fraction-digits": 2,
|
|
1046
1048
|
"onUpdate:modelValue": o[3] || (o[3] = (S) => {
|
|
1047
|
-
|
|
1049
|
+
(!1 in e(t) || !e(t).originalPrice) && (e(t).originalPrice = e(T.Dinero).zero().toObject()), e(t).originalPrice.amount = S * 10 ** e(t).originalPrice.precision;
|
|
1048
1050
|
}),
|
|
1051
|
+
"is-currency": !0,
|
|
1049
1052
|
"show-steppers": !1,
|
|
1050
|
-
"helper-
|
|
1051
|
-
"helper-
|
|
1053
|
+
"helper-text": e(H)(e(n), "originalPrice") || "Leave empty or set to 0 to disable original price",
|
|
1054
|
+
"helper-state": e(L)(e(n), "originalPrice")
|
|
1052
1055
|
}, {
|
|
1053
|
-
|
|
1054
|
-
|
|
1056
|
+
prepend: P(() => [
|
|
1057
|
+
te(ae(e(T.Dinero).defaultCurrency()), 1)
|
|
1058
|
+
]),
|
|
1059
|
+
_: 1
|
|
1060
|
+
}, 8, ["model-value", "helper-text", "helper-state"]),
|
|
1061
|
+
r(F, {
|
|
1062
|
+
"model-value": e(t).coinPrice ?? null,
|
|
1063
|
+
label: "Point Needed",
|
|
1064
|
+
min: 0,
|
|
1065
|
+
"onUpdate:modelValue": o[4] || (o[4] = (S) => {
|
|
1066
|
+
S > 0 && e(t).credit.normal > 0 && (e(t).credit.normal = 0), e(t).coinPrice = S;
|
|
1067
|
+
}),
|
|
1068
|
+
"show-steppers": !1,
|
|
1069
|
+
"helper-state": e(L)(e(n), "coinPrice"),
|
|
1070
|
+
"helper-text": e(H)(e(n), "coinPrice")
|
|
1071
|
+
}, {
|
|
1072
|
+
append: P(() => [
|
|
1073
|
+
te(" point(s) ")
|
|
1055
1074
|
]),
|
|
1056
1075
|
_: 1
|
|
1057
1076
|
}, 8, ["model-value", "helper-state", "helper-text"]),
|
|
1058
|
-
e(
|
|
1059
|
-
e(
|
|
1077
|
+
e(a).storeOption.stripe ? (h(), U("div", At, " Subscription Settings ")) : W("", !0),
|
|
1078
|
+
e(a).storeOption.stripe ? (h(), O(x, {
|
|
1060
1079
|
key: 1,
|
|
1061
1080
|
label: "Stripe Price ID",
|
|
1062
|
-
modelValue: e(
|
|
1063
|
-
"onUpdate:modelValue": o[
|
|
1064
|
-
"helper-state": e(
|
|
1065
|
-
"helper-text": e(
|
|
1081
|
+
modelValue: e(t).stripePriceId,
|
|
1082
|
+
"onUpdate:modelValue": o[5] || (o[5] = (S) => e(t).stripePriceId = S),
|
|
1083
|
+
"helper-state": e(L)(e(n), "stripePriceId"),
|
|
1084
|
+
"helper-text": e(H)(e(n), "stripePriceId")
|
|
1066
1085
|
}, null, 8, ["modelValue", "helper-state", "helper-text"])) : W("", !0),
|
|
1067
|
-
e(
|
|
1086
|
+
e(t).stripePriceId ? (h(), O(F, {
|
|
1068
1087
|
key: 2,
|
|
1069
|
-
"model-value": e(
|
|
1088
|
+
"model-value": e(t).subscriptionValidity ?? null,
|
|
1070
1089
|
min: 1,
|
|
1071
1090
|
"onUpdate:modelValue": C,
|
|
1072
1091
|
label: "Subscription validity (days)",
|
|
1073
1092
|
"show-steppers": !1,
|
|
1074
|
-
"helper-state": e(
|
|
1075
|
-
"helper-text": e(
|
|
1093
|
+
"helper-state": e(L)(e(n), "subscriptionValidity"),
|
|
1094
|
+
"helper-text": e(H)(e(n), "subscriptionValidity")
|
|
1076
1095
|
}, {
|
|
1077
|
-
append:
|
|
1078
|
-
|
|
1096
|
+
append: P(() => [
|
|
1097
|
+
te(" day(s) ")
|
|
1079
1098
|
]),
|
|
1080
1099
|
_: 1
|
|
1081
1100
|
}, 8, ["model-value", "helper-state", "helper-text"])) : W("", !0),
|
|
1082
|
-
|
|
1083
|
-
r(
|
|
1084
|
-
modelValue: e(
|
|
1085
|
-
"onUpdate:modelValue": o[
|
|
1101
|
+
Ot,
|
|
1102
|
+
r(F, {
|
|
1103
|
+
modelValue: e(t).credit.normal,
|
|
1104
|
+
"onUpdate:modelValue": o[6] || (o[6] = (S) => e(t).credit.normal = S),
|
|
1086
1105
|
label: "Normal credit",
|
|
1087
1106
|
"show-steppers": !1,
|
|
1088
|
-
"helper-state": e(
|
|
1089
|
-
"helper-text": e(
|
|
1107
|
+
"helper-state": e(L)(e(n), "credit.normal"),
|
|
1108
|
+
"helper-text": e(H)(e(n), "credit.normal")
|
|
1090
1109
|
}, {
|
|
1091
|
-
append:
|
|
1092
|
-
|
|
1110
|
+
append: P(() => [
|
|
1111
|
+
te(" credit ")
|
|
1093
1112
|
]),
|
|
1094
1113
|
_: 1
|
|
1095
1114
|
}, 8, ["modelValue", "helper-state", "helper-text"]),
|
|
1096
|
-
r(
|
|
1097
|
-
"model-value": ((
|
|
1115
|
+
r(F, {
|
|
1116
|
+
"model-value": ((le = e(t).credit.free) == null ? void 0 : le.amount) ?? null,
|
|
1098
1117
|
min: 0,
|
|
1099
|
-
"onUpdate:modelValue": o[
|
|
1100
|
-
e(
|
|
1118
|
+
"onUpdate:modelValue": o[7] || (o[7] = (S) => {
|
|
1119
|
+
e(t).credit.free || (e(t).credit.free = {
|
|
1101
1120
|
amount: 0,
|
|
1102
1121
|
day: 1
|
|
1103
|
-
}), e(
|
|
1122
|
+
}), e(t).credit.free.amount = S;
|
|
1104
1123
|
}),
|
|
1105
1124
|
label: "Free credit",
|
|
1106
1125
|
"show-steppers": !1,
|
|
1107
|
-
"helper-state": e(
|
|
1108
|
-
"helper-text": e(
|
|
1126
|
+
"helper-state": e(L)(e(n), "credit.free.amount"),
|
|
1127
|
+
"helper-text": e(H)(e(n), "credit.free.amount")
|
|
1109
1128
|
}, {
|
|
1110
|
-
append:
|
|
1111
|
-
|
|
1129
|
+
append: P(() => [
|
|
1130
|
+
te(" credit ")
|
|
1112
1131
|
]),
|
|
1113
1132
|
_: 1
|
|
1114
1133
|
}, 8, ["model-value", "helper-state", "helper-text"]),
|
|
1115
|
-
(Ve = e(
|
|
1134
|
+
(Ve = e(t).credit.free) != null && Ve.amount ? (h(), O(F, {
|
|
1116
1135
|
key: 3,
|
|
1117
|
-
disabled: !!e(
|
|
1118
|
-
"model-value": ((Se = e(
|
|
1136
|
+
disabled: !!e(t).stripePriceId,
|
|
1137
|
+
"model-value": ((Se = e(t).credit.free) == null ? void 0 : Se.day) ?? null,
|
|
1119
1138
|
min: 0,
|
|
1120
|
-
"onUpdate:modelValue": o[
|
|
1121
|
-
e(
|
|
1139
|
+
"onUpdate:modelValue": o[8] || (o[8] = (S) => {
|
|
1140
|
+
e(t).credit.free || (e(t).credit.free = {
|
|
1122
1141
|
amount: 0,
|
|
1123
1142
|
day: 1
|
|
1124
|
-
}), e(
|
|
1143
|
+
}), e(t).credit.free.day = e(B) || S;
|
|
1125
1144
|
}),
|
|
1126
1145
|
label: "Free credit valid for",
|
|
1127
1146
|
"show-steppers": !1,
|
|
1128
|
-
"helper-state": e(
|
|
1129
|
-
"helper-text": e(
|
|
1147
|
+
"helper-state": e(L)(e(n), "credit.free.day"),
|
|
1148
|
+
"helper-text": e(H)(e(n), "credit.free.day")
|
|
1130
1149
|
}, {
|
|
1131
|
-
append:
|
|
1132
|
-
|
|
1150
|
+
append: P(() => [
|
|
1151
|
+
te(" day(s) ")
|
|
1133
1152
|
]),
|
|
1134
1153
|
_: 1
|
|
1135
1154
|
}, 8, ["disabled", "model-value", "helper-state", "helper-text"])) : W("", !0),
|
|
1136
|
-
e(
|
|
1137
|
-
|
|
1155
|
+
e(R) ? (h(), U(z, { key: 4 }, [
|
|
1156
|
+
Et,
|
|
1138
1157
|
r(Dt, {
|
|
1139
|
-
modelValue: e(
|
|
1140
|
-
"onUpdate:modelValue": o[
|
|
1158
|
+
modelValue: e(t).taxes,
|
|
1159
|
+
"onUpdate:modelValue": o[9] || (o[9] = (S) => e(t).taxes = S)
|
|
1141
1160
|
}, null, 8, ["modelValue"]),
|
|
1142
1161
|
r(x, {
|
|
1143
|
-
label: `Tax Charged (${e(
|
|
1162
|
+
label: `Tax Charged (${e(E)})`,
|
|
1144
1163
|
"model-value": e(N),
|
|
1145
1164
|
disabled: ""
|
|
1146
1165
|
}, null, 8, ["label", "model-value"])
|
|
1147
1166
|
], 64)) : W("", !0),
|
|
1148
|
-
r(
|
|
1167
|
+
r(F, {
|
|
1149
1168
|
label: "Total Price",
|
|
1150
|
-
"model-value": e(
|
|
1169
|
+
"model-value": e(M),
|
|
1151
1170
|
disabled: !0
|
|
1152
1171
|
}, null, 8, ["model-value"]),
|
|
1153
|
-
|
|
1172
|
+
Mt,
|
|
1154
1173
|
jt,
|
|
1155
1174
|
v("div", Lt, [
|
|
1156
1175
|
v("div", Ht, [
|
|
1157
|
-
r(
|
|
1176
|
+
r(Ye, {
|
|
1158
1177
|
label: `Reward type: ${e(l).length == 0 ? "All" : e(l)[0].name}`
|
|
1159
1178
|
}, {
|
|
1160
|
-
default:
|
|
1179
|
+
default: P(() => [
|
|
1161
1180
|
r(j, {
|
|
1162
|
-
onClick: o[
|
|
1181
|
+
onClick: o[10] || (o[10] = (S) => l.value = []),
|
|
1163
1182
|
label: "All"
|
|
1164
1183
|
}),
|
|
1165
1184
|
r(j, {
|
|
1166
|
-
onClick: o[
|
|
1185
|
+
onClick: o[11] || (o[11] = (S) => l.value = [
|
|
1167
1186
|
{
|
|
1168
1187
|
id: "type",
|
|
1169
1188
|
value: "VOUCHER",
|
|
1170
|
-
name: e(
|
|
1189
|
+
name: e(se).VOUCHER.name
|
|
1171
1190
|
}
|
|
1172
1191
|
]),
|
|
1173
|
-
label: e(
|
|
1192
|
+
label: e(se).VOUCHER.name
|
|
1174
1193
|
}, null, 8, ["label"]),
|
|
1175
1194
|
r(j, {
|
|
1176
|
-
onClick: o[
|
|
1195
|
+
onClick: o[12] || (o[12] = (S) => l.value = [
|
|
1177
1196
|
{
|
|
1178
1197
|
id: "type",
|
|
1179
1198
|
value: "TITLE",
|
|
1180
|
-
name: e(
|
|
1199
|
+
name: e(se).TITLE.name
|
|
1181
1200
|
}
|
|
1182
1201
|
]),
|
|
1183
|
-
label: e(
|
|
1202
|
+
label: e(se).TITLE.name
|
|
1184
1203
|
}, null, 8, ["label"])
|
|
1185
1204
|
]),
|
|
1186
1205
|
_: 1
|
|
1187
1206
|
}, 8, ["label"])
|
|
1188
1207
|
]),
|
|
1189
1208
|
r(ee, {
|
|
1190
|
-
modelValue: e(
|
|
1191
|
-
"onUpdate:modelValue": o[
|
|
1209
|
+
modelValue: e(k),
|
|
1210
|
+
"onUpdate:modelValue": o[13] || (o[13] = (S) => ue(k) ? k.value = S : null),
|
|
1192
1211
|
selection: "multiple",
|
|
1193
1212
|
"column-filter": e(l),
|
|
1194
1213
|
"column-defs": y,
|
|
1195
1214
|
"row-data": e(g),
|
|
1196
1215
|
"hide-footer": e(g).length <= 10
|
|
1197
1216
|
}, null, 8, ["modelValue", "column-filter", "row-data", "hide-footer"]),
|
|
1198
|
-
r(
|
|
1199
|
-
text: e(
|
|
1200
|
-
state: e(
|
|
1217
|
+
r(ne, {
|
|
1218
|
+
text: e(H)(e(n), "titles"),
|
|
1219
|
+
state: e(L)(e(n), "titles")
|
|
1201
1220
|
}, null, 8, ["text", "state"])
|
|
1202
1221
|
]),
|
|
1203
1222
|
qt,
|
|
1204
1223
|
v("div", Kt, [
|
|
1205
1224
|
r(_e, {
|
|
1206
|
-
"model-value": e(
|
|
1207
|
-
"onUpdate:modelValue": o[
|
|
1225
|
+
"model-value": e(t).internal ?? !1,
|
|
1226
|
+
"onUpdate:modelValue": o[14] || (o[14] = (S) => e(t).internal = S),
|
|
1208
1227
|
"label-placement": "right",
|
|
1209
1228
|
label: "Internal Bundle",
|
|
1210
1229
|
sublabel: "Internal bundle will be hidden in FeedMe member app"
|
|
1211
1230
|
}, null, 8, ["model-value"]),
|
|
1212
1231
|
r(_e, {
|
|
1213
|
-
"model-value": e(
|
|
1214
|
-
"onUpdate:modelValue": o[
|
|
1232
|
+
"model-value": e(t).hideInPos ?? !1,
|
|
1233
|
+
"onUpdate:modelValue": o[15] || (o[15] = (S) => e(t).hideInPos = S),
|
|
1215
1234
|
"label-placement": "right",
|
|
1216
1235
|
label: "Hide In POS",
|
|
1217
1236
|
sublabel: "Bundle will be hidden in FeedMe POS"
|
|
1218
1237
|
}, null, 8, ["model-value"]),
|
|
1219
|
-
r(
|
|
1220
|
-
"model-value": ((we = (Fe = e(
|
|
1221
|
-
"onUpdate:modelValue": o[
|
|
1238
|
+
r(F, {
|
|
1239
|
+
"model-value": ((we = (Fe = e(t).config) == null ? void 0 : Fe.options) == null ? void 0 : we.maxPerUser) || null,
|
|
1240
|
+
"onUpdate:modelValue": o[16] || (o[16] = (S) => e(de).set(e(t), "config.options.maxPerUser", S)),
|
|
1222
1241
|
label: "Max purchase per user",
|
|
1223
1242
|
"show-steppers": !1,
|
|
1224
1243
|
placeholder: "Unlimited"
|
|
@@ -1231,7 +1250,7 @@ const Dt = /* @__PURE__ */ G({
|
|
|
1231
1250
|
}, 8, ["modelValue", "header"]);
|
|
1232
1251
|
};
|
|
1233
1252
|
}
|
|
1234
|
-
}),
|
|
1253
|
+
}), Jt = { class: "px-24 flex flex-col gap-y-16" }, Yt = { class: "flex gap-8 items-center" }, Gt = { class: "fm-typo-en-body-lg-600" }, Zt = { class: "grid sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-24" }, Qt = /* @__PURE__ */ v("img", {
|
|
1235
1254
|
src: Be,
|
|
1236
1255
|
class: "aspect-square w-[150px]"
|
|
1237
1256
|
}, null, -1), Xt = /* @__PURE__ */ v("div", { class: "flex flex-col gap-16 text-center" }, [
|
|
@@ -1247,21 +1266,21 @@ const Dt = /* @__PURE__ */ G({
|
|
|
1247
1266
|
}, u = {
|
|
1248
1267
|
label: "Manage reward",
|
|
1249
1268
|
value: "create_reward"
|
|
1250
|
-
},
|
|
1269
|
+
}, w = {
|
|
1251
1270
|
label: "Add category",
|
|
1252
1271
|
value: "create_category",
|
|
1253
1272
|
isPrimary: !0,
|
|
1254
1273
|
prependIcon: "add"
|
|
1255
|
-
}, _ = et(),
|
|
1274
|
+
}, _ = et(), a = Ue(), { global: p, minor: m } = Ee, t = Te(), d = D(() => a.sortedStoreCategories), i = A(), n = A();
|
|
1256
1275
|
async function y(C) {
|
|
1257
1276
|
var $;
|
|
1258
|
-
C === "setting" ? ($ = i.value) == null || $.showSheet(!0,
|
|
1277
|
+
C === "setting" ? ($ = i.value) == null || $.showSheet(!0, a.storeOption) : C === "create_category" ? g(-1) : C === "create_reward" && await _.push({ name: He["$connect-STORE_REWARDS"] });
|
|
1259
1278
|
}
|
|
1260
1279
|
async function l(C) {
|
|
1261
1280
|
await m(
|
|
1262
1281
|
async () => {
|
|
1263
1282
|
var $;
|
|
1264
|
-
await ye.updateStore(C), await
|
|
1283
|
+
await ye.updateStore(C), await a.readMemberStore(), ($ = i.value) == null || $.showSheet(!1);
|
|
1265
1284
|
},
|
|
1266
1285
|
{
|
|
1267
1286
|
message: "Updating store setting",
|
|
@@ -1270,44 +1289,44 @@ const Dt = /* @__PURE__ */ G({
|
|
|
1270
1289
|
);
|
|
1271
1290
|
}
|
|
1272
1291
|
async function g(C = -1) {
|
|
1273
|
-
var $,
|
|
1274
|
-
if ((!
|
|
1292
|
+
var $, k;
|
|
1293
|
+
if ((!a.storeOption || !a.storeOption.company) && await ce.confirm(
|
|
1275
1294
|
"Please set up your store setting first before adding category.",
|
|
1276
1295
|
"Update store setting",
|
|
1277
1296
|
"Update now"
|
|
1278
1297
|
))
|
|
1279
1298
|
return ($ = i.value) == null ? void 0 : $.showSheet(!0);
|
|
1280
|
-
|
|
1299
|
+
t.open({
|
|
1281
1300
|
title: C == -1 ? "Add category" : "Edit category",
|
|
1282
1301
|
contentComponent: ft,
|
|
1283
1302
|
contentComponentProps: {
|
|
1284
|
-
initialValue: ((
|
|
1303
|
+
initialValue: ((k = d.value[C]) == null ? void 0 : k.name) ?? "",
|
|
1285
1304
|
action: C == -1 ? "add" : "edit"
|
|
1286
1305
|
}
|
|
1287
|
-
}).onPrimary(async (
|
|
1288
|
-
|
|
1306
|
+
}).onPrimary(async (R) => {
|
|
1307
|
+
R === null && !await ce.remove(
|
|
1289
1308
|
"Are you sure you want to remove category?",
|
|
1290
1309
|
"Remove category"
|
|
1291
1310
|
) || await m(
|
|
1292
1311
|
async () => {
|
|
1293
|
-
const
|
|
1312
|
+
const E = C == -1 ? [...d.value, { name: R, bundles: [] }] : [...d.value].map((c, N) => N == C ? { ...c, name: R } : c).filter((c) => c.name !== null);
|
|
1294
1313
|
await ye.updateStoreBundle({
|
|
1295
|
-
categories:
|
|
1296
|
-
}), await
|
|
1314
|
+
categories: E
|
|
1315
|
+
}), await a.readMemberStore();
|
|
1297
1316
|
},
|
|
1298
1317
|
{
|
|
1299
|
-
message:
|
|
1300
|
-
successMessage: `Category ${
|
|
1318
|
+
message: R === null ? "Deleting category" : C == -1 ? "Creating category" : "Updating categories",
|
|
1319
|
+
successMessage: `Category ${R === null ? "deleted" : C == -1 ? "created" : "updated"} successfully`
|
|
1301
1320
|
}
|
|
1302
1321
|
);
|
|
1303
1322
|
});
|
|
1304
1323
|
}
|
|
1305
|
-
async function
|
|
1324
|
+
async function I(C, $, k) {
|
|
1306
1325
|
var c, N;
|
|
1307
|
-
$ ?? ($ = (c = n.value) == null ? void 0 : c.target.category),
|
|
1308
|
-
const
|
|
1309
|
-
if (!
|
|
1310
|
-
|
|
1326
|
+
$ ?? ($ = (c = n.value) == null ? void 0 : c.target.category), k ?? (k = (N = n.value) == null ? void 0 : N.target.index);
|
|
1327
|
+
const R = Pe(d.value), E = R[$];
|
|
1328
|
+
if (!E) {
|
|
1329
|
+
Me.error("Unexpected error", 2e3);
|
|
1311
1330
|
return;
|
|
1312
1331
|
}
|
|
1313
1332
|
if (C == null) {
|
|
@@ -1316,26 +1335,26 @@ const Dt = /* @__PURE__ */ G({
|
|
|
1316
1335
|
"Delete bundle"
|
|
1317
1336
|
) == !1)
|
|
1318
1337
|
return;
|
|
1319
|
-
|
|
1338
|
+
E.bundles.splice(k, 1);
|
|
1320
1339
|
} else
|
|
1321
|
-
|
|
1340
|
+
k == -1 ? E.bundles.push(C) : E.bundles[k] = C;
|
|
1322
1341
|
await m(
|
|
1323
1342
|
async () => {
|
|
1324
|
-
var
|
|
1343
|
+
var M, X;
|
|
1325
1344
|
if (C != null) {
|
|
1326
|
-
const Z = (
|
|
1345
|
+
const Z = (M = n.value) == null ? void 0 : M.bundleImage;
|
|
1327
1346
|
Z === null && C.image ? (await pe.delete(C.image), C.image = null) : Z && (C.image = await pe.update(
|
|
1328
1347
|
pe.bundleImagePath(void 0, Z),
|
|
1329
1348
|
Z
|
|
1330
1349
|
));
|
|
1331
1350
|
}
|
|
1332
1351
|
await ye.updateStoreBundle({
|
|
1333
|
-
categories:
|
|
1334
|
-
}), await
|
|
1352
|
+
categories: R
|
|
1353
|
+
}), await a.readMemberStore(), await a.readMembership(), await a.readRewards(), (X = n.value) == null || X.showSheet(!1);
|
|
1335
1354
|
},
|
|
1336
1355
|
{
|
|
1337
|
-
message: `${C == null ? "Deleting" :
|
|
1338
|
-
successMessage: `Bundle ${C == null ? "deleted" :
|
|
1356
|
+
message: `${C == null ? "Deleting" : k == -1 ? "Creating" : "Updating"} bundle`,
|
|
1357
|
+
successMessage: `Bundle ${C == null ? "deleted" : k == -1 ? "created" : "updated"} successfully`
|
|
1339
1358
|
}
|
|
1340
1359
|
);
|
|
1341
1360
|
}
|
|
@@ -1343,63 +1362,63 @@ const Dt = /* @__PURE__ */ G({
|
|
|
1343
1362
|
var $;
|
|
1344
1363
|
($ = n.value) == null || $.showSheet(!0, {
|
|
1345
1364
|
...C,
|
|
1346
|
-
bundle: C.bundle ?
|
|
1365
|
+
bundle: C.bundle ? Pe(C.bundle) : void 0
|
|
1347
1366
|
});
|
|
1348
1367
|
}
|
|
1349
1368
|
return me(async () => {
|
|
1350
1369
|
await p(async () => {
|
|
1351
|
-
await
|
|
1370
|
+
await a.readMemberStore(), await a.readMembership(), await a.readRewards();
|
|
1352
1371
|
});
|
|
1353
1372
|
}), (C, $) => {
|
|
1354
|
-
const
|
|
1355
|
-
return h(),
|
|
1356
|
-
r(
|
|
1373
|
+
const k = V("FmPageHead"), R = V("FmButton"), E = V("FmCard");
|
|
1374
|
+
return h(), U(z, null, [
|
|
1375
|
+
r(k, {
|
|
1357
1376
|
title: "Store",
|
|
1358
|
-
actions: [b, u,
|
|
1377
|
+
actions: [b, u, w],
|
|
1359
1378
|
"onClick:action": y
|
|
1360
1379
|
}, null, 8, ["actions"]),
|
|
1361
|
-
v("div",
|
|
1362
|
-
e(d) && e(d).length > 0 ? (h(),
|
|
1363
|
-
(h(!0),
|
|
1380
|
+
v("div", Jt, [
|
|
1381
|
+
e(d) && e(d).length > 0 ? (h(), U(z, { key: 0 }, [
|
|
1382
|
+
(h(!0), U(z, null, oe(e(d), (c, N) => (h(), U("div", {
|
|
1364
1383
|
key: c.name,
|
|
1365
1384
|
class: "space-y-8 py-12"
|
|
1366
1385
|
}, [
|
|
1367
|
-
v("div",
|
|
1368
|
-
v("div", Gt,
|
|
1386
|
+
v("div", Yt, [
|
|
1387
|
+
v("div", Gt, ae(c.name), 1),
|
|
1369
1388
|
r(he, { json: c }, null, 8, ["json"]),
|
|
1370
|
-
r(
|
|
1389
|
+
r(R, {
|
|
1371
1390
|
icon: "edit",
|
|
1372
1391
|
size: "md",
|
|
1373
1392
|
variant: "tertiary",
|
|
1374
|
-
onClick: (
|
|
1393
|
+
onClick: (M) => g(N)
|
|
1375
1394
|
}, null, 8, ["onClick"])
|
|
1376
1395
|
]),
|
|
1377
1396
|
v("div", Zt, [
|
|
1378
|
-
(h(!0),
|
|
1379
|
-
bundle:
|
|
1380
|
-
key:
|
|
1381
|
-
onEdit: (Z) => B({ bundle:
|
|
1382
|
-
onDelete: (Z) =>
|
|
1397
|
+
(h(!0), U(z, null, oe(c.bundles, (M, X) => (h(), O(ut, {
|
|
1398
|
+
bundle: M,
|
|
1399
|
+
key: M._id,
|
|
1400
|
+
onEdit: (Z) => B({ bundle: M, category: N, index: X }),
|
|
1401
|
+
onDelete: (Z) => I(null, N, X)
|
|
1383
1402
|
}, null, 8, ["bundle", "onEdit", "onDelete"]))), 128)),
|
|
1384
1403
|
r(mt, {
|
|
1385
|
-
onCreate: (
|
|
1404
|
+
onCreate: (M) => B({ category: N, index: -1 })
|
|
1386
1405
|
}, null, 8, ["onCreate"])
|
|
1387
1406
|
])
|
|
1388
1407
|
]))), 128)),
|
|
1389
|
-
r(
|
|
1408
|
+
r(zt, {
|
|
1390
1409
|
ref_key: "bundleSheetRef",
|
|
1391
1410
|
ref: n,
|
|
1392
|
-
onUpdate:
|
|
1411
|
+
onUpdate: I
|
|
1393
1412
|
}, null, 512)
|
|
1394
|
-
], 64)) : (h(), E
|
|
1413
|
+
], 64)) : (h(), O(E, {
|
|
1395
1414
|
key: 1,
|
|
1396
1415
|
variant: "outlined",
|
|
1397
1416
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
1398
1417
|
}, {
|
|
1399
|
-
default:
|
|
1418
|
+
default: P(() => [
|
|
1400
1419
|
Qt,
|
|
1401
1420
|
Xt,
|
|
1402
|
-
r(
|
|
1421
|
+
r(R, {
|
|
1403
1422
|
variant: "primary",
|
|
1404
1423
|
label: "Add category",
|
|
1405
1424
|
icon: "add",
|