Skip to content

Commit

Permalink
feat: add confirmations at end of roster signup form (#30)
Browse files Browse the repository at this point in the history
add migrations and changes to rjsf object
  • Loading branch information
dtp263 authored May 4, 2024
1 parent 45f7b94 commit 5dc8231
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/backend/migrations/20240504210756_roster_confirmations.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Knex } from 'knex';

export async function up(knex: Knex): Promise<void> {
return knex.schema.alterTable('roster_participants', (table) => {
table.boolean('hasReadEssentialMindshark').defaultTo(false);
table.boolean('agreesToParticipateInTearDown').defaultTo(false);
table.boolean('agreesToParticipateInShifts').defaultTo(false);
table.boolean('agreesToPayDues').defaultTo(false);
});
}

export async function down(knex: Knex): Promise<void> {
return knex.schema.alterTable('roster_participants', (table) => {
table.dropColumn('hasReadEssentialMindshark');
table.dropColumn('agreesToParticipateInTearDown');
table.dropColumn('agreesToParticipateInShifts');
table.dropColumn('agreesToPayDues');
});
}
28 changes: 28 additions & 0 deletions packages/backend/models/roster_participant/roster_participant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ export default class RosterParticipant extends Model {

postBurnInterest = false;

hasReadEssentialMindshark = false;

agreesToParticipateInTearDown = false;

agreesToParticipateInShifts = false;

agreesToPayDues = false;

// Table name is the only required property.
static tableName = 'roster_participants';

Expand Down Expand Up @@ -76,6 +84,10 @@ export default class RosterParticipant extends Model {
'estimatedArrivalDate',
'estimatedDepartureDate',
'sleepingArrangement',
'hasReadEssentialMindshark',
'agreesToParticipateInTearDown',
'agreesToParticipateInShifts',
'agreesToPayDues',
],
properties: {
probabilityOfAttending: {
Expand Down Expand Up @@ -138,6 +150,22 @@ export default class RosterParticipant extends Model {
type: 'boolean',
title: 'Are you interested in post-burn?',
},
hasReadEssentialMindshark: {
type: 'boolean',
title: 'Have you read the essential MindShark? (https://rb.gy/v5f6dw)',
},
agreesToParticipateInTearDown: {
type: 'boolean',
title: 'Do you agree to participate in the camp tear-down?',
},
agreesToParticipateInShifts: {
type: 'boolean',
title: 'Do you agree to participate in camp shifts?',
},
agreesToPayDues: {
type: 'boolean',
title: 'Do you agree to pay camp dues?',
},
},
};

Expand Down

0 comments on commit 5dc8231

Please sign in to comment.