Skip to content

Commit

Permalink
Update profile model for MLH compliance (#145)
Browse files Browse the repository at this point in the history
* feat: update profile model

* added consent fields

---------

Co-authored-by: Michael Zhou <[email protected]>
  • Loading branch information
Adrastopoulos and mzhou08 authored Dec 23, 2024
1 parent 5d56288 commit 58762ff
Showing 1 changed file with 36 additions and 18 deletions.
54 changes: 36 additions & 18 deletions src/models/Profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,6 @@ const Profile: Schema<IProfile> = new Schema(
required: true,
validate: {
validator: function (v: string) {
/*
18005551234
1 800 555 1234
+1 800 555-1234
+86 800 555 1234
1-800-555-1234
1 (800) 555-1234
(800)555-1234
(800) 555-1234
(800)5551234
800-555-1234
800.555.1234
800 555 1234x5678
8005551234 x5678
1 800 555-1234
1----800----555-1234
*/
return /^\s*(?:\+?(\d{1,3}))?[-. (]*(\d{3})[-. )]*(\d{3})[-. ]*(\d{4})(?: *x(\d+))?\s*$/.test(
v
);
Expand Down Expand Up @@ -137,7 +120,6 @@ const Profile: Schema<IProfile> = new Schema(
},
design: String,
website: String,
essays: [String],
dietaryRestrictions: [String],
shirtSize: {
type: String,
Expand All @@ -149,6 +131,42 @@ const Profile: Schema<IProfile> = new Schema(
type: String,
enum: Object.values(Region).concat([null]),
},
wantsTravelReimbursement: {
type: Boolean,
default: false,
},
travelDetails: String,
city: String,
country: String,
diversityStatement: String,
tartanHacksCodeOfConductAcknowledgement: {
type: Boolean,
required: true,
},
tartanHacksMediaReleaseAcknowledgement: {
type: Boolean,
required: true,
},
tartanHacksMediaReleaseSignature: {
type: String,
required: true,
},
tartanHacksMediaReleaseDate: {
type: Date,
required: true,
},
mlhCodeOfConductAcknowledgement: {
type: Boolean,
required: true,
},
mlhTermsAndConditionsAcknowledgement: {
type: Boolean,
required: true,
},
mlhEmailSubscription: {
type: Boolean,
default: false,
},
confirmation: Confirmation,
attendingPhysically: {
type: Boolean,
Expand Down

0 comments on commit 58762ff

Please sign in to comment.