1616 - [ Storage component] ( #storage-component )
1717 - [ Common classes] ( #common-classes )
1818- [ Implementation] ( #implementation )
19+ - [ Delete] ( #Delete-feature )
1920 - [ Add Reservation Feature] ( #add-reservation-feature )
2021 - [[ proposed] Undo/Redo] ( #proposed-undoredo-feature )
2122- [ Documentation, logging, testing, configuration, dev-ops] ( #documentation-logging-testing-configuration-dev-ops )
@@ -274,6 +275,50 @@ add occasions when not needed, it was made optional to improve user experience.
274275
275276--------------------------------------------------------------------------------------------------------------------
276277
278+ ### Delete feature
279+
280+ The delete feature allows restaurant managers to delete any unwanted or accidental reservations via the command `delete
281+ <INDEX > cfm`.
282+
283+ #### How is it implemented
284+
285+ The delete functionality is implemented through the ` DeleteCommand ` class. The feature is primarily made up of the
286+ following components:
287+
288+ 1 . ` DeleteCommand ` - Delete the reservation based on index shown on the list.
289+ 2 . ` DeleteCommandParser ` - Parses and validates the user input into a ` DeleteCommand ` object
290+
291+ #### Parsing the user input
292+
293+ 1 . The user enters a command in the format ` delete 1 cfm ` .
294+ 2 . The ` LogicManager ` passes the command string to ` ReserveMateParser ` .
295+ 3 . ` ReserveMateParser ` identifies the command as a ` delete ` command and delegates to ` DeleteCommandParser ` .
296+ 4 . ` DeleteCommandParser ` extracts and validates the index. If the index or ` cfm ` is missing, a parse
297+ exception will be thrown.
298+ 5 . ` DeleteCommandParser ` will create ` DeleteCommand ` object with the index.
299+
300+ #### Command execution
301+
302+ 1 . ` LogicManager ` calls the ` execute() ` method of the ` DeleteCommand ` object.
303+ 2 . The ` DeleteCommand ` will delete the reservation based on the index from the ` Model ` .
304+
305+ #### Displaying the result
306+
307+ A new ` commandResult ` with the success message is created and is returned to the ` LogicManager ` . The GUI would be
308+ updated.
309+
310+ ![ DeleteCommandResult] ( images/deleteCommandResult.png )
311+
312+ The following sequence diagram shows how the delete command works:
313+ ![ DeleteSequenceDiagram] ( images/DeleteSequenceDiagram.png )
314+
315+ #### Design Considerations
316+
317+ ##### Making user type ` cfm `
318+
319+ To prevent accidental deletions due to typing the wrong index, users are required to confirm their action by entering
320+ an additional 'cfm'. This extra step gives them time to double-check the index they’ve entered.
321+
277322### [ Proposed] Undo/redo feature
278323
279324The proposed undo/redo mechanism is facilitated by ` VersionedReserveMate ` . It extends ` ReserveMate ` with an undo/redo
@@ -663,7 +708,7 @@ Priorities: High (Must have) - `* * *`, Medium (Good to have) - `* *`, Low (Exte
663708 Use Case ends.
664709
665710* 2a. The reservation list is empty.
666-
711+
667712 * 2a1. ReserveMate shows an error message.
668713
669714 Use case ends.
@@ -1114,15 +1159,13 @@ and inefficiency. <br>
11141159e.g., ` d/2025-04-20 1800-2000 ` , allowing users to create a single reservation for multiple hours. Internally, the system
11151160will auto-allocate the necessary consecutive slots without requiring the user to enter multiple commands.
11161161
1117-
111811622 . ** Simplify preference saving by removing redundant 'save' keyword in ` pref ` command** : <br >
11191163** Current Issue** : The ` pref ` command currently requires users to type ` pref save [index] [preference] ` ,
11201164e.g., ` pref save 1 sitting outdoors ` . Since the ` pref ` command only supports saving preferences, the inclusion of the
11211165` save ` keyword is redundant and adds unnecessary typing for users. <br >
11221166** Planned Enhancement** : We plan to simplify the command format by removing the need for the ` save ` keyword.
11231167Users will be able to directly type ` pref [index] [preference] ` .
11241168
1125-
112611693 . ** Prevents accidental updates due to shifting list indexes after sorting** : <br >
11271170 ** Current Issue** : After executing ` pref save ` or ` edit ` for a reservation at a given index, the list re-sorts
11281171 (by date, time and last insertion), which might cause indexes to change. If the user tries to update the same reservation
@@ -1153,7 +1196,6 @@ to within the next 60 days**. The inconsistency may mislead users into thinking
11531196`Note: Reservations can only exist within 60 days from today. Filtering beyond this range will not return future
11541197reservations.`
11551198
1156-
115711996 . ** Display preference and occasion tags in customer reservation details to differentiate similar reservations** : <br >
11581200** Current Issues** : Currently, users have to manually type ` show INDEX ` each time they want to check the preferences
11591201and occasions associated with a reservation. This process can be time-consuming and inefficient, especially for
@@ -1163,3 +1205,34 @@ make it difficult to differentiate between them. <br>
11631205directly** in the reservation information. This allows users to quickly see preferences and occasions without having to
11641206run an addition command. By incorporating ** preferences and occasions** , reservations with similar names can be easily
11651207differentiated. <br >
1208+
1209+ 7 . ** Let users define the maximum number of reservations per hourly slot** : <br >
1210+ ** Current Issue** : ReserveMate currently does not enforce a maximum number of reservations per time slot, which may not
1211+ fit the needs of all use cases. For instance, a venue with limited capacity might want to only allow a certain number
1212+ of concurrent reservations during peak hours. <br >
1213+ ** Planned Enhancement** : We plan to introduce a configurable setting that allows admins or users (with the right
1214+ permissions) to define the maximum number of reservations allowed per hour slot. This offers greater flexibility for
1215+ different reservation scenarios and business rules.
1216+
1217+ 8 . ** Change free command output format to show each available hour instead of a continuous range** : <br >
1218+ ** Current Issue** : The ` free ` command currently displays available time in continuous ranges, e.g., `2025-04-28 0000 to
1219+ 2025-04-28 1800`. While concise, this format may confuse users. They might interpret it as a single large continuous
1220+ block rather than individual 1-hour slots, or be uncertain whether a reservation can be made at the ending time. <br >
1221+ ** Planned Enhancement** : We plan to revise the output format of the free command to explicitly show each available
1222+ starting reservation slot. For example:
1223+ ```
1224+ Available free time slots:
1225+ - 2025-04-28 0000
1226+ - 2025-04-28 0100
1227+ ...
1228+ - 2025-04-28 1700
1229+ ```
1230+
1231+ 9 . ** Relax phone number constraints to support international numbers for tourists** : <br >
1232+ ** Current Issue** : The current phone number validation only accepts Singaporean numbers (8-digit numbers starting with
1233+ 8 or 9), which excludes valid international phone numbers commonly used by tourists. This limitation may prevent
1234+ tourists from making reservations using the system. <br >
1235+ ** Planned Enhancement** : We plan to relax the phone number
1236+ format to allow valid international formats, such as +44 7123 456789 or +1-202-555-0191. Validation will ensure proper
1237+ structure but allow flexibility in country codes. This makes the system more inclusive and tourist-friendly.
1238+
0 commit comments