Class CashierController

java.lang.Object
app.controller.cashier.CashierController

public class CashierController extends Object
Controller for the cashier to update the UI and database
Author:
Truman Porter
  • Field Details

    • TAX_RATE

      private static final BigDecimal TAX_RATE
    • PAYMENT_TYPES

      private static final List<String> PAYMENT_TYPES
    • itemDAO

      private final ItemDAO itemDAO
    • orderDAO

      private final OrderDAO orderDAO
    • employeeId

      private int employeeId
    • cartTable

      private javafx.scene.control.TableView<CashierController.CartLine> cartTable
    • itemColumn

      private javafx.scene.control.TableColumn<CashierController.CartLine, String> itemColumn
    • qtyColumn

      private javafx.scene.control.TableColumn<CashierController.CartLine, Integer> qtyColumn
    • subtotalLabel

      private javafx.scene.control.Label subtotalLabel
    • taxLabel

      private javafx.scene.control.Label taxLabel
    • totalLabel

      private javafx.scene.control.Label totalLabel
    • categoryBar

      private javafx.scene.layout.HBox categoryBar
    • itemGrid

      private javafx.scene.layout.TilePane itemGrid
    • customizationPanel

      private javafx.scene.layout.VBox customizationPanel
    • customizationItemLabel

      private javafx.scene.control.Label customizationItemLabel
    • toppingsPane

      private javafx.scene.layout.FlowPane toppingsPane
    • iceGroup

      private javafx.scene.control.ToggleGroup iceGroup
    • sugarGroup

      private javafx.scene.control.ToggleGroup sugarGroup
    • paymentChoice

      private javafx.scene.control.ChoiceBox<String> paymentChoice
    • cart

      private final javafx.collections.ObservableList<CashierController.CartLine> cart
    • selectedItem

      private Item selectedItem
  • Constructor Details

    • CashierController

      public CashierController()
  • Method Details

    • initialize

      private void initialize()
    • findCashierId

      private static int findCashierId()
    • loadMenu

      private void loadMenu()
    • loadToppings

      private void loadToppings()
    • onCashierNav

      private void onCashierNav()
    • onManagerNav

      private void onManagerNav()
    • onSelectCategory

      private void onSelectCategory(javafx.event.ActionEvent event)
    • showCategory

      private void showCategory(String category)
    • onSelectItem

      private void onSelectItem(javafx.event.ActionEvent event)
    • onAddToCart

      private void onAddToCart()
    • selectedText

      private static String selectedText(javafx.scene.control.ToggleGroup group, String fallback)
    • resetCustomization

      private void resetCustomization()
    • selectToggle

      private static void selectToggle(javafx.scene.control.ToggleGroup group, String text)
    • showCustomization

      private void showCustomization()
    • hideCustomization

      private void hideCustomization()
    • subtotal

      private BigDecimal subtotal()
    • tax

      private BigDecimal tax(BigDecimal subtotal)
    • updateTotals

      private void updateTotals()
    • onCheckout

      private void onCheckout()
    • printReceipt

      private void printReceipt()
    • onClearCart

      private void onClearCart()
    • clearCart

      private void clearCart()
    • toppingNames

      private static String toppingNames(List<Mod> mods)