PageSourceSearch

https://platform.dalseen.sa/assets/SignalsPage-CFoqAMgF.js

js dalseen.sa collected 2026-10-09 23:48:16 UTC 2,722 bytes, 1 lines download raw bytes

1import{u as v,a as k,b8 as N,ba as w,b9 as y,eC as P,eI as G,r as h,eJ as I,cy as D,e$ as E,f0 as K,j as e,at as L,bd as i,n as x,E as M,L as O}from"./index-mbu4rngo.js";import{K as R,a as g}from"./KPI-D8usIAa2.js";import{u as T}from"./useDineStaffContext-DgS4QD_N.js";import{M as $}from"./MenuTabIntro-CmBVz-1q.js";import{G as A}from"./GuestSignalStaffRow-BR7_MIXc.js";import{f as C}from"./dineTicketDisplay-CLHYdf0x.js";import"./dineOpsUi-DlM2Qq7w.js";import"./GuestSignalBadges-D05MgyYr.js";function V(){var b,_;const{t,locale:r}=v(),c=k(s=>{var a;return(a=s.branch)==null?void 0:a.id}),p=N(),j=w(p),{profile:f}=T({branchId:c});y(c);const n=P({branch_id:c,guest_signals_only:1,status:"open"}),d=G(),o=h.useMemo(()=>{var a;const s=((a=n.data)==null?void 0:a.items)||[];return I(s.filter(l=>D(l.guest_pending_signals)),f)},[(b=n.data)==null?void 0:b.items,f]),m=h.useMemo(()=>{let s=0,a=0,l=0;for(const S of o){const u=E(S.guest_pending_signals);s+=u.total,u.waiter&&(a+=1),u.bill&&(l+=1)}return{total:s,waiter:a,bill:l}},[o]);return p.isSuccess&&!K(j)?e.jsx(L,{to:"/app/dine/orders",replace:!0}):e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx($,{t,hintKey:"tab_signals_hint",icon:"bell"}),e.jsx("p",{className:"text-sm text-ink-600",children:i(t,"signals_page_subtitle")}),e.jsxs(R,{columns:3,children:[e.jsx(g,{label:i(t,"tab_signals"),value:x(m.total,r),locale:r}),e.jsx(g,{label:i(t,"guest_signal_waiter_short"),value:x(m.waiter,r),locale:r}),e.jsx(g,{label:i(t,"guest_signal_bill_short"),value:x(m.bill,r),locale:r})]}),n.isError&&e.jsx(M,{message:((_=n.error)==null?void 0:_.message)||i(t,"load_failed"),onRetry:()=>n.refetch()}),n.isLoading&&e.jsx("div",{className:"text-sm text-ink-500",children:i(t,"loading")}),!n.isLoading&&o.length===0&&e.jsx("div",{className:"card p-8 text-center text-sm text-ink-500",children:i(t,"signals_empty")}),e.jsx("ul",{className:"flex flex-col gap-3",children:o.map(s=>{var l;const a=C(s)||`#${s.id}`;return e.jsxs("li",{className:"card p-4 flex flex-col gap-3 border border-ink-100",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-ink-900",children:a}),e.jsx("div",{className:"text-xs text-ink-500",children:s.table||s.table_code||s.customer_name||"-"})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(O,{to:`/dine-pos/order?order=${s.id}`,className:"text-xs font-semibold text-dine-strong hover:underline",children:i(t,"external_open_in_pos")})})]}),e.jsx(A,{t,signals:s.guest_pending_signals,onAck:()=>d.mutate({id:s.id}),ackPending:d.isPending&&((l=d.variables)==null?void 0:l.id)===s.id})]},s.id)})})]})}export{V as default};

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.