Add straight up / net handicap option for skins games

When creating a skins game, players can now choose between straight up
(gross scores) or net scoring (strokes subtracted per hole based on
playing handicap and stroke index). Net mode is stored on the game and
applied in both the live scorecard and the summary.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Rolf
2026-03-23 21:16:10 +01:00
parent 6317422316
commit 2c0717948a
5 changed files with 44 additions and 10 deletions
+18
View File
@@ -30,6 +30,7 @@
carryoverEnabled: true,
skinValue: '',
skinDoubleBackNine: false,
skinsNet: false,
holesCount: '',
selectedPlayers: ['{{ user.id }}'],
selectedTees: {},
@@ -104,6 +105,19 @@
</label>
</div>
<div x-show="format === 'skins'" style="margin-top:0.75rem; display:flex; flex-direction:column; gap:0.5rem;">
<input type="hidden" name="skins_net" :value="skinsNet ? '1' : '0'">
<div style="display:flex; gap:0.75rem;">
<label class="radio-card" style="flex:1;">
<input type="radio" name="_skins_mode" value="0" checked
@change="skinsNet = false">
<span>Straight up</span>
</label>
<label class="radio-card" style="flex:1;">
<input type="radio" name="_skins_mode" value="1"
@change="skinsNet = true">
<span>Net (handicap)</span>
</label>
</div>
<label style="display:flex; align-items:center; gap:0.5rem; cursor:pointer;">
<input type="checkbox" name="carryover" value="1" checked style="width:auto;"
@change="carryoverEnabled = $event.target.checked">
@@ -268,6 +282,10 @@
<span class="confirm-label">Format</span>
<span class="confirm-value" x-text="formatLabel()"></span>
</div>
<div class="confirm-row" x-show="format === 'skins'">
<span class="confirm-label">Scoring</span>
<span class="confirm-value" x-text="skinsNet ? 'Net (handicap)' : 'Straight up'"></span>
</div>
<div class="confirm-row" x-show="format === 'skins'">
<span class="confirm-label">Carryover</span>
<span class="confirm-value" x-text="carryoverEnabled ? 'Yes' : 'No'"></span>