Rozděleny agendy požadavků na nákupy a požadavků na služební cesty.

Práva se teď nastavují pro každou agendu zvlášť.
multitenant
Josef Rokos 10 years ago
parent b5ffa6595f
commit 803bebeb88

@ -11,8 +11,9 @@ import info.bukova.isspst.services.buildings.BuildingService;
import info.bukova.isspst.services.munits.MUnitService; import info.bukova.isspst.services.munits.MUnitService;
import info.bukova.isspst.services.reqsubjects.MaterialService; import info.bukova.isspst.services.reqsubjects.MaterialService;
import info.bukova.isspst.services.reqsubjects.ServiceItemService; import info.bukova.isspst.services.reqsubjects.ServiceItemService;
import info.bukova.isspst.services.requirement.RequirementBaseService; import info.bukova.isspst.services.requirement.RequirementService;
import info.bukova.isspst.services.requirement.RequirementTypeService; import info.bukova.isspst.services.requirement.RequirementTypeService;
import info.bukova.isspst.services.requirement.TripRequirementService;
import info.bukova.isspst.services.tripbill.TripBillService; import info.bukova.isspst.services.tripbill.TripBillService;
import info.bukova.isspst.services.users.RoleService; import info.bukova.isspst.services.users.RoleService;
import info.bukova.isspst.services.users.UserService; import info.bukova.isspst.services.users.UserService;
@ -63,6 +64,7 @@ public class Constants {
public final static String MOD_SERVICES = "SERVICES"; public final static String MOD_SERVICES = "SERVICES";
public final static String MOD_WORKGROUPS = "WORKGROUPS"; public final static String MOD_WORKGROUPS = "WORKGROUPS";
public final static String MOD_REQUIREMENTS = "REQUIREMENTS"; public final static String MOD_REQUIREMENTS = "REQUIREMENTS";
public final static String MOD_TRIPREQUIREMENTS = "TRIPREQUIREMENTS";
public final static String MOD_WORKFLOW = "WORKFLOW"; public final static String MOD_WORKFLOW = "WORKFLOW";
public final static String MOD_TRIPBILL = "TRIPBILL"; public final static String MOD_TRIPBILL = "TRIPBILL";
public final static Module MODULES[] = { public final static Module MODULES[] = {
@ -74,7 +76,8 @@ public class Constants {
new Module(MOD_MATERIAL, "Materiál", MaterialService.class), new Module(MOD_MATERIAL, "Materiál", MaterialService.class),
new Module(MOD_SERVICES, "Služby", ServiceItemService.class), new Module(MOD_SERVICES, "Služby", ServiceItemService.class),
new Module(MOD_WORKGROUPS, "Pracovní skupiny", WorkgroupService.class), new Module(MOD_WORKGROUPS, "Pracovní skupiny", WorkgroupService.class),
new Module(MOD_REQUIREMENTS, "Požadavky", RequirementBaseService.class), new Module(MOD_REQUIREMENTS, "Požadavky na nákupy", RequirementService.class),
new Module(MOD_TRIPREQUIREMENTS, "Pžadavky na služební cesty", TripRequirementService.class),
new Module(MOD_WORKFLOW, "Procesy schválení", RequirementTypeService.class), new Module(MOD_WORKFLOW, "Procesy schválení", RequirementTypeService.class),
new Module(MOD_TRIPBILL, "Cestovní příkazy", TripBillService.class) new Module(MOD_TRIPBILL, "Cestovní příkazy", TripBillService.class)
}; };
@ -89,6 +92,11 @@ public class Constants {
new Permission(PERM_SHOW_CENTRE_REQ, "Zobrazení požadavků střediska", MOD_REQUIREMENTS, PermissionType.CENTRE), new Permission(PERM_SHOW_CENTRE_REQ, "Zobrazení požadavků střediska", MOD_REQUIREMENTS, PermissionType.CENTRE),
new Permission(PERM_SHOW_ALL_REQ, "Zobrazení všech požadavků", MOD_REQUIREMENTS, PermissionType.GLOBAL), new Permission(PERM_SHOW_ALL_REQ, "Zobrazení všech požadavků", MOD_REQUIREMENTS, PermissionType.GLOBAL),
new Permission(PERM_APPROVE, "Schválení", MOD_REQUIREMENTS, PermissionType.WORKGROUP), new Permission(PERM_APPROVE, "Schválení", MOD_REQUIREMENTS, PermissionType.WORKGROUP),
new Permission(PERM_SHOW_WORKGROUP_REQ, "Zobrazení požadavků komise", MOD_TRIPREQUIREMENTS, PermissionType.WORKGROUP),
new Permission(PERM_SHOW_CENTRE_REQ, "Zobrazení požadavků střediska", MOD_TRIPREQUIREMENTS, PermissionType.CENTRE),
new Permission(PERM_SHOW_ALL_REQ, "Zobrazení všech požadavků", MOD_TRIPREQUIREMENTS, PermissionType.GLOBAL),
new Permission(PERM_APPROVE, "Schválení", MOD_TRIPREQUIREMENTS, PermissionType.WORKGROUP),
}; };
public final static String DYNAMIC_REPORT_NAME = "Tabulková sestava"; public final static String DYNAMIC_REPORT_NAME = "Tabulková sestava";

@ -1,6 +1,7 @@
package info.bukova.isspst.services.requirement; package info.bukova.isspst.services.requirement;
import info.bukova.isspst.Constants; import info.bukova.isspst.Constants;
import info.bukova.isspst.data.NumberSeries;
import info.bukova.isspst.data.RequirementState; import info.bukova.isspst.data.RequirementState;
import info.bukova.isspst.data.TripBill; import info.bukova.isspst.data.TripBill;
import info.bukova.isspst.data.TripRequirement; import info.bukova.isspst.data.TripRequirement;
@ -66,4 +67,22 @@ public class TripRequirementServiceImpl extends RequirementBaseServiceImpl<TripR
} }
} }
@Override
protected String getNumberSerie() {
String currentNumber = "";
if (getNumberSeriesService() != null)
{
NumberSeries ns = getNumberSeriesService().getNumberSerie(Constants.MOD_REQUIREMENTS);
if (ns != null)
{
currentNumber = ns.getCurrentNumber();
getNumberSeriesService().increase(ns);
}
}
return currentNumber;
}
} }

