]> git.mxchange.org Git - jjobs-war.git/blobdiff - web/admin/branch_office/admin_branch_office_list.xhtml
Please cherry-pick:
[jjobs-war.git] / web / admin / branch_office / admin_branch_office_list.xhtml
index 013961e8cf4b97538b7384f0b3d5549be4bb9b9c..f0532eae4bc5ba38df84d1465337c06981029cf5 100644 (file)
                                        oncomplete="PF('branchOfficeDialog').show()"
                                        />
 
-                               <p:column headerText="#{msg.ID_NUMBER_HEADER}" sortBy="#{branchOffice.branchId}" filterable="false">
-                                       <p:link outcome="admin_show_branch_office" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}" value="#{branchOffice.branchId}">
+                               <p:column
+                                       headerText="#{msg.ID_HEADER}"
+                                       sortBy="#{branchOffice.branchId}"
+                                       filterable="false"
+                                       >
+                                       <p:link
+                                               outcome="admin_show_branch_office"
+                                               value="#{branchOffice.branchId}"
+                                               title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}"
+                                               >
                                                <f:param name="branchId" value="#{branchOffice.branchId}" />
                                        </p:link>
                                </p:column>
 
-                               <p:column headerText="#{msg.ADMIN_BASIC_DATA_COMPANY_NAME_HEADER}" sortBy="#{branchOffice.branchCompany}" filterBy="#{branchOffice.branchCompany}" filterMatchMode="in">
+                               <p:column
+                                       headerText="#{msg.BRANCH_OFFICE_NUMBER_HEADER}"
+                                       sortBy="#{branchOffice.branchNumber}"
+                                       filterBy="#{branchOffice.branchNumber}"
+                                       filterMatchMode="contains"
+                                       >
+                                       <h:outputText value="#{branchOffice.branchNumber}" rendered="#{not empty branchOffice.branchNumber}" />
+                                       <h:outputText value="-" rendered="#{empty branchOffice.branchNumber}" />
+                               </p:column>
+
+                               <p:column
+                                       headerText="#{msg.ADMIN_BASIC_DATA_COMPANY_NAME_HEADER}"
+                                       sortBy="#{branchOffice.branchCompany}"
+                                       filterBy="#{branchOffice.branchCompany}"
+                                       filterMatchMode="in"
+                                       >
                                        <f:facet name="filter">
                                                <p:selectCheckboxMenu
                                                        filter="true"
                                                        title="#{msg.FILTER_BY_MULTIPLE_COMPANIES_TITLE}"
                                                        >
                                                        <f:converter converterId="BasicCompanyDataConverter" />
-                                                       <f:selectItems value="#{basicDataListController.allBasicData}" var="basicData" itemValue="#{basicData}" itemLabel="#{basicData.companyName}" />
+
+                                                       <f:selectItems
+                                                               value="#{basicDataListController.allBasicData}"
+                                                               var="basicData"
+                                                               itemValue="#{basicData}"
+                                                               itemLabel="#{beanHelper.renderBasicData(basicData, true)}"
+                                                               />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
-                                       <p:link outcome="admin_show_basic_data" value="#{beanHelper.renderBasicData(branchOffice.branchCompany)}" title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}">
+                                       <p:link
+                                               outcome="admin_show_basic_data"
+                                               value="#{beanHelper.renderBasicData(branchOffice.branchCompany, true)}"
+                                               title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}"
+                                               >
                                                <f:param name="basicDataId" value="#{branchOffice.branchCompany.basicDataId}" />
                                        </p:link>
                                </p:column>
 
-                               <p:column headerText="#{msg.ADMIN_ASSIGNED_USER_HEADER}" sortBy="#{branchOffice.branchUserOwner}" filterBy="#{branchOffice.branchUserOwner}" filterMatchMode="in">
+                               <p:column
+                                       headerText="#{msg.ADMIN_USER_HEADER}"
+                                       sortBy="#{branchOffice.branchUserOwner}"
+                                       filterBy="#{branchOffice.branchUserOwner}"
+                                       filterMatchMode="in"
+                                       >
                                        <f:facet name="filter">
                                                <p:selectCheckboxMenu
                                                        filter="true"
                                                        title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
                                                        >
                                                        <f:converter converterId="UserConverter" />
