Bug 774

Summary: Back button goes to wrong page
Product: CS3343 Salon Booking System Reporter: Samuel <samuelip4-c>
Component: hairdresser.dayoff.ReadAssignee: Samuel <samuelip4-c>
Status: RESOLVED FIXED    
Severity: enhancement CC: mingcng8-c
Priority: ---    
Version: Beta   
Hardware: PC   
OS: Mac OS   

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();
    }
};