]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Don't cherry-pick:
authorRoland Häder <roland@mxchange.org>
Fri, 29 Sep 2017 23:08:56 +0000 (01:08 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 29 Sep 2017 23:08:56 +0000 (01:08 +0200)
- added first custom project-specific JSF tag for outputting "mini-links" for
  receipts
- added almost (except optional fields) all receipt fields to administrative
  list
- added missing i18n strings

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/localization/project_de_DE.properties
src/java/org/mxchange/localization/project_en_US.properties
web/WEB-INF/project-links.jsf.taglib.xml
web/WEB-INF/resources/tags/admin/links/mini/financial/receipt/admin_receipt_links.tpl [new file with mode: 0644]
web/admin/financials/receipts/admin_receipt_list.xhtml

index 3ee7f47d0ea36855e2a760c4de6f617fafd642a2..b6d57db4ef8e8dfc277c8e7b8c794545a0a42956 100644 (file)
@@ -61,3 +61,6 @@ ENTER_FINANCIAL_RECEIPT_REGISTER_NUMBER=Kassennummer eingeben:
 ENTER_FINANCIAL_RECEIPT_BARCODE_NUMBER=Barcode-Nummer eingeben:
 ADMIN_FINANCIAL_RECEIPT_OTHER_LEGEND=Sonstige Daten des Kassenbons eingeben:
 ADMIN_FINANCIAL_RECEIPT_OTHER_LEGEND_TITLE=Geben Sie hier weitere Daten an, die Sie auf dem Kassenbon finden koennen.
+ADMIN_LINK_SHOW_RECEIPT_OWNER_USER_TITLE=Zeigt zugewiesenen Benutzer des Kassenbons an.
+#@TODO Please fix German umlauts!
+ADMIN_ASSIGNED_RECEIPT_SELLER=Zugewiesener Verkaeufer:
index 30c46e15939eab61936f65476a48da1984e54238..b262f73381df00b6d223316c1332ef4d210dd541 100644 (file)
@@ -49,3 +49,5 @@ ENTER_FINANCIAL_RECEIPT_REGISTER_NUMBER=Enter cash register number:
 ENTER_FINANCIAL_RECEIPT_BARCODE_NUMBER=Enter bar code number:
 ADMIN_FINANCIAL_RECEIPT_OTHER_LEGEND=Enter other data of receipt:
 ADMIN_FINANCIAL_RECEIPT_OTHER_LEGEND_TITLE=Enter other additional data you can find on the receipt.
+ADMIN_LINK_SHOW_RECEIPT_OWNER_USER_TITLE=Shows assigned user of receipt.
+ADMIN_ASSIGNED_RECEIPT_SELLER=Assigned seller:
index 68bbe317ffd0a512edb00b92a2d320f3758ede24..b84b0793e49d225d23da429e6cf1bdf62c53d42e 100644 (file)
@@ -20,4 +20,27 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
                                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>
+       <tag>
+               <tag-name>outputReceiptAdminMiniLinks</tag-name>
+               <description>This tag renders a full h:panelGroup for administrative "mini-links" for receipt data.</description>
+               <source>resources/tags/admin/links/mini/financial/receipt/admin_receipt_links.tpl</source>
+               <attribute>
+                       <name>receipt</name>
+                       <description>The receipt instance that provides the data for this tag.</description>
+                       <required>true</required>
+                       <type>org.mxchange.jfinancials.model.receipt.BillableReceipt</type>
+               </attribute>
+               <attribute>
+                       <name>renderShowLink</name>
+                       <description>Whether this tag is used to show mobile data (default true).</description>
+                       <required>false</required>
+                       <type>java.lang.Boolean</type>
+               </attribute>
+               <attribute>
+                       <name>rendered</name>
+                       <description>Whether this tag is being rendered by JSF engine (default: true).</description>
+                       <required>false</required>
+                       <type>java.lang.Boolean</type>
+               </attribute>
+       </tag>
 </facelet-taglib>
diff --git a/web/WEB-INF/resources/tags/admin/links/mini/financial/receipt/admin_receipt_links.tpl b/web/WEB-INF/resources/tags/admin/links/mini/financial/receipt/admin_receipt_links.tpl
new file mode 100644 (file)
index 0000000..993f6ba
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:p="http://primefaces.org/ui">
+
+       <ui:fragment rendered="#{empty rendered or rendered}">
+               <ul class="navbar-mini">
+                       <ui:fragment rendered="#{empty renderShowLink or renderShowLink}">
+                               <li class="navlink-mini">
+                                       <p:link outcome="admin_show_receipt" value="#{msg.ADMIN_LINK_SHOW_SHORT}" title="#{msg.ADMIN_LINK_SHOW_FINANCIAL_RECEIPT_TITLE}">
+                                               <f:param name="receiptId" value="#{receipt.receiptId}" />
+                                       </p:link>
+                               </li>
+                       </ui:fragment>
+
+                       <li class="navlink-mini">
+                               <p:link outcome="admin_edit_receipt" value="#{msg.ADMIN_LINK_EDIT_SHORT}" title="#{msg.ADMIN_LINK_EDIT_FINANCIAL_RECEIPT_TITLE}">
+                                       <f:param name="receiptId" value="#{receipt.receiptId}" />
+                               </p:link>
+                       </li>
+
+                       <li class="navlink-mini">
+                               <p:link outcome="admin_delete_receipt">
+                                       <h:outputText styleClass="link-danger" value="#{msg.ADMIN_LINK_DELETE_SHORT}" title="#{msg.ADMIN_LINK_DELETE_FINANCIAL_RECEIPT_TITLE}" />
+                                       <f:param name="receiptId" value="#{receipt.receiptId}" />
+                               </p:link>
+                       </li>
+               </ul>
+       </ui:fragment>
+</ui:composition>
index 5eb3796a8ba7753339f208af64d65a6a195c78fe..952a319132e8a9f6a1bb6697e140b94c6cdc485e 100644 (file)
@@ -1,6 +1,9 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"
                                xmlns="http://www.w3.org/1999/xhtml"
+                               xmlns:widgets="http://mxchange.org/jsf/core/widgets"
+                               xmlns:pl="http://mxchange.org/jsf/jfinancials/links"
+                               xmlns:links="http://mxchange.org/jsf/core/links"
                                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                                xmlns:h="http://xmlns.jcp.org/jsf/html"
                                xmlns:f="http://xmlns.jcp.org/jsf/core"
                                        <p:commandButton id="toggler" type="button" value="#{msg.SELECT_SHOWN_COLUMNS}" styleClass="column-selector" />
                                        <p:columnToggler datasource="table-list-financial-receipt" trigger="toggler" />
                                </f:facet>
+
+                               <p:column headerText="#{msg.ADMIN_ID_NUMBER}" sortBy="#{receipt.receiptId}" filterBy="#{receipt.receiptId}">
+                                       <p:link outcome="admin_show_receipt" title="#{msg.ADMIN_LINK_SHOW_RECEIPT_TITLE}" value="#{receipt.receiptId}">
+                                               <f:param name="receiptId" value="#{receipt.receiptId}" />
+                                       </p:link>
+                               </p:column>
+
+                               <p:column headerText="#{msg.ADMIN_ASSIGNED_BRANCH_OFFICE}" sortBy="#{receipt.receiptBranchOffice}" filterBy="#{receipt.receiptBranchOffice}" filterMatchMode="in">
+                                       <f:facet name="filter">
+                                               <p:selectCheckboxMenu
+                                                       filter="true"
+                                                       filterMatchMode="contains"
+                                                       label="#{msg.LABEL_BRANCH_OFFICES}"
+                                                       onchange="PF('receiptList').filter()"
+                                                       updateLabel="true"
+                                                       title="#{msg.FILTER_BY_MULTIPLE_BRANCH_OFFICES_TITLE}"
+                                                       >
+                                                       <f:converter converterId="BranchOfficeConverter" />
+                                                       <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
+                                                       <f:selectItems value="#{branchOfficeController.allBranchOffices()}" var="branchOffice" itemValue="#{branchOffice}" itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}" />
+                                               </p:selectCheckboxMenu>
+                                       </f:facet>
+
+                                       <p:link outcome="admin_show_branch_office" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}" value="#{receipt.receiptBranchOffice.branchId}">
+                                               <f:param name="branchId" value="#{receipt.receiptBranchOffice.branchId}" />
+                                       </p:link>
+                               </p:column>
+
+                               <p:column headerText="#{project.ADMIN_ASSIGNED_RECEIPT_SELLER}" sortBy="#{receipt.receiptUser.userName}" filterBy="#{receipt.receiptUser}" filterMatchMode="in">
+                                       <f:facet name="filter">
+                                               <p:selectCheckboxMenu
+                                                       filter="true"
+                                                       filterMatchMode="contains"
+                                                       label="#{msg.LABEL_RECEIPT_SELLERS}"
+                                                       onchange="PF('receiptList').filter()"
+                                                       updateLabel="true"
+                                                       title="#{project.FILTER_BY_MULTIPLE_RECEIPT_SELLERS_TITLE}"
+                                                       >
+                                                       <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)}" />
+                                               </p:selectCheckboxMenu>
+                                       </f:facet>
+
+                                       <p:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_RECEIPT_OWNER_RECEIPT_SELLER_TITLE}" value="#{receipt.receiptUser.userId}" rendered="#{not empty receipt.receiptUser}">
+                                               <f:param name="userId" value="#{receipt.receiptUser.userId}" />
+                                       </p:link>
+
+                                       <p:link outcome="admin_assign_receipt_user" title="#{msg.ADMIN_LINK_ASSIGN_RECEIPT_OWNER_RECEIPT_SELLER_TITLE}" value="#{msg.ADMIN_LINK_ASSIGN}" rendered="#{empty receipt.receiptUser}">
+                                               <f:param name="receiptId" value="#{receipt.receiptId}" />
+                                       </p:link>
+                               </p:column>
+
+                               <p:column headerText="#{msg.ADMIN_ASSIGNED_USER}" sortBy="#{receipt.receiptUser.userName}" filterBy="#{receipt.receiptUser}" filterMatchMode="in">
+                                       <f:facet name="filter">
+                                               <p:selectCheckboxMenu
+                                                       filter="true"
+                                                       filterMatchMode="contains"
+                                                       label="#{msg.LABEL_USERS}"
+                                                       onchange="PF('receiptList').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_RECEIPT_OWNER_USER_TITLE}" value="#{receipt.receiptUser.userId}" rendered="#{not empty receipt.receiptUser}">
+                                               <f:param name="userId" value="#{receipt.receiptUser.userId}" />
+                                       </p:link>
+
+                                       <p:link outcome="admin_assign_receipt_user" title="#{msg.ADMIN_LINK_ASSIGN_RECEIPT_OWNER_USER_TITLE}" value="#{msg.ADMIN_LINK_ASSIGN}" rendered="#{empty receipt.receiptUser}">
+                                               <f:param name="receiptId" value="#{receipt.receiptId}" />
+                                       </p:link>
+                               </p:column>
+
+                               <p:column headerText="#{msg.ADMIN_DATE_OF_ISSUE}" sortBy="#{receipt.receiptIssued}" filterBy="#{receipt.receiptIssued}">
+                                       <h:outputText id="receiptIssued" value="#{receipt.receiptIssued.time}">
+                                               <f:convertDateTime for="receiptIssued" type="both" timeStyle="short" dateStyle="short" />
+                                       </h:outputText>
+                               </p:column>
+
+                               <p:column headerText="#{msg.ADMIN_PAYMENT_TYPE}" sortBy="#{receipt.receiptPaymentType}" filterBy="#{receipt.receiptPaymentType}">
+                                       <f:facet name="filter">
+                                               <p:selectOneMenu
+                                                       filter="true"
+                                                       filterMatchMode="contains"
+                                                       label="#{msg.LABEL_PAYMENT_TYPES}"
+                                                       onchange="PF('receiptList').filter()"
+                                                       title="#{msg.FILTER_BY_MULTIPLE_PAYMENT_TYPES_TITLE}"
+                                                       >
+                                                       <f:converter converterId="PaymentTypeConverter" />
+                                                       <f:selectItem itemValue="#{null}" itemLabel="#{msg.PLEASE_SELECT}" noSelectionOption="true" itemDisabled="true" />
+                                                       <f:selectItems value="#{dataController.paymentTypes}" var="receiptPaymentType" itemValue="#{paymentType}" itemLabel="#{msg[paymentType.i18nKey]}" />
+                                               </p:selectOneMenu>
+                                       </f:facet>
+
+                                       <h:outputText value="#{msg[receipt.receiptPaymentType.i18nKey]}" />
+                               </p:column>
+
+                               <p:column headerText="#{msg.ADMIN_ACTION_LINKS}" sortable="false">
+                                       <pl:outputReceiptAdminMiniLinks receipt="#{receipt}" />
+                               </p:column>
                        </p:dataTable>
                </h:form>