import javax.faces.view.facelets.FaceletException;
import javax.inject.Inject;
import javax.inject.Named;
-import org.mxchange.jcountry.model.data.Country;
-import org.mxchange.jcountry.model.data.CountryData;
-import org.mxchange.jcountry.model.data.CountrySingletonBeanRemote;
import org.mxchange.jcountry.events.AdminAddedCountryEvent;
import org.mxchange.jcountry.events.ObservableAdminAddedCountryEvent;
import org.mxchange.jcountry.exceptions.CountryAlreadyAddedException;
+import org.mxchange.jcountry.model.data.Country;
+import org.mxchange.jcountry.model.data.CountryData;
+import org.mxchange.jcountry.model.data.CountrySingletonBeanRemote;
import org.mxchange.jfinancials.beans.BaseFinancialsBean;
/**
import javax.enterprise.event.Observes;
import javax.inject.Inject;
import javax.inject.Named;
+import org.mxchange.jcountry.events.ObservableAdminAddedCountryEvent;
import org.mxchange.jcountry.model.data.Country;
import org.mxchange.jcountry.model.data.CountrySingletonBeanRemote;
-import org.mxchange.jcountry.events.ObservableAdminAddedCountryEvent;
import org.mxchange.jfinancials.beans.BaseFinancialsBean;
/**
import org.mxchange.jcontacts.model.contact.Contact;
import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
import org.mxchange.jcontactsbusiness.model.department.Department;
+import org.mxchange.jcontactsbusiness.model.employee.Employee;
import org.mxchange.jcontactsbusiness.model.headquarters.HeadquartersData;
import org.mxchange.jfinancials.beans.BaseFinancialsBean;
-import org.mxchange.jfinancials.beans.contact.FinancialsAdminContactWebRequestController;
-import org.mxchange.jfinancials.beans.phone.FinancialsAdminPhoneWebRequestController;
-import org.mxchange.jfinancials.beans.user.FinancialsAdminUserWebRequestController;
import org.mxchange.jfinancials.beans.user.FinancialsUserWebRequestController;
import org.mxchange.jphone.events.fax.created.CreatedFaxNumberEvent;
import org.mxchange.jphone.events.fax.created.ObservableCreatedFaxNumberEvent;
*/
private static final long serialVersionUID = 17_258_793_567_145_701L;
- /**
- * Administrative contact controller
- */
- @Inject
- private FinancialsAdminContactWebRequestController adminContactController;
-
- /**
- * Administrative phone controller
- */
- @Inject
- private FinancialsAdminPhoneWebRequestController adminPhoneController;
-
- /**
- * Administrative user controller
- */
- @Inject
- private FinancialsAdminUserWebRequestController adminUserController;
-
/**
* Contact instance
*/
}
/**
- * Returns the headquarters' address. If null is
- * provided, an empty string is returned.
+ * Returns the employee's number, personal title, family name and name if
+ * available. If null is provided, an empty string is returned.
+ * <p>
+ * @param employee Employee instance
+ * <p>
+ * @return Contact's full name
+ */
+ public String renderEmployee (final Employee employee) {
+ // Default is empty string, so let's get started
+ final StringBuilder sb = new StringBuilder(20);
+
+ // Is employee set?
+ if (employee instanceof Employee) {
+ // Then create name
+ sb.append(employee.getEmployeeNumber());
+
+ // Is contact data found?
+ if (employee.getEmployeePersonalData() instanceof Contact) {
+ // Yes, then render it
+ final String contactName = this.renderContact(employee.getEmployeePersonalData());
+
+ // Is it given?
+ if (contactName != null) {
+ // Then add it
+ sb.append(" ("); //NOI18N
+ sb.append(contactName);
+ sb.append(")"); //NOI18N
+ }
+ }
+ }
+
+ // Return it
+ return sb.toString();
+ }
+
+ /**
+ * Returns the headquarters' address. If null is provided, an empty string
+ * is returned.
* <p>
* @param headquarters Headquarters instance
* <p>
@RequestScoped
public class FinancialsAdminPhoneWebRequestBean extends BaseFinancialsBean implements FinancialsAdminPhoneWebRequestController {
- /**
- * Call-stack position
- */
- private static final short THREAD_STACK = 5;
-
/**
* Serial number
*/
public FinancialsAdminPhoneWebRequestBean () {
// Call super constructor
super();
-
- // String caller = MessageFormat.format("{0}.{1}", Thread.currentThread().getStackTrace()[3].getClassName(), Thread.currentThread().getStackTrace()[3].getMethodName());
- // System.out.println(MessageFormat.format("{0}: Constructed, caller: {1}", this.getClass().getSimpleName(), caller));
}
/**
import org.mxchange.jfinancials.beans.BaseFinancialsBean;
import org.mxchange.jfinancials.beans.contact.FinancialsContactWebRequestController;
import org.mxchange.jfinancials.beans.features.FinancialsFeaturesWebApplicationController;
-import org.mxchange.jfinancials.beans.localization.FinancialsLocalizationSessionController;
import org.mxchange.jfinancials.beans.user.login.FinancialsUserLoginWebSessionController;
import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent;
import org.mxchange.jusercore.events.user.clear.password.ObservableClearUserPasswordEvent;
*/
private Locale locale;
- /**
- * Localization controller
- */
- @Inject
- private FinancialsLocalizationSessionController localizationController;
-
/**
* Event being fired when user updated personal data
*/
import org.mxchange.jfinancials.beans.BaseFinancialsBean;
import org.mxchange.jfinancials.beans.contact.FinancialsContactWebRequestController;
import org.mxchange.jfinancials.beans.features.FinancialsFeaturesWebApplicationController;
-import org.mxchange.jfinancials.beans.user.FinancialsAdminUserWebRequestController;
import org.mxchange.jfinancials.beans.user.FinancialsUserWebRequestController;
import org.mxchange.jusercore.events.user.clear.password.ClearUserPasswordEvent;
import org.mxchange.jusercore.events.user.clear.password.ObservableClearUserPasswordEvent;
*/
private static final long serialVersionUID = 47_828_986_719_691_592L;
- /**
- * Administrative user controller
- */
- @Inject
- private FinancialsAdminUserWebRequestController adminUserController;
-
/**
* An event being fired when a user name should be cleared
*/
import org.mxchange.jcoreee.events.locale.ObservableLocaleChangeEvent;
import org.mxchange.jcoreee.utils.FacesUtils;
import org.mxchange.jfinancials.beans.BaseFinancialsBean;
-import org.mxchange.jfinancials.beans.localization.FinancialsLocalizationSessionController;
import org.mxchange.jfinancials.beans.user.FinancialsUserWebRequestController;
import org.mxchange.jusercore.exceptions.UserEmailAddressNotFoundException;
import org.mxchange.jusercore.exceptions.UserNotFoundException;
*/
private Locale locale;
- /**
- * Localization controller
- */
- @Inject
- private FinancialsLocalizationSessionController localizationController;
-
/**
* EJB for resending confirmation link
*/
ADMIN_BRANCH_OFFICE_CITY_REQUIRED=Bitte geben Sie die Stadt der Filiale ein.
ADMIN_BRANCH_OFFICE_ALREADY_CREATED=Eine Filiale existiert bereits mit den angegebenen Daten.
ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE=Zeigt Details dieser Filiale an.
-ADMIN_LINK_SHOW_BRANCH_OFFICES_OWNER_USER_TITLE=Zeigt das Benutzerprofil des Besitzers des Filialeintrages an.
+ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_USER_TITLE=Zeigt das Benutzerprofil des Besitzers des Filialeintrages an.
ADMIN_LINK_ASSIGN_BRANCH_OFFICES_OWNER_USER_TITLE=Dieser Filiale einen Benutzer als Besitzer zuweisen.
-ADMIN_LINK_SHOW_BRANCH_OFFICES_CONTACT_PERSON_TITLE=Zeit die Daten der Kontaktperson dieser Filiale an.
+ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE=Zeit die Daten der Kontaktperson dieser Filiale an.
ADMIN_LINK_ASSIGN_BRANCH_OFFICES_CONTACT_PERSON_TITLE=Einen Mitarbeiter als Kontaktperson dieser Filiale zuweisen.
NO_EMAIL_ADDRESS_ENTERED=Keine Email-Adresse eingegeben.
DATA_ADDRESS=Adresse
ADMIN_LIST_BRANCH_OFFICES_HEADER=Alle Filialen auflisten
LABEL_USERS=Benutzer
FILTER_BY_MULTIPLE_USERS_TITLE=Liste durch Auswahl von ein oder mehr Benutzern durchsuchen.
-LABEL_COMPANIES=Firmen
+LABEL_COMPANIES=Unternehmen
FILTER_BY_MULTIPLE_COMPANIES_TITLE=Liste durch Auswahl von ein oder mehr Unternehmen durchsuchen.
LABEL_COMPANY_EMPLOYEES=Mitarbeiter
FILTER_BY_MULTIPLE_COMPANY_EMPLOYEES_TITLE=Liste durch Auswahl von ein oder mehr Mitarbeiter durchsuchen.
ADMIN_ENTER_COMPANY_EMPLOYEE_MOBILE_NUMBER=Geschaefliche Mobilfunknummer des Mitarbeiters eingeben:
ADMIN_COMPANY_EMPLOYEE_GENERAL_LEGEND=Allgemeine Daten des Mitarbeiters:
ADMIN_COMPANY_EMPLOYEE_GENERAL_LEGEND_TITLE=Geben Sie hier die generellen Daten des Mitarbeiters an.
+ADMIN_ASSIGNED_BRANCH_OFFICE=Zugewiesene Filiale:
+LABEL_BRANCH_OFFICES=Filialen
+ADMIN_DATE_OF_ISSUE=Ausstellungsdatum:
+ADMIN_PAYMENT_TYPE=Zahlungsmethode:
ADMIN_BRANCH_OFFICE_CITY_REQUIRED=Please enter city for the branch office.
ADMIN_BRANCH_OFFICE_ALREADY_CREATED=A branch office with same data already exists.
ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE=Show details of this branch office.
-ADMIN_LINK_SHOW_BRANCH_OFFICES_OWNER_USER_TITLE=Show the profile of the branch office entry owning user.
+ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_USER_TITLE=Show the profile of the branch office entry owning user.
ADMIN_LINK_ASSIGN_BRANCH_OFFICES_OWNER_USER_TITLE=Assign a user as owner to this branch office.
-ADMIN_LINK_SHOW_BRANCH_OFFICES_CONTACT_PERSON_TITLE=Shows contact data of this branch office's contact person.
+ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE=Shows contact data of this branch office's contact person.
ADMIN_LINK_ASSIGN_BRANCH_OFFICES_CONTACT_PERSON_TITLE=Assign a company employee as contact person for this branch office.
NO_EMAIL_ADDRESS_ENTERED=No email address entered.
DATA_ADDRESS=Address
ADMIN_ENTER_COMPANY_EMPLOYEE_MOBILE_NUMBER=Enter business mobile number of employee:
ADMIN_COMPANY_EMPLOYEE_GENERAL_LEGEND=General data of employee:
ADMIN_COMPANY_EMPLOYEE_GENERAL_LEGEND_TITLE=You can enter here the general data of the employee.
+ADMIN_ASSIGNED_BRANCH_OFFICE=Assigned branch office:
+LABEL_BRANCH_OFFICES=Branch offices
+ADMIN_DATE_OF_ISSUE=Issue date:
+ADMIN_PAYMENT_TYPE=Payment type:
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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/>.
+-->
+<facelet-taglib version="2.2"
+ xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facelettaglibrary_2_2.xsd">
+ <namespace>http://mxchange.org/jsf/jfinancials/links</namespace>
+</facelet-taglib>
<p:submenu label="#{msg.ADMIN_MENU_BASIC_COMPANY_DATA_TITLE}" rendered="#{featureController.isFeatureEnabled('basic_company_data')}">
<p:menuitem title="#{msg.ADMIN_LINK_LIST_BASIC_COMPANY_DATA_TITLE}" outcome="admin_list_basic_company_data" value="#{msg.ADMIN_LINK_LIST_BASIC_COMPANY_DATA}" />
- <p:menuitem title="#{msg.ADMIN_LINK_LIST_BRANCH_OFFICES_TITLE}" outcome="admin_list_branch_office" value="#{msg.ADMIN_LINK_LIST_BRANCH_OFFICES}" />
+ <p:menuitem title="#{msg.ADMIN_LINK_LIST_BRANCH_OFFICE_TITLE}" outcome="admin_list_branch_office" value="#{msg.ADMIN_LINK_LIST_BRANCH_OFFICES}" />
</p:submenu>
<p:submenu label="#{msg.ADMIN_MENU_COMPANY_EMPLOYEE_TITLE}" rendered="#{featureController.isFeatureEnabled('company_employee')}">
<context-param>
<description>Generic custom JSF tags library</description>
<param-name>javax.faces.FACELETS_LIBRARIES</param-name>
- <param-value>/WEB-INF/widgets.jsf.taglib.xml;/WEB-INF/links.jsf.taglib.xml</param-value>
+ <param-value>/WEB-INF/widgets.jsf.taglib.xml;/WEB-INF/links.jsf.taglib.xml;/WEB-INF/project-links.jsf.taglib.xml</param-value>
</context-param>
<context-param>
<description>Project stage</description>
<p:column headerText="#{msg.ADMIN_ASSIGNED_USER}" sortBy="#{branchOffice.branchUserOwner.userName}" filterBy="#{branchOffice.branchUserOwner}" filterMatchMode="in">
<f:facet name="filter">
- <p:selectCheckboxMenu filter="true" filterMatchMode="contains" label="#{msg.LABEL_USERS}" onchange="PF('branchOfficeTable').filter()" updateLabel="true" title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}">
+ <p:selectCheckboxMenu
+ filter="true"
+ filterMatchMode="contains"
+ label="#{msg.LABEL_USERS}"
+ onchange="PF('branchOfficeList').filter()"
+ updateLabel="true"
+ title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
+ >
<f:converter converterId="UserConverter" />
<f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems value="#{userController.allUsers()}" var="user" itemValue="#{user}" itemLabel="#{user.userName}" />
</p:selectCheckboxMenu>
</f:facet>
- <p:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICES_OWNER_USER_TITLE}" value="#{branchOffice.branchUserOwner.userId}" rendered="#{not empty branchOffice.branchUserOwner}">
+ <p:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_USER_TITLE}" value="#{branchOffice.branchUserOwner.userId}" rendered="#{not empty branchOffice.branchUserOwner}">
<f:param name="userId" value="#{branchOffice.branchUserOwner.userId}" />
</p:link>
</p:selectCheckboxMenu>
</f:facet>
- <p:link outcome="admin_show_business_employee" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICES_CONTACT_PERSON_TITLE}" value="#{branchOffice.branchContactEmployee.employeeId}" rendered="#{not empty branchOffice.branchContactEmployee}">
+ <p:link outcome="admin_show_business_employee" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE}" value="#{branchOffice.branchContactEmployee.employeeId}" rendered="#{not empty branchOffice.branchContactEmployee}">
<f:param name="employeeId" value="#{branchOffice.branchContactEmployee.employeeId}" />
</p:link>