diff --git a/availabili.tf/src/components/PlayerCard.vue b/availabili.tf/src/components/PlayerCard.vue index 9403c1e..f13a501 100644 --- a/availabili.tf/src/components/PlayerCard.vue +++ b/availabili.tf/src/components/PlayerCard.vue @@ -37,11 +37,11 @@ function onClick() { rosterStore.selectPlayerForRole(undefined, props.roleTitle); } else { if (props.isRinger) { - const ringerPlayer: PlayerTeamRole = { - steamId: -1, + const ringerPlayer: PlayerTeamRoleFlat = { + steamId: "0", name: "Ringer", - role: props.roleTitle, - main: false, + role: props.roleTitle ?? "", + isMain: false, availability: 1, playtime: -1, }; diff --git a/availabili.tf/src/components/PlayerTeamCard.vue b/availabili.tf/src/components/PlayerTeamCard.vue index 98796c2..ae1b360 100644 --- a/availabili.tf/src/components/PlayerTeamCard.vue +++ b/availabili.tf/src/components/PlayerTeamCard.vue @@ -59,6 +59,10 @@ function updateRoles() { teamsStore.updateRoles(props.team.id, props.player.steamId, updatedRoles.value); } +function cancelEdit() { + isEditing.value = false; +} + const isUnavailable = computed(() => { return props.player?.availability[0] == 0 && props.player?.availability[1] == 0; @@ -126,7 +130,7 @@ const rightIndicator = computed(() => { - +
{
- + {{ player.playtime.toFixed(1) }} hours - +