Skip to content

Commit

Permalink
Merge pull request #40 from JHWelch/improve-rsvps
Browse files Browse the repository at this point in the history
Improve rsvps
  • Loading branch information
JHWelch authored Aug 30, 2023
2 parents 85de107 + 29ff0a9 commit 1d224f6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions __tests__/controllers/rsvpController.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ describe('store', () => {
name: 'test name',
email: 'test@example.com',
plusOne: true,
createdAt: expect.anything(), // Timestamp is off
}
)
})
Expand Down
2 changes: 2 additions & 0 deletions __tests__/data/firestore/firestoreAdapter.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { initializeApp } from 'firebase/app'
import { applicationDefault } from 'firebase-admin/app'
import FirestoreAdapter from '../../../src/data/firestore/firestoreAdapter'
import {
Timestamp,
addDoc,
getFirestore,
query,
Expand Down Expand Up @@ -210,6 +211,7 @@ describe('createRsvp', () => {
name: 'test name',
email: 'test@example.com',
plusOne: true,
createdAt: Timestamp.now(),
}
)
})
Expand Down
1 change: 1 addition & 0 deletions src/data/firestore/firestoreAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export default class FirestoreAdapter {
name,
email,
plusOne,
createdAt: Timestamp.now(),
})
}

Expand Down
9 changes: 6 additions & 3 deletions views/partials/modal.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
email: '',
plusOne: '',
},
message: null,
rsvpBody: {
name: '',
email: '',
Expand All @@ -18,7 +17,7 @@
this.errors = data.errors
}
if (data.message) {
this.message = data.message
alert(data.message)
}
},
rsvp: async function() {
Expand Down Expand Up @@ -100,7 +99,11 @@

<div class="mt-2">
<p class="text-sm text-gray-500">
Let us know you are coming! Bring a friend if you like. We usually order or make some food, let us know if you're interested in getting in on that. Hope to see you soon.
Let us know you are coming! Bring a friend if you like.
</p>

<p class="text-sm text-violet-500">
Hope to see you soon!
</p>
</div>
</div>
Expand Down

0 comments on commit 1d224f6

Please sign in to comment.