@ -1,7 +1,11 @@
<?page title="${labels.RightsFormTitle}" contentType="text/html;charset=UTF-8"?> <?page title="${labels.RightsFormTitle}" contentType="text/html;charset=UTF-8"?>
<zk> <zk>
<window id="editWin" border="normal" closable="true" width="750px" apply="org.zkoss.bind.BindComposer" <window id="editWin" border="normal"
viewModel="@id('vm') @init('info.bukova.isspst.ui.users.PermissionForm')"> closable="true"
width="750px"
apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.users.PermissionForm')"
height="100%">
<caption zclass="form-caption" label="${labels.AgendaRights}" /> <caption zclass="form-caption" label="${labels.AgendaRights}" />
<label value="@load(vm.dataBean.description)" style="font-weight: bold;"/> <label value="@load(vm.dataBean.description)" style="font-weight: bold;"/>
<hbox> <hbox>
@ -26,18 +30,22 @@
</vbox> </vbox>
</popup> </popup>
<vbox children="@load(vm.modules)" width="730px"> <panel vflex="1">
<template name="children" var="module"> <panelchildren style="overflow:auto;">
<groupbox closable="false" mold="3d" width="730px"> <vbox children="@load(vm.modules)" width="705px">
<caption label="@load(module.name)"/> <template name="children" var="module">
<hbox children="@load(vm.rolePerms.permissionChecks)"> <groupbox closable="false" mold="3d" width="705px">
<template name="children" var="perm"> <caption label="@load(module.name)"/>
<checkbox label="@load(perm.permission.description)" checked="@bind(perm.checked)" visible="@load(perm.permission.module eq module.id)" disabled="@load(vm.dataBean.authority eq 'ROLE_ADMIN')" /> <hbox children="@load(vm.rolePerms.permissionChecks)">
</template> <template name="children" var="perm">
</hbox> <checkbox label="@load(perm.permission.description)" checked="@bind(perm.checked)" visible="@load(perm.permission.module eq module.id)" disabled="@load(vm.dataBean.authority eq 'ROLE_ADMIN')" />
</groupbox> </template>
</template> </hbox>
</vbox> </groupbox>
</template>
</vbox>
</panelchildren>
</panel>
<include src="/app/formButtons.zul"/> <include src="/app/formButtons.zul"/>
</window> </window>

Loading…
Cancel
Save