1import{a as e,j as s,B as x,d as o}from"./index-4ce00ee7.js";import{g}from"./index-7de85521.js";import{t as d,f as h,a as t}from"./formatters-cb9ccf71.js";const j=({foodbevItem:a})=>{var i,l,c,r;const n=[{label:"Home",path:e.routes.dashboard()},{label:"Food & Beverage",path:e.routes.foodbevOrders()},{label:(i=a==null?void 0:a.FoodbevCategory)==null?void 0:i.name,path:e.routes.foodbevCategories()},{label:a==null?void 0:a.name,path:e.routes.foodbevItems({categoryId:(l=a==null?void 0:a.FoodbevCategory)==null?void 0:l.id,categoryName:(c=a==null?void 0:a.FoodbevCategory)==null?void 0:c.name})},{label:"Details"}];return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex justify-between mb-6",children:s.jsxs("div",{children:[s.jsx("h2",{className:"text-xl sm:text-2xl lg:text-4xl font-bold",children:"Food & Beverage"}),s.jsx(x,{crumbs:n})]})}),s.jsx("div",{className:"bg-white rounded-lg p-4 md:p-8",children:s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 md:gap-8",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("div",{className:"font-bold",children:"Name"}),s.jsx("div",{children:d(a.name)})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("div",{className:"font-bold",children:"Description"}),s.jsx("div",{children:d(a.description)})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("div",{className:"font-bold",children:"Category"}),s.jsx("div",{children:d((r=a==null?void 0:a.FoodbevCategory)==null?void 0:r.name)})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("div",{className:"font-bold",children:"Price"}),s.jsx("div",{children:h(a.price)})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("div",{className:"font-bold",children:"In stock"}),s.jsx("div",{className:`w-fit cursor-default text-xs border text-white rounded-lg px-4 py-1 bg-opacity-20 capitalize ${a.inStock?"bg-green-700 text-green-700":"bg-red-700 text-red-700"}`,children:a.inStock?"Yes":"No"})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("div",{className:"font-bold",children:"Created at"}),s.jsx("div",{children:t(a.createdAt)})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("div",{className:"font-bold",children:"Updated at"}),s.jsx("div",{children:t(a.updatedAt)})]})]})})]})},p=g` 2 query FindFoodbevItemById($id: String!) { 3 foodbevItem: foodbevItem(id: $id) { 4 id 5 golfClubId 6 foodbevCategoryId 7 name 8 description 9 price 10 inStock 11 active 12 createdAt 13 updatedAt 14 FoodbevCategory { 15 id 16 name 17 } 18 } 19 } 20`,m=()=>s.jsx("div",{children:"Loading..."}),u=()=>s.jsx("div",{children:"FoodbevItem not found"}),y=({error:a})=>s.jsx("div",{className:"rw-cell-error",children:a==null?void 0:a.message}),N=({foodbevItem:a})=>s.jsx(j,{foodbevItem:a}),v=o.createCell({QUERY:p,Loading:m,Empty:u,Failure:y,Success:N,displayName:"FoodbevItemCell"}),w=({id:a})=>s.jsx(v,{id:a});export{w 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.