feature/customers #58
@ -34,6 +34,12 @@ public class CustomersIndexController {
 | 
			
		||||
    @Autowired
 | 
			
		||||
    private final CustomerOrderRepository customerOrderRepository = null;
 | 
			
		||||
 | 
			
		||||
    @Autowired
 | 
			
		||||
    private final BookingRepository bookingRepository = null;
 | 
			
		||||
 | 
			
		||||
    @Autowired
 | 
			
		||||
    private AccountingController accountingController = null;
 | 
			
		||||
| 
					
	
	
	
	
	
	
	
	 | 
			||||
 | 
			
		||||
    @GetMapping("")
 | 
			
		||||
    public String internCustomers(Model model) {
 | 
			
		||||
 | 
			
		||||
@ -60,7 +66,12 @@ public class CustomersIndexController {
 | 
			
		||||
        List<CustomerOrder> orders = customerOrderRepository.getOrdersByUserId(id);
 | 
			
		||||
        model.addAttribute("orders", orders);
 | 
			
		||||
 | 
			
		||||
        //TODO: Booking!!!!!!!!!!!!
 | 
			
		||||
        List<Booking> bookings = bookingRepository.customerBookingsReverseChronologically(id);
 | 
			
		||||
        ShortTemplateBookingResult result = accountingController.buildShortTemplate(
 | 
			
		||||
                bookings,
 | 
			
		||||
                account -> account.userAccount != null && account.userAccount.id == id);
 | 
			
		||||
        model.addAttribute("balance", result.balance);
 | 
			
		||||
        model.addAttribute("bookings", result.bookings);
 | 
			
		||||
 | 
			
		||||
        return "intern/customers/id";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -106,10 +106,8 @@
 | 
			
		||||
                </button>
 | 
			
		||||
            </form>
 | 
			
		||||
            </p>
 | 
			
		||||
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        <h2>Bestellungen</h2>
 | 
			
		||||
        <p>
 | 
			
		||||
        <table id="main-table">
 | 
			
		||||
@ -129,6 +127,7 @@
 | 
			
		||||
            </tr>
 | 
			
		||||
        </table>
 | 
			
		||||
        </p>
 | 
			
		||||
 | 
			
		||||
        <h2>Buchungen</h2>
 | 
			
		||||
        <div>
 | 
			
		||||
            <h4> Kontostand </h4>
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user
	
Kommt Doppelt vor.
siehe
938d16301d