1import{d as i,j as e,a as s}from"./index-4ce00ee7.js";import{g as n}from"./index-7de85521.js";import{t as o}from"./index-51f3a61d.js";import{t as r,b as h}from"./formatters-cb9ccf71.js";const x=n` 2 mutation DeleteGolfClubMutation($id: String!) { 3 deleteGolfClub(id: $id) { 4 id 5 } 6 } 7`,l=({golfClubs:d})=>{const[c]=i.useMutation(x,{onCompleted:()=>{o.toast.success("GolfClub deleted")},onError:t=>{o.toast.error(t.message)},refetchQueries:[{query:a}],awaitRefetchQueries:!0}),u=t=>{confirm("Are you sure you want to delete golfClub "+t+"?")&&c({variables:{id:t}})};return e.jsx("div",{className:"rw-segment rw-table-wrapper-responsive",children:e.jsxs("table",{className:"rw-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("th",{children:"Address"}),e.jsx("th",{children:"Address 2"}),e.jsx("th",{children:"City"}),e.jsx("th",{children:"State/Province"}),e.jsx("th",{children:"Country"}),e.jsx("th",{children:"Postal Code"}),e.jsx("th",{children:"Phone Number"}),e.jsx("th",{children:"Website"}),e.jsx("th",{children:"Hole Count"}),e.jsx("th",{children:"Course Type"}),e.jsx("th",{children:"Drift Enabled"}),e.jsx("th",{children:"Â "})]})}),e.jsx("tbody",{children:d.map(t=>e.jsxs("tr",{children:[e.jsx("td",{children:r(t.name)}),e.jsx("td",{children:r(t.address1)}),e.jsx("td",{children:r(t.address2)}),e.jsx("td",{children:r(t.city)}),e.jsx("td",{children:r(t.stateProvince)}),e.jsx("td",{children:r(t.country)}),e.jsx("td",{children:r(t.postalCode)}),e.jsx("td",{children:r(t.phoneNumber)}),e.jsx("td",{children:r(t.website)}),e.jsx("td",{children:r(t.holeCount)}),e.jsx("td",{children:h(t.courseType)}),e.jsx("td",{children:t.driftEnabled?"Yes":"No"}),e.jsx("td",{children:e.jsxs("nav",{className:"rw-table-actions",children:[e.jsx(s.Link,{to:s.routes.tournaments({golfClubId:t.id}),title:"Show Food & Bev Orders",className:"rw-button rw-button-small rw-button-grey",children:"Tournaments"}),e.jsx(s.Link,{to:s.routes.foodbevOrders({golfClubId:t.id}),title:"Show Food & Bev Orders",className:"rw-button rw-button-small rw-button-grey",children:"Food & Bev Orders"}),e.jsx(s.Link,{to:s.routes.foodbevCategories({golfClubId:t.id}),title:"Show Food & Bev Categories",className:"rw-button rw-button-small rw-button-grey",children:"Food & Bev Categories"}),e.jsx(s.Link,{to:s.routes.golfClubTeeBoxes({id:t.id}),title:"Show golfClub "+t.id+" detail",className:"rw-button rw-button-small rw-button-grey",children:"Tee Boxes"}),e.jsx(s.Link,{to:s.routes.golfClub({id:t.id}),title:"Show golfClub "+t.id+" detail",className:"rw-button rw-button-small rw-button-grey",children:"Show"}),e.jsx(s.Link,{to:s.routes.editGolfClub({id:t.id}),title:"Edit golfClub "+t.id,className:"rw-button rw-button-small rw-button-blue",children:"Edit"}),e.jsx("button",{type:"button",title:"Delete golfClub "+t.id,className:"rw-button rw-button-small rw-button-red",onClick:()=>u(t.id),children:"Delete"})]})})]},t.id))})]})})},a=n` 8 query FindGolfClubs { 9 golfClubs { 10 id 11 name 12 address1 13 address2 14 city 15 stateProvince 16 country 17 postalCode 18 phoneNumber 19 website 20 holeCount 21 courseType 22 latitude 23 longitude 24 driftEnabled 25 courseDescription 26 courseStartMessageTitle 27 courseStartMessageDescription 28 active 29 createdAt 30 updatedAt 31 } 32 } 33`,j=()=>e.jsx("div",{children:"Loading..."}),m=({golfClubs:d})=>e.jsx(l,{golfClubs:d}),b=({error:d})=>e.jsx("div",{className:"rw-cell-error",children:d==null?void 0:d.message}),w=({golfClubs:d})=>e.jsx(l,{golfClubs:d}),p=i.createCell({QUERY:a,Loading:j,Empty:m,Failure:b,Success:w,displayName:"GolfClubsCell"}),E=()=>e.jsx(p,{});export{E 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.