Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 871277882d | |||
| bb4d6a3a1a | |||
| 8f16d5190c | |||
| f3e35f3f6a |
@@ -115,11 +115,24 @@ router.get('/callback', (req, res, next) => {
|
|||||||
router.get('/logout', [requireLogin], function (req, res, next) {
|
router.get('/logout', [requireLogin], function (req, res, next) {
|
||||||
req.logout(function (err) {
|
req.logout(function (err) {
|
||||||
if (err) { return next(err); }
|
if (err) { return next(err); }
|
||||||
var params = {
|
|
||||||
client_id: process.env.AUTH_CLIENT_ID,
|
req.session.destroy((err) => {
|
||||||
returnTo: process.env.CLIENT_URL
|
if (err) { return next(err); }
|
||||||
};
|
|
||||||
res.redirect(process.env.AUTH_END_SESSION_URI + '?' + querystring.stringify(params));
|
res.clearCookie('connect.sid', {
|
||||||
|
path: '/',
|
||||||
|
domain: process.env.CLIENT_DOMAIN,
|
||||||
|
httpOnly: true,
|
||||||
|
sameSite: 'lax'
|
||||||
|
});
|
||||||
|
|
||||||
|
var params = {
|
||||||
|
client_id: process.env.AUTH_CLIENT_ID,
|
||||||
|
returnTo: process.env.CLIENT_URL
|
||||||
|
};
|
||||||
|
res.redirect(process.env.AUTH_END_SESSION_URI + '?' + querystring.stringify(params));
|
||||||
|
|
||||||
|
})
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ function loaStatus(loa: LOARequest): "Upcoming" | "Active" | "Overdue" | "Closed
|
|||||||
|
|
||||||
if (now < start) return "Upcoming";
|
if (now < start) return "Upcoming";
|
||||||
if (now >= start && now <= end) return "Active";
|
if (now >= start && now <= end) return "Active";
|
||||||
if (now > end) return "Overdue";
|
if (now > loa.extended_till || end) return "Overdue";
|
||||||
|
|
||||||
return "Overdue"; // fallback
|
return "Overdue"; // fallback
|
||||||
}
|
}
|
||||||
@@ -197,7 +197,7 @@ function setPage(pagenum: number) {
|
|||||||
<TableCell @click.stop="" class="text-right">
|
<TableCell @click.stop="" class="text-right">
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger class="cursor-pointer">
|
<DropdownMenuTrigger class="cursor-pointer">
|
||||||
<Button variant="ghost">
|
<Button variant="ghost" size="icon">
|
||||||
<Ellipsis class="size-6"></Ellipsis>
|
<Ellipsis class="size-6"></Ellipsis>
|
||||||
</Button>
|
</Button>
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
@@ -220,10 +220,11 @@ function setPage(pagenum: number) {
|
|||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
<Button v-if="expanded === post.id" @click.stop="expanded = null" variant="ghost">
|
<Button v-if="expanded === post.id" @click.stop="expanded = null" size="icon"
|
||||||
|
variant="ghost">
|
||||||
<ChevronUp class="size-6" />
|
<ChevronUp class="size-6" />
|
||||||
</Button>
|
</Button>
|
||||||
<Button v-else @click.stop="expanded = post.id" variant="ghost">
|
<Button v-else @click.stop="expanded = post.id" size="icon" variant="ghost">
|
||||||
<ChevronDown class="size-6" />
|
<ChevronDown class="size-6" />
|
||||||
</Button>
|
</Button>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
@@ -233,18 +234,24 @@ function setPage(pagenum: number) {
|
|||||||
<TableCell :colspan="8" class="p-0">
|
<TableCell :colspan="8" class="p-0">
|
||||||
<div class="w-full p-3 mb-6 space-y-3">
|
<div class="w-full p-3 mb-6 space-y-3">
|
||||||
<div class="flex justify-between items-start gap-4">
|
<div class="flex justify-between items-start gap-4">
|
||||||
<div class="flex-1">
|
<div class="space-y-3 w-full">
|
||||||
<!-- Title -->
|
|
||||||
<p class="text-md font-semibold text-foreground">
|
<!-- Header -->
|
||||||
Reason
|
<div class="flex items-center gap-2">
|
||||||
</p>
|
<h4 class="text-sm font-semibold text-foreground">
|
||||||
|
Reason
|
||||||
|
</h4>
|
||||||
|
<Separator class="flex-1" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Content -->
|
<!-- Content -->
|
||||||
<p
|
<div
|
||||||
class="mt-1 text-md whitespace-pre-wrap leading-relaxed text-muted-foreground">
|
class="rounded-lg border bg-muted/40 px-4 py-3 text-sm leading-relaxed whitespace-pre-wrap text-muted-foreground w-full">
|
||||||
{{ post.reason }}
|
{{ post.reason || 'No reason provided.' }}
|
||||||
</p>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
|||||||
Reference in New Issue
Block a user