Compare commits

...

19 Commits

Author SHA1 Message Date
191bc6f428 Improved the admin post LOA dialog to function on mobile devices 2026-03-22 01:24:24 -04:00
87bdd30a19 Built mobile display for LOA List 2026-03-22 01:12:07 -04:00
bae5578afb Reworked spacing and layout to improve mobile experience 2026-03-21 23:58:12 -04:00
676e09aef5 Updated navigation system for new stuff 2026-03-21 23:22:41 -04:00
b40e4f3ec7 Merge remote-tracking branch 'Origin/main' into Mobile-Enhancements 2026-03-21 19:48:49 -04:00
b4ff7d4686 Merge pull request 'Allow recruiters to see admin pages' (#206) from Recruiter-Permission-Fix into main
All checks were successful
Testing Site CD / Update Development (push) Successful in 4m15s
Reviewed-on: #206
2026-03-21 18:42:29 -05:00
171e3b3137 Merge branch 'main' into Recruiter-Permission-Fix
All checks were successful
Pull Request CI / Merge Check (pull_request) Successful in 3m53s
2026-03-21 18:42:18 -05:00
dd2ac19e4a Allow recruiters to see admin pages
All checks were successful
Pull Request CI / Merge Check (pull_request) Successful in 4m0s
2026-03-21 19:44:57 -04:00
18ba9b576c Merge pull request 'Fixed error on posting admin comment' (#205) from Application-Admin-Comment-Fix into main
Some checks failed
Testing Site CD / Update Development (push) Has been cancelled
Reviewed-on: #205
2026-03-21 18:41:06 -05:00
6c85677e1b Fixed error on posting admin comment
All checks were successful
Pull Request CI / Merge Check (pull_request) Successful in 4m10s
2026-03-12 22:23:28 -04:00
adb5e3e137 Merge pull request 'Fixed styling issue on firefox' (#204) from Calendar-Firefox-Tweak into main
All checks were successful
Testing Site CD / Update Development (push) Successful in 3m52s
Live Site CD / Update Deployment (push) Successful in 4m1s
Reviewed-on: #204
2026-03-08 11:00:10 -05:00
1749c3e617 Fixed styling issue on firefox
All checks were successful
Pull Request CI / Merge Check (pull_request) Successful in 3m47s
2026-03-08 12:00:25 -04:00
52ee36be44 Merge pull request 'Added cache busting option for devs' (#203) from Developer-Page into main
All checks were successful
Testing Site CD / Update Development (push) Successful in 3m48s
Reviewed-on: #203
2026-03-08 09:34:27 -05:00
0cc327a9c4 Added cache busting option for devs
All checks were successful
Pull Request CI / Merge Check (pull_request) Successful in 3m44s
2026-03-08 10:34:29 -04:00
ef3cbbf370 Merge pull request 'Fixed member name filter to work by displayname or actualname' (#202) from Member-Management-Name-Fixes into main
All checks were successful
Testing Site CD / Update Development (push) Successful in 4m8s
Reviewed-on: #202
2026-03-08 09:01:51 -05:00
209d0cdf0f Fixed member name filter to work by displayname or actualname
All checks were successful
Pull Request CI / Merge Check (pull_request) Successful in 4m40s
2026-03-08 09:57:56 -04:00
0e37a8bc9c Improved promotion page readability on mobile 2026-01-17 00:54:53 -05:00
045de2fe98 Fixed the join button not showing while logged out 2026-01-17 00:23:27 -05:00
a1ca07e6fd Implemented new mobile navigation system 2026-01-16 23:42:13 -05:00
17 changed files with 587 additions and 141 deletions

View File

@@ -396,11 +396,11 @@ VALUES(?, ?, ?, 1);`
INNER JOIN members AS member ON member.id = app.poster_id INNER JOIN members AS member ON member.id = app.poster_id
WHERE app.id = ?; `; WHERE app.id = ?; `;
const comment = await conn.query(getSQL, [result.insertId]) const comment = await conn.query(getSQL, [result.insertId])
audit.record('application', 'comment_added', { actorId: user.id, targetId: appID }, { commentId: result.insertId }); audit.record('application', 'comment_added', { actorId: user.id, targetId: appID }, { commentId: Number(result.insertId) });
logger.info('app', "Admin application comment posted", { logger.info('app', "Admin application comment posted", {
application: appID, application: appID,
poster: user.id, poster: user.id,
comment: result.insertId, comment: Number(result.insertId),
}) })
res.status(201).json(comment[0]); res.status(201).json(comment[0]);

View File

@@ -7,7 +7,7 @@ import { requireLogin, requireMemberState, requireRole } from '../middleware/aut
import { getUserActiveLOA } from '../services/db/loaService'; import { getUserActiveLOA } from '../services/db/loaService';
import { getAllMembersLite, getMemberSettings, getMembersFull, getMembersLite, getUserData, getUserState, setUserSettings, getFilteredMembers, setUserState, getLastNonSuspendedState } from '../services/db/memberService'; import { getAllMembersLite, getMemberSettings, getMembersFull, getMembersLite, getUserData, getUserState, setUserSettings, getFilteredMembers, setUserState, getLastNonSuspendedState } from '../services/db/memberService';
import { getUserRoles, stripUserRoles } from '../services/db/rolesService'; import { getUserRoles, stripUserRoles } from '../services/db/rolesService';
import { memberSettings, MemberState, myData } from '@app/shared/types/member'; import { memberSettings, MemberState, myData, UserCacheBustResult } from '@app/shared/types/member';
import { Discharge } from '@app/shared/schemas/dischargeSchema'; import { Discharge } from '@app/shared/schemas/dischargeSchema';
import { Performance } from 'perf_hooks'; import { Performance } from 'perf_hooks';
@@ -211,6 +211,32 @@ router.post('/full/bulk', async (req: Request, res: Response) => {
} }
}) })
router.post('/cache/user/bust', [requireLogin, requireMemberState(MemberState.Member), requireRole('dev')], async (req: Request, res: Response) => {
try {
const clearedEntries = memberCache.Clear();
const payload: UserCacheBustResult = {
success: true,
clearedEntries,
bustedAt: new Date().toISOString(),
};
logger.info('app', 'User cache manually busted', {
actor: req.user.id,
clearedEntries,
});
return res.status(200).json(payload);
} catch (error) {
logger.error('app', 'Failed to bust user cache', {
caller: req.user?.id,
error: error instanceof Error ? error.message : String(error),
stack: error instanceof Error ? error.stack : undefined,
});
return res.status(500).json({ error: 'Failed to bust user cache' });
}
})
router.get('/:id', [requireLogin], async (req, res) => { router.get('/:id', [requireLogin], async (req, res) => {
const userId = req.params.id; const userId = req.params.id;

View File

@@ -16,4 +16,14 @@ export class CacheService<Key, Value> {
public Invalidate(key: Key): boolean { public Invalidate(key: Key): boolean {
return this.cacheMap.delete(key); return this.cacheMap.delete(key);
} }
public Size(): number {
return this.cacheMap.size;
}
public Clear(): number {
const priorSize = this.cacheMap.size;
this.cacheMap.clear();
return priorSize;
}
} }

View File

@@ -23,7 +23,8 @@ export async function getFilteredMembers(
} }
if (search) { if (search) {
whereClauses.push(`v.member_name LIKE ?`); whereClauses.push(`(v.member_name LIKE ? OR v.displayName LIKE ?)`);
params.push(`%${search}%`);
params.push(`%${search}%`); params.push(`%${search}%`);
} }

View File

@@ -51,3 +51,9 @@ export interface myData {
roles: Role[]; roles: Role[];
state: MemberState; state: MemberState;
} }
export interface UserCacheBustResult {
success: boolean;
clearedEntries: number;
bustedAt: string;
}

View File

@@ -1,5 +1,5 @@
import { Discharge } from "@shared/schemas/dischargeSchema"; import { Discharge } from "@shared/schemas/dischargeSchema";
import { memberSettings, Member, MemberLight, MemberCardDetails, PaginatedMembers, MemberState } from "@shared/types/member"; import { memberSettings, Member, MemberLight, MemberCardDetails, PaginatedMembers, MemberState, UserCacheBustResult } from "@shared/types/member";
// @ts-ignore // @ts-ignore
const addr = import.meta.env.VITE_APIHOST; const addr = import.meta.env.VITE_APIHOST;
@@ -158,3 +158,16 @@ export async function unsuspendMember(memberID: number): Promise<boolean> {
} }
return true; return true;
} }
export async function bustUserCache(): Promise<UserCacheBustResult> {
const response = await fetch(`${addr}/members/cache/user/bust`, {
credentials: 'include',
method: 'POST',
});
if (!response.ok) {
throw new Error('Failed to bust user cache');
}
return response.json();
}

View File

@@ -1,58 +1,193 @@
<script setup lang="ts"> <script setup lang="ts">
import { RouterLink } from 'vue-router'; import { RouterLink, useRouter } from 'vue-router';
import Separator from '../ui/separator/Separator.vue'; import Separator from '../ui/separator/Separator.vue';
import { Popover, PopoverContent, PopoverTrigger } from '../ui/popover'; import { Popover, PopoverContent, PopoverTrigger } from '../ui/popover';
import { import {
DropdownMenu, DropdownMenu,
DropdownMenuContent, DropdownMenuContent,
DropdownMenuItem, DropdownMenuItem,
DropdownMenuTrigger, DropdownMenuTrigger,
} from '../ui/dropdown-menu'; } from '../ui/dropdown-menu';
import { useUserStore } from '@/stores/user'; import { useUserStore } from '@/stores/user';
import Button from '../ui/button/Button.vue'; import Button from '../ui/button/Button.vue';
import NavigationMenu from '../ui/navigation-menu/NavigationMenu.vue'; import NavigationMenu from '../ui/navigation-menu/NavigationMenu.vue';
import NavigationMenuList from '../ui/navigation-menu/NavigationMenuList.vue'; import NavigationMenuList from '../ui/navigation-menu/NavigationMenuList.vue';
import NavigationMenuItem from '../ui/navigation-menu/NavigationMenuItem.vue'; import NavigationMenuItem from '../ui/navigation-menu/NavigationMenuItem.vue';
import NavigationMenuLink from '../ui/navigation-menu/NavigationMenuLink.vue'; import NavigationMenuLink from '../ui/navigation-menu/NavigationMenuLink.vue';
import NavigationMenuTrigger from '../ui/navigation-menu/NavigationMenuTrigger.vue'; import NavigationMenuTrigger from '../ui/navigation-menu/NavigationMenuTrigger.vue';
import NavigationMenuContent from '../ui/navigation-menu/NavigationMenuContent.vue'; import NavigationMenuContent from '../ui/navigation-menu/NavigationMenuContent.vue';
import { navigationMenuTriggerStyle } from '../ui/navigation-menu/' import { navigationMenuTriggerStyle } from '../ui/navigation-menu/'
import { useAuth } from '@/composables/useAuth'; import { useAuth } from '@/composables/useAuth';
import { ArrowUpRight, CircleArrowOutUpRight } from 'lucide-vue-next'; import { ArrowUpRight, ChevronDown, ChevronUp, CircleArrowOutUpRight, LogIn, LogOut, Menu, Settings, X } from 'lucide-vue-next';
import DropdownMenuGroup from '../ui/dropdown-menu/DropdownMenuGroup.vue'; import DropdownMenuGroup from '../ui/dropdown-menu/DropdownMenuGroup.vue';
import DropdownMenuSeparator from '../ui/dropdown-menu/DropdownMenuSeparator.vue'; import DropdownMenuSeparator from '../ui/dropdown-menu/DropdownMenuSeparator.vue';
import { MemberState } from '@shared/types/member'; import { MemberState } from '@shared/types/member';
import { computed, nextTick, ref } from 'vue';
const userStore = useUserStore(); const userStore = useUserStore();
const auth = useAuth(); const auth = useAuth();
//@ts-ignore //@ts-ignore
const APIHOST = import.meta.env.VITE_APIHOST; const APIHOST = import.meta.env.VITE_APIHOST;
//@ts-ignore //@ts-ignore
const DOCHOST = import.meta.env.VITE_DOCHOST; const DOCHOST = import.meta.env.VITE_DOCHOST;
async function logout() { async function logout() {
userStore.user = null; userStore.user = null;
window.location.href = APIHOST + "/logout"; window.location.href = APIHOST + "/logout";
} }
function blurAfter() { function blurAfter() {
requestAnimationFrame(() => { requestAnimationFrame(() => {
(document.activeElement as HTMLElement)?.blur(); (document.activeElement as HTMLElement)?.blur();
}); });
} }
type NavItem = {
title: string;
to?: string;
href?: string;
status?: 'member' | 'guest';
isExternal?: boolean;
roles?: string[];
items?: NavItem[];
};
const navConfig: NavItem[] = [
{
title: 'Calendar',
to: '/calendar',
},
{
title: 'Documents',
href: 'https://docs.iceberg-gaming.com',
status: 'member',
isExternal: true
},
{
title: 'Forms',
status: 'member',
items: [
{ title: 'Leave of Absence', to: '/loa' },
{ title: 'Training Report', to: '/trainingReport' },
]
},
{
title: 'Administration',
status: 'member',
roles: ['17th Administrator', '17th HQ', '17th Command', 'Recruiter'],
items: [
{
title: 'Leave of Absence',
to: '/administration/loa',
roles: ['17th Administrator', '17th HQ', '17th Command']
},
{
title: 'Promotions',
to: '/administration/rankChange',
roles: ['17th Administrator', '17th HQ', '17th Command']
},
{
title: 'Recruitment',
to: '/administration/applications',
roles: ['Recruiter']
},
{
title: 'Member Management',
to: '/administration/members',
},
{
title: 'Role Management',
to: '/administration/roles',
roles: ['17th Administrator']
},
]
},
{
title: 'Developer',
to: '/developer',
roles: ['Dev']
},
{
title: 'Join',
to: '/join',
status: 'guest',
},
];
const filteredNav = computed(() => {
return navConfig.flatMap(item => {
const filtered: NavItem[] = [];
// 1. Check Login Requirements
const isLoggedIn = userStore.isLoggedIn;
// 2. Determine visibility based on status
let shouldShow = false;
if (!item.status) {
// Public items - always show
shouldShow = true;
} else if (item.status === 'guest') {
// Show if NOT logged in OR logged in as guest (but NOT a member)
shouldShow = !isLoggedIn || auth.accountStatus.value === MemberState.Guest;
} else if (item.status === 'member') {
// Show ONLY if logged in as member
shouldShow = isLoggedIn && auth.accountStatus.value === MemberState.Member;
}
// 3. Check Role Requirements (if status check passed)
if (shouldShow && item.roles) {
shouldShow = auth.hasAnyRole(item.roles);
}
if (shouldShow) {
if (item.items) {
const filteredItems = item.items.filter(subItem =>
!subItem.roles || auth.hasAnyRole(subItem.roles)
);
filtered.push({ ...item, items: filteredItems });
} else {
filtered.push(item);
}
}
return filtered;
});
})
const isMobileMenuOpen = ref(false);
const expandedMenu = ref(null);
const router = useRouter();
function openMobileMenu() {
expandedMenu.value = null;
isMobileMenuOpen.value = true;
}
function closeMobileMenu() {
isMobileMenuOpen.value = false;
expandedMenu.value = null;
}
function mobileNavigateTo(to: string) {
closeMobileMenu();
router.push(to);
}
</script> </script>
<template> <template>
<div class="w-full border-b"> <div class="w-full border-b">
<div class="max-w-screen-3xl w-full mx-auto flex items-center justify-between pr-10 pl-7"> <div class="hidden lg:flex max-w-screen-3xl w-full mx-auto items-center justify-between pr-10 pl-7">
<!-- left side --> <!-- left side -->
<div class="flex items-center gap-7"> <div class="flex items-center gap-7">
<RouterLink to="/"> <RouterLink to="/">
<img src="/17RBN_Logo.png" class="w-10 h-10 object-contain"></img> <img src="/17RBN_Logo.png" class="w-10 h-10 object-contain"></img>
</RouterLink> </RouterLink>
<!-- Member navigation --> <!-- Member navigation -->
<div v-if="auth.accountStatus.value == MemberState.Member" class="h-15 flex items-center justify-center"> <div v-if="auth.accountStatus.value == MemberState.Member"
class="h-15 flex items-center justify-center">
<NavigationMenu> <NavigationMenu>
<NavigationMenuList class="gap-3"> <NavigationMenuList class="gap-3">
@@ -153,6 +288,12 @@ function blurAfter() {
</NavigationMenuLink> </NavigationMenuLink>
</NavigationMenuContent> </NavigationMenuContent>
</NavigationMenuItem> </NavigationMenuItem>
<NavigationMenuItem v-if="auth.hasRole('Dev')">
<NavigationMenuLink as-child :class="navigationMenuTriggerStyle()">
<RouterLink to="/developer" @click="blurAfter">Developer</RouterLink>
</NavigationMenuLink>
</NavigationMenuItem>
</NavigationMenuList> </NavigationMenuList>
</NavigationMenu> </NavigationMenu>
</div> </div>
@@ -196,6 +337,109 @@ function blurAfter() {
<a v-else :href="APIHOST + '/login'">Login</a> <a v-else :href="APIHOST + '/login'">Login</a>
</div> </div>
</div> </div>
<!-- <Separator></Separator> -->
<!-- mobile navigation -->
<div class="flex flex-col lg:hidden w-full" :class="isMobileMenuOpen ? 'h-screen' : ''">
<div class="flex items-center justify-between w-full p-2">
<!-- <RouterLink to="/">
<img src="/17RBN_Logo.png" class="w-10 h-10 object-contain"></img>
</RouterLink> -->
<button @click="mobileNavigateTo('/')">
<img src="/17RBN_Logo.png" class="w-10 h-10 object-contain"></img>
</button>
<Button v-if="!isMobileMenuOpen" variant="ghost" size="icon" @click="openMobileMenu()">
<Menu class="size-7" />
</Button>
<Button v-else variant="ghost" size="icon" @click="closeMobileMenu()">
<X class="size-7" />
</Button>
</div>
<div v-if="isMobileMenuOpen" class="flex flex-col h-[calc(100vh-60px)] overflow-hidden">
<div class="flex-1 overflow-y-auto px-2 py-3 space-y-0.5">
<div v-for="navItem in filteredNav" :key="navItem.title" class="group">
<template v-if="!navItem.items">
<a v-if="navItem.isExternal" :href="navItem.href" target="_blank"
class="flex items-center justify-between w-full px-4 py-2.5 text-base font-medium rounded-md hover:bg-accent active:bg-accent transition-colors">
<span class="flex items-center gap-2">
{{ navItem.title }}
<ArrowUpRight class="h-3.5 w-3.5 opacity-50" />
</span>
</a>
<button v-else @click="mobileNavigateTo(navItem.to)"
class="w-full text-left px-4 py-2.5 text-base font-medium rounded-md hover:bg-accent active:bg-accent transition-colors">
{{ navItem.title }}
</button>
</template>
<div v-else class="space-y-0.5">
<button @click="expandedMenu = expandedMenu === navItem.title ? null : navItem.title"
class="flex items-center justify-between w-full px-4 py-2.5 text-base font-medium rounded-md transition-colors"
:class="expandedMenu === navItem.title ? 'bg-accent/50 text-primary' : 'hover:bg-accent'">
{{ navItem.title }}
<ChevronDown class="h-4 w-4 transition-transform duration-200"
:class="expandedMenu === navItem.title ? 'rotate-180' : ''" />
</button>
<div v-if="expandedMenu === navItem.title"
class="ml-4 mr-2 border-l border-border space-y-0.5">
<button v-for="subNavItem in navItem.items" :key="subNavItem.title"
@click="mobileNavigateTo(subNavItem.to)"
class="w-full text-left px-6 py-2 text-sm text-muted-foreground hover:text-foreground active:text-primary transition-colors">
{{ subNavItem.title }}
</button>
</div>
</div>
</div>
</div>
<div class="p-3 border-t bg-background mt-auto">
<div v-if="userStore.isLoggedIn" class="space-y-3">
<div class="flex items-center justify-between px-2">
<div class="flex gap-3">
<!-- <div
class="size-8 rounded-full bg-primary/10 flex items-center justify-center text-xs font-bold text-primary">
{{ userStore.displayName?.charAt(0) }}
</div> -->
<div class="flex flex-col leading-tight">
<span class="text-sm font-semibold">
{{ userStore.displayName || userStore.user.member.member_name }}
</span>
<span v-if="userStore.displayName"
class="text-[10px] uppercase tracking-wider text-muted-foreground">
{{ userStore.user.member.member_name }}
</span>
</div>
</div>
<div class="flex items-center gap-3">
<Button variant="ghost" size="icon" @click="mobileNavigateTo('/profile')">
<Settings class="size-6"></Settings>
</Button>
<Button variant="ghost" size="icon" @click="logout()">
<LogOut class="size-6 text-destructive"></LogOut>
</Button>
</div>
</div>
<div class="flex gap-2">
<!-- <Button variant="outline" size="xs" class="flex-1 h-8 text-xs"
@click="mobileNavigateTo('/profile')">Profile</Button> -->
<Button variant="secondary" size="xs" class="flex-1 h-8 text-xs"
@click="mobileNavigateTo('/join')">My
Application</Button>
<Button variant="secondary" size="xs" class="flex-1 h-8 text-xs"
@click="mobileNavigateTo('/applications')">Application History</Button>
</div>
</div>
<a v-else :href="APIHOST + '/login'" class="block">
<Button class="w-full text-sm h-10">
<LogIn></LogIn> Login
</Button>
</a>
</div>
</div>
</div>
</div> </div>
</template> </template>

View File

@@ -169,16 +169,16 @@ const filteredMembers = computed(() => {
</script> </script>
<template> <template>
<div class="flex flex-row-reverse gap-6 mx-auto w-full" :class="!adminMode ? 'max-w-5xl' : 'max-w-5xl'"> <div class="mx-auto flex w-full max-w-5xl flex-col gap-4 lg:flex-row-reverse lg:gap-6">
<div v-if="!adminMode" class="flex-1 flex flex-col space-x-4 rounded-md border p-4"> <div v-if="!adminMode" class="order-2 flex flex-1 flex-col rounded-md border p-4 lg:order-1">
<p class="scroll-m-20 text-2xl font-semibold tracking-tight">LOA Policy</p> <p class="scroll-m-20 text-2xl font-semibold tracking-tight">LOA Policy</p>
<div ref="policyRef" class="bookstack-container"> <div ref="policyRef" class="bookstack-container">
<!-- LOA policy gets loaded here --> <!-- LOA policy gets loaded here -->
</div> </div>
</div> </div>
<div class="flex-1 flex flex-col gap-5"> <div class="order-1 flex flex-1 flex-col gap-5 lg:order-2">
<form v-if="!formSubmitted" @submit="onSubmit" class="flex flex-col gap-2"> <form v-if="!formSubmitted" @submit="onSubmit" class="flex flex-col gap-2">
<div class="flex w-full gap-5"> <div class="grid w-full grid-cols-1 gap-4 sm:grid-cols-2 sm:gap-5">
<VeeField v-slot="{ field, errors }" name="member_id"> <VeeField v-slot="{ field, errors }" name="member_id">
<Field> <Field>
<FieldContent> <FieldContent>
@@ -237,13 +237,13 @@ const filteredMembers = computed(() => {
</Field> </Field>
</VeeField> </VeeField>
</div> </div>
<div class="flex gap-5"> <div class="grid grid-cols-1 gap-4 sm:grid-cols-2 sm:gap-5">
<VeeField v-slot="{ field, errors }" name="start_date"> <VeeField v-slot="{ field, errors }" name="start_date">
<Field> <Field class="w-full">
<FieldContent> <FieldContent>
<FieldLabel>Start Date</FieldLabel> <FieldLabel>Start Date</FieldLabel>
<Popover> <Popover>
<div class="relative inline-flex items-center group"> <div class="group relative flex w-full items-center">
<PopoverTrigger as-child> <PopoverTrigger as-child>
<Button :disabled="!values.type" variant="outline" :class="cn( <Button :disabled="!values.type" variant="outline" :class="cn(
'w-full justify-start text-left font-normal', 'w-full justify-start text-left font-normal',
@@ -259,7 +259,7 @@ const filteredMembers = computed(() => {
text-popover-foreground shadow-md border border-border text-popover-foreground shadow-md border border-border
opacity-0 translate-y-1 opacity-0 translate-y-1
group-hover:opacity-100 group-hover:translate-y-0 group-hover:opacity-100 group-hover:translate-y-0
transition-opacity transition-transform duration-150"> transition-all duration-150">
Select an LOA type first Select an LOA type first
</div> </div>
</div> </div>
@@ -277,11 +277,11 @@ const filteredMembers = computed(() => {
</Field> </Field>
</VeeField> </VeeField>
<VeeField v-slot="{ field, errors }" name="end_date"> <VeeField v-slot="{ field, errors }" name="end_date">
<Field> <Field class="w-full">
<FieldContent> <FieldContent>
<FieldLabel>End Date</FieldLabel> <FieldLabel>End Date</FieldLabel>
<Popover> <Popover>
<div class="relative inline-flex items-center group"> <div class="group relative flex w-full items-center">
<PopoverTrigger as-child> <PopoverTrigger as-child>
<Button :disabled="!values.type" variant="outline" :class="cn( <Button :disabled="!values.type" variant="outline" :class="cn(
'w-full justify-start text-left font-normal', 'w-full justify-start text-left font-normal',
@@ -297,7 +297,7 @@ const filteredMembers = computed(() => {
text-popover-foreground shadow-md border border-border text-popover-foreground shadow-md border border-border
opacity-0 translate-y-1 opacity-0 translate-y-1
group-hover:opacity-100 group-hover:translate-y-0 group-hover:opacity-100 group-hover:translate-y-0
transition-opacity transition-transform duration-150"> transition-all duration-150">
Select an LOA type first Select an LOA type first
</div> </div>
</div> </div>
@@ -330,8 +330,8 @@ const filteredMembers = computed(() => {
</Field> </Field>
</VeeField> </VeeField>
</div> </div>
<div class="flex justify-end"> <div class="flex justify-stretch sm:justify-end">
<Button type="submit" :disabled="submitting" class="w-35"> <Button type="submit" :disabled="submitting" class="w-full sm:w-35">
<span class="flex items-center gap-2" v-if="submitting"> <span class="flex items-center gap-2" v-if="submitting">
<Spinner></Spinner> Submitting… <Spinner></Spinner> Submitting…
</span> </span>
@@ -352,7 +352,7 @@ const filteredMembers = computed(() => {
</p> </p>
<div class="flex gap-3 mt-4"> <div class="mt-4 flex flex-col gap-3 sm:flex-row">
<Button variant="secondary" @click="formSubmitted = false"> <Button variant="secondary" @click="formSubmitted = false">
Submit another request Submit another request
</Button> </Button>

View File

@@ -141,29 +141,125 @@
<template> <template>
<div> <div>
<Dialog :open="isExtending" @update:open="(val) => isExtending = val"> <Dialog :open="isExtending" @update:open="(val) => isExtending = val">
<DialogContent> <DialogContent class="w-[95vw] max-w-[95vw] p-4 sm:max-w-fit sm:p-6">
<DialogHeader> <DialogHeader class="gap-1 pr-12 text-left">
<DialogTitle>Extend {{ targetLOA.name }}'s Leave of Absence </DialogTitle> <DialogTitle class="text-base leading-tight sm:text-lg">Extend Leave of Absence</DialogTitle>
<DialogDescription class="truncate text-xs text-muted-foreground sm:text-sm">
{{ targetLOA?.name }}
</DialogDescription>
</DialogHeader> </DialogHeader>
<div class="flex gap-5"> <div class="flex flex-col gap-4 sm:flex-row sm:items-start sm:gap-5">
<Calendar v-model="extendTo" class="rounded-md border shadow-sm w-min" layout="month-and-year" <Calendar v-model="extendTo"
class="mx-auto w-min rounded-md border shadow-sm sm:mx-0"
layout="month-and-year"
:min-value="toCalendarDate(targetEnd)" :min-value="toCalendarDate(targetEnd)"
:max-value="props.adminMode ? toCalendarDate(targetEnd).add({ years: 1 }) : toCalendarDate(targetEnd).add({ months: 1 })" /> :max-value="props.adminMode ? toCalendarDate(targetEnd).add({ years: 1 }) : toCalendarDate(targetEnd).add({ months: 1 })" />
<div class="flex flex-col w-full gap-3 px-2"> <div class="flex w-full flex-col gap-2 sm:gap-3">
<p>Quick Options</p> <p class="text-sm font-medium text-muted-foreground">Quick Options</p>
<Button variant="outline" @click="extendTo = toCalendarDate(targetEnd).add({ days: 7 })">1 <Button class="w-full" variant="outline" @click="extendTo = toCalendarDate(targetEnd).add({ days: 7 })">1
Week</Button> Week</Button>
<Button variant="outline" @click="extendTo = toCalendarDate(targetEnd).add({ months: 1 })">1 <Button class="w-full" variant="outline" @click="extendTo = toCalendarDate(targetEnd).add({ months: 1 })">1
Month</Button> Month</Button>
</div> </div>
</div> </div>
<div class="flex justify-end gap-4"> <div class="flex flex-row justify-end gap-2 pt-2 sm:gap-4 sm:pt-0">
<Button variant="outline" @click="isExtending = false">Cancel</Button> <Button class="flex-1 sm:flex-none" variant="outline" @click="isExtending = false">Cancel</Button>
<Button @click="commitExtend">Extend</Button> <Button class="flex-1 sm:flex-none" @click="commitExtend">Extend</Button>
</div> </div>
</DialogContent> </DialogContent>
</Dialog> </Dialog>
<div class="max-w-7xl w-full mx-auto"> <div class="max-w-7xl w-full mx-auto">
<div class="space-y-3 md:hidden">
<template v-for="post in LOAList" :key="`mobile-${post.id}`">
<div class="rounded-lg border bg-card p-2.5 shadow-sm">
<div class="grid grid-cols-[minmax(0,1fr)_auto] items-center gap-2">
<div class="min-w-0 overflow-hidden">
<div class="max-w-[70vw] overflow-hidden whitespace-nowrap">
<MemberCard :member-id="post.member_id"></MemberCard>
</div>
</div>
<Badge v-if="loaStatus(post) === 'Upcoming'" class="shrink-0 bg-blue-400">Upcoming</Badge>
<Badge v-else-if="loaStatus(post) === 'Active'" class="shrink-0 bg-green-500">Active</Badge>
<Badge v-else-if="loaStatus(post) === 'Extended'" class="shrink-0 bg-green-500">Extended</Badge>
<Badge v-else-if="loaStatus(post) === 'Overdue'" class="shrink-0 bg-yellow-400">Overdue</Badge>
<Badge v-else class="shrink-0 bg-gray-400">Ended</Badge>
</div>
<div class="mt-1 grid grid-cols-2 gap-x-4 gap-y-1">
<div>
<p class="text-[11px] uppercase tracking-wide text-muted-foreground/90">Start</p>
<p class="text-sm font-semibold text-foreground">{{ formatDate(post.start_date) }}</p>
</div>
<div class="text-right">
<p class="text-[11px] uppercase tracking-wide text-muted-foreground/90">End</p>
<p class="text-sm font-semibold text-foreground">{{ post.extended_till ? formatDate(post.extended_till) : formatDate(post.end_date) }}</p>
</div>
</div>
<div class="mt-1 flex items-center justify-end gap-1">
<Button variant="ghost" class="h-8 px-2 text-xs text-muted-foreground" @click="expanded = expanded === post.id ? null : post.id">
<span class="mr-1">Details</span>
<ChevronUp v-if="expanded === post.id" class="size-4" />
<ChevronDown v-else class="size-4" />
</Button>
<DropdownMenu>
<DropdownMenuTrigger class="cursor-pointer">
<Button variant="ghost" size="icon" class="size-8 text-muted-foreground">
<Ellipsis class="size-5"></Ellipsis>
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem v-if="!post.closed"
:disabled="post.extended_till !== null && !props.adminMode"
@click="isExtending = true; targetLOA = post">
{{ (post.extended_till !== null && !props.adminMode) ? 'Extend (Already Extended)' : 'Extend' }}
</DropdownMenuItem>
<DropdownMenuItem v-if="!post.closed" :variant="'destructive'"
@click="cancelAndReload(post.id)">{{ loaStatus(post) === 'Upcoming' ?
'Cancel' :
'End' }}
</DropdownMenuItem>
<p v-if="post.closed || (!props.adminMode && post.closed)"
class="p-2 text-center text-sm">
No actions
</p>
</DropdownMenuContent>
</DropdownMenu>
</div>
<div v-if="expanded === post.id" class="mt-2 space-y-2.5 border-t pt-2 text-sm">
<div class="space-y-1.5">
<div class="flex items-center justify-between gap-3">
<span class="text-muted-foreground/90">Type</span>
<span class="text-right font-semibold text-foreground">{{ post.type_name }}</span>
</div>
<div class="flex items-center justify-between gap-3">
<span class="text-muted-foreground/90">Posted on</span>
<span class="text-right font-semibold text-foreground">{{ formatDate(post.filed_date) }}</span>
</div>
<div class="flex items-center justify-between gap-3">
<span class="text-muted-foreground/90">Original end</span>
<span class="text-right font-semibold text-foreground">{{ formatDate(post.end_date) }}</span>
</div>
<div class="flex items-center justify-between gap-3">
<span class="text-muted-foreground/90">Extended to</span>
<span class="text-right font-semibold text-foreground">{{ post.extended_till ? formatDate(post.extended_till) : 'N/A' }}</span>
</div>
</div>
<div>
<h4 class="text-[11px] font-semibold uppercase tracking-wide text-muted-foreground/90">Reason</h4>
<p class="mt-1 whitespace-pre-wrap text-sm leading-relaxed text-foreground/90">
{{ post.reason || 'No reason provided.' }}
</p>
</div>
</div>
</div>
</template>
</div>
<div class="hidden overflow-x-auto md:block">
<Table> <Table>
<TableHeader> <TableHeader>
<TableRow> <TableRow>
@@ -242,7 +338,7 @@
<div class="w-full p-4 mb-6 space-y-4"> <div class="w-full p-4 mb-6 space-y-4">
<!-- Dates --> <!-- Dates -->
<div class="grid grid-cols-3 gap-4 text-sm"> <div class="grid grid-cols-1 gap-4 text-sm lg:grid-cols-3">
<div> <div>
<p class="text-muted-foreground">Start</p> <p class="text-muted-foreground">Start</p>
<p class="font-medium"> <p class="font-medium">
@@ -266,16 +362,12 @@
</div> </div>
<!-- Reason --> <!-- Reason -->
<div class="space-y-2"> <div class="space-y-2 border-t pt-3">
<div class="flex items-center gap-2">
<h4 class="text-sm font-semibold text-foreground"> <h4 class="text-sm font-semibold text-foreground">
Reason Reason
</h4> </h4>
<Separator class="flex-1" />
</div>
<div <div class="text-sm leading-relaxed whitespace-pre-wrap text-muted-foreground">
class="rounded-lg border bg-muted/40 px-4 py-3 text-sm leading-relaxed whitespace-pre-wrap text-muted-foreground">
{{ post.reason || 'No reason provided.' }} {{ post.reason || 'No reason provided.' }}
</div> </div>
</div> </div>
@@ -287,8 +379,9 @@
</template> </template>
</TableBody> </TableBody>
</Table> </Table>
<div class="mt-5 flex justify-between"> </div>
<div></div> <div class="mt-5 flex flex-col gap-3 md:flex-row md:items-center md:justify-between">
<div class="hidden md:block"></div>
<Pagination v-slot="{ page }" :items-per-page="pageData?.pageSize || 10" :total="pageData?.total || 10" <Pagination v-slot="{ page }" :items-per-page="pageData?.pageSize || 10" :total="pageData?.total || 10"
:default-page="2" :page="pageNum" @update:page="setPage"> :default-page="2" :page="pageNum" @update:page="setPage">
<PaginationContent v-slot="{ items }"> <PaginationContent v-slot="{ items }">
@@ -303,7 +396,7 @@
<PaginationNext /> <PaginationNext />
</PaginationContent> </PaginationContent>
</Pagination> </Pagination>
<div class="flex items-center gap-3 text-sm"> <div class="flex items-center justify-end gap-3 text-sm">
<p class="text-muted-foreground text-nowrap">Per page:</p> <p class="text-muted-foreground text-nowrap">Per page:</p>
<button v-for="size in pageSizeOptions" :key="size" @click="setPageSize(size)" <button v-for="size in pageSizeOptions" :key="size" @click="setPageSize(size)"

View File

@@ -135,11 +135,7 @@ function setAllToday() {
<div class="w-xl"> <div class="w-xl">
<form v-if="!formSubmitted" id="trainingForm" @submit.prevent="submitForm" <form v-if="!formSubmitted" id="trainingForm" @submit.prevent="submitForm"
class="w-full min-w-0 flex flex-col gap-4"> class="w-full min-w-0 flex flex-col gap-4">
<div>
<FieldLegend class="scroll-m-20 text-2xl font-semibold tracking-tight">
Promotion Form
</FieldLegend>
</div>
<VeeFieldArray name="promotions" v-slot="{ fields, push, remove }"> <VeeFieldArray name="promotions" v-slot="{ fields, push, remove }">
<FieldSet class="w-full min-w-0"> <FieldSet class="w-full min-w-0">
<div class="flex flex-col gap-2"> <div class="flex flex-col gap-2">

View File

@@ -47,7 +47,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
<slot /> <slot />
<DialogClose <DialogClose
class="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4" class="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-3.5 right-3.5 inline-flex h-9 w-9 items-center justify-center rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none sm:top-4 sm:right-4 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-5"
> >
<X /> <X />
<span class="sr-only">Close</span> <span class="sr-only">Close</span>

View File

@@ -227,6 +227,9 @@ onMounted(() => {
/* Ensure the calendar fills the container properly */ /* Ensure the calendar fills the container properly */
:global(.fc) { :global(.fc) {
height: 100% !important; height: 100% !important;
--fc-page-bg-color: transparent;
--fc-neutral-bg-color: color-mix(in srgb, var(--color-foreground) 8%, transparent);
--fc-neutral-text-color: var(--color-muted-foreground);
--fc-border-color: var(--color-border); --fc-border-color: var(--color-border);
--fc-button-bg-color: transparent; --fc-button-bg-color: transparent;
--fc-button-border-color: var(--color-border); --fc-button-border-color: var(--color-border);
@@ -299,6 +302,7 @@ onMounted(() => {
:global(.fc .fc-scrollgrid td), :global(.fc .fc-scrollgrid td),
:global(.fc .fc-scrollgrid th) { :global(.fc .fc-scrollgrid th) {
border-color: var(--color-border); border-color: var(--color-border);
background: var(--fc-page-bg-color);
} }
/* ---------- Built-in toolbar (if you keep it) ---------- */ /* ---------- Built-in toolbar (if you keep it) ---------- */
@@ -346,9 +350,7 @@ onMounted(() => {
text-decoration: none; text-decoration: none;
} }
:global(#app > div > div.flex-1.min-h-0 > div > div > div > div.fc.fc-media-screen.fc-direction-ltr.fc-theme-standard > div.fc-view-harness.fc-view-harness-passive > div > table > thead > tr > th) {
background-color: transparent;
}
:global(.fc .fc-daygrid-day-top) { :global(.fc .fc-daygrid-day-top) {
padding: 8px 8px 0 8px; padding: 8px 8px 0 8px;
} }

View File

@@ -0,0 +1,52 @@
<script setup lang="ts">
import Button from '@/components/ui/button/Button.vue';
import { bustUserCache } from '@/api/member';
import type { UserCacheBustResult } from '@shared/types/member';
import { ref } from 'vue';
const loading = ref(false);
const result = ref<UserCacheBustResult | null>(null);
const error = ref<string | null>(null);
async function onBustUserCache() {
loading.value = true;
error.value = null;
try {
result.value = await bustUserCache();
} catch (err) {
result.value = null;
error.value = err instanceof Error ? err.message : 'Failed to bust user cache';
} finally {
loading.value = false;
}
}
</script>
<template>
<div class="max-w-3xl mx-auto pt-10 px-4">
<h1 class="scroll-m-20 text-2xl font-semibold tracking-tight">Developer Tools</h1>
<p class="mt-2 text-sm text-muted-foreground">
Use this page to recover from stale in-memory authentication data after manual database changes.
</p>
<div class="mt-6 rounded-lg border p-5 bg-card">
<p class="font-medium">Server User Cache</p>
<p class="text-sm text-muted-foreground mt-1">
This clears the API server's cached user session data so the next request reloads from the database.
</p>
<div class="mt-4 flex items-center gap-3">
<Button :disabled="loading" @click="onBustUserCache">
{{ loading ? 'Busting Cache...' : 'Bust User Cache' }}
</Button>
</div>
<p v-if="result" class="mt-4 text-sm text-green-700">
Cache busted successfully. Cleared {{ result.clearedEntries }} entr{{ result.clearedEntries === 1 ? 'y' : 'ies' }} at
{{ new Date(result.bustedAt).toLocaleString() }}.
</p>
<p v-if="error" class="mt-4 text-sm text-red-700">{{ error }}</p>
</div>
</div>
</template>

View File

@@ -19,17 +19,20 @@ const showLOADialog = ref(false);
<template> <template>
<div> <div>
<Dialog v-model:open="showLOADialog" v-on:update:open="showLOADialog = false"> <Dialog v-model:open="showLOADialog" v-on:update:open="showLOADialog = false">
<DialogContent class="sm:max-w-fit"> <DialogContent class="w-[95vw] max-w-[95vw] max-h-[90dvh] overflow-y-auto p-4 sm:max-w-fit sm:p-6">
<DialogHeader> <DialogHeader>
<DialogTitle>Post LOA</DialogTitle> <DialogTitle>Post LOA</DialogTitle>
<DialogDescription> <DialogDescription>
Post an LOA on behalf of a member. Post an LOA on behalf of a member.
</DialogDescription> </DialogDescription>
</DialogHeader> </DialogHeader>
<LoaForm :admin-mode="true" class="my-3"></LoaForm> <LoaForm :admin-mode="true"></LoaForm>
<DialogFooter>
<Button variant="outline" @click="showLOADialog = false">Cancel</Button>
</DialogFooter>
</DialogContent> </DialogContent>
</Dialog> </Dialog>
<div class="max-w-5xl mx-auto pt-10"> <div class="mx-auto max-w-5xl px-3 pt-10 sm:px-4 lg:px-0">
<div class="flex justify-between mb-4"> <div class="flex justify-between mb-4">
<h1 class="scroll-m-20 text-2xl font-semibold tracking-tight">LOA Log</h1> <h1 class="scroll-m-20 text-2xl font-semibold tracking-tight">LOA Log</h1>
<div> <div>

View File

@@ -1,29 +1,48 @@
<script setup>
import { ref } from 'vue'
import { Plus, PlusIcon, X } from 'lucide-vue-next'
import PromotionForm from '@/components/promotions/promotionForm.vue'
import PromotionList from '@/components/promotions/promotionList.vue'
import DialogContent from '@/components/ui/dialog/DialogContent.vue'
import Dialog from '@/components/ui/dialog/Dialog.vue'
import DialogTrigger from '@/components/ui/dialog/DialogTrigger.vue'
import DialogHeader from '@/components/ui/dialog/DialogHeader.vue'
import DialogTitle from '@/components/ui/dialog/DialogTitle.vue'
import Button from '@/components/ui/button/Button.vue'
const isFormOpen = ref(false)
const listRef = ref(null)
const isMobileFormOpen = ref(false);
</script>
<template> <template>
<div class="mx-auto mt-6 lg:mt-10 px-4 lg:px-8"> <div class="mx-auto mt-6 lg:mt-10 px-4 lg:px-8">
<div class="flex items-center justify-between mb-6 lg:hidden"> <div class="flex flex-col items-center justify-between mb-6 lg:hidden">
<h1 class="text-2xl font-semibold tracking-tight">Promotion History</h1> <div v-if="isMobileFormOpen">
<div class="mb-4 flex justify-between items-center">
<Dialog v-model:open="isFormOpen"> <p class="scroll-m-20 text-2xl font-semibold tracking-tight">
<DialogTrigger as-child> Promotion Form
<Button size="sm" class="gap-2"> </p>
<Plus class="size-4" /> <Button variant="ghost" size="icon" @click="isMobileFormOpen = false">
Promote <X v-if="isMobileFormOpen" class="size-6"></X>
</Button> </Button>
</DialogTrigger>
<DialogContent class="w-full h-full max-w-none m-0 rounded-none flex flex-col">
<DialogHeader class="flex-row items-center justify-between border-b pb-4">
<DialogTitle>New Promotion</DialogTitle>
</DialogHeader>
<div class="flex-1 overflow-y-auto pt-6">
<PromotionForm @submitted="handleMobileSubmit" />
</div> </div>
</DialogContent> <PromotionForm @submitted="listRef?.refresh" />
</Dialog> </div>
<div v-else>
<div class="flex justify-between w-full">
<h1 class="text-2xl font-semibold tracking-tight">Promotion History</h1>
<Button @click="isMobileFormOpen = true">
<PlusIcon />Submit
</Button>
</div>
<PromotionList></PromotionList>
</div>
</div> </div>
<div class="flex flex-col lg:flex-row lg:max-h-[70vh] gap-8"> <div class="hidden lg:flex flex-row lg:max-h-[70vh] gap-8">
<div class="flex-1 lg:border-r lg:pr-8 w-full lg:min-w-2xl"> <div class="flex-1 lg:border-r lg:pr-8 w-full lg:min-w-2xl">
<p class="hidden lg:block scroll-m-20 text-2xl font-semibold tracking-tight mb-3"> <p class="hidden lg:block scroll-m-20 text-2xl font-semibold tracking-tight mb-3">
Promotion History Promotion History
@@ -42,24 +61,3 @@
</div> </div>
</div> </div>
</template> </template>
<script setup>
import { ref } from 'vue'
import { Plus } from 'lucide-vue-next'
import PromotionForm from '@/components/promotions/promotionForm.vue'
import PromotionList from '@/components/promotions/promotionList.vue'
import DialogContent from '@/components/ui/dialog/DialogContent.vue'
import Dialog from '@/components/ui/dialog/Dialog.vue'
import DialogTrigger from '@/components/ui/dialog/DialogTrigger.vue'
import DialogHeader from '@/components/ui/dialog/DialogHeader.vue'
import DialogTitle from '@/components/ui/dialog/DialogTitle.vue'
import Button from '@/components/ui/button/Button.vue'
const isFormOpen = ref(false)
const listRef = ref(null)
const handleMobileSubmit = () => {
isFormOpen.value = false // Close the "Whole page" modal
listRef.value?.refresh() // Refresh the list behind it
}
</script>

View File

@@ -11,7 +11,7 @@ const mode = ref<'submit' | 'view'>('submit')
</script> </script>
<template> <template>
<div class="max-w-5xl mx-auto flex w-full flex-col mt-4 mb-10"> <div class="mx-auto mt-4 mb-10 flex w-full max-w-5xl flex-col px-3 sm:px-4 lg:px-0">
<div class="mb-8"> <div class="mb-8">
<p class="scroll-m-20 text-2xl font-semibold tracking-tight">Leave of Absence</p> <p class="scroll-m-20 text-2xl font-semibold tracking-tight">Leave of Absence</p>
<div class="pt-3"> <div class="pt-3">

View File

@@ -28,10 +28,12 @@ const router = createRouter({
{ path: '/trainingReport/new', component: () => import('@/pages/TrainingReport.vue'), meta: { requiresAuth: true, memberOnly: true } }, { path: '/trainingReport/new', component: () => import('@/pages/TrainingReport.vue'), meta: { requiresAuth: true, memberOnly: true } },
{ path: '/trainingReport/:id', component: () => import('@/pages/TrainingReport.vue'), meta: { requiresAuth: true, memberOnly: true } }, { path: '/trainingReport/:id', component: () => import('@/pages/TrainingReport.vue'), meta: { requiresAuth: true, memberOnly: true } },
{ path: '/developer', component: () => import('@/pages/DeveloperTools.vue'), meta: { requiresAuth: true, memberOnly: true, roles: ['Dev'] } },
// ADMIN / STAFF ROUTES // ADMIN / STAFF ROUTES
{ {
path: '/administration', path: '/administration',
meta: { requiresAuth: true, memberOnly: true, roles: ['17th Administrator', '17th HQ', '17th Command'] }, meta: { requiresAuth: true, memberOnly: true, roles: ['17th Administrator', '17th HQ', '17th Command', '17th Recruiter'] },
children: [ children: [
{ path: 'applications', component: () => import('@/pages/ManageApplications.vue') }, { path: 'applications', component: () => import('@/pages/ManageApplications.vue') },
{ path: 'applications/:id', component: () => import('@/pages/ManageApplications.vue') }, { path: 'applications/:id', component: () => import('@/pages/ManageApplications.vue') },