Skip to content
217317751JiayeChen edited this page Apr 1, 2024 · 1 revision

HomeController

Controller for the home view of the customer.

Author: Jiaye Chen

Fields:

  • acc_dob: Label for displaying customer's date of birth.
  • acc_email: Label for displaying customer's email.
  • acc_gender: Label for displaying customer's gender.
  • acc_name: Label for displaying customer's name.
  • acc_phonenumber: Label for displaying customer's phone number.
  • acc_signupdate: Label for displaying customer's sign-up date.
  • acc_type: Label for displaying customer's account type.
  • login_date: Label for displaying the current login date.
  • user_name: Text for displaying the user's name.
  • btn_edit: Button for initiating editing of the customer's profile.
  • claimID_col: TableColumn for displaying claim IDs in the claims table.
  • claims_tbl: TableView for displaying claims.
  • damage_col: TableColumn for displaying damage information in the claims table.
  • datefilled_col: TableColumn for displaying the date filed in the claims table.
  • status_col: TableColumn for displaying the status of claims in the claims table.

Methods:

initialize(URL url, ResourceBundle resourceBundle): Method to initialize the controller. It sets up event handling for the edit button, initializes the user interface with the customer's data, and populates the claims table.

init(): Method to initialize the user interface with the customer's data.

onEdit(): Method to handle the event when the edit button is clicked. It initiates the editing of the customer's profile.

populateClaimsTable(): Method to populate the claims table with data from the Model.

Usage Notes:

This class controls the functionality of the home view for the customer. It displays the customer's personal information such as name, gender, date of birth, email, and phone number. It also displays the list of claims associated with the customer, including claim ID, damage information, date filed, and status. The customer can initiate editing of their profile by clicking the edit button.

Clone this wiki locally