Merge commit '0919997e0f90ec5463f63f470213acd7e39493af' into #54-Application-tweaks
This commit is contained in:
@@ -3,15 +3,14 @@ import { ref, watch, nextTick, computed, onMounted } from 'vue'
|
||||
import FullCalendar from '@fullcalendar/vue3'
|
||||
import dayGridPlugin from '@fullcalendar/daygrid'
|
||||
import interactionPlugin from '@fullcalendar/interaction'
|
||||
import { X, Clock, MapPin, User, ListTodo, ChevronLeft, ChevronRight, Plus } from 'lucide-vue-next'
|
||||
import { ChevronLeft, ChevronRight, Plus } from 'lucide-vue-next'
|
||||
import CreateCalendarEvent from '@/components/calendar/CreateCalendarEvent.vue'
|
||||
import { getCalendarEvent, getMonthCalendarEvents } from '@/api/calendar'
|
||||
import { CalendarEvent, CalendarEventShort } from '@shared/types/calendar'
|
||||
import { Calendar } from '@fullcalendar/core'
|
||||
import { CalendarEvent } from '@shared/types/calendar'
|
||||
import ViewCalendarEvent from '@/components/calendar/ViewCalendarEvent.vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import { useCalendarEvents } from '@/composables/useCalendarEvents'
|
||||
import { useCalendarNavigation } from '@/composables/useCalendarNavigation'
|
||||
import { useUserStore } from '@/stores/user'
|
||||
|
||||
const monthLabels = [
|
||||
'January', 'February', 'March', 'April', 'May', 'June',
|
||||
@@ -24,13 +23,14 @@ function api() {
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const userStore = useUserStore();
|
||||
|
||||
function buildFullDate(month: number, year: number): Date {
|
||||
return new Date(year, month, 1); //default to first of month
|
||||
}
|
||||
|
||||
const { selectedMonth, selectedYear, years, goPrev, goNext, goToday, onDatesSet, goToSelectedDate } = useCalendarNavigation(api)
|
||||
const { events, loadEvents} = useCalendarEvents(selectedMonth, selectedYear);
|
||||
const { events, loadEvents } = useCalendarEvents(selectedMonth, selectedYear);
|
||||
|
||||
const panelOpen = ref(false)
|
||||
const activeEvent = ref<CalendarEvent | null>(null)
|
||||
@@ -48,6 +48,7 @@ const dialogRef = ref<any>(null)
|
||||
|
||||
// NEW: handle day/time slot clicks to start creating an event
|
||||
function onDateClick(arg: { dateStr: string }) {
|
||||
if (!userStore.isLoggedIn) return;
|
||||
dialogRef.value?.openDialog(arg.dateStr);
|
||||
// For now, just open the panel with a draft payload.
|
||||
// activeEvent.value = {
|
||||
@@ -202,7 +203,7 @@ onMounted(() => {
|
||||
@click="goToday">
|
||||
Today
|
||||
</button>
|
||||
<button
|
||||
<button v-if="userStore.isLoggedIn"
|
||||
class="cursor-pointer ml-1 inline-flex items-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-sm text-primary-foreground hover:opacity-90"
|
||||
@click="onCreateEvent">
|
||||
<Plus class="h-4 w-4" />
|
||||
@@ -216,7 +217,8 @@ onMounted(() => {
|
||||
<aside v-if="panelOpen"
|
||||
class="3xl:w-lg 2xl:w-md border-l bg-card text-foreground flex flex-col overflow-auto scrollbar-themed"
|
||||
:style="{ height: 'calc(100vh - 61px)', position: 'sticky', top: '64px' }">
|
||||
<ViewCalendarEvent ref="eventViewRef" @close="() => { router.push('/calendar'); }" @reload="loadEvents()" @edit="(val) => {dialogRef.openDialog(null, 'edit', val)}">
|
||||
<ViewCalendarEvent ref="eventViewRef" @close="() => { router.push('/calendar'); }"
|
||||
@reload="loadEvents()" @edit="(val) => { dialogRef.openDialog(null, 'edit', val) }">
|
||||
</ViewCalendarEvent>
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
@@ -183,9 +183,9 @@ async function restartApp() {
|
||||
<li>When prompted, choose <em>“Yes”</em> to download all associated mods.</li>
|
||||
</ul>
|
||||
<p>
|
||||
<a href="https://www.guilded.gg/Iceberg-gaming/groups/v3j2vAP3/channels/6979335e-60f7-4ab9-9590-66df69367d1e/docs/2013948655"
|
||||
<a href="https://docs.iceberg-gaming.com/books/member-guides/page/new-member-setup-onboarding"
|
||||
class="text-primary underline" target="_blank">
|
||||
Click here for the full installation guide
|
||||
Click here for the full installation guide (Requires Sign-in)
|
||||
</a>
|
||||
</p>
|
||||
<!-- CONTACT SECTION -->
|
||||
@@ -223,7 +223,7 @@ async function restartApp() {
|
||||
our forums and introduce yourself.
|
||||
</p>
|
||||
<p>
|
||||
If you have any questions, feel free to reach out on TeamSpeak, Discord, or Guilded,
|
||||
If you have any questions, feel free to reach out on TeamSpeak or Discord
|
||||
someone
|
||||
will always be around to help.
|
||||
</p>
|
||||
|
||||
@@ -17,27 +17,24 @@ const showLOADialog = ref(false);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Dialog v-model:open="showLOADialog" v-on:update:open="showLOADialog = false">
|
||||
<DialogContent>
|
||||
<DialogHeader>
|
||||
<DialogTitle>Post LOA</DialogTitle>
|
||||
<DialogDescription>
|
||||
Post an LOA on behalf of a member.
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
<LoaForm :admin-mode="true" class="my-5 w-full"></LoaForm>
|
||||
<!-- <DialogFooter>
|
||||
<Button variant="secondary" @click="showLOADialog = false">Cancel</Button>
|
||||
<Button>Apply</Button>
|
||||
</DialogFooter> -->
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
|
||||
<div class="max-w-5xl mx-auto pt-10">
|
||||
<div class="flex justify-end mb-4">
|
||||
<Button @click="showLOADialog = true">Post LOA</Button>
|
||||
<div>
|
||||
<Dialog v-model:open="showLOADialog" v-on:update:open="showLOADialog = false">
|
||||
<DialogContent class="sm:max-w-fit">
|
||||
<DialogHeader>
|
||||
<DialogTitle>Post LOA</DialogTitle>
|
||||
<DialogDescription>
|
||||
Post an LOA on behalf of a member.
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
<LoaForm :admin-mode="true" class="my-3"></LoaForm>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
<div class="max-w-5xl mx-auto pt-10">
|
||||
<div class="flex justify-end mb-4">
|
||||
<Button @click="showLOADialog = true">Post LOA</Button>
|
||||
</div>
|
||||
<h1>LOA Log</h1>
|
||||
<LoaList :admin-mode="true"></LoaList>
|
||||
</div>
|
||||
<h1>LOA Log</h1>
|
||||
<LoaList></LoaList>
|
||||
</div>
|
||||
</template>
|
||||
@@ -2,6 +2,8 @@
|
||||
import LoaForm from '@/components/loa/loaForm.vue';
|
||||
import { useUserStore } from '@/stores/user';
|
||||
import { Member } from '@/api/member';
|
||||
import LoaList from '@/components/loa/loaList.vue';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const userStore = useUserStore();
|
||||
const user = userStore.user;
|
||||
@@ -13,8 +15,24 @@ const memberFull: Member = {
|
||||
status: null,
|
||||
status_date: null,
|
||||
};
|
||||
|
||||
const mode = ref<'submit' | 'view'>('submit')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<LoaForm class="m-10" :member="memberFull"></LoaForm>
|
||||
<div class="max-w-5xl mx-auto flex w-full flex-col mt-4 mb-10">
|
||||
<div class="mb-8">
|
||||
<p class="scroll-m-20 text-2xl font-semibold tracking-tight">Leave of Absence</p>
|
||||
<div class="pt-3">
|
||||
<div class="flex w-min *:px-10 pt-2 border-b *:w-full *:text-center *:pb-1 *:cursor-pointer">
|
||||
<label :class="mode === 'submit' ? 'border-b-3 border-foreground' : 'mb-[2px]'"
|
||||
@click="mode = 'submit'">Submit</label>
|
||||
<label :class="mode === 'view' ? 'border-b-3 border-foreground' : 'mb-[2px]'"
|
||||
@click="mode = 'view'">History</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<LoaForm v-if="mode === 'submit'" :member="memberFull"></LoaForm>
|
||||
<LoaList v-if="mode === 'view'" :admin-mode="false"></LoaList>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user