PageSourceSearch

https://driftgolf-qa.netlify.app/assets/TournamentPlayersPage-2a8a58a0.js

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

1import{d as o,j as e,a}from"./index-4ce00ee7.js";import{g as d}from"./index-7de85521.js";import{t as i}from"./index-51f3a61d.js";import{t as r,b as x}from"./formatters-cb9ccf71.js";const j=d`
2  mutation DeleteTournamentPlayerMutation($id: String!) {
3    deleteTournamentPlayer(id: $id) {
4      id
5    }
6  }
7`,u=({tournamentPlayers:s})=>{const[m]=o.useMutation(j,{onCompleted:()=>{i.toast.success("TournamentPlayer deleted")},onError:t=>{i.toast.error(t.message)},refetchQueries:[{query:c}],awaitRefetchQueries:!0}),h=t=>{confirm("Are you sure you want to delete tournamentPlayer "+t+"?")&&m({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:"Golf Club"}),e.jsx("th",{children:"Tournament"}),e.jsx("th",{children:"Player"}),e.jsx("th",{children:"Player status"}),e.jsx("th",{children:" "})]})}),e.jsx("tbody",{children:s.map(t=>{var n,l;return e.jsxs("tr",{children:[e.jsx("td",{children:r(t.GolfClub.name)}),e.jsx("td",{children:r(t.Tournament.name)}),e.jsx("td",{children:r((n=t.GameplayUser)==null?void 0:n.firstName)+" "+r((l=t.GameplayUser)==null?void 0:l.lastName)}),e.jsx("td",{children:x(t.playerStatus)}),e.jsx("td",{children:e.jsxs("nav",{className:"rw-table-actions",children:[e.jsx(a.Link,{to:a.routes.tournamentPlayer({id:t.id}),title:"Show tournamentPlayer "+t.id+" detail",className:"rw-button rw-button-small",children:"Show"}),e.jsx(a.Link,{to:a.routes.editTournamentPlayer({id:t.id}),title:"Edit tournamentPlayer "+t.id,className:"rw-button rw-button-small rw-button-blue",children:"Edit"}),e.jsx("button",{type:"button",title:"Delete tournamentPlayer "+t.id,className:"rw-button rw-button-small rw-button-red",onClick:()=>h(t.id),children:"Delete"})]})})]},t.id)})})]})})},c=d`
8  query FindTournamentPlayers($tournamentId: String) {
9    tournamentPlayers(tournamentId: $tournamentId) {
10      id
11      golfClubId
12      tournamentId
13      gameplayUserId
14      playerStatus
15      active
16      createdAt
17      updatedAt
18      GolfClub {
19        name
20      }
21      Tournament {
22        name
23      }
24      GameplayUser {
25        firstName
26        lastName
27      }
28    }
29  }
30`,b=()=>e.jsx("div",{children:"Loading..."}),p=({tournamentPlayers:s})=>e.jsx(u,{tournamentPlayers:s}),y=({error:s})=>e.jsx("div",{className:"rw-cell-error",children:s==null?void 0:s.message}),w=({tournamentPlayers:s})=>e.jsx(u,{tournamentPlayers:s}),T=o.createCell({QUERY:c,Loading:b,Empty:p,Failure:y,Success:w,displayName:"TournamentPlayersCell"}),C=({tournamentId:s})=>e.jsx(T,{tournamentId:s});export{C 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.