-                                                       <f:selectItems value="#{userController.allUsers()}" var="user" itemValue="#{user}" itemLabel="#{user.userName}" />
+
+                                                       <f:selectItems
+                                                               value="#{userController.allUsers()}"
+                                                               var="user"
+                                                               itemValue="#{user}"
+                                                               itemLabel="#{beanHelper.renderUser(user)}"
+                                                               />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
-                                       <p:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_USER_TITLE}" value="#{beanHelper.renderUser(branchOffice.branchUserOwner)}" rendered="#{not empty branchOffice.branchUserOwner}">
+                                       <p:link
+                                               outcome="admin_show_user"
+                                               value="#{beanHelper.renderUser(branchOffice.branchUserOwner)}"
+                                               title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_USER_TITLE}"
+                                               rendered="#{not empty branchOffice.branchUserOwner}"
+                                               >
                                                <f:param name="userId" value="#{branchOffice.branchUserOwner.userId}" />
                                        </p:link>
 
-                                       <p:link outcome="admin_assign_branch_office_owner" title="#{msg.ADMIN_LINK_ASSIGN_BRANCH_OFFICES_OWNER_USER_TITLE}" value="#{msg.ADMIN_LINK_ASSIGN}" rendered="#{empty branchOffice.branchUserOwner}">
+                                       <p:link
+                                               outcome="admin_assign_branch_office_owner"
+                                               value="#{msg.ADMIN_LINK_ASSIGN}"
+                                               title="#{msg.ADMIN_LINK_ASSIGN_BRANCH_OFFICES_OWNER_USER_TITLE}"
+                                               rendered="#{empty branchOffice.branchUserOwner}"
+                                               >
                                                <f:param name="branchId" value="#{branchOffice.branchId}" />
                                        </p:link>
                                </p:column>
 
-                               <p:column headerText="#{msg.DATA_EMAIL_ADDRESS}" sortBy="#{branchOffice.branchEmailAddress}" filterBy="#{branchOffice.branchEmailAddress}" filterMatchMode="contains">
-                                       <p:link href="mailto:#{branchOffice.branchEmailAddress}" value="#{branchOffice.branchEmailAddress}" rendered="#{not empty branchOffice.branchEmailAddress}" />
+                               <p:column
+                                       headerText="#{msg.DATA_EMAIL_ADDRESS}"
+                                       sortBy="#{branchOffice.branchEmailAddress}"
+                                       filterBy="#{branchOffice.branchEmailAddress}"
+                                       filterMatchMode="contains"
+                                       >
+                                       <p:link
+                                               href="mailto:#{branchOffice.branchEmailAddress}"
+                                               value="#{branchOffice.branchEmailAddress}"
+                                               rendered="#{not empty branchOffice.branchEmailAddress}"
+                                               />
 
                                        <h:outputText value="#{msg.NO_EMAIL_ADDRESS_ENTERED}" rendered="#{empty branchOffice.branchEmailAddress}" />
                                </p:column>
 
-                               <p:column headerText="#{msg.DATA_ADDRESS}" sortBy="#{branchOffice.branchCity}" filterBy="#{branchOffice.branchCity}" filterMatchMode="contains">
+                               <p:column
+                                       headerText="#{msg.DATA_ADDRESS}"
+                                       sortBy="#{branchOffice.branchCity}"
+                                       filterBy="#{branchOffice.branchCity}"
+                                       filterMatchMode="contains"
+                                       >
                                        <h:outputText value="#{beanHelper.renderBranchOffice(branchOffice)}" title="#{beanHelper.renderBranchOffice(branchOffice)}" />
                                </p:column>
 
-                               <p:column headerText="#{msg.ADMIN_COMPANY_CONTACT_PERSON_HEADER}" sortBy="#{branchOffice.branchContactEmployee}" filterBy="#{branchOffice.branchContactEmployee}" filterMatchMode="in">
+                               <p:column
+                                       headerText="#{msg.ADMIN_COMPANY_CONTACT_PERSON_HEADER}"
+                                       sortBy="#{branchOffice.branchContactEmployee}"
+                                       filterBy="#{branchOffice.branchContactEmployee}"
+                                       filterMatchMode="in"
+                                       >
                                        <f:facet name="filter">
                                                <p:selectCheckboxMenu
                                                        filter="true"
                                                        title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
                                                        >
                                                        <f:converter converterId="EmployeeConverter" />
-                                                       <f:selectItems value="#{employeeController.allEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
+
+                                                       <f:selectItems
+                                                               value="#{employeeController.allEmployees()}"
+                                                               var="employee"
+                                                               itemValue="#{employee}"
+                                                               itemLabel="#{beanHelper.renderEmployee(employee)}"
+                                                               />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
-                                       <p:link outcome="admin_show_employee" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE}" value="#{beanHelper.renderEmployee(branchOffice.branchContactEmployee)}" rendered="#{not empty branchOffice.branchContactEmployee}">
+                                       <p:link
+                                               outcome="admin_show_employee"
+                                               value="#{beanHelper.renderEmployee(branchOffice.branchContactEmployee)}"
+                                               title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE}"
+                                               rendered="#{not empty branchOffice.branchContactEmployee}"
+                                               >
                                                <f:param name="employeeId" value="#{branchOffice.branchContactEmployee.employeeId}" />
                                        </p:link>
 
