@frigear-nu/crew 0.0.0-stage → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -2
- package/dist/module.d.mts +250 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +172 -0
- package/dist/runtime/access.d.ts +1 -0
- package/dist/runtime/access.js +45 -0
- package/dist/runtime/app/components/CrewAddMemberSlideover.d.vue.ts +18 -0
- package/dist/runtime/app/components/CrewAddMemberSlideover.vue +198 -0
- package/dist/runtime/app/components/CrewAddMemberSlideover.vue.d.ts +18 -0
- package/dist/runtime/app/components/CrewInviteSlideover.d.vue.ts +14 -0
- package/dist/runtime/app/components/CrewInviteSlideover.vue +147 -0
- package/dist/runtime/app/components/CrewInviteSlideover.vue.d.ts +14 -0
- package/dist/runtime/app/components/CrewMemberSlideover.d.vue.ts +14 -0
- package/dist/runtime/app/components/CrewMemberSlideover.vue +126 -0
- package/dist/runtime/app/components/CrewMemberSlideover.vue.d.ts +14 -0
- package/dist/runtime/app/composables/index.d.ts +4 -0
- package/dist/runtime/app/composables/index.js +3 -0
- package/dist/runtime/app/composables/useCrewActions.d.ts +45 -0
- package/dist/runtime/app/composables/useCrewActions.js +122 -0
- package/dist/runtime/app/composables/useCrewLinks.d.ts +10 -0
- package/dist/runtime/app/composables/useCrewLinks.js +6 -0
- package/dist/runtime/app/composables/useCrewTranslate.d.ts +7 -0
- package/dist/runtime/app/composables/useCrewTranslate.js +15 -0
- package/dist/runtime/app/dashboard/CrewStatus.d.vue.ts +3 -0
- package/dist/runtime/app/dashboard/CrewStatus.vue +78 -0
- package/dist/runtime/app/dashboard/CrewStatus.vue.d.ts +3 -0
- package/dist/runtime/app/pages/apply.d.vue.ts +3 -0
- package/dist/runtime/app/pages/apply.vue +95 -0
- package/dist/runtime/app/pages/apply.vue.d.ts +3 -0
- package/dist/runtime/app/pages/home.d.vue.ts +3 -0
- package/dist/runtime/app/pages/home.vue +37 -0
- package/dist/runtime/app/pages/home.vue.d.ts +3 -0
- package/dist/runtime/app/pages/invite.d.vue.ts +3 -0
- package/dist/runtime/app/pages/invite.vue +86 -0
- package/dist/runtime/app/pages/invite.vue.d.ts +3 -0
- package/dist/runtime/app/pages/status.d.vue.ts +3 -0
- package/dist/runtime/app/pages/status.vue +21 -0
- package/dist/runtime/app/pages/status.vue.d.ts +3 -0
- package/dist/runtime/app/tabs/Crew.d.vue.ts +9 -0
- package/dist/runtime/app/tabs/Crew.vue +590 -0
- package/dist/runtime/app/tabs/Crew.vue.d.ts +9 -0
- package/dist/runtime/app/tabs/HomeOverview.d.vue.ts +3 -0
- package/dist/runtime/app/tabs/HomeOverview.vue +8 -0
- package/dist/runtime/app/tabs/HomeOverview.vue.d.ts +3 -0
- package/dist/runtime/app/tabs/HomeStatus.d.vue.ts +3 -0
- package/dist/runtime/app/tabs/HomeStatus.vue +90 -0
- package/dist/runtime/app/tabs/HomeStatus.vue.d.ts +3 -0
- package/dist/runtime/app/utils/admin-crew.d.ts +48 -0
- package/dist/runtime/app/utils/admin-crew.js +23 -0
- package/dist/runtime/app/widgets/InboxAddToCrew.d.vue.ts +13 -0
- package/dist/runtime/app/widgets/InboxAddToCrew.vue +34 -0
- package/dist/runtime/app/widgets/InboxAddToCrew.vue.d.ts +13 -0
- package/dist/runtime/dashboard.d.ts +8 -0
- package/dist/runtime/dashboard.js +14 -0
- package/dist/runtime/emails/crew-status-applied.d.vue.ts +16 -0
- package/dist/runtime/emails/crew-status-applied.vue +40 -0
- package/dist/runtime/emails/crew-status-applied.vue.d.ts +16 -0
- package/dist/runtime/emails/crew-status-approved.d.vue.ts +16 -0
- package/dist/runtime/emails/crew-status-approved.vue +40 -0
- package/dist/runtime/emails/crew-status-approved.vue.d.ts +16 -0
- package/dist/runtime/emails/crew-status-rejected.d.vue.ts +15 -0
- package/dist/runtime/emails/crew-status-rejected.vue +33 -0
- package/dist/runtime/emails/crew-status-rejected.vue.d.ts +15 -0
- package/dist/runtime/emails/crew-status-waitlisted.d.vue.ts +16 -0
- package/dist/runtime/emails/crew-status-waitlisted.vue +40 -0
- package/dist/runtime/emails/crew-status-waitlisted.vue.d.ts +16 -0
- package/dist/runtime/emails/crew-status-withdrawn.d.vue.ts +16 -0
- package/dist/runtime/emails/crew-status-withdrawn.vue +40 -0
- package/dist/runtime/emails/crew-status-withdrawn.vue.d.ts +16 -0
- package/dist/runtime/i18n/lang/da.json +241 -0
- package/dist/runtime/i18n/lang/en.json +241 -0
- package/dist/runtime/menus.d.ts +2 -0
- package/dist/runtime/menus.js +19 -0
- package/dist/runtime/notifications.d.ts +5 -0
- package/dist/runtime/notifications.js +10 -0
- package/dist/runtime/server/db/schema.postgresql.d.ts +433 -0
- package/dist/runtime/server/db/schema.postgresql.js +43 -0
- package/dist/runtime/server/db/schema.sqlite.d.ts +451 -0
- package/dist/runtime/server/db/schema.sqlite.js +43 -0
- package/dist/runtime/server/db/team-members.postgresql.d.ts +143 -0
- package/dist/runtime/server/db/team-members.postgresql.js +20 -0
- package/dist/runtime/server/db/team-members.sqlite.d.ts +151 -0
- package/dist/runtime/server/db/team-members.sqlite.js +20 -0
- package/dist/runtime/server/plugins/forms.d.ts +2 -0
- package/dist/runtime/server/plugins/forms.js +27 -0
- package/dist/runtime/server/plugins/participation.d.ts +2 -0
- package/dist/runtime/server/plugins/participation.js +16 -0
- package/dist/runtime/server/policies.d.ts +2 -0
- package/dist/runtime/server/policies.js +10 -0
- package/dist/runtime/server/routes/admin/forms.get.d.ts +2 -0
- package/dist/runtime/server/routes/admin/forms.get.js +8 -0
- package/dist/runtime/server/routes/admin/invite.delete.d.ts +2 -0
- package/dist/runtime/server/routes/admin/invite.delete.js +13 -0
- package/dist/runtime/server/routes/admin/invites.get.d.ts +2 -0
- package/dist/runtime/server/routes/admin/invites.get.js +14 -0
- package/dist/runtime/server/routes/admin/invites.post.d.ts +2 -0
- package/dist/runtime/server/routes/admin/invites.post.js +31 -0
- package/dist/runtime/server/routes/admin/member-approve.post.d.ts +2 -0
- package/dist/runtime/server/routes/admin/member-approve.post.js +10 -0
- package/dist/runtime/server/routes/admin/member-reject.post.d.ts +2 -0
- package/dist/runtime/server/routes/admin/member-reject.post.js +9 -0
- package/dist/runtime/server/routes/admin/member-submission.get.d.ts +2 -0
- package/dist/runtime/server/routes/admin/member-submission.get.js +17 -0
- package/dist/runtime/server/routes/admin/member-waitlist.post.d.ts +2 -0
- package/dist/runtime/server/routes/admin/member-waitlist.post.js +9 -0
- package/dist/runtime/server/routes/admin/member-withdraw.post.d.ts +2 -0
- package/dist/runtime/server/routes/admin/member-withdraw.post.js +9 -0
- package/dist/runtime/server/routes/admin/member.patch.d.ts +2 -0
- package/dist/runtime/server/routes/admin/member.patch.js +10 -0
- package/dist/runtime/server/routes/admin/members-approve.post.d.ts +2 -0
- package/dist/runtime/server/routes/admin/members-approve.post.js +12 -0
- package/dist/runtime/server/routes/admin/members.get.d.ts +2 -0
- package/dist/runtime/server/routes/admin/members.get.js +10 -0
- package/dist/runtime/server/routes/admin/members.post.d.ts +2 -0
- package/dist/runtime/server/routes/admin/members.post.js +30 -0
- package/dist/runtime/server/routes/admin/settings.get.d.ts +2 -0
- package/dist/runtime/server/routes/admin/settings.get.js +9 -0
- package/dist/runtime/server/routes/admin/settings.put.d.ts +2 -0
- package/dist/runtime/server/routes/admin/settings.put.js +12 -0
- package/dist/runtime/server/routes/admin/users.get.d.ts +2 -0
- package/dist/runtime/server/routes/admin/users.get.js +8 -0
- package/dist/runtime/server/routes/me/crew.get.d.ts +2 -0
- package/dist/runtime/server/routes/me/crew.get.js +5 -0
- package/dist/runtime/server/routes/public/apply.get.d.ts +2 -0
- package/dist/runtime/server/routes/public/apply.get.js +9 -0
- package/dist/runtime/server/routes/public/invite-accept.post.d.ts +2 -0
- package/dist/runtime/server/routes/public/invite-accept.post.js +7 -0
- package/dist/runtime/server/routes/public/member.get.d.ts +2 -0
- package/dist/runtime/server/routes/public/member.get.js +9 -0
- package/dist/runtime/server/routes/public/members.get.d.ts +2 -0
- package/dist/runtime/server/routes/public/members.get.js +11 -0
- package/dist/runtime/server/utils/crew-dto.d.ts +46 -0
- package/dist/runtime/server/utils/crew-dto.js +80 -0
- package/dist/runtime/server/utils/crew-emails.d.ts +43 -0
- package/dist/runtime/server/utils/crew-emails.js +139 -0
- package/dist/runtime/server/utils/crew-schemas.d.ts +121 -0
- package/dist/runtime/server/utils/crew-schemas.js +69 -0
- package/dist/runtime/server/utils/crew-send.d.ts +19 -0
- package/dist/runtime/server/utils/crew-send.js +20 -0
- package/dist/runtime/server/utils/crew-settings.d.ts +52 -0
- package/dist/runtime/server/utils/crew-settings.js +100 -0
- package/dist/runtime/server/utils/crew-tokens.d.ts +8 -0
- package/dist/runtime/server/utils/crew-tokens.js +9 -0
- package/dist/runtime/server/utils/crew.d.ts +172 -0
- package/dist/runtime/server/utils/crew.js +502 -0
- package/dist/runtime/utils/api.d.ts +44 -0
- package/dist/runtime/utils/api.js +47 -0
- package/dist/runtime/utils/index.d.ts +8 -0
- package/dist/runtime/utils/index.js +6 -0
- package/dist/runtime/utils/links.d.ts +49 -0
- package/dist/runtime/utils/links.js +27 -0
- package/dist/runtime/utils/status.d.ts +36 -0
- package/dist/runtime/utils/status.js +39 -0
- package/dist/types.d.mts +5 -0
- package/package.json +118 -3
package/README.md
CHANGED
|
@@ -1,3 +1,40 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @frigear-nu/crew
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An operation's crew: who applied, who is approved, and which team and role they hold. A volunteer applies through a
|
|
4
|
+
[forms](../forms) form chosen per operation, staff approve, reject or waitlist, and an invite link puts a lead on a team
|
|
5
|
+
directly. Crew is built on [teams](../teams): an approved person holds a team role of one of the operation's teams.
|
|
6
|
+
Part of the volunteering modules: crew answers who takes part in an operation, which the `operation` grant kind of
|
|
7
|
+
[`@frigear-nu/operations`](../operations) and its `operations:read` policy use.
|
|
8
|
+
|
|
9
|
+
- Crew memberships are `team_members` rows with a `crewStatus` (`applied`, `waitlisted`, `approved`, `rejected`,
|
|
10
|
+
`withdrawn`). Teams' own `status` follows it (`pending`, `active`, `inactive`), so only an approved person holds the role.
|
|
11
|
+
- Applications are submissions of the operation's form (`forms:submitted`); the form must ask for a signed-in user.
|
|
12
|
+
- Capacity with a waiting list that moves up when a place frees, and "earlier crew first".
|
|
13
|
+
- Invite links with hashed tokens, a number of uses claimed atomically, an optional expiry and an optional lead role.
|
|
14
|
+
- Role presets from the `rolePresets` option (global roles or plans to team roles, none by default) and status emails
|
|
15
|
+
through notify.
|
|
16
|
+
- Hooks `crew:member:applied|approved|rejected|waitlisted|withdrawn`; answers `operations:participation:resolve` and
|
|
17
|
+
`operations:participants:resolve` with the people who take part in an operation (approved crew, and members added by
|
|
18
|
+
hand).
|
|
19
|
+
- Permissions `crew:apply`, `crew:read`, `crew:manage`, `crew:pii` and `crew:invite` (session only); the `crew` scope.
|
|
20
|
+
- Pages `/crew` (the `crew.home` dashboard, signed in), `/crew/apply/:operationSlug`, `/crew/status` and
|
|
21
|
+
`/crew/invite/:token`, and a Crew tab on the operation page.
|
|
22
|
+
|
|
23
|
+
## Quick Setup
|
|
24
|
+
|
|
25
|
+
Requires `@nuxthub/core`. Operations, Teams, Forms, Notify, Dashboard, Users and Auth are installed for you; `@frigear-nu/admin` and
|
|
26
|
+
`@frigear-nu/widget` (the Crew tab), `@frigear-nu/menu`, `@frigear-nu/mobile` and `@frigear-nu/email-templates` are
|
|
27
|
+
optional; `@nuxt/ui` is needed for the pages.
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
export default defineNuxtConfig({
|
|
31
|
+
modules: ['@nuxthub/core', '@frigear-nu/admin', '@frigear-nu/widget', '@frigear-nu/crew'],
|
|
32
|
+
operations: { settings: { pages: { admin: true, adminOperation: true } } },
|
|
33
|
+
teams: { settings: { pages: { admin: true, adminTeam: true } } },
|
|
34
|
+
})
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Generate and commit a migration in your app (see the repository `AGENTS.md`): crew adds the `crew_settings` and
|
|
38
|
+
`crew_invites` tables, columns to `team_members` and a `phone` column to `users`.
|
|
39
|
+
|
|
40
|
+
Full documentation: <https://docs.frigear.dev/modules/volunteering/crew>.
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
+
import { H3Event } from 'h3';
|
|
3
|
+
import { Translated } from '@frigear-nu/ui/translated';
|
|
4
|
+
export { Translated } from '@frigear-nu/ui/translated';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Where a person stands in an operation's crew. Teams' own `status` follows it: `applied` and `waitlisted` are
|
|
8
|
+
* `pending`, `approved` is `active`, `rejected` and `withdrawn` are `inactive`. Only an approved person holds the role.
|
|
9
|
+
*/
|
|
10
|
+
type CrewStatus = 'applied' | 'waitlisted' | 'approved' | 'rejected' | 'withdrawn';
|
|
11
|
+
/** The email of one status: `enabled: false` turns it off, `subject` and `body` replace the built-in text. */
|
|
12
|
+
type CrewStatusEmail = {
|
|
13
|
+
enabled?: boolean;
|
|
14
|
+
/** May use `{{name}}`, `{{operation}}`, `{{team}}`, `{{role}}` and `{{status}}`. */
|
|
15
|
+
subject?: Translated;
|
|
16
|
+
/** Plain text, with the same variables. Replaces the built-in message of the template. */
|
|
17
|
+
body?: Translated;
|
|
18
|
+
};
|
|
19
|
+
/** The emails sent when a person's crew status changes, per status. A status left out sends the built-in email. */
|
|
20
|
+
type CrewStatusEmails = Partial<Record<CrewStatus, CrewStatusEmail>>;
|
|
21
|
+
/** A role mapping preset: everyone matching `match` (a global role, or an active subscription to a plan) holds `teamRole`. */
|
|
22
|
+
type CrewRolePreset = {
|
|
23
|
+
match: {
|
|
24
|
+
role: string;
|
|
25
|
+
} | {
|
|
26
|
+
plan: string;
|
|
27
|
+
};
|
|
28
|
+
teamRole: string;
|
|
29
|
+
};
|
|
30
|
+
type ModuleOptions = {
|
|
31
|
+
settings?: {
|
|
32
|
+
pages?: {
|
|
33
|
+
/**
|
|
34
|
+
* The crew member's home page: the `crew.dashboard` tabs (Overview, the `crew.home` dashboard with every module's
|
|
35
|
+
* items for the signed-in person; My crew; shifts' My shifts and Swaps). On by default: `/dashboard/crew` (below
|
|
36
|
+
* the signed-in hub of `@frigear-nu/dashboard`, in its layout and `dashboard` menu), `/crew` when the hub is off.
|
|
37
|
+
* `false` turns it off.
|
|
38
|
+
*/
|
|
39
|
+
home?: string | boolean;
|
|
40
|
+
/** The page volunteers apply on, with the operation's form; must contain an `:operationSlug` param. On by default (`/crew/apply/:operationSlug`), `false` turns it off. */
|
|
41
|
+
apply?: string | boolean;
|
|
42
|
+
/**
|
|
43
|
+
* A volunteer's crew status per operation and how to step down. In the hub it is the My crew tab of the home page
|
|
44
|
+
* (`/crew/status` redirects to it) unless set to a path, which adds a page of its own; without the hub (or with
|
|
45
|
+
* `@frigear-nu/mobile`, whose Crew tab opens it) it is also a page at `/crew/status`. `false` turns both off.
|
|
46
|
+
*/
|
|
47
|
+
status?: string | boolean;
|
|
48
|
+
/** The page that accepts an invite link; must contain a `:token` param. On by default (`/crew/invite/:token`), `false` turns it off. */
|
|
49
|
+
invite?: string | boolean;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Add a "Crew" tab to the `admin.operations` tab area (when `@frigear-nu/widget` and `@frigear-nu/admin` are
|
|
53
|
+
* installed). Defaults to `true`; harmless when nothing renders the area.
|
|
54
|
+
*/
|
|
55
|
+
operationsTab?: boolean;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* The role mapping presets: owner-wide mapping rules crew adds to an operation when its settings are first saved with
|
|
59
|
+
* presets on, such as `{ match: { role: 'staff' }, teamRole: 'lead' }` or `{ match: { plan: 'yearly' }, teamRole:
|
|
60
|
+
* 'member' }`. Empty by default: the app names its own global roles, plans and team roles.
|
|
61
|
+
*/
|
|
62
|
+
rolePresets?: CrewRolePreset[];
|
|
63
|
+
/** The team kind of the "Crew" team crew creates for an operation without teams. Defaults to teams' `default` kind. */
|
|
64
|
+
defaultTeamKind?: string;
|
|
65
|
+
/** The key of the application form field that holds the phone number, stored on the user. Defaults to `phone`. */
|
|
66
|
+
phoneField?: string;
|
|
67
|
+
};
|
|
68
|
+
type PublicModuleOptions = {
|
|
69
|
+
pages: {
|
|
70
|
+
home?: string;
|
|
71
|
+
apply?: string;
|
|
72
|
+
status?: string;
|
|
73
|
+
invite?: string;
|
|
74
|
+
};
|
|
75
|
+
/** How `@nuxtjs/i18n` puts locales in paths (`null` without it), for the links in status emails and pushes. */
|
|
76
|
+
i18n?: {
|
|
77
|
+
strategy: string;
|
|
78
|
+
defaultLocale: string | null;
|
|
79
|
+
locales: string[];
|
|
80
|
+
} | null;
|
|
81
|
+
};
|
|
82
|
+
/** The private runtime config of crew (`runtimeConfig.crew`). */
|
|
83
|
+
type CrewRuntimeConfig = {
|
|
84
|
+
rolePresets: CrewRolePreset[];
|
|
85
|
+
defaultTeamKind: string;
|
|
86
|
+
phoneField: string;
|
|
87
|
+
};
|
|
88
|
+
/** One person in an operation's crew, as staff see them (`/api/admin/crew/operations/:id/members`). */
|
|
89
|
+
type CrewMemberDto = {
|
|
90
|
+
/** The membership row's id (`tmm_...`, teams' `team_members`). */
|
|
91
|
+
id: string;
|
|
92
|
+
operationId: string;
|
|
93
|
+
teamId: string;
|
|
94
|
+
teamName: Translated;
|
|
95
|
+
userId: number;
|
|
96
|
+
name: string | null;
|
|
97
|
+
avatar: string | null;
|
|
98
|
+
/** Only with `crew:pii`; otherwise left out. */
|
|
99
|
+
email?: string | null;
|
|
100
|
+
/** Only with `crew:pii`; otherwise left out. */
|
|
101
|
+
phone?: string | null;
|
|
102
|
+
/** A role of the team kind's ladder. */
|
|
103
|
+
role: string;
|
|
104
|
+
crewStatus: CrewStatus;
|
|
105
|
+
/** Place on the waiting list, 1 first; `null` when not waitlisted. */
|
|
106
|
+
waitlistPosition: number | null;
|
|
107
|
+
/** Approved in an earlier operation. */
|
|
108
|
+
previousCrew: boolean;
|
|
109
|
+
appliedAt: string | null;
|
|
110
|
+
decidedAt: string | null;
|
|
111
|
+
decidedBy: number | null;
|
|
112
|
+
/** The forms submission of the application (its answers need `crew:pii`). */
|
|
113
|
+
submissionId: string | null;
|
|
114
|
+
};
|
|
115
|
+
/** A user the "Add crew member" picker found (`GET /api/admin/crew/users?q=`); `email` only with `crew:pii`. */
|
|
116
|
+
type CrewUserLookupDto = {
|
|
117
|
+
id: number;
|
|
118
|
+
name: string | null;
|
|
119
|
+
avatar: string | null;
|
|
120
|
+
email?: string | null;
|
|
121
|
+
};
|
|
122
|
+
/** My crew status in one operation (`GET /api/crew/me`). */
|
|
123
|
+
type MyCrewDto = {
|
|
124
|
+
operationId: string;
|
|
125
|
+
operationSlug: string;
|
|
126
|
+
operationName: Translated;
|
|
127
|
+
/** `approved` for a place added in teams (`source: 'teams'`). */
|
|
128
|
+
crewStatus: CrewStatus;
|
|
129
|
+
/** `crew`: an application or a crew place (crew staff change it). `teams`: added by teams staff, who end it in teams. */
|
|
130
|
+
source: 'crew' | 'teams';
|
|
131
|
+
teamId: string;
|
|
132
|
+
teamName: Translated;
|
|
133
|
+
role: string;
|
|
134
|
+
/** The role's label on the team kind's ladder; the role key when the ladder has no such role. */
|
|
135
|
+
roleLabel: Translated;
|
|
136
|
+
waitlistPosition: number | null;
|
|
137
|
+
appliedAt: string | null;
|
|
138
|
+
decidedAt: string | null;
|
|
139
|
+
};
|
|
140
|
+
/** What the apply page needs (`GET /api/crew/operations/:operation/apply`). */
|
|
141
|
+
type CrewApplyDto = {
|
|
142
|
+
operationId: string;
|
|
143
|
+
operationSlug: string;
|
|
144
|
+
operationName: Translated;
|
|
145
|
+
/**
|
|
146
|
+
* `open`: apply now. `scheduled`: opens later (`opensAt`). `closed`: the window or the operation is over.
|
|
147
|
+
* `unavailable`: no application form is set up. `applied`: already applied, waitlisted or approved (`crewStatus`).
|
|
148
|
+
* `rejected`: the application was turned down. `member`: already on a team of the operation.
|
|
149
|
+
*/
|
|
150
|
+
state: 'open' | 'scheduled' | 'closed' | 'unavailable' | 'applied' | 'rejected' | 'member';
|
|
151
|
+
crewStatus: CrewStatus | null;
|
|
152
|
+
/** The slug of the form to render, while the state is `open`. */
|
|
153
|
+
formSlug: string | null;
|
|
154
|
+
opensAt: string | null;
|
|
155
|
+
closesAt: string | null;
|
|
156
|
+
};
|
|
157
|
+
/** How an operation's crew is recruited (`/api/admin/crew/operations/:id/settings`). */
|
|
158
|
+
type CrewSettingsDto = {
|
|
159
|
+
operationId: string;
|
|
160
|
+
formId: string | null;
|
|
161
|
+
defaultTeamId: string | null;
|
|
162
|
+
capacity: number | null;
|
|
163
|
+
waitlist: boolean;
|
|
164
|
+
previousCrewFirst: boolean;
|
|
165
|
+
opensAt: string | null;
|
|
166
|
+
closesAt: string | null;
|
|
167
|
+
statusEmails: CrewStatusEmails;
|
|
168
|
+
presets: boolean;
|
|
169
|
+
/** `stored`: a row of `crew_settings`. `default`: nothing saved yet. */
|
|
170
|
+
source: 'stored' | 'default';
|
|
171
|
+
/** Approved crew, for the capacity. */
|
|
172
|
+
approved: number;
|
|
173
|
+
createdAt: string | null;
|
|
174
|
+
updatedAt: string | null;
|
|
175
|
+
};
|
|
176
|
+
/** A form an operation can recruit with (`GET /api/admin/crew/forms`). */
|
|
177
|
+
type CrewFormOptionDto = {
|
|
178
|
+
id: string;
|
|
179
|
+
name: string;
|
|
180
|
+
slug: string;
|
|
181
|
+
status: string;
|
|
182
|
+
};
|
|
183
|
+
/** An invite link as staff see it. The token is only in {@link CreatedCrewInviteDto}. */
|
|
184
|
+
type CrewInviteDto = {
|
|
185
|
+
id: string;
|
|
186
|
+
operationId: string;
|
|
187
|
+
teamId: string;
|
|
188
|
+
teamName: Translated | null;
|
|
189
|
+
role: string;
|
|
190
|
+
/** First characters of the token. */
|
|
191
|
+
prefix: string;
|
|
192
|
+
maxUses: number;
|
|
193
|
+
uses: number;
|
|
194
|
+
expiresAt: string | null;
|
|
195
|
+
createdBy: number | null;
|
|
196
|
+
createdAt: string;
|
|
197
|
+
revokedAt: string | null;
|
|
198
|
+
status: 'active' | 'used' | 'expired' | 'revoked';
|
|
199
|
+
};
|
|
200
|
+
/** The answer of creating an invite: the token is shown this once and never stored. */
|
|
201
|
+
type CreatedCrewInviteDto = CrewInviteDto & {
|
|
202
|
+
token: string;
|
|
203
|
+
/** The invite page with the token filled in; `null` when the invite page is turned off. */
|
|
204
|
+
path: string | null;
|
|
205
|
+
};
|
|
206
|
+
/** The answers of an application, rendered with the form's labels (`GET /api/admin/crew/members/:id/submission`). */
|
|
207
|
+
type CrewSubmissionDto = {
|
|
208
|
+
id: string;
|
|
209
|
+
formSlug: string;
|
|
210
|
+
createdAt: string;
|
|
211
|
+
locale: string;
|
|
212
|
+
answers: Array<{
|
|
213
|
+
key: string;
|
|
214
|
+
label: string;
|
|
215
|
+
value: string;
|
|
216
|
+
}>;
|
|
217
|
+
};
|
|
218
|
+
/** Context of the `crew:member:*` hooks. `member` has the contact details (listeners are server side). */
|
|
219
|
+
type CrewMemberContext = {
|
|
220
|
+
event: H3Event;
|
|
221
|
+
operationId: string;
|
|
222
|
+
member: CrewMemberDto;
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
declare module '@nuxt/schema' {
|
|
226
|
+
interface NuxtConfig {
|
|
227
|
+
crew?: ModuleOptions;
|
|
228
|
+
}
|
|
229
|
+
interface PublicRuntimeConfig {
|
|
230
|
+
crew: PublicModuleOptions;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
declare module 'nitropack' {
|
|
234
|
+
interface NitroRuntimeHooks {
|
|
235
|
+
/** Somebody applied to an operation's crew (or applied again after withdrawing). */
|
|
236
|
+
'crew:member:applied': (ctx: CrewMemberContext) => void | Promise<void>;
|
|
237
|
+
/** Somebody joined the crew: approved by staff, promoted off the waiting list or through an invite. */
|
|
238
|
+
'crew:member:approved': (ctx: CrewMemberContext) => void | Promise<void>;
|
|
239
|
+
/** An application was rejected, or an approved person was taken off the crew. */
|
|
240
|
+
'crew:member:rejected': (ctx: CrewMemberContext) => void | Promise<void>;
|
|
241
|
+
/** Somebody is on the waiting list (over the capacity, or put there by staff). */
|
|
242
|
+
'crew:member:waitlisted': (ctx: CrewMemberContext) => void | Promise<void>;
|
|
243
|
+
/** Somebody withdrew their application or their place. */
|
|
244
|
+
'crew:member:withdrawn': (ctx: CrewMemberContext) => void | Promise<void>;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
248
|
+
|
|
249
|
+
export { _default as default };
|
|
250
|
+
export type { CreatedCrewInviteDto, CrewApplyDto, CrewFormOptionDto, CrewInviteDto, CrewMemberContext, CrewMemberDto, CrewRolePreset, CrewRuntimeConfig, CrewSettingsDto, CrewStatus, CrewStatusEmail, CrewStatusEmails, CrewSubmissionDto, CrewUserLookupDto, ModuleOptions, MyCrewDto, PublicModuleOptions };
|
package/dist/module.json
ADDED
package/dist/module.mjs
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { defineNuxtModule, createResolver, hasNuxtModule, addServerImportsDir, addServerPlugin, addImports, addComponentsDir } from '@nuxt/kit';
|
|
2
|
+
import { registerModule, registerTailwindSource, registerLocales, resolveDashboardHubPath, isPathUnder, resolvePagePath, registerDatabaseTable, extendDatabaseTable, addModuleRoutes, inlineModuleRuntime, addModulePages, addPageRedirects, addOptionalMenuSource } from '@frigear-nu/module-kit/utils';
|
|
3
|
+
import { registerAccess, addPolicies, guardPages } from '@frigear-nu/auth/utils';
|
|
4
|
+
import { crewAccess } from '../dist/runtime/access.js';
|
|
5
|
+
import { resolveCrewHomePath, CREW_DEFAULT_PAGES, CREW_HOME_TABS, CREW_HOME_TAB, crewHomeTab } from '../dist/runtime/utils/links.js';
|
|
6
|
+
import { extendDashboard } from '@frigear-nu/dashboard/utils';
|
|
7
|
+
import { CREW_DASHBOARD, crewDashboardItems } from '../dist/runtime/dashboard.js';
|
|
8
|
+
import { extendNotificationTopics } from '@frigear-nu/notify/utils';
|
|
9
|
+
import { crewNotificationTopics } from '../dist/runtime/notifications.js';
|
|
10
|
+
|
|
11
|
+
const MODULE_NAME = "@frigear-nu/crew";
|
|
12
|
+
const module$1 = defineNuxtModule({
|
|
13
|
+
meta: { name: MODULE_NAME, configKey: "crew" },
|
|
14
|
+
defaults: {
|
|
15
|
+
settings: { pages: {} }
|
|
16
|
+
},
|
|
17
|
+
moduleDependencies: {
|
|
18
|
+
"@nuxthub/core": { version: ">=0.10" },
|
|
19
|
+
"@frigear-nu/module-kit": { version: ">=0.0.1" },
|
|
20
|
+
"@frigear-nu/auth": { version: ">=0.0.1" },
|
|
21
|
+
// The crew are users: the member list, the phone number and the emails read the `users` table.
|
|
22
|
+
"@frigear-nu/users": { version: ">=0.0.1" },
|
|
23
|
+
"@frigear-nu/ui": { version: ">=0.0.1" },
|
|
24
|
+
// Crew memberships are teams memberships, and an operation owns the teams.
|
|
25
|
+
"@frigear-nu/operations": { version: ">=0.0.0" },
|
|
26
|
+
"@frigear-nu/teams": { version: ">=0.0.0" },
|
|
27
|
+
// Applications are submissions of a forms form.
|
|
28
|
+
"@frigear-nu/forms": { version: ">=0.0.1" },
|
|
29
|
+
// The status message goes through notify's `notifyUser` (email and push, by the person's choice).
|
|
30
|
+
"@frigear-nu/notify": { version: ">=0.0.1" },
|
|
31
|
+
"@frigear-nu/menu": { version: ">=0.0.1", optional: true },
|
|
32
|
+
// The Crew tab of the operation page and the "Add to crew" action of an inbox thread (`inbox.thread.actions`).
|
|
33
|
+
"@frigear-nu/widget": { version: ">=0.0.0" },
|
|
34
|
+
// The `crew.home` dashboard: this module's items, and the crew home page that renders it.
|
|
35
|
+
"@frigear-nu/dashboard": { version: ">=0.0.0" },
|
|
36
|
+
// Provides the admin route and shell the operation page lives in.
|
|
37
|
+
"@frigear-nu/admin": { version: ">=0.0.0", optional: true },
|
|
38
|
+
"@frigear-nu/mobile": { version: ">=0.0.0", optional: true },
|
|
39
|
+
// Renders the `crew-status-*` emails from the templates this module ships.
|
|
40
|
+
"@frigear-nu/email-templates": { version: ">=0.0.1", optional: true }
|
|
41
|
+
},
|
|
42
|
+
async setup(options, nuxt) {
|
|
43
|
+
registerModule(MODULE_NAME, nuxt);
|
|
44
|
+
const resolver = createResolver(import.meta.url);
|
|
45
|
+
registerAccess(nuxt, crewAccess, { from: MODULE_NAME });
|
|
46
|
+
addPolicies(nuxt, { path: resolver.resolve("./runtime/server/policies") });
|
|
47
|
+
registerTailwindSource(nuxt, resolver.resolve("./runtime/app"));
|
|
48
|
+
registerLocales(nuxt, resolver.resolve("./runtime/i18n/lang"));
|
|
49
|
+
const settings = options.settings ?? {};
|
|
50
|
+
const hub = resolveDashboardHubPath(nuxt, { dependency: true });
|
|
51
|
+
const homePath = resolveCrewHomePath(settings.pages?.home, hub);
|
|
52
|
+
const inDashboard = !!(hub && homePath && isPathUnder(homePath, hub));
|
|
53
|
+
const tabsOnly = inDashboard && !hasNuxtModule("@frigear-nu/mobile");
|
|
54
|
+
const statusSetting = settings.pages?.status ?? true;
|
|
55
|
+
const statusPath = tabsOnly && typeof statusSetting !== "string" ? void 0 : resolvePagePath(statusSetting, CREW_DEFAULT_PAGES.status);
|
|
56
|
+
const applyPath = resolvePagePath(settings.pages?.apply ?? true, CREW_DEFAULT_PAGES.apply);
|
|
57
|
+
const invitePath = resolvePagePath(settings.pages?.invite ?? true, CREW_DEFAULT_PAGES.invite);
|
|
58
|
+
const i18nOptions = nuxt.options.i18n;
|
|
59
|
+
const i18nLocales = (i18nOptions?.locales ?? []).map((locale) => typeof locale === "string" ? locale : locale.code);
|
|
60
|
+
const i18n = i18nLocales.length ? { strategy: i18nOptions?.strategy ?? "prefix_except_default", defaultLocale: i18nOptions?.defaultLocale ?? null, locales: i18nLocales } : null;
|
|
61
|
+
nuxt.options.runtimeConfig.public.crew = { pages: { home: homePath, apply: applyPath, status: statusPath, invite: invitePath }, i18n };
|
|
62
|
+
const runtime = nuxt.options.runtimeConfig;
|
|
63
|
+
runtime.crew = {
|
|
64
|
+
...runtime.crew,
|
|
65
|
+
rolePresets: options.rolePresets ?? [],
|
|
66
|
+
defaultTeamKind: options.defaultTeamKind ?? "default",
|
|
67
|
+
phoneField: options.phoneField ?? "phone"
|
|
68
|
+
};
|
|
69
|
+
registerDatabaseTable(nuxt, {
|
|
70
|
+
resolver,
|
|
71
|
+
schema: (dialect) => `./runtime/server/db/schema.${dialect}`
|
|
72
|
+
});
|
|
73
|
+
extendDatabaseTable(nuxt, {
|
|
74
|
+
resolver,
|
|
75
|
+
file: (dialect) => `./runtime/server/db/team-members.${dialect}`
|
|
76
|
+
});
|
|
77
|
+
addModuleRoutes(resolver, [
|
|
78
|
+
{ method: "get", path: "me", file: "me/crew.get" },
|
|
79
|
+
{ method: "get", path: "operations/:operation/apply", file: "public/apply.get" },
|
|
80
|
+
{ method: "post", path: "invites/:token/accept", file: "public/invite-accept.post" },
|
|
81
|
+
// `:operation` like the apply route: h3's router wants one parameter name per segment.
|
|
82
|
+
{ method: "get", path: "operations/:operation/members", file: "public/members.get" },
|
|
83
|
+
{ method: "get", path: "members/:id", file: "public/member.get" }
|
|
84
|
+
], { base: "/api/crew" });
|
|
85
|
+
addModuleRoutes(resolver, [
|
|
86
|
+
{ method: "get", path: "operations/:operationId/settings", file: "admin/settings.get" },
|
|
87
|
+
{ method: "put", path: "operations/:operationId/settings", file: "admin/settings.put" },
|
|
88
|
+
{ method: "get", path: "operations/:operationId/members", file: "admin/members.get" },
|
|
89
|
+
{ method: "post", path: "operations/:operationId/members", file: "admin/members.post" },
|
|
90
|
+
{ method: "post", path: "operations/:operationId/members/approve", file: "admin/members-approve.post" },
|
|
91
|
+
{ method: "get", path: "operations/:operationId/invites", file: "admin/invites.get" },
|
|
92
|
+
{ method: "post", path: "operations/:operationId/invites", file: "admin/invites.post" },
|
|
93
|
+
{ method: "get", path: "forms", file: "admin/forms.get" },
|
|
94
|
+
{ method: "get", path: "users", file: "admin/users.get" },
|
|
95
|
+
{ method: "patch", path: "members/:id", file: "admin/member.patch" },
|
|
96
|
+
{ method: "post", path: "members/:id/approve", file: "admin/member-approve.post" },
|
|
97
|
+
{ method: "post", path: "members/:id/reject", file: "admin/member-reject.post" },
|
|
98
|
+
{ method: "post", path: "members/:id/withdraw", file: "admin/member-withdraw.post" },
|
|
99
|
+
{ method: "post", path: "members/:id/waitlist", file: "admin/member-waitlist.post" },
|
|
100
|
+
{ method: "get", path: "members/:id/submission", file: "admin/member-submission.get" },
|
|
101
|
+
{ method: "delete", path: "invites/:id", file: "admin/invite.delete" }
|
|
102
|
+
], { base: "/api/admin/crew" });
|
|
103
|
+
addServerImportsDir(resolver.resolve("./runtime/server/utils"));
|
|
104
|
+
inlineModuleRuntime(nuxt, resolver);
|
|
105
|
+
addServerPlugin(resolver.resolve("./runtime/server/plugins/participation"));
|
|
106
|
+
addServerPlugin(resolver.resolve("./runtime/server/plugins/forms"));
|
|
107
|
+
nuxt.hook("notify:email:templates", (sources) => sources.push({ dir: resolver.resolve("./runtime/emails") }));
|
|
108
|
+
addImports([
|
|
109
|
+
{ name: "useCrewLinks", from: resolver.resolve("./runtime/app/composables/useCrewLinks") },
|
|
110
|
+
{ name: "useCrewActions", from: resolver.resolve("./runtime/app/composables/useCrewActions") },
|
|
111
|
+
{ name: "useCrewTranslate", from: resolver.resolve("./runtime/app/composables/useCrewTranslate") }
|
|
112
|
+
]);
|
|
113
|
+
addComponentsDir({ path: resolver.resolve("./runtime/app/components") });
|
|
114
|
+
addModulePages(MODULE_NAME, resolver, [
|
|
115
|
+
{ name: "crew-home", path: homePath, file: "./runtime/app/pages/home.vue" },
|
|
116
|
+
{ name: "crew-apply", path: applyPath, file: "./runtime/app/pages/apply.vue" },
|
|
117
|
+
{ name: "crew-status", path: statusPath, file: "./runtime/app/pages/status.vue" },
|
|
118
|
+
{ name: "crew-invite", path: invitePath, file: "./runtime/app/pages/invite.vue" }
|
|
119
|
+
]);
|
|
120
|
+
if (homePath) guardPages(nuxt, [homePath]);
|
|
121
|
+
if (homePath) {
|
|
122
|
+
const { extendTabs } = await import('@frigear-nu/widget/utils');
|
|
123
|
+
extendTabs(nuxt, CREW_HOME_TABS, [
|
|
124
|
+
{ id: CREW_HOME_TAB.overview, component: resolver.resolve("./runtime/app/tabs/HomeOverview.vue"), order: 0, label: "Overview", labelKey: "crew.home.tabs.overview", icon: "i-lucide-layout-dashboard" },
|
|
125
|
+
...statusSetting === false ? [] : [{ id: CREW_HOME_TAB.status, component: resolver.resolve("./runtime/app/tabs/HomeStatus.vue"), order: 10, label: "My crew", labelKey: "crew.home.tabs.status", icon: "i-lucide-hand-heart", permission: crewAccess.permissions.read }]
|
|
126
|
+
]);
|
|
127
|
+
}
|
|
128
|
+
if (tabsOnly && homePath) {
|
|
129
|
+
addPageRedirects(nuxt, {
|
|
130
|
+
...homePath !== CREW_DEFAULT_PAGES.home ? { [CREW_DEFAULT_PAGES.home]: homePath } : {},
|
|
131
|
+
...statusSetting === true ? { [CREW_DEFAULT_PAGES.status]: crewHomeTab(homePath, CREW_HOME_TAB.status) } : {}
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
if (settings.operationsTab !== false && hasNuxtModule("@frigear-nu/widget") && hasNuxtModule("@frigear-nu/admin")) {
|
|
135
|
+
const { extendTabs } = await import('@frigear-nu/widget/utils');
|
|
136
|
+
extendTabs(nuxt, "admin.operations", {
|
|
137
|
+
id: "crew",
|
|
138
|
+
component: resolver.resolve("./runtime/app/tabs/Crew.vue"),
|
|
139
|
+
order: 10,
|
|
140
|
+
label: "Crew",
|
|
141
|
+
labelKey: "crew.admin.tabs.crew",
|
|
142
|
+
icon: "i-lucide-hand-heart",
|
|
143
|
+
permission: crewAccess.permissions.manage
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
const { extendWidgets } = await import('@frigear-nu/widget/utils');
|
|
147
|
+
extendWidgets(nuxt, "inbox.thread.actions", {
|
|
148
|
+
id: "crew-add-to-crew",
|
|
149
|
+
component: resolver.resolve("./runtime/app/widgets/InboxAddToCrew.vue"),
|
|
150
|
+
order: 10,
|
|
151
|
+
permission: crewAccess.permissions.manage
|
|
152
|
+
});
|
|
153
|
+
if (statusPath && hasNuxtModule("@frigear-nu/mobile")) {
|
|
154
|
+
const { extendMobileTabs } = await import('@frigear-nu/mobile/utils');
|
|
155
|
+
extendMobileTabs(nuxt, {
|
|
156
|
+
id: "crew",
|
|
157
|
+
to: statusPath,
|
|
158
|
+
label: "Crew",
|
|
159
|
+
labelKey: "crew.mobile.tab",
|
|
160
|
+
icon: "i-lucide-hand-heart",
|
|
161
|
+
sfSymbol: "person.3",
|
|
162
|
+
sfSymbolActive: "person.3.fill",
|
|
163
|
+
requiresAuth: true
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
extendNotificationTopics(nuxt, crewNotificationTopics);
|
|
167
|
+
extendDashboard(nuxt, CREW_DASHBOARD, crewDashboardItems((path) => resolver.resolve(path)));
|
|
168
|
+
addOptionalMenuSource(nuxt, { file: resolver.resolve("./runtime/menus"), menu: "dashboard" });
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
export { module$1 as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const crewAccess: import("@frigear-nu/auth/access").Access<"crew", "read" | "pii" | "apply" | "manage" | "invite", "crew", never>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { defineAccess } from "@frigear-nu/auth/access";
|
|
2
|
+
export const crewAccess = defineAccess("crew", {
|
|
3
|
+
permissions: {
|
|
4
|
+
// Self-service: every signed-in user holds it. Apply, see your own status, accept an invite.
|
|
5
|
+
apply: {
|
|
6
|
+
label: "Apply to crew",
|
|
7
|
+
description: "Apply to an operation's crew and see your own status.",
|
|
8
|
+
implicit: true
|
|
9
|
+
},
|
|
10
|
+
// Held by everyone, narrowed by the policy to the person\'s own row, the teams they lead, and staff.
|
|
11
|
+
read: {
|
|
12
|
+
label: "Read crew",
|
|
13
|
+
description: "See your own crew status, and the crew of the teams you lead.",
|
|
14
|
+
implicit: true
|
|
15
|
+
},
|
|
16
|
+
manage: {
|
|
17
|
+
label: "Manage crew",
|
|
18
|
+
description: "Approve, reject and waitlist applications, move people between teams and roles, and edit how a crew is recruited.",
|
|
19
|
+
grantTo: ["admin"]
|
|
20
|
+
},
|
|
21
|
+
// Sensitive (`:pii`): never covered by `crew:*` or `*`, only granted by name. Like every staff permission here, only
|
|
22
|
+
// `admin` gets it; a host grants it to its own roles by name (`authorization.roles.<role>.grant: ['crew:pii']`).
|
|
23
|
+
pii: {
|
|
24
|
+
label: "See applicants' contact details and answers",
|
|
25
|
+
description: "See the email address, phone number and form answers of people in a crew.",
|
|
26
|
+
grantTo: ["admin"]
|
|
27
|
+
},
|
|
28
|
+
// Mints a credential that grants a role, so it needs a signed-in session: a token cannot create invites.
|
|
29
|
+
invite: {
|
|
30
|
+
label: "Create crew invites",
|
|
31
|
+
description: "Create invite links that add people to a team, optionally as a lead.",
|
|
32
|
+
sessionOnly: true,
|
|
33
|
+
grantTo: ["admin"]
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
scopes: {
|
|
37
|
+
// A named scope groups the permission for token consent; `crew:read` and `crew:pii` are usable as scopes as well.
|
|
38
|
+
crew: {
|
|
39
|
+
label: "Crew",
|
|
40
|
+
description: "See your own crew status in operations.",
|
|
41
|
+
icon: "i-lucide-hand-heart",
|
|
42
|
+
permissions: ["crew:read"]
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { UserPickerCreateInitial, UserPickerOption } from '@frigear-nu/users/api';
|
|
2
|
+
import type { CrewLadder, CrewTeamOption } from '../utils/admin-crew.js';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
operationId?: string;
|
|
5
|
+
teams?: CrewTeamOption[];
|
|
6
|
+
ladders?: CrewLadder[];
|
|
7
|
+
inboxThreadId?: string;
|
|
8
|
+
userId?: number;
|
|
9
|
+
selected?: UserPickerOption[];
|
|
10
|
+
prefill?: UserPickerCreateInitial;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
close: (added: false | import("../../../types.js").CrewMemberDto) => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
+
onClose?: ((added: false | import("../../../types.js").CrewMemberDto) => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|