]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Sun, 8 Oct 2017 00:07:03 +0000 (02:07 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 8 Oct 2017 00:13:27 +0000 (02:13 +0200)
- renamed companyEmployee to employee as there was no need for
- also renamed EJB name and backing beans
- half-added event for being fired (and fully observed by general bean) when an
  employee has been added
- if an employee's displayed name is being rendered, also try to render an
  assigned department (if any)

Signed-off-by: Roland Häder <roland@mxchange.org>
25 files changed:
src/java/org/mxchange/jfinancials/beans/business/basicdata/FinancialsBusinessDataWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/business/branchoffice/FinancialsBranchOfficeWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/business/department/FinancialsDepartmentWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/business/employee/FinancialsAdminCompanyEmployeeWebRequestBean.java [deleted file]
src/java/org/mxchange/jfinancials/beans/business/employee/FinancialsAdminCompanyEmployeeWebRequestController.java [deleted file]
src/java/org/mxchange/jfinancials/beans/business/employee/FinancialsAdminEmployeeWebRequestBean.java [new file with mode: 0644]
src/java/org/mxchange/jfinancials/beans/business/employee/FinancialsAdminEmployeeWebRequestController.java [new file with mode: 0644]
src/java/org/mxchange/jfinancials/beans/business/employee/FinancialsCompanyEmployeeWebRequestBean.java [deleted file]
src/java/org/mxchange/jfinancials/beans/business/employee/FinancialsCompanyEmployeeWebRequestController.java [deleted file]
src/java/org/mxchange/jfinancials/beans/business/employee/FinancialsEmployeeWebRequestBean.java [new file with mode: 0644]
src/java/org/mxchange/jfinancials/beans/business/employee/FinancialsEmployeeWebRequestController.java [new file with mode: 0644]
src/java/org/mxchange/jfinancials/beans/helper/FinancialsWebRequestHelperBean.java
src/java/org/mxchange/jfinancials/beans/mobileprovider/FinancialsMobileProviderWebRequestBean.java
src/java/org/mxchange/jfinancials/converter/business/company_employee/FinancialsCompanyEmployeeConverter.java
src/java/org/mxchange/jfinancials/converter/business/headquarters/FinancialsCompanyHeadquartersConverter.java
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/WEB-INF/templates/admin/basic_company_data/admin_form_basic_company_data.tpl
web/WEB-INF/templates/admin/branch_office/admin_form_branch_office_data.tpl
web/WEB-INF/templates/admin/department/admin_form_department_data.tpl
web/WEB-INF/templates/admin/employee/admin_form_employee_data.tpl
web/admin/basic_company_data/admin_basic_company_data_list.xhtml
web/admin/branch_office/admin_branch_office_list.xhtml
web/admin/department/admin_department_list.xhtml
web/admin/employee/admin_employee_list.xhtml

index 7b49d0afbc5c3fe35c88e94c779bfa8a2451a7bb..c5d12c37d1316c3e89cb8d9901ba3d5f71f63590 100644 (file)
@@ -407,8 +407,7 @@ public class FinancialsBusinessDataWebRequestBean extends BaseFinancialsBean imp
                                public int compare (final BusinessBasicData o1, final BusinessBasicData o2) {
                                        return o1.getBasicDataId() > o2.getBasicDataId() ? 1 : o1.getBasicDataId() < o2.getBasicDataId() ? -1 : 0;
                                }
-                       }
-                       );
+                       });
                }
        }
 
index 369717e773541ace3429f368aec0f1e0c8101b2d..fe35a43ddf6bba9be466b7ac772b966f68fdf120 100644 (file)
@@ -178,8 +178,7 @@ public class FinancialsBranchOfficeWebRequestBean extends BaseFinancialsBean imp
                                public int compare (final BranchOffice o1, final BranchOffice o2) {
                                        return o1.getBranchId() > o2.getBranchId() ? 1 : o1.getBranchId() < o2.getBranchId() ? -1 : 0;
                                }
-                       }
-                       );
+                       });
                }
        }
 
index 61ca5a7360bf274ef9cb44fd1a247eada64e1fa2..294670fc6090f991310be9a9ad8b1ad156020b01 100644 (file)
@@ -178,8 +178,7 @@ public class FinancialsDepartmentWebRequestBean extends BaseFinancialsBean imple
                                public int compare (final Department o1, final Department o2) {
                                        return o1.getDepartmentId() > o2.getDepartmentId() ? 1 : o1.getDepartmentId() < o2.getDepartmentId() ? -1 : 0;
                                }
-                       }
-                       );
+                       });
                }
        }
 
