Fixed attendance button outlines
This commit is contained in:
@@ -26,13 +26,13 @@ const activeEvent = ref<CalendarEvent | null>(null);
|
|||||||
// });
|
// });
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => route.params.id,
|
() => route.params.id,
|
||||||
async (id) => {
|
async (id) => {
|
||||||
if (!id) return;
|
if (!id) return;
|
||||||
activeEvent.value = await getCalendarEvent(Number(id));
|
activeEvent.value = await getCalendarEvent(Number(id));
|
||||||
loaded.value = true;
|
loaded.value = true;
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
@@ -71,7 +71,7 @@ const myAttendance = computed<CalendarSignup | null>(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
async function setAttendance(state: CalendarAttendance) {
|
async function setAttendance(state: CalendarAttendance) {
|
||||||
setCalendarEventAttendance(activeEvent.value.id, state);
|
await setCalendarEventAttendance(activeEvent.value.id, state);
|
||||||
//refresh event data
|
//refresh event data
|
||||||
activeEvent.value = await getCalendarEvent(activeEvent.value.id);
|
activeEvent.value = await getCalendarEvent(activeEvent.value.id);
|
||||||
}
|
}
|
||||||
@@ -98,10 +98,10 @@ async function setAttendance(state: CalendarAttendance) {
|
|||||||
:class="myAttendance?.status === CalendarAttendance.Attending ? 'border-2 border-primary text-primary' : ''"
|
:class="myAttendance?.status === CalendarAttendance.Attending ? 'border-2 border-primary text-primary' : ''"
|
||||||
@click="setAttendance(CalendarAttendance.Attending)">Going</Button>
|
@click="setAttendance(CalendarAttendance.Attending)">Going</Button>
|
||||||
<Button variant="outline"
|
<Button variant="outline"
|
||||||
:class="myAttendance?.status === CalendarAttendance.Maybe ? 'border-2 border-primary' : ''"
|
:class="myAttendance?.status === CalendarAttendance.Maybe ? 'border-2 !border-l-2 border-primary text-primary' : ''"
|
||||||
@click="setAttendance(CalendarAttendance.Maybe)">Maybe</Button>
|
@click="setAttendance(CalendarAttendance.Maybe)">Maybe</Button>
|
||||||
<Button variant="outline"
|
<Button variant="outline"
|
||||||
:class="myAttendance?.status === CalendarAttendance.NotAttending ? 'border-2 border-primary' : ''"
|
:class="myAttendance?.status === CalendarAttendance.NotAttending ? 'border-2 !border-l-2 border-primary text-primary' : ''"
|
||||||
@click="setAttendance(CalendarAttendance.NotAttending)">Declined</Button>
|
@click="setAttendance(CalendarAttendance.NotAttending)">Declined</Button>
|
||||||
</ButtonGroup>
|
</ButtonGroup>
|
||||||
</section>
|
</section>
|
||||||
@@ -121,7 +121,7 @@ async function setAttendance(state: CalendarAttendance) {
|
|||||||
<span class="inline-flex items-center gap-1.5 rounded-md border px-2 py-1 text-xs">
|
<span class="inline-flex items-center gap-1.5 rounded-md border px-2 py-1 text-xs">
|
||||||
<User class="size-3.5 opacity-80" />
|
<User class="size-3.5 opacity-80" />
|
||||||
<span class="font-medium">Created by: {{ activeEvent.creator_name || "Unknown User"
|
<span class="font-medium">Created by: {{ activeEvent.creator_name || "Unknown User"
|
||||||
}}</span>
|
}}</span>
|
||||||
</span>
|
</span>
|
||||||
</section>
|
</section>
|
||||||
<!-- Description -->
|
<!-- Description -->
|
||||||
|
|||||||
Reference in New Issue
Block a user