Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gershom #33

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/com/customify/cli/utils/authorization/files/Admin.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ID, FIRST_NAME,LAST_NAME , EMAIL, BUSINESS_ID, TITLE,SESSION_START_AT

323 Dush_Admin Sam [email protected] 1 BUSINESS_ADMIN 5-21-2021
323 Dush_Admin Sam [email protected] 1 BUSINESS_ADMIN 5-21-2021
323 Dush_Admin Sam [email protected] 1 BUSINESS_ADMIN 5-21-2021
18 changes: 0 additions & 18 deletions src/com/customify/cli/utils/authorization/files/Employee.csv
Original file line number Diff line number Diff line change
@@ -1,19 +1 @@
ID,FIRST_NAME,LAST_NAME ,EMAIL, BUSINESS_ID, TITLE,SESSION_START_AT,CREATED_AT














327823 Sandberg Twizeye [email protected] 1 BUSINESS_EMPLOYEE 2021-03-03 5-21-2021
327823 Sandberg Twizeye [email protected] 1 BUSINESS_EMPLOYEE 2021-03-03 5-21-2021
327823 Sandberg Twizeye [email protected] 1 BUSINESS_EMPLOYEE 2021-03-03 5-21-2021
327823 Sandberg Twizeye [email protected] 1 BUSINESS_EMPLOYEE 2021-03-03 5-21-2021
42 changes: 1 addition & 41 deletions src/com/customify/cli/utils/authorization/files/SuperAdmin.csv
Original file line number Diff line number Diff line change
@@ -1,41 +1 @@
ID, FIRST_NAME,LAST_NAME , EMAIL,TEL, SESSION_START_AT
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
34523 Patrick Niyogitare [email protected] 0789789097 5-21-2021
ID, FIRST_NAME,LAST_NAME , EMAIL,TEL, SESSION_START_AT
6 changes: 0 additions & 6 deletions src/com/customify/desktop/InitializeConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.*;
Expand Down
40 changes: 20 additions & 20 deletions src/com/customify/desktop/components/Sidebar.java
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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<String> 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) {
Expand All @@ -45,22 +47,32 @@ 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));
headline.setForeground(new Color(53,32,88));
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);
Expand All @@ -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);
Expand Down