From cbb81657c8d22b5bea780040848d5ccde50408bb Mon Sep 17 00:00:00 2001 From: Josef Rokos Date: Sat, 6 Feb 2016 23:43:31 +0100 Subject: [PATCH] =?UTF-8?q?P=C5=99idan=C3=A1=20agenda=20pro=20nastaven?= =?UTF-8?q?=C3=AD=20limit=C5=AF=20komis=C3=AD.=20Zm=C4=9Bn=C4=9Bn=20zp?= =?UTF-8?q?=C5=AFsob=20hl=C3=ADd=C3=A1n=C3=AD=20limit=C5=AF=20p=C5=99i=20z?= =?UTF-8?q?ad=C3=A1v=C3=A1n=C3=AD=20nov=C3=A9ho=20po=C5=BEadavku-=20limit?= =?UTF-8?q?=20se=20bere=20z=20nov=C3=A9=20agendy.=20closes=20#263=20closes?= =?UTF-8?q?=20#264?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/info/bukova/isspst/Constants.java | 3 + .../java/info/bukova/isspst/dao/LimitDao.java | 10 ++ .../bukova/isspst/dao/jpa/LimitDaoJPA.java | 11 ++ .../java/info/bukova/isspst/data/Limit.java | 50 +++++++ .../services/invoicing/InvoicingService.java | 3 + .../invoicing/InvoicingServiceImpl.java | 15 +- .../services/limits/LimitException.java | 14 ++ .../isspst/services/limits/LimitService.java | 17 +++ .../services/limits/LimitServiceImpl.java | 62 ++++++++ .../requirement/RequirementServiceImpl.java | 21 +-- .../info/bukova/isspst/ui/FormViewModel.java | 9 +- .../isspst/ui/dashboard/DashBoardVM.java | 17 ++- .../bukova/isspst/ui/limits/LimitsForm.java | 43 ++++++ .../bukova/isspst/ui/limits/LimitsList.java | 132 ++++++++++++++++++ src/main/resources/hibernate.cfg.xml | 1 + .../WEB-INF/locales/zk-label.properties | 9 ++ .../webapp/WEB-INF/spring/root-context.xml | 8 ++ src/main/webapp/admin/limits/index.zul | 14 ++ src/main/webapp/admin/limits/limitForm.zul | 46 ++++++ src/main/webapp/admin/limits/limits.zul | 53 +++++++ src/main/webapp/app/info.zul | 2 +- src/main/webapp/app/mainMenu.zul | 4 + 22 files changed, 525 insertions(+), 19 deletions(-) create mode 100644 src/main/java/info/bukova/isspst/dao/LimitDao.java create mode 100644 src/main/java/info/bukova/isspst/dao/jpa/LimitDaoJPA.java create mode 100644 src/main/java/info/bukova/isspst/data/Limit.java create mode 100644 src/main/java/info/bukova/isspst/services/limits/LimitException.java create mode 100644 src/main/java/info/bukova/isspst/services/limits/LimitService.java create mode 100644 src/main/java/info/bukova/isspst/services/limits/LimitServiceImpl.java create mode 100644 src/main/java/info/bukova/isspst/ui/limits/LimitsForm.java create mode 100644 src/main/java/info/bukova/isspst/ui/limits/LimitsList.java create mode 100644 src/main/webapp/admin/limits/index.zul create mode 100644 src/main/webapp/admin/limits/limitForm.zul create mode 100644 src/main/webapp/admin/limits/limits.zul diff --git a/src/main/java/info/bukova/isspst/Constants.java b/src/main/java/info/bukova/isspst/Constants.java index 19f6b1e8..d185e32e 100644 --- a/src/main/java/info/bukova/isspst/Constants.java +++ b/src/main/java/info/bukova/isspst/Constants.java @@ -15,6 +15,7 @@ import info.bukova.isspst.services.addressbook.AdbService; import info.bukova.isspst.services.buildings.BuildingService; import info.bukova.isspst.services.fulltext.FullTextService; import info.bukova.isspst.services.invoicing.InvoicingService; +import info.bukova.isspst.services.limits.LimitService; import info.bukova.isspst.services.munits.MUnitService; import info.bukova.isspst.services.orders.ApprovedService; import info.bukova.isspst.services.orders.OrderService; @@ -88,6 +89,7 @@ public class Constants { public final static String MOD_INVOICING = "INVOICING"; public final static String MOD_SEARCH = "SEARCH"; public final static String MOD_SIGNEDDOCS = "SIGNEDDOCS"; + public final static String MOD_LIMITS = "LIMITS"; public final static Module MODULES[] = { new Module(MOD_USERS, "Uživatelé", UserService.class), new Module(MOD_PERMISSIONS, "Práva", RoleService.class), @@ -106,6 +108,7 @@ public class Constants { new Module(MOD_INVOICING, "Fakturace požadavků", InvoicingService.class), new Module(MOD_SEARCH, "Fulltextové vyhledávání", FullTextService.class, true, false), new Module(MOD_SIGNEDDOCS, "Podepsané dokumenty", SignedDocumentService.class, true, false), + new Module(MOD_LIMITS, "Limity komisi", LimitService.class), }; public final static String PERM_APPROVE = "PERM_APPROVE"; diff --git a/src/main/java/info/bukova/isspst/dao/LimitDao.java b/src/main/java/info/bukova/isspst/dao/LimitDao.java new file mode 100644 index 00000000..d21cda2c --- /dev/null +++ b/src/main/java/info/bukova/isspst/dao/LimitDao.java @@ -0,0 +1,10 @@ +package info.bukova.isspst.dao; + +import info.bukova.isspst.data.Limit; + +/** + * @author Pepa Rokos + */ +public interface LimitDao extends BaseDao { + +} diff --git a/src/main/java/info/bukova/isspst/dao/jpa/LimitDaoJPA.java b/src/main/java/info/bukova/isspst/dao/jpa/LimitDaoJPA.java new file mode 100644 index 00000000..7a2bda54 --- /dev/null +++ b/src/main/java/info/bukova/isspst/dao/jpa/LimitDaoJPA.java @@ -0,0 +1,11 @@ +package info.bukova.isspst.dao.jpa; + +import info.bukova.isspst.dao.LimitDao; +import info.bukova.isspst.data.Limit; + +/** + * @author Pepa Rokos + */ +public class LimitDaoJPA extends BaseDaoJPA implements LimitDao { + +} diff --git a/src/main/java/info/bukova/isspst/data/Limit.java b/src/main/java/info/bukova/isspst/data/Limit.java new file mode 100644 index 00000000..7fd09ce7 --- /dev/null +++ b/src/main/java/info/bukova/isspst/data/Limit.java @@ -0,0 +1,50 @@ +package info.bukova.isspst.data; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import java.math.BigDecimal; + +/** + * @author Pepa Rokos + */ +@Entity +@Table(name = "LIMITS") +public class Limit extends BaseData implements SeasonsAware { + + @ManyToOne(fetch = FetchType.EAGER) + @JoinColumn(name = "WORKGROUP_ID") + private Workgroup workgroup; + @ManyToOne(fetch = FetchType.EAGER) + @JoinColumn(name = "SEASON_ID") + private Season season; + @Column(name = "REQ_LIMIT", precision = 15, scale = 4) + private BigDecimal limit; + + public Workgroup getWorkgroup() { + return workgroup; + } + + public void setWorkgroup(Workgroup workgroup) { + this.workgroup = workgroup; + } + + public Season getSeason() { + return season; + } + + public void setSeason(Season season) { + this.season = season; + } + + public BigDecimal getLimit() { + return limit; + } + + public void setLimit(BigDecimal limit) { + this.limit = limit; + } +} diff --git a/src/main/java/info/bukova/isspst/services/invoicing/InvoicingService.java b/src/main/java/info/bukova/isspst/services/invoicing/InvoicingService.java index 81605df9..ae564a03 100644 --- a/src/main/java/info/bukova/isspst/services/invoicing/InvoicingService.java +++ b/src/main/java/info/bukova/isspst/services/invoicing/InvoicingService.java @@ -2,6 +2,7 @@ package info.bukova.isspst.services.invoicing; import info.bukova.isspst.data.Invoicing; import info.bukova.isspst.data.Requirement; +import info.bukova.isspst.data.Season; import info.bukova.isspst.data.Workgroup; import info.bukova.isspst.services.Service; @@ -11,6 +12,8 @@ import java.util.List; public interface InvoicingService extends Service { public BigDecimal totalInvoicedForWorkgroup(Workgroup workgroup); + + public BigDecimal totalInvoicedForWorkgroupAndSeason(Workgroup workgroup, Season season); public void loadReqItems(Invoicing invoicing); diff --git a/src/main/java/info/bukova/isspst/services/invoicing/InvoicingServiceImpl.java b/src/main/java/info/bukova/isspst/services/invoicing/InvoicingServiceImpl.java index aee1dc15..b2c05149 100644 --- a/src/main/java/info/bukova/isspst/services/invoicing/InvoicingServiceImpl.java +++ b/src/main/java/info/bukova/isspst/services/invoicing/InvoicingServiceImpl.java @@ -4,11 +4,14 @@ import info.bukova.isspst.Constants; import info.bukova.isspst.data.Invoicing; import info.bukova.isspst.data.InvoicingItem; import info.bukova.isspst.data.Requirement; +import info.bukova.isspst.data.Season; import info.bukova.isspst.data.Workgroup; import info.bukova.isspst.services.AbstractOwnedService; import info.bukova.isspst.services.LazyLoader; +import info.bukova.isspst.services.settings.SeasonService; import org.hibernate.Hibernate; import org.hibernate.Query; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.transaction.annotation.Transactional; @@ -18,13 +21,23 @@ import java.util.List; public class InvoicingServiceImpl extends AbstractOwnedService implements InvoicingService { + @Autowired + private SeasonService seasonService; + @Override @Transactional public BigDecimal totalInvoicedForWorkgroup(Workgroup workgroup) { + return totalInvoicedForWorkgroupAndSeason(workgroup, seasonService.getActive()); + } + + @Override + @Transactional + public BigDecimal totalInvoicedForWorkgroupAndSeason(Workgroup workgroup, Season season) { Query q = dao.getQuery("select sum(inv.totalInvoiced) " + "from Invoicing inv join inv.requirement rq join rq.workgroup w " - + "where w = :workgroup "); + + "where w = :workgroup and rq.season = :season"); q.setParameter("workgroup", workgroup); + q.setParameter("season", season); return (BigDecimal) q.uniqueResult(); } diff --git a/src/main/java/info/bukova/isspst/services/limits/LimitException.java b/src/main/java/info/bukova/isspst/services/limits/LimitException.java new file mode 100644 index 00000000..26af6d32 --- /dev/null +++ b/src/main/java/info/bukova/isspst/services/limits/LimitException.java @@ -0,0 +1,14 @@ +package info.bukova.isspst.services.limits; + +import info.bukova.isspst.services.IsspstException; + +/** + * @author Pepa Rokos + */ +public class LimitException extends IsspstException { + + public LimitException(String reason) { + setReason(reason); + } + +} diff --git a/src/main/java/info/bukova/isspst/services/limits/LimitService.java b/src/main/java/info/bukova/isspst/services/limits/LimitService.java new file mode 100644 index 00000000..192696ec --- /dev/null +++ b/src/main/java/info/bukova/isspst/services/limits/LimitService.java @@ -0,0 +1,17 @@ +package info.bukova.isspst.services.limits; + +import info.bukova.isspst.data.Limit; +import info.bukova.isspst.data.Season; +import info.bukova.isspst.data.Workgroup; +import info.bukova.isspst.services.Service; + +import java.util.List; + +/** + * @author Pepa Rokos + */ +public interface LimitService extends Service { + List getForSeason(Season season); + Limit getForWorkgroupAndSeason(Workgroup wg, Season season); + Limit getForWorkgroup(Workgroup wg); +} diff --git a/src/main/java/info/bukova/isspst/services/limits/LimitServiceImpl.java b/src/main/java/info/bukova/isspst/services/limits/LimitServiceImpl.java new file mode 100644 index 00000000..ca703adf --- /dev/null +++ b/src/main/java/info/bukova/isspst/services/limits/LimitServiceImpl.java @@ -0,0 +1,62 @@ +package info.bukova.isspst.services.limits; + +import info.bukova.isspst.data.Limit; +import info.bukova.isspst.data.Season; +import info.bukova.isspst.data.Workgroup; +import info.bukova.isspst.services.AbstractOwnedService; +import info.bukova.isspst.services.settings.SeasonService; +import org.hibernate.Query; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + * @author Pepa Rokos + */ +public class LimitServiceImpl extends AbstractOwnedService implements LimitService { + + @Autowired + private SeasonService seasonService; + + @Override + @Transactional + public List getForSeason(Season season) { + Query q = dao.getQuery("from Limit where season = :season"); + q.setParameter("season", season); + return q.list(); + } + + @Override + @Transactional + public Limit getForWorkgroupAndSeason(Workgroup wg, Season season) { + Query q = dao.getQuery("from Limit where workgroup = :wg and season = :season"); + q.setParameter("wg", wg); + q.setParameter("season", season); + return (Limit) q.uniqueResult(); + } + + @Override + @Transactional + public Limit getForWorkgroup(Workgroup wg) { + return getForWorkgroupAndSeason(wg, seasonService.getActive()); + } + + @Override + @Transactional + @PreAuthorize("hasPermission(this, 'PERM_ADD')") + public void add(Limit entity) { + if (getForWorkgroupAndSeason(entity.getWorkgroup(),entity.getSeason()) != null) { + throw new LimitException("LimitExists"); + } + super.add(entity); + } + + @Override + protected Limit createEntity() { + Limit limit = new Limit(); + limit.setSeason(seasonService.getActive()); + return limit; + } +} diff --git a/src/main/java/info/bukova/isspst/services/requirement/RequirementServiceImpl.java b/src/main/java/info/bukova/isspst/services/requirement/RequirementServiceImpl.java index 7ebad845..98f5ba5b 100644 --- a/src/main/java/info/bukova/isspst/services/requirement/RequirementServiceImpl.java +++ b/src/main/java/info/bukova/isspst/services/requirement/RequirementServiceImpl.java @@ -2,6 +2,7 @@ package info.bukova.isspst.services.requirement; import info.bukova.isspst.Constants; import info.bukova.isspst.data.Invoicing; +import info.bukova.isspst.data.Limit; import info.bukova.isspst.data.Requirement; import info.bukova.isspst.data.RequirementItem; import info.bukova.isspst.data.RequirementState; @@ -10,6 +11,7 @@ import info.bukova.isspst.data.User; import info.bukova.isspst.data.Workflow; import info.bukova.isspst.services.LazyLoader; import info.bukova.isspst.services.invoicing.InvoicingService; +import info.bukova.isspst.services.limits.LimitService; import org.hibernate.Hibernate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; @@ -33,6 +35,8 @@ public class RequirementServiceImpl extends RequirementBaseServiceImpl extends BindingViewModel { private T dataBean; private Map errMessages; private Service service; - private boolean newRec; + protected boolean newRec; private ServiceConstraint constraint; @Init diff --git a/src/main/java/info/bukova/isspst/ui/dashboard/DashBoardVM.java b/src/main/java/info/bukova/isspst/ui/dashboard/DashBoardVM.java index 680f2232..073c2bf0 100644 --- a/src/main/java/info/bukova/isspst/ui/dashboard/DashBoardVM.java +++ b/src/main/java/info/bukova/isspst/ui/dashboard/DashBoardVM.java @@ -4,9 +4,12 @@ import info.bukova.isspst.data.Role; import info.bukova.isspst.data.User; import info.bukova.isspst.data.Workgroup; import info.bukova.isspst.services.invoicing.InvoicingService; +import info.bukova.isspst.services.limits.LimitService; import info.bukova.isspst.services.users.UserService; import info.bukova.isspst.services.workgroups.WorkgroupService; import info.bukova.isspst.ui.DocumentViewModel; +import org.zkoss.bind.annotation.Init; +import org.zkoss.zk.ui.select.annotation.WireVariable; import java.math.BigDecimal; import java.util.ArrayList; @@ -14,9 +17,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.zkoss.bind.annotation.Init; -import org.zkoss.zk.ui.select.annotation.WireVariable; - public class DashBoardVM extends DocumentViewModel { @WireVariable @@ -25,9 +25,12 @@ public class DashBoardVM extends DocumentViewModel { private UserService userService; @WireVariable private InvoicingService invoicingService; + @WireVariable + private LimitService limitService; private User user; private Map> groupRoles; private Map workgroupSpent; + private Map workgroupLimit; @Init(superclass = true) public void init() { @@ -35,6 +38,7 @@ public class DashBoardVM extends DocumentViewModel { groupRoles = new HashMap>(); workgroupSpent = new HashMap(); + workgroupLimit = new HashMap(); List wg = new ArrayList(); if (workgroupService.getUserCentres(user) != null) { @@ -48,6 +52,9 @@ public class DashBoardVM extends DocumentViewModel { List r = workgroupService.getUserWorkgroupRoles(w, user); groupRoles.put(w, r); workgroupSpent.put(w, invoicingService.totalInvoicedForWorkgroup(w)); + if (limitService.getForWorkgroup(w) != null) { + workgroupLimit.put(w, limitService.getForWorkgroup(w).getLimit()); + } } } @@ -71,4 +78,8 @@ public class DashBoardVM extends DocumentViewModel { return workgroupSpent; } + public Map getWorkgroupLimit() { + return workgroupLimit; + } + } diff --git a/src/main/java/info/bukova/isspst/ui/limits/LimitsForm.java b/src/main/java/info/bukova/isspst/ui/limits/LimitsForm.java new file mode 100644 index 00000000..3a9a3c0f --- /dev/null +++ b/src/main/java/info/bukova/isspst/ui/limits/LimitsForm.java @@ -0,0 +1,43 @@ +package info.bukova.isspst.ui.limits; + +import info.bukova.isspst.data.Limit; +import info.bukova.isspst.data.Workgroup; +import info.bukova.isspst.services.limits.LimitService; +import info.bukova.isspst.services.settings.SeasonService; +import info.bukova.isspst.services.workgroups.WorkgroupService; +import info.bukova.isspst.ui.FormViewModel; +import org.zkoss.bind.annotation.Init; +import org.zkoss.zk.ui.select.annotation.WireVariable; + +import java.util.List; + +public class LimitsForm extends FormViewModel { + + List workgroups; + @WireVariable + WorkgroupService workgroupService; + @WireVariable + LimitService limitService; + @WireVariable + SeasonService seasonService; + + @Init(superclass = true) + public void init() { + workgroups = workgroupService.getWorkgroups(); + if (getDataBean().getWorkgroup() == null) { + List limits = limitService.getForSeason(seasonService.getActive()); + + for (Limit l : limits) { + workgroups.remove(l.getWorkgroup()); + } + } + } + + public List getWorkgroups() { + return workgroups; + } + + public boolean isNewRec() { + return newRec; + } +} diff --git a/src/main/java/info/bukova/isspst/ui/limits/LimitsList.java b/src/main/java/info/bukova/isspst/ui/limits/LimitsList.java new file mode 100644 index 00000000..ec5a2eb4 --- /dev/null +++ b/src/main/java/info/bukova/isspst/ui/limits/LimitsList.java @@ -0,0 +1,132 @@ +package info.bukova.isspst.ui.limits; + +import info.bukova.isspst.StringUtils; +import info.bukova.isspst.data.Limit; +import info.bukova.isspst.data.Workgroup; +import info.bukova.isspst.services.invoicing.InvoicingService; +import info.bukova.isspst.services.limits.LimitService; +import info.bukova.isspst.services.workgroups.WorkgroupService; +import info.bukova.isspst.ui.ListViewModel; +import org.jfree.chart.ChartFactory; +import org.jfree.chart.ChartUtilities; +import org.jfree.chart.JFreeChart; +import org.jfree.chart.plot.CategoryPlot; +import org.jfree.chart.plot.PlotOrientation; +import org.jfree.chart.renderer.category.BarRenderer3D; +import org.jfree.chart.title.LegendTitle; +import org.jfree.data.category.DefaultCategoryDataset; +import org.jfree.ui.RectangleEdge; +import org.zkoss.bind.annotation.GlobalCommand; +import org.zkoss.bind.annotation.Init; +import org.zkoss.bind.annotation.NotifyChange; +import org.zkoss.zk.ui.select.annotation.WireVariable; + +import javax.imageio.ImageIO; +import java.awt.*; +import java.awt.image.RenderedImage; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; + +public class LimitsList extends ListViewModel { + + @WireVariable + private LimitService limitService; + @WireVariable + private InvoicingService invoicingService; + @WireVariable + private WorkgroupService workgroupService; + private Map spent; + private RenderedImage chart; + + @Init(superclass = true) + public void init() { + service = limitService; + dataClass = Limit.class; + formZul = "limitForm.zul"; + //dataFilter = new MUnitFilter(getFilterTemplate()); + genSpent(); + } + + public Map getSpent() { + if (spent != null && !getDataList().isEmpty()) { + for (Limit l : spent.keySet()) { + if (!l.getSeason().equals(getDataList().get(0).getSeason())) { + spent = null; + } + break; + } + } + + if (spent != null && spent.keySet().size() < getDataList().size()) { + spent = null; + } + + if (spent != null) { + return spent; + } + + spent = new HashMap(); + for (Limit l : getDataList()) { + spent.put(l, invoicingService.totalInvoicedForWorkgroupAndSeason(l.getWorkgroup(), getSelSeason())); + } + + return spent; + } + + private void genSpent() { + spent = new HashMap(); + for (Limit l : getDataList()) { + spent.put(l, invoicingService.totalInvoicedForWorkgroupAndSeason(l.getWorkgroup(), getSelSeason())); + } + } + + private void genCharts() { + DefaultCategoryDataset dataSet = new DefaultCategoryDataset(); + + for (Workgroup wg : workgroupService.getWorkgroups()) { + Limit limit = null; + for (Limit l : getDataList()) { + if (l.getWorkgroup().equals(wg)) { + limit = l; + break; + } + } + + dataSet.addValue(limit == null ? null : limit.getLimit(), StringUtils.localize("LimitsLimit"), wg.getFullName()); + dataSet.addValue(invoicingService.totalInvoicedForWorkgroupAndSeason(wg, getSelSeason()), StringUtils.localize("LimitsSpent"), wg.getFullName()); + } + + JFreeChart jfChart = ChartFactory.createBarChart3D(StringUtils.localize("LimitsChartTitle"), StringUtils.localize("LimitsWorkgroup"), + StringUtils.localize("LimitsAmount"), dataSet, PlotOrientation.HORIZONTAL, true, false, false); + CategoryPlot plot = (CategoryPlot) jfChart.getPlot(); + BarRenderer3D renderer = (BarRenderer3D) plot.getRenderer(); + renderer.setSeriesPaint(0, Color.GREEN); + renderer.setSeriesPaint(1, Color.RED); + + LegendTitle legend = jfChart.getLegend(); + legend.setPosition(RectangleEdge.RIGHT); + + try { + chart = ImageIO.read(new ByteArrayInputStream(ChartUtilities.encodeAsPNG(jfChart.createBufferedImage(1000, 400)))); + } catch (IOException e) { + chart = null; + e.printStackTrace(); + } + } + + public RenderedImage getChart() { + genCharts(); + return chart; + } + + @Override + @GlobalCommand + @NotifyChange({ "dataList", "dataBean", "ableToDelete", "chart", "spent" }) + public void refresh() { + genSpent(); + super.refresh(); + } +} diff --git a/src/main/resources/hibernate.cfg.xml b/src/main/resources/hibernate.cfg.xml index 4b8daf67..9b648846 100644 --- a/src/main/resources/hibernate.cfg.xml +++ b/src/main/resources/hibernate.cfg.xml @@ -39,5 +39,6 @@ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/locales/zk-label.properties b/src/main/webapp/WEB-INF/locales/zk-label.properties index e5d03efd..1a920bb8 100644 --- a/src/main/webapp/WEB-INF/locales/zk-label.properties +++ b/src/main/webapp/WEB-INF/locales/zk-label.properties @@ -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 + + + diff --git a/src/main/webapp/WEB-INF/spring/root-context.xml b/src/main/webapp/WEB-INF/spring/root-context.xml index 7647dbf5..8e325a1d 100644 --- a/src/main/webapp/WEB-INF/spring/root-context.xml +++ b/src/main/webapp/WEB-INF/spring/root-context.xml @@ -288,6 +288,10 @@ + + + + @@ -478,4 +482,8 @@ + + + + diff --git a/src/main/webapp/admin/limits/index.zul b/src/main/webapp/admin/limits/index.zul new file mode 100644 index 00000000..25d8c558 --- /dev/null +++ b/src/main/webapp/admin/limits/index.zul @@ -0,0 +1,14 @@ + + + + + + + String gridZul = "limits.zul"; + + + + + \ No newline at end of file diff --git a/src/main/webapp/admin/limits/limitForm.zul b/src/main/webapp/admin/limits/limitForm.zul new file mode 100644 index 00000000..703ea1d5 --- /dev/null +++ b/src/main/webapp/admin/limits/limitForm.zul @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/admin/limits/limits.zul b/src/main/webapp/admin/limits/limits.zul new file mode 100644 index 00000000..a34ea4ae --- /dev/null +++ b/src/main/webapp/admin/limits/limits.zul @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
\ No newline at end of file diff --git a/src/main/webapp/app/info.zul b/src/main/webapp/app/info.zul index 29fd3d7c..2fd336e6 100644 --- a/src/main/webapp/app/info.zul +++ b/src/main/webapp/app/info.zul @@ -103,7 +103,7 @@ - + diff --git a/src/main/webapp/app/mainMenu.zul b/src/main/webapp/app/mainMenu.zul index a825abb5..8b952c8e 100644 --- a/src/main/webapp/app/mainMenu.zul +++ b/src/main/webapp/app/mainMenu.zul @@ -130,6 +130,10 @@ label="${labels.AgendaWorkgroups}" href="/admin/workgroups" disabled="${not sec:isAllGranted('PERM_READ_WORKGROUPS')}" /> +