Skip to content

Commit a068bbe

Browse files
committed
style: Simplify NewReservationModal by removing unused fields and modal functionality
1 parent 3b4fc99 commit a068bbe

File tree

2 files changed

+16
-356
lines changed

2 files changed

+16
-356
lines changed

src/components/Modals/NewReservationModal.js

Lines changed: 2 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ const NewReservationModal = ({ show, onHide, onSuccess }) => {
99
guest_id: '',
1010
room_id: '',
1111
check_in_date: '',
12-
check_out_date: '',
13-
num_adults: 1,
14-
num_children: 0,
15-
special_requests: ''
12+
check_out_date: ''
1613
});
1714
const [loading, setLoading] = useState(false);
1815
const [error, setError] = useState('');
@@ -115,10 +112,7 @@ const NewReservationModal = ({ show, onHide, onSuccess }) => {
115112
guest_id: '',
116113
room_id: '',
117114
check_in_date: '',
118-
check_out_date: '',
119-
num_adults: 1,
120-
num_children: 0,
121-
special_requests: ''
115+
check_out_date: ''
122116
});
123117
if (onSuccess) onSuccess();
124118
onHide();
@@ -225,48 +219,6 @@ const NewReservationModal = ({ show, onHide, onSuccess }) => {
225219
</Col>
226220
</Row>
227221

228-
<Row>
229-
<Col md={6}>
230-
<Form.Group className="mb-3">
231-
<Form.Label>Number of Adults *</Form.Label>
232-
<Form.Control
233-
type="number"
234-
name="num_adults"
235-
value={formData.num_adults}
236-
onChange={handleChange}
237-
min="1"
238-
max="10"
239-
required
240-
/>
241-
</Form.Group>
242-
</Col>
243-
<Col md={6}>
244-
<Form.Group className="mb-3">
245-
<Form.Label>Number of Children</Form.Label>
246-
<Form.Control
247-
type="number"
248-
name="num_children"
249-
value={formData.num_children}
250-
onChange={handleChange}
251-
min="0"
252-
max="10"
253-
/>
254-
</Form.Group>
255-
</Col>
256-
</Row>
257-
258-
<Form.Group className="mb-3">
259-
<Form.Label>Special Requests</Form.Label>
260-
<Form.Control
261-
as="textarea"
262-
rows={3}
263-
name="special_requests"
264-
value={formData.special_requests}
265-
onChange={handleChange}
266-
placeholder="Any special requests or notes..."
267-
/>
268-
</Form.Group>
269-
270222
<div className="d-flex justify-content-end gap-2 mt-4">
271223
<Button variant="secondary" onClick={onHide} disabled={loading}>
272224
Cancel

0 commit comments

Comments
 (0)