@oneclick.dev/cms-core-modules 0.0.83 → 0.0.84
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/{ContentEditor-CxKirDdL.mjs → ContentEditor-DPhhOkx3.mjs} +7068 -5926
- package/dist/{ContentEditor-CRFkD4tE.js → ContentEditor-DrxtH_Hq.js} +42 -42
- package/dist/{Create-CsqVYhPO.mjs → Create-6uT9HWar.mjs} +35 -35
- package/dist/{Create-ip0MnS0o.js → Create-DuZ5nZrX.js} +1 -1
- package/dist/{DateFormatter-CvOfaUnU.mjs → DateFormatter-2B0R-DY4.mjs} +204 -400
- package/dist/DateFormatter-DbtOLV0L.js +1 -0
- package/dist/{Detail-RMXFuSRQ.js → Detail-BZ-iE9vf.js} +1 -1
- package/dist/{Detail-B4b_FLDa.mjs → Detail-C1Blq61w.mjs} +90 -90
- package/dist/{Detail-BayNaAg9.js → Detail-C8wQiDcv.js} +1 -1
- package/dist/{Detail-CbLk1v37.mjs → Detail-CJVMJDP7.mjs} +17 -17
- package/dist/{Detail-CnK-qbhE.js → Detail-CPqug27l.js} +1 -1
- package/dist/Detail-CjuhjPby.js +1 -0
- package/dist/{Detail-U0mgLKt6.mjs → Detail-CtItxMX4.mjs} +62 -63
- package/dist/{Detail-CVgWHbMC.mjs → Detail-Dnpnmy4-.mjs} +158 -158
- package/dist/{Entries-D7MHylQE.mjs → Entries-BkOPae4R.mjs} +49 -49
- package/dist/Entries-CcEW98F5.js +1 -0
- package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-CDc8MIq2.mjs → NewReservationDialog.vue_vue_type_script_setup_true_lang-Bc946oSc.mjs} +1 -1
- package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-StaNp-3y.js → NewReservationDialog.vue_vue_type_script_setup_true_lang-CqERfyYb.js} +1 -1
- package/dist/{Overview-CwCAeBnX.js → Overview-CA8wh_BI.js} +1 -1
- package/dist/{Overview-CgViRnNc.mjs → Overview-D4MFwRI_.mjs} +67 -68
- package/dist/{Overview-B2bFNGhH.js → Overview-Da0XexiT.js} +1 -1
- package/dist/Overview-DeQQ0FY3.js +1 -0
- package/dist/{Overview--XpvBbqz.mjs → Overview-DoOASlNz.mjs} +1 -3
- package/dist/{Overview-Cczt_dcE.mjs → Overview-gJSvftdE.mjs} +34 -34
- package/dist/{ReservationDetailDialog.vue_vue_type_script_setup_true_lang-B7ks5mbf.mjs → ReservationDetailDialog.vue_vue_type_script_setup_true_lang-Cohhnd5x.mjs} +0 -1
- package/dist/{ReservationDetailDialog.vue_vue_type_script_setup_true_lang-Vxubki_v.js → ReservationDetailDialog.vue_vue_type_script_setup_true_lang-VWVIxIr6.js} +1 -1
- package/dist/{SeoHealth-ZpvB7CS2.mjs → SeoHealth-Bc5chnaa.mjs} +14 -14
- package/dist/{SeoHealth-DFZ0LLBH.js → SeoHealth-BkpJ1F2Y.js} +1 -1
- package/dist/TableView-BPWAx--G.mjs +5743 -0
- package/dist/TableView-D63QrVlK.js +4 -0
- package/dist/View-BL70u98U.js +1 -0
- package/dist/{View-DDXN0tKD.mjs → View-BO5N911y.mjs} +5 -5
- package/dist/{agenda-Cl3s_FIE.mjs → agenda-C5grvzSa.mjs} +166 -169
- package/dist/agenda-DXMwVWpN.js +1 -0
- package/dist/{availability-B-tRp8hB.mjs → availability-C1NqOFsQ.mjs} +81 -81
- package/dist/{availability-BiBbzEIM.js → availability-D_wnfLsH.js} +1 -1
- package/dist/cms-core-modules.css +1 -1
- package/dist/{exceptions-DQPSFSj7.mjs → exceptions-BIwMhYa4.mjs} +1 -1
- package/dist/{exceptions-BA3PsW4n.js → exceptions-Cn7zooEu.js} +1 -1
- package/dist/{index-CBC9dWZ9.js → index-C9pSS15N.js} +2 -2
- package/dist/{index-YOOlBEZB.mjs → index-MwjeLHPP.mjs} +3 -3
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +22 -22
- package/dist/orders-CG1QUCN8.js +1 -0
- package/dist/{orders-DZzdsHOW.mjs → orders-CeixEBcU.mjs} +57 -58
- package/dist/server-handlers.cjs.js +1 -1
- package/dist/server-handlers.mjs +142 -147
- package/package.json +2 -2
- package/dist/DateFormatter-ls6HfWpS.js +0 -1
- package/dist/Detail-BcboL7NF.js +0 -1
- package/dist/Entries-BPkZ7Jg5.js +0 -1
- package/dist/Overview-B-8TLLjh.js +0 -1
- package/dist/TableView-BUPPcHUW.mjs +0 -89505
- package/dist/TableView-CksiPsTL.js +0 -586
- package/dist/View-DfzaVOzS.js +0 -1
- package/dist/agenda-rlFma_wn.js +0 -1
- package/dist/floating-ui.dom-B9WYoHj2.js +0 -1
- package/dist/floating-ui.dom-fpIfhXTZ.mjs +0 -1291
- package/dist/index-DYpruS-A-Cw57iwdY.mjs +0 -4210
- package/dist/index-DYpruS-A-DwDXo9Tq.js +0 -88
- package/dist/index-YMaY4uuk-BgpTtr73.js +0 -1
- package/dist/index-YMaY4uuk-C_xV5K9Z.mjs +0 -1300
- package/dist/orders-tP4WdF5q.js +0 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@oneclick.dev/cms-kit"),t={name:"Table",description:"Manage tables and structured data.",icon:"mdi-table",version:"1.0.0"},o=e.defineModuleConfig({getItems:{label:"Fetch items",type:"flow"},viewable:{label:"Viewable",type:"checkbox",default:!1},editable:{label:"Editable",type:"checkbox",default:!1},deletable:{label:"Deletable",type:"checkbox",default:!1},addable:{label:"Addable",type:"checkbox",default:!1},searchable:{label:"Searchable",type:"checkbox",default:!1},downloadable:{label:"Downloadable",type:"checkbox",default:!1},allowBulkActions:{label:"Allow Bulk Actions",type:"checkbox",default:!1}}),r=[{path:"",component:()=>Promise.resolve().then(()=>require("./TableView-CksiPsTL.js"))}],n=[],i={component:()=>Promise.resolve().then(()=>require("./index-DFQGVHTs.js")),metadata:t,config:o,routes:r,permissions:n},a={name:"Products",description:"Manage products",icon:"mdi-table",version:"1.0.0"},s=e.defineModuleConfig({project:{label:"Database",type:"resource",accept:["FIREBASE"]},productCollection:{label:"Product Collection",type:"input",default:"products"},collectionsCollection:{label:"Collections Collection",type:"input",default:"public/e-commerce:collections"},allowedMediaSources:{label:"Allowed Media Sources",type:"mediaSource",multiple:!0},defaultUploadMediaSource:{label:"Default Upload Media Source",type:"mediaSource",multiple:!1},previewUrl:{label:"Preview URL",type:"input",default:"https://preview.com/shop/{{slug}}"}}),c=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-B-8TLLjh.js"))},{path:"/:productId",component:()=>Promise.resolve().then(()=>require("./Detail-BcboL7NF.js"))},{path:"/new",component:()=>Promise.resolve().then(()=>require("./Detail-BcboL7NF.js"))}],p=[{key:"create-product",name:"Create product",description:"Team member can create a new product"},{key:"edit-product",name:"Edit product",description:"Team member can edit a product"},{key:"delete-product",name:"Delete product",description:"Team member can delete a product"}],l=[{name:"getEmptyStock",description:"Get a list of products with empty stock.",executionMode:"api",parameters:{type:"object",properties:{category:{type:"string",description:"Category of the product"}},required:["category"]}},{name:"viewProductDetails",description:"Show a card in chat with details of a product based on product ID.",executionMode:"component",chatComponent:"ProductDetailsCard",parameters:{type:"object",properties:{productId:{type:"string",description:"ID of the product"}},required:["productId"]}}],d={component:()=>Promise.resolve().then(()=>require("./index-R2oUDsjx.js")),metadata:a,config:s,routes:c,permissions:p,tools:l,chatComponents:{ProductDetailsCard:()=>Promise.resolve().then(()=>require("./ProductDetailsCard-Bn7qrgmc.js"))}},m={name:"Custom",description:"Custom module",icon:"mdi-table",version:"1.0.0"},u=e.defineModuleConfig({formLayout:{label:"Design View",type:"form"}}),h=[{path:"",component:()=>Promise.resolve().then(()=>require("./View-DfzaVOzS.js"))}],f=[],g={component:()=>Promise.resolve().then(()=>require("./index-CSxYBeVA.js")),metadata:m,config:u,routes:h,permissions:f},y={name:"Promo Codes",description:"Create and manage promo codes",icon:"mdi-table",version:"1.0.0"},b=e.defineModuleConfig({project:{label:"Project",type:"resource",accept:["FIREBASE"]},promoCodeCollection:{label:"Promo Code Collection",type:"input",default:"promo-codes"}}),v=[{path:"",component:()=>Promise.resolve().then(()=>require("./Create-ip0MnS0o.js"))},{path:"/promo-codes",component:()=>Promise.resolve().then(()=>require("./Find-Ds6OvuH6.js"))},{path:"/promo-codes/:promoCodeId",component:()=>Promise.resolve().then(()=>require("./Detail-RMXFuSRQ.js"))}],C=[{key:"create-promo-codes",name:"Create promo codes",description:"Team member can create promo codes"},{key:"view-promo-codes",name:"View promo codes",description:"Team member can view promo codes"},{key:"delete-promo-codes",name:"Delete promo codes",description:"Team member can delete promo codes"}],w={component:()=>Promise.resolve().then(()=>require("./index-CkiNvRzs.js")),metadata:y,config:b,routes:v,permissions:C},P={name:"Product Collections",description:"Manage product collections",icon:"mdi-table",version:"1.0.0"},q=e.defineModuleConfig({project:{label:"Project",type:"resource",accept:["FIREBASE"]},collectionsCollection:{label:"Collections Collection",type:"input",default:"public/e-commerce:collections"},allowedMediaSources:{label:"Allowed Media Sources",type:"mediaSource",multiple:!0},defaultUploadMediaSource:{label:"Default Upload Media Source",type:"mediaSource",multiple:!1}}),D=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-T-lsy3UZ.js"))},{path:"/:collectionId",component:()=>Promise.resolve().then(()=>require("./Detail-CnK-qbhE.js"))},{path:"/new",component:()=>Promise.resolve().then(()=>require("./Detail-CnK-qbhE.js"))}],S=[{key:"create-collection",name:"Create product collection",description:"Team member can create a new product collection"},{key:"edit-collection",name:"Edit product collection",description:"Team member can edit a product collection"},{key:"delete-collection",name:"Delete product collection",description:"Team member can delete a product collection"}],k={component:()=>Promise.resolve().then(()=>require("./index-CwqrAU-H.js")),metadata:P,config:q,routes:D,permissions:S},M={name:"Shipping Options",description:"Manage shipping options",icon:"mdi-table",version:"1.0.0"},A=e.defineModuleConfig({project:{label:"Project",type:"resource",accept:["FIREBASE"]},shippingOptionsCollection:{label:"Shipping Options Collection",type:"input",default:"public/e-commerce:shipping-options"}}),$=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-BbvfH1u-.js"))},{path:"/:optionId",component:()=>Promise.resolve().then(()=>require("./Detail-BayNaAg9.js"))},{path:"/new",component:()=>Promise.resolve().then(()=>require("./Detail-BayNaAg9.js"))}],T=[{key:"create-option",name:"Create shipping option",description:"Team member can create a new shipping option"},{key:"edit-option",name:"Edit shipping option",description:"Team member can edit a shipping option"},{key:"delete-option",name:"Delete shipping option",description:"Team member can delete a shipping option"}],x={component:()=>Promise.resolve().then(()=>require("./index-Co4ON2Di.js")),metadata:M,config:A,routes:$,permissions:T},E={name:"Google Analytics",description:"Configure Google Analytics settings.",icon:"mdi-google-analytics",version:"1.0.0"},I=e.defineModuleConfig({serviceAccount:{label:"Google Service Account",type:"resource",accept:["GOOGLE_SERVICE_ACCOUNT"]},propertyId:{label:"GA4 Property ID",type:"input",default:""},siteUrl:{label:"Search Console Site URL",type:"input",default:"",placeholder:"https://example.com or sc-domain:example.com",description:"Optional. When set, the module will fetch real keyword data from Google Search Console. Use the same site URL format as shown in Search Console."}}),j=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-B2bFNGhH.js"))},{path:"/acquisition",component:()=>Promise.resolve().then(()=>require("./Acquisition-_-cq972V.js"))},{path:"/content",component:()=>Promise.resolve().then(()=>require("./Content-C-4Cdniz.js"))},{path:"/audience",component:()=>Promise.resolve().then(()=>require("./Audience-QnFQs93n.js"))},{path:"/seo",component:()=>Promise.resolve().then(()=>require("./SeoHealth-DFZ0LLBH.js"))}],U=[],Y=[{name:"getTopPages",description:"Show a card in chat with the most popular/visited pages on the website for a given period.",executionMode:"component",chatComponent:"TopPagesCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Use relative formats like 'yesterday', '7daysAgo', '30daysAgo', '90daysAgo', '365daysAgo' or exact dates 'YYYY-MM-DD'. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Use 'today', 'yesterday', or exact dates 'YYYY-MM-DD'. Default: 'today'"},limit:{type:"number",description:"Number of pages to show. Default: 10, max: 50",default:10}},required:[]}},{name:"getVisitorStats",description:"Show a card in chat with visitor/traffic statistics (sessions, users, page views, bounce rate, etc.) for a given period. Use this when the user asks about traffic, visitors, how many people visited, etc.",executionMode:"component",chatComponent:"VisitorStatsCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Use 'yesterday' for yesterday, '7daysAgo' for last week, '30daysAgo' for last month, '90daysAgo' for last quarter, '365daysAgo' for last year, or exact 'YYYY-MM-DD'. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Use 'today', 'yesterday', or exact 'YYYY-MM-DD'. Default: 'today'"}},required:[]}},{name:"getSearchTerms",description:"Show a card in chat with search terms/keywords that bring visitors to the website. Use this when the user asks about keywords, SEO terms, what people search for, or search queries.",executionMode:"component",chatComponent:"SearchTermsCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Default: 'today'"}},required:[]}},{name:"getTrafficSources",description:"Show a card in chat with where website visitors are coming from (traffic sources, channels, referrals). Use this when the user asks about traffic sources, where visitors come from, referrals, channels, etc.",executionMode:"component",chatComponent:"TrafficSourcesCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Default: 'today'"}},required:[]}},{name:"getRealtimeVisitors",description:"Show a card in chat with the current real-time active visitors on the website right now.",executionMode:"component",chatComponent:"RealtimeCard",parameters:{type:"object",properties:{},required:[]}},{name:"getCountryBreakdown",description:"Show a card in chat with a geographic breakdown of where website visitors are located. Use this when the user asks about visitor countries, geographic distribution, or where their audience is from.",executionMode:"component",chatComponent:"CountryBreakdownCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Default: 'today'"}},required:[]}},{name:"getDeviceBreakdown",description:"Show a card in chat with a device breakdown (desktop, mobile, tablet) of website visitors. Use this when the user asks about what devices people use, mobile vs desktop traffic, or if their site is mobile-friendly.",executionMode:"component",chatComponent:"DeviceBreakdownCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Default: 'today'"}},required:[]}},{name:"getPeakHours",description:"Show a card in chat with peak traffic hours and a weekly heatmap showing when visitors are most active. Use this when the user asks about best times to post, peak hours, busiest times, or when their audience is online.",executionMode:"component",chatComponent:"PeakHoursCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Default: 'today'"}},required:[]}}],R={component:()=>Promise.resolve().then(()=>require("./index-DwHYfZl_.js")),metadata:E,config:I,routes:j,permissions:U,tools:Y,chatComponents:{TopPagesCard:()=>Promise.resolve().then(()=>require("./TopPagesCard-BDeA997A.js")),VisitorStatsCard:()=>Promise.resolve().then(()=>require("./VisitorStatsCard-BmByE_Hi.js")),SearchTermsCard:()=>Promise.resolve().then(()=>require("./SearchTermsCard-BsB-63aH.js")),TrafficSourcesCard:()=>Promise.resolve().then(()=>require("./TrafficSourcesCard-C3ziDTUL.js")),RealtimeCard:()=>Promise.resolve().then(()=>require("./RealtimeCard--APfRNc8.js")),CountryBreakdownCard:()=>Promise.resolve().then(()=>require("./CountryBreakdownCard-D7BK3nRD.js")),DeviceBreakdownCard:()=>Promise.resolve().then(()=>require("./DeviceBreakdownCard-DRhQ9ufG.js")),PeakHoursCard:()=>Promise.resolve().then(()=>require("./PeakHoursCard-BR5zmta4.js"))}},B={name:"Content Manager",description:"Create and manage content",icon:"mdi-table",version:"1.0.0"},O=e.defineModuleConfig({project:{label:"Database",type:"resource",accept:["FIREBASE"]},domain:{label:"Domain",type:"input",default:"https://domain.com"},collectionsCollection:{label:"Collections Collection",type:"input",default:"content_collections"},contentCollection:{label:"Content Collection",type:"input",default:"content"},allowedMediaSources:{label:"Allowed Media Sources",type:"mediaSource",multiple:!0},defaultUploadMediaSource:{label:"Default Upload Media Source",type:"mediaSource",multiple:!1},supportedLanguages:{label:"Supported Languages",type:"select",predefinedOptions:"languages",multiple:!0},defaultLanguage:{label:"Default Language",type:"select",predefinedOptions:"languages"},githubIntegration:{label:"GitHub Integration",type:"resource",accept:["GITHUB"]},githubRepo:{label:"GitHub Repository",type:"input"},githubOwner:{label:"GitHub Owner",type:"input",required:!1}}),G=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-CwCAeBnX.js"))},{path:"/collections",component:()=>Promise.resolve().then(()=>require("./Overview-CwCAeBnX.js"))},{path:"/collections/:collectionId",component:()=>Promise.resolve().then(()=>require("./Entries-BPkZ7Jg5.js"))},{path:"/collections/:collectionId/:entryId",component:()=>Promise.resolve().then(()=>require("./ContentEditor-CRFkD4tE.js"))},{path:"/components",component:()=>Promise.resolve().then(()=>require("./Components-DXbx0RLV.js"))},{path:"/global-styling",component:()=>Promise.resolve().then(()=>require("./GlobalStyling-CnSlXkZc.js"))}],L=[{key:"create-content",name:"Create content",description:"Team member can create content"},{key:"edit-content",name:"Edit content",description:"Team member can edit content"},{key:"delete-content",name:"Delete content",description:"Team member can delete content"}],F={component:()=>Promise.resolve().then(()=>require("./index-UtjLbLw-.js")),metadata:B,config:O,routes:G,permissions:L},V={name:"Mail Templates",description:"Build templates for your transactional emails.",icon:"mdi-table",version:"1.0.0"},H=e.defineModuleConfig({project:{label:"Project",type:"resource",accept:["FIREBASE"]},templateCollection:{label:"Mail Templates Collection",type:"input",default:"mail-templates"}}),N=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-BDlBCUI_.js"))},{path:"/:optionId",component:()=>Promise.resolve().then(()=>require("./Detail-mvSGbnFU.js"))},{path:"/new",component:()=>Promise.resolve().then(()=>require("./Detail-mvSGbnFU.js"))}],_=[{key:"create-template",name:"Create mail template",description:"Team member can create a new mail template"},{key:"edit-template",name:"Edit mail template",description:"Team member can edit a mail template"},{key:"delete-template",name:"Delete mail template",description:"Team member can delete a mail template"}],K={component:()=>Promise.resolve().then(()=>require("./index-Cz-baGax.js")),metadata:V,config:H,routes:N,permissions:_},W={name:"Appointments",description:"Create and manage agendas for booking appointments.",icon:"mdi-table",version:"1.0.0"},z=e.defineModuleConfig({project:{label:"Project",type:"resource",accept:["FIREBASE"]},mailAccount:{label:"Mail account",type:"resource",accept:["GMAIL"]},agendaCollection:{label:"Agenda Collection",type:"input",default:"agendas"},reservationsCollection:{label:"Reservations Collection",type:"input",default:"bookings_orders"},reservedSpotsCollection:{label:"Reserved Spots Collection",type:"input",default:"reserved_spots"}}),J=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-t0pG5xjA.js"))},{path:"/create",component:()=>Promise.resolve().then(()=>require("./index-D2a6wEPh.js"))},{path:"/create/regular",component:()=>Promise.resolve().then(()=>require("./regular-1LXNPviB.js"))},{path:"/edit/:id",component:()=>Promise.resolve().then(()=>require("./index-CBC9dWZ9.js"))},{path:"/edit/:id/agenda",component:()=>Promise.resolve().then(()=>require("./agenda-rlFma_wn.js"))},{path:"/edit/:id/regular-slots",component:()=>Promise.resolve().then(()=>require("./regular-slots-Bs3WJB3U.js"))},{path:"/edit/:id/exceptions",component:()=>Promise.resolve().then(()=>require("./exceptions-BA3PsW4n.js"))},{path:"/edit/:id/availability",component:()=>Promise.resolve().then(()=>require("./availability-BiBbzEIM.js"))},{path:"/edit/:id/payment",component:()=>Promise.resolve().then(()=>require("./payment-BQaAqQ5q.js"))},{path:"/edit/:id/resources",component:()=>Promise.resolve().then(()=>require("./resources-eb0pivDL.js"))},{path:"/edit/:id/orders",component:()=>Promise.resolve().then(()=>require("./orders-tP4WdF5q.js"))}],Q=[{key:"create-agendas",name:"Create agendas",description:"Team member can create agendas"},{key:"edit-agendas",name:"Edit agendas",description:"Team member can edit agendas"},{key:"delete-agendas",name:"Delete agendas",description:"Team member can delete agendas"},{key:"manage-reservations",name:"Manage reservations",description:"Team member can create, edit, and delete reservations"}],X=[{name:"findAppointment",description:"Show a card in chat with details of an appointment/booking/reservation/...",executionMode:"component",chatComponent:"AppointmentDetailsCard",parameters:{type:"object",properties:{name:{type:"string",description:"Name of the booker"},email:{type:"string",description:"Email of the booker"},date:{type:"string",description:"Date of the appointment (YYYY-MM-DD)"}},required:["date"]}},{name:"getRecentAppointments",description:"Show a table in chat with recent appointments, default loading the latest 20 appointments.",executionMode:"component",chatComponent:"AppointmentListTable",parameters:{type:"object",properties:{quantity:{type:"number",description:"Number of appointments to load. default: 20 max: 100",default:20}},required:["quantity"]}},{name:"changeAppointmentDetails",description:"Show a card in chat where user can edit name, email and date of an existing appointment.",executionMode:"component",chatComponent:"AppointmentEditor",parameters:{type:"object",properties:{orderId:{type:"string",description:"ID of the order / appointment. This is NOT the reservation ID."}},required:["orderId"]}}],Z={component:()=>Promise.resolve().then(()=>require("./index-9HVlmvK3.js")),metadata:W,config:z,routes:J,permissions:Q,tools:X,chatComponents:{AppointmentDetailsCard:()=>Promise.resolve().then(()=>require("./AppointmentDetailsCard-DpLM5IrB.js")),AppointmentListTable:()=>Promise.resolve().then(()=>require("./AppointmentListTable-CQ0WIXtj.js")),AppointmentEditor:()=>Promise.resolve().then(()=>require("./AppointmentEditor-CaTfbkIf.js"))}};exports.appointments=Z;exports.contentManager=F;exports.custom=g;exports.googleAnalytics=R;exports.mailTemplates=K;exports.productCollections=k;exports.products=d;exports.promoCodes=w;exports.shippingOptions=x;exports.table=i;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@oneclick.dev/cms-kit"),t={name:"Table",description:"Manage tables and structured data.",icon:"mdi-table",version:"1.0.0"},o=e.defineModuleConfig({getItems:{label:"Fetch items",type:"flow"},viewable:{label:"Viewable",type:"checkbox",default:!1},editable:{label:"Editable",type:"checkbox",default:!1},deletable:{label:"Deletable",type:"checkbox",default:!1},addable:{label:"Addable",type:"checkbox",default:!1},searchable:{label:"Searchable",type:"checkbox",default:!1},downloadable:{label:"Downloadable",type:"checkbox",default:!1},allowBulkActions:{label:"Allow Bulk Actions",type:"checkbox",default:!1}}),r=[{path:"",component:()=>Promise.resolve().then(()=>require("./TableView-D63QrVlK.js"))}],n=[],i={component:()=>Promise.resolve().then(()=>require("./index-DFQGVHTs.js")),metadata:t,config:o,routes:r,permissions:n},a={name:"Products",description:"Manage products",icon:"mdi-table",version:"1.0.0"},s=e.defineModuleConfig({project:{label:"Database",type:"resource",accept:["FIREBASE"]},productCollection:{label:"Product Collection",type:"input",default:"products"},collectionsCollection:{label:"Collections Collection",type:"input",default:"public/e-commerce:collections"},allowedMediaSources:{label:"Allowed Media Sources",type:"mediaSource",multiple:!0},defaultUploadMediaSource:{label:"Default Upload Media Source",type:"mediaSource",multiple:!1},previewUrl:{label:"Preview URL",type:"input",default:"https://preview.com/shop/{{slug}}"}}),c=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-DeQQ0FY3.js"))},{path:"/:productId",component:()=>Promise.resolve().then(()=>require("./Detail-CjuhjPby.js"))},{path:"/new",component:()=>Promise.resolve().then(()=>require("./Detail-CjuhjPby.js"))}],p=[{key:"create-product",name:"Create product",description:"Team member can create a new product"},{key:"edit-product",name:"Edit product",description:"Team member can edit a product"},{key:"delete-product",name:"Delete product",description:"Team member can delete a product"}],l=[{name:"getEmptyStock",description:"Get a list of products with empty stock.",executionMode:"api",parameters:{type:"object",properties:{category:{type:"string",description:"Category of the product"}},required:["category"]}},{name:"viewProductDetails",description:"Show a card in chat with details of a product based on product ID.",executionMode:"component",chatComponent:"ProductDetailsCard",parameters:{type:"object",properties:{productId:{type:"string",description:"ID of the product"}},required:["productId"]}}],d={component:()=>Promise.resolve().then(()=>require("./index-R2oUDsjx.js")),metadata:a,config:s,routes:c,permissions:p,tools:l,chatComponents:{ProductDetailsCard:()=>Promise.resolve().then(()=>require("./ProductDetailsCard-Bn7qrgmc.js"))}},m={name:"Custom",description:"Custom module",icon:"mdi-table",version:"1.0.0"},u=e.defineModuleConfig({formLayout:{label:"Design View",type:"form"}}),h=[{path:"",component:()=>Promise.resolve().then(()=>require("./View-BL70u98U.js"))}],f=[],g={component:()=>Promise.resolve().then(()=>require("./index-CSxYBeVA.js")),metadata:m,config:u,routes:h,permissions:f},y={name:"Promo Codes",description:"Create and manage promo codes",icon:"mdi-table",version:"1.0.0"},b=e.defineModuleConfig({project:{label:"Project",type:"resource",accept:["FIREBASE"]},promoCodeCollection:{label:"Promo Code Collection",type:"input",default:"promo-codes"}}),v=[{path:"",component:()=>Promise.resolve().then(()=>require("./Create-DuZ5nZrX.js"))},{path:"/promo-codes",component:()=>Promise.resolve().then(()=>require("./Find-Ds6OvuH6.js"))},{path:"/promo-codes/:promoCodeId",component:()=>Promise.resolve().then(()=>require("./Detail-BZ-iE9vf.js"))}],C=[{key:"create-promo-codes",name:"Create promo codes",description:"Team member can create promo codes"},{key:"view-promo-codes",name:"View promo codes",description:"Team member can view promo codes"},{key:"delete-promo-codes",name:"Delete promo codes",description:"Team member can delete promo codes"}],w={component:()=>Promise.resolve().then(()=>require("./index-CkiNvRzs.js")),metadata:y,config:b,routes:v,permissions:C},P={name:"Product Collections",description:"Manage product collections",icon:"mdi-table",version:"1.0.0"},q=e.defineModuleConfig({project:{label:"Project",type:"resource",accept:["FIREBASE"]},collectionsCollection:{label:"Collections Collection",type:"input",default:"public/e-commerce:collections"},allowedMediaSources:{label:"Allowed Media Sources",type:"mediaSource",multiple:!0},defaultUploadMediaSource:{label:"Default Upload Media Source",type:"mediaSource",multiple:!1}}),D=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-T-lsy3UZ.js"))},{path:"/:collectionId",component:()=>Promise.resolve().then(()=>require("./Detail-CPqug27l.js"))},{path:"/new",component:()=>Promise.resolve().then(()=>require("./Detail-CPqug27l.js"))}],S=[{key:"create-collection",name:"Create product collection",description:"Team member can create a new product collection"},{key:"edit-collection",name:"Edit product collection",description:"Team member can edit a product collection"},{key:"delete-collection",name:"Delete product collection",description:"Team member can delete a product collection"}],k={component:()=>Promise.resolve().then(()=>require("./index-CwqrAU-H.js")),metadata:P,config:q,routes:D,permissions:S},M={name:"Shipping Options",description:"Manage shipping options",icon:"mdi-table",version:"1.0.0"},A=e.defineModuleConfig({project:{label:"Project",type:"resource",accept:["FIREBASE"]},shippingOptionsCollection:{label:"Shipping Options Collection",type:"input",default:"public/e-commerce:shipping-options"}}),$=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-BbvfH1u-.js"))},{path:"/:optionId",component:()=>Promise.resolve().then(()=>require("./Detail-C8wQiDcv.js"))},{path:"/new",component:()=>Promise.resolve().then(()=>require("./Detail-C8wQiDcv.js"))}],T=[{key:"create-option",name:"Create shipping option",description:"Team member can create a new shipping option"},{key:"edit-option",name:"Edit shipping option",description:"Team member can edit a shipping option"},{key:"delete-option",name:"Delete shipping option",description:"Team member can delete a shipping option"}],x={component:()=>Promise.resolve().then(()=>require("./index-Co4ON2Di.js")),metadata:M,config:A,routes:$,permissions:T},E={name:"Google Analytics",description:"Configure Google Analytics settings.",icon:"mdi-google-analytics",version:"1.0.0"},I=e.defineModuleConfig({serviceAccount:{label:"Google Service Account",type:"resource",accept:["GOOGLE_SERVICE_ACCOUNT"]},propertyId:{label:"GA4 Property ID",type:"input",default:""},siteUrl:{label:"Search Console Site URL",type:"input",default:"",placeholder:"https://example.com or sc-domain:example.com",description:"Optional. When set, the module will fetch real keyword data from Google Search Console. Use the same site URL format as shown in Search Console."}}),j=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-Da0XexiT.js"))},{path:"/acquisition",component:()=>Promise.resolve().then(()=>require("./Acquisition-_-cq972V.js"))},{path:"/content",component:()=>Promise.resolve().then(()=>require("./Content-C-4Cdniz.js"))},{path:"/audience",component:()=>Promise.resolve().then(()=>require("./Audience-QnFQs93n.js"))},{path:"/seo",component:()=>Promise.resolve().then(()=>require("./SeoHealth-BkpJ1F2Y.js"))}],U=[],Y=[{name:"getTopPages",description:"Show a card in chat with the most popular/visited pages on the website for a given period.",executionMode:"component",chatComponent:"TopPagesCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Use relative formats like 'yesterday', '7daysAgo', '30daysAgo', '90daysAgo', '365daysAgo' or exact dates 'YYYY-MM-DD'. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Use 'today', 'yesterday', or exact dates 'YYYY-MM-DD'. Default: 'today'"},limit:{type:"number",description:"Number of pages to show. Default: 10, max: 50",default:10}},required:[]}},{name:"getVisitorStats",description:"Show a card in chat with visitor/traffic statistics (sessions, users, page views, bounce rate, etc.) for a given period. Use this when the user asks about traffic, visitors, how many people visited, etc.",executionMode:"component",chatComponent:"VisitorStatsCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Use 'yesterday' for yesterday, '7daysAgo' for last week, '30daysAgo' for last month, '90daysAgo' for last quarter, '365daysAgo' for last year, or exact 'YYYY-MM-DD'. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Use 'today', 'yesterday', or exact 'YYYY-MM-DD'. Default: 'today'"}},required:[]}},{name:"getSearchTerms",description:"Show a card in chat with search terms/keywords that bring visitors to the website. Use this when the user asks about keywords, SEO terms, what people search for, or search queries.",executionMode:"component",chatComponent:"SearchTermsCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Default: 'today'"}},required:[]}},{name:"getTrafficSources",description:"Show a card in chat with where website visitors are coming from (traffic sources, channels, referrals). Use this when the user asks about traffic sources, where visitors come from, referrals, channels, etc.",executionMode:"component",chatComponent:"TrafficSourcesCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Default: 'today'"}},required:[]}},{name:"getRealtimeVisitors",description:"Show a card in chat with the current real-time active visitors on the website right now.",executionMode:"component",chatComponent:"RealtimeCard",parameters:{type:"object",properties:{},required:[]}},{name:"getCountryBreakdown",description:"Show a card in chat with a geographic breakdown of where website visitors are located. Use this when the user asks about visitor countries, geographic distribution, or where their audience is from.",executionMode:"component",chatComponent:"CountryBreakdownCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Default: 'today'"}},required:[]}},{name:"getDeviceBreakdown",description:"Show a card in chat with a device breakdown (desktop, mobile, tablet) of website visitors. Use this when the user asks about what devices people use, mobile vs desktop traffic, or if their site is mobile-friendly.",executionMode:"component",chatComponent:"DeviceBreakdownCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Default: 'today'"}},required:[]}},{name:"getPeakHours",description:"Show a card in chat with peak traffic hours and a weekly heatmap showing when visitors are most active. Use this when the user asks about best times to post, peak hours, busiest times, or when their audience is online.",executionMode:"component",chatComponent:"PeakHoursCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Default: 'today'"}},required:[]}}],R={component:()=>Promise.resolve().then(()=>require("./index-DwHYfZl_.js")),metadata:E,config:I,routes:j,permissions:U,tools:Y,chatComponents:{TopPagesCard:()=>Promise.resolve().then(()=>require("./TopPagesCard-BDeA997A.js")),VisitorStatsCard:()=>Promise.resolve().then(()=>require("./VisitorStatsCard-BmByE_Hi.js")),SearchTermsCard:()=>Promise.resolve().then(()=>require("./SearchTermsCard-BsB-63aH.js")),TrafficSourcesCard:()=>Promise.resolve().then(()=>require("./TrafficSourcesCard-C3ziDTUL.js")),RealtimeCard:()=>Promise.resolve().then(()=>require("./RealtimeCard--APfRNc8.js")),CountryBreakdownCard:()=>Promise.resolve().then(()=>require("./CountryBreakdownCard-D7BK3nRD.js")),DeviceBreakdownCard:()=>Promise.resolve().then(()=>require("./DeviceBreakdownCard-DRhQ9ufG.js")),PeakHoursCard:()=>Promise.resolve().then(()=>require("./PeakHoursCard-BR5zmta4.js"))}},B={name:"Content Manager",description:"Create and manage content",icon:"mdi-table",version:"1.0.0"},O=e.defineModuleConfig({project:{label:"Database",type:"resource",accept:["FIREBASE"]},domain:{label:"Domain",type:"input",default:"https://domain.com"},collectionsCollection:{label:"Collections Collection",type:"input",default:"content_collections"},contentCollection:{label:"Content Collection",type:"input",default:"content"},allowedMediaSources:{label:"Allowed Media Sources",type:"mediaSource",multiple:!0},defaultUploadMediaSource:{label:"Default Upload Media Source",type:"mediaSource",multiple:!1},supportedLanguages:{label:"Supported Languages",type:"select",predefinedOptions:"languages",multiple:!0},defaultLanguage:{label:"Default Language",type:"select",predefinedOptions:"languages"},githubIntegration:{label:"GitHub Integration",type:"resource",accept:["GITHUB"]},githubRepo:{label:"GitHub Repository",type:"input"},githubOwner:{label:"GitHub Owner",type:"input",required:!1}}),G=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-CA8wh_BI.js"))},{path:"/collections",component:()=>Promise.resolve().then(()=>require("./Overview-CA8wh_BI.js"))},{path:"/collections/:collectionId",component:()=>Promise.resolve().then(()=>require("./Entries-CcEW98F5.js"))},{path:"/collections/:collectionId/:entryId",component:()=>Promise.resolve().then(()=>require("./ContentEditor-DrxtH_Hq.js"))},{path:"/components",component:()=>Promise.resolve().then(()=>require("./Components-DXbx0RLV.js"))},{path:"/global-styling",component:()=>Promise.resolve().then(()=>require("./GlobalStyling-CnSlXkZc.js"))}],L=[{key:"create-content",name:"Create content",description:"Team member can create content"},{key:"edit-content",name:"Edit content",description:"Team member can edit content"},{key:"delete-content",name:"Delete content",description:"Team member can delete content"}],F={component:()=>Promise.resolve().then(()=>require("./index-UtjLbLw-.js")),metadata:B,config:O,routes:G,permissions:L},V={name:"Mail Templates",description:"Build templates for your transactional emails.",icon:"mdi-table",version:"1.0.0"},H=e.defineModuleConfig({project:{label:"Project",type:"resource",accept:["FIREBASE"]},templateCollection:{label:"Mail Templates Collection",type:"input",default:"mail-templates"}}),N=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-BDlBCUI_.js"))},{path:"/:optionId",component:()=>Promise.resolve().then(()=>require("./Detail-mvSGbnFU.js"))},{path:"/new",component:()=>Promise.resolve().then(()=>require("./Detail-mvSGbnFU.js"))}],_=[{key:"create-template",name:"Create mail template",description:"Team member can create a new mail template"},{key:"edit-template",name:"Edit mail template",description:"Team member can edit a mail template"},{key:"delete-template",name:"Delete mail template",description:"Team member can delete a mail template"}],K={component:()=>Promise.resolve().then(()=>require("./index-Cz-baGax.js")),metadata:V,config:H,routes:N,permissions:_},W={name:"Appointments",description:"Create and manage agendas for booking appointments.",icon:"mdi-table",version:"1.0.0"},z=e.defineModuleConfig({project:{label:"Project",type:"resource",accept:["FIREBASE"]},mailAccount:{label:"Mail account",type:"resource",accept:["GMAIL"]},agendaCollection:{label:"Agenda Collection",type:"input",default:"agendas"},reservationsCollection:{label:"Reservations Collection",type:"input",default:"bookings_orders"},reservedSpotsCollection:{label:"Reserved Spots Collection",type:"input",default:"reserved_spots"}}),J=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-t0pG5xjA.js"))},{path:"/create",component:()=>Promise.resolve().then(()=>require("./index-D2a6wEPh.js"))},{path:"/create/regular",component:()=>Promise.resolve().then(()=>require("./regular-1LXNPviB.js"))},{path:"/edit/:id",component:()=>Promise.resolve().then(()=>require("./index-C9pSS15N.js"))},{path:"/edit/:id/agenda",component:()=>Promise.resolve().then(()=>require("./agenda-DXMwVWpN.js"))},{path:"/edit/:id/regular-slots",component:()=>Promise.resolve().then(()=>require("./regular-slots-Bs3WJB3U.js"))},{path:"/edit/:id/exceptions",component:()=>Promise.resolve().then(()=>require("./exceptions-Cn7zooEu.js"))},{path:"/edit/:id/availability",component:()=>Promise.resolve().then(()=>require("./availability-D_wnfLsH.js"))},{path:"/edit/:id/payment",component:()=>Promise.resolve().then(()=>require("./payment-BQaAqQ5q.js"))},{path:"/edit/:id/resources",component:()=>Promise.resolve().then(()=>require("./resources-eb0pivDL.js"))},{path:"/edit/:id/orders",component:()=>Promise.resolve().then(()=>require("./orders-CG1QUCN8.js"))}],Q=[{key:"create-agendas",name:"Create agendas",description:"Team member can create agendas"},{key:"edit-agendas",name:"Edit agendas",description:"Team member can edit agendas"},{key:"delete-agendas",name:"Delete agendas",description:"Team member can delete agendas"},{key:"manage-reservations",name:"Manage reservations",description:"Team member can create, edit, and delete reservations"}],X=[{name:"findAppointment",description:"Show a card in chat with details of an appointment/booking/reservation/...",executionMode:"component",chatComponent:"AppointmentDetailsCard",parameters:{type:"object",properties:{name:{type:"string",description:"Name of the booker"},email:{type:"string",description:"Email of the booker"},date:{type:"string",description:"Date of the appointment (YYYY-MM-DD)"}},required:["date"]}},{name:"getRecentAppointments",description:"Show a table in chat with recent appointments, default loading the latest 20 appointments.",executionMode:"component",chatComponent:"AppointmentListTable",parameters:{type:"object",properties:{quantity:{type:"number",description:"Number of appointments to load. default: 20 max: 100",default:20}},required:["quantity"]}},{name:"changeAppointmentDetails",description:"Show a card in chat where user can edit name, email and date of an existing appointment.",executionMode:"component",chatComponent:"AppointmentEditor",parameters:{type:"object",properties:{orderId:{type:"string",description:"ID of the order / appointment. This is NOT the reservation ID."}},required:["orderId"]}}],Z={component:()=>Promise.resolve().then(()=>require("./index-9HVlmvK3.js")),metadata:W,config:z,routes:J,permissions:Q,tools:X,chatComponents:{AppointmentDetailsCard:()=>Promise.resolve().then(()=>require("./AppointmentDetailsCard-DpLM5IrB.js")),AppointmentListTable:()=>Promise.resolve().then(()=>require("./AppointmentListTable-CQ0WIXtj.js")),AppointmentEditor:()=>Promise.resolve().then(()=>require("./AppointmentEditor-CaTfbkIf.js"))}};exports.appointments=Z;exports.contentManager=F;exports.custom=g;exports.googleAnalytics=R;exports.mailTemplates=K;exports.productCollections=k;exports.products=d;exports.promoCodes=w;exports.shippingOptions=x;exports.table=i;
|
package/dist/index.mjs
CHANGED
|
@@ -45,7 +45,7 @@ const t = {
|
|
|
45
45
|
default: !1
|
|
46
46
|
}
|
|
47
47
|
}), a = [
|
|
48
|
-
{ path: "", component: () => import("./TableView-
|
|
48
|
+
{ path: "", component: () => import("./TableView-BPWAx--G.mjs") }
|
|
49
49
|
], n = [], N = {
|
|
50
50
|
component: () => import("./index-Bkq58CeQ.mjs"),
|
|
51
51
|
metadata: t,
|
|
@@ -89,9 +89,9 @@ const t = {
|
|
|
89
89
|
default: "https://preview.com/shop/{{slug}}"
|
|
90
90
|
}
|
|
91
91
|
}), p = [
|
|
92
|
-
{ path: "", component: () => import("./Overview
|
|
93
|
-
{ path: "/:productId", component: () => import("./Detail-
|
|
94
|
-
{ path: "/new", component: () => import("./Detail-
|
|
92
|
+
{ path: "", component: () => import("./Overview-DoOASlNz.mjs") },
|
|
93
|
+
{ path: "/:productId", component: () => import("./Detail-Dnpnmy4-.mjs") },
|
|
94
|
+
{ path: "/new", component: () => import("./Detail-Dnpnmy4-.mjs") }
|
|
95
95
|
], s = [
|
|
96
96
|
{ key: "create-product", name: "Create product", description: "Team member can create a new product" },
|
|
97
97
|
{ key: "edit-product", name: "Edit product", description: "Team member can edit a product" },
|
|
@@ -153,7 +153,7 @@ const t = {
|
|
|
153
153
|
type: "form"
|
|
154
154
|
}
|
|
155
155
|
}), l = [
|
|
156
|
-
{ path: "", component: () => import("./View-
|
|
156
|
+
{ path: "", component: () => import("./View-BO5N911y.mjs") }
|
|
157
157
|
], u = [], W = {
|
|
158
158
|
component: () => import("./index-Dpl9sU6a.mjs"),
|
|
159
159
|
metadata: d,
|
|
@@ -177,9 +177,9 @@ const t = {
|
|
|
177
177
|
default: "promo-codes"
|
|
178
178
|
}
|
|
179
179
|
}), g = [
|
|
180
|
-
{ path: "", component: () => import("./Create-
|
|
180
|
+
{ path: "", component: () => import("./Create-6uT9HWar.mjs") },
|
|
181
181
|
{ path: "/promo-codes", component: () => import("./Find-XPcJxeRH.mjs") },
|
|
182
|
-
{ path: "/promo-codes/:promoCodeId", component: () => import("./Detail-
|
|
182
|
+
{ path: "/promo-codes/:promoCodeId", component: () => import("./Detail-CJVMJDP7.mjs") }
|
|
183
183
|
], b = [
|
|
184
184
|
{ key: "create-promo-codes", name: "Create promo codes", description: "Team member can create promo codes" },
|
|
185
185
|
{ key: "view-promo-codes", name: "View promo codes", description: "Team member can view promo codes" },
|
|
@@ -218,8 +218,8 @@ const t = {
|
|
|
218
218
|
}
|
|
219
219
|
}), C = [
|
|
220
220
|
{ path: "", component: () => import("./Overview-BCpJNiEB.mjs") },
|
|
221
|
-
{ path: "/:collectionId", component: () => import("./Detail-
|
|
222
|
-
{ path: "/new", component: () => import("./Detail-
|
|
221
|
+
{ path: "/:collectionId", component: () => import("./Detail-C1Blq61w.mjs") },
|
|
222
|
+
{ path: "/new", component: () => import("./Detail-C1Blq61w.mjs") }
|
|
223
223
|
], D = [
|
|
224
224
|
{ key: "create-collection", name: "Create product collection", description: "Team member can create a new product collection" },
|
|
225
225
|
{ key: "edit-collection", name: "Edit product collection", description: "Team member can edit a product collection" },
|
|
@@ -248,8 +248,8 @@ const t = {
|
|
|
248
248
|
}
|
|
249
249
|
}), v = [
|
|
250
250
|
{ path: "", component: () => import("./Overview-CIa1E-HH.mjs") },
|
|
251
|
-
{ path: "/:optionId", component: () => import("./Detail-
|
|
252
|
-
{ path: "/new", component: () => import("./Detail-
|
|
251
|
+
{ path: "/:optionId", component: () => import("./Detail-CtItxMX4.mjs") },
|
|
252
|
+
{ path: "/new", component: () => import("./Detail-CtItxMX4.mjs") }
|
|
253
253
|
], A = [
|
|
254
254
|
{ key: "create-option", name: "Create shipping option", description: "Team member can create a new shipping option" },
|
|
255
255
|
{ key: "edit-option", name: "Edit shipping option", description: "Team member can edit a shipping option" },
|
|
@@ -284,11 +284,11 @@ const t = {
|
|
|
284
284
|
description: "Optional. When set, the module will fetch real keyword data from Google Search Console. Use the same site URL format as shown in Search Console."
|
|
285
285
|
}
|
|
286
286
|
}), x = [
|
|
287
|
-
{ path: "", component: () => import("./Overview-
|
|
287
|
+
{ path: "", component: () => import("./Overview-gJSvftdE.mjs") },
|
|
288
288
|
{ path: "/acquisition", component: () => import("./Acquisition-D_Qx7XRY.mjs") },
|
|
289
289
|
{ path: "/content", component: () => import("./Content-DW6xvbUo.mjs") },
|
|
290
290
|
{ path: "/audience", component: () => import("./Audience-BdlrWkY-.mjs") },
|
|
291
|
-
{ path: "/seo", component: () => import("./SeoHealth-
|
|
291
|
+
{ path: "/seo", component: () => import("./SeoHealth-Bc5chnaa.mjs") }
|
|
292
292
|
], T = [], E = [
|
|
293
293
|
{
|
|
294
294
|
name: "getTopPages",
|
|
@@ -525,10 +525,10 @@ const t = {
|
|
|
525
525
|
required: !1
|
|
526
526
|
}
|
|
527
527
|
}), U = [
|
|
528
|
-
{ path: "", component: () => import("./Overview-
|
|
529
|
-
{ path: "/collections", component: () => import("./Overview-
|
|
530
|
-
{ path: "/collections/:collectionId", component: () => import("./Entries-
|
|
531
|
-
{ path: "/collections/:collectionId/:entryId", component: () => import("./ContentEditor-
|
|
528
|
+
{ path: "", component: () => import("./Overview-D4MFwRI_.mjs") },
|
|
529
|
+
{ path: "/collections", component: () => import("./Overview-D4MFwRI_.mjs") },
|
|
530
|
+
{ path: "/collections/:collectionId", component: () => import("./Entries-BkOPae4R.mjs") },
|
|
531
|
+
{ path: "/collections/:collectionId/:entryId", component: () => import("./ContentEditor-DPhhOkx3.mjs") },
|
|
532
532
|
{ path: "/components", component: () => import("./Components-C83O-xlF.mjs") },
|
|
533
533
|
{ path: "/global-styling", component: () => import("./GlobalStyling-C9VthHWK.mjs") }
|
|
534
534
|
], P = [
|
|
@@ -608,14 +608,14 @@ const t = {
|
|
|
608
608
|
{ path: "/create/regular", component: () => import("./regular-_05oq5Tx.mjs") },
|
|
609
609
|
// { path: '/create/full-day', component: () => import('./pages/create/full-day.vue') },
|
|
610
610
|
// { path: '/create/multi-day', component: () => import('./pages/create/multi-day.vue') },
|
|
611
|
-
{ path: "/edit/:id", component: () => import("./index-
|
|
612
|
-
{ path: "/edit/:id/agenda", component: () => import("./agenda-
|
|
611
|
+
{ path: "/edit/:id", component: () => import("./index-MwjeLHPP.mjs") },
|
|
612
|
+
{ path: "/edit/:id/agenda", component: () => import("./agenda-C5grvzSa.mjs") },
|
|
613
613
|
{ path: "/edit/:id/regular-slots", component: () => import("./regular-slots-C2NYxLPn.mjs") },
|
|
614
|
-
{ path: "/edit/:id/exceptions", component: () => import("./exceptions-
|
|
615
|
-
{ path: "/edit/:id/availability", component: () => import("./availability-
|
|
614
|
+
{ path: "/edit/:id/exceptions", component: () => import("./exceptions-BIwMhYa4.mjs") },
|
|
615
|
+
{ path: "/edit/:id/availability", component: () => import("./availability-C1NqOFsQ.mjs") },
|
|
616
616
|
{ path: "/edit/:id/payment", component: () => import("./payment-BbWByERf.mjs") },
|
|
617
617
|
{ path: "/edit/:id/resources", component: () => import("./resources-CFR_s89Z.mjs") },
|
|
618
|
-
{ path: "/edit/:id/orders", component: () => import("./orders-
|
|
618
|
+
{ path: "/edit/:id/orders", component: () => import("./orders-CeixEBcU.mjs") }
|
|
619
619
|
], F = [
|
|
620
620
|
{ key: "create-agendas", name: "Create agendas", description: "Team member can create agendas" },
|
|
621
621
|
{ key: "edit-agendas", name: "Edit agendas", description: "Team member can edit agendas" },
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),_=require("@oneclick.dev/cms-kit"),i=require("lucide-vue-next"),b=require("./ReservationDetailDialog.vue_vue_type_script_setup_true_lang-VWVIxIr6.js"),q=require("./EditLayout.vue_vue_type_script_setup_true_lang-Czu6Dcde.js"),M={class:"space-y-6"},H={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4"},$={class:"text-2xl font-semibold tracking-tight flex items-center gap-2"},Y={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4"},K={class:"flex items-center gap-1"},Q={class:"flex items-center gap-1"},X={class:"flex items-center gap-2"},G={class:"flex items-center gap-1"},J={class:"text-sm text-muted-foreground mt-2"},W={class:"relative mb-4"},Z={key:0,class:"mb-3 text-sm text-muted-foreground"},ee={key:1,class:"flex items-center justify-center py-8"},te={key:2,class:"text-center py-8 text-muted-foreground"},oe={key:3,class:"text-center py-8 text-muted-foreground"},ne={key:4,class:"space-y-2"},se=["onClick"],re={class:"flex items-start justify-between"},ae={class:"flex-1"},le={class:"font-medium"},ce={class:"text-sm text-muted-foreground"},ie={class:"text-sm text-muted-foreground"},de={class:"flex items-center gap-4 flex-wrap mt-1"},ue={class:"flex items-center gap-2 text-xs text-muted-foreground"},me={class:"flex items-center gap-2 text-xs text-muted-foreground"},pe={key:0,class:"flex items-center gap-1 text-xs text-muted-foreground"},fe={class:"flex items-center gap-2 mt-1 text-xs text-muted-foreground"},ge={class:"text-right"},ve={key:0,class:"inline-block px-2 py-1 text-xs rounded-full bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400"},_e={key:1,class:"inline-block px-2 py-1 text-xs rounded-full bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400"},xe={key:2,class:"inline-block px-2 py-1 text-xs rounded-full bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400"},ye={key:3,class:"inline-block px-2 py-1 text-xs rounded-full bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400"},he={key:4,class:"inline-block px-2 py-1 text-xs rounded-full bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400"},ke={key:5,class:"text-sm font-medium mt-1"},Ne=e.defineComponent({__name:"orders",setup(De){const N=_.useRoute();_.useRouter();const{params:S}=_.useModuleRoute(),{config:x}=_.useModule(),D=_.useFirebaseIntegration(x.project),d=e.ref([]),y=e.ref([]),v=e.ref(!0),m=e.ref(""),w=e.ref(null),p=new Date,c=e.ref(new Date),E=e.computed(()=>({date:z(c.value),resource:null}));e.provide("event",E);const B=e.computed(()=>{const t=new Date(p);t.setDate(p.getDate()-1);const o=new Date(p);return o.setDate(p.getDate()+1),c.value.toDateString()===p.toDateString()?"Today":c.value.toDateString()===t.toDateString()?"Yesterday":c.value.toDateString()===o.toDateString()?"Tomorrow":c.value.toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"})}),I=()=>{const t=new Date(c.value);t.setDate(t.getDate()-1),c.value=t},T=()=>{const t=new Date(c.value);t.setDate(t.getDate()+1),t<=p&&(c.value=t)},P=e.computed(()=>{const t=new Date(c.value);return t.setDate(t.getDate()+1),t<=p}),O=()=>{c.value=new Date},z=t=>{const o=t.getFullYear(),s=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0");return`${o}-${s}-${r}`},A=t=>t?new Date(t).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}):"",R=t=>t?new Date(t).toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"}):"",V=e.computed(()=>m.value.trim()?new b.Fuse(d.value,{keys:["customerInfo.firstName","customerInfo.lastName","customerInfo.email","customerInfo.phone","resourceName"],threshold:.3,ignoreLocation:!0}).search(m.value).map(o=>o.item):d.value),h=e.computed(()=>({spots:d.value.reduce((t,o)=>t+(o.spots||0),0),bookings:d.value.length,revenue:d.value.reduce((t,o)=>t+(o.reservationPrice||0),0)})),U=()=>{m.value=""},j=async()=>{try{const t=S.value.id,o=await D.get(x.agendaCollection,t);y.value=o?.resources?.filter(s=>s.isActive)||[]}catch(t){console.error("Error loading resources:",t),y.value=[]}},f=async()=>{v.value=!0,d.value=[];try{const t=S.value.id,o=new Date(c.value);o.setHours(0,0,0,0);const s=new Date(c.value);s.setHours(23,59,59,999);const r=await D.find(x.reservationsCollection,{filters:[{field:"agendaId",operator:"==",value:t},{field:"createdAt",operator:">=",value:o.toISOString()},{field:"createdAt",operator:"<=",value:s.toISOString()}]});let u=[];r.forEach(a=>{(a.reservations||[]).forEach(l=>{const k=y.value.find(C=>C.id===l.resourceId);u.push({customerInfo:a.customerInfo,amountDue:a.amountDue,amountPaid:a.amountPaid,status:a.status,reservationStatus:l.status,subtotal:a.subtotal,total:a.total,discount:a.discount,id:a.id,res_id:l.id,resourceId:l.resourceId,spots:l.spots,date:l.date,createdAt:a.createdAt,startTime:l.timeslot?.startTime,endTime:l.timeslot?.endTime,reservationPrice:l.totalPrice,reservationBasePrice:l.basePrice,reservationAddOnsPrice:l.addOnsPrice,pricingOptionId:l.pricingOptionId,pricingOption:l.pricingOption,resourceName:k?.name||"Unknown",resourceColor:k?.color})})}),d.value=u.sort((a,g)=>(g.createdAt||"").localeCompare(a.createdAt||""))}catch(t){console.error("Error loading orders:",t),d.value=[]}finally{v.value=!1}},F=async()=>{await j(),await f()},L=async(t,o)=>{const s=await D.get(x.reservationsCollection,t),r=s?.reservations?.find(u=>u.id===o);if(r){const u=y.value.find(g=>g.id===r.resourceId),a={customerInfo:s.customerInfo,amountDue:s.amountDue,amountPaid:s.amountPaid,status:s.status,reservationStatus:r.status,subtotal:s.subtotal,total:s.total,discount:s.discount,id:s.id,res_id:r.id,resourceId:r.resourceId,spots:r.spots,date:r.date,createdAt:s.createdAt,startTime:r.timeslot?.startTime,endTime:r.timeslot?.endTime,reservationPrice:r.totalPrice,reservationBasePrice:r.basePrice,reservationAddOnsPrice:r.addOnsPrice,pricingOptionId:r.pricingOptionId,pricingOption:r.pricingOption,resourceName:u?.name||"Unknown",resourceColor:u?.color};await e.nextTick(),w.value?.openDialog(a)}};return F(),e.onMounted(async()=>{if(N.query.orderId){const t=N.query.orderId,o=N.query.reservationId,s=new URL(window.location.href);s.searchParams.delete("orderId"),s.searchParams.delete("reservationId"),window.history.replaceState(window.history.state,"",s.toString()),await L(t,o)}}),e.watch(c,()=>{f()}),(t,o)=>{const s=e.resolveComponent("Badge"),r=e.resolveComponent("CardTitle"),u=e.resolveComponent("CardDescription"),a=e.resolveComponent("Button"),g=e.resolveComponent("CardHeader"),l=e.resolveComponent("Input"),k=e.resolveComponent("CardContent"),C=e.resolveComponent("Card");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(q._sfc_main,null,{default:e.withCtx(()=>[e.createElementVNode("div",M,[e.createElementVNode("div",H,[e.createElementVNode("div",null,[e.createElementVNode("h1",$,[e.createVNode(e.unref(i.ShoppingBag),{class:"size-6"}),o[1]||(o[1]=e.createTextVNode(" Orders ",-1))]),o[2]||(o[2]=e.createElementVNode("p",{class:"text-muted-foreground text-sm mt-1"}," View orders by when they were placed ",-1))])]),e.createVNode(C,null,{default:e.withCtx(()=>[e.createVNode(g,null,{default:e.withCtx(()=>[e.createElementVNode("div",Y,[e.createElementVNode("div",null,[e.createVNode(r,{class:"flex items-center gap-2"},{default:e.withCtx(()=>[o[3]||(o[3]=e.createTextVNode(" Orders received ",-1)),e.unref(h).bookings>0?(e.openBlock(),e.createBlock(s,{key:0,variant:"secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(h).bookings),1)]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(u,{class:"flex items-center gap-4 mt-1"},{default:e.withCtx(()=>[e.createElementVNode("span",K,[e.createVNode(e.unref(i.Users),{size:14}),e.createTextVNode(" "+e.toDisplayString(e.unref(h).spots)+" spots ",1)]),e.createElementVNode("span",Q," €"+e.toDisplayString(e.unref(h).revenue.toFixed(2))+" revenue ",1)]),_:1})]),e.createElementVNode("div",X,[e.createElementVNode("div",G,[e.createVNode(a,{variant:"ghost",size:"icon",class:"size-8",onClick:I},{default:e.withCtx(()=>[e.createVNode(e.unref(i.ChevronLeft),{size:16})]),_:1}),e.createVNode(a,{variant:"ghost",size:"sm",class:"h-8 px-3 text-xs",onClick:O},{default:e.withCtx(()=>[...o[4]||(o[4]=[e.createTextVNode(" Today ",-1)])]),_:1}),e.createVNode(a,{variant:"ghost",size:"icon",class:"size-8",onClick:T,disabled:!e.unref(P)},{default:e.withCtx(()=>[e.createVNode(e.unref(i.ChevronRight),{size:16})]),_:1},8,["disabled"])]),e.createVNode(a,{variant:"ghost",size:"icon",onClick:f,disabled:e.unref(v)},{default:e.withCtx(()=>[e.createVNode(e.unref(i.RefreshCw),{size:16,class:e.normalizeClass({"animate-spin":e.unref(v)})},null,8,["class"])]),_:1},8,["disabled"])])]),e.createElementVNode("div",J,e.toDisplayString(e.unref(B)),1)]),_:1}),e.createVNode(k,null,{default:e.withCtx(()=>[e.createElementVNode("div",W,[e.createVNode(e.unref(i.Search),{size:16,class:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),e.createVNode(l,{modelValue:e.unref(m),"onUpdate:modelValue":o[0]||(o[0]=n=>e.isRef(m)?m.value=n:null),placeholder:"Search by name, email, or phone...",class:"pl-9 pr-9"},null,8,["modelValue"]),e.unref(m)?(e.openBlock(),e.createBlock(a,{key:0,variant:"ghost",size:"icon",class:"absolute right-1 top-1/2 -translate-y-1/2 h-7 w-7",onClick:U},{default:e.withCtx(()=>[e.createVNode(e.unref(i.X),{size:14})]),_:1})):e.createCommentVNode("",!0)]),e.unref(m)?(e.openBlock(),e.createElementBlock("div",Z," Showing "+e.toDisplayString(e.unref(V).length)+" of "+e.toDisplayString(e.unref(d).length)+" orders ",1)):e.createCommentVNode("",!0),e.unref(v)?(e.openBlock(),e.createElementBlock("div",ee,[...o[5]||(o[5]=[e.createElementVNode("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"},null,-1)])])):e.unref(d).length===0?(e.openBlock(),e.createElementBlock("div",te,[e.createVNode(e.unref(i.ShoppingBag),{class:"size-12 mx-auto mb-3 opacity-50"}),o[6]||(o[6]=e.createElementVNode("p",null,"No orders received on this day",-1))])):e.unref(V).length===0?(e.openBlock(),e.createElementBlock("div",oe," No orders match your search ")):(e.openBlock(),e.createElementBlock("div",ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(V),n=>(e.openBlock(),e.createElementBlock("div",{key:n.res_id||n.id,class:"p-3 border rounded-lg hover:bg-muted/50 transition-colors cursor-pointer",onClick:we=>e.unref(w)?.openDialog(n)},[e.createElementVNode("div",re,[e.createElementVNode("div",ae,[e.createElementVNode("div",le,e.toDisplayString(n.customerInfo?.firstName)+" "+e.toDisplayString(n.customerInfo?.lastName||"Unknown Customer"),1),e.createElementVNode("div",ce,e.toDisplayString(n.customerInfo?.email),1),e.createElementVNode("div",ie,e.toDisplayString(n.customerInfo?.phone),1),e.createElementVNode("div",de,[e.createElementVNode("div",ue,[e.createVNode(e.unref(i.Calendar),{size:12}),e.createElementVNode("span",null,e.toDisplayString(R(n.date))+" · "+e.toDisplayString(n.startTime)+" - "+e.toDisplayString(n.endTime),1)]),e.createElementVNode("div",me,[e.createVNode(e.unref(i.Users),{size:12}),e.createElementVNode("span",null,e.toDisplayString(n.spots)+" spots",1)]),n.resourceName?(e.openBlock(),e.createElementBlock("div",pe,[e.createElementVNode("div",{class:"w-3 h-3 rounded-full",style:e.normalizeStyle({backgroundColor:n.resourceColor||"#6b7280"})},null,4),e.createElementVNode("span",null,e.toDisplayString(n.resourceName),1)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",fe,[e.createVNode(e.unref(i.Clock),{size:12}),e.createElementVNode("span",null,"Ordered at "+e.toDisplayString(A(n.createdAt)),1)])]),e.createElementVNode("div",ge,[n.reservationStatus==="needs_approval"?(e.openBlock(),e.createElementBlock("span",ve,"Needs Approval")):n.reservationStatus==="approved"?(e.openBlock(),e.createElementBlock("span",_e,"Approved")):n.reservationStatus==="rejected"?(e.openBlock(),e.createElementBlock("span",xe,"Rejected")):n.reservationStatus==="cancelled"?(e.openBlock(),e.createElementBlock("span",ye,"Cancelled")):(e.openBlock(),e.createElementBlock("span",he,"Pending")),n.reservationPrice||n.reservationPrice===0?(e.openBlock(),e.createElementBlock("div",ke," €"+e.toDisplayString(n.reservationPrice.toFixed(2)),1)):e.createCommentVNode("",!0)])])],8,se))),128))]))]),_:1})]),_:1})])]),_:1}),e.createVNode(b._sfc_main,{ref_key:"reservationDetailDialog",ref:w,onCancelled:f,onConfirmed:f,onRejected:f},null,512)],64)}}});exports.default=Ne;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as ee, ref as w, computed as
|
|
1
|
+
import { defineComponent as ee, ref as w, computed as b, provide as te, onMounted as se, watch as oe, resolveComponent as x, openBlock as c, createElementBlock as m, Fragment as U, createVNode as r, withCtx as f, createElementVNode as s, unref as o, createTextVNode as C, createBlock as j, toDisplayString as d, createCommentVNode as I, normalizeClass as ne, isRef as ae, renderList as re, normalizeStyle as ie, nextTick as le } from "vue";
|
|
2
2
|
import { useRoute as ce, useRouter as de, useModuleRoute as ue, useModule as me, useFirebaseIntegration as pe } from "@oneclick.dev/cms-kit";
|
|
3
|
-
import { ShoppingBag as L, Users as V, ChevronLeft as
|
|
4
|
-
import { F as De, _ as we } from "./ReservationDetailDialog.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { ShoppingBag as L, Users as V, ChevronLeft as fe, ChevronRight as ge, RefreshCw as ve, Search as _e, X as xe, Calendar as he, Clock as ye } from "lucide-vue-next";
|
|
4
|
+
import { F as De, _ as we } from "./ReservationDetailDialog.vue_vue_type_script_setup_true_lang-Cohhnd5x.mjs";
|
|
5
5
|
import { _ as ke } from "./EditLayout.vue_vue_type_script_setup_true_lang-CcysXzmW.mjs";
|
|
6
|
-
const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4" }, Ie = { class: "text-2xl font-semibold tracking-tight flex items-center gap-2" }, Se = { class: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4" },
|
|
6
|
+
const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4" }, Ie = { class: "text-2xl font-semibold tracking-tight flex items-center gap-2" }, Se = { class: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4" }, Pe = { class: "flex items-center gap-1" }, Oe = { class: "flex items-center gap-1" }, Te = { class: "flex items-center gap-2" }, ze = { class: "flex items-center gap-1" }, Ne = { class: "text-sm text-muted-foreground mt-2" }, Ae = { class: "relative mb-4" }, Re = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "mb-3 text-sm text-muted-foreground"
|
|
9
9
|
}, Be = {
|
|
@@ -42,14 +42,14 @@ const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:i
|
|
|
42
42
|
}, dt = /* @__PURE__ */ ee({
|
|
43
43
|
__name: "orders",
|
|
44
44
|
setup(ot) {
|
|
45
|
-
const
|
|
45
|
+
const z = ce();
|
|
46
46
|
de();
|
|
47
|
-
const { params: F } = ue(), { config:
|
|
47
|
+
const { params: F } = ue(), { config: S } = me(), N = pe(S.project), g = w([]), P = w([]), k = w(!0), _ = w(""), A = w(null), h = /* @__PURE__ */ new Date(), p = w(/* @__PURE__ */ new Date()), E = b(() => ({
|
|
48
48
|
date: Q(p.value),
|
|
49
49
|
resource: null
|
|
50
50
|
}));
|
|
51
51
|
te("event", E);
|
|
52
|
-
const $ =
|
|
52
|
+
const $ = b(() => {
|
|
53
53
|
const e = new Date(h);
|
|
54
54
|
e.setDate(h.getDate() - 1);
|
|
55
55
|
const t = new Date(h);
|
|
@@ -65,7 +65,7 @@ const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:i
|
|
|
65
65
|
}, M = () => {
|
|
66
66
|
const e = new Date(p.value);
|
|
67
67
|
e.setDate(e.getDate() + 1), e <= h && (p.value = e);
|
|
68
|
-
}, q =
|
|
68
|
+
}, q = b(() => {
|
|
69
69
|
const e = new Date(p.value);
|
|
70
70
|
return e.setDate(e.getDate() + 1), e <= h;
|
|
71
71
|
}), Y = () => {
|
|
@@ -81,7 +81,7 @@ const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:i
|
|
|
81
81
|
weekday: "short",
|
|
82
82
|
month: "short",
|
|
83
83
|
day: "numeric"
|
|
84
|
-
}) : "", R =
|
|
84
|
+
}) : "", R = b(() => _.value.trim() ? new De(g.value, {
|
|
85
85
|
keys: [
|
|
86
86
|
"customerInfo.firstName",
|
|
87
87
|
"customerInfo.lastName",
|
|
@@ -91,38 +91,37 @@ const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:i
|
|
|
91
91
|
],
|
|
92
92
|
threshold: 0.3,
|
|
93
93
|
ignoreLocation: !0
|
|
94
|
-
}).search(_.value).map((t) => t.item) :
|
|
95
|
-
spots:
|
|
96
|
-
bookings:
|
|
97
|
-
revenue:
|
|
94
|
+
}).search(_.value).map((t) => t.item) : g.value), O = b(() => ({
|
|
95
|
+
spots: g.value.reduce((e, t) => e + (t.spots || 0), 0),
|
|
96
|
+
bookings: g.value.length,
|
|
97
|
+
revenue: g.value.reduce((e, t) => e + (t.reservationPrice || 0), 0)
|
|
98
98
|
})), J = () => {
|
|
99
99
|
_.value = "";
|
|
100
100
|
}, K = async () => {
|
|
101
101
|
try {
|
|
102
|
-
const e = F.value.id, t = await
|
|
102
|
+
const e = F.value.id, t = await N.get(S.agendaCollection, e);
|
|
103
103
|
P.value = t?.resources?.filter((a) => a.isActive) || [];
|
|
104
104
|
} catch (e) {
|
|
105
105
|
console.error("Error loading resources:", e), P.value = [];
|
|
106
106
|
}
|
|
107
107
|
}, y = async () => {
|
|
108
|
-
k.value = !0,
|
|
108
|
+
k.value = !0, g.value = [];
|
|
109
109
|
try {
|
|
110
110
|
const e = F.value.id, t = new Date(p.value);
|
|
111
111
|
t.setHours(0, 0, 0, 0);
|
|
112
112
|
const a = new Date(p.value);
|
|
113
113
|
a.setHours(23, 59, 59, 999);
|
|
114
|
-
const i = await
|
|
114
|
+
const i = await N.find(S.reservationsCollection, {
|
|
115
115
|
filters: [
|
|
116
116
|
{ field: "agendaId", operator: "==", value: e },
|
|
117
117
|
{ field: "createdAt", operator: ">=", value: t.toISOString() },
|
|
118
118
|
{ field: "createdAt", operator: "<=", value: a.toISOString() }
|
|
119
119
|
]
|
|
120
120
|
});
|
|
121
|
-
console.log("allOrders", i);
|
|
122
121
|
let v = [];
|
|
123
122
|
i.forEach((l) => {
|
|
124
123
|
(l.reservations || []).forEach((u) => {
|
|
125
|
-
const
|
|
124
|
+
const T = P.value.find((B) => B.id === u.resourceId);
|
|
126
125
|
v.push({
|
|
127
126
|
customerInfo: l.customerInfo,
|
|
128
127
|
amountDue: l.amountDue,
|
|
@@ -145,20 +144,20 @@ const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:i
|
|
|
145
144
|
reservationAddOnsPrice: u.addOnsPrice,
|
|
146
145
|
pricingOptionId: u.pricingOptionId,
|
|
147
146
|
pricingOption: u.pricingOption,
|
|
148
|
-
resourceName:
|
|
149
|
-
resourceColor:
|
|
147
|
+
resourceName: T?.name || "Unknown",
|
|
148
|
+
resourceColor: T?.color
|
|
150
149
|
});
|
|
151
150
|
});
|
|
152
|
-
}),
|
|
151
|
+
}), g.value = v.sort((l, D) => (D.createdAt || "").localeCompare(l.createdAt || ""));
|
|
153
152
|
} catch (e) {
|
|
154
|
-
console.error("Error loading orders:", e),
|
|
153
|
+
console.error("Error loading orders:", e), g.value = [];
|
|
155
154
|
} finally {
|
|
156
155
|
k.value = !1;
|
|
157
156
|
}
|
|
158
157
|
}, W = async () => {
|
|
159
158
|
await K(), await y();
|
|
160
159
|
}, Z = async (e, t) => {
|
|
161
|
-
const a = await
|
|
160
|
+
const a = await N.get(S.reservationsCollection, e), i = a?.reservations?.find((v) => v.id === t);
|
|
162
161
|
if (i) {
|
|
163
162
|
const v = P.value.find((D) => D.id === i.resourceId), l = {
|
|
164
163
|
customerInfo: a.customerInfo,
|
|
@@ -185,59 +184,59 @@ const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:i
|
|
|
185
184
|
resourceName: v?.name || "Unknown",
|
|
186
185
|
resourceColor: v?.color
|
|
187
186
|
};
|
|
188
|
-
await le(),
|
|
187
|
+
await le(), A.value?.openDialog(l);
|
|
189
188
|
}
|
|
190
189
|
};
|
|
191
190
|
return W(), se(async () => {
|
|
192
|
-
if (
|
|
193
|
-
const e =
|
|
191
|
+
if (z.query.orderId) {
|
|
192
|
+
const e = z.query.orderId, t = z.query.reservationId, a = new URL(window.location.href);
|
|
194
193
|
a.searchParams.delete("orderId"), a.searchParams.delete("reservationId"), window.history.replaceState(window.history.state, "", a.toString()), await Z(e, t);
|
|
195
194
|
}
|
|
196
195
|
}), oe(p, () => {
|
|
197
196
|
y();
|
|
198
197
|
}), (e, t) => {
|
|
199
|
-
const a = x("Badge"), i = x("CardTitle"), v = x("CardDescription"), l = x("Button"), D = x("CardHeader"), u = x("Input"),
|
|
198
|
+
const a = x("Badge"), i = x("CardTitle"), v = x("CardDescription"), l = x("Button"), D = x("CardHeader"), u = x("Input"), T = x("CardContent"), B = x("Card");
|
|
200
199
|
return c(), m(U, null, [
|
|
201
200
|
r(ke, null, {
|
|
202
|
-
default:
|
|
201
|
+
default: f(() => [
|
|
203
202
|
s("div", be, [
|
|
204
203
|
s("div", Ce, [
|
|
205
204
|
s("div", null, [
|
|
206
205
|
s("h1", Ie, [
|
|
207
206
|
r(o(L), { class: "size-6" }),
|
|
208
|
-
t[1] || (t[1] =
|
|
207
|
+
t[1] || (t[1] = C(" Orders ", -1))
|
|
209
208
|
]),
|
|
210
209
|
t[2] || (t[2] = s("p", { class: "text-muted-foreground text-sm mt-1" }, " View orders by when they were placed ", -1))
|
|
211
210
|
])
|
|
212
211
|
]),
|
|
213
212
|
r(B, null, {
|
|
214
|
-
default:
|
|
213
|
+
default: f(() => [
|
|
215
214
|
r(D, null, {
|
|
216
|
-
default:
|
|
215
|
+
default: f(() => [
|
|
217
216
|
s("div", Se, [
|
|
218
217
|
s("div", null, [
|
|
219
218
|
r(i, { class: "flex items-center gap-2" }, {
|
|
220
|
-
default:
|
|
221
|
-
t[3] || (t[3] =
|
|
222
|
-
o(
|
|
219
|
+
default: f(() => [
|
|
220
|
+
t[3] || (t[3] = C(" Orders received ", -1)),
|
|
221
|
+
o(O).bookings > 0 ? (c(), j(a, {
|
|
223
222
|
key: 0,
|
|
224
223
|
variant: "secondary"
|
|
225
224
|
}, {
|
|
226
|
-
default:
|
|
227
|
-
|
|
225
|
+
default: f(() => [
|
|
226
|
+
C(d(o(O).bookings), 1)
|
|
228
227
|
]),
|
|
229
228
|
_: 1
|
|
230
|
-
})) :
|
|
229
|
+
})) : I("", !0)
|
|
231
230
|
]),
|
|
232
231
|
_: 1
|
|
233
232
|
}),
|
|
234
233
|
r(v, { class: "flex items-center gap-4 mt-1" }, {
|
|
235
|
-
default:
|
|
236
|
-
s("span",
|
|
234
|
+
default: f(() => [
|
|
235
|
+
s("span", Pe, [
|
|
237
236
|
r(o(V), { size: 14 }),
|
|
238
|
-
|
|
237
|
+
C(" " + d(o(O).spots) + " spots ", 1)
|
|
239
238
|
]),
|
|
240
|
-
s("span",
|
|
239
|
+
s("span", Oe, " €" + d(o(O).revenue.toFixed(2)) + " revenue ", 1)
|
|
241
240
|
]),
|
|
242
241
|
_: 1
|
|
243
242
|
})
|
|
@@ -250,8 +249,8 @@ const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:i
|
|
|
250
249
|
class: "size-8",
|
|
251
250
|
onClick: H
|
|
252
251
|
}, {
|
|
253
|
-
default:
|
|
254
|
-
r(o(
|
|
252
|
+
default: f(() => [
|
|
253
|
+
r(o(fe), { size: 16 })
|
|
255
254
|
]),
|
|
256
255
|
_: 1
|
|
257
256
|
}),
|
|
@@ -261,8 +260,8 @@ const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:i
|
|
|
261
260
|
class: "h-8 px-3 text-xs",
|
|
262
261
|
onClick: Y
|
|
263
262
|
}, {
|
|
264
|
-
default:
|
|
265
|
-
|
|
263
|
+
default: f(() => [...t[4] || (t[4] = [
|
|
264
|
+
C(" Today ", -1)
|
|
266
265
|
])]),
|
|
267
266
|
_: 1
|
|
268
267
|
}),
|
|
@@ -273,8 +272,8 @@ const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:i
|
|
|
273
272
|
onClick: M,
|
|
274
273
|
disabled: !o(q)
|
|
275
274
|
}, {
|
|
276
|
-
default:
|
|
277
|
-
r(o(
|
|
275
|
+
default: f(() => [
|
|
276
|
+
r(o(ge), { size: 16 })
|
|
278
277
|
]),
|
|
279
278
|
_: 1
|
|
280
279
|
}, 8, ["disabled"])
|
|
@@ -285,7 +284,7 @@ const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:i
|
|
|
285
284
|
onClick: y,
|
|
286
285
|
disabled: o(k)
|
|
287
286
|
}, {
|
|
288
|
-
default:
|
|
287
|
+
default: f(() => [
|
|
289
288
|
r(o(ve), {
|
|
290
289
|
size: 16,
|
|
291
290
|
class: ne({ "animate-spin": o(k) })
|
|
@@ -299,8 +298,8 @@ const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:i
|
|
|
299
298
|
]),
|
|
300
299
|
_: 1
|
|
301
300
|
}),
|
|
302
|
-
r(
|
|
303
|
-
default:
|
|
301
|
+
r(T, null, {
|
|
302
|
+
default: f(() => [
|
|
304
303
|
s("div", Ae, [
|
|
305
304
|
r(o(_e), {
|
|
306
305
|
size: 16,
|
|
@@ -319,23 +318,23 @@ const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:i
|
|
|
319
318
|
class: "absolute right-1 top-1/2 -translate-y-1/2 h-7 w-7",
|
|
320
319
|
onClick: J
|
|
321
320
|
}, {
|
|
322
|
-
default:
|
|
321
|
+
default: f(() => [
|
|
323
322
|
r(o(xe), { size: 14 })
|
|
324
323
|
]),
|
|
325
324
|
_: 1
|
|
326
|
-
})) :
|
|
325
|
+
})) : I("", !0)
|
|
327
326
|
]),
|
|
328
|
-
o(_) ? (c(), m("div", Re, " Showing " + d(o(R).length) + " of " + d(o(
|
|
327
|
+
o(_) ? (c(), m("div", Re, " Showing " + d(o(R).length) + " of " + d(o(g).length) + " orders ", 1)) : I("", !0),
|
|
329
328
|
o(k) ? (c(), m("div", Be, [...t[5] || (t[5] = [
|
|
330
329
|
s("div", { class: "animate-spin rounded-full h-8 w-8 border-b-2 border-primary" }, null, -1)
|
|
331
|
-
])])) : o(
|
|
330
|
+
])])) : o(g).length === 0 ? (c(), m("div", Fe, [
|
|
332
331
|
r(o(L), { class: "size-12 mx-auto mb-3 opacity-50" }),
|
|
333
332
|
t[6] || (t[6] = s("p", null, "No orders received on this day", -1))
|
|
334
333
|
])) : o(R).length === 0 ? (c(), m("div", Ue, " No orders match your search ")) : (c(), m("div", je, [
|
|
335
334
|
(c(!0), m(U, null, re(o(R), (n) => (c(), m("div", {
|
|
336
335
|
key: n.res_id || n.id,
|
|
337
336
|
class: "p-3 border rounded-lg hover:bg-muted/50 transition-colors cursor-pointer",
|
|
338
|
-
onClick: (nt) => o(
|
|
337
|
+
onClick: (nt) => o(A)?.openDialog(n)
|
|
339
338
|
}, [
|
|
340
339
|
s("div", Ve, [
|
|
341
340
|
s("div", Ee, [
|
|
@@ -357,7 +356,7 @@ const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:i
|
|
|
357
356
|
style: ie({ backgroundColor: n.resourceColor || "#6b7280" })
|
|
358
357
|
}, null, 4),
|
|
359
358
|
s("span", null, d(n.resourceName), 1)
|
|
360
|
-
])) :
|
|
359
|
+
])) : I("", !0)
|
|
361
360
|
]),
|
|
362
361
|
s("div", Ge, [
|
|
363
362
|
r(o(ye), { size: 12 }),
|
|
@@ -366,7 +365,7 @@ const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:i
|
|
|
366
365
|
]),
|
|
367
366
|
s("div", Je, [
|
|
368
367
|
n.reservationStatus === "needs_approval" ? (c(), m("span", Ke, "Needs Approval")) : n.reservationStatus === "approved" ? (c(), m("span", We, "Approved")) : n.reservationStatus === "rejected" ? (c(), m("span", Ze, "Rejected")) : n.reservationStatus === "cancelled" ? (c(), m("span", et, "Cancelled")) : (c(), m("span", tt, "Pending")),
|
|
369
|
-
n.reservationPrice || n.reservationPrice === 0 ? (c(), m("div", st, " €" + d(n.reservationPrice.toFixed(2)), 1)) :
|
|
368
|
+
n.reservationPrice || n.reservationPrice === 0 ? (c(), m("div", st, " €" + d(n.reservationPrice.toFixed(2)), 1)) : I("", !0)
|
|
370
369
|
])
|
|
371
370
|
])
|
|
372
371
|
], 8, Le))), 128))
|
|
@@ -383,7 +382,7 @@ const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:i
|
|
|
383
382
|
}),
|
|
384
383
|
r(we, {
|
|
385
384
|
ref_key: "reservationDetailDialog",
|
|
386
|
-
ref:
|
|
385
|
+
ref: A,
|
|
387
386
|
onCancelled: y,
|
|
388
387
|
onConfirmed: y,
|
|
389
388
|
onRejected: y
|