|
| 1 | +// Schema and uiSchema definitions |
| 2 | + |
| 3 | +const initialSchema = { |
| 4 | + title: 'Playvision Upload Match', |
| 5 | + type: 'object', |
| 6 | + properties: { |
| 7 | + clientTeam: { |
| 8 | + type: 'string', |
| 9 | + title: 'Client Team', |
| 10 | + enum: [] |
| 11 | + }, |
| 12 | + clientPlayer: { |
| 13 | + type: 'string', |
| 14 | + title: 'Client Player', |
| 15 | + enum: [] |
| 16 | + }, |
| 17 | + opponentTeam: { |
| 18 | + type: 'string', |
| 19 | + title: 'Opponent Team', |
| 20 | + enum: [] |
| 21 | + }, |
| 22 | + opponentPlayer: { |
| 23 | + type: 'string', |
| 24 | + title: 'Opponent Player' |
| 25 | + }, |
| 26 | + |
| 27 | + date: { |
| 28 | + type: 'string', |
| 29 | + title: 'Date', |
| 30 | + format: 'date' |
| 31 | + }, |
| 32 | + |
| 33 | + alreadyUploaded: { |
| 34 | + type: 'boolean', |
| 35 | + title: 'Already Uploaded on Upload-Match?' |
| 36 | + }, |
| 37 | + |
| 38 | + stats: { |
| 39 | + type: 'object', |
| 40 | + title: 'Match Stats', |
| 41 | + properties: { |
| 42 | + serviceWinners: { |
| 43 | + type: 'object', |
| 44 | + title: 'Service Winners', |
| 45 | + properties: { |
| 46 | + client: { type: 'number', title: 'Client' }, |
| 47 | + opponent: { type: 'number', title: 'Opponent' } |
| 48 | + } |
| 49 | + }, |
| 50 | + doubleFaults: { |
| 51 | + type: 'object', |
| 52 | + title: 'Double Faults', |
| 53 | + properties: { |
| 54 | + client: { type: 'number', title: 'Client' }, |
| 55 | + opponent: { type: 'number', title: 'Opponent' } |
| 56 | + } |
| 57 | + }, |
| 58 | + winners: { |
| 59 | + type: 'object', |
| 60 | + title: 'Winners', |
| 61 | + properties: { |
| 62 | + client: { type: 'number', title: 'Client' }, |
| 63 | + opponent: { type: 'number', title: 'Opponent' } |
| 64 | + } |
| 65 | + }, |
| 66 | + forehandWinners: { |
| 67 | + type: 'object', |
| 68 | + title: 'Forehand Winners', |
| 69 | + properties: { |
| 70 | + client: { type: 'number', title: 'Client' }, |
| 71 | + opponent: { type: 'number', title: 'Opponent' } |
| 72 | + } |
| 73 | + }, |
| 74 | + backhandWinners: { |
| 75 | + type: 'object', |
| 76 | + title: 'Backhand Winners', |
| 77 | + properties: { |
| 78 | + client: { type: 'number', title: 'Client' }, |
| 79 | + opponent: { type: 'number', title: 'Opponent' } |
| 80 | + } |
| 81 | + }, |
| 82 | + unforcedErrors: { |
| 83 | + type: 'object', |
| 84 | + title: 'Unforced Errors', |
| 85 | + properties: { |
| 86 | + client: { type: 'number', title: 'Client' }, |
| 87 | + opponent: { type: 'number', title: 'Opponent' } |
| 88 | + } |
| 89 | + }, |
| 90 | + forehandUnforcedErrors: { |
| 91 | + type: 'object', |
| 92 | + title: 'Forehand Unforced Errors', |
| 93 | + properties: { |
| 94 | + client: { type: 'number', title: 'Client' }, |
| 95 | + opponent: { type: 'number', title: 'Opponent' } |
| 96 | + } |
| 97 | + }, |
| 98 | + backhandUnforcedErrors: { |
| 99 | + type: 'object', |
| 100 | + title: 'Backhand Unforced Errors', |
| 101 | + properties: { |
| 102 | + client: { type: 'number', title: 'Client' }, |
| 103 | + opponent: { type: 'number', title: 'Opponent' } |
| 104 | + } |
| 105 | + }, |
| 106 | + firstServesIn: { |
| 107 | + type: 'object', |
| 108 | + title: '1st Serves In', |
| 109 | + properties: { |
| 110 | + client: { type: 'string', title: 'Client' }, |
| 111 | + opponent: { type: 'string', title: 'Opponent' } |
| 112 | + } |
| 113 | + }, |
| 114 | + secondServesIn: { |
| 115 | + type: 'object', |
| 116 | + title: '2nd Serves In', |
| 117 | + properties: { |
| 118 | + client: { type: 'string', title: 'Client' }, |
| 119 | + opponent: { type: 'string', title: 'Opponent' } |
| 120 | + } |
| 121 | + }, |
| 122 | + servePointsWon: { |
| 123 | + type: 'object', |
| 124 | + title: 'Serve Points Won', |
| 125 | + properties: { |
| 126 | + client: { type: 'string', title: 'Client' }, |
| 127 | + opponent: { type: 'string', title: 'Opponent' } |
| 128 | + } |
| 129 | + }, |
| 130 | + firstServesWon: { |
| 131 | + type: 'object', |
| 132 | + title: '1st Serves Won', |
| 133 | + properties: { |
| 134 | + client: { type: 'string', title: 'Client' }, |
| 135 | + opponent: { type: 'string', title: 'Opponent' } |
| 136 | + } |
| 137 | + }, |
| 138 | + secondServesWon: { |
| 139 | + type: 'object', |
| 140 | + title: '2nd Serves Won', |
| 141 | + properties: { |
| 142 | + client: { type: 'string', title: 'Client' }, |
| 143 | + opponent: { type: 'string', title: 'Opponent' } |
| 144 | + } |
| 145 | + }, |
| 146 | + breakPointsSaved: { |
| 147 | + type: 'object', |
| 148 | + title: 'Break Points Saved', |
| 149 | + properties: { |
| 150 | + client: { type: 'string', title: 'Client' }, |
| 151 | + opponent: { type: 'string', title: 'Opponent' } |
| 152 | + } |
| 153 | + }, |
| 154 | + returnPointsWon: { |
| 155 | + type: 'object', |
| 156 | + title: 'Return Points Won', |
| 157 | + properties: { |
| 158 | + client: { type: 'string', title: 'Client' }, |
| 159 | + opponent: { type: 'string', title: 'Opponent' } |
| 160 | + } |
| 161 | + }, |
| 162 | + firstReturnsWon: { |
| 163 | + type: 'object', |
| 164 | + title: '1st Returns Won', |
| 165 | + properties: { |
| 166 | + client: { type: 'string', title: 'Client' }, |
| 167 | + opponent: { type: 'string', title: 'Opponent' } |
| 168 | + } |
| 169 | + }, |
| 170 | + secondReturnsWon: { |
| 171 | + type: 'object', |
| 172 | + title: '2nd Returns Won', |
| 173 | + properties: { |
| 174 | + client: { type: 'string', title: 'Client' }, |
| 175 | + opponent: { type: 'string', title: 'Opponent' } |
| 176 | + } |
| 177 | + }, |
| 178 | + breakPointsWon: { |
| 179 | + type: 'object', |
| 180 | + title: 'Break Points Won', |
| 181 | + properties: { |
| 182 | + client: { type: 'string', title: 'Client' }, |
| 183 | + opponent: { type: 'string', title: 'Opponent' } |
| 184 | + } |
| 185 | + }, |
| 186 | + setPointsSaved: { |
| 187 | + type: 'object', |
| 188 | + title: 'Set Points Saved', |
| 189 | + properties: { |
| 190 | + client: { type: 'string', title: 'Client' }, |
| 191 | + opponent: { type: 'string', title: 'Opponent' } |
| 192 | + } |
| 193 | + }, |
| 194 | + totalPointsWon: { |
| 195 | + type: 'object', |
| 196 | + title: 'Total Points Won', |
| 197 | + properties: { |
| 198 | + client: { type: 'string', title: 'Client' }, |
| 199 | + opponent: { type: 'string', title: 'Opponent' } |
| 200 | + } |
| 201 | + } |
| 202 | + } |
| 203 | + }, |
| 204 | + |
| 205 | + shotStats: { |
| 206 | + type: 'object', |
| 207 | + title: 'Shot Stats', |
| 208 | + properties: { |
| 209 | + serves: { |
| 210 | + type: 'object', |
| 211 | + title: 'Serves', |
| 212 | + properties: { |
| 213 | + adSide: { |
| 214 | + type: 'object', |
| 215 | + title: 'Ad Side', |
| 216 | + properties: { |
| 217 | + servesIn: { type: 'number', title: 'Serves In %' }, |
| 218 | + avgSpeed: { type: 'number', title: 'Average Speed (mph)' } |
| 219 | + } |
| 220 | + }, |
| 221 | + deuceSide: { |
| 222 | + type: 'object', |
| 223 | + title: 'Deuce Side', |
| 224 | + properties: { |
| 225 | + servesIn: { type: 'number', title: 'Serves In %' }, |
| 226 | + avgSpeed: { type: 'number', title: 'Average Speed (mph)' } |
| 227 | + } |
| 228 | + } |
| 229 | + } |
| 230 | + }, |
| 231 | + returns: { |
| 232 | + type: 'object', |
| 233 | + title: 'Returns', |
| 234 | + properties: { |
| 235 | + adSide: { |
| 236 | + type: 'object', |
| 237 | + title: 'Ad Side', |
| 238 | + properties: { |
| 239 | + returnsIn: { type: 'number', title: 'Returns In %' }, |
| 240 | + avgSpeed: { type: 'number', title: 'Average Speed (mph)' } |
| 241 | + } |
| 242 | + }, |
| 243 | + deuceSide: { |
| 244 | + type: 'object', |
| 245 | + title: 'Deuce Side', |
| 246 | + properties: { |
| 247 | + returnsIn: { type: 'number', title: 'Returns In %' }, |
| 248 | + avgSpeed: { type: 'number', title: 'Average Speed (mph)' } |
| 249 | + } |
| 250 | + } |
| 251 | + } |
| 252 | + }, |
| 253 | + groundstrokes: { |
| 254 | + type: 'object', |
| 255 | + title: 'Groundstrokes', |
| 256 | + properties: { |
| 257 | + forehands: { |
| 258 | + type: 'object', |
| 259 | + title: 'Forehands', |
| 260 | + properties: { |
| 261 | + inPercentage: { type: 'number', title: 'In %' }, |
| 262 | + avgSpeed: { type: 'number', title: 'Average Speed (mph)' } |
| 263 | + } |
| 264 | + }, |
| 265 | + backhands: { |
| 266 | + type: 'object', |
| 267 | + title: 'Backhands', |
| 268 | + properties: { |
| 269 | + inPercentage: { type: 'number', title: 'In %' }, |
| 270 | + avgSpeed: { type: 'number', title: 'Average Speed (mph)' } |
| 271 | + } |
| 272 | + } |
| 273 | + } |
| 274 | + } |
| 275 | + } |
| 276 | + } |
| 277 | + } |
| 278 | +} |
| 279 | + |
| 280 | +const uiSchema = { |
| 281 | + stats: { |
| 282 | + 'ui:options': { |
| 283 | + collapsed: true |
| 284 | + } |
| 285 | + }, |
| 286 | + shotStats: { |
| 287 | + 'ui:options': { |
| 288 | + collapsed: true |
| 289 | + } |
| 290 | + } |
| 291 | +} |
| 292 | + |
| 293 | +export { initialSchema, uiSchema } |
0 commit comments