diff --git a/src/java/org/mxchange/jfinancials/beans/business/employee/FinancialsAdminCompanyEmployeeWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/business/employee/FinancialsAdminCompanyEmployeeWebRequestBean.java
deleted file mode 100644 (file)
index e936038..0000000
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
- * Copyright (C) 2017 RRoland Häder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jfinancials.beans.business.employee;
-
-import javax.ejb.EJB;
-import javax.enterprise.context.RequestScoped;
-import javax.inject.Named;
-import org.mxchange.jcontacts.model.contact.Contact;
-import org.mxchange.jcontactsbusiness.model.basicdata.BusinessBasicData;
-import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
-import org.mxchange.jcontactsbusiness.model.department.Department;
-import org.mxchange.jcontactsbusiness.model.employee.AdminCompanyEmployeeSessionBeanRemote;
-import org.mxchange.jcontactsbusiness.model.headquarters.HeadquartersData;
-import org.mxchange.jfinancials.beans.BaseFinancialsBean;
-import org.mxchange.jphone.model.phonenumbers.mobileprovider.MobileProvider;
-import org.mxchange.jusercore.model.user.User;
-
-/**
- * A request-scoped bean for administrative purposes for company employees.
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-@Named ("adminCompanyEmployeeController")
-@RequestScoped
-public class FinancialsAdminCompanyEmployeeWebRequestBean extends BaseFinancialsBean implements FinancialsAdminCompanyEmployeeWebRequestController {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 12_886_968_547_360L;
-
-       /**
-        * EJB for administrative company employee purposes
-        */
-       @EJB (lookup = "java:global/jfinancials-ejb/adminCompanyEmployee!org.mxchange.jcontactsbusiness.model.employee.AdminCompanyEmployeeSessionBeanRemote")
-       private AdminCompanyEmployeeSessionBeanRemote adminCompanyEmployeeBean;
-
-       /**
-        * Assigned branch office
-        */
-       private BranchOffice employeeBranchOffice;
-
-       /**
-        * Assigned basic data instance
-        */
-       private BusinessBasicData employeeCompany;
-
-       /**
-        * Department where employee works (alternative to headquarters)
-        */
-       private Department employeeDepartment;
-
-       /**
-        * Employee's business email address
-        */
-       private String employeeEmailAddress;
-
-       /**
-        * Employee's Headquarters data, if he is working there
-        */
-       private HeadquartersData employeeHeadquarters;
-
-       /**
-        * Assigned personal data of the employee
-        */
-       private Contact employeePersonalContact;
-
-       /**
-        * Employee's phone extension (on top of a "main number")
-        */
-       private Long employeePhoneExtension;
-
-       /**
-        * Employee's staff number
-        */
-       private Long employeeStaffNumber;
-
-       /**
-        * Assigned user account
-        */
-       private User employeeUserOwner;
-
-       /**
-        * Mobile number for employee's business mobile
-        */
-       private Long mobileNumber;
-
-       /**
-        * Mobile provider instance for employee's business mobile
-        */
-       private MobileProvider mobileProvider;
-
-       /**
-        * Default constructor
-        */
-       public FinancialsAdminCompanyEmployeeWebRequestBean () {
-               // Call super constructor
-               super();
-       }
-
-       /**
-        * Getter for employee's assigned branch office
-        * <p>
-        * @return Employee's assigned branch office
-        */
-       public BranchOffice getEmployeeBranchOffice () {
-               return this.employeeBranchOffice;
-       }
-
-       /**
-        * Setter for employee's assigned branch office
-        * <p>
-        * @param employeeBranchOffice Employee's assigned branch office
-        */
-       public void setEmployeeBranchOffice (final BranchOffice employeeBranchOffice) {
-               this.employeeBranchOffice = employeeBranchOffice;
-       }
-
-       /**
-        * Getter for employee's assigned basic company data
-        * <p>
-        * @return Employee's assigned basic company data
-        */
-       public BusinessBasicData getEmployeeCompany () {
-               return this.employeeCompany;
-       }
-
-       /**
-        * Setter for employee's assigned basic company data
-        * <p>
-        * @param employeeCompany Employee's assigned basic company data
-        */
-       public void setEmployeeCompany (final BusinessBasicData employeeCompany) {
-               this.employeeCompany = employeeCompany;
-       }
-
-       /**
-        * Getter for employee's assigned department
-        * <p>
-        * @return Employee's assigned department
-        */
-       public Department getEmployeeDepartment () {
-               return this.employeeDepartment;
-       }
-
-       /**
-        * Setter for employee's assigned department
-        * <p>
-        * @param employeeDepartment Employee's assigned department
-        */
-       public void setEmployeeDepartment (final Department employeeDepartment) {
-               this.employeeDepartment = employeeDepartment;
-       }
-
-       /**
-        * Getter for employee's business email address
-        * <p>
-        * @return Employee's business email address
-        */
-       public String getEmployeeEmailAddress () {
-               return this.employeeEmailAddress;
-       }
-
-       /**
-        * Setter for employee's business email address
-        * <p>
-        * @param employeeEmailAddress Employee's business email address
-        */
-       public void setEmployeeEmailAddress (final String employeeEmailAddress) {
-               this.employeeEmailAddress = employeeEmailAddress;
-       }
-
-       /**
-        * Getter for employee's assigned headquarters (if no branch office)
-        * <p>
-        * @return Employee's assigned headquarters
-        */
-       public HeadquartersData getEmployeeHeadquarters () {
-               return this.employeeHeadquarters;
-       }
-
-       /**
-        * Setter for employee's assigned headquarters (if no branch office)
-        * <p>
-        * @param employeeHeadquarters Employee's assigned headquarters
-        */
-       public void setEmployeeHeadquarters (final HeadquartersData employeeHeadquarters) {
-               this.employeeHeadquarters = employeeHeadquarters;
-       }
-
-       /**
-        * Getter for employee's personal contact data
-        * <p>
-        * @return Employee's personal contact data
-        */
-       public Contact getEmployeePersonalContact () {
-               return this.employeePersonalContact;
-       }
-
-       /**
-        * Setter for employee's personal contact data
-        * <p>
-        * @param employeePersonalContact Employee's personal contact data
-        */
-       public void setEmployeePersonalContact (final Contact employeePersonalContact) {
-               this.employeePersonalContact = employeePersonalContact;
-       }
-
-       /**
-        * Getter for employee's phone extension
-        * <p>
-        * @return Employee's phone extension
-        */
-       public Long getEmployeePhoneExtension () {
-               return this.employeePhoneExtension;
-       }
-
-       /**
-        * Getter for employee's phone extension
-        * <p>
-        * @param employeePhoneExtension Employee's phone extension
-        */
-       public void setEmployeePhoneExtension (final Long employeePhoneExtension) {
-               this.employeePhoneExtension = employeePhoneExtension;
-       }
-
-       /**
-        * Getter for employee's staff number
-        * <p>
-        * @return Employee's staff number
-        */
-       public Long getEmployeeStaffNumber () {
-               return this.employeeStaffNumber;
-       }
-
-       /**
-        * Setter for employee's staff number
-        * <p>
-        * @param employeeStaffNumber Employee's staff number
-        */
-       public void setEmployeeStaffNumber (final Long employeeStaffNumber) {
-               this.employeeStaffNumber = employeeStaffNumber;
-       }
-
-       /**
-        * Getter for employee's user "owner"
-        * <p>
-        * @return Employee's user "owner"
-        */
-       public User getEmployeeUserOwner () {
-               return this.employeeUserOwner;
-       }
-
-       /**
-        * Setter for employee's user "owner"
-        * <p>
-        * @param employeeUserOwner Employee's user "owner"
-        */
-       public void setEmployeeUserOwner (final User employeeUserOwner) {
-               this.employeeUserOwner = employeeUserOwner;
-       }
-
-       /**
-        * Getter for mobile number
-        * <p>
-        * @return Mobile number
-        */
-       public Long getMobileNumber () {
-               return this.mobileNumber;
-       }
-
-       /**
-        * Setter for mobile number
-        * <p>
-        * @param mobileNumber Mobile number
-        */
-       public void setMobileNumber (final Long mobileNumber) {
-               this.mobileNumber = mobileNumber;
-       }
-
-       /**
-        * Getter for mobile provider instance
-        * <p>
-        * @return Mobile provider instance
-        */
-       public MobileProvider getMobileProvider () {
-               return this.mobileProvider;
-       }
-
-       /**
-        * Setter for mobile provider instance
-        * <p>
-        * @param mobileProvider Mobile provider instance
-        */
-       public void setMobileProvider (final MobileProvider mobileProvider) {
-               this.mobileProvider = mobileProvider;
-       }
-
-}
diff --git a/src/java/org/mxchange/jfinancials/beans/business/employee/FinancialsAdminCompanyEmployeeWebRequestController.java b/src/java/org/mxchange/jfinancials/beans/business/employee/FinancialsAdminCompanyEmployeeWebRequestController.java
deleted file mode 100644 (file)
index d8bb8d7..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (C) 2017 Roland Häder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jfinancials.beans.business.employee;
-
-import java.io.Serializable;
-
-/**
- * An interface for request-scoped administrative company employee beans
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public interface FinancialsAdminCompanyEmployeeWebRequestController extends Serializable {
-
-}
diff --git a/src/java/org/mxchange/jfinancials/beans/business/employee/FinancialsAdminEmployeeWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/business/employee/FinancialsAdminEmployeeWebRequestBean.java
new file mode 100644 (file)
index 0000000..12545fd
--- /dev/null
@@ -0,0 +1,324 @@
+/*
+ * Copyright (C) 2017 RRoland Häder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jfinancials.beans.business.employee;
+
+import javax.ejb.EJB;
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.event.Event;
+import javax.enterprise.inject.Any;
+import javax.inject.Inject;
+import javax.inject.Named;
+import org.mxchange.jcontacts.model.contact.Contact;
+import org.mxchange.jcontactsbusiness.events.employee.added.ObservableEmployeeAddedEvent;
+import org.mxchange.jcontactsbusiness.model.basicdata.BusinessBasicData;
+import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
+import org.mxchange.jcontactsbusiness.model.department.Department;
+import org.mxchange.jcontactsbusiness.model.employee.AdminCompanyEmployeeSessionBeanRemote;
+import org.mxchange.jcontactsbusiness.model.headquarters.HeadquartersData;
+import org.mxchange.jfinancials.beans.BaseFinancialsBean;
+import org.mxchange.jphone.model.phonenumbers.mobileprovider.MobileProvider;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * A request-scoped bean for administrative purposes for company employees.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Named ("adminEmployeeController")
+@RequestScoped
+public class FinancialsAdminEmployeeWebRequestBean extends BaseFinancialsBean implements FinancialsAdminEmployeeWebRequestController {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 12_886_968_547_360L;
+
+       /**
+        * An event being fired when an employee has been added
+        */
+       @Inject
+       @Any
+       private Event<ObservableEmployeeAddedEvent> addedEmployeeEvent;
+
+       /**
+        * EJB for administrative company employee purposes
+        */
+       @EJB (lookup = "java:global/jfinancials-ejb/adminCompanyEmployee!org.mxchange.jcontactsbusiness.model.employee.AdminCompanyEmployeeSessionBeanRemote")
+       private AdminCompanyEmployeeSessionBeanRemote adminCompanyEmployeeBean;
+
+       /**
+        * Assigned branch office
+        */
+       private BranchOffice employeeBranchOffice;
+
+       /**
+        * Assigned basic data instance
+        */
+       private BusinessBasicData employeeCompany;
+
+       /**
+        * Department where employee works (alternative to headquarters)
+        */
+       private Department employeeDepartment;
+
+       /**
+        * Employee's business email address
+        */
+       private String employeeEmailAddress;
+
+       /**
+        * Employee's Headquarters data, if he is working there
+        */
+       private HeadquartersData employeeHeadquarters;
+
+       /**
+        * Assigned personal data of the employee
+        */
+       private Contact employeePersonalContact;
+
+       /**
+        * Employee's phone extension (on top of a "main number")
+        */
+       private Long employeePhoneExtension;
+
+       /**
+        * Employee's staff number
+        */
+       private Long employeeStaffNumber;
+
+       /**
+        * Assigned user account
+        */
+       private User employeeUserOwner;
+
+       /**
+        * Mobile number for employee's business mobile
+        */
+       private Long mobileNumber;
+
+       /**
+        * Mobile provider instance for employee's business mobile
+        */
+       private MobileProvider mobileProvider;
+
+       /**
+        * Default constructor
+        */
+       public FinancialsAdminEmployeeWebRequestBean () {
+               // Call super constructor
+               super();
+       }
+
+       /**
+        * Getter for employee's assigned branch office
+        * <p>
+        * @return Employee's assigned branch office
+        */
+       public BranchOffice getEmployeeBranchOffice () {
+               return this.employeeBranchOffice;
+       }
+
+       /**
+        * Setter for employee's assigned branch office
+        * <p>
+        * @param employeeBranchOffice Employee's assigned branch office
+        */
+       public void setEmployeeBranchOffice (final BranchOffice employeeBranchOffice) {
+               this.employeeBranchOffice = employeeBranchOffice;
+       }
+
+       /**
+        * Getter for employee's assigned basic company data
+        * <p>
+        * @return Employee's assigned basic company data
+        */
+       public BusinessBasicData getEmployeeCompany () {
+               return this.employeeCompany;
+       }
+
+       /**
+        * Setter for employee's assigned basic company data
+        * <p>
+        * @param employeeCompany Employee's assigned basic company data
+        */
+       public void setEmployeeCompany (final BusinessBasicData employeeCompany) {
+               this.employeeCompany = employeeCompany;
+       }
+
+       /**
+        * Getter for employee's assigned department
+        * <p>
+        * @return Employee's assigned department
+        */
+       public Department getEmployeeDepartment () {
+               return this.employeeDepartment;
+       }
+
+       /**
+        * Setter for employee's assigned department
+        * <p>
+        * @param employeeDepartment Employee's assigned department
+        */
+       public void setEmployeeDepartment (final Department employeeDepartment) {
+               this.employeeDepartment = employeeDepartment;
+       }
+
+       /**
+        * Getter for employee's business email address
+        * <p>
+        * @return Employee's business email address
+        */
+       public String getEmployeeEmailAddress () {
+               return this.employeeEmailAddress;
+       }
+
+       /**
+        * Setter for employee's business email address
+        * <p>
+        * @param employeeEmailAddress Employee's business email address
+        */
+       public void setEmployeeEmailAddress (final String employeeEmailAddress) {
+               this.employeeEmailAddress = employeeEmailAddress;
+       }
+
+       /**
+        * Getter for employee's assigned headquarters (if no branch office)
+        * <p>
+        * @return Employee's assigned headquarters
+        */
+       public HeadquartersData getEmployeeHeadquarters () {
+               return this.employeeHeadquarters;
+       }
+
+       /**
+        * Setter for employee's assigned headquarters (if no branch office)
+        * <p>
+        * @param employeeHeadquarters Employee's assigned headquarters
+        */
+       public void setEmployeeHeadquarters (final HeadquartersData employeeHeadquarters) {
+               this.employeeHeadquarters = employeeHeadquarters;
+       }
+
+       /**
+        * Getter for employee's personal contact data
+        * <p>
+        * @return Employee's personal contact data
+        */
+       public Contact getEmployeePersonalContact () {
+               return this.employeePersonalContact;
+       }
+
+       /**
+        * Setter for employee's personal contact data
+        * <p>
+        * @param employeePersonalContact Employee's personal contact data
+        */
+       public void setEmployeePersonalContact (final Contact employeePersonalContact) {
+               this.employeePersonalContact = employeePersonalContact;
+       }
+
+       /**
+        * Getter for employee's phone extension
+        * <p>
+        * @return Employee's phone extension
+        */
+       public Long getEmployeePhoneExtension () {
+               return this.employeePhoneExtension;
+       }
+
+       /**
+        * Getter for employee's phone extension
+        * <p>
+        * @param employeePhoneExtension Employee's phone extension
+        */
+       public void setEmployeePhoneExtension (final Long employeePhoneExtension) {
+               this.employeePhoneExtension = employeePhoneExtension;
+       }
+
+       /**
+        * Getter for employee's staff number
+        * <p>
+        * @return Employee's staff number
+        */
+       public Long getEmployeeStaffNumber () {
+               return this.employeeStaffNumber;
+       }
+
+       /**
+        * Setter for employee's staff number
+        * <p>
+        * @param employeeStaffNumber Employee's staff number
+        */
+       public void setEmployeeStaffNumber (final Long employeeStaffNumber) {
+               this.employeeStaffNumber = employeeStaffNumber;
+       }
+
+       /**
+        * Getter for employee's user "owner"
+        * <p>
+        * @return Employee's user "owner"
+        */
+       public User getEmployeeUserOwner () {
+               return this.employeeUserOwner;
+       }
+
+       /**
+        * Setter for employee's user "owner"
+        * <p>
+        * @param employeeUserOwner Employee's user "owner"
+        */
+       public void setEmployeeUserOwner (final User employeeUserOwner) {
+               this.employeeUserOwner = employeeUserOwner;
+       }
+
+       /**
+        * Getter for mobile number
+        * <p>
+        * @return Mobile number
+        */
+       public Long getMobileNumber () {
+               return this.mobileNumber;
+       }
+
+       /**
+        * Setter for mobile number
+        * <p>
+        * @param mobileNumber Mobile number
+        */
+       public void setMobileNumber (final Long mobileNumber) {
+               this.mobileNumber = mobileNumber;
+       }
+
+       /**
+        * Getter for mobile provider instance
+        * <p>
+        * @return Mobile provider instance
+        */
+       public MobileProvider getMobileProvider () {
+               return this.mobileProvider;
+       }
+
+       /**
+        * Setter for mobile provider instance
+        * <p>
+        * @param mobileProvider Mobile provider instance
+        */
+       public void setMobileProvider (final MobileProvider mobileProvider) {
+               this.mobileProvider = mobileProvider;
+       }
+
+}
diff --git a/src/java/org/mxchange/jfinancials/beans/business/employee/FinancialsAdminEmployeeWebRequestController.java b/src/java/org/mxchange/jfinancials/beans/business/employee/FinancialsAdminEmployeeWebRequestController.java
new file mode 100644 (file)
index 0000000..75d1f5a
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2017 Roland Häder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jfinancials.beans.business.employee;
+
+import java.io.Serializable;
+
+/**
+ * An interface for request-scoped administrative company employee beans
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface FinancialsAdminEmployeeWebRequestController extends Serializable {
+
+}
diff --git a/src/java/org/mxchange/jfinancials/beans/business/employee/FinancialsCompanyEmployeeWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/business/employee/FinancialsCompanyEmployeeWebRequestBean.java
deleted file mode 100644 (file)
index 56869c2..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (C) 2017 RRoland Häder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jfinancials.beans.business.employee;
-
-import fish.payara.cdi.jsr107.impl.NamedCache;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import javax.annotation.PostConstruct;
-import javax.cache.Cache;
-import javax.ejb.EJB;
-import javax.enterprise.context.RequestScoped;
-import javax.inject.Inject;
-import javax.inject.Named;
-import org.mxchange.jcontactsbusiness.model.employee.CompanyEmployeeSessionBeanRemote;
-import org.mxchange.jcontactsbusiness.model.employee.Employee;
-import org.mxchange.jfinancials.beans.BaseFinancialsBean;
-
-/**
- * A request-scoped bean for general purposes for company employees.
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-@Named ("companyEmployeeController")
-@RequestScoped
-public class FinancialsCompanyEmployeeWebRequestBean extends BaseFinancialsBean implements FinancialsCompanyEmployeeWebRequestController {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 12_886_968_547_361L;
-
-       /**
-        * EJB for general company employee purposes
-        */
-       @EJB (lookup = "java:global/jfinancials-ejb/companyEmployee!org.mxchange.jcontactsbusiness.model.employee.CompanyEmployeeSessionBeanRemote")
-       private CompanyEmployeeSessionBeanRemote companyEmployeeBean;
-
-       /**
-        * List of all company employees
-        */
-       @Inject
-       @NamedCache (cacheName = "companyEmployeeCache")
-       private Cache<Long, Employee> companyEmployeeCache;
-
-       /**
-        * A list of filtered employees
-        */
-       private List<Employee> filteredEmployees;
-
-       /**
-        * Default constructor
-        */
-       public FinancialsCompanyEmployeeWebRequestBean () {
-               // Call super constructor
-               super();
-       }
-
-       /**
-        * Returns a list of all company employees
-        * <p>
-        * @return List of all company employees
-        */
-       @SuppressWarnings ("ReturnOfCollectionOrArrayField")
-       public List<Employee> allCompanyEmployees () {
-               // Init list
-               final List<Employee> list = new LinkedList<>();
-
-               // Get iterator
-               final Iterator<Cache.Entry<Long, Employee>> iterator = this.companyEmployeeCache.iterator();
-
-               // Loop over all
-               while (iterator.hasNext()) {
-                       // Get next entry
-                       final Cache.Entry<Long, Employee> next = iterator.next();
-
-                       // Add value to list
-                       list.add(next.getValue());
-               }
-
-               // Return it
-               return list;
-       }
-
-       /**
-        * Getter for filtered list of employees
-        * <p>
-        * @return Filtered list of employees
-        */
-       @SuppressWarnings ("ReturnOfCollectionOrArrayField")
-       public List<Employee> getFilteredEmployees () {
-               return this.filteredEmployees;
-       }
-
-       /**
-        * Getter for filtered list of employees
-        * <p>
-        * @param filteredEmployees Filtered list of employees
-        */
-       @SuppressWarnings ("AssignmentToCollectionOrArrayFieldFromParameter")
-       public void setFilteredEmployees (final List<Employee> filteredEmployees) {
-               this.filteredEmployees = filteredEmployees;
-       }
-
-       /**
-        * Initialization method
-        */
-       @PostConstruct
-       public void init () {
-               // Is cache there?
-               if (!this.companyEmployeeCache.iterator().hasNext()) {
-                       // Get whole list
-                       final List<Employee> list = this.companyEmployeeBean.allCompanyEmployees();
-
-                       // Add all
-                       for (final Iterator<Employee> iterator = list.iterator(); iterator.hasNext();) {
-                               // Get next element
-                               final Employee next = iterator.next();
-
-                               // Add it to cache
-                               this.companyEmployeeCache.put(next.getEmployeeId(), next);
-                       }
-               }
-       }
-
-}
diff --git a/src/java/org/mxchange/jfinancials/beans/business/employee/FinancialsCompanyEmployeeWebRequestController.java b/src/java/org/mxchange/jfinancials/beans/business/employee/FinancialsCompanyEmployeeWebRequestController.java
deleted file mode 100644 (file)
index ef6bd14..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (C) 2017 Roland Häder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jfinancials.beans.business.employee;
-
-import java.io.Serializable;
-
-/**
- * An interface for request-scoped general company employee beans
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public interface FinancialsCompanyEmployeeWebRequestController extends Serializable {
-
-}
diff --git a/src/java/org/mxchange/jfinancials/beans/business/employee/FinancialsEmployeeWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/business/employee/FinancialsEmployeeWebRequestBean.java
new file mode 100644 (file)
index 0000000..e3554ff
--- /dev/null
@@ -0,0 +1,184 @@
+/*
+ * Copyright (C) 2017 RRoland Häder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jfinancials.beans.business.employee;
+
+import fish.payara.cdi.jsr107.impl.NamedCache;
+import java.text.MessageFormat;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import javax.annotation.PostConstruct;
+import javax.cache.Cache;
+import javax.ejb.EJB;
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.event.Observes;
+import javax.inject.Inject;
+import javax.inject.Named;
+import org.mxchange.jcontactsbusiness.events.employee.added.ObservableEmployeeAddedEvent;
+import org.mxchange.jcontactsbusiness.model.employee.CompanyEmployeeSessionBeanRemote;
+import org.mxchange.jcontactsbusiness.model.employee.Employee;
+import org.mxchange.jfinancials.beans.BaseFinancialsBean;
+
+/**
+ * A request-scoped bean for general purposes for company employees.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Named ("employeeController")
+@RequestScoped
+public class FinancialsEmployeeWebRequestBean extends BaseFinancialsBean implements FinancialsEmployeeWebRequestController {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 12_886_968_547_361L;
+
+       /**
+        * List of all employees
+        */
+       private final List<Employee> allEmployees;
+
+       /**
+        * EJB for general company employee purposes
+        */
+       @EJB (lookup = "java:global/jfinancials-ejb/employee!org.mxchange.jcontactsbusiness.model.employee.CompanyEmployeeSessionBeanRemote")
+       private CompanyEmployeeSessionBeanRemote employeeBean;
+
+       /**
+        * List of all company employees
+        */
+       @Inject
+       @NamedCache (cacheName = "companyEmployeeCache")
+       private Cache<Long, Employee> employeeCache;
+
+       /**
+        * A list of filtered employees
+        */
+       private List<Employee> filteredEmployees;
+
+       /**
+        * Default constructor
+        */
+       public FinancialsEmployeeWebRequestBean () {
+               // Call super constructor
+               super();
+
+               // Init list
+               this.allEmployees = new LinkedList<>();
+       }
+
+       /**
+        * Observes events being fired when an employee has been added
+        * <p>
+        * @param event Event being fired
+        */
+       public void afterEmployeeAddedEvent (@Observes final ObservableEmployeeAddedEvent event) {
+               // Validate parameter
+               if (null == event) {
+                       // Throw NPE
+                       throw new NullPointerException("event is null"); //NOI18N
+               } else if (event.getEmployee() == null) {
+                       // Throw it again
+                       throw new NullPointerException("event.employee is null"); //NOI18N
+               } else if (event.getEmployee().getEmployeeId() == null) {
+                       // Throw it again
+                       throw new NullPointerException("event.employee.employeeId is null"); //NOI18N
+               } else if (event.getEmployee().getEmployeeId() < 1) {
+                       // Throw IAE
+                       throw new IllegalArgumentException(MessageFormat.format("event.employee.employeeId={0} is invalid", event.getEmployee().getEmployeeId())); //NOI18N
+               }
+
+               // Add employee to cache and list
+               this.employeeCache.put(event.getEmployee().getEmployeeId(), event.getEmployee());
+       }
+
+       /**
+        * Returns a list of all company employees
+        * <p>
+        * @return List of all company employees
+        */
+       @SuppressWarnings ("ReturnOfCollectionOrArrayField")
+       public List<Employee> allCompanyEmployees () {
+               return this.allEmployees;
+       }
+
+       /**
+        * Getter for filtered list of employees
+        * <p>
+        * @return Filtered list of employees
+        */
+       @SuppressWarnings ("ReturnOfCollectionOrArrayField")
+       public List<Employee> getFilteredEmployees () { //NOI18N
+               return this.filteredEmployees;
+       }
+
+       /**
+        * Getter for filtered list of employees
+        * <p>
+        * @param filteredEmployees Filtered list of employees
+        */
+       @SuppressWarnings ("AssignmentToCollectionOrArrayFieldFromParameter")
+       public void setFilteredEmployees (final List<Employee> filteredEmployees) { //NOI18N
+               this.filteredEmployees = filteredEmployees;
+       }
+
+       /**
+        * Initialization method
+        */
+       @PostConstruct
+       public void init () {
+               // Is cache there?
+               if (!this.employeeCache.iterator().hasNext()) {
+                       // Get whole list
+                       final List<Employee> list = this.employeeBean.allCompanyEmployees();
+
+                       // Add all
+                       for (final Iterator<Employee> iterator = list.iterator(); iterator.hasNext();) {
+                               // Get next element
+                               final Employee next = iterator.next();
+
+                               // Add it to cache
+                               this.employeeCache.put(next.getEmployeeId(), next);
+                       }
+               }
+
+               // Is cache filled and list is empty
+               if ((this.employeeCache.iterator().hasNext()) && (this.allEmployees.isEmpty())) {
+                       // Get iterator
+                       final Iterator<Cache.Entry<Long, Employee>> iterator = this.employeeCache.iterator();
+
+                       // Build up list
+                       while (iterator.hasNext()) {
+                               // GEt next element
+                               final Cache.Entry<Long, Employee> next = iterator.next();
+
+                               // Add to list
+                               this.allEmployees.add(next.getValue());
+                       }
+
+                       // Sort list
+                       this.allEmployees.sort(new Comparator<Employee>() {
+                               @Override
+                               public int compare (final Employee o1, final Employee o2) {
+                                       return o1.getEmployeeId() > o2.getEmployeeId() ? 1 : o1.getEmployeeId() < o2.getEmployeeId() ? -1 : 0;
+                               }
+                       });
+               }
+       }
+
+}
diff --git a/src/java/org/mxchange/jfinancials/beans/business/employee/FinancialsEmployeeWebRequestController.java b/src/java/org/mxchange/jfinancials/beans/business/employee/FinancialsEmployeeWebRequestController.java
new file mode 100644 (file)
index 0000000..e56f6fb
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2017 Roland Häder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jfinancials.beans.business.employee;
+
+import java.io.Serializable;
+
+/**
+ * An interface for request-scoped general company employee beans
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface FinancialsEmployeeWebRequestController extends Serializable {
+
+}
index 67272baed0424e1d58e5ff606a23adde447754ec..912cb454cb251a6be2cb378e144b69fbac014ad8 100644 (file)
@@ -537,6 +537,14 @@ public class FinancialsWebRequestHelperBean extends BaseFinancialsBean implement
                        // Then create name
                        sb.append(employee.getEmployeeNumber());
 
+                       // Is a department found?
+                       if (employee.getEmployeeDepartment() instanceof Department) {
+                               // Then add it's name to it
+                               sb.append(" ("); //NOI18N
+                               sb.append(this.renderDepartment(employee.getEmployeeDepartment()));
+                               sb.append(")"); //NOI18N
+                       }
+
                        // Is contact data found?
                        if (employee.getEmployeePersonalData() instanceof Contact) {
                                // Yes, then render it
index 7e5a8af3e4752927f4521d83630331ffd88f9618..0c1b079a8b28eec1a5232fafc6d834247c031720 100644 (file)
@@ -176,8 +176,7 @@ public class FinancialsMobileProviderWebRequestBean extends BaseFinancialsBean i
                                public int compare (final MobileProvider o1, final MobileProvider o2) {
                                        return o1.getProviderId() > o2.getProviderId() ? 1 : o1.getProviderId() < o2.getProviderId() ? -1 : 0;
                                }
-                       }
-                       );
+                       });
                }
        }
 }
index cd886fffba5e09d87fec1148eb33e81e8504249c..e0867597732177874a873f6d5f5e1f967e1e4317 100644 (file)
@@ -52,7 +52,7 @@ public class FinancialsCompanyEmployeeConverter implements Converter<Employee> {
                                final Context initial = new InitialContext();
 
                                // Lookup EJB
-                               EMPLOYEE_BEAN = (CompanyEmployeeSessionBeanRemote) initial.lookup("java:global/jfinancials-ejb/companyEmployee!org.mxchange.jcontactsbusiness.model.employee.CompanyEmployeeSessionBeanRemote"); //NOI18N
+                               EMPLOYEE_BEAN = (CompanyEmployeeSessionBeanRemote) initial.lookup("java:global/jfinancials-ejb/employee!org.mxchange.jcontactsbusiness.model.employee.CompanyEmployeeSessionBeanRemote"); //NOI18N
                        } catch (final NamingException ex) {
                                // Throw it again
                                throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup EJB", ex.getMessage()), ex); //NOI18N
index 9548747328b5dd7a081dc988611fef1ec08aa468..c27cba7a9fb82a4baa5a50c99be60a2278895f74 100644 (file)
@@ -52,7 +52,7 @@ public class FinancialsCompanyHeadquartersConverter implements Converter<Headqua
                                final Context initial = new InitialContext();
 
                                // Lookup EJB
-                               COMPANY_HEADQUARTERS_BEAN = (CompanyHeadquartersSessionBeanRemote) initial.lookup("java:global/jfinancials-ejb/companyEmployee!org.mxchange.jcontactsbusiness.model.headquarters.CompanyHeadquartersSessionBeanRemote"); //NOI18N
+                               COMPANY_HEADQUARTERS_BEAN = (CompanyHeadquartersSessionBeanRemote) initial.lookup("java:global/jfinancials-ejb/headquarters!org.mxchange.jcontactsbusiness.model.headquarters.CompanyHeadquartersSessionBeanRemote"); //NOI18N
                        } catch (final NamingException ex) {
                                // Throw it again
                                throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup EJB", ex.getMessage()), ex); //NOI18N
index e5cae05facef3dbaf4c499d6c1bd5fa205ea4019..5fe084f0f7e2fc33d1f03e35ff7b1949769f85b4 100644 (file)
@@ -1070,3 +1070,6 @@ ADMIN_ADD_OPENING_TIME_TITLE=Oeffnungszeit hinzufuegen:
 #@TODO Please fix German umlauts!
 ADMIN_ADD_OPENING_TIME_MINIMUM_DATA=Bitte geben Sie zum Hinzufuegen einer Oeffnungszeit alle Angaben an. Diese sollten nicht konfliktieren.
 BUTTON_ADMIN_ADD_OPENING_TIME=Oeffnungszeit hinzufuegen
+ADMIN_LINK_ASSIGN_DEPARTMENT_BRANCH_OFFICE_TITLE=Dieser Abteilung eine Filiale zuweisen.
+ADMIN_LINK_ASSIGN_DEPARTMENTS_LEAD_EMPLOYEE_TITLE=Dieser Abteilung einen leitenden Mitarbeiter zuweisen.
+ADMIN_LINK_ASSIGN_DEPARTMENTS_OWNER_USER_TITLE=Dieser Abteilung einen besitzenden Benutzer zuweisen.
index fd1c16c68a4d5187c20317ae03dd0efa308777c0..901101ffdd513b22844241747b8245aa605b3ea6 100644 (file)
@@ -991,3 +991,6 @@ ADMIN_ADD_OPENING_TIME_TITLE=Add new opening time:
 #BItte geben Sie zum Hinzufuegen einer Oeffnungszeit alle Angaben an. Diese sollten nicht konfliktieren.
 ADMIN_ADD_OPENING_TIME_MINIMUM_DATA=To add new opening time, you have to provide all data. They should not conflict.
 BUTTON_ADMIN_ADD_OPENING_TIME=Add opening time
+ADMIN_LINK_ASSIGN_DEPARTMENT_BRANCH_OFFICE_TITLE=Assign this department a branch office.
+ADMIN_LINK_ASSIGN_DEPARTMENTS_LEAD_EMPLOYEE_TITLE=Assign this department a leading employee.
+ADMIN_LINK_ASSIGN_DEPARTMENTS_OWNER_USER_TITLE=Assign this department an owning user.
index 2d677b60c0936fe09c340e94c28429afcd054a41..9ec478ea01e4e6defbec07eb685453721fee93c4 100644 (file)
@@ -58,7 +58,7 @@
                                        >
                                        <f:converter converterId="CompanyEmployeeConverter" />
                                        <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
-                                       <f:selectItems value="#{companyEmployeeController.allCompanyEmployees()}" var="companyHeadQuarters" itemValue="#{companyEmployee}" itemLabel="#{companyEmployee.foo}" />
+                                       <f:selectItems value="#{employeeController.allCompanyEmployees()}" var="companyHeadQuarters" itemValue="#{companyEmployee}" itemLabel="#{companyEmployee.foo}" />
                                </p:selectOneMenu>
 
                                <p:outputLabel for="companyFounder" value="#{msg.ADMIN_SELECT_BASIC_COMPANY_DATA_COMPANY_FOUNDER}" />
@@ -70,7 +70,7 @@
                                        >
                                        <f:converter converterId="CompanyEmployeeConverter" />
                                        <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
-                                       <f:selectItems value="#{companyEmployeeController.allCompanyEmployees()}" var="companyHeadQuarters" itemValue="#{companyEmployee}" itemLabel="#{companyEmployee.foo}" />
+                                       <f:selectItems value="#{employeeController.allCompanyEmployees()}" var="companyHeadQuarters" itemValue="#{companyEmployee}" itemLabel="#{companyEmployee.foo}" />
                                </p:selectOneMenu>
 
                                <p:outputLabel for="companyHeadQuarters" value="#{msg.ADMIN_SELECT_BASIC_COMPANY_DATA_COMPANY_HEADQUARTERS}" />
index 778e60a760fc930999865ea9008013d7ac0e8918..7e2c72b777ce5b0c9dc721bd0a9049335a4d8bd9 100644 (file)
@@ -35,7 +35,7 @@
                                >
                                <f:converter converterId="CompanyEmployeeConverter" />
                                <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
-                               <f:selectItems value="#{companyEmployeeController.allCompanyEmployees()}" var="companyHeadQuarters" itemValue="#{companyEmployee}" itemLabel="#{companyEmployee.foo}" />
+                               <f:selectItems value="#{employeeController.allCompanyEmployees()}" var="companyHeadQuarters" itemValue="#{companyEmployee}" itemLabel="#{companyEmployee.foo}" />
                        </p:selectOneMenu>
 
                        <p:outputLabel for="branchUserOwner" value="#{msg.ADMIN_ASSIGN_BRANCH_OFFICE_USER_OWNER}" />
index fb18bf89cba98f18bfe4e95fdf4213214934b262..838c2a91c8fd4317a634754fbf6060d3e0ce8279 100644 (file)
@@ -62,7 +62,7 @@
                                >
                                <f:converter converterId="CompanyEmployeeConverter" />
                                <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
-                               <f:selectItems value="#{companyEmployeeController.allCompanyEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
+                               <f:selectItems value="#{employeeController.allCompanyEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
                        </p:selectOneMenu>
 
                        <p:outputLabel for="departmentUserOwner" value="#{msg.ADMIN_ASSIGN_DEPARTMENT_USER_OWNER}" />
index 2ebc40238eac0cc451431b20abe1e28b59dede82..8a2bf9179437cc5a9093de9fd9282bd219cbf2f0 100644 (file)
@@ -15,7 +15,7 @@
                        <p:outputLabel for="employeeCompany" value="#{msg.ADMIN_ASSIGN_EMPLOYEE_COMPANY}" />
                        <p:selectOneMenu
                                id="employeeCompany"
-                               value="#{adminCompanyEmployeeController.employeeCompany}"
+                               value="#{adminEmployeeController.employeeCompany}"
                                filter="true"
                                filterMatchMode="contains"
                                required="true"
@@ -29,7 +29,7 @@
                        <p:outputLabel for="employeeBranchOffice" value="#{msg.ADMIN_ASSIGN_EMPLOYEE_BRANCH_OFFICE}" />
                        <p:selectOneMenu
                                id="employeeBranchOffice"
-                               value="#{adminCompanyEmployeeController.employeeBranchOffice}"
+                               value="#{adminEmployeeController.employeeBranchOffice}"
                                filter="true"
                                filterMatchMode="contains"
                                >
@@ -41,7 +41,7 @@
                        <p:outputLabel for="employeePersonalContact" value="#{msg.ADMIN_ASSIGN_EMPLOYEE_PERSONAL_DATA}" />
                        <p:selectOneMenu
                                id="employeePersonalContact"
-                               value="#{adminCompanyEmployeeController.employeePersonalContact}"
+                               value="#{adminEmployeeController.employeePersonalContact}"
                                filter="true"
                                filterMatchMode="contains"
                                >
@@ -53,7 +53,7 @@
                        <p:outputLabel for="employeeUserOwner" value="#{msg.ADMIN_ASSIGN_EMPLOYEE_USER_OWNER}" />
                        <p:selectOneMenu
                                id="employeeUserOwner"
-                               value="#{adminCompanyEmployeeController.employeeUserOwner}"
+                               value="#{adminEmployeeController.employeeUserOwner}"
                                filter="true"
                                filterMatchMode="contains"
                                >
                        </p:selectOneMenu>
 
                        <p:outputLabel for="employeeEmailAddress" value="#{msg.ADMIN_ENTER_EMPLOYEE_EMAIL_ADDRESS}" />
-                       <p:inputText styleClass="input" id="employeeEmailAddress" size="20" maxlength="255" value="#{adminCompanyEmployeeController.employeeEmailAddress}" validatorMessage="#{msg.ENTERED_EMAIL_ADDRESS_IS_INVALID}">
+                       <p:inputText styleClass="input" id="employeeEmailAddress" size="20" maxlength="255" value="#{adminEmployeeController.employeeEmailAddress}" validatorMessage="#{msg.ENTERED_EMAIL_ADDRESS_IS_INVALID}">
                                <f:validator validatorId="EmailAddressValidator" />
                                <f:attribute name="allowEmptyValue" value="true" />
                        </p:inputText>
 
                        <p:outputLabel for="employeeStaffNumber" value="#{msg.ADMIN_ENTER_EMPLOYEE_STAFF_NUMBER}" />
-                       <p:inputText styleClass="input" id="employeeStaffNumber" size="2" maxlength="10" value="#{adminCompanyEmployeeController.employeeStaffNumber}" />
+                       <p:inputText styleClass="input" id="employeeStaffNumber" size="2" maxlength="10" value="#{adminEmployeeController.employeeStaffNumber}" />
                </p:panelGrid>
        </p:fieldset>
 
        <p:fieldset legend="#{msg.ADMIN_EMPLOYEE_OTHER_LEGEND}">
                <p:panelGrid layout="grid" columns="2" columnClasses="ui-grid-col-4, ui-grid-col-8" styleClass="table table-full">
                        <p:outputLabel for="employeePhoneExtension" value="#{msg.ADMIN_ENTER_PHONE_EXTENSION}" />
-                       <p:inputText styleClass="input" id="employeePhoneExtension" size="2" maxlength="10" value="#{adminCompanyEmployeeController.employeePhoneExtension}" />
+                       <p:inputText styleClass="input" id="employeePhoneExtension" size="2" maxlength="10" value="#{adminEmployeeController.employeePhoneExtension}" />
 
                        <p:outputLabel for="employeeDepartment" value="#{msg.ADMIN_ASSIGN_EMPLOYEE_DEPARTMENT}" />
                        <p:selectOneMenu
                                id="employeeDepartment"
-                               value="#{adminCompanyEmployeeController.employeeDepartment}"
+                               value="#{adminEmployeeController.employeeDepartment}"
                                filter="true"
                                filterMatchMode="contains"
                                >
@@ -96,7 +96,7 @@
                        <p:outputLabel for="employeeHeadquarters" value="#{msg.ADMIN_ASSIGN_EMPLOYEE_HEADQUARTERS}" />
                        <p:selectOneMenu
                                id="employeeHeadquarters"
-                               value="#{adminCompanyEmployeeController.employeeHeadquarters}"
+                               value="#{adminEmployeeController.employeeHeadquarters}"
                                filter="true"
                                filterMatchMode="contains"
                                >
                        </p:selectOneMenu>
 
                        <p:outputLabel for="mobileNumber" value="#{msg.ADMIN_ENTER_EMPLOYEE_MOBILE_NUMBER}" />
-                       <widgets:inputMobileNumberPanelGrid targetController="#{adminCompanyEmployeeController}" />
+                       <widgets:inputMobileNumberPanelGrid targetController="#{adminEmployeeController}" />
                </p:panelGrid>
        </p:fieldset>
 </ui:composition>
index e3059b2c870177583ea3a2acaabd53f62db7a46b..0fb9c237adec7cfcce141c31d798de76661828e1 100644 (file)
@@ -98,7 +98,7 @@
                                                        >
                                                        <f:converter converterId="CompanyEmployeeConverter" />
                                                        <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
-                                                       <f:selectItems value="#{companyEmployeeController.allCompanyEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
+                                                       <f:selectItems value="#{employeeController.allCompanyEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
                                                        >
                                                        <f:converter converterId="CompanyEmployeeConverter" />
                                                        <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
-                                                       <f:selectItems value="#{companyEmployeeController.allCompanyEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
+                                                       <f:selectItems value="#{employeeController.allCompanyEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
index 1b0fca22400dcdc80bcde1ad33d386208ff8cd4b..26bd0c6859436127e81bfb019d9c38a7b6bad464 100644 (file)
                                                        >
                                                        <f:converter converterId="CompanyEmployeeConverter" />
                                                        <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
-                                                       <f:selectItems value="#{companyEmployeeController.allCompanyEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
+                                                       <f:selectItems value="#{employeeController.allCompanyEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
index dfe8a9671b68246bf92afd5dcaffa405ee13c660..d131c45ba5bd67112b102cdfb4cac324e5c3bdc9 100644 (file)
@@ -57,7 +57,7 @@
                                        <h:outputText value="#{department.departmentName}" />
                                </p:column>
 
-                               <p:column headerText="#{msg.ADMIN_BASIC_COMPANY_DATA_COMPANY_NAME}" sortBy="#{department.departmentCompany.companyName}" filterBy="#{department.departmentCompany}" filterMatchMode="in">
+                               <p:column headerText="#{msg.ADMIN_BASIC_COMPANY_DATA_COMPANY_NAME}" sortBy="#{department.departmentCompany}" filterBy="#{department.departmentCompany}" filterMatchMode="in">
                                        <f:facet name="filter">
                                                <p:selectCheckboxMenu
                                                        filter="true"
@@ -85,7 +85,7 @@
                                                        filter="true"
                                                        filterMatchMode="contains"
                                                        label="#{msg.LABEL_BRANCH_OFFICES}"
-                                                       onchange="PF('employeeList').filter()"
+                                                       onchange="PF('departmentList').filter()"
                                                        updateLabel="true"
                                                        title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
                                                        >
@@ -99,7 +99,7 @@
                                                <f:param name="branchId" value="#{department.departmentBranchOffice.branchId}" />
                                        </p:link>
 
-                                       <p:link outcome="admin_assign_department_branch_office" title="#{msg.ADMIN_LINK_ASSIGN_BRANCH_OFFICE_TITLE}" value="#{msg.ADMIN_LINK_ASSIGN}" rendered="#{empty department.departmentBranchOffice}">
+                                       <p:link outcome="admin_assign_department_branch_office" title="#{msg.ADMIN_LINK_ASSIGN_DEPARTMENT_BRANCH_OFFICE_TITLE}" value="#{msg.ADMIN_LINK_ASSIGN}" rendered="#{empty department.departmentBranchOffice}">
                                                <f:param name="departmentId" value="#{department.departmentId}" />
                                        </p:link>
                                </p:column>
                                                        >
                                                        <f:converter converterId="CompanyEmployeeConverter" />
                                                        <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
-                                                       <f:selectItems value="#{companyEmployeeController.allCompanyEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
+                                                       <f:selectItems value="#{employeeController.allCompanyEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
index bd6be33075f4ad09f231a4539635adabde62fe37..3ac1c7844a75859a98adf4c9393bec6d0a99c02e 100644 (file)
                        <p:dataTable
                                id="table-list-company-employees"
                                var="employee"
-                               value="#{companyEmployeeController.allCompanyEmployees()}"
+                               value="#{employeeController.allCompanyEmployees()}"
                                tableStyleClass="table table-full"
                                paginator="true"
                                paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
-                               filteredValue="#{companyEmployeeController.filteredEmployees}"
+                               filteredValue="#{employeeController.filteredEmployees}"
                                rows="10"
                                reflow="true"
                                resizableColumns="true"
                                                        styleClass="submit"
                                                        type="submit"
                                                        value="#{msg.BUTTON_ADMIN_ADD_EMPLOYEE}"
-                                                       action="#{adminCompanyEmployeeController.addCompanyEmployee()}"
+                                                       action="#{adminEmployeeController.addCompanyEmployee()}"
                                                        update=":master:form-list-company-employees:table-list-company-employees"
                                                        />
                                        </p:panelGrid>