PageSourceSearch

https://www.parkadda.com/static/js/4804.243d7063.chunk.js

js parkadda.com collected 2026-09-24 11:04:02 UTC 18,385 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkParkAdda=self.webpackChunkParkAdda||[]).push([[4804],{60144(e,t,a){a.d(t,{z:()=>r});var n=a(52802),s=n.NY.CART,r={dashboard:function(e){return(0,n.re)(s,"/dashboard/overview/",e)},listRequests:function(e){return(0,n.re)(s,"/ops/requests/",e)},getRequest:function(e){return(0,n.re)(s,"/ops/requests/"+encodeURIComponent(e)+"/")},scan:function(e){return(0,n.vE)(s,"/ops/scan/",e)},createFromBooking:function(e){return(0,n.vE)(s,"/ops/requests/create-from-booking/",e)},createOnDemand:function(e){return(0,n.vE)(s,"/ops/requests/create-on-demand/",e)},assign:function(e){return(0,n.vE)(s,"/ops/requests/assign/",e)},markArriving:function(e){return(0,n.vE)(s,"/ops/requests/mark-arriving/",e)},board:function(e){return(0,n.vE)(s,"/ops/requests/board/",e)},startTrip:function(e){return(0,n.vE)(s,"/ops/requests/start-trip/",e)},completeTrip:function(e){return(0,n.vE)(s,"/ops/requests/complete-trip/",e)},requestReturn:function(e){return(0,n.vE)(s,"/ops/requests/request-return/",e)},cancel:function(e){return(0,n.vE)(s,"/ops/requests/cancel/",e)},override:function(e){return(0,n.vE)(s,"/ops/requests/override/",e)},dispatchQueue:function(e){return(0,n.re)(s,"/dispatch/queue/",e)},availableCarts:function(e){return(0,n.re)(s,"/dispatch/available-carts/",e)},suggestCart:function(e){return(0,n.re)(s,"/dispatch/suggest/",{request_reference_code:e})},listBatches:function(e){return(0,n.re)(s,"/batches/",e)},openBatch:function(e){return(0,n.vE)(s,"/batches/open/",e)},addToBatch:function(e){return(0,n.vE)(s,"/batches/add/",e)},closeBatch:function(e){return(0,n.vE)(s,"/batches/close/",e)},listPartners:function(){return(0,n.re)(s,"/partners/")},createPartner:function(e){return(0,n.vE)(s,"/partners/create/",e)},updatePartner:function(e,t){return(0,n.vE)(s,"/partners/"+e+"/update/",t)},listDrivers:function(e){return(0,n.re)(s,"/drivers/",e)},createDriver:function(e){return(0,n.vE)(s,"/drivers/create/",e)},updateDriver:function(e,t){return(0,n.vE)(s,"/drivers/"+e+"/update/",t)},generateDriverQr:function(e){return(0,n.vE)(s,"/drivers/"+e+"/generate-qr/",{})},listDriverCandidates:function(e){return(0,n.re)(s,"/drivers/candidates/",e)},listPoints:function(e){return(0,n.re)(s,"/points/",e)},upsertPoint:function(e){return(0,n.vE)(s,"/points/upsert/",e)},listCarts:function(e){return(0,n.re)(s,"/carts/",e)},upsertCart:function(e){return(0,n.vE)(s,"/carts/upsert/",e)},updateCartStatus:function(e){return(0,n.vE)(s,"/carts/status/",e)},generateCartQr:function(e){return(0,n.vE)(s,"/carts/"+e+"/generate-qr/",{})},generateRequestQr:function(e){return(0,n.vE)(s,"/ops/requests/"+encodeURIComponent(e)+"/generate-qr/",{})},autoAssign:function(e){return(0,n.vE)(s,"/ops/requests/"+encodeURIComponent(e)+"/auto-assign/",{})},autoAssignQueue:function(e,t){return(0,n.vE)(s,"/dispatch/auto-assign/",{event_id:e,limit:t||25})},getConfig:function(e){return(0,n.re)(s,"/config/",{event_id:e})},updateConfig:function(e){return(0,n.vE)(s,"/config/update/",e)},walkinQuote:function(e){return(0,n.re)(s,"/ops/walkin/quote/",{event_id:e})},walkinInit:function(e){return(0,n.vE)(s,"/ops/walkin/init/",e)},walkinStatus:function(e){return(0,n.re)(s,"/ops/walkin/status/",{token:e})},walkinMarkCash:function(e){return(0,n.vE)(s,"/ops/walkin/mark-cash-paid/",e)},walkinSendPayLink:function(e){return(0,n.vE)(s,"/ops/walkin/send-paylink/",e)},posSearch:function(e){return(0,n.re)(s,"/ops/pos/search/",e)}}},52802(e,t,a){a.d(t,{NY:()=>f,re:()=>i,vE:()=>u});var n=a(93533),s=a(98670),r=a(4596),o=a(35084);async function l(e){var t;try{t=await e.json()}catch(i){t=null}if(401===e.status){(0,s.setStaffToken)(null),(0,s.setStaffPayload)(null);var a=(0,r.K)(t&&t.message||t||"Session expired, please log in again."),n=new Error(a);throw n.status=401,(0,o.P0)(a,"error"),n}if(!e.ok||t&&!1===t.success){var l=(0,r.K)(t&&t.message||t||"Request failed"),c=new Error(l);throw c.status=e.status,c.payload=t&&t.payload,401!==e.status&&(0,o.P0)(l,"error"),c}return t&&t.payload}function c(e,t,a){a=a||{};var n=(0,s.yK)(),r=Object.assign({"Content-Type":"application/json"},a.headers||{});return n&&(r.Authorization="Bearer "+n),fetch(e+t,Object.assign({},a,{headers:r})).then(l)}function i(e,t,a){return c(e,t+function(e){if(!e)return"";var t=[];return Object.keys(e).forEach(function(a){var n=e[a];void 0!==n&&null!==n&&""!==n&&t.push(encodeURIComponent(a)+"="+encodeURIComponent(n))}),t.length?"?"+t.join("&"):""}(a),{method:"GET"})}function u(e,t,a){return c(e,t,{method:"POST",body:JSON.stringify(a||{})})}var f={EVENTS:n.wm.EVENTS,VALET:n.wm.VALET,CART:n.wm.CART,VENDORPAY:n.wm.VENDORPAY}},96498(e,t,a){var n=a(80296),s=a(65043),r=a(62582),o=a(59557),l=a(98670),c=a(4596),i=a(10705);a(54958);
1const u=function(e){const t=(0,l.wA)(),a=(0,o.zy)(),u=(0,s.useState)(!1),f=(0,n.A)(u,2),d=f[0],p=f[1],m=(0,s.useMemo)(function(){const e=t.caps;if(e.isBookingViewerOnly&&e.canViewBookingAnalytics)return[{to:"/staff/dashboard",label:"Dashboard"},{to:"/staff/bookings",label:"Participants"},{to:"/staff/game-status",label:"Game status"},{to:"/staff/profile",label:"Profile"},{to:"/events",label:"Events"}];const a=[{to:"/staff",label:"Home",exact:!0}];return e.canOperateValet&&a.push({to:"/staff/valet",label:"Valet"}),e.canOperateCart&&a.push({to:"/staff/cart",label:"Cart"}),e.canOperateVendorPay&&a.push({to:"/staff/vendorpay",label:"VendorPay"}),e.canManageAccreditation&&a.push({to:"/staff/accreditation",label:"Accreditation"}),e.canViewBookingAnalytics?(a.push({to:"/staff/dashboard",label:"Dashboard"}),a.push({to:"/staff/bookings",label:"Participants"}),a.push({to:"/staff/game-status",label:"Game status"})):(e.isCommitteeDesk||e.canRecordCash||e.isAdmin)&&a.push({to:"/staff/game-status",label:"Game status"}),e.canViewSponsors&&a.push({to:"/staff/sponsors",label:"Sponsors"}),e.canRecordCash&&a.push({to:"/staff/cash",label:"Offline cash"}),e.isAdmin&&(a.push({to:"/staff/committees",label:"Committees"}),a.push({to:"/staff/accounts",label:"Admins"})),e.canViewSiteFeedback&&a.push({to:"/staff/feedback",label:"Site feedback"}),a.push({to:"/staff/profile",label:"Profile"}),a.push({to:"/events",label:"Events"}),a},[t.caps]);if((0,s.useEffect)(function(){p(!1)},[a.pathname,a.search]),"loading"===t.status||"idle"===t.status)return s.createElement("div",{className:"stf-shell stf-shell--loading"},s.createElement("div",{className:"stf-loading-center"},s.createElement(i.y$,{size:28}),s.createElement("span",null,"Loading session\u2026")));if("unauthenticated"===t.status){const e=encodeURIComponent(a.pathname+a.search);return s.createElement(o.rd,{to:"/staff/login?next="+e})}const b=t.staff||{},v=(0,l.Up)(b.role_code),E=(0,c.c)(b),h=function(e,t){if(0===e.indexOf("/staff/dashboard")||0===e.indexOf("/staff/bookings")||0===e.indexOf("/staff/game-status")||0===e.indexOf("/staff/committees")||0===e.indexOf("/staff/accounts")||0===e.indexOf("/staff/cash")||0===e.indexOf("/staff/sponsors")||0===e.indexOf("/staff/profile")){var a=[];return t.canViewBookingAnalytics&&(a.push({to:"/staff/dashboard",label:"Dashboard",exact:!0}),a.push({to:"/staff/bookings",label:"Participants"}),a.push({to:"/staff/game-status",label:"Game status"})),!t.canViewBookingAnalytics&&(t.isCommitteeDesk||t.canRecordCash||t.isAdmin)&&a.push({to:"/staff/game-status",label:"Game status"}),t.canRecordCash&&a.push({to:"/staff/cash",label:"Offline cash"}),t.canViewSponsors&&a.push({to:"/staff/sponsors",label:"Sponsors"}),a.push({to:"/staff/profile",label:"Profile"}),t.isAdmin&&(a.push({to:"/staff/committees",label:"Committees"}),a.push({to:"/staff/accounts",label:"Admins"})),a}if(0===e.indexOf("/staff/valet")&&t.canOperateValet){var n=[{to:"/staff/valet",label:"Dashboard",exact:!0},{to:"/staff/valet/transactions",label:"Transactions"},{to:"/staff/valet/scan",label:"Scan / Intake"},{to:"/staff/valet/pos-exit",label:"POS exit"},{to:"/staff/valet/retrievals",label:"Retrievals"},{to:"/staff/valet/keys",label:"Keys"}];return t.isAdmin&&n.push({to:"/staff/valet/admin",label:"Admin"}),n}if(0===e.indexOf("/staff/cart")&&t.canOperateCart){var s=[{to:"/staff/cart",label:"Dashboard",exact:!0},{to:"/staff/cart/requests",label:"Requests"},{to:"/staff/cart/dispatch",label:"Dispatch"},{to:"/staff/cart/scan",label:"Scan / Dispatch"},{to:"/staff/cart/pos-exit",label:"POS exit"},{to:"/staff/cart/batches",label:"Batches"}];return t.isAdmin&&s.push({to:"/staff/cart/admin",label:"Admin"}),s}if(0===e.indexOf("/staff/vendorpay")&&t.canOperateVendorPay){var r=[{to:"/staff/vendorpay",label:"Dashboard",exact:!0}];return t.canBillVendorPay&&r.push({to:"/staff/vendorpay/pos",label:"POS"}),r.push({to:"/staff/vendorpay/orders",label:"Orders"}),t.canFulfilVendorPay&&r.push({to:"/staff/vendorpay/scan",label:"Scan"}),r.push({to:"/staff/vendorpay/stock",label:"Stock"}),t.isAdmin&&r.push({to:"/staff/vendorpay/admin",label:"Admin"}),t.isAdmin&&r.push({to:"/staff/vendorpay/settlements",label:"Settlements"}),r}return[]}(a.pathname,t.caps);return s.createElement("div",{className:"stf-shell"},s.createElement("header",{className:"stf-topbar"},s.createElement("button",{type:"button",className:"stf-topbar__menu","aria-expanded":d,"aria-controls":"stf-nav-drawer","aria-label":"Open menu",onClick:function(){p(function(e){return!e})}},s.createElement("span",{className:"stf-topbar__menu-icon"})),s.createElement("div",{className:"stf-topbar__brand"},"ParkAdda ",s.createElement("small",null,"Staff Ops")),s.createElement("nav",{className:"stf-topbar__nav stf-topbar__nav--desktop","aria-label":"Primary"},m.map(function(e){return s.createElement(r.NavLink,{key:e.to,to:e.to,exact:!!e.exact,activeClassName:"stf-topbar__nav--active"},e.label)})),s.createElement("div",{className:"stf-topbar__spacer"}),s.createElement(r.Link,{to:"/staff/profile",className:"stf-topbar__staff",title:"Open profile"},s.createElement("strong",null,E),s.createElement("small",null,v)),s.createElement("button",{className:"stf-topbar__logout",type:"button",onClick:function(){t.logout()}},"Log out")),s.createElement("div",{id:"stf-nav-drawer",className:"stf-drawer"+(d?" stf-drawer--open":""),"aria-hidden":!d},s.createElement("div",{className:"stf-drawer__backdrop",onClick:function(){p(!1)}}),s.createElement("div",{className:"stf-drawer__panel"},s.createElement("div",{className:"stf-drawer__title"},"Navigate"),m.map(function(e){return s.createElement(r.NavLink,{key:"drawer
1-"+e.to,to:e.to,exact:!!e.exact,activeClassName:"stf-drawer__link--active",className:"stf-drawer__link",onClick:function(){p(!1)}},e.label)}),s.createElement("div",{className:"stf-drawer__title"},"Signed in"),s.createElement(r.NavLink,{to:"/staff/profile",className:"stf-drawer__link",activeClassName:"stf-drawer__link--active",onClick:function(){p(!1)}},s.createElement("strong",{style:{display:"block",marginBottom:4}},E),s.createElement("span",{style:{fontSize:12,color:"var(--stf-text-muted)",fontWeight:500}},v)))),h.length>0?s.createElement("nav",{className:"stf-subnav","aria-label":"Module"},h.map(function(e){return s.createElement(r.NavLink,{key:e.to,to:e.to,exact:!!e.exact,activeClassName:"stf-subnav__link--active",className:"stf-subnav__link"},e.label)})):null,s.createElement("main",{className:"stf-page"},e.children))};a.d(t,["A",0,u])},64804(e,t,a){a.r(t);var n=a(65043),s=a(96498),r=a(10705),o=a(60144);a(54958);var l=function(e){const t=(0,n.useState)({pickup_point_id:"",drop_point_id:"",capacity:6,route_name:""}),a=t[0],s=t[1],l=(0,n.useState)(!1),c=l[0],i=l[1],u=(0,n.useState)(""),f=u[0],d=u[1];var p=function(e){return function(t){var a=t.target.value;s(function(t){var n=Object.assign({},t);return n[e]=a,n})}};return n.createElement(r.aF,{open:e.open,onClose:e.onClose,title:"Open new batch"},n.createElement(r.Fx,{message:f}),n.createElement("div",{className:"stf-field"},n.createElement("label",null,"Pickup point *"),n.createElement("select",{value:a.pickup_point_id,onChange:p("pickup_point_id")},n.createElement("option",{value:""},"\u2014 select \u2014"),(e.points||[]).map(function(e){return n.createElement("option",{key:e.id,value:e.id},e.point_name," (",e.point_code,")")}))),n.createElement("div",{className:"stf-field"},n.createElement("label",null,"Drop point *"),n.createElement("select",{value:a.drop_point_id,onChange:p("drop_point_id")},n.createElement("option",{value:""},"\u2014 select \u2014"),(e.points||[]).map(function(e){return n.createElement("option",{key:e.id,value:e.id},e.point_name," (",e.point_code,")")}))),n.createElement("div",{className:"stf-field"},n.createElement("label",null,"Capacity"),n.createElement("input",{type:"number",value:a.capacity,onChange:p("capacity")})),n.createElement("div",{className:"stf-field"},n.createElement("label",null,"Route name"),n.createElement("input",{value:a.route_name,onChange:p("route_name")})),n.createElement("button",{className:"stf-btn",disabled:c||!a.pickup_point_id||!a.drop_point_id,onClick:function(){i(!0),d(""),o.z.openBatch({event_id:e.eventId,pickup_point_id:Number(a.pickup_point_id),drop_point_id:Number(a.drop_point_id),capacity:Number(a.capacity),route_name:a.route_name||void 0}).then(function(){e.onDone("Batch opened"),e.onClose()}).catch(function(e){d(e.message)}).then(function(){i(!1)})}},c?n.createElement(r.y$,null):"Open"))},c=function(e){const t=(0,n.useState)(""),a=t[0],s=t[1],l=(0,n.useState)(!1),c=l[0],i=l[1],u=(0,n.useState)(""),f=u[0],d=u[1];return n.createElement(r.aF,{open:e.open,onClose:e.onClose,title:"Add to "+(e.batch&&e.batch.batch_reference_code)},n.createElement(r.Fx,{message:f}),n.createElement("div",{className:"stf-field"},n.createElement("label",null,"Request reference code"),n.createElement("input",{value:a,onChange:function(e){s(e.target.value)}})),n.createElement("button",{className:"stf-btn",disabled:c||!a,onClick:function(){i(!0),d(""),o.z.addToBatch({batch_id:e.batch.id,request_reference_code:a}).then(function(){e.onDone("Added to batch"),e.onClose()}).catch(function(e){d(e.message)}).then(function(){i(!1)})}},c?n.createElement(r.y$,null):"Add"))},i=function(e){const t=(0,n.useState)(""),a=t[0],s=t[1],l=(0,n.useState)(!1),c=l[0],i=l[1],u=(0,n.useState)(""),f=u[0],d=u[1];return n.createElement(r.aF,{open:e.open,onClose:e.onClose,title:"Close "+(e.batch&&e.batch.batch_reference_code)},n.createElement(r.Fx,{message:f}),n.createElement("div",{className:"stf-field"},n.createElement("label",null,"Reason (optional)"),n.createElement("textarea",{rows:2,value:a,onChange:function(e){s(e.target.value)}})),n.createElement("button",{className:"stf-btn stf-btn--danger",disabled:c,onClick:function(){i(!0),d(""),o.z.closeBatch({batch_id:e.batch.id,reason:a||void 0}).then(function(){e.onDone("Batch closed"),e.onClose()}).catch(function(e){d(e.message)}).then(function(){i(!1)})}},c?n.createElement(r.y$,null):"Close"))};
1const u=function(){const e=(0,r.UM)(),t=(0,n.useState)([]),a=t[0],u=t[1],f=(0,n.useState)(!1),d=f[0],p=f[1],m=(0,n.useState)(""),b=m[0],v=m[1],E=(0,n.useState)(""),h=E[0],g=E[1],_=(0,n.useState)({status:""}),k=_[0],C=_[1],y=(0,n.useState)(null),N=y[0],S=y[1],w=(0,n.useState)(null),O=w[0],A=w[1],P=(0,n.useState)(null),x=P[0],D=P[1],q=(0,n.useState)([]),R=q[0],V=q[1],B=(0,n.useCallback)(function(){p(!0),v("");var t={};e.selected&&(t.event_id=e.selected),k.status&&(t.status=k.status),o.z.listBatches(t).then(function(e){u(e&&e.batches||[])}).catch(function(e){v(e.message)}).then(function(){p(!1)})},[e.selected,k.status]);return(0,n.useEffect)(function(){B()},[B]),(0,n.useEffect)(function(){e.selected&&o.z.listPoints({event_id:e.selected}).then(function(e){V(e&&e.points||[])}).catch(function(){})},[e.selected]),n.createElement(s.A,null,n.createElement("h1",{className:"stf-page__title"},"Cart Batches"),n.createElement("p",{className:"stf-page__sub"},"Shared ride batch control: open, add riders, close."),n.createElement("div",{className:"stf-card",style:{display:"flex",gap:12,alignItems:"flex-end",flexWrap:"wrap"}},n.createElement(r.Iy,{events:e.events,value:e.selected,onChange:e.setSelected}),n.createElement("div",{className:"stf-field",style:{margin:0}},n.createElement("label",null,"Status"),n.createElement("select",{value:k.status,onChange:function(e){C({status:e.target.value})}},n.createElement("option",{value:""},"All"),n.createElement("option",{value:"OPEN"},"OPEN"),n.createElement("option",{value:"DISPATCHED"},"DISPATCHED"),n.createElement("option",{value:"COMPLETED"},"COMPLETED"),n.createElement("option",{value:"CLOSED"},"CLOSED"))),n.createElement("button",{className:"stf-btn stf-btn--ghost",onClick:B,disabled:d},d?n.createElement(r.y$,null):"Refresh"),n.createElement("div",{style:{flex:1}}),n.createElement("button",{className:"stf-btn",disabled:!e.selected,onClick:function(){S({})}},"+ Open batch")),n.createElement(r.Fx,{message:b}),n.createElement(r.GN,{message:h}),n.createElement("div",{className:"stf-card stf-card--flush"},0===a.length?n.createElement("div",{className:"stf-empty",style:{margin:16}},"No batches."):n.createElement("table",{className:"stf-table"},n.createElement("thead",null,n.createElement("tr",null,n.createElement("th",
1null,"Ref"),n.createElement("th",null,"Status"),n.createElement("th",null,"Pickup \u2192 Drop"),n.createElement("th",null,"Capacity"),n.createElement("th",null,"Opened"),n.createElement("th",null))),n.createElement("tbody",null,a.map(function(e){return n.createElement("tr",{key:e.id},n.createElement("td",null,n.createElement("strong",null,e.batch_reference_code)),n.createElement("td",null,n.createElement(r.qs,{status:e.status})),n.createElement("td",{style:{fontSize:12}},e.pickup_point&&e.pickup_point.point_name||"\u2014"," \u2192 ",e.drop_point&&e.drop_point.point_name||"\u2014"),n.createElement("td",null,e.capacity),n.createElement("td",{style:{fontSize:12}},(0,r.qw)(e.opened_at)),n.createElement("td",null,"OPEN"===e.status?n.createElement(n.Fragment,null,n.createElement("button",{className:"stf-btn stf-btn--ghost stf-btn--sm",onClick:function(){A(e)}},"Add")," ",n.createElement("button",{className:"stf-btn stf-btn--danger stf-btn--sm",onClick:function(){D(e)}},"Close")):"\u2014"))})))),n.createElement(l,{open:!!N,eventId:e.selected,points:R,onClose:function(){S(null)},onDone:function(e){g(e),B()}}),n.createElement(c,{open:!!O,batch:O,onClose:function(){A(null)},onDone:function(e){g(e),B()}}),n.createElement(i,{open:!!x,batch:x,onClose:function(){D(null)},onDone:function(e){g(e),B()}}))};a.d(t,["default",0,u])},54958(){}}]);
2//# sourceMappingURL=4804.243d7063.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.