Operations
Operations holds the occasions your organisation works at, whether or not it hosts them: a festival's bars, a venue's autumn season. Staff create an operation, set its period, place and host, and move it from planning to archived. It is the anchor that Crew, Shifts and help content attach to. For dated events with tickets, use Events instead.
The package is @frigear-nu/operations. It registers the operation grant kind of Auth's record audiences.
What you get
- Pages: the public page of a public operation at
/operations/:slug(on by default,pages.public: falseturns it off). - Admin area (opt-in, with Admin): an operation list at
/admin/operations, and an operation page at/admin/operations/:idwith a Details tab and the tabs other modules add. The sidebar entry needs Menu. - Server routes (on by default): browse the public operations and the ones you take part in, and a staff API for
operations and their status. The staff API is guarded by
operations:manage. - Composables and helpers:
useOperationActions,useOperationLinksand the path buildersoperationsApi. - Hooks:
operations:created,operations:updatedandoperations:status-changed, and the participation hooksoperations:participation:resolveandoperations:participants:resolve. - Grant kind:
operation, the people who take part in an operation (see Grants). - Wristbands (with Users): the bands people wear at an operation, by printed number and NFC UID, stored encrypted, with a staff tab, a CSV import, self-registration and a "My wristband" dashboard item (see Wristbands).
- Emails. None built in. Send one from
operations:status-changed.
@nuxthub/core, and @nuxt/ui for the pages.
Optional:Admin for the admin pages, Widget for the tabs
of the operation page, Menu for the sidebar entry, Events to link
an operation to an event, Users for wristbands.Quick setup
Install Operations
pnpm add @frigear-nu/operations @nuxthub/core
Add it to nuxt.config.ts
List Widget and Menu (or Admin, which installs them) before Operations, so the tabs and the menu entry register.
export default defineNuxtConfig({
modules: ['@nuxthub/core', '@frigear-nu/admin', '@frigear-nu/operations'],
operations: {
settings: {
pages: { admin: true, adminOperation: true },
},
},
})
Generate the migration
operations table does not exist, and every request to it fails.pnpm db:generate
Decide who manages operations
operations:manage, nobody can manage operations. The admin role holds it when your app defines it.The module grants operations:manage to admin only, when your app defines it. Give it to a role of your own by
name:
export default defineNuxtConfig({
authorization: {
roles: {
organiser: { label: 'Organiser', grant: ['operations:manage'], inherit: ['user'] },
},
},
})
/admin/operations, adds "Summer festival 2027" and lands
on its page in planning. Marking it public shows it at /operations/summer-festival-2027 for everyone.Options
Options go under the operations key.
| Option | Type | Default | Purpose |
|---|---|---|---|
settings.pages.public | string | boolean | true | The public page. true is /operations/:slug, false turns it off. |
settings.pages.admin | string | boolean | off | The staff operation list. true is /admin/operations. |
settings.pages.adminOperation | string | boolean | off | The staff operation page. true is /admin/operations/:id. |
settings.pages.* paths keep the parameters of the default, such as :slug. The admin pages need Admin.
With Users, one runtime setting: NUXT_OPERATIONS_WRISTBANDS_KEY (runtimeConfig.operations.wristbandsKey), the
secret wristband numbers and NFC UIDs are encrypted with, at least 32 characters. Unset, a key is derived from
NUXT_APP_SECRET. See Encryption.
Permissions
Operations registers these permissions with Authorization. Staff routes call
authorize(event, operationsAccess.permissions.manage).
| Name | Flags | Held by default | What it allows |
|---|---|---|---|
operations:manage | admin | Create and edit operations, move them through their statuses and delete them. | |
operations:read | implicit | every signed-in user | Read the public operations and the ones you take part in. |
operation-wristbands:pii | sensitive | admin | See who wears which wristband, add, edit, replace, revoke, delete and import wristbands. With Users only. |
operation-wristbands:me | implicit | every signed-in user | Read your own active wristbands. With Users only. |
operation-wristbands:register | implicit | every signed-in user | Add your own wristband at a current operation you take part in. With Users only. |
- Scope: a token may use the named scope
operationsoroperations:readitself. Either lets it read operations, and both are refused every staff route. With Users, the named scopewristbandsstands foroperation-wristbands:meandoperation-wristbands:register: what an app needs to show and add the user's own bands. - Policy on
operations:read: an operation is readable when it ispublic, when the user takes part in it (see Who takes part), or when the caller holdsoperations:manage. Operations registers it itself withaddPolicies. - Wristbands are a resource of their own. Permission names are
resource:action, so the wristband permissions areoperation-wristbands:*, exported asoperationWristbandsAccess.operations:*does not reach them, andoperation-wristbands:piiis sensitive (it links people to identifiers): grant it to your staff roles by name. - Not readable is 404. A non-public operation answers
404to anyone who may not read it, the same as an unknown URL name, and only after the authentication checks.
Server
Everything under /api is in the Routes section. This section covers what other modules build on.
Who takes part
Operations stores no participants. Two provider hooks answer who takes part, and the modules that know it (crew) listen to them:
| Hook | Context | Listeners add |
|---|---|---|
operations:participation:resolve | { event, user, operationIds } | The ids of the operations user takes part in. |
operations:participants:resolve | { event, operationIds, userIds } | The ids (as text) of the users who take part in any of operationIds. |
GET /api/operations/me, the public list, the operations:read policy and the operation grant kind all ask these
hooks. The answer for one user is cached per request. Identify the user from ctx.user, never from the session on
ctx.event: it is empty for bearer requests. A listener that throws counts as no participation. Until a module
listens, a signed-in user sees the public operations only, and /me answers [].
The server utils operationsParticipationOf(event, userId), operationsTakesPart(event, userId, operationId) and
operationsParticipants(event, operationIds) call them for other modules.
Grants
Operations registers the operation kind of Auth's record audiences:
| Kind | Keys | Admits | members |
|---|---|---|---|
operation | operationId | Signed-in users who take part in the operation. | operations:participants:resolve. |
A grant naming an operation that does not exist is refused when it is stored. In <GrantsEditor> the kind picks an
operation from the staff list (GET /api/admin/operations, the first 100), so only staff with operations:manage can
pick one. That is on purpose: who takes part in which operation is the operations staff's call. Anyone else editing a
grant list (an FAQ editor with faq:manage, say) sees an empty picker, and a stored operation grant keeps its id.
Status
An operation moves along planning → active → wrapped_up → archived, and planning → archived for a plan that never
happens. archived is final. Any other move is 409 with the code invalid_status_transition, and the response's
data holds from and to. The helpers canTransition(from, to) and nextStatuses(from) are exported from
@frigear-nu/operations/utils, so a UI offers only the moves that work.
The status route updates conditionally on the status it read, so two staff members moving one operation at once cannot both succeed.
Link to an event
eventId names an Events event. It is a plain column, not a foreign key: the id is checked
against the events table (400 when it does not exist) only when Events is installed, and is accepted as it is
otherwise.
Location and venue layout
Operations builds on Maps, which it installs. Both values live in the operations table,
and coordinators (operations:manage) edit them on the operation page.
- Location.
locationholds a name and an address to show, and the value of the location picker: apoint, withradiusMetersor anareaaround it. The Details tab edits it with<MapLocationField>, and the public page shows the place on a map. A radius or an area needs the point, never both, and an empty location is refused: sendnullto clear it. - Venue layout.
venueLayoutis a plane layout: the stations, containers and areas of the venue, drawn on an uploaded floor plan with<MapPlaneEditor>in the Venue layout tab. Every feature has a stable id, which a shift'slocation.featureIdpoints to. The tab shows the saved layout under the editor, with the live layers of theoperations.venue-layoutsurface (OPERATIONS_VENUE_SURFACE), such as who is on duty from Shifts. - Feature kinds. Operations registers
operations.station(a point or an area, with a description and taps) andoperations.container(a point or an area, with a number, contents and cooled). A venue layout may hold those and the built-inmaps.area,maps.line,maps.labelandmaps.marker(OPERATIONS_VENUE_KINDS). - The underlay image is stored in NuxtHub Blob under
operations/<id>/, at mostmaps.maxUnderlayBytes. Saving the layout keeps it; a layout sent withunderlay: nullremoves it, and deleting the operation deletes it. A layout sent with an external underlay URL is refused (400): Maps accepts only paths on the app. - Two editors at once. The staff
GETanswers the layout'srevision. Send it back with a change (PUT { layout, revision },POST .../underlay?revision=) and a layout someone changed since you read it is not overwritten:409with the codevenue_layout_changed(an upload is refused before the image is stored). The upload answers the new revision. Every write is also conditional on the layout the request read, so a save and an upload that run at the same time never lose each other's change. - On the map. Coordinators place the venue layout on the real map in the Venue layout tab: the map opens on the
operation's location, which stays visible while they move, turn and scale the plan (see
Maps). Without a location, the tab says so and links to Details. The placement
(
venuePlacement, aPlanePlacement) holds the georeference, the underlay (none, map tiles or the floor plan) and its opacity, and the grid (plane units, or 0.5 m and 1 m once placed). It is saved apart from the layout withPUT .../venue-layout/placement, which has its ownplacementRevisionand409 venue_placement_changed. The layout can also be drawn directly on the map (crs: 'geo'). - Over the site map. Once placed (or drawn on the map), the public page and the tab's "On the site map" card show the layout over the operation's location, with a toggle, and the on-duty live layer of shifts on it for those allowed to read it.
Dashboard item
With Dashboard installed, Operations adds operations.upcoming to crew.home and
the hub's dashboard (permission operations:read, order 50): the operations the person takes part in that have not ended, soonest first,
from GET /api/operations/me. It shows a skeleton while loading, an empty state when there are none, and links to the
public page of an operation when it has one. Texts are under operations.dashboard (Danish and English).
Wristbands
With Users installed, an operation keeps the wristbands people wear there: the number written on the band and, when the band has a chip, its NFC UID. A gate or bar can later look a band up by either. Without Users nothing of this is registered: no table, routes, tab or dashboard item.
- One active band per person per operation. Adding a second answers
409 wristband_active_exists; withreplace: truethe current band becomeslost(withrevokedAt) and the new one is active. A partial unique index holds the rule in the database too. - Numbers and UIDs are unique per operation, whatever the band's status: a lost or revoked band keeps its number
and UID, so neither goes to someone else (
409 wristband_number_taken,409 wristband_nfc_taken). Delete a band that was added by mistake to free them, or add the new one withforce: trueto take them over: each band that has the number or the UID is released (an active one becomesrevoked, withrevokedAt), keeps the values in its history and is no longer found by them. A band of the same person taken over this way needs noreplace. - Who took a band out of use. A band that is marked lost, revoked, replaced or taken over records the staff member
(
revokedBy, a user id, withrevokedAt) and why (revokedReason):lostorrevoked(the revoke route, the status it set),replaced(replace: true, or areplacerow of the import) ortaken_over(force: true). The staff DTO carries both, plusrevokedByUser({ id, name, nickname, email, avatar },nullwhen unknown). Bands from before this was recorded havenullin all three. - NFC UIDs are stored without separators and uppercased (
04:a2:2b:1cis04A22B1C), 8, 14 or 20 hex characters (4, 7 and 10 byte UIDs). Anything else is a400. - Cleanup. Deleting an operation deletes its bands; deleting a user (the
users:deletedhook of Users) deletes theirs. sourcesays how a band was added:manual(staff),import(a CSV),self(the person, see Self-registration) orstation(staff paired it in an app, see Pairing at a station).
Encryption
The number and the NFC UID are stored encrypted (AES-GCM, v1.<iv>.<ciphertext>, bound to the operation and the
field), next to an HMAC of each (numberHash, nfcUidHash), keyed per operation, that the unique indexes and lookups
use. Both keys are derived (HKDF) from one secret: NUXT_OPERATIONS_WRISTBANDS_KEY, else one derived from
NUXT_APP_SECRET. With neither, the wristband routes answer 501 not_configured as soon as they need the key.
NUXT_APP_SECRET while the wristband key is unset, makes every stored band unreadable
(500 wristband_unreadable) and its number and UID unfindable. Set NUXT_OPERATIONS_WRISTBANDS_KEY before you rotate
the app secret.Bands stored before encryption hold plain text and no numberHash. They are sealed on first access: the lookups, the
staff list and the import seal the operation's remaining ones first (one cheap IS NULL query when there are none).
sealPendingOperationWristbands(operationId?) does it from your own code. Because the values are encrypted, the staff
search finds a band only by its whole number or UID, and the list cannot sort by number.
The staff tab
The operation page gets a Wristbands tab (permission operation-wristbands:pii): a search over the person's name,
nickname and email, and for a whole number or NFC UID (with or without separators), status and source filters, Add
wristband and Import wristbands. Bands people added themselves carry a Self-registered badge, bands paired in the app a Paired at a station
badge; staff correct them with the same actions. A band out of use says who took it out and when under its status
("Revoked by Ada · 1 Dec 2026, 14:03", also "Marked lost by", "Replaced by", "Taken over by"). The row menu offers Edit wristband, Replace wristband, Mark as lost and
Revoke wristband, and
Delete wristband in its own group; revoking and deleting ask first. useOperationWristbandActions() owns these actions
(create, edit, replace, revoke, remove, importCsv, menu(band), and revokedNote(band) for that line).
The admin user page of Users gets a
Wristbands tab with the person's bands across operations.
CSV import
POST /api/admin/operations/:id/wristbands/import takes { csv, dryRun } (dryRun defaults to true). The file
has a header line, then one band per line, comma, semicolon or tab separated, at most 5,000 rows:
| Column | Required | Matches |
|---|---|---|
userId | one of the three | The user with this id. |
email | one of the three | The user with this email, in any case. |
peopleNumber | one of the three | The user with this people number. Two users with the same number is ambiguous. |
number | yes | The printed number. |
nfcUid | no | The chip's UID, in any of the forms above. |
When a row has more than one of them, userId wins, then email. Header names ignore case, spaces and underscores.
Every row comes back with an action:
| Action | Applied | Meaning |
|---|---|---|
create | yes | The person's first band at this operation. |
replace | yes | The person's active band becomes lost, this one is added. |
unchanged | no | The person wears this band already. |
unmatched | no | No user found (reason: user_not_found). |
ambiguous | no | More than one user has the people number. |
conflict | no | number_taken / nfc_taken (another band's), duplicate_in_file (the file names the number, UID or person twice: every such row), nfc_differs (the person's band has this number with another UID: edit it by hand). |
invalid | no | number_missing, number_too_long, nfc_invalid, user_id_invalid, identity_missing. |
The answer is { dryRun, rows, counts, applied }, each row with its line (the header is line 1), the matched
person's userId, name and email, number and nfcUid. With dryRun: false only the create and replace
rows are written (source: 'import'), in statements that stay under D1's 100 bound parameters; running the same file
again finds them unchanged. A file without a number column or any of the three person columns is 400 invalid_csv.
The tab's import slideover takes pasted text or a file, shows the dry run, then offers "Import n wristbands".
Self-registration
A person links the band they wear to their own account, from an app (the mobile app's Wallet). The rules are the staff ones, with self-service answers:
GET /api/operations/me/wristbands/registerlists the operations they may register for: the ones they take part in (operations:participation:resolve) that are current (isCurrentOperation: notwrapped_uporarchived, and not ended), each withmyWristband({ id, numberLast4, nfcUidLast4 }) when they wear a band there, elsenull.POST /api/operations/me/wristbandswith{ operationId, number, nfcUid }: the number written on the band and the chip's UID the phone read, both required (400withoutnfcUid), so a typed number alone cannot claim someone else's band. Staff still add a band by number only. It answers201with the band (the shape ofGET /api/operations/me/wristbands), saved withsource: 'self'.
| Answer | When |
|---|---|
403 not_participating | The operation is not one of their current operations. |
409 wristband_active_exists | They wear a band at the operation already: staff replace it. |
409 wristband_taken | The number or the UID is another band's. It does not say which, so the route cannot be used to probe numbers. |
400 | nfcUid is missing, empty or not 8, 14 or 20 hex characters. |
429 rate_limited | More than 10 attempts in 15 minutes by the same person, with the Auth rate limits on. |
Pairing at a station
Staff pair bands for people whose phone cannot read the chip, at a station: an app signed in as staff (the mobile app's
scanner, mode "Wristband"). It needs operation-wristbands:pii as a scope, asked for by name (it is sensitive, so no
wildcard or named scope covers it), and whatever verifies the person: the mobile app scans their Frigear ID with the
host's verify route and takes the user id from its answer.
GET /api/admin/operations/wristband-operationslists the current operations (notwrapped_uporarchived, and not ended), soonest first, as{ id, slug, name, status, startsAt, endsAt }, so the station needs nooperations:manage.POST /api/admin/operations/:id/wristbandswith{ userId, number, nfcUid?, source: 'station' }. The answers are the staff ones:409 wristband_number_taken/wristband_nfc_takensay which value clashed, and409 wristband_active_existsis answered by sending the request again withreplace: true.
To warn before the last step, the station checks as it goes:
- The person.
GET /api/admin/operations/:id/wristbands?userId=…&wristbandStatus=activelists the band they wear there already. If there is one, staff choose to replace it (after a confirm: the old band stops working) and the pairing sendsreplace: true. - The band.
POST /api/admin/operations/:id/wristbands/lookupwith{ nfcUid }or{ number }(a POST, so the value stays out of URLs):{ wristband }, the staff band with its holder in any status, or{ wristband: null }when no band of the operation has it, and the station pairs it.400for a missing or malformed value. If it is someone's, staff may use it anyway (after a confirm): the pairing sendsforce: trueand that band is revoked. Every way of taking a band out of use asks exactly once: a band of the person's own that was confirmed as a replacement is not asked about again.
Look a band up from your own code
findOperationWristband(operationId, { number }) or findOperationWristband(operationId, { nfcUid }) is auto-imported
on the server. It normalises the value like stored values, finds it by its hash and returns the row as stored (the
values sealed: openOperationWristbandRows([row]) opens them), any status, or undefined. Check the status and your
own permission before you let anyone in:
const band = await findOperationWristband(operationId, { nfcUid: scanned })
if (band?.status !== 'active') throw forbidden('Unknown or inactive wristband.')
My wristband
With Dashboard, operations.wristband ("My wristband", order 45, permission
operation-wristbands:me) shows on crew.home and the hub's dashboard the band the person wears at each operation that is not archived: the
operation, the number and the last 4 characters of the UID. It is an optional item: people without a band never see
it. It reads GET /api/operations/me/wristbands, which never sends a whole UID.
App
Pages
| Page | Path | For |
|---|---|---|
| Public operation | /operations/:slug | Everyone, for operations with public: true. Anything else is a 404 page. |
| Operation list | /admin/operations | Staff with operations:manage. A status filter, search and sortable columns. |
| Operation page | /admin/operations/:id | Staff with operations:manage. Key facts, a Details tab (with the location picker), a Venue layout tab and the tabs other modules add. |
The list's row menu offers Open, Edit, Change status and Delete in its own group. Archiving and deleting ask to confirm. Creating and editing open the same slideover. Dates are entered in the browser's time zone.
Composables
| Composable | What it does |
|---|---|
useOperationActions() | create, edit, changeStatus, remove and menu(operation), with toasts and confirmations. |
useOperationLinks() | Locale-aware links to the public page and the admin pages. |
useOperationWristbandActions() | With Users: create, edit, replace, revoke, remove, importCsv and menu(band) for wristbands. |
Add a tab to the operation page
The staff operation page renders the admin.operations tab area of Widget. Operations
registers Details there. Any module adds a tab from its setup(), without Operations knowing about it:
import { extendTabs } from '@frigear-nu/widget/utils'
extendTabs(nuxt, 'admin.operations', { id: 'crew', component: resolver.resolve('./runtime/app/tabs/Crew.vue'), label: 'Crew', order: 10 })
Each tab component receives operation as a prop, the response of GET /api/admin/operations/:id, and may emit
refresh. Without Widget, only the Details tab renders.
authorize(event, 'operations:manage') too.Hooks
Your app answers these Nitro hooks from a server plugin (server/plugins/*.ts).
| Hook | When | Payload |
|---|---|---|
operations:created | After an operation was created, always in planning. | { event, operation } |
operations:updated | After its fields were edited. A status move does not fire it. | { event, operation, previous } |
operations:status-changed | After a move along the life cycle. | { event, operation, from, to } |
operations:participation:resolve | When a user's participation is needed. Add to operationIds. | { event, user, operationIds } |
operations:participants:resolve | When the participants of operations are listed. Add to userIds. | { event, operationIds, userIds } |
operation and previous are the staff DTO (AdminOperationDto).
Routes
Routes the module registers, and who may call them. Typed path builders are exported as operationsApi from
@frigear-nu/operations/api.
| Route | Who | What it does |
|---|---|---|
GET /api/operations | Everyone | The public operations, and the ones you take part in when signed in. ?status= filters; archived ones only with ?status=archived. |
GET /api/operations/me | Signed in | The operations you take part in (operations:participation:resolve), public or not, whatever their status. |
GET /api/operations/:slug | Everyone | One operation by URL name. Public ones for everyone, others for participants and staff, otherwise 404. |
GET /api/admin/operations | operations:manage | Paginated list with status, q (name in every language, and the URL name) and sort. Searches operations.searchText, the folded name and slug, so Æ, Ø and Å match in any case on sqlite too. |
POST /api/admin/operations | operations:manage | Create an operation. 409 when the URL name is taken. |
GET /api/admin/operations/:id | operations:manage | One operation. |
PATCH /api/admin/operations/:id | operations:manage | Edit any field except the status. |
DELETE /api/admin/operations/:id | operations:manage | Delete an operation. |
POST /api/admin/operations/:id/status | operations:manage | Body { status }. 409 invalid_status_transition for a move that is not allowed. |
GET /api/operations/:slug/venue-layout | Readers of the operation | The venue layout, with the underlay's URL and its placement. The operation's 404 for anyone else. |
GET /api/operations/:slug/venue-layout/underlay | Readers of the operation | The underlay image, nosniff, cached publicly only for a public operation. |
GET, PUT /api/admin/operations/:id/venue-layout | operations:manage | The venue layout with its revision, its placement and placementRevision. PUT takes { layout, revision? }, checked with validatePlaneLayout (400 with the issues); 409 venue_layout_changed when the layout changed since revision. |
PUT /api/admin/operations/:id/venue-layout/placement | operations:manage | { placement, revision? }: a PlanePlacement checked with planePlacementSchema (400 with the issues), or null to remove it. 409 venue_placement_changed when it changed since revision. Answers { placement, revision }. |
GET /api/operations/me/wristbands | operation-wristbands:me | Your active bands, one per operation that is not archived, with the operation and nfcUidLast4. |
POST /api/operations/me/wristbands | operation-wristbands:register | { operationId, number, nfcUid }: add your own band, see Self-registration. |
GET /api/operations/me/wristbands/register | operation-wristbands:register | Your current operations, each with myWristband or null. |
GET /api/admin/operations/wristband-operations | operation-wristbands:pii | The current operations, soonest first, for a pairing station. |
GET /api/admin/operations/:id/wristbands | operation-wristbands:pii | Paginated bands with the person. q searches name, nickname and email, and finds a whole number or NFC UID; wristbandStatus (active, lost, revoked) and wristbandSource (manual, import, self, station) filter; sort by createdAt or status. |
POST /api/admin/operations/:id/wristbands | operation-wristbands:pii | { userId, number, nfcUid?, note?, replace?, source? } (source: manual or station). 409 wristband_active_exists, wristband_number_taken, wristband_nfc_taken; 400 for an unknown user. |
PATCH /api/admin/operations/:id/wristbands/:wristbandId | operation-wristbands:pii | { number?, nfcUid?, note? }. The person and status stay. |
POST /api/admin/operations/:id/wristbands/:wristbandId/revoke | operation-wristbands:pii | { status }, lost or revoked, for an active band (409 wristband_not_active otherwise). |
DELETE /api/admin/operations/:id/wristbands/:wristbandId | operation-wristbands:pii | Delete a band added by mistake (204). |
POST /api/admin/operations/:id/wristbands/import | operation-wristbands:pii | { csv, dryRun }, see CSV import. |
GET /api/admin/operations/:id/wristbands/people | operation-wristbands:pii | ?q=: up to 20 people (name, nickname or email) for the person picker, with their emails. |
GET /api/admin/users/:id/wristbands | operation-wristbands:pii | Every band of one user across operations, with the operation (the admin user page's tab). |
POST /api/admin/operations/:id/venue-layout/underlay | operations:manage | Multipart file: a PNG, JPEG or WebP (415 otherwise, 413 when too large), ?revision= optional (409 venue_layout_changed). Answers { url, width, height, revision }. |
The URL names me, new, edit, admin and api are reserved. Responses are allowlisted DTOs with ISO dates; the
public one has no createdAt and updatedAt. The body of create and edit takes slug, name, description,
hostName, hostUrl, startsAt, endsAt, schedule (a Schedule of Module Kit),
location ({ name?, address?, point?, radiusMeters?, area? }), public and eventId. The admin forms do not edit
schedule: the API stores it, and the forms keep what is stored. Dates are ISO datetimes with an offset: a string
without one is refused, so the server's time zone never shifts an operation's period.
Database
Tables the module adds. Generate and commit a migration after installing.
| Table | Holds |
|---|---|
operations | opr_ id, a unique slug, Translated name and description, searchText (name and slug folded for search), hostName, hostUrl, startsAt / endsAt, an optional schedule, a location json, a venueLayout json (a plane layout of Maps), a venuePlacement json (where it lies on the map), status (planning, active, wrapped_up, archived), public and an optional eventId. |
| operation_wristbands | With Users only. owb_ id, operationId, userId, number and nfcUid (nullable), both encrypted, numberHash and nfcUidHash (their HMACs; numberHash is null only on a band from before encryption), status (active, lost, revoked), note, source (manual, import, self, station), createdAt, createdBy, revokedAt, updatedAt. Unique (operationId, numberHash) and (operationId, nfcUidHash), an index on userId, and a partial unique (operationId, userId) where status = 'active'. No foreign keys: the rows go with the operation or the user. |
Translated texts are a string or a { da, en } map. Operations has no participants table: see
Who takes part.
Translations
Override any string in your app's i18n/locales/<code>.json. The module registers da and en files under
operations.*. See overriding module strings.
Without @nuxtjs/i18n, the pages use en.
{ "operations": { "admin": { "statuses": { "wrapped_up": "Done" } } } }
Key groups: menu.*, permissions.*, scopes.*, admin.* (with admin.tabs.*, admin.statuses.* and
admin.statusActions.*), dashboard.* and wristbands.* (with wristbands.statuses.*, wristbands.sources.*,
wristbands.errors.*, wristbands.importActions.* and wristbands.importReasons.*). Top-level keys include notFound, when, where and hostedBy.
Who sees what
The public list (GET /api/operations) never widens for staff: it shows public operations and the ones the caller takes
part in, whoever asks. Staff list everything through the admin API. The slug route (GET /api/operations/:slug) does
let staff read any operation, and participants read theirs. The public page at /operations/:slug is stricter: it is
a 404 page for an operation that is not public, for participants and staff too.
Next steps
- Crew – applications and invites that make people an operation's crew.
- Record audiences – the grant lists the
operationkind belongs to. - Widget – the tab areas modules extend on the operation page.