diff --git a/components/wizard/contact.tsx b/components/wizard/contact.tsx
index 9a68f26..993ced1 100644
--- a/components/wizard/contact.tsx
+++ b/components/wizard/contact.tsx
@@ -5,7 +5,7 @@ import Input from '../input'
export default function Contact() {
const { state, onChangeEvent } = useContext(WizardContext)
- const { org, name, email, street, zip, city } = state.formData
+ const { org, name, email, phone, street, zip, city } = state.formData
return (
<>
@@ -25,6 +25,13 @@ export default function Contact() {
onChange={onChangeEvent}
required
/>
+
(
{
name: { type: String, required: true },
email: { type: String, required: true, unique: true, minlength: 5 },
+ phone: { type: String, required: false },
street: { type: String, required: true },
zip: { type: String, required: true },
city: { type: String, required: true },
diff --git a/db/index.ts b/db/index.ts
index 0cb456d..03e67fd 100644
--- a/db/index.ts
+++ b/db/index.ts
@@ -48,6 +48,7 @@ export async function createBooking({
destination,
name,
email,
+ phone,
street,
zip,
city,
@@ -80,7 +81,7 @@ export async function createBooking({
let booker = await BookerModel.findOne({ email }).exec()
if (!booker) {
- booker = new BookerModel({ name, email, street, zip, city })
+ booker = new BookerModel({ name, email, phone, street, zip, city })
await booker.save()
}