|
|
|
@ -224,7 +224,7 @@ public class Warenwirtschaftssystem {
|
|
|
|
|
menuItemLieferanten.addActionListener(e -> openLieferantenverwaltung());
|
|
|
|
|
menuItemBestandsbericht.addActionListener(e -> openBestandsbericht());
|
|
|
|
|
menuItemExportBericht.addActionListener(e -> exportBericht());
|
|
|
|
|
//menuItemHilfe.addActionListener(e -> showHelp());
|
|
|
|
|
menuItemHilfe.addActionListener(e -> showHelp());
|
|
|
|
|
|
|
|
|
|
// Weitere Menüpunkte
|
|
|
|
|
JMenuItem menuItemProduktionsplanung = new JMenuItem("Produktionsplanung");
|
|
|
|
@ -263,12 +263,17 @@ public class Warenwirtschaftssystem {
|
|
|
|
|
menuCRM.add(menuItemKundendienst);
|
|
|
|
|
menuCRM.add(menuItemKundenzufriedenheit);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JMenuItem menuItemPersonalverwaltung = new JMenuItem("Personalverwaltung");
|
|
|
|
|
JMenuItem menuItemRekrutierung = new JMenuItem("Rekrutierung");
|
|
|
|
|
JMenuItem menuItemMitarbeiterentwicklung = new JMenuItem("Mitarbeiterentwicklung");
|
|
|
|
|
JMenuItem menuItemZeitmanagement = new JMenuItem("Zeitmanagement");
|
|
|
|
|
JMenuItem menuItemLeistungsbewertung = new JMenuItem("Leistungsbewertung");
|
|
|
|
|
JMenuItem menuItemGehaltsabrechnung = new JMenuItem("Gehaltsabrechnung");
|
|
|
|
|
JMenuItem menuItemUrlaub = new JMenuItem("Urlaub verwalten");
|
|
|
|
|
JMenuItem menuItemTransfer = new JMenuItem("Transfer verwalten");
|
|
|
|
|
JMenuItem menuItemKündigung = new JMenuItem("Kündigung verwalten");
|
|
|
|
|
|
|
|
|
|
menuHR.add(menuItemPersonalverwaltung);
|
|
|
|
|
menuHR.add(menuItemRekrutierung);
|
|
|
|
@ -276,6 +281,9 @@ public class Warenwirtschaftssystem {
|
|
|
|
|
menuHR.add(menuItemZeitmanagement);
|
|
|
|
|
menuHR.add(menuItemLeistungsbewertung);
|
|
|
|
|
menuHR.add(menuItemGehaltsabrechnung);
|
|
|
|
|
menuHR.add(menuItemUrlaub);
|
|
|
|
|
menuHR.add(menuItemTransfer);
|
|
|
|
|
menuHR.add(menuItemKündigung);
|
|
|
|
|
|
|
|
|
|
JMenuItem menuItemSystemintegration = new JMenuItem("Systemintegration");
|
|
|
|
|
JMenuItem menuItemDatenschnittstellen = new JMenuItem("Datenschnittstellen");
|
|
|
|
@ -313,12 +321,15 @@ public class Warenwirtschaftssystem {
|
|
|
|
|
menuItemZeitmanagement.addActionListener(e -> openZeitmanagement());
|
|
|
|
|
menuItemLeistungsbewertung.addActionListener(e -> openLeistungsbewertung());
|
|
|
|
|
menuItemGehaltsabrechnung.addActionListener(e -> openGehaltsabrechnung());
|
|
|
|
|
menuItemUrlaub.addActionListener(e -> openUrlaubVerwaltung());
|
|
|
|
|
menuItemTransfer.addActionListener(e -> openTransferVerwaltung());
|
|
|
|
|
menuItemKündigung.addActionListener(e -> openKündigungVerwaltung());
|
|
|
|
|
|
|
|
|
|
//menuItemSystemintegration.addActionListener(e -> openSystemintegration());
|
|
|
|
|
menuItemSystemintegration.addActionListener(e -> openSystemintegration());
|
|
|
|
|
menuItemDatenschnittstellen.addActionListener(e -> openDatenschnittstellen());
|
|
|
|
|
//menuItemEchtzeitDaten.addActionListener(e -> openEchtzeitDaten());
|
|
|
|
|
//menuItemCloudServices.addActionListener(e -> openCloudServices());
|
|
|
|
|
//menuItemEDI.addActionListener(e -> openEDI());
|
|
|
|
|
menuItemEchtzeitDaten.addActionListener(e -> openEchtzeitDaten());
|
|
|
|
|
menuItemCloudServices.addActionListener(e -> openCloudServices());
|
|
|
|
|
menuItemEDI.addActionListener(e -> openEDI());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void loadData() {
|
|
|
|
@ -1236,12 +1247,24 @@ public class Warenwirtschaftssystem {
|
|
|
|
|
label.setForeground(Color.decode("#2C3E50"));
|
|
|
|
|
mainPanel.add(label, BorderLayout.NORTH);
|
|
|
|
|
|
|
|
|
|
// Implementiere hier die Funktionalität zur Buchhaltung
|
|
|
|
|
// Tabelle zur Anzeige der Buchhaltungsdaten
|
|
|
|
|
String[] columns = {"Kontonummer", "Beschreibung", "Saldo"};
|
|
|
|
|
DefaultTableModel buchhaltungTableModel = new DefaultTableModel(columns, 0);
|
|
|
|
|
JTable table = new JTable(buchhaltungTableModel);
|
|
|
|
|
JScrollPane scrollPane = new JScrollPane(table);
|
|
|
|
|
mainPanel.add(scrollPane, BorderLayout.CENTER);
|
|
|
|
|
|
|
|
|
|
// Beispielhafte Buchhaltungsdaten hinzufügen
|
|
|
|
|
buchhaltungTableModel.addRow(new Object[]{"1000", "Bankkonto", 50000});
|
|
|
|
|
buchhaltungTableModel.addRow(new Object[]{"2000", "Verbindlichkeiten", -20000});
|
|
|
|
|
buchhaltungTableModel.addRow(new Object[]{"3000", "Eigenkapital", 30000});
|
|
|
|
|
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
|
mainPanel.revalidate();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void openRechnungswesen() {
|
|
|
|
|
mainPanel.removeAll();
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
@ -1252,12 +1275,24 @@ public class Warenwirtschaftssystem {
|
|
|
|
|
label.setForeground(Color.decode("#2C3E50"));
|
|
|
|
|
mainPanel.add(label, BorderLayout.NORTH);
|
|
|
|
|
|
|
|
|
|
// Implementiere hier die Funktionalität zum Rechnungswesen
|
|
|
|
|
// Tabelle zur Anzeige der Rechnungswesen-Daten
|
|
|
|
|
String[] columns = {"Rechnungsnummer", "Datum", "Betrag", "Status"};
|
|
|
|
|
DefaultTableModel rechnungswesenTableModel = new DefaultTableModel(columns, 0);
|
|
|
|
|
JTable table = new JTable(rechnungswesenTableModel);
|
|
|
|
|
JScrollPane scrollPane = new JScrollPane(table);
|
|
|
|
|
mainPanel.add(scrollPane, BorderLayout.CENTER);
|
|
|
|
|
|
|
|
|
|
// Beispielhafte Rechnungswesen-Daten hinzufügen
|
|
|
|
|
rechnungswesenTableModel.addRow(new Object[]{"2024-01", "2024-01-10", 1500, "Bezahlt"});
|
|
|
|
|
rechnungswesenTableModel.addRow(new Object[]{"2024-02", "2024-01-15", 3000, "Offen"});
|
|
|
|
|
rechnungswesenTableModel.addRow(new Object[]{"2024-03", "2024-01-20", 4500, "Bezahlt"});
|
|
|
|
|
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
|
mainPanel.revalidate();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void openKostenrechnung() {
|
|
|
|
|
mainPanel.removeAll();
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
@ -1269,11 +1304,18 @@ public class Warenwirtschaftssystem {
|
|
|
|
|
mainPanel.add(label, BorderLayout.NORTH);
|
|
|
|
|
|
|
|
|
|
// Implementiere hier die Funktionalität zur Kostenrechnung
|
|
|
|
|
JTextArea textArea = new JTextArea("Hier können Sie Kostenrechnungsdaten einsehen und verwalten.");
|
|
|
|
|
textArea.setWrapStyleWord(true);
|
|
|
|
|
textArea.setLineWrap(true);
|
|
|
|
|
textArea.setEditable(false);
|
|
|
|
|
textArea.setFont(new Font("Arial", Font.PLAIN, 18));
|
|
|
|
|
mainPanel.add(new JScrollPane(textArea), BorderLayout.CENTER);
|
|
|
|
|
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
|
mainPanel.revalidate();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void openBudgetierung() {
|
|
|
|
|
mainPanel.removeAll();
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
@ -1317,11 +1359,18 @@ public class Warenwirtschaftssystem {
|
|
|
|
|
mainPanel.add(label, BorderLayout.NORTH);
|
|
|
|
|
|
|
|
|
|
// Implementiere hier die Funktionalität für Finanzberichte
|
|
|
|
|
JTextArea textArea = new JTextArea("Hier können Sie Finanzberichte einsehen und erstellen.");
|
|
|
|
|
textArea.setWrapStyleWord(true);
|
|
|
|
|
textArea.setLineWrap(true);
|
|
|
|
|
textArea.setEditable(false);
|
|
|
|
|
textArea.setFont(new Font("Arial", Font.PLAIN, 18));
|
|
|
|
|
mainPanel.add(new JScrollPane(textArea), BorderLayout.CENTER);
|
|
|
|
|
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
|
mainPanel.revalidate();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void openKontaktmanagement() {
|
|
|
|
|
mainPanel.removeAll();
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
@ -1333,11 +1382,18 @@ public class Warenwirtschaftssystem {
|
|
|
|
|
mainPanel.add(label, BorderLayout.NORTH);
|
|
|
|
|
|
|
|
|
|
// Implementiere hier die Funktionalität für Kontaktmanagement
|
|
|
|
|
JTextArea textArea = new JTextArea("Hier können Sie Kontakte einsehen und verwalten.");
|
|
|
|
|
textArea.setWrapStyleWord(true);
|
|
|
|
|
textArea.setLineWrap(true);
|
|
|
|
|
textArea.setEditable(false);
|
|
|
|
|
textArea.setFont(new Font("Arial", Font.PLAIN, 18));
|
|
|
|
|
mainPanel.add(new JScrollPane(textArea), BorderLayout.CENTER);
|
|
|
|
|
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
|
mainPanel.revalidate();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void openVertriebschancen() {
|
|
|
|
|
mainPanel.removeAll();
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
@ -1349,11 +1405,18 @@ public class Warenwirtschaftssystem {
|
|
|
|
|
mainPanel.add(label, BorderLayout.NORTH);
|
|
|
|
|
|
|
|
|
|
// Implementiere hier die Funktionalität für Vertriebschancen
|
|
|
|
|
JTextArea textArea = new JTextArea("Hier können Sie Vertriebschancen einsehen und verwalten.");
|
|
|
|
|
textArea.setWrapStyleWord(true);
|
|
|
|
|
textArea.setLineWrap(true);
|
|
|
|
|
textArea.setEditable(false);
|
|
|
|
|
textArea.setFont(new Font("Arial", Font.PLAIN, 18));
|
|
|
|
|
mainPanel.add(new JScrollPane(textArea), BorderLayout.CENTER);
|
|
|
|
|
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
|
mainPanel.revalidate();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void openMarketingkampagnen() {
|
|
|
|
|
mainPanel.removeAll();
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
@ -1365,11 +1428,18 @@ public class Warenwirtschaftssystem {
|
|
|
|
|
mainPanel.add(label, BorderLayout.NORTH);
|
|
|
|
|
|
|
|
|
|
// Implementiere hier die Funktionalität für Marketingkampagnen
|
|
|
|
|
JTextArea textArea = new JTextArea("Hier können Sie Marketingkampagnen einsehen und verwalten.");
|
|
|
|
|
textArea.setWrapStyleWord(true);
|
|
|
|
|
textArea.setLineWrap(true);
|
|
|
|
|
textArea.setEditable(false);
|
|
|
|
|
textArea.setFont(new Font("Arial", Font.PLAIN, 18));
|
|
|
|
|
mainPanel.add(new JScrollPane(textArea), BorderLayout.CENTER);
|
|
|
|
|
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
|
mainPanel.revalidate();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void openKundendienst() {
|
|
|
|
|
mainPanel.removeAll();
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
@ -1381,11 +1451,18 @@ public class Warenwirtschaftssystem {
|
|
|
|
|
mainPanel.add(label, BorderLayout.NORTH);
|
|
|
|
|
|
|
|
|
|
// Implementiere hier die Funktionalität für Kundendienst
|
|
|
|
|
JTextArea textArea = new JTextArea("Hier können Sie Kundendienst-Daten einsehen und verwalten.");
|
|
|
|
|
textArea.setWrapStyleWord(true);
|
|
|
|
|
textArea.setLineWrap(true);
|
|
|
|
|
textArea.setEditable(false);
|
|
|
|
|
textArea.setFont(new Font("Arial", Font.PLAIN, 18));
|
|
|
|
|
mainPanel.add(new JScrollPane(textArea), BorderLayout.CENTER);
|
|
|
|
|
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
|
mainPanel.revalidate();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void openKundenzufriedenheit() {
|
|
|
|
|
mainPanel.removeAll();
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
@ -1397,11 +1474,18 @@ public class Warenwirtschaftssystem {
|
|
|
|
|
mainPanel.add(label, BorderLayout.NORTH);
|
|
|
|
|
|
|
|
|
|
// Implementiere hier die Funktionalität für Kundenzufriedenheit
|
|
|
|
|
JTextArea textArea = new JTextArea("Hier können Sie Daten zur Kundenzufriedenheit einsehen und verwalten.");
|
|
|
|
|
textArea.setWrapStyleWord(true);
|
|
|
|
|
textArea.setLineWrap(true);
|
|
|
|
|
textArea.setEditable(false);
|
|
|
|
|
textArea.setFont(new Font("Arial", Font.PLAIN, 18));
|
|
|
|
|
mainPanel.add(new JScrollPane(textArea), BorderLayout.CENTER);
|
|
|
|
|
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
|
mainPanel.revalidate();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void openPersonalverwaltung() {
|
|
|
|
|
mainPanel.removeAll();
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
@ -1498,7 +1582,11 @@ public class Warenwirtschaftssystem {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void showEmployeeDetails(Employee employee) {
|
|
|
|
|
JPanel employeeDetailsPanel = new JPanel(new GridLayout(5, 2, 10, 10));
|
|
|
|
|
mainPanel.removeAll();
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
|
mainPanel.revalidate();
|
|
|
|
|
|
|
|
|
|
JPanel employeeDetailsPanel = new JPanel(new GridLayout(10, 2, 10, 10));
|
|
|
|
|
employeeDetailsPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Mitarbeiterdetails", TitledBorder.CENTER, TitledBorder.TOP));
|
|
|
|
|
employeeDetailsPanel.setBackground(Color.decode("#ECF0F1"));
|
|
|
|
|
|
|
|
|
@ -1514,19 +1602,147 @@ public class Warenwirtschaftssystem {
|
|
|
|
|
employeeDetailsPanel.add(new JLabel("Gehalt:"));
|
|
|
|
|
employeeDetailsPanel.add(new JLabel(String.valueOf(employee.getSalary())));
|
|
|
|
|
|
|
|
|
|
employeeDetailsPanel.add(new JLabel("Status:"));
|
|
|
|
|
employeeDetailsPanel.add(new JLabel(employee.getEmploymentStatus()));
|
|
|
|
|
|
|
|
|
|
JButton backButton = new JButton("Zurück");
|
|
|
|
|
backButton.setBackground(Color.decode("#2C3E50"));
|
|
|
|
|
backButton.setBackground(Color.decode("#2C3E50")); // Dunkelblau
|
|
|
|
|
backButton.setForeground(Color.WHITE);
|
|
|
|
|
employeeDetailsPanel.add(backButton);
|
|
|
|
|
|
|
|
|
|
// Urlaub hinzufügen
|
|
|
|
|
JButton addVacationButton = new JButton("Urlaub hinzufügen");
|
|
|
|
|
addVacationButton.setBackground(Color.decode("#3498DB")); // Hellblau
|
|
|
|
|
addVacationButton.setForeground(Color.WHITE);
|
|
|
|
|
employeeDetailsPanel.add(addVacationButton);
|
|
|
|
|
|
|
|
|
|
addVacationButton.addActionListener(e -> showAddVacationDialog(employee));
|
|
|
|
|
|
|
|
|
|
// Transfer hinzufügen
|
|
|
|
|
JButton addTransferButton = new JButton("Transfer hinzufügen");
|
|
|
|
|
addTransferButton.setBackground(Color.decode("#1ABC9C")); // Türkis
|
|
|
|
|
addTransferButton.setForeground(Color.WHITE);
|
|
|
|
|
employeeDetailsPanel.add(addTransferButton);
|
|
|
|
|
|
|
|
|
|
addTransferButton.addActionListener(e -> showAddTransferDialog(employee));
|
|
|
|
|
|
|
|
|
|
// Kündigung hinzufügen
|
|
|
|
|
JButton addTerminationButton = new JButton("Kündigung hinzufügen");
|
|
|
|
|
addTerminationButton.setBackground(Color.decode("#E74C3C")); // Rot
|
|
|
|
|
addTerminationButton.setForeground(Color.WHITE);
|
|
|
|
|
employeeDetailsPanel.add(addTerminationButton);
|
|
|
|
|
|
|
|
|
|
addTerminationButton.addActionListener(e -> showAddTerminationDialog(employee));
|
|
|
|
|
|
|
|
|
|
backButton.addActionListener(e -> openPersonalverwaltung());
|
|
|
|
|
|
|
|
|
|
mainPanel.removeAll();
|
|
|
|
|
mainPanel.add(employeeDetailsPanel, BorderLayout.CENTER);
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
|
mainPanel.revalidate();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void showAddVacationDialog(Employee employee) {
|
|
|
|
|
JPanel vacationPanel = new JPanel(new GridLayout(3, 2, 10, 10));
|
|
|
|
|
vacationPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Urlaub hinzufügen", TitledBorder.CENTER, TitledBorder.TOP));
|
|
|
|
|
|
|
|
|
|
vacationPanel.add(new JLabel("Startdatum:"));
|
|
|
|
|
JTextField startDateField = new JTextField();
|
|
|
|
|
vacationPanel.add(startDateField);
|
|
|
|
|
|
|
|
|
|
vacationPanel.add(new JLabel("Enddatum:"));
|
|
|
|
|
JTextField endDateField = new JTextField();
|
|
|
|
|
vacationPanel.add(endDateField);
|
|
|
|
|
|
|
|
|
|
vacationPanel.add(new JLabel("Grund:"));
|
|
|
|
|
JTextField reasonField = new JTextField();
|
|
|
|
|
vacationPanel.add(reasonField);
|
|
|
|
|
|
|
|
|
|
int option = JOptionPane.showConfirmDialog(frame, vacationPanel, "Urlaub hinzufügen", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
|
|
|
|
|
|
|
|
|
|
if (option == JOptionPane.OK_OPTION) {
|
|
|
|
|
String startDate = startDateField.getText();
|
|
|
|
|
String endDate = endDateField.getText();
|
|
|
|
|
String reason = reasonField.getText();
|
|
|
|
|
|
|
|
|
|
Vacation vacation = new Vacation(startDate, endDate, reason);
|
|
|
|
|
employee.addVacation(vacation);
|
|
|
|
|
saveEmployees(employees);
|
|
|
|
|
|
|
|
|
|
JOptionPane.showMessageDialog(frame, "Urlaub erfolgreich hinzugefügt", "Erfolg", JOptionPane.INFORMATION_MESSAGE);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void showAddTransferDialog(Employee employee) {
|
|
|
|
|
JPanel transferPanel = new JPanel(new GridLayout(4, 2, 10, 10));
|
|
|
|
|
transferPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Transfer hinzufügen", TitledBorder.CENTER, TitledBorder.TOP));
|
|
|
|
|
|
|
|
|
|
transferPanel.add(new JLabel("Datum:"));
|
|
|
|
|
JTextField dateField = new JTextField();
|
|
|
|
|
transferPanel.add(dateField);
|
|
|
|
|
|
|
|
|
|
transferPanel.add(new JLabel("Von Abteilung:"));
|
|
|
|
|
JTextField fromDepartmentField = new JTextField();
|
|
|
|
|
transferPanel.add(fromDepartmentField);
|
|
|
|
|
|
|
|
|
|
transferPanel.add(new JLabel("Zu Abteilung:"));
|
|
|
|
|
JTextField toDepartmentField = new JTextField();
|
|
|
|
|
transferPanel.add(toDepartmentField);
|
|
|
|
|
|
|
|
|
|
transferPanel.add(new JLabel("Grund:"));
|
|
|
|
|
JTextField reasonField = new JTextField();
|
|
|
|
|
transferPanel.add(reasonField);
|
|
|
|
|
|
|
|
|
|
int option = JOptionPane.showConfirmDialog(frame, transferPanel, "Transfer hinzufügen", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
|
|
|
|
|
|
|
|
|
|
if (option == JOptionPane.OK_OPTION) {
|
|
|
|
|
String date = dateField.getText();
|
|
|
|
|
String fromDepartment = fromDepartmentField.getText();
|
|
|
|
|
String toDepartment = toDepartmentField.getText();
|
|
|
|
|
String reason = reasonField.getText();
|
|
|
|
|
|
|
|
|
|
Transfer transfer = new Transfer(date, fromDepartment, toDepartment, reason);
|
|
|
|
|
employee.addTransfer(transfer);
|
|
|
|
|
saveEmployees(employees);
|
|
|
|
|
|
|
|
|
|
JOptionPane.showMessageDialog(frame, "Transfer erfolgreich hinzugefügt", "Erfolg", JOptionPane.INFORMATION_MESSAGE);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void showAddTerminationDialog(Employee employee) {
|
|
|
|
|
JPanel terminationPanel = new JPanel(new GridLayout(3, 2, 10, 10));
|
|
|
|
|
terminationPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Kündigung hinzufügen", TitledBorder.CENTER, TitledBorder.TOP));
|
|
|
|
|
|
|
|
|
|
terminationPanel.add(new JLabel("Datum:"));
|
|
|
|
|
JTextField dateField = new JTextField();
|
|
|
|
|
terminationPanel.add(dateField);
|
|
|
|
|
|
|
|
|
|
terminationPanel.add(new JLabel("Art:"));
|
|
|
|
|
String[] types = {"Freiwillig", "Unfreiwillig"};
|
|
|
|
|
JComboBox<String> typeComboBox = new JComboBox<>(types);
|
|
|
|
|
terminationPanel.add(typeComboBox);
|
|
|
|
|
|
|
|
|
|
terminationPanel.add(new JLabel("Grund:"));
|
|
|
|
|
JTextField reasonField = new JTextField();
|
|
|
|
|
terminationPanel.add(reasonField);
|
|
|
|
|
|
|
|
|
|
int option = JOptionPane.showConfirmDialog(frame, terminationPanel, "Kündigung hinzufügen", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
|
|
|
|
|
|
|
|
|
|
if (option == JOptionPane.OK_OPTION) {
|
|
|
|
|
String date = dateField.getText();
|
|
|
|
|
String type = (String) typeComboBox.getSelectedItem();
|
|
|
|
|
String reason = reasonField.getText();
|
|
|
|
|
|
|
|
|
|
Termination termination = new Termination(date, type, reason);
|
|
|
|
|
employee.addTermination(termination);
|
|
|
|
|
employee.setEmploymentStatus("Terminated");
|
|
|
|
|
saveEmployees(employees);
|
|
|
|
|
|
|
|
|
|
JOptionPane.showMessageDialog(frame, "Kündigung erfolgreich hinzugefügt", "Erfolg", JOptionPane.INFORMATION_MESSAGE);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void openRekrutierung() {
|
|
|
|
|
mainPanel.removeAll();
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
@ -1538,11 +1754,18 @@ public class Warenwirtschaftssystem {
|
|
|
|
|
mainPanel.add(label, BorderLayout.NORTH);
|
|
|
|
|
|
|
|
|
|
// Implementiere hier die Funktionalität für Rekrutierung
|
|
|
|
|
JTextArea textArea = new JTextArea("Hier können Sie Rekrutierungsdaten einsehen und verwalten.");
|
|
|
|
|
textArea.setWrapStyleWord(true);
|
|
|
|
|
textArea.setLineWrap(true);
|
|
|
|
|
textArea.setEditable(false);
|
|
|
|
|
textArea.setFont(new Font("Arial", Font.PLAIN, 18));
|
|
|
|
|
mainPanel.add(new JScrollPane(textArea), BorderLayout.CENTER);
|
|
|
|
|
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
|
mainPanel.revalidate();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void openMitarbeiterentwicklung() {
|
|
|
|
|
mainPanel.removeAll();
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
@ -1554,11 +1777,18 @@ public class Warenwirtschaftssystem {
|
|
|
|
|
mainPanel.add(label, BorderLayout.NORTH);
|
|
|
|
|
|
|
|
|
|
// Implementiere hier die Funktionalität für Mitarbeiterentwicklung
|
|
|
|
|
JTextArea textArea = new JTextArea("Hier können Sie Daten zur Mitarbeiterentwicklung einsehen und verwalten.");
|
|
|
|
|
textArea.setWrapStyleWord(true);
|
|
|
|
|
textArea.setLineWrap(true);
|
|
|
|
|
textArea.setEditable(false);
|
|
|
|
|
textArea.setFont(new Font("Arial", Font.PLAIN, 18));
|
|
|
|
|
mainPanel.add(new JScrollPane(textArea), BorderLayout.CENTER);
|
|
|
|
|
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
|
mainPanel.revalidate();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void openZeitmanagement() {
|
|
|
|
|
mainPanel.removeAll();
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
@ -1570,11 +1800,18 @@ public class Warenwirtschaftssystem {
|
|
|
|
|
mainPanel.add(label, BorderLayout.NORTH);
|
|
|
|
|
|
|
|
|
|
// Implementiere hier die Funktionalität für Zeitmanagement
|
|
|
|
|
JTextArea textArea = new JTextArea("Hier können Sie Zeitmanagement-Daten einsehen und verwalten.");
|
|
|
|
|
textArea.setWrapStyleWord(true);
|
|
|
|
|
textArea.setLineWrap(true);
|
|
|
|
|
textArea.setEditable(false);
|
|
|
|
|
textArea.setFont(new Font("Arial", Font.PLAIN, 18));
|
|
|
|
|
mainPanel.add(new JScrollPane(textArea), BorderLayout.CENTER);
|
|
|
|
|
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
|
mainPanel.revalidate();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void openLeistungsbewertung() {
|
|
|
|
|
mainPanel.removeAll();
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
@ -1586,11 +1823,18 @@ public class Warenwirtschaftssystem {
|
|
|
|
|
mainPanel.add(label, BorderLayout.NORTH);
|
|
|
|
|
|
|
|
|
|
// Implementiere hier die Funktionalität für Leistungsbewertung
|
|
|
|
|
JTextArea textArea = new JTextArea("Hier können Sie Leistungsbewertungsdaten einsehen und verwalten.");
|
|
|
|
|
textArea.setWrapStyleWord(true);
|
|
|
|
|
textArea.setLineWrap(true);
|
|
|
|
|
textArea.setEditable(false);
|
|
|
|
|
textArea.setFont(new Font("Arial", Font.PLAIN, 18));
|
|
|
|
|
mainPanel.add(new JScrollPane(textArea), BorderLayout.CENTER);
|
|
|
|
|
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
|
mainPanel.revalidate();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void openGehaltsabrechnung() {
|
|
|
|
|
mainPanel.removeAll();
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
@ -1994,6 +2238,92 @@ public class Warenwirtschaftssystem {
|
|
|
|
|
mainPanel.revalidate();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void openUrlaubVerwaltung() {
|
|
|
|
|
mainPanel.removeAll();
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
|
mainPanel.revalidate();
|
|
|
|
|
|
|
|
|
|
JLabel label = new JLabel("Urlaub Verwaltung", JLabel.CENTER);
|
|
|
|
|
label.setFont(new Font("Arial", Font.BOLD, 20));
|
|
|
|
|
label.setForeground(Color.decode("#2C3E50"));
|
|
|
|
|
mainPanel.add(label, BorderLayout.NORTH);
|
|
|
|
|
|
|
|
|
|
// Panel zur Anzeige der Urlaube
|
|
|
|
|
JPanel urlaubPanel = new JPanel(new BorderLayout());
|
|
|
|
|
DefaultTableModel urlaubTableModel = new DefaultTableModel(new Object[]{"Mitarbeiter", "Startdatum", "Enddatum"}, 0);
|
|
|
|
|
JTable urlaubTable = new JTable(urlaubTableModel);
|
|
|
|
|
JScrollPane scrollPane = new JScrollPane(urlaubTable);
|
|
|
|
|
urlaubPanel.add(scrollPane, BorderLayout.CENTER);
|
|
|
|
|
|
|
|
|
|
for (Employee employee : employees) {
|
|
|
|
|
for (Vacation vacation : employee.getVacations()) {
|
|
|
|
|
urlaubTableModel.addRow(new Object[]{employee.getName(), vacation.getStartDate(), vacation.getEndDate()});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mainPanel.add(urlaubPanel, BorderLayout.CENTER);
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
|
mainPanel.revalidate();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void openTransferVerwaltung() {
|
|
|
|
|
mainPanel.removeAll();
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
|
mainPanel.revalidate();
|
|
|
|
|
|
|
|
|
|
JLabel label = new JLabel("Transfer Verwaltung", JLabel.CENTER);
|
|
|
|
|
label.setFont(new Font("Arial", Font.BOLD, 20));
|
|
|
|
|
label.setForeground(Color.decode("#2C3E50"));
|
|
|
|
|
mainPanel.add(label, BorderLayout.NORTH);
|
|
|
|
|
|
|
|
|
|
// Panel zur Anzeige der Transfers
|
|
|
|
|
JPanel transferPanel = new JPanel(new BorderLayout());
|
|
|
|
|
DefaultTableModel transferTableModel = new DefaultTableModel(new Object[]{"Mitarbeiter", "Abteilung", "Neue Abteilung", "Datum"}, 0);
|
|
|
|
|
JTable transferTable = new JTable(transferTableModel);
|
|
|
|
|
JScrollPane scrollPane = new JScrollPane(transferTable);
|
|
|
|
|
transferPanel.add(scrollPane, BorderLayout.CENTER);
|
|
|
|
|
|
|
|
|
|
for (Employee employee : employees) {
|
|
|
|
|
for (Transfer transfer : employee.getTransfers()) {
|
|
|
|
|
transferTableModel.addRow(new Object[]{employee.getName(), transfer.getFromDepartment(), transfer.getToDepartment(), transfer.getDate()});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mainPanel.add(transferPanel, BorderLayout.CENTER);
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
|
mainPanel.revalidate();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void openKündigungVerwaltung() {
|
|
|
|
|
mainPanel.removeAll();
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
|
mainPanel.revalidate();
|
|
|
|
|
|
|
|
|
|
JLabel label = new JLabel("Kündigung Verwaltung", JLabel.CENTER);
|
|
|
|
|
label.setFont(new Font("Arial", Font.BOLD, 20));
|
|
|
|
|
label.setForeground(Color.decode("#2C3E50"));
|
|
|
|
|
mainPanel.add(label, BorderLayout.NORTH);
|
|
|
|
|
|
|
|
|
|
// Panel zur Anzeige der Kündigungen
|
|
|
|
|
JPanel kündigungPanel = new JPanel(new BorderLayout());
|
|
|
|
|
DefaultTableModel kündigungTableModel = new DefaultTableModel(new Object[]{"Mitarbeiter", "Datum", "Grund"}, 0);
|
|
|
|
|
JTable kündigungTable = new JTable(kündigungTableModel);
|
|
|
|
|
JScrollPane scrollPane = new JScrollPane(kündigungTable);
|
|
|
|
|
kündigungPanel.add(scrollPane, BorderLayout.CENTER);
|
|
|
|
|
|
|
|
|
|
for (Employee employee : employees) {
|
|
|
|
|
for (Termination termination : employee.getTerminations()) {
|
|
|
|
|
kündigungTableModel.addRow(new Object[]{employee.getName(), termination.getDate(), termination.getReason()});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mainPanel.add(kündigungPanel, BorderLayout.CENTER);
|
|
|
|
|
mainPanel.repaint();
|
|
|
|
|
mainPanel.revalidate();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
SwingUtilities.invokeLater(Warenwirtschaftssystem::new);
|
|
|
|
|