fixed bug on adding a value in the booking view of a single user

This commit is contained in:
Jottyfan
2022-10-25 22:38:48 +02:00
parent 500ec2b9ad
commit fee73a1e0c
4 changed files with 26 additions and 5 deletions

View File

@@ -59,7 +59,15 @@ public class BookingsController {
@PostMapping("/business/bookings/payment/{id}")
@RolesAllowed({"business_booking"})
public String addBooking(Model model, @ModelAttribute AddPaymentBean bean, @PathVariable Integer id, @RequestParam String search) {
public String addPayment(Model model, @ModelAttribute AddPaymentBean bean, @PathVariable Integer id) {
Double payment = bean.getPayment();
bookingsService.addPayment(id, payment);
return getBooking(model, id);
}
@PostMapping("/business/bookings/listpayment/{id}")
@RolesAllowed({"business_booking"})
public String addListPayment(Model model, @ModelAttribute AddPaymentBean bean, @PathVariable Integer id, @RequestParam(defaultValue = "") String search) {
Double payment = bean.getPayment();
bookingsService.addPayment(id, payment);
LOGGER.debug("search is {}", search);