-                                       <p:link outcome="admin_assign_branch_office_employee" title="#{msg.ADMIN_LINK_ASSIGN_BRANCH_OFFICES_CONTACT_PERSON_TITLE}" value="#{msg.ADMIN_LINK_ASSIGN}" rendered="#{empty branchOffice.branchContactEmployee}">
+                                       <p:link
+                                               outcome="admin_assign_branch_office_employee"
+                                               value="#{msg.ADMIN_LINK_ASSIGN}"
+                                               title="#{msg.ADMIN_LINK_ASSIGN_BRANCH_OFFICES_CONTACT_PERSON_TITLE}"
+                                               rendered="#{empty branchOffice.branchContactEmployee}"
+                                               >
                                                <f:param name="branchId" value="#{branchOffice.branchId}" />
                                        </p:link>
                                </p:column>
 
-                               <p:column headerText="#{msg.ENTRY_CREATED_HEADER}" sortBy="#{branchOffice.branchCreated}" filterable="false">
+                               <p:column
+                                       headerText="#{msg.ENTRY_CREATED_HEADER}"
+                                       sortBy="#{branchOffice.branchCreated}"
+                                       filterable="false"
+                                       >
                                        <h:outputText id="branchCreated" value="#{branchOffice.branchCreated}">
                                                <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
                                        </h:outputText>
                                </p:column>
 
-                               <p:column headerText="#{msg.ADMIN_ACTION_LINKS_HEADER}" sortable="false" filterable="false">
-                                       <links:outputBranchOfficeAdminMiniLinks branchOffice="#{branchOffice}" />
+                               <p:column
+                                       headerText="#{msg.ADMIN_ACTION_LINKS_HEADER}"
+                                       sortable="false"
+                                       filterable="false"
+                                       >
+                                       <links:outputBranchOfficeAdminDropdownMenu branchOffice="#{branchOffice}" />
                                </p:column>
                        </p:dataTable>
 
                                widgetVar="branchOfficeDialog"
                                position="top"
                                responsive="true"
+                               closeOnEscape="true"
                                >
                                <p:outputPanel id="branchOffice-details">
                                        <p:tabView>
                                                                        </h:outputFormat>
                                                                </f:facet>
 
-                                                               <p:outputLabel value="#{msg.ID_NUMBER_HEADER}" title="#{msg.BRANCH_OFFICE_ID_NUMBER_TITLE}" />
+                                                               <p:outputLabel value="#{msg.ID_HEADER}" title="#{msg.BRANCH_OFFICE_ID_NUMBER_TITLE}" />
                                                                <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchId}" />
 
                                                                <p:outputLabel value="#{msg.BRANCH_OFFICE_NUMBER_HEADER}" title="#{msg.BRANCH_OFFICE_NUMBER_TITLE}" />
                                                                <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchNumber}" />
 
                                                                <p:outputLabel value="#{msg.ASSIGNED_BASIC_DATA_HEADER}" title="#{msg.ASSIGNED_BASIC_DATA_TO_BRANCH_OFFICE_TITLE}" />
-                                                               <p:link outcome="admin_show_basic_data" target="_blank" value="#{beanHelper.renderBasicData(branchOfficeListController.selectedBranchOffice.branchCompany)}" title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}">
+                                                               <p:link
+                                                                       outcome="admin_show_basic_data"
+                                                                       target="_blank"
+                                                                       value="#{beanHelper.renderBasicData(branchOfficeListController.selectedBranchOffice.branchCompany, false)}"
+                                                                       title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}"
+                                                                       >
                                                                        <f:param name="basicDataId" value="#{branchOfficeListController.selectedBranchOffice.branchCompany.basicDataId}" />
                                                                </p:link>
 
                                                                <p:outputLabel value="#{msg.ASSIGNED_CONTACT_PERSON_HEADER}" title="#{msg.ASSIGNED_CONTACT_PERSON_TO_BRANCH_OFFICE_TITLE}" />
