diff --git a/src/com/customify/cli/utils/authorization/files/Admin.csv b/src/com/customify/cli/utils/authorization/files/Admin.csv index 56efd0e6..27885d18 100644 --- a/src/com/customify/cli/utils/authorization/files/Admin.csv +++ b/src/com/customify/cli/utils/authorization/files/Admin.csv @@ -1,5 +1,3 @@ ID, FIRST_NAME,LAST_NAME , EMAIL, BUSINESS_ID, TITLE,SESSION_START_AT -323 Dush_Admin Sam sam@gmail.com 1 BUSINESS_ADMIN 5-21-2021 -323 Dush_Admin Sam sam@gmail.com 1 BUSINESS_ADMIN 5-21-2021 323 Dush_Admin Sam sam@gmail.com 1 BUSINESS_ADMIN 5-21-2021 \ No newline at end of file diff --git a/src/com/customify/cli/utils/authorization/files/Employee.csv b/src/com/customify/cli/utils/authorization/files/Employee.csv index 0ab359f7..f4fb23c5 100644 --- a/src/com/customify/cli/utils/authorization/files/Employee.csv +++ b/src/com/customify/cli/utils/authorization/files/Employee.csv @@ -1,19 +1 @@ ID,FIRST_NAME,LAST_NAME ,EMAIL, BUSINESS_ID, TITLE,SESSION_START_AT,CREATED_AT - - - - - - - - - - - - - - -327823 Sandberg Twizeye sandberg@gmail.com 1 BUSINESS_EMPLOYEE 2021-03-03 5-21-2021 -327823 Sandberg Twizeye sandberg@gmail.com 1 BUSINESS_EMPLOYEE 2021-03-03 5-21-2021 -327823 Sandberg Twizeye sandberg@gmail.com 1 BUSINESS_EMPLOYEE 2021-03-03 5-21-2021 -327823 Sandberg Twizeye sandberg@gmail.com 1 BUSINESS_EMPLOYEE 2021-03-03 5-21-2021 \ No newline at end of file diff --git a/src/com/customify/cli/utils/authorization/files/SuperAdmin.csv b/src/com/customify/cli/utils/authorization/files/SuperAdmin.csv index cfaf3c11..55e20758 100644 --- a/src/com/customify/cli/utils/authorization/files/SuperAdmin.csv +++ b/src/com/customify/cli/utils/authorization/files/SuperAdmin.csv @@ -1,41 +1 @@ -ID, FIRST_NAME,LAST_NAME , EMAIL,TEL, SESSION_START_AT -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 -34523 Patrick Niyogitare superadmin@gmail.com 0789789097 5-21-2021 \ No newline at end of file +ID, FIRST_NAME,LAST_NAME , EMAIL,TEL, SESSION_START_AT \ No newline at end of file diff --git a/src/com/customify/desktop/InitializeConnection.java b/src/com/customify/desktop/InitializeConnection.java index d9020470..e280412e 100644 --- a/src/com/customify/desktop/InitializeConnection.java +++ b/src/com/customify/desktop/InitializeConnection.java @@ -2,12 +2,6 @@ package com.customify.desktop; -import com.customify.desktop.business.NewBusiness; -import com.customify.desktop.customerFeedback.Businesses; -import com.customify.desktop.customerFeedback.CustomerFeedbackForm; -import com.customify.desktop.employee.UpdateEmployee; -import com.customify.desktop.layout.Layout; -import com.customify.desktop.sales.Sales; import com.customify.desktop.utils.VerifyAuth; import java.awt.*; diff --git a/src/com/customify/desktop/components/Sidebar.java b/src/com/customify/desktop/components/Sidebar.java index 948f694e..38876c7a 100644 --- a/src/com/customify/desktop/components/Sidebar.java +++ b/src/com/customify/desktop/components/Sidebar.java @@ -137,26 +137,26 @@ public Sidebar(String role,JFrame closableFrame, Socket socket) throws IOExcepti exception.printStackTrace(); } }); - business.addActionListener(e->{ - closableFrame.dispose(); - try { - ReadBusiness readBusiness = new ReadBusiness(socket,closableFrame); - } catch (IOException ioException) { - ioException.printStackTrace(); - } - //open business event - ActionListener triggerBusiness = new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - closableFrame.dispose(); - try { - new Layout(new ReadBusiness(socket,closableFrame), "Read All businesses", socket); - - } catch (IOException | ClassNotFoundException ioException) { - ioException.printStackTrace(); - } - } - }); +// business.addActionListener(e->{ +// closableFrame.dispose(); +// try { +// ReadBusiness readBusiness = new ReadBusiness(socket,closableFrame); +// } catch (IOException ioException) { +// ioException.printStackTrace(); +// } +// //open business event +// ActionListener triggerBusiness = new ActionListener() { +// @Override +// public void actionPerformed(ActionEvent e) { +// closableFrame.dispose(); +// try { +// new Layout(new ReadBusiness(socket,closableFrame), "Read All businesses", socket); +// +// } catch (IOException | ClassNotFoundException ioException) { +// ioException.printStackTrace(); +// } +// } +// }); //open business feedback ActionListener triggerFeedback = new ActionListener() { diff --git a/src/com/customify/desktop/customerFeedback/CustomerFeedbackForm.java b/src/com/customify/desktop/customerFeedback/CustomerFeedbackForm.java index f9346233..2b14327c 100644 --- a/src/com/customify/desktop/customerFeedback/CustomerFeedbackForm.java +++ b/src/com/customify/desktop/customerFeedback/CustomerFeedbackForm.java @@ -26,7 +26,8 @@ public CustomerFeedbackForm(Socket socket, JFrame closableFrame) throws IOExcept Container contentPane = new Container(); contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.Y_AXIS)); - contentPane.setBackground(Color.white); + contentPane.setBounds(200, 50, 400, 200); + contentPane.setBackground(Color.LIGHT_GRAY); setLayout(null); Businesses b = new Businesses(socket); @@ -35,8 +36,9 @@ public CustomerFeedbackForm(Socket socket, JFrame closableFrame) throws IOExcept for(int i = 0; i < busList.length; i++) { busList[i] = businessFormat.getNames().get(i); } + JComboBox cb=new JComboBox<>(busList); - cb.setPreferredSize(new Dimension(100,40)); + cb.setPreferredSize(new Dimension(320,40)); cb.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -45,6 +47,7 @@ public void actionPerformed(ActionEvent e) { }); JPanel header = new JPanel(); + JPanel comboxContainer = new JPanel(); JLabel headline = new JLabel("Customer feedback "); headline.setPreferredSize(new Dimension(300, 100)); headline.setFont(new Font("Montserrat", Font.BOLD, 29)); @@ -52,15 +55,24 @@ public void actionPerformed(ActionEvent e) { header.setBackground(Color.white); + JPanel customer_name = createNewInput("Customer name"); + JLabel comboxLab = new JLabel("Business name"); + comboxLab.setBackground(Color.white); + comboxLab.setFont(new Font("Montserrat", Font.PLAIN, 18)); + comboxLab.setBackground(Color.green); + comboxLab.setPreferredSize(new Dimension(200, 30)); JPanel business_id = createNewInput("Business Id"); JPanel title = createNewInput("Title"); JPanel description = createNewInput("Description"); + comboxContainer.add(comboxLab); + comboxContainer.setBackground(Color.white); + JPanel buttonGroup = new JPanel(); buttonGroup.setBackground(Color.white); - JButton btn = new JButton("Register"); + JButton btn = new JButton("Send"); btn.setBounds(1020,400,180,40); btn.setBackground(new Color(53,32,88)); btn.setForeground(Color.white); @@ -80,17 +92,15 @@ public void actionPerformed(ActionEvent e) { buttonGroup.add(btn); header.add(headline); + comboxContainer.add(cb); contentPane.add(header); contentPane.add(customer_name); - contentPane.add(cb); -// contentPane.add(business_id); + contentPane.add(comboxContainer); contentPane.add(title); contentPane.add(description); contentPane.add(buttonGroup); - contentPane.setBounds(200, 50, 800, 450); - add(contentPane); setBackground(Color.WHITE); new Layout(contentPane,"Send feedback", socket);