@@ -116,6 +128,13 @@ function onClick() {
.player-card .role-info {
text-align: left;
+ flex-grow: 1;
+}
+
+.role-info .subtitle {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
}
.player-card:hover {
diff --git a/availabili.tf/src/components/WeekSelectionBox.vue b/availabili.tf/src/components/WeekSelectionBox.vue
new file mode 100644
index 0000000..4201fbf
--- /dev/null
+++ b/availabili.tf/src/components/WeekSelectionBox.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
diff --git a/availabili.tf/src/stores/roster.ts b/availabili.tf/src/stores/roster.ts
index c45d0c2..3984c84 100644
--- a/availabili.tf/src/stores/roster.ts
+++ b/availabili.tf/src/stores/roster.ts
@@ -65,6 +65,14 @@ export const useRosterStore = defineStore("roster", () => {
availability: 2,
playtime: 47324,
},
+ {
+ steamId: 2083,
+ name: "IF_YOU_READ_THIS_",
+ role: "Demoman",
+ main: true,
+ availability: 1,
+ playtime: 32812,
+ },
{
steamId: 2842,
name: "BossOfThisGym",
@@ -142,14 +150,24 @@ export const useRosterStore = defineStore("roster", () => {
return availablePlayerRoles.value.filter((player) => player.availability == 1);
});
+ function comparator(p1: PlayerTeamRole, p2: PlayerTeamRole) {
+ // definitely available > can be available
+ let availabilityDiff = p1.availability - p2.availability;
+
+ // less playtime is preferred
+ let playtimeDiff = p1.playtime - p2.playtime;
+
+ return availabilityDiff || playtimeDiff;
+ }
+
const mainRoles = computed(() => {
return availablePlayerRoles.value.filter((player) => player.main)
- .sort((a, b) => b.playtime - a.playtime);
+ .sort(comparator);
});
const alternateRoles = computed(() => {
return availablePlayerRoles.value.filter((player) => !player.main)
- .sort((a, b) => b.playtime - a.playtime);
+ .sort(comparator);
});
const roleIcons = reactive({
diff --git a/availabili.tf/src/views/RosterBuilderView.vue b/availabili.tf/src/views/RosterBuilderView.vue
index c8108d5..036fe6b 100644
--- a/availabili.tf/src/views/RosterBuilderView.vue
+++ b/availabili.tf/src/views/RosterBuilderView.vue
@@ -24,11 +24,8 @@ const hasAlternates = computed(() => {
Aug. 13, 2036 @ 11:30 PM EST
-
-
+
+
diff --git a/availabili.tf/src/views/ScheduleView.vue b/availabili.tf/src/views/ScheduleView.vue
index 8e18d1d..abe10ee 100644
--- a/availabili.tf/src/views/ScheduleView.vue
+++ b/availabili.tf/src/views/ScheduleView.vue
@@ -1,8 +1,75 @@
- Master Schedule
+
+
+
+
+
+
+
+
+
+ You currently are not in any team to schedule for.
+
+
+