-                                                               <p:link outcome="admin_show_employee" target="_blank" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE}" value="#{beanHelper.renderEmployee(branchOfficeListController.selectedBranchOffice.branchContactEmployee)}" rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchContactEmployee}">
+                                                               <p:link
+                                                                       outcome="admin_show_employee"
+                                                                       target="_blank"
+                                                                       value="#{beanHelper.renderEmployee(branchOfficeListController.selectedBranchOffice.branchContactEmployee)}"
+                                                                       title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE}"
+                                                                       rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchContactEmployee}"
+                                                                       >
                                                                        <f:param name="employeeId" value="#{branchOfficeListController.selectedBranchOffice.branchContactEmployee.employeeId}" />
                                                                </p:link>
                                                                <h:outputText value="#{msg.NO_CONTACT_EMPLOYEE_ASSIGNED_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchContactEmployee}" />
 
                                                                <p:outputLabel value="#{msg.ASSIGNED_OWNER_EMPLOYEE_HEADER}" title="#{msg.ASSIGNED_OWNER_EMPLOYEE_TO_BRANCH_OFFICE_TITLE}" />
-                                                               <p:link outcome="admin_show_employee" target="_blank" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_EMPLOYEE_TITLE}" value="#{beanHelper.renderEmployee(branchOfficeListController.selectedBranchOffice.branchOwnerEmployee)}" rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchOwnerEmployee}">
+                                                               <p:link
+                                                                       outcome="admin_show_employee"
+                                                                       target="_blank"
+                                                                       value="#{beanHelper.renderEmployee(branchOfficeListController.selectedBranchOffice.branchOwnerEmployee)}"
+                                                                       title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_EMPLOYEE_TITLE}"
+                                                                       rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchOwnerEmployee}"
+                                                                       >
                                                                        <f:param name="employeeId" value="#{branchOfficeListController.selectedBranchOffice.branchContactEmployee.employeeId}" />
                                                                </p:link>
                                                                <h:outputText value="#{msg.NO_OWNER_EMPLOYEE_ASSIGNED_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchOwnerEmployee}" />
 
                                                                <p:outputLabel value="#{msg.ASSIGNED_USER_OWNER_HEADER}" title="#{msg.ASSIGNED_USER_OWNER_TO_BRANCH_OFFICE_TITLE}" />
-                                                               <p:link outcome="admin_show_user" target="_blank" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_USER_TITLE}" value="#{beanHelper.renderUser(branchOfficeListController.selectedBranchOffice.branchUserOwner)}" rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchUserOwner}">
+                                                               <p:link
+                                                                       outcome="admin_show_user"
+                                                                       target="_blank"
+                                                                       value="#{beanHelper.renderUser(branchOfficeListController.selectedBranchOffice.branchUserOwner)}"
+                                                                       title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_USER_TITLE}"
+                                                                       rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchUserOwner}"
+                                                                       >
                                                                        <f:param name="userId" value="#{branchOfficeListController.selectedBranchOffice.branchUserOwner.userId}" />
                                                                </p:link>
                                                                <h:outputText value="#{msg.NO_USER_ASSIGNED_AS_OWNER_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchUserOwner}" />
                                                                <p:outputLabel value="#{msg.SUITE_NUMBER_HEADER}" title="#{msg.SUITE_NUMBER_OF_BRANCH_OFFICE_TITLE}" />
                                                                <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchSuiteNumber}" />
 
-                                                               <p:outputLabel value="#{msg.ZIP_CODE_HEADER}" title="#{msg.ZIP_CODE_OF_BRANCH_OFFICE_TITLE}" />
+                                                               <p:outputLabel value="#{msg.DATA_ZIP_CODE}" title="#{msg.ZIP_CODE_OF_BRANCH_OFFICE_TITLE}" />
                                                                <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchZipCode}" />
 
                                                                <p:outputLabel value="#{msg.CITY_HEADER}" title="#{msg.CITY_OF_BRANCH_OFFICE_TITLE}" />
                        </p:dialog>
                </h:form>
 
-               <h:form id="form-add-branch-office">
+               <h:form>
                        <p:panelGrid
                                columns="1"
                                layout="grid"
                                                        />
 
                                                <p:commandButton
-                                                       process="@form"
                                                        type="submit"
                                                        value="#{msg.BUTTON_ADMIN_ADD_BASIC_DATA}"
                                                        action="#{adminBranchOfficeController.addBranchOffice()}"
                        </p:fieldset>
                </h:form>
 
-               <h:form id="form-admin-add-branch-opening-time">
+               <h:form>
                        <p:panelGrid
                                columns="1"
                                layout="grid"
                                                        />
 
                                                <p:commandButton
-                                                       process="@form"
                                                        type="submit"
                                                        value="#{msg.BUTTON_ADMIN_ADD_BRANCH_OFFICE_OPENING_TIME}"
                                                        action="#{adminBranchOfficeController.addOpeningTime()}"