Bug 774 - Back button goes to wrong page
Summary: Back button goes to wrong page
Status: RESOLVED FIXED
Alias: None
Product: CS3343 Salon Booking System
Classification: Unclassified
Component: hairdresser.dayoff.Read (show other bugs)
Version: Beta
Hardware: PC Mac OS
: --- enhancement
Assignee: Samuel
URL:
Depends on:
Blocks:
 
Reported: 2023-11-10 15:19 HKT by Samuel
Modified: 2023-11-17 12:10 HKT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel 2023-11-10 15:19:54 HKT
Overview: Inside the function page of the component hairdresser.dayoff.read, the "Back" button did not return the UI to the hairdresser menu, instead it routes the UI to the admin menu.

Steps to Reproduce:
(1)Login as a hairdresser into the system
(2)Click "My Day Off" button
(3)Click "Back" button

Actual Results: The system brings me to the admin menu on the UI.


Expected Results: The system should bring me back to the hairdresser menu and display the hairdresser menu on UI.
Comment 1 Ng Ming Chak 2023-11-17 12:10:26 HKT
Because the btnBackOnClick call the wrong function, So it return to he Admin page.
Now I solve the problem. 

original code

ActionListener btnBackOnClick = new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
        frame.get().dispose();
        new AdminMainMenu();
    }
};

now node

ActionListener btnBackOnClick = new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
        frame.get().dispose();
        new HairdresserMainMenu();
    }
};