Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature #80444] [HottelStaff] Quản lý bookings #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

TranHuyHoangIT
Copy link
Contributor

Trang Hotel Manager Dashboard:
image

[HotelStaff] [Quản lý booking] Xem chi tiết bookings:
image

[HotelStaff] [Quản lý booking] Thêm mới bookings:
image

[HotelStaff] [Quản lý booking] Sửa mới bookings:
image

Link Redmine: https://edu-redmine.sun-asterisk.vn/issues/80444

Comment on lines 24 to 28
BookingService bookingService;
@Autowired
UserService userService;
@Autowired
HotelService hotelService;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tất cả các class đều là số nhiều nha, em update lại tên nào

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dạ em đã update ạ

@RequestMapping("/manager/bookings")
@RequiredArgsConstructor
@Slf4j
public class ManagerBookingController {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public class ManagerBookingController {
public class BookingsController {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Em đã đổi tên ạ

@GetMapping("/new")
public String showCreateForm(Model model) {
model.addAttribute("bookingDTO", new BookingDTO());
model.addAttribute("customers", userService.findAll());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nếu find all k ra thì sao em

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trong trường hợp không có Customer thì findAll() vẫn sẽ luôn có Admin và Manager ạ

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ủa admin và manager có khi nào làm customer ko em?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ý em là phải có customer thì manager mới có thể thêm mới bookings ạ

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hỉu, nhưng mi có handle khi ko tìm thấy customer đâu, ngoài ra, mi findAll thì nó lấy hết chư sđâu chỉ customer


@DeleteMapping("/{id}")
public String deleteBooking(@PathVariable("id") Integer id, RedirectAttributes redirectAttributes) {
bookingService.deleteBooking(id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Xóa booking mà ko check logic j à em?
Xóa vậy có ảnh hưởng đến cây lịch sử ko

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dạ em đã xóa chức năng Delete Bookings rồi ạ. Bookings nào bị hủy thì trạng thái sẽ là Cancelled ạ.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants