Přidaná agenda pro nastavení limitů komisí. Změněn způsob hlídání limitů při zadávání nového požadavku- limit se bere z nové agendy.
closes #263 closes #264
This commit is contained in:
@@ -445,3 +445,12 @@ SeasonsPrefix = Prefix
|
||||
SeasonsNewSeasonDialog = Opravdu chcete založit nové období?
|
||||
Active_season_not_set = Není nastaveno žádné aktivní období.
|
||||
|
||||
LimitsAgName = Limity komisí
|
||||
LimitsLimit = Limit
|
||||
LimitsWorkgroup = Komise
|
||||
LimitsSpent = Vyčerpáno
|
||||
LimitsChartTitle = Vyčerpané částky
|
||||
LimitsAmount = Částka
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -288,6 +288,10 @@
|
||||
<bean id="seasonDao" class="info.bukova.isspst.dao.jpa.SeasonDaoJPA">
|
||||
<property name="sessionFactory" ref="sessionFactory"/>
|
||||
</bean>
|
||||
|
||||
<bean id="limitDao" class="info.bukova.isspst.dao.jpa.LimitDaoJPA">
|
||||
<property name="sessionFactory" ref="sessionFactory"/>
|
||||
</bean>
|
||||
|
||||
<!-- Business logic -->
|
||||
<bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"/>
|
||||
@@ -478,4 +482,8 @@
|
||||
<bean id="seasonService" class="info.bukova.isspst.services.settings.SeasonServiceImpl">
|
||||
<property name="dao" ref="seasonDao"/>
|
||||
</bean>
|
||||
|
||||
<bean id="limitService" class="info.bukova.isspst.services.limits.LimitServiceImpl">
|
||||
<property name="dao" ref="limitDao"/>
|
||||
</bean>
|
||||
</beans>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?page title="${labels.LimitsAgName}" contentType="text/html;charset=UTF-8"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd">
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
|
||||
<zscript>
|
||||
String gridZul = "limits.zul";
|
||||
</zscript>
|
||||
|
||||
<include src="../../app/template.zhtml"/>
|
||||
|
||||
</zk>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?page title="${labels.TravelOrdersFormTitle}" contentType="text/html;charset=UTF-8"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd">
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<window
|
||||
id="editWin"
|
||||
closable="true"
|
||||
border="normal"
|
||||
width="600px"
|
||||
position="center"
|
||||
apply="org.zkoss.bind.BindComposer"
|
||||
viewModel="@id('vm') @init('info.bukova.isspst.ui.limits.LimitsForm')">
|
||||
<caption
|
||||
image="/img/invoicing-032.png"
|
||||
zclass="form-caption"
|
||||
label="${labels.LimitsLimit}" />
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="${labels.LimitsWorkgroup}"/>
|
||||
<combobox
|
||||
disabled="@load(not vm.newRec)"
|
||||
width="150px"
|
||||
model="@load(vm.workgroups)"
|
||||
readonly="true"
|
||||
selectedItem="@bind(vm.dataBean.workgroup)">
|
||||
<template name="model">
|
||||
<comboitem label="@load(each)" />
|
||||
</template>
|
||||
</combobox>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${labels.LimitsLimit}"/>
|
||||
<textbox value="@bind(vm.dataBean.limit) @converter(vm.standardBigDecimalConverter)"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<include src="/app/formButtons.zul"/>
|
||||
</window>
|
||||
</zk>
|
||||
@@ -0,0 +1,53 @@
|
||||
<?page title="${labels.LimitsAgName}" contentType="text/html;charset=UTF-8"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd">
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
|
||||
<window
|
||||
vflex="1"
|
||||
border="normal"
|
||||
apply="org.zkoss.bind.BindComposer"
|
||||
viewModel="@id('vm') @init('info.bukova.isspst.ui.limits.LimitsList')">
|
||||
<caption
|
||||
src="/img/invoicing-032.png"
|
||||
zclass="form-caption"
|
||||
label="${labels.LimitsAgName}" />
|
||||
|
||||
<include src="/app/toolbar.zul" />
|
||||
<listbox
|
||||
vflex="1"
|
||||
model="@load(vm.dataList)"
|
||||
selectedItem="@bind(vm.dataBean)">
|
||||
<listhead menupopup="auto">
|
||||
<listheader
|
||||
label="${labels.LimitsWorkgroup}"
|
||||
sort="czech(name)"
|
||||
width="30%" />
|
||||
<listheader
|
||||
label="${labels.LimitsLimit}"
|
||||
sort="czech(description)"
|
||||
align="right"
|
||||
width="70%" />
|
||||
<listheader
|
||||
label="${labels.LimitsSpent}"
|
||||
sort="czech(description)"
|
||||
align="right"
|
||||
width="70%" />
|
||||
</listhead>
|
||||
<template name="model">
|
||||
<listitem>
|
||||
<listcell label="@load(each.workgroup)" />
|
||||
<listcell label="@load(each.limit) @converter(vm.standardBigDecimalConverter)" />
|
||||
<listcell label="@load(vm.spent[each]) @converter(vm.standardBigDecimalConverter)"/>
|
||||
</listitem>
|
||||
</template>
|
||||
</listbox>
|
||||
<div align="center" vflex="1">
|
||||
<image height="100%" content="@load(vm.chart)"/>
|
||||
</div>
|
||||
|
||||
</window>
|
||||
|
||||
</zk>
|
||||
@@ -103,7 +103,7 @@
|
||||
</listhead>
|
||||
<listitem>
|
||||
<listcell label="${labels.Limit}" />
|
||||
<listcell label="@load(each.limit) @converter(vm.standardBigDecimalConverter)" />
|
||||
<listcell label="@load(vm.workgroupLimit[each]) @converter(vm.standardBigDecimalConverter)" />
|
||||
</listitem>
|
||||
<listitem>
|
||||
<listcell label="${labels.Spent}" />
|
||||
|
||||
@@ -130,6 +130,10 @@
|
||||
label="${labels.AgendaWorkgroups}"
|
||||
href="/admin/workgroups"
|
||||
disabled="${not sec:isAllGranted('PERM_READ_WORKGROUPS')}" />
|
||||
<menuitem
|
||||
label="${labels.LimitsAgName}"
|
||||
href="/admin/limits"
|
||||
disabled="${not sec:isAllGranted('PERM_READ_LIMITS')}" />
|
||||
</menupopup>
|
||||
</menu>
|
||||
</menupopup>
|
||||
|
||||
Reference in New Issue
Block a user