-
Notifications
You must be signed in to change notification settings - Fork 4
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
base: master
Are you sure you want to change the base?
Conversation
BookingService bookingService; | ||
@Autowired | ||
UserService userService; | ||
@Autowired | ||
HotelService hotelService; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public class ManagerBookingController { | |
public class BookingsController { |
There was a problem hiding this comment.
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()); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 ạ
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 ạ
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 ạ.
27606c0
to
4848a21
Compare
Trang Hotel Manager Dashboard:
![image](https://private-user-images.githubusercontent.com/93195406/366287315-34d578bc-bea5-440f-be45-19ca91f96d29.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MTYyNDAsIm5iZiI6MTczODkxNTk0MCwicGF0aCI6Ii85MzE5NTQwNi8zNjYyODczMTUtMzRkNTc4YmMtYmVhNS00NDBmLWJlNDUtMTljYTkxZjk2ZDI5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDA4MTIyMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVhNGE0ZjhiNzY4NDNhMjIwZTgwMzRhYjk2YTIxYzI0N2IwMTIxMmRkMjRiYmVmODcyMzU4N2NkYjRhOTZmNjYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Qk2qKjjPyGpFtUfCQUTQibW1lOp4tA9qZKmEeCsFgjE)
[HotelStaff] [Quản lý booking] Xem chi tiết bookings:
![image](https://private-user-images.githubusercontent.com/93195406/366287520-e7c70560-ce53-4031-81bc-b521b8f23f42.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MTYyNDAsIm5iZiI6MTczODkxNTk0MCwicGF0aCI6Ii85MzE5NTQwNi8zNjYyODc1MjAtZTdjNzA1NjAtY2U1My00MDMxLTgxYmMtYjUyMWI4ZjIzZjQyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDA4MTIyMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ0OTA2Yzg2OGEyN2EyZmY3NzRhZTc1ZGFjZTA3MjRiNDA4NzgxZDY5NWVmZGVjMDUzYmU4MjFmNmE4YWNjMTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.tZEPDmJsm5ldsXg51RkPuA3Tqq8UA0CVHf4iZFyr_kA)
[HotelStaff] [Quản lý booking] Thêm mới bookings:
![image](https://private-user-images.githubusercontent.com/93195406/366287642-da7affbe-3bc2-4eda-b44b-54ed8bf6f4a4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MTYyNDAsIm5iZiI6MTczODkxNTk0MCwicGF0aCI6Ii85MzE5NTQwNi8zNjYyODc2NDItZGE3YWZmYmUtM2JjMi00ZWRhLWI0NGItNTRlZDhiZjZmNGE0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDA4MTIyMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTAxMzBlYjYwNjY2ZDlhZmJjNGRjZTFhNzU4OTkyOGFmMDM3YWZhMGIzN2IyODk3YTEwZmFlMWI1MDljMWQ3OTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.6cGY1jxFRl1JcCmavOlDbLSn1B6KITrMfUSAe_FLkI0)
[HotelStaff] [Quản lý booking] Sửa mới bookings:
![image](https://private-user-images.githubusercontent.com/93195406/366287737-c9f3dce3-e842-4266-86a9-49171bbe8cff.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MTYyNDAsIm5iZiI6MTczODkxNTk0MCwicGF0aCI6Ii85MzE5NTQwNi8zNjYyODc3MzctYzlmM2RjZTMtZTg0Mi00MjY2LTg2YTktNDkxNzFiYmU4Y2ZmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDA4MTIyMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFlNWU1MzcwZDg4MjU4ZWM1MDY2NzI0ODRiZjYwMjJiNDgxNDYwNzJjNWUyNGVlNjg4ZWRlMGY0NTdlNTk1NTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.sOCQx2PWC9JG0P1YtUbcgzLT8Mvb6NAG_5nwO-xXzvU)
Link Redmine: https://edu-redmine.sun-asterisk.vn/issues/80444