-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8746 from hmislk/Isue#8674
Isue#8674 Closes #8674
- Loading branch information
Showing
3 changed files
with
231 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
206 changes: 206 additions & 0 deletions
206
src/main/webapp/admin/institutions/department_management_all.xhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,206 @@ | ||
<?xml version='1.0' encoding='UTF-8' ?> | ||
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<ui:composition xmlns:ui="http://xmlns.jcp.org/jsf/facelets" | ||
template="/admin/institutions/admin_institutions_index.xhtml" | ||
xmlns:h="http://xmlns.jcp.org/jsf/html" | ||
xmlns:f="http://xmlns.jcp.org/jsf/core" | ||
xmlns="http://www.w3.org/1999/xhtml" | ||
xmlns:p="http://primefaces.org/ui"> | ||
|
||
|
||
<ui:define name="admin"> | ||
|
||
<h:panelGroup > | ||
<h:form> | ||
<p:growl id="msg"/> | ||
<p:focus id="selectFocus" for="lstSelect" /> | ||
<p:focus id="detailFocus" for="gpDetail" /> | ||
|
||
<p:panel header="Manage Departments"> | ||
<div class="row"> | ||
<div class="col-md-5"> | ||
|
||
<p:commandButton | ||
id="btnAdd" | ||
value="Add New" | ||
action="#{departmentController.prepareAdd()}" | ||
class="ui-button-success" | ||
update="lstSelect gpDetail" | ||
icon="fa fa-plus" | ||
process="btnAdd"> | ||
</p:commandButton> | ||
|
||
<p:commandButton id="btnDelete" | ||
icon="fa fa-trash" | ||
onclick="if (!confirm('Are you sure you want to delete this record?')) | ||
return false;" | ||
action="#{departmentController.delete()}" | ||
value="Delete" | ||
update="lstSelect gpDetail msg" process="btnDelete" | ||
class=" m-1 ui-button-danger w-25" | ||
> | ||
</p:commandButton> | ||
|
||
<!-- <p:inputText value="#{departmentController.selectText}" id="txtSearch" style="standardText" > | ||
<f:ajax event="keyup" execute="@this" render="lstSelect" listener="#{departmentController.fillSearchItems()}" ></f:ajax> | ||
</p:inputText>--> | ||
|
||
<p:selectOneListbox id="lstSelect" | ||
value="#{departmentController.current}" | ||
style="w-100" | ||
filter="true"> | ||
<f:selectItems value="#{departmentController.selectedItems}" | ||
var="myItem" | ||
itemValue="#{myItem}" | ||
itemLabel="#{myItem.name}" ></f:selectItems> | ||
<p:ajax update="gpDetail" process="lstSelect" > | ||
</p:ajax> | ||
</p:selectOneListbox> | ||
|
||
|
||
</div> | ||
|
||
<div class="col-md-7"> | ||
<p:panel class="w-100" id="gpDetail" > | ||
<f:facet name="header" > | ||
<h:outputLabel value="Details of the Department" class="mr-5"></h:outputLabel> | ||
<p:spacer width="50" ></p:spacer> | ||
<p:commandButton | ||
id="btnSave" | ||
value="Save" | ||
action="#{departmentController.saveSelected()}" | ||
process="btnSave gpDetail" | ||
update="lstSelect msg" | ||
class="ml-5 m-1 ui-button-warning float-right" | ||
icon="fas fa-save"> | ||
</p:commandButton> | ||
|
||
</f:facet> | ||
|
||
|
||
<p:tabView class="w-100"> | ||
<p:tab title="Basic Details" class="w-100" > | ||
|
||
<h:panelGrid id="gpDetailText" columns="2" class="w-100"> | ||
<h:outputText id="lblName" value="Name" ></h:outputText> | ||
<p:inputText autocomplete="off" | ||
id="txtName" value="#{departmentController.current.name}" | ||
class="w-100"></p:inputText> | ||
<h:outputText id="lblTName" value="Code" ></h:outputText> | ||
<p:inputText autocomplete="off" | ||
id="txtTName" value="#{departmentController.current.code}" | ||
class="w-100"> | ||
</p:inputText> | ||
|
||
<h:outputText value="Income Name" /> | ||
<p:inputText autocomplete="off" | ||
class="w-100" | ||
value="#{departmentController.current.departmentCode}" /> | ||
|
||
|
||
<h:outputText value="Department Code" /> | ||
<p:inputText autocomplete="off" class="w-100" value="#{departmentController.current.departmentCode}" /> | ||
|
||
<h:outputText id="lblDept" value="Department Type"></h:outputText> | ||
<!-- <h:outputText id="lblDeptTem" value="Department Type" rendered="#{departmentController.current eq null}" ></h:outputText>--> | ||
<p:selectOneMenu class="w-100" id="cmbDept" filter="true" filterMatchMode="contains" value="#{departmentController.current.departmentType}"> | ||
<f:selectItem itemLabel="Select the Department Type" /> | ||
<f:selectItems value="#{departmentController.departmentType}"/> | ||
</p:selectOneMenu> | ||
|
||
<h:outputText id="lblIns" value="Institution" ></h:outputText> | ||
<p:autoComplete | ||
id="acIns" | ||
class="w-100" | ||
inputStyleClass="w-100" | ||
completeMethod="#{institutionController.completeIns}" | ||
var="pta" | ||
itemLabel="#{pta.name}" | ||
itemValue="#{pta}" | ||
forceSelection="true" | ||
value="#{departmentController.current.institution}" > | ||
<p:ajax process="acIns" update="cmbSupDept"/> | ||
</p:autoComplete> | ||
|
||
|
||
|
||
<h:outputText id="lblsupDept" value="Super Depatment" ></h:outputText> | ||
<h:panelGroup id="cmbSupDept"> | ||
<p:selectOneMenu | ||
rendered="#{departmentController.current.institution ne null}" | ||
class="w-100" | ||
value="#{departmentController.current.superDepartment}"> | ||
<f:selectItem itemLabel="Select the Department" /> | ||
<f:selectItems value="#{departmentController.getInstitutionDepatrments(departmentController.current.institution)}"/> | ||
</p:selectOneMenu> | ||
</h:panelGroup> | ||
|
||
<h:outputText id="lblSite" value="Site" ></h:outputText> | ||
<p:autoComplete | ||
id="acSite" | ||
class="w-100" | ||
inputStyleClass="w-100" | ||
completeMethod="#{institutionController.completeSite}" | ||
var="site" | ||
itemLabel="#{site.name}" | ||
itemValue="#{site}" | ||
forceSelection="true" | ||
value="#{departmentController.current.site}" > | ||
</p:autoComplete> | ||
|
||
|
||
</h:panelGrid> | ||
|
||
</p:tab> | ||
|
||
<p:tab title="Contact Details" > | ||
<h:panelGrid columns="2" class="w-100" > | ||
<h:outputText value="Printing Name" ></h:outputText> | ||
<p:inputText autocomplete="off" class="w-100" | ||
value="#{departmentController.current.printingName}" ></p:inputText> | ||
<h:outputText value="Address" ></h:outputText> | ||
<p:inputTextarea class="w-100" value="#{departmentController.current.address}" ></p:inputTextarea> | ||
<h:outputText value="Tel. No. 1" ></h:outputText> | ||
<p:inputText class="w-100" autocomplete="off" value="#{departmentController.current.telephone1}" ></p:inputText> | ||
<h:outputText value="Tel. No. 2" ></h:outputText> | ||
<p:inputText class="w-100" autocomplete="off" value="#{departmentController.current.telephone2}" ></p:inputText> | ||
<h:outputText value="Fax" ></h:outputText> | ||
<p:inputText class="w-100" autocomplete="off" value="#{departmentController.current.fax}" ></p:inputText> | ||
<h:outputText value="Email" ></h:outputText> | ||
<p:inputText class="w-100" autocomplete="off" value="#{departmentController.current.email}" ></p:inputText> | ||
|
||
</h:panelGrid> | ||
</p:tab> | ||
|
||
<p:tab title="Pricing Details" class="w-100"> | ||
<h:panelGrid columns="2" class="w-100"> | ||
<h:outputText value="OPD Margin Percenttage " /> | ||
<p:inputText class="w-100" autocomplete="off" value="#{departmentController.current.margin}" /> | ||
<h:outputText value="Pharmacy Margin Percentage " /> | ||
<p:inputText class="w-100" autocomplete="off" value="#{departmentController.current.pharmacyMarginFromPurchaseRate}" /> | ||
|
||
</h:panelGrid> | ||
</p:tab> | ||
<p:tab title="Editing Details" class="w-100" > | ||
<h:panelGrid columns="2" class="w-100" > | ||
<h:outputText id="lblcre" value="Creator" ></h:outputText> | ||
<p:outputLabel class="w-100" value="#{institutionController.current.creater.webUserPerson.name}"/> | ||
|
||
</h:panelGrid> | ||
</p:tab> | ||
</p:tabView> | ||
|
||
|
||
</p:panel> | ||
</div> | ||
</div> | ||
</p:panel> | ||
|
||
</h:form> | ||
|
||
</h:panelGroup> | ||
|
||
</ui:define> | ||
|
||
</ui:composition> |