diff --git a/index.html b/index.html index e35d296311b9f229ccb5f1616ba8ee05e122aa17..ecd90e6285ff21d258c15920713f876486ca30dd 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@
-
covercharge
All in one restaurant booking app
-Pilot: The Anchorage, Harbour View, Dunure · demo data only, no real payments
Prototype · nothing is sent or charged @@ -126,7 +126,7 @@ footer{margin-top:28px;color:var(--muted);font-size:.8rem;text-align:center} diff --git a/owner-app/_expo/static/js/web/[did]-0d8f5598929ab27d547672e738480c46.js b/owner-app/_expo/static/js/web/[did]-0d8f5598929ab27d547672e738480c46.js new file mode 100644 index 0000000000000000000000000000000000000000..2ac338c20c3e104597129dfb5d6f46eb405e6f7d --- /dev/null +++ b/owner-app/_expo/static/js/web/[did]-0d8f5598929ab27d547672e738480c46.js @@ -0,0 +1 @@ +__d(function(_g,_r,i,_a,_m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return f}});var t=_r(_d[0]),n=_r(_d[1]),l=e(_r(_d[2])),s=e(_r(_d[3])),r=_r(_d[4]),a=_r(_d[5]),o=_r(_d[6]),d=_r(_d[7]),c=_r(_d[8]),u=_r(_d[9]),h=_r(_d[10]),g=_r(_d[11]),p=_r(_d[12]);function f(){const{rid:e,did:f}=(0,t.useLocalSearchParams)(),b=(0,u.useRestaurant)(e),j=(0,u.useMenu)(e).find(e=>e.id===f),x=(0,u.useCustomer)(),m=(0,u.useRecipeCards)(e).find(e=>e.id===j?.recipeCardId),y=m?.signOff&&m.photo?(0,h.recipeCards)().photoSource(m.photo):null,k=(0,u.useStore)(e=>e.addLine),[v,w]=(0,n.useState)(()=>(j?.optionGroups??[]).filter(e=>e.required).map(e=>e.choices[0].id)),[S,C]=(0,n.useState)(1),[B,$]=(0,n.useState)(''),[I,P]=(0,n.useState)(!1),[L,T]=(0,n.useState)(!1),[D,O]=(0,n.useState)(!1),[A,M]=(0,n.useState)(!1),R=(0,n.useMemo)(()=>j?(0,d.effectiveAllergens)(j,v):{},[j,v]);if(!b||!j)return(0,p.jsx)(o.Screen,{title:"Not found",children:(0,p.jsx)(o.T,{children:"Dish not found."})});const q=(0,d.conflictsFor)(R,x.allergies),_=(j.price??0)+(j.optionGroups??[]).flatMap(e=>e.choices).filter(e=>v.includes(e.id)).reduce((e,t)=>e+t.priceDelta,0),N=j.soldOut||!j.signOff||null===j.price,G=(e,t)=>{const n=j.optionGroups.find(t=>t.id===e);w(e=>{const l=n.choices.map(e=>e.id);return n.multi?e.includes(t)?e.filter(e=>e!==t):[...e,t]:e.includes(t)&&!n.required?e.filter(e=>e!==t):[...e.filter(e=>!l.includes(e)),t]})},z=e=>{u.useStore.getState().basket.restaurantId!==b.id&&u.useStore.getState().startBasket(b.id,'takeaway'),k({itemId:j.id,qty:S,choiceIds:v,notes:B,override:e?{allergens:q.contains,at:(new Date).toISOString()}:void 0}),P(!1),M(!0)};return(0,p.jsxs)(o.Screen,{title:j.name,subtitle:b.name,right:(0,p.jsx)(a.BasketButton,{}),children:[y?(0,p.jsx)(l.default,{testID:"dish-photo",source:y,accessibilityLabel:`${j.name}${'example'===m?.origin?' (example photo)':''}`,style:{width:'100%',height:200,borderRadius:12},resizeMode:"cover"}):null,(0,p.jsxs)(o.Row,{wrap:!0,gap:6,children:[(0,p.jsx)(o.T,{weight:"bold",size:20,colour:g.colours.gold,children:null===j.price?j.priceNote:(0,c.gbp)(_)}),j.dietary.map(e=>(0,p.jsx)(o.Badge,{kind:"ok",label:e},e))]}),(0,p.jsx)(o.T,{children:j.description}),q.contains.length?(0,p.jsx)(o.Banner,{kind:"danger",title:`Blocked: contains ${q.contains.map(d.allergenLabel).join(', ')}`,children:`You\u2019ve told us: ${x.allergies.filter(e=>q.contains.includes(e.allergen)).map(e=>`${(0,d.allergenLabel)(e.allergen)} \u2014 ${(0,d.severityLabel)(e.severity)}`).join('; ')}. This dish can\u2019t be added unless you deliberately override (for example, ordering for someone else).`}):null,q.may.length?(0,p.jsx)(o.Banner,{kind:"warn",title:`Warning: may contain ${q.may.map(d.allergenLabel).join(', ')}`,children:"Cross-contact is possible (e.g. shared fryer). Please speak to staff before ordering."}):null,(j.optionGroups??[]).map(e=>(0,p.jsxs)(o.Card,{children:[(0,p.jsxs)(o.T,{weight:"semibold",children:[e.name,e.required?' (required)':' (optional)']}),(0,p.jsx)(o.Row,{wrap:!0,gap:6,children:e.choices.map(t=>(0,p.jsx)(o.Chip,{label:t.label,sub:t.priceDelta?`+${(0,c.gbp)(t.priceDelta)}`:void 0,selected:v.includes(t.id),onPress:()=>G(e.id,t.id)},t.id))})]},e.id)),(0,p.jsx)(o.Card,{children:(0,p.jsx)(r.AllergenPanel,{item:j,map:R,declared:x.allergies})}),b.fictional?null:(0,p.jsx)(o.ExampleAllergenNotice,{}),(0,p.jsx)(o.Field,{label:"Notes for the kitchen (optional)",placeholder:"e.g. no gherkins",value:B,onChangeText:$}),(0,p.jsxs)(o.Row,{style:{justifyContent:'space-between'},children:[(0,p.jsx)(o.T,{weight:"semibold",children:"Quantity"}),(0,p.jsx)(o.Stepper,{value:S,onChange:C,label:"quantity"})]}),A?(0,p.jsx)(o.Banner,{kind:"success",title:"Added to basket",children:q.contains.length?'Allergy override recorded \u2014 the kitchen will see a large allergy alert.':'Carry on browsing or go to your basket.'}):null,N?(0,p.jsx)(o.Banner,{kind:"warn",children:j.soldOut?'Sold out today.':j.signOff?'Price on the specials board \u2014 ask staff.':'Not available to order online until the head chef signs off its allergens.'}):q.contains.length?(0,p.jsxs)(s.default,{style:{gap:8},children:[(0,p.jsx)(o.Button,{kind:"secondary",label:"Choose something else",onPress:()=>t.router.back()}),(0,p.jsx)(o.Button,{kind:"danger",label:"Override and add anyway\u2026",onPress:()=>{T(!1),O(!1),P(!0)},testID:"override-open"})]}):(0,p.jsxs)(o.Row,{gap:8,children:[(0,p.jsx)(o.Button,{style:{flex:1},label:`Add ${S} to basket \xb7 ${(0,c.gbp)(_*S)}`,onPress:()=>z(!1),testID:"add-to-basket"}),A?(0,p.jsx)(o.Button,{kind:"secondary",label:"Basket",onPress:()=>t.router.push('/customer/basket')}):null]}),(0,p.jsxs)(o.Sheet,{visible:I,onClose:()=>P(!1),title:"Allergy override",children:[(0,p.jsx)(o.Banner,{kind:"danger",title:`${j.name} contains ${q.contains.map(d.allergenLabel).join(', ')}`,children:`Your profile says: ${x.allergies.filter(e=>q.contains.includes(e.allergen)).map(e=>`${(0,d.allergenLabel)(e.allergen)} \u2014 ${(0,d.severityLabel)(e.severity)}`).join('; ')}.`}),(0,p.jsx)(o.Toggle,{label:"I understand this dish contains an allergen I have declared",value:L,onChange:T}),(0,p.jsx)(o.Toggle,{label:"It is for someone without this allergy, or I have spoken to staff",value:D,onChange:O}),(0,p.jsx)(o.Muted,{children:"The override is logged and shown to the kitchen as an allergy alert that must be acknowledged."}),(0,p.jsx)(o.Button,{kind:"danger",disabled:!L||!D,label:"Confirm override and add",onPress:()=>z(!0),testID:"override-confirm"})]})]})}},768,[794,20,186,117,818,819,802,803,805,808,820,810,14]); \ No newline at end of file diff --git a/owner-app/_expo/static/js/web/[n]-f70147ed6be3e387c5c5b96a72ac6d67.js b/owner-app/_expo/static/js/web/[n]-f70147ed6be3e387c5c5b96a72ac6d67.js new file mode 100644 index 0000000000000000000000000000000000000000..83417700a4384b1060435722430ca02efdf0fb32 --- /dev/null +++ b/owner-app/_expo/static/js/web/[n]-f70147ed6be3e387c5c5b96a72ac6d67.js @@ -0,0 +1 @@ +__d(function(g,_r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return l}});var t=_r(d[0]),r=_r(d[1]),n=_r(d[2]),o=_r(d[3]),u=_r(d[4]),c=_r(d[5]),s=_r(d[6]);function l(){const{n:l,r:f}=(0,t.useLocalSearchParams)(),b=(0,o.useStore)(t=>t.startBasket),[h,S]=(0,r.useState)(!1),j=f??u.VENUE_RID,O=(0,o.useOrderAtTable)(j),_=(0,c.guestServer)();return(0,r.useEffect)(()=>{_||(O&&b(j,'table',String(l)),S(!0))},[j,l,O,_]),_?(0,s.jsx)(n.Screen,{title:"Order at the table",children:(0,s.jsx)(n.Banner,{kind:"demo",title:"Scan the code on your table",children:"To order from your table, scan the QR code printed on it. Or order at the bar."})}):h?(0,s.jsx)(t.Redirect,{href:`/customer/${j}`}):null}},784,[794,20,802,808,836,824,14]); \ No newline at end of file diff --git a/owner-app/_expo/static/js/web/[oid]-d84141be120e5e94aac3862db784d536.js b/owner-app/_expo/static/js/web/[oid]-d84141be120e5e94aac3862db784d536.js new file mode 100644 index 0000000000000000000000000000000000000000..55cea6508297ec08f010f5bd912221fd530dc82d --- /dev/null +++ b/owner-app/_expo/static/js/web/[oid]-d84141be120e5e94aac3862db784d536.js @@ -0,0 +1 @@ +__d(function(g,_r,_i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return w}});var e,t=_r(d[0]),s=_r(d[1]),l=_r(d[2]),r=(e=l)&&e.__esModule?e:{default:e},n=_r(d[3]),o=_r(d[4]),i=_r(d[5]),c=_r(d[6]),u=_r(d[7]),h=_r(d[8]),p=_r(d[9]),b=_r(d[10]),y=_r(d[11]);const j=[['new','Placed'],['acknowledged','Accepted'],['preparing','Cooking'],['ready','Ready to collect'],['collected','Collected']],x=[['new','Sent'],['acknowledged','Accepted'],['preparing','Cooking'],['served','Food out'],['closed','Paid']];function w(){const{oid:e}=(0,t.useLocalSearchParams)(),l=(0,p.useOrder)(e),w=(0,p.useRestaurant)(l?.restaurantId),[f,T]=(0,s.useState)(0),[C,S]=(0,s.useState)(''),[k,v]=(0,s.useState)(!1),[P,M]=(0,s.useState)(!1),[$,R]=(0,s.useState)(1),[A,I]=(0,s.useState)(0),[O,B]=(0,s.useState)(l?.split?.ways??1);if(!l||!w)return(0,y.jsx)(i.Screen,{title:"Order",children:(0,y.jsx)(i.T,{children:"Order not found."})});const N='takeaway'===l.type?j:x,H=Math.max(0,N.findIndex(([e])=>e===l.status)),_=Math.round(l.subtotal*A/100),D='table'===l.type?l.subtotal+(l.split?l.tip:_):l.total,F=D-l.paid,q=l.split?.ways??O,L=l.split?.paidShares??0,W=Math.ceil(D/q),Y='collected'===l.status||'closed'===l.status;return(0,y.jsxs)(i.Screen,{title:`Order ${l.ref}`,subtitle:`${w.name} \xb7 ${'table'===l.type?`Table ${l.tableNo}`:`Collection at ${l.slotTime?(0,h.hm)(new Date(l.slotTime)):'\u2014'}`}`,children:['takeaway'===l.type?(0,y.jsx)(i.Banner,{kind:"success",title:'ready'===l.status?'Your order is ready!':'Order placed',children:'ready'===l.status?'Head to the bar and give your order number. Staff will check allergies with you at handover.':`Show order number ${l.ref} at the bar when you arrive.`}):null,(0,y.jsxs)(i.Card,{children:[(0,y.jsx)(i.H2,{children:"Status"}),N.map(([e,t],s)=>(0,y.jsxs)(i.Row,{gap:10,children:[(0,y.jsx)(r.default,{style:{width:22,height:22,borderRadius:11,backgroundColor:s<=H?b.colours.gold:b.colours.surface2,borderWidth:1,borderColor:b.colours.gold}}),(0,y.jsx)(i.T,{weight:s===H?'semibold':'regular',colour:s<=H?b.colours.text:b.colours.muted,children:t})]},e)),l.allergyAck?(0,y.jsxs)(i.Muted,{children:["Kitchen signed off your allergies (",l.allergyAck.by,", ",(0,h.hm)(new Date(l.allergyAck.at)),")"]}):l.allergies.length?(0,y.jsx)(i.Muted,{children:"Waiting for the kitchen to sign off your allergies\u2026"}):null,'takeaway'!==l.type||Y?null:(0,y.jsxs)(i.Row,{gap:8,children:[(0,y.jsx)(i.Button,{small:!0,kind:'on-my-way'===l.customerSignal?'primary':'secondary',label:"On my way",onPress:()=>p.repo.orders.customerSignal(l.id,'on-my-way')}),(0,y.jsx)(i.Button,{small:!0,kind:'here'===l.customerSignal?'primary':'secondary',label:"I\u2019m here",onPress:()=>p.repo.orders.customerSignal(l.id,'here')})]})]}),(0,y.jsxs)(i.Card,{children:[(0,y.jsx)(i.H2,{children:"Items"}),l.lines.map((e,t)=>(0,y.jsxs)(r.default,{children:[(0,y.jsxs)(i.Row,{style:{justifyContent:'space-between'},children:[(0,y.jsxs)(i.T,{style:{flex:1},children:[e.qty,"\xd7 ",e.name]}),(0,y.jsx)(i.T,{children:(0,u.gbp)(e.unitPrice*e.qty)})]}),e.choices.length?(0,y.jsx)(i.Muted,{children:e.choices.join(' \xb7 ')}):null,e.overridden?(0,y.jsx)(i.Badge,{kind:"red",label:`Allergy override: ${e.contains.map(c.allergenLabel).join(', ')}`}):null]},t)),(0,y.jsxs)(i.Row,{style:{justifyContent:'space-between'},children:[(0,y.jsx)(i.Muted,{children:"Subtotal"}),(0,y.jsx)(i.T,{children:(0,u.gbp)(l.subtotal)})]}),l.giftCardApplied?(0,y.jsxs)(i.Row,{style:{justifyContent:'space-between'},children:[(0,y.jsx)(i.Muted,{children:"Of which gift card"}),(0,y.jsxs)(i.T,{colour:b.colours.ok,children:["\u2212",(0,u.gbp)(l.giftCardApplied)]})]}):null,l.tip?(0,y.jsxs)(i.Row,{style:{justifyContent:'space-between'},children:[(0,y.jsx)(i.Muted,{children:"Tip"}),(0,y.jsx)(i.T,{children:(0,u.gbp)(l.tip)})]}):null,(0,y.jsxs)(i.Row,{style:{justifyContent:'space-between'},children:[(0,y.jsx)(i.T,{weight:"semibold",children:"Paid (test, no real money)"}),(0,y.jsx)(i.T,{weight:"semibold",colour:b.colours.gold,children:(0,u.gbp)(l.paid)})]})]}),'table'===l.type&&'closed'!==l.status&&'cancelled'!==l.status?(0,y.jsxs)(i.Card,{highlight:b.colours.gold,children:[(0,y.jsxs)(i.H2,{children:["Your bill \u2014 Table ",l.tableNo]}),l.split?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(i.T,{children:["Total ",(0,u.gbp)(D)," \xb7 split ",q," way",q>1?'s':''," \xb7 ",(0,u.gbp)(W)," each"]}),(0,y.jsxs)(i.T,{children:["Shares paid: ",L," of ",q," \xb7 remaining ",(0,u.gbp)(F)]}),q>1?(0,y.jsxs)(i.Row,{style:{justifyContent:'space-between'},children:[(0,y.jsx)(i.T,{children:"Shares to pay now"}),(0,y.jsx)(i.Stepper,{value:$,onChange:R,min:1,max:q-L,label:"shares"})]}):null,(0,y.jsx)(i.Button,{label:`Pay ${q>1?`${$} share${$>1?'s':''}`:'bill'} \xb7 ${(0,u.gbp)(Math.min(F,W*$))}`,onPress:()=>M(!0),testID:"pay-bill"})]}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(i.T,{weight:"semibold",children:"Add a tip?"}),(0,y.jsx)(i.Row,{wrap:!0,children:[0,10,12.5,15].map(e=>(0,y.jsx)(i.Chip,{label:e?`${e}%`:'No tip',selected:A===e,onPress:()=>I(e)},e))}),(0,y.jsx)(i.Muted,{children:"Tips go to staff under the restaurant\u2019s tipping policy (Employment (Allocation of Tips) Act 2023)."}),(0,y.jsxs)(i.Row,{style:{justifyContent:'space-between'},children:[(0,y.jsx)(i.T,{weight:"semibold",children:"Split evenly between"}),(0,y.jsx)(i.Stepper,{value:O,onChange:B,min:1,max:8,label:"people"})]}),(0,y.jsxs)(i.T,{children:["Total ",(0,u.gbp)(l.subtotal+_),O>1?` \xb7 ${(0,u.gbp)(Math.ceil((l.subtotal+_)/O))} each`:'']}),(0,y.jsx)(i.Button,{label:"Get the bill",onPress:()=>p.repo.orders.setSplit(l.id,O,_),testID:"get-bill"})]})]}):null,!Y||l.rated||k?null:(0,y.jsxs)(i.Card,{highlight:b.colours.gold,children:[(0,y.jsx)(i.H2,{children:"How was everything?"}),(0,y.jsxs)(i.Muted,{children:["One tap \u2014 this goes privately to ",w.name," only, never published."]}),(0,y.jsx)(o.Stars,{value:f,onChange:T}),f?(0,y.jsx)(i.Field,{label:"Anything to add? (optional)",value:C,onChangeText:S}):null,(0,y.jsx)(i.Button,{label:"Send feedback",disabled:!f,onPress:()=>{p.repo.feedback.add({restaurantId:w.id,orderId:l.id,customerId:l.customerId,customerName:l.customerName,stars:f,comment:C,context:'table'===l.type?`Table ${l.tableNo}`:`Takeaway ${l.ref}`}),v(!0)},testID:"send-rating"})]}),k||l.rated?(0,y.jsx)(i.Banner,{kind:"success",children:"Thanks \u2014 your feedback went privately to the restaurant."}):null,Y?(0,y.jsx)(i.Button,{kind:"secondary",label:"View stamp card",onPress:()=>t.router.push(`/customer/${w.id}/loyalty`)}):null,(0,y.jsx)(n.MockPay,{visible:P,onClose:()=>M(!1),amount:Math.min(F,W*$),restaurantId:w.id,title:`Pay \u2014 Table ${l.tableNo}`,onPaid:e=>{p.repo.orders.payTable(l.id,{shares:$,giftCardCode:e.giftCardCode}),M(!1),R(1)}})]})}},781,[794,20,117,822,821,802,803,805,807,808,810,14]); \ No newline at end of file diff --git a/owner-app/_expo/static/js/web/[token]-95091a67ece0565f844f7e286de11363.js b/owner-app/_expo/static/js/web/[token]-95091a67ece0565f844f7e286de11363.js new file mode 100644 index 0000000000000000000000000000000000000000..dca0e96341a3aff22e0baa2a73c7d8fb0d537212 --- /dev/null +++ b/owner-app/_expo/static/js/web/[token]-95091a67ece0565f844f7e286de11363.js @@ -0,0 +1,2 @@ +__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return u}});var t=r(d[0]);r(d[1]);var n=r(d[2]),o=r(d[3]),c=r(d[4]),s=r(d[5]),l=r(d[6]);function u(){const{token:u}=(0,t.useLocalSearchParams)(),h=(0,c.cleanToken)(u);return h?(0,s.guestServer)()?(0,l.jsx)(o.TableOrderLive,{token:h}):(0,l.jsx)(n.Screen,{title:"Order at the table",children:(0,l.jsx)(n.Banner,{kind:"demo",title:"Not connected",children:"This preview isn't connected to a venue, so table orders can't be sent from here."})}):(0,l.jsx)(n.Screen,{title:"Order at the table",children:(0,l.jsx)(n.Banner,{kind:"warn",title:"This code isn't working",children:"Please scan the QR code on your table again, or ask a member of staff."})})}},785,[794,20,802,838,839,824,14]); +__d(function(g,_r,_i,_a,_m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.TableOrderLive=function({token:e}){const[x,p]=(0,t.useState)(null),[f,b]=(0,t.useState)(null),[j,m]=(0,t.useState)([]),[y,k]=(0,t.useState)(null),w=(0,d.useCustomer)(),[T,C]=(0,t.useState)(()=>(w?.allergies??[]).map(e=>e.allergen)),[S,v]=(0,t.useState)(''),[P,O]=(0,t.useState)(''),[B,L]=(0,t.useState)(!1),[M,R]=(0,t.useState)(null),[N,$]=(0,t.useState)([]),A=(0,t.useCallback)(async()=>{try{p(await(0,o.tablePublic)(e)),b(null)}catch(e){b(e?.message??'Could not load the menu.')}},[e]),D=(0,t.useCallback)(async()=>{try{$(await(0,o.myTableOrders)(e))}catch{}},[e]);(0,t.useEffect)(()=>{A(),D();const e=setInterval(()=>{D(),A()},8e3);return()=>clearInterval(e)},[A,D]);const I=x?.menu??[];(0,t.useEffect)(()=>{m(e=>e.filter(e=>I.some(t=>t.id===e.id&&!t.soldOut)))},[x]);const _=(0,t.useMemo)(()=>{const e=new Map;for(const t of I)e.set(t.section,[...e.get(t.section)??[],t]);return[...e.entries()]},[x]),q=(0,i.cartTotal)(j,I),Y='yes'===y?T.map(e=>({allergen:e,severity:w?.allergies?.find(t=>t.allergen===e)?.severity??'allergy'})):[],W=(0,i.allergyClashes)(j,I,Y.map(e=>e.allergen)),E=e=>j.find(t=>t.id===e)?.qty??0,z=(e,t)=>m(l=>t<=0?l.filter(t=>t.id!==e):l.some(t=>t.id===e)?l.map(l=>l.id===e?{...l,qty:t}:l):[...l,{id:e,qty:t,note:''}]),G=(e,t)=>m(l=>l.map(l=>l.id===e?{...l,note:t}:l)),H=async()=>{L(!0),R(null);try{const t=await(0,o.sendTableOrder)(e,j,{note:P,name:S,allergies:Y});m([]),O(''),R({kind:'success',text:t.held?`Order ${t.ref} sent. A member of staff will check it, then it goes to the kitchen.`:`Order ${t.ref} sent to the kitchen.`}),D()}catch(e){R({kind:'warn',text:e?.message??'The order was not sent. Please try again or ask a member of staff.'}),A()}finally{L(!1)}};if(f)return(0,h.jsxs)(s.Screen,{title:"Order at the table",children:[(0,h.jsx)(s.Banner,{kind:"warn",title:"Couldn't open the menu",children:f}),(0,h.jsx)(s.Button,{label:"Try again",onPress:()=>{A()}})]});if(!x)return(0,h.jsx)(s.Screen,{title:"Order at the table",children:(0,h.jsx)(s.Muted,{children:"Opening the menu\u2026"})});if(!x.ok)return(0,h.jsx)(s.Screen,{title:"Order at the table",children:(0,h.jsx)(s.Banner,{kind:"warn",title:"This code isn't working",children:x.reason??'Please ask a member of staff.'})});const V=x.open&&j.length>0&&null!==y&&('none'===y||T.length>0)&&!B;return(0,h.jsxs)(s.Screen,{title:`Table ${x.table}`,subtitle:x.venueName,footer:x.open?(0,h.jsx)(s.Button,{label:B?'Sending\u2026':j.length?`Send order to the kitchen (${(0,r.gbp)(q)})`:'Add a dish to order',disabled:!V,onPress:()=>{H()},testID:"send-table-order-live"}):void 0,children:[(0,h.jsxs)(s.Muted,{children:["Tip: add dishes, answer the allergy question, then send. Staff bring it to Table ",x.table,". ",i.PAY_WORDS]}),x.tip?(0,h.jsx)(s.Banner,{kind:"demo",children:x.tip}):null,x.open?null:(0,h.jsx)(s.Banner,{kind:"warn",title:"Not taking table orders right now",children:x.reason}),x.open&&x.staffAccept&&!N.some(e=>e.accepted)?(0,h.jsx)(s.Muted,{children:"The first order from your phone is checked by a member of staff before it goes to the kitchen."}):null,M?(0,h.jsx)(s.Banner,{kind:M.kind,children:M.text}):null,N.length?(0,h.jsx)(n.default,{testID:"my-table-orders",children:(0,h.jsxs)(s.Card,{children:[(0,h.jsx)(s.T,{weight:"semibold",children:"Your orders at this table"}),N.map(e=>(0,h.jsxs)(n.default,{style:{gap:2,paddingVertical:4},children:[(0,h.jsxs)(s.Row,{style:{justifyContent:'space-between'},children:[(0,h.jsx)(s.T,{children:e.ref}),(0,h.jsx)(s.T,{size:13,colour:'cancelled'===e.status?c.colours.amber:c.colours.gold,children:(0,i.guestStatusWords)(e)})]}),(0,h.jsxs)(s.Muted,{children:[e.lines.map(e=>`${e.qty}\xd7 ${e.name}`).join(', ')," \xb7 ",(0,r.gbp)(e.totalPence)," to pay at the bar or till"]})]},e.id))]})}):null,x.open?_.map(([e,t])=>(0,h.jsxs)(n.default,{style:{gap:8},children:[(0,h.jsx)(s.H2,{children:e}),t.map(e=>(0,h.jsxs)(s.Card,{children:[(0,h.jsxs)(s.Row,{style:{justifyContent:'space-between',alignItems:'flex-start'},children:[(0,h.jsxs)(n.default,{style:{flex:1,gap:2},children:[(0,h.jsx)(s.T,{weight:"semibold",children:e.name}),e.description?(0,h.jsx)(s.Muted,{children:e.description}):null,(0,h.jsxs)(s.T,{size:13,colour:c.colours.muted,children:[e.allergens.length?`Contains: ${e.allergens.map(a.allergenLabel).join(', ')}`:'No allergens listed: ask staff if unsure',e.mayContain.length?` \xb7 May contain: ${e.mayContain.map(a.allergenLabel).join(', ')}`:'']})]}),(0,h.jsx)(s.T,{weight:"semibold",colour:c.colours.gold,children:(0,r.gbp)(e.pricePence)})]}),e.soldOut?(0,h.jsx)(s.Badge,{kind:"amber",label:"Sold out today"}):E(e.id)?(0,h.jsxs)(s.Row,{style:{justifyContent:'space-between'},children:[(0,h.jsx)(s.Stepper,{value:E(e.id),min:0,max:20,onChange:t=>z(e.id,t),label:e.name}),(0,h.jsx)(s.Button,{small:!0,kind:"ghost",label:"Remove",onPress:()=>z(e.id,0)})]}):(0,h.jsx)(s.Button,{small:!0,kind:"secondary",label:"Add",accessibilityLabel:`Add ${e.name}`,onPress:()=>z(e.id,1)})]},e.id))]},e)):null,x.open&&!I.length?(0,h.jsx)(s.Banner,{kind:"demo",title:"No dishes to order yet",children:"The venue hasn't put any priced dishes on the table menu yet. Please order at the bar."}):null,x.open&&j.length?(0,h.jsx)(n.default,{testID:"table-cart",children:(0,h.jsxs)(s.Card,{children:[(0,h.jsx)(s.T,{weight:"semibold",children:"Your order"}),j.map(e=>{const t=I.find(t=>t.id===e.id);return(0,h.jsxs)(n.default,{style:{gap:4},children:[(0,h.jsxs)(s.Row,{style:{justifyContent:'space-between'},children:[(0,h.jsxs)(s.T,{children:[e.qty,"\xd7 ",t?.name]}),(0,h.jsx)(s.T,{children:(0,r.gbp)(e.qty*(t?.pricePence??0))})]}),(0,h.jsx)(l.default,{style:u,value:e.note,onChangeText:t=>G(e.id,t),placeholder:"Note for the kitchen (optional), e.g. no onions",placeholderTextColor:c.colours.muted,maxLength:140,accessibilityLabel:`Note for ${t?.name}`,testID:`table-note-${e.id}`})]},e.id)}),(0,h.jsxs)(s.Row,{style:{justifyContent:'space-between'},children:[(0,h.jsx)(s.T,{weight:"semibold",children:"Total"}),(0,h.jsx)(s.T,{weight:"semibold",children:(0,r.gbp)(q)})]})]})}):null,x.open?(0,h.jsx)(n.default,{testID:"table-allergy",children:(0,h.jsxs)(s.Card,{children:[(0,h.jsx)(s.T,{weight:"semibold",children:"Does anyone at the table have a food allergy?"}),(0,h.jsx)(s.Muted,{children:"We ask everyone, so the kitchen can keep you safe."}),(0,h.jsxs)(s.Row,{gap:8,children:[(0,h.jsx)(s.Chip,{label:"No allergies",selected:'none'===y,onPress:()=>k('none')}),(0,h.jsx)(s.Chip,{label:"Yes, allergies",selected:'yes'===y,onPress:()=>k('yes')})]}),'yes'===y?(0,h.jsx)(s.Row,{wrap:!0,gap:6,children:a.ALLERGENS.map(e=>(0,h.jsx)(s.Chip,{label:e.short,selected:T.includes(e.id),onPress:()=>C(t=>t.includes(e.id)?t.filter(t=>t!==e.id):[...t,e.id])},e.id))}):null,W.length?(0,h.jsxs)(s.Banner,{kind:"warn",title:"Check with staff",children:[W.map(e=>e.name).join(', ')," ",W.length>1?'contain':'contains'," or may contain an allergy you picked. The kitchen will see your allergies on the ticket."]}):null]})}):null,x.open?(0,h.jsxs)(s.Card,{children:[(0,h.jsx)(s.T,{weight:"semibold",children:"Anything else?"}),(0,h.jsx)(l.default,{style:u,value:S,onChangeText:v,placeholder:"Your first name (optional)",placeholderTextColor:c.colours.muted,maxLength:40,accessibilityLabel:"Your first name (optional)"}),(0,h.jsx)(l.default,{style:u,value:P,onChangeText:O,placeholder:"Note for the staff (optional)",placeholderTextColor:c.colours.muted,maxLength:300,accessibilityLabel:"Note for the staff (optional)"})]}):null,(0,h.jsx)(n.default,{testID:"pay-placeholder",children:(0,h.jsxs)(s.Card,{children:[(0,h.jsx)(s.T,{weight:"semibold",children:"Paying"}),(0,h.jsx)(s.T,{children:i.PAY_WORDS}),(0,h.jsx)(s.Muted,{children:"No card details are asked for or kept in this app."})]})})]})};var t=_r(_d[0]),l=e(_r(_d[1])),n=e(_r(_d[2])),s=_r(_d[3]),a=_r(_d[4]),r=_r(_d[5]),i=_r(_d[6]),o=_r(_d[7]),d=_r(_d[8]),c=_r(_d[9]),h=_r(_d[10]);const u={borderWidth:1,borderColor:c.colours.border,borderRadius:10,padding:10,color:c.colours.text,backgroundColor:c.colours.surface2}},838,[20,263,117,802,803,805,839,840,808,810,14]); \ No newline at end of file diff --git a/owner-app/_expo/static/js/web/__common-d1c6130527758186befb9ddcdc33afda.js b/owner-app/_expo/static/js/web/__common-d1c6130527758186befb9ddcdc33afda.js new file mode 100644 index 0000000000000000000000000000000000000000..f5f64db551993415e36f7f0bc2acccbd28a0b141 --- /dev/null +++ b/owner-app/_expo/static/js/web/__common-d1c6130527758186befb9ddcdc33afda.js @@ -0,0 +1,428 @@ +__d(function(g,r,i,a,m,e,d){"use strict";function t(t,n){return Object.keys(t).forEach(function(c){"default"===c||Object.prototype.hasOwnProperty.call(n,c)||Object.defineProperty(n,c,{enumerable:!0,get:function(){return t[c]}})}),t}Object.defineProperty(e,"__esModule",{value:!0}),r(d[0]),t(r(d[1]),e),t(r(d[2]),e),t(r(d[3]),e),t(r(d[4]),e)},794,[1186,1187,1197,1198,1200]); +__d(function(g,_r,_i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ChefApp=function({section:e}={}){const{r:$,rid:D,me:M,now:z}=(0,F.useChef)(3e4),re=(0,E.useSignedIn)(),fe=re?.id??F.CHEF_ID;(0,s.useSoldOutLink)(!0,(re?.name??M).replace(' (example)',''));const be=e?pe[e]:void 0,[ke,me]=(0,T.useState)(be?.tab??'home'),[ye,xe]=(0,T.useState)(be?.k??null),[je,we]=(0,T.useState)(be?.stock??'levels'),[Ce,Te]=(0,T.useState)(void 0),[Se,ve]=(0,T.useState)(be?.gp??'dishes'),Pe=(0,T.useRef)(null),Re=(0,u.ymd)(z),Ie=(0,u.ymd)(new Date(z.getTime()+864e5));(0,d.useTipsPosted)(D,Re);const Be=(0,V.useTravelDay)('chef',Re),He='home'===ke&&!Be;(0,w.useKitchenTodoChime)(D,Re,()=>Le('kitchen','bookings')),(0,oe.useAlertWatcher)(D,{kinds:['takeaway']}),(0,T.useEffect)(()=>{(0,E.ensureAttendance)((new Date).toISOString().slice(0,10),z)},[]);const Oe=(0,T.useRef)({t:'home',k:null});Oe.current={t:ke,k:ye};const Ae=(0,T.useRef)([]),$e=(0,t.useScrollMemory)(Pe),Le=(0,T.useCallback)((e,s=null)=>{const t=Oe.current;t.t===e&&t.k===s||(Ae.current=[...Ae.current,{...t,y:$e.leave()}].slice(-30),$e.restore(0)),me(e),xe(s)},[]),Ee=(0,T.useCallback)(()=>{if((0,o.runBackLayer)())return!0;const e=Oe.current;let s=Ae.current.pop();for(;s&&s.t===e.t&&s.k===e.k;)s=Ae.current.pop();if(!s&&'home'===e.t&&!e.k)return!1;const t=s??{t:'home',k:null};return $e.leave(),me(t.t),xe(t.k),$e.restore(t.y??0),!0},[]);(0,o.useWebBack)(Ee);const De=(0,o.useInnerBackShown)();(0,T.useEffect)(()=>{l.PITCH&&(globalThis.__pitchGo=(e,s=null,t)=>{'stock'===e&&t&&we(t),'gp'===e&&t&&ve(t),Le(e,s)})},[Le]),(0,c.useShiftReminders)({rid:D,staffId:fe,name:M,kitchen:!0}),(0,x.useScheduledNotices)({rid:D,staffId:re?.id??'',name:M,onOpen:()=>Le('kitchen','orderlists')}),(0,j.useOffRotaPrompt)({rid:D,staffId:re?.id??''}),(0,T.useEffect)(()=>{const e=S.default.addEventListener('hardwareBackPress',Ee);return()=>e.remove()},[Ee]);const Fe=ye?he.find(e=>e.id===ye):null,We=(0,R.default)().width<430,Ge=Fe?Fe.title:{home:'Today in the kitchen',stock:'Stock',gp:'GP & costing',creator:X.CREATOR_TITLE,orders:'Ordering',kitchen:'Kitchen'}[ke];return(0,ce.jsxs)(B.SafeAreaView,{style:{flex:1,backgroundColor:L.colours.bg},edges:['top','bottom'],children:[(0,ce.jsxs)(I.default,{style:{paddingHorizontal:14,paddingTop:6,paddingBottom:8,borderBottomWidth:1,borderColor:L.colours.border,gap:6},children:[(0,ce.jsx)(I.default,{style:{alignItems:'center'},children:(0,ce.jsx)(I.default,{testID:"header-me",accessibilityLabel:`Signed in as ${M.replace(' (example)','')}, Head Chef`,style:{borderWidth:1,borderColor:L.colours.gold,borderRadius:16,paddingHorizontal:10,paddingVertical:4,maxWidth:'86%'},children:(0,ce.jsxs)(A.Row,{gap:6,children:[(0,ce.jsx)(q.StaffAvatar,{id:F.CHEF_ID,size:24,ring:!1}),(0,ce.jsxs)(A.T,{size:13,weight:"semibold",colour:L.colours.gold,numberOfLines:1,style:{flexShrink:1},children:[M.replace(' (example)','')," \xb7 Head Chef"]})]})})}),(0,ce.jsxs)(A.Row,{gap:10,children:[(0,ce.jsx)(H.RestaurantLogo,{rid:D,size:We?36:44}),(0,ce.jsxs)(I.default,{style:{flex:1,minWidth:0},children:[(0,ce.jsxs)(A.Row,{gap:6,children:[(0,ce.jsx)(A.T,{weight:"semibold",size:We?15:17,numberOfLines:1,style:{flexShrink:1},children:$.name}),(0,ce.jsx)(y.AppBadge,{label:"CHEF"})]}),(0,ce.jsx)(A.T,{size:12,colour:L.colours.muted,numberOfLines:1,children:"Head Chef app"}),(0,ce.jsx)(H.PoweredBy,{})]}),(0,ce.jsx)(v.default,{accessibilityRole:"button",accessibilityLabel:"Open CoverCharge for Staff",onPress:()=>{const e=(0,Y.appUrl)('staff');e&&window.location.assign(e)},style:{borderWidth:1,borderColor:L.colours.gold,borderRadius:14,paddingHorizontal:10,paddingVertical:3,minHeight:44,justifyContent:'center'},children:(0,ce.jsx)(A.T,{size:13,colour:L.colours.gold,children:"Staff app \u203a"})}),(0,ce.jsx)(O.VoiceSlot,{})]})]}),(0,ce.jsxs)(P.default,{ref:Pe,...$e.props,contentContainerStyle:{padding:14,paddingBottom:60,gap:12,width:'100%',maxWidth:760,alignSelf:'center'},keyboardShouldPersistTaps:"handled",children:[(0,ce.jsxs)(A.Row,{style:{justifyContent:'space-between'},children:['home'===ke&&!ye||De?null:(0,ce.jsx)(o.BackButton,{onPress:Ee}),(0,ce.jsx)(A.T,{size:22,weight:"bold",style:{flex:1,textAlign:'home'===ke&&!ye||De?'left':'right'},children:Ge})]}),'home'===ke?(0,ce.jsx)(V.DayBar,{app:"chef",today:Re}):null,'home'===ke&&Be?(0,ce.jsx)(V.DayView,{rid:D,day:Be,today:Re,app:"chef"}):null,He&&re?(0,ce.jsx)(n.MyTasksToday,{rid:D,staffId:re.id,name:re.name,onShift:(0,c.shiftNow)(re.id,z.getTime()).on}):null,He?(0,ce.jsx)(d.TodaysTipsCard,{rid:D,today:Re}):null,He?(0,ce.jsx)(d.TipsPotCard,{rid:D,today:Re}):null,He?(0,ce.jsx)(h.CoversToday,{rid:D,onPress:()=>Le('kitchen','bookings')}):null,He?(0,ce.jsx)(p.LastFoodBanner,{rid:D,now:z}):null,He?(0,ce.jsx)(f.NextTableFreeCard,{rid:D,now:z}):null,He?(0,ce.jsx)(b.KitchenSignoffs,{rid:D,today:Re,by:M,app:"chef"}):null,He?(0,ce.jsxs)(I.default,{style:{gap:4},children:[(0,ce.jsx)(b.PlattersBooked,{rid:D,date:Re,label:"Platters booked today"}),(0,ce.jsx)(b.PlattersBooked,{rid:D,date:Ie,label:"Platters booked tomorrow"})]}):null,He?(0,ce.jsx)(ae.ChefAssistantButton,{}):null,He?(0,ce.jsx)(ge,{go:(e,s)=>{'stock'===e&&s&&we(s),'gp'===e&&s&&ve(s),'orders'===e&&Te(s),Le(e,'kitchen'===e?s??null:null)}}):null,'stock'===ke?(0,ce.jsx)(K.StockScreen,{initial:je},je):null,'gp'===ke?(0,ce.jsx)(W.GpScreen,{initial:Se},Se):null,'creator'===ke?(0,ce.jsx)(X.DishCreator,{rid:D,canPublish:!1}):null,'orders'===ke?(0,ce.jsx)(G.OrdersScreen,{focus:Ce},Ce??'all'):null,'kitchen'!==ke||Fe?null:(0,ce.jsxs)(I.default,{style:{gap:10},children:[(0,ce.jsx)(I.default,{style:{borderRadius:14,borderWidth:1,borderColor:L.colours.border,backgroundColor:L.colours.surface,overflow:'hidden'},children:he.map((e,s)=>(0,ce.jsx)(v.default,{accessibilityRole:"button",accessibilityLabel:e.title,onPress:()=>Le(ke,e.id),style:({pressed:e})=>({padding:12,borderTopWidth:s?1:0,borderColor:L.colours.border,backgroundColor:e?'#1d1a14':'transparent'}),children:(0,ce.jsxs)(A.Row,{style:{justifyContent:'space-between'},children:[(0,ce.jsxs)(I.default,{style:{flex:1},children:[(0,ce.jsx)(A.T,{weight:"medium",children:e.title}),(0,ce.jsx)(A.Muted,{children:e.sub})]}),(0,ce.jsx)(A.T,{colour:L.colours.muted,children:"\u203a"})]})},e.id))}),(0,ce.jsx)(A.Muted,{children:"Head Chef sees kitchen, stock, food costs and GP. Payroll, wages and the restaurant's billing stay in CoverCharge for Managers."}),(0,ce.jsxs)(A.Muted,{center:!0,children:["Head Chef app \xb7 ",i.APP_VERSION," \xb7 ",'live'===ne.useSync.getState().mode?'shared with your team':'saved on this device until it connects']})]}),'mypay'===ye?(0,ce.jsxs)(I.default,{style:{gap:10},testID:"chef-mypay",children:[(0,ce.jsx)(Q.MyPeriods,{staffId:fe}),(0,ce.jsx)(N.MyHoursPay,{staffId:fe}),(0,ce.jsx)(U.MyTips,{staffId:fe}),(0,ce.jsxs)(A.Card,{children:[(0,ce.jsx)(A.T,{weight:"semibold",children:"Phone notifications"}),(0,ce.jsx)(A.Muted,{children:"Get reminders like \u201cMills milk order\u201d on this phone, even with the app closed (once your manager switches phone notifications on). iPhone: add the app to your Home Screen first (iOS 16.4 or later)."}),(0,ce.jsx)(r.PushButton,{})]})]}):null,'bookings'===ye?(0,ce.jsx)(C.TodaysBookings,{rid:D,today:Re,by:M,app:"chef"}):null,'specials'===ye?(0,ce.jsx)(ee.SpecialsEditor,{rid:D,me:M,app:"chef",now:z}):null,'prep'===ye?(0,ce.jsx)(_.PrepScreen,{}):null,'live'===ye?(0,ce.jsx)(_.TeamScreen,{}):null,'waste'===ye?(0,ce.jsx)(_.WasteScreen,{}):null,'recipes'===ye?(0,ce.jsx)(ie.RecipeCards,{rid:D,actor:{name:M,role:'head-chef'},mode:"edit"}):null,'allergens'===ye?(0,ce.jsx)(_.AllergenScreen,{openCards:()=>Le('kitchen','recipes')}):null,'compliance'===ye?(0,ce.jsx)(_.ComplianceScreen,{}):null,'takings'===ye?(0,ce.jsx)(d.CashUpScreen,{rid:D,today:Re,canEdit:!1,chartsOnly:!0,who:{id:fe,name:M.replace(' (example)','')}}):null,'board'===ye?(0,ce.jsx)(le.QuestionBoard,{rid:D,today:Re,manager:!1,by:""}):null,'teamtasks'===ye?(0,ce.jsx)(n.KitchenTeamTasks,{rid:D,actor:re}):null,'orderlists'===ye?(0,ce.jsx)(k.OrderListsScreen,{rid:D,today:Re,editor:!0,who:{id:fe,name:M.replace(' (example)','')}}):null,'foodsafety'===ye?(0,ce.jsx)(r.FoodSafetyCard,{children:(0,ce.jsx)(v.default,{accessibilityRole:"button",onPress:()=>Le('kitchen','haccp'),children:(0,ce.jsx)(A.T,{colour:L.colours.gold,children:"Today\u2019s temperature log \u203a"})})}):null,'haccp'===ye?(0,ce.jsx)(Z.HaccpLog,{mode:"chef",me:M,meId:F.CHEF_ID,now:z}):null,'accidents'===ye?(0,ce.jsx)(J.AccidentBook,{app:"chef",me:M,meId:F.CHEF_ID,now:z,seeAll:!1}):null]}),(0,ce.jsx)(I.default,{accessibilityRole:"tablist",style:{flexDirection:'row',borderTopWidth:1,borderColor:L.colours.border,backgroundColor:L.colours.surface},children:ue.map(e=>{const s=ke===e.id;return(0,ce.jsxs)(v.default,{accessibilityRole:"tab",accessibilityState:{selected:s},accessibilityLabel:e.label,onPress:()=>Le(e.id),style:{flex:1,alignItems:'center',paddingVertical:8,paddingHorizontal:2,minHeight:52,gap:2},children:[(0,ce.jsx)(de.Icon,{name:e.icon,colour:s?L.colours.gold:L.colours.muted}),(0,ce.jsx)(A.T,{size:e.label.length>10?10:11,weight:s?'semibold':'regular',colour:s?L.colours.gold:L.colours.muted,center:!0,children:e.label})]},e.id)})}),(0,ce.jsx)(ae.ChefAssistantSheet,{go:(e,s)=>{'orders'===e?(Te(s),Le('orders')):'gp'===e?Le('gp'):Le('kitchen',e)}}),(0,ce.jsx)(se.AlertHost,{variant:"chef",rid:D,skipTakeaway:!0}),(0,ce.jsx)(te.KitchenFlash,{rid:D,me:M})]})};var s=_r(_d[0]),t=_r(_d[1]),o=_r(_d[2]),i=_r(_d[3]),l=_r(_d[4]),r=_r(_d[5]),n=_r(_d[6]),d=_r(_d[7]),c=_r(_d[8]),u=_r(_d[9]),h=_r(_d[10]),p=_r(_d[11]),f=_r(_d[12]),b=_r(_d[13]),k=_r(_d[14]),y=_r(_d[15]),x=_r(_d[16]),j=_r(_d[17]),w=_r(_d[18]),C=_r(_d[19]),T=_r(_d[20]),S=e(_r(_d[21]));_r(_d[22]);var v=e(_r(_d[23])),P=e(_r(_d[24])),R=e(_r(_d[25])),I=e(_r(_d[26])),B=_r(_d[27]),H=_r(_d[28]),O=_r(_d[29]),A=_r(_d[30]),$=_r(_d[31]),L=_r(_d[32]),E=_r(_d[33]),D=_r(_d[34]),F=_r(_d[35]),W=_r(_d[36]),_=_r(_d[37]),G=_r(_d[38]),M=_r(_d[39]),z=_r(_d[40]),K=_r(_d[41]),N=_r(_d[42]),V=_r(_d[43]),Q=_r(_d[44]),U=_r(_d[45]),q=_r(_d[46]),Y=_r(_d[47]),J=_r(_d[48]),X=_r(_d[49]),Z=_r(_d[50]),ee=_r(_d[51]),se=_r(_d[52]),te=_r(_d[53]),oe=_r(_d[54]),ie=_r(_d[55]),le=_r(_d[56]),re=_r(_d[57]),ae=_r(_d[58]),ne=_r(_d[59]),de=_r(_d[60]),ce=_r(_d[61]);const ue=[{id:'home',label:'Home',icon:'home'},{id:'stock',label:'Stock',icon:'box'},{id:'gp',label:'GP',icon:'forecast'},{id:'creator',label:X.CREATOR_TITLE,icon:'sparkle'},{id:'orders',label:'Orders',icon:'orders'},{id:'kitchen',label:'Kitchen',icon:'platter'}],he=[{id:'mypay',title:'My pay & tips',sub:'Your hours, tips share, tip goal, paydays and payslip info. Only you see this'},{id:'takings',title:'Takings & tips graphs',sub:'Daily cash ups, weekly sales, this week vs last, categories and the Tips pot (view only)'},{id:'bookings',title:'Today\u2019s bookings',sub:'Covers, allergens to sign off, platters and other reservations, dogs, access and vegan/vegetarian'},{id:'recipes',title:'Recipe cards',sub:'Plating photo, ingredients, method, allergens, section and price; you sign each card off before it goes live'},{id:'specials',title:'Specials board',sub:'Photo of the chalkboard or typed specials with allergens; shown in the customer app'},{id:'board',title:'Question board',sub:'Ask the team anything anonymously, and vote'},{id:'teamtasks',title:'Kitchen team tasks',sub:'Daily tasks for your chefs, commis and KPs'},{id:'orderlists',title:'Order lists',sub:'Alsons drinks, Cash and carry: add items, tick on the day, finish and carry over'},{id:'foodsafety',title:'Food safety (CookSafe)',sub:'Based on CookSafe (Food Standards Scotland). Full logs coming in the next update'},{id:'haccp',title:'Food safety log (HACCP)',sub:'Temperatures, cleaning and allergen checks; voice entry; limits; EHO export'},{id:'accidents',title:'Accident book',sub:'Accidents and near misses; you see your own entries'},{id:'prep',title:'Prep list',sub:'From the forecast and bookings, tick off as you go'},{id:'live',title:'Live tickets, sold out, team & chat',sub:'Orders, readiness alerts, sold out, who\u2019s on, rota, team chat and private messages'},{id:'waste',title:'Waste log',sub:'Item, quantity, reason and cost; weekly total and % of sales'},{id:'allergens',title:'Allergens',sub:'14-allergen matrix from the recipe cards, costing cross-check and audit log'},{id:'compliance',title:'Kitchen compliance',sub:'Fridge, freezer, cooking and cooling temps; cleaning; daily checks'}],pe={stock:{tab:'stock',stock:'levels'},'stock-take':{tab:'stock',stock:'take'},deliveries:{tab:'stock',stock:'deliveries'},gp:{tab:'gp',gp:'dishes'},'price-changes':{tab:'gp',gp:'changes'},'gp-week':{tab:'gp',gp:'week'},'menu-engineering':{tab:'gp',gp:'engineering'},orders:{tab:'orders'},prep:{tab:'kitchen',k:'prep'},live:{tab:'kitchen',k:'live'},waste:{tab:'kitchen',k:'waste'},recipes:{tab:'kitchen',k:'recipes'},'recipe-cards':{tab:'kitchen',k:'recipes'},allergens:{tab:'kitchen',k:'allergens'},compliance:{tab:'kitchen',k:'compliance'},haccp:{tab:'kitchen',k:'haccp'},specials:{tab:'kitchen',k:'specials'},accidents:{tab:'kitchen',k:'accidents'},'new-dish':{tab:'creator'}};function ge({go:e}){const{k:s,c:t,menu:o,now:i,rid:l,me:r}=(0,F.useChef)(3e4),n=(0,M.useSheetReminders)(),d=(0,F.useWeek)(),{covers:c,label:u,enough:h,booked:p}=(0,F.useForecast)(),f=(0,G.useSuggestions)(),b=s.ingredients.filter(e=>e.onHand<=0||(0,F.isLow)(e.onHand,e.par)),k=f.filter(e=>e.ordersToday&&!e.placedToday),y=(0,D.priceImpacts)(o,s.recipes,s.ingredients,s.targetGp).filter(e=>e.dropped.length),x=s.deliveries.filter(e=>'expected'===e.status),j=t.filter(e=>e.below),w=(0,re.useRecipeCards)(l).filter(e=>!e.signOff);return(0,ce.jsxs)(I.default,{style:{gap:12},testID:"chef-dashboard",children:[(0,ce.jsx)(Z.MissedBanner,{now:i,onPress:()=>e('kitchen','haccp')}),n.map(s=>(0,ce.jsx)(v.default,{accessibilityRole:"button",onPress:()=>e('orders',s.supplierId),children:(0,ce.jsxs)(A.Banner,{kind:'red'===s.tone?'danger':'warn',title:`\u23f0 ${s.text}`,children:["Tap to open the ",s.name," order sheet. Nothing is sent until you press Send."]})},s.supplierId)),w.length?(0,ce.jsx)(v.default,{testID:"cards-awaiting",accessibilityRole:"button",onPress:()=>e('kitchen','recipes'),children:(0,ce.jsxs)(A.Banner,{kind:"warn",title:`${w.length} recipe card${1===w.length?'':'s'} awaiting your sign-off`,children:[w.slice(0,4).map(e=>e.dish).join(', '),". Guests see \"awaiting allergen sign-off\" and cannot order these until you sign them off."]})}):null,(0,ce.jsx)(z.ShellfishTile,{rid:l,by:r,app:"chef",onOrder:()=>e('orders','os-kittyfisher')}),(0,ce.jsxs)(A.Row,{wrap:!0,gap:10,children:[(0,ce.jsx)(F.Tile,{testID:"tile-gp",label:"GP this week vs target",value:(0,F.pct1)(d.theo),sub:`Target ${s.targetGp}% \xb7 actual ${(0,F.pct1)(d.actual)}`,tone:d.theo