Commit graph

45 commits

Author SHA1 Message Date
31f80daa86 Fix admin user list being empty
All checks were successful
/ build (push) Successful in 1m33s
/ deploy (push) Has been skipped
After 4ff3dcb the admin user list became empty due to a messing fetch of
the userStore on the admin page.
2025-07-16 20:12:26 +02:00
9013e85ff0 Scroll the now line into view on navigation
All checks were successful
/ build (push) Successful in 1m34s
/ deploy (push) Successful in 16s
When displaying the schedule, scroll it such that the now line is on the
left to make what is displayed by default the most immediately useful
information.
2025-07-16 19:58:01 +02:00
ae1c653af6 Separate event dipslay from event slot display
Pull out the list of events into its own page sorted by name and show
the event slots in chronological order on the schedule page, with past
slots hidden by default.  This makes the content underneath the schedule
the most immediately useful to have in the moment, while the full list
is kept separately and in a predictable order.
2025-07-16 19:37:23 +02:00
0d0e38e4b6 Refactor demo login as an authentication method
Use the authentication method system for the demo login and the
generated accounts.  This makes it possible to toggle it off on
production systems as these shouldn't have it enabled at all.
2025-07-09 18:01:26 +02:00
aaa2faffb1 Implement register and login with Telegram
Add the concept of authentication methods that authenticate an account
where using the telegram login widget is one such method.  If a login is
done with an authentication method that's not associated with any
account the session ends up with the data from the authentication
method in order to allow registering a new account with the
authentication method.

This has to be stored on the session as otherwise it wouldn't be
possible to implement authentication methods such as OAuth2 that takes
the user to a third-party site and then redirects the browser back.
2025-07-09 15:34:57 +02:00
9592cd3160 Name the application Owltide
The name is inspired by the watchful owl perching from the tree tops
with complete overview of all that's going on combined with -tide in
the sense it's used for in words like summertide and eastertide.
2025-07-01 18:41:24 +02:00
e52972853d License under AGPL version 3 or later
I firmly believe in free software.

The application I'm making here have capabilities that I've not seen in
any system.  It presents itself as an opportunity to collaborate on a
tool that serves the people rather than corporations.  Whose incentives
are to help people rather, not make the most money.  And whose terms
ensure that these freedoms and incentives cannot be taken back or
subverted.

I license this software under the AGPL.
2025-06-30 18:58:24 +02:00
1d2edf7535 Add dialog showing diff of changes to save
Add a save dialog at the bottom of the screen that is present whenever
there are unsaved changes.  This dialog provides a diff between the
client and server state so that the user can easily confirm the changes
they are about to make are the correct changes before applying them to
the server.
2025-06-30 15:43:15 +02:00
e5e923bc8d Implement database administration
Add routes and admin panel elements for creating a database backup,
restoring from a backup, deleting the existing schedule, and replacing
the database with the demo schedule.  These server as crude ways to
manage the data stored in the system.
2025-06-28 01:30:39 +02:00
e01e162367 Add About page with info about the project
Provide a rudimentary description of what this project does, existing
features and future planned work.
2025-06-24 16:00:55 +02:00
9299fa2682 Add cards for shifts 2025-06-24 15:41:53 +02:00
e3ff872b5c Refactor ClientSchedule to mutable types
All checks were successful
/ build (push) Successful in 1m30s
/ deploy (push) Successful in 16s
Use a single mutable location, event, slot, etc, for each unique
resource that keeps track of the local editable client copy and
the server copy of the data contained in it.

This makes it much simpler to update these data structures as I can take
advantage of the v-model bindings in Vue.js and work with the system
instead of against it.
2025-06-24 00:07:18 +02:00
87525a6ef5 Add admin page that can edit users
All checks were successful
/ build (push) Successful in 1m30s
/ deploy (push) Successful in 16s
Add admin page that's only accessible to admins with a listing of users
and the ability to edit the access types of those users.
2025-06-23 00:28:59 +02:00
3be7f8be05 Refactor user storage and update
Rename accounts to users to be consistent with the new naming scheme
where account only referes to the logged in user of the session and
implement live updates of users via a user store which listens for
updates from the event stream.
2025-06-23 00:28:58 +02:00
e821100987 Add back wrongly removed shiftSlotFilter 2025-06-18 01:00:51 +02:00
6ef3800a53 Organise edit page into tabs
Use tabs for the various sections on the edit page so that the schedule
timetable is more easily visible at the same time as the editable tables.
2025-06-18 00:24:45 +02:00
7a95d6c3c4 Use prefix notation for component names
Start component names with the kind of element it creates on the page
(button, input, table, card, etc), then follow it with an hierarchy like
set of parts describing what part of the system it operates on.

This makes related components stick together in the directory listing of
components and auto-complete work better.
2025-06-17 22:29:16 +02:00
bb450fd583 Refactor to use ClientSchedule on client
Use the ClientSchedule data structure for deserialising and tracking
edit state on the client instead of trying to directly deal with the
ApiSchedule type which is not build for ease of edits or rendering.
2025-06-14 19:22:53 +02:00
fb7a60db28 Add per account locale setting
Add a per user account setting for the locale so that the server can
correctly render pages with localized time formatting.
2025-06-13 21:50:22 +02:00
fe06d0d6bd Refactor API types and sync logic
All checks were successful
/ build (push) Successful in 2m5s
/ deploy (push) Successful in 16s
Rename and refactor the types passed over the API to be based on an
entity that's either living or a tombstone.  A living entity has a
deleted property that's either undefined or false, while a tombstone
has a deleted property set to true.  All entities have a numeric id
and an updatedAt timestamp.

To sync entities, an array of replacements are passed around. Living
entities are replaced with tombstones when they're deleted. And
tombstones are replaced with living entities when restored.
2025-06-11 21:05:17 +02:00
04b9707272 Move /api/account to /api/auth/account
All checks were successful
/ build (push) Successful in 1m16s
/ deploy (push) Successful in 16s
An account refers to the user the active session is logged in as. As
such it doesn't make sense outside of the /auth API paths that deals
with the current authenticated user.  Move /api/account to
/api/auth/account to reflect this.
2025-05-31 21:44:19 +02:00
e7dc00db54 Remove old editing interface
All checks were successful
/ build (push) Successful in 1m13s
/ deploy (push) Successful in 15s
Remove broken placeholder event editing interface that did not take
account to access permissions or events having multiple solts.
2025-05-27 17:38:23 +02:00
e722876aae Use a pinia store to manage account state
All checks were successful
/ build (push) Successful in 3m29s
/ deploy (push) Successful in 47s
Refactor the existing scattered code dealing with the account state into
a pinia store.
2025-05-24 20:01:23 +02:00
fae8b4e2e4 Use a pinia store to manage session state
Replace the convoluted useAccountSession composable with a pinia store
that in addition allows for the consolidation of all session related
functions to grouped into one module.
2025-05-24 18:18:27 +02:00
c7b4f5fa92 Render PushNotification on client only
All checks were successful
/ build (push) Successful in 1m52s
/ deploy (push) Successful in 15s
The push logic is only available on the client and causes hydration
mismatch when rendered on the server.
2025-05-23 21:35:19 +02:00
f2ab306338 Always await useAccountSession
If this is not done the session is not properly loaded during server
side rendering, making it possible for missmatch and bugs to happen.
2025-05-23 21:33:48 +02:00
742be649eb Add /build-info page displaying
All checks were successful
/ build (push) Successful in 1m16s
/ deploy (push) Successful in 16s
Add page displaying information about the deployment for diagnostic
purposes.
2025-05-20 00:07:58 +02:00
399a4d2ca5 Add account based filtering of the schedule
Some checks failed
/ build (push) Has been cancelled
/ deploy (push) Has been cancelled
Implement personal filtering of the schedule based on events marked as
being interested in and filtering based on assigned crew for events.
2025-03-15 22:47:32 +01:00
0aff9cc94a Add editing of shifts 2025-03-15 17:06:23 +01:00
905ec8a38b Add editing of shift time slots 2025-03-15 16:45:02 +01:00
accc1690ff Add editing of roles for shifts 2025-03-15 15:10:42 +01:00
b22d32dada Add editing of events 2025-03-15 14:20:38 +01:00
02be8a37a5 Implement editing of time slots
Render the timeslots as an editable table of times with associated
event.  When the event it's linked to is edited the time slot is removed
from the original event it belonged to and added to the possibly new
event it now belongs to.  This gives a somewhat intutive editing
experience when editing time slots linked to events with multiple times.
2025-03-14 18:19:58 +01:00
d0ee6a40eb Pass schedule as a prop to Timetable 2025-03-14 17:38:01 +01:00
c940f785c5 Add editable LocationsTable 2025-03-11 16:05:38 +01:00
13f344472e Move schedule fetching into useSchedule composable 2025-03-10 15:41:32 +01:00
e8226e0062 Implement account type restricted page
Add allowedAccountTypes page metadata which the authenticated middleware
uses to further restrict the types of accounts that can access the page.

If the account type is insufficent to access the page it will return an
HTTP 403 Forbidden status, which is rendered using the error page.
2025-03-09 22:37:07 +01:00
245169950a Fixes on reading the session object 2025-03-09 22:18:42 +01:00
c4a6f6b3f9 Add per account overridable timezone setting
To make it possible to render the timetable in the user's local time we
need to know the timezone to render it in on the server.  Otherwise
there will be hydration errors and paint flashing as the client renders
a different timezone.

Add a server global default timezone that can be overriden on a
per-account bases to prepare for timezone handling the timetable.
2025-03-09 15:53:51 +01:00
8ef4636635 Add create account functionality 2025-03-07 23:53:57 +01:00
598b9fd7d6 Add delete account function 2025-03-07 22:28:55 +01:00
ca51c07065 Move push notification setting to separate page
Set up a dedicated Account Setttings page to hold account specific
settings such as the push notifications.
2025-03-07 18:43:24 +01:00
b2a5b67096 Refactor push subscription logic into a composable 2025-03-07 16:08:45 +01:00
150cb82f5c Basic account and session system
Provide a basic account system with login and server side session store
identified by a cookie.  Upon successful login a signed session cookie
is set by the server with the session stored on the server identifying
which account it is logged in as.  The client uses a shared useFetch on
the session endpoint to identify if it's logged in and which account it
is logged in as, and refreshes this when loggin in or out.
2025-03-07 12:41:57 +01:00
250ca9a1ac Port application from Next.js to Nuxt
Nuxt is based on Vue.js and I find their building blocks to be much
neater compared to the React based Next.js.
2025-03-05 15:36:50 +01:00