diff --git a/availabili.tf/src/components/AvailabilityGrid.vue b/availabili.tf/src/components/AvailabilityGrid.vue
index 22b2183..cd1b763 100644
--- a/availabili.tf/src/components/AvailabilityGrid.vue
+++ b/availabili.tf/src/components/AvailabilityGrid.vue
@@ -9,6 +9,8 @@ const model = defineModel();
const selectedTime = defineModel("selectedTime");
+const selectedIndex = defineModel("selectedIndex");
+
const hoveredIndex = defineModel("hoveredIndex");
const props = defineProps({
@@ -156,6 +158,7 @@ function onSlotClick(dayIndex, hour) {
}
selectedTime.value = getTimeAtCell(dayIndex, hour);
+ scheduleStore.selectIndex(24 * dayIndex + hour);
}
function onKeyUp($event) {
diff --git a/availabili.tf/src/components/EventList.vue b/availabili.tf/src/components/EventList.vue
index 803b17e..b7bb694 100644
--- a/availabili.tf/src/components/EventList.vue
+++ b/availabili.tf/src/components/EventList.vue
@@ -1,9 +1,10 @@
@@ -12,7 +13,20 @@ const props = defineProps<{
- No upcoming events.
+
+ No upcoming events. Create one in the
+
+ schedule
+
+ page.
+
diff --git a/availabili.tf/src/components/LogsTfIntegrationForm.vue b/availabili.tf/src/components/LogsTfIntegrationForm.vue
index 832894c..cdba23d 100644
--- a/availabili.tf/src/components/LogsTfIntegrationForm.vue
+++ b/availabili.tf/src/components/LogsTfIntegrationForm.vue
@@ -28,7 +28,7 @@ function disableIntegration() {
logs.tf Auto-Tracking
- Automatically fetch and track match history from logs.tf.
+ Automatically fetch and track match history from logs.tf. (CURRENTLY NOT IMPLEMENTED)
logs.tf API key (optional)
diff --git a/availabili.tf/src/components/PlayerTeamCard.vue b/availabili.tf/src/components/PlayerTeamCard.vue
index a67ec33..c7b74ea 100644
--- a/availabili.tf/src/components/PlayerTeamCard.vue
+++ b/availabili.tf/src/components/PlayerTeamCard.vue
@@ -215,7 +215,7 @@ const rightIndicator = computed(() => {
}
.player-card > td {
- padding: 1em 2em;
+ padding: 0.5em 1em;
}
.player-card h3 {
@@ -314,4 +314,10 @@ a.player-name:hover {
.edit-group > button.editing {
opacity: 1;
}
+
+@media (max-width: 1024px) {
+ .player-card > td {
+ padding: 0.5em 0em;
+ }
+}
diff --git a/availabili.tf/src/components/ProfileDropdown.vue b/availabili.tf/src/components/ProfileDropdown.vue
index 5dcdba7..d02194d 100644
--- a/availabili.tf/src/components/ProfileDropdown.vue
+++ b/availabili.tf/src/components/ProfileDropdown.vue
@@ -33,10 +33,10 @@ function logout() {
-
+
diff --git a/availabili.tf/src/components/SchedulePlayerList.vue b/availabili.tf/src/components/SchedulePlayerList.vue
index 11e4d3d..71d842a 100644
--- a/availabili.tf/src/components/SchedulePlayerList.vue
+++ b/availabili.tf/src/components/SchedulePlayerList.vue
@@ -15,11 +15,20 @@ const isTeamTzLocal = computed(() => {
return selectedTimeTz.value.utcOffset() == props.selectedTime.utcOffset();
});
-const props = defineProps({
- selectedTime: Object
-});
+//const props = defineProps({
+// selectedTime: Object
+//});
+
+const props = defineProps<{
+ selectedTime?: moment.Moment;
+ selectedIndex?: number;
+}>();
function scheduleRoster() {
+ if (!props.selectedTime) {
+ return;
+ }
+
router.push({
name: "roster-builder",
params: {
@@ -39,19 +48,20 @@ function scheduleRoster() {
:player="record"
/>
-
-
-
- {{ selectedTime.format("L LT z") }}
-
-
- {{ selectedTimeTz.format("L LT z") }}
-
-
+
+
+ {{ selectedTime.format("L LT z") }}
+
+
+ {{ selectedTimeTz.format("L LT z") }}
+
+
+ Select a time to schedule
+
diff --git a/availabili.tf/src/components/SchedulePlayerListItem.vue b/availabili.tf/src/components/SchedulePlayerListItem.vue
index 7bd9a0a..13d7c83 100644
--- a/availabili.tf/src/components/SchedulePlayerListItem.vue
+++ b/availabili.tf/src/components/SchedulePlayerListItem.vue
@@ -7,9 +7,16 @@ const scheduleStore = useScheduleStore();
const hoveredIndex = computed(() => scheduleStore.hoveredIndex);
+const selectedIndex = computed(() => scheduleStore.selectedIndex);
+
const availabilityAtHoveredIndex = computed(() => {
- if (hoveredIndex.value && props.player?.availability) {
- return props.player.availability[hoveredIndex.value] ?? 0;
+ if (props.player?.availability) {
+ if (hoveredIndex.value) {
+ return props.player.availability[hoveredIndex.value] ?? 0;
+ }
+ if (scheduleStore.selectedIndexAvailability[props.player.steamId] != undefined) {
+ return scheduleStore.selectedIndexAvailability[props.player.steamId] ?? 0;
+ }
}
return undefined;
});
diff --git a/availabili.tf/src/stores/schedule.ts b/availabili.tf/src/stores/schedule.ts
index d047981..b212e23 100644
--- a/availabili.tf/src/stores/schedule.ts
+++ b/availabili.tf/src/stores/schedule.ts
@@ -60,7 +60,16 @@ export const useScheduleStore = defineStore("schedule", () => {
const selectedMembers = reactive<{ [id: string]: boolean }>({ });
- const hoveredIndex: Ref = ref();
+ const hoveredIndex = ref();
+ const selectedIndexAvailability = ref<{ [id: string]: number; }>({ });
+
+ function selectIndex(index: number) {
+ playerAvailability.value.forEach((value) => {
+ if (value.availability) {
+ selectedIndexAvailability.value[value.steamId] = value.availability[index] ?? 0;
+ }
+ });
+ }
const team = ref();
@@ -83,10 +92,12 @@ export const useScheduleStore = defineStore("schedule", () => {
}
watch(dateStart, () => {
+ selectedIndexAvailability.value = { };
fetchTeamSchedule();
});
watch(team, () => {
+ selectedIndexAvailability.value = { };
dateStart.value = getWindowStart(team.value);
console.log(dateStart.value);
});
@@ -145,6 +156,8 @@ export const useScheduleStore = defineStore("schedule", () => {
hoveredMember,
selectedMembers,
hoveredIndex,
+ selectedIndexAvailability,
+ selectIndex,
fetchSchedule,
fetchTeamSchedule,
saveSchedule,
diff --git a/availabili.tf/src/views/ScheduleView.vue b/availabili.tf/src/views/ScheduleView.vue
index 4a89faa..046f186 100644
--- a/availabili.tf/src/views/ScheduleView.vue
+++ b/availabili.tf/src/views/ScheduleView.vue
@@ -27,6 +27,7 @@ const availability = schedule.availability;
const selectionMode = ref(1);
const selectedTime = ref(undefined);
+const selectedIndex = ref(undefined);
const availabilityOverlay = computed(() => schedule.overlay);