keep filter on table wide inserts

This commit is contained in:
Jottyfan
2022-10-22 16:13:35 +02:00
parent 230cbc5d00
commit 71cc5d8565
3 changed files with 24 additions and 6 deletions

View File

@@ -3,6 +3,8 @@ package de.jottyfan.camporganizer.module.business.bookings;
import javax.annotation.security.RolesAllowed;
import javax.servlet.http.HttpServletRequest;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
@@ -10,10 +12,11 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import de.jottyfan.camporganizer.module.business.bookings.impl.AddPaymentBean;
import de.jottyfan.camporganizer.module.business.bookings.impl.BookerBean;
import de.jottyfan.camporganizer.module.business.business.IBusinessService;
import de.jottyfan.camporganizer.module.business.bookings.impl.AddPaymentBean;
/**
*
@@ -22,6 +25,7 @@ import de.jottyfan.camporganizer.module.business.bookings.impl.AddPaymentBean;
*/
@Controller
public class BookingsController {
private static final Logger LOGGER = LogManager.getLogger(BookingsController.class);
@Autowired
private HttpServletRequest request;
@@ -55,9 +59,11 @@ public class BookingsController {
@PostMapping("/business/bookings/payment/{id}")
@RolesAllowed({"business_booking"})
public String addBooking(Model model, @ModelAttribute AddPaymentBean bean, @PathVariable Integer id) {
public String addBooking(Model model, @ModelAttribute AddPaymentBean bean, @PathVariable Integer id, @RequestParam String search) {
Double payment = bean.getPayment();
bookingsService.addPayment(id, payment);
LOGGER.debug("search is {}", search);
model.addAttribute("search", search);
return getBookings(model);
}
}