Repository navigation
Edit Controller
Controller for editing customer profile information.
Author: Jiaye Chen
-
acc_btn: Label for displaying account information. -
cancel_btn: Button for canceling profile editing. -
delete_btn: Button for deleting the customer account. -
dob_field: TextField for editing date of birth. -
dob_lbl: Label for displaying date of birth. -
edit_btn: Button for initiating profile editing. -
email_field: TextField for editing email. -
email_lbl: Label for displaying email. -
firstname_field: TextField for editing first name. -
gender_field: TextField for editing gender. -
gender_lbl: Label for displaying gender. -
lastname_field: TextField for editing last name. -
name_lbl: Label for displaying full name. -
phone_field: TextField for editing phone number. -
phone_lbl: Label for displaying phone number. -
save_btn: Button for saving profile changes. -
today_lbl: Label for displaying current date. -
username_lbl: Text for displaying username.
initialize(): Method to initialize the controller. It adds event listeners to buttons and initializes the profile information.
addListeners(): Method to add event listeners to buttons.
init(): Method to initialize the profile information with the current user's data.
onCancel(): Method to handle canceling profile editing.
onDelete(): Method to handle deleting the customer account.
deleteAccount(): Method to confirm and delete the customer account from the database.
onSave(): Method to handle saving profile changes.
updateAccount(): Method to update the customer's profile information in the database and refresh the displayed information.
This class controls the functionality of editing customer profile information. It allows customers to edit their first name, last name, gender, date of birth, email, and phone number. Customers can save changes, cancel editing, or delete their account. It interacts with the Model and ClaimsDatabaseDriver to update the information in the database and reflect changes in the UI.