diff --git a/client/src/components/DayView/Calendar.js b/client/src/components/DayView/Calendar.js index a75b2f8..9b003fa 100644 --- a/client/src/components/DayView/Calendar.js +++ b/client/src/components/DayView/Calendar.js @@ -85,6 +85,7 @@ class Calendar extends React.Component { userName: event.name, color: event.color, noOfPeople: event.noofpeople, + typeID: event.bookingtype_id, })), }); }) @@ -98,7 +99,7 @@ class Calendar extends React.Component { start, end, title, - extendedProps: { description, userName, userid, noOfPeople }, + extendedProps: { description, userName, userid, noOfPeople, typeID }, } = event; this.setState({ modalData: { @@ -112,6 +113,7 @@ class Calendar extends React.Component { userid, readOnly: true, noOfPeople, + typeID, }, }); this.showModal(); diff --git a/client/src/components/Form/Reservation/index.js b/client/src/components/Form/Reservation/index.js index d2ce8d7..734872a 100644 --- a/client/src/components/Form/Reservation/index.js +++ b/client/src/components/Form/Reservation/index.js @@ -53,6 +53,7 @@ class BookingForm extends React.Component { description, readOnly, noOfPeople, + typeID, } = modalData; const disabled = confirmLoading || readOnly; const { admin, userID } = this.context; @@ -90,6 +91,7 @@ class BookingForm extends React.Component { repeat: 'once', remind: true, noOfPeople, + bookingTypeId: typeID, }} ref={this.formRef} onFinish={(values) => { @@ -147,7 +149,7 @@ class BookingForm extends React.Component { label="Booking Type" rules={[{ required: true, message: 'Choose booking type' }]} > - {types.map((type) => ( {type.category} @@ -255,6 +257,7 @@ BookingForm.propTypes = { title: PropTypes.string, description: PropTypes.string, userName: PropTypes.string, + typeID: PropTypes.string, userid: PropTypes.number, readOnly: PropTypes.bool, noOfPeople: PropTypes.number,