From 8bef73575692619633d0ff4bbf4ffc964d63dd80 Mon Sep 17 00:00:00 2001 From: HumanoidSandvichDispenser Date: Sun, 24 Nov 2024 15:45:42 -0800 Subject: [PATCH] Improve user experience --- availabili.tf/src/components/PlayerCard.vue | 8 ++++---- availabili.tf/src/components/PlayerTeamCard.vue | 15 +++++++++++---- availabili.tf/src/stores/schedule.test.ts | 2 ++ 3 files changed, 17 insertions(+), 8 deletions(-) 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 - +