PageSourceSearch

https://driftgolf-qa.netlify.app/assets/TournamentPage-f10e7efc.js

js driftgolf-qa.netlify.app collected 2026-10-03 10:41:07 UTC 2,632 bytes, 22 lines download raw bytes

1import{d as i,a as d,j as e}from"./index-4ce00ee7.js";import{g as a}from"./index-7de85521.js";import{t as r}from"./index-51f3a61d.js";import{a as n,b as o}from"./formatters-cb9ccf71.js";const h=a`
2  mutation DeleteTournamentMutation($id: String!) {
3    deleteTournament(id: $id) {
4      id
5    }
6  }
7`,x=({tournament:t})=>{const[l]=i.useMutation(h,{onCompleted:()=>{r.toast.success("Tournament deleted"),d.navigate(d.routes.tournaments())},onError:s=>{r.toast.error(s.message)}}),c=s=>{confirm("Are you sure you want to delete tournament "+s+"?")&&l({variables:{id:s}})};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"rw-segment",children:[e.jsx("header",{className:"rw-segment-header",children:e.jsxs("h2",{className:"rw-heading rw-heading-secondary",children:["Tournament ",t.id," Detail"]})}),e.jsx("table",{className:"rw-table",children:e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsx("th",{children:"Id"}),e.jsx("td",{children:t.id})]}),e.jsxs("tr",{children:[e.jsx("th",{children:"Golf club id"}),e.jsx("td",{children:t.golfClubId})]}),e.jsxs("tr",{children:[e.jsx("th",{children:"Name"}),e.jsx("td",{children:t.name})]}),e.jsxs("tr",{children:[e.jsx("th",{children:"Description"}),e.jsx("td",{children:t.description})]}),e.jsxs("tr",{children:[e.jsx("th",{children:"Start date"}),e.jsx("td",{children:n(t.startDate)})]}),e.jsxs("tr",{children:[e.jsx("th",{children:"End date"}),e.jsx("td",{children:n(t.endDate)})]}),e.jsxs("tr",{children:[e.jsx("th",{children:"Status"}),e.jsx("td",{children:o(t.status)})]}),e.jsxs("tr",{children:[e.jsx("th",{children:"Created at"}),e.jsx("td",{children:n(t.createdAt)})]}),e.jsxs("tr",{children:[e.jsx("th",{children:"Updated at"}),e.jsx("td",{children:n(t.updatedAt)})]})]})})]}),e.jsxs("nav",{className:"rw-button-group",children:[e.jsx(d.Link,{to:d.routes.editTournament({id:t.id}),className:"rw-button rw-button-blue",children:"Edit"}),e.jsx("button",{type:"button",className:"rw-button rw-button-red",onClick:()=>c(t.id),children:"Delete"})]})]})},j=a`
8  query FindTournamentById($id: String!) {
9    tournament: tournament(id: $id) {
10      id
11      golfClubId
12      name
13      description
14      startDate
15      endDate
16      status
17      active
18      createdAt
19      updatedAt
20    }
21  }
22`,u=()=>e.jsx("div",{children:"Loading..."}),m=()=>e.jsx("div",{children:"Tournament not found"}),g=({error:t})=>e.jsx("div",{className:"rw-cell-error",children:t==null?void 0:t.message}),p=({tournament:t})=>e.jsx(x,{tournament:t}),T=i.createCell({QUERY:j,Loading:u,Empty:m,Failure:g,Success:p,displayName:"TournamentCell"}),E=({id:t})=>e.jsx(T,{id:t});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.