style: apply prettier formatting to frontend
This commit is contained in:
@@ -331,7 +331,10 @@
|
||||
function getNotificationSubtitle(n: Notification): string {
|
||||
const parts = [formatRelative(n.created_at)];
|
||||
if (n.user_name) {
|
||||
parts.push(n.user_name); {/* TODO: add formerly name when previous name data is available */}
|
||||
parts.push(n.user_name);
|
||||
{
|
||||
/* TODO: add formerly name when previous name data is available */
|
||||
}
|
||||
}
|
||||
return parts.join(' — ');
|
||||
}
|
||||
@@ -347,14 +350,24 @@
|
||||
|
||||
<svelte:head>
|
||||
<script>
|
||||
(function() {
|
||||
(function () {
|
||||
try {
|
||||
var token = localStorage.getItem('authToken');
|
||||
if (!token) { window.location.replace('/login'); return; }
|
||||
if (!token) {
|
||||
window.location.replace('/login');
|
||||
return;
|
||||
}
|
||||
var payload = JSON.parse(atob(token.split('.')[1]));
|
||||
if (payload.exp * 1000 <= Date.now()) { window.location.replace('/login'); return; }
|
||||
if (payload.role !== 'admin') { window.location.replace('/'); }
|
||||
} catch(e) { window.location.replace('/login'); }
|
||||
if (payload.exp * 1000 <= Date.now()) {
|
||||
window.location.replace('/login');
|
||||
return;
|
||||
}
|
||||
if (payload.role !== 'admin') {
|
||||
window.location.replace('/');
|
||||
}
|
||||
} catch (e) {
|
||||
window.location.replace('/login');
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</svelte:head>
|
||||
@@ -509,7 +522,7 @@
|
||||
|
||||
<BookingModal bind:open={showBookingModal} bookingId={selectedBooking?.id ?? ''} />
|
||||
|
||||
<UserModal bind:open={showUserModal} userId={selectedUserId ?? ''} openBookingModal={openBookingModal} />
|
||||
<UserModal bind:open={showUserModal} userId={selectedUserId ?? ''} {openBookingModal} />
|
||||
|
||||
{#if showEditRequestModal && selectedEditRequest}
|
||||
<EditRequestModal
|
||||
|
||||
Reference in New Issue
Block a user