diff --git a/src/main/java/info/bukova/isspst/Constants.java b/src/main/java/info/bukova/isspst/Constants.java index 92e28a19..e027b130 100644 --- a/src/main/java/info/bukova/isspst/Constants.java +++ b/src/main/java/info/bukova/isspst/Constants.java @@ -105,4 +105,7 @@ public class Constants { new RequirementType(REQTYPE_ORDER, "Objednávky materiálu a služeb"), new RequirementType(REQTYPE_BUSINESSTRIP, "Služební cesty") }; + + public final static long REQ_TYPE_MATERIAL = 1; + public final static long REQ_TYPE_SERVICES = 2; } diff --git a/src/main/java/info/bukova/isspst/data/Requirement.java b/src/main/java/info/bukova/isspst/data/Requirement.java index 0363ae35..fd08c2bb 100644 --- a/src/main/java/info/bukova/isspst/data/Requirement.java +++ b/src/main/java/info/bukova/isspst/data/Requirement.java @@ -27,6 +27,9 @@ public class Requirement extends RequirementBase @Column(name = "SUMTOTAL") private BigDecimal sumTotal; + @Column(name = "KIND") + private Long kind; + public Requirement() { this.setItems(new ArrayList()); @@ -61,4 +64,14 @@ public class Requirement extends RequirementBase { this.sumTotal = sumTotal; } + + public Long getKind() + { + return kind; + } + + public void setKind(Long kind) + { + this.kind = kind; + } } diff --git a/src/main/java/info/bukova/isspst/services/requirement/ReqMaterialServiceImpl.java b/src/main/java/info/bukova/isspst/services/requirement/ReqMaterialServiceImpl.java new file mode 100644 index 00000000..d0da386d --- /dev/null +++ b/src/main/java/info/bukova/isspst/services/requirement/ReqMaterialServiceImpl.java @@ -0,0 +1,90 @@ +package info.bukova.isspst.services.requirement; + +import info.bukova.isspst.Constants; +import info.bukova.isspst.data.Requirement; +import info.bukova.isspst.data.RequirementState; +import info.bukova.isspst.data.Workgroup; + +import java.util.Date; +import java.util.List; + +import org.hibernate.Query; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PostFilter; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.transaction.annotation.Transactional; + +public class ReqMaterialServiceImpl extends RequirementBaseServiceImpl implements RequirementService, RequirementBaseService +{ + @Autowired + private RequirementTypeService reqTypeService; + + @Override + protected Requirement createEntity() + { + Requirement entity = new Requirement(); + + entity.setReqDate(new Date()); + entity.setType(reqTypeService.getTypeById(Constants.REQTYPE_ORDER)); + entity.setState(RequirementState.NEW); + entity.setKind(Constants.REQ_TYPE_MATERIAL); + + return entity; + } + + @SuppressWarnings("unchecked") + @Override + @Transactional + @PreAuthorize("hasPermission(this, 'PERM_READ')") + public List getMy() + { + Query q = dao.getQuery("from " + dao.getEntityName() + " where ownedBy = :owner and state != :state and kind = :kind"); + q.setParameter("owner", getLoggedInUser()); + q.setParameter("state", RequirementState.APPROVED); + q.setParameter("kind", Constants.REQ_TYPE_MATERIAL); + return q.list(); + } + + @SuppressWarnings("unchecked") + @Override + @Transactional + @PreAuthorize("hasPermission(this, 'PERM_SHOW_CENTRE_REQ')") + @PostFilter("hasPermission(filterObject, 'PERM_SHOW_CENTRE_REQ')") + public List getCentreReq() + { + List wgList = workgroupService.getUserCentres(getLoggedInUser()); + Query q = dao.getQuery("select tr from " + dao.getEntityName() + " tr join fetch tr.ownedBy join tr.centre c where tr.state != :state and c in (:wgList) and kind = :kind order by tr.numser"); + q.setParameterList("wgList", wgList); + q.setParameter("state", RequirementState.APPROVED); + q.setParameter("kind", Constants.REQ_TYPE_MATERIAL); + return q.list(); + } + + @SuppressWarnings("unchecked") + @Override + @Transactional + @PreAuthorize("hasPermission(this, 'PERM_SHOW_WORKGROUP_REQ')") + @PostFilter("hasPermission(filterObject, 'PERM_SHOW_WORKGROUP_REQ')") + public List getWorkgroupReq() + { + List wgList = workgroupService.getUserWorkgroups(getLoggedInUser()); + Query q = dao.getQuery("select tr from " + + dao.getEntityName() + + " tr join fetch tr.ownedBy join tr.workgroup w where tr.state != :state and w in (:wgList) and kind = :kind order by tr.numser"); + q.setParameterList("wgList", wgList); + q.setParameter("state", RequirementState.APPROVED); + q.setParameter("kind", Constants.REQ_TYPE_MATERIAL); + return q.list(); + } + + @SuppressWarnings("unchecked") + @Override + @Transactional + @PreAuthorize("hasPermission(this, 'PERM_SHOW_ALL_REQ')") + public List getAll() + { + Query q = dao.getQuery("from " + dao.getEntityName() + " as tr join fetch tr.ownedBy where kind = :kind order by tr.numser"); + q.setParameter("kind", Constants.REQ_TYPE_MATERIAL); + return q.list(); + } +} diff --git a/src/main/java/info/bukova/isspst/services/requirement/ReqServicesServiceImpl.java b/src/main/java/info/bukova/isspst/services/requirement/ReqServicesServiceImpl.java new file mode 100644 index 00000000..a3aa4d22 --- /dev/null +++ b/src/main/java/info/bukova/isspst/services/requirement/ReqServicesServiceImpl.java @@ -0,0 +1,90 @@ +package info.bukova.isspst.services.requirement; + +import info.bukova.isspst.Constants; +import info.bukova.isspst.data.Requirement; +import info.bukova.isspst.data.RequirementState; +import info.bukova.isspst.data.Workgroup; + +import java.util.Date; +import java.util.List; + +import org.hibernate.Query; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PostFilter; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.transaction.annotation.Transactional; + +public class ReqServicesServiceImpl extends RequirementBaseServiceImpl implements RequirementService, RequirementBaseService +{ + @Autowired + private RequirementTypeService reqTypeService; + + @Override + protected Requirement createEntity() + { + Requirement entity = new Requirement(); + + entity.setReqDate(new Date()); + entity.setType(reqTypeService.getTypeById(Constants.REQTYPE_ORDER)); + entity.setState(RequirementState.NEW); + entity.setKind(Constants.REQ_TYPE_SERVICES); + + return entity; + } + + @SuppressWarnings("unchecked") + @Override + @Transactional + @PreAuthorize("hasPermission(this, 'PERM_READ')") + public List getMy() + { + Query q = dao.getQuery("from " + dao.getEntityName() + " where ownedBy = :owner and state != :state and kind = :kind"); + q.setParameter("owner", getLoggedInUser()); + q.setParameter("state", RequirementState.APPROVED); + q.setParameter("kind", Constants.REQ_TYPE_SERVICES); + return q.list(); + } + + @SuppressWarnings("unchecked") + @Override + @Transactional + @PreAuthorize("hasPermission(this, 'PERM_SHOW_CENTRE_REQ')") + @PostFilter("hasPermission(filterObject, 'PERM_SHOW_CENTRE_REQ')") + public List getCentreReq() + { + List wgList = workgroupService.getUserCentres(getLoggedInUser()); + Query q = dao.getQuery("select tr from " + dao.getEntityName() + " tr join fetch tr.ownedBy join tr.centre c where tr.state != :state and c in (:wgList) and kind = :kind order by tr.numser"); + q.setParameterList("wgList", wgList); + q.setParameter("state", RequirementState.APPROVED); + q.setParameter("kind", Constants.REQ_TYPE_SERVICES); + return q.list(); + } + + @SuppressWarnings("unchecked") + @Override + @Transactional + @PreAuthorize("hasPermission(this, 'PERM_SHOW_WORKGROUP_REQ')") + @PostFilter("hasPermission(filterObject, 'PERM_SHOW_WORKGROUP_REQ')") + public List getWorkgroupReq() + { + List wgList = workgroupService.getUserWorkgroups(getLoggedInUser()); + Query q = dao.getQuery("select tr from " + + dao.getEntityName() + + " tr join fetch tr.ownedBy join tr.workgroup w where tr.state != :state and w in (:wgList) and kind = :kind order by tr.numser"); + q.setParameterList("wgList", wgList); + q.setParameter("state", RequirementState.APPROVED); + q.setParameter("kind", Constants.REQ_TYPE_SERVICES); + return q.list(); + } + + @SuppressWarnings("unchecked") + @Override + @Transactional + @PreAuthorize("hasPermission(this, 'PERM_SHOW_ALL_REQ')") + public List getAll() + { + Query q = dao.getQuery("from " + dao.getEntityName() + " as tr join fetch tr.ownedBy where kind = :kind order by tr.numser"); + q.setParameter("kind", Constants.REQ_TYPE_SERVICES); + return q.list(); + } +} diff --git a/src/main/java/info/bukova/isspst/services/requirement/RequirementBaseServiceImpl.java b/src/main/java/info/bukova/isspst/services/requirement/RequirementBaseServiceImpl.java index aeaf4dc9..0a854c2b 100644 --- a/src/main/java/info/bukova/isspst/services/requirement/RequirementBaseServiceImpl.java +++ b/src/main/java/info/bukova/isspst/services/requirement/RequirementBaseServiceImpl.java @@ -41,7 +41,7 @@ public abstract class RequirementBaseServiceImpl exte @Autowired private UserService userService; @Autowired - private WorkgroupService workgroupService; + protected WorkgroupService workgroupService; @Override @Transactional diff --git a/src/main/java/info/bukova/isspst/ui/main/orders/material/ReqMaterialForm.java b/src/main/java/info/bukova/isspst/ui/main/orders/material/ReqMaterialForm.java new file mode 100644 index 00000000..b6c0fcf1 --- /dev/null +++ b/src/main/java/info/bukova/isspst/ui/main/orders/material/ReqMaterialForm.java @@ -0,0 +1,27 @@ +package info.bukova.isspst.ui.main.orders.material; + +import info.bukova.isspst.ui.main.orders.requirements.RequirementForm; + +import org.zkoss.bind.annotation.Command; +import org.zkoss.bind.annotation.Init; +import org.zkoss.zk.ui.Executions; +import org.zkoss.zul.Window; + +public class ReqMaterialForm extends RequirementForm +{ + // private final static Logger log = + // LoggerFactory.getLogger(ReqServicesForm.class.getName()); + + @Init(superclass = true) + public void init() + { + super.init(); + } + + @Command + public void addSelectedItem() + { + Window window = (Window) Executions.createComponents("/main/orders/material/selectMaterial.zul", null, null); + window.doModal(); + } +} diff --git a/src/main/java/info/bukova/isspst/ui/main/orders/material/ReqMaterialListMy.java b/src/main/java/info/bukova/isspst/ui/main/orders/material/ReqMaterialListMy.java new file mode 100644 index 00000000..5219f39a --- /dev/null +++ b/src/main/java/info/bukova/isspst/ui/main/orders/material/ReqMaterialListMy.java @@ -0,0 +1,41 @@ +package info.bukova.isspst.ui.main.orders.material; + +import info.bukova.isspst.data.Requirement; +import info.bukova.isspst.services.requirement.RequirementService; +import info.bukova.isspst.ui.main.orders.requirements.ReqListMy; + +import java.util.ArrayList; +import java.util.List; + +import org.springframework.security.access.AccessDeniedException; +import org.zkoss.bind.BindUtils; +import org.zkoss.bind.annotation.Init; +import org.zkoss.zk.ui.select.annotation.WireVariable; + +public class ReqMaterialListMy extends ReqListMy +{ + @WireVariable + protected RequirementService reqMaterialService; + + @Init + public void init() + { + super.init(); + service = reqMaterialService; + formZul = "/main/orders/material/reqHeadForm.zul"; + } + + @Override + protected List getListFromService() + { + try + { + return reqMaterialService.getMy(); + } + catch (AccessDeniedException e) + { + BindUtils.postGlobalCommand(null, null, "disableAll", null); + return new ArrayList(); + } + } +} diff --git a/src/main/java/info/bukova/isspst/ui/main/orders/material/ReqMaterialListMyAll.java b/src/main/java/info/bukova/isspst/ui/main/orders/material/ReqMaterialListMyAll.java new file mode 100644 index 00000000..cee34e38 --- /dev/null +++ b/src/main/java/info/bukova/isspst/ui/main/orders/material/ReqMaterialListMyAll.java @@ -0,0 +1,41 @@ +package info.bukova.isspst.ui.main.orders.material; + +import info.bukova.isspst.data.Requirement; +import info.bukova.isspst.services.requirement.RequirementService; +import info.bukova.isspst.ui.main.orders.requirements.ReqListMyAll; + +import java.util.ArrayList; +import java.util.List; + +import org.springframework.security.access.AccessDeniedException; +import org.zkoss.bind.BindUtils; +import org.zkoss.bind.annotation.Init; +import org.zkoss.zk.ui.select.annotation.WireVariable; + +public class ReqMaterialListMyAll extends ReqListMyAll +{ + @WireVariable + protected RequirementService reqMaterialService; + + @Init + public void init() + { + super.init(); + service = reqMaterialService; + formZul = "/main/orders/material/reqHeadForm.zul"; + } + + @Override + protected List getListFromService() + { + try + { + return reqMaterialService.getAll(); + } + catch (AccessDeniedException e) + { + BindUtils.postGlobalCommand(null, null, "disableAll", null); + return new ArrayList(); + } + } +} diff --git a/src/main/java/info/bukova/isspst/ui/main/orders/material/ReqMaterialListMyCenters.java b/src/main/java/info/bukova/isspst/ui/main/orders/material/ReqMaterialListMyCenters.java new file mode 100644 index 00000000..158683e5 --- /dev/null +++ b/src/main/java/info/bukova/isspst/ui/main/orders/material/ReqMaterialListMyCenters.java @@ -0,0 +1,41 @@ +package info.bukova.isspst.ui.main.orders.material; + +import info.bukova.isspst.data.Requirement; +import info.bukova.isspst.services.requirement.RequirementService; +import info.bukova.isspst.ui.main.orders.requirements.ReqListMyCenters; + +import java.util.ArrayList; +import java.util.List; + +import org.springframework.security.access.AccessDeniedException; +import org.zkoss.bind.BindUtils; +import org.zkoss.bind.annotation.Init; +import org.zkoss.zk.ui.select.annotation.WireVariable; + +public class ReqMaterialListMyCenters extends ReqListMyCenters +{ + @WireVariable + protected RequirementService reqMaterialService; + + @Init + public void init() + { + super.init(); + service = reqMaterialService; + formZul = "/main/orders/material/reqHeadForm.zul"; + } + + @Override + protected List getListFromService() + { + try + { + return reqMaterialService.getCentreReq(); + } + catch (AccessDeniedException e) + { + BindUtils.postGlobalCommand(null, null, "disableCentre", null); + return new ArrayList(); + } + } +} diff --git a/src/main/java/info/bukova/isspst/ui/main/orders/material/ReqMaterialListMyWorkgroups.java b/src/main/java/info/bukova/isspst/ui/main/orders/material/ReqMaterialListMyWorkgroups.java new file mode 100644 index 00000000..80bf4772 --- /dev/null +++ b/src/main/java/info/bukova/isspst/ui/main/orders/material/ReqMaterialListMyWorkgroups.java @@ -0,0 +1,41 @@ +package info.bukova.isspst.ui.main.orders.material; + +import info.bukova.isspst.data.Requirement; +import info.bukova.isspst.services.requirement.RequirementService; +import info.bukova.isspst.ui.main.orders.requirements.ReqListMyWorkgroups; + +import java.util.ArrayList; +import java.util.List; + +import org.springframework.security.access.AccessDeniedException; +import org.zkoss.bind.BindUtils; +import org.zkoss.bind.annotation.Init; +import org.zkoss.zk.ui.select.annotation.WireVariable; + +public class ReqMaterialListMyWorkgroups extends ReqListMyWorkgroups +{ + @WireVariable + protected RequirementService reqMaterialService; + + @Init + public void init() + { + super.init(); + service = reqMaterialService; + formZul = "/main/orders/material/reqHeadForm.zul"; + } + + @Override + protected List getListFromService() + { + try + { + return reqMaterialService.getWorkgroupReq(); + } + catch (AccessDeniedException e) + { + BindUtils.postGlobalCommand(null, null, "disableWorkgroup", null); + return new ArrayList(); + } + } +} diff --git a/src/main/java/info/bukova/isspst/ui/main/orders/material/SelectMaterialItems.java b/src/main/java/info/bukova/isspst/ui/main/orders/material/SelectMaterialItems.java new file mode 100644 index 00000000..ad618865 --- /dev/null +++ b/src/main/java/info/bukova/isspst/ui/main/orders/material/SelectMaterialItems.java @@ -0,0 +1,121 @@ +package info.bukova.isspst.ui.main.orders.material; + +import info.bukova.isspst.data.Material; +import info.bukova.isspst.filters.MaterialFilter; +import info.bukova.isspst.services.reqsubjects.MaterialService; +import info.bukova.isspst.ui.main.orders.requirements.SelectItems; + +import java.util.List; + +import org.zkoss.bind.annotation.Command; +import org.zkoss.bind.annotation.Init; +import org.zkoss.bind.annotation.NotifyChange; +import org.zkoss.zk.ui.select.annotation.WireVariable; + +public class SelectMaterialItems extends SelectItems +{ + @WireVariable + private MaterialService materialService; + + private List materialList; + + private List fullMaterialList; + + + private boolean activeFilterMaterial; + + private Material filterTmpMaterial; + + private MaterialFilter dataFilterMaterial; + + + @Init + public void init() + { + super.init(); + + this.setFullMaterialList(materialService.getAll()); + this.setMaterialList(this.getFullMaterialList()); + + this.setActiveFilterMaterial(false); + this.setFilterTmpMaterial(new Material()); + this.setDataFilterMaterial(new MaterialFilter(this.getFilterTmpMaterial())); + } + + public List getMaterialList() + { + return materialList; + } + + public void setMaterialList(List materialList) + { + this.materialList = materialList; + } + + public List getFullMaterialList() + { + return fullMaterialList; + } + + public void setFullMaterialList(List fullMaterialList) + { + this.fullMaterialList = fullMaterialList; + } + + public boolean isActiveFilterMaterial() + { + return activeFilterMaterial; + } + + public void setActiveFilterMaterial(boolean activeFilterMaterial) + { + this.activeFilterMaterial = activeFilterMaterial; + } + + public Material getFilterTmpMaterial() + { + return this.filterTmpMaterial; + } + + private void setFilterTmpMaterial(Material material) + { + this.filterTmpMaterial = material; + } + + public MaterialFilter getDataFilterMaterial() + { + return dataFilterMaterial; + } + + public void setDataFilterMaterial(MaterialFilter dataFilterMaterial) + { + this.dataFilterMaterial = dataFilterMaterial; + } + + @Command + @NotifyChange({ "activeFilterMaterial", "materialList", "selectedItem" }) + public void onFilterMaterial() + { + this.setSelectedItem(null); + + this.setActiveFilterMaterial(!this.isActiveFilterMaterial()); + + if (this.isActiveFilterMaterial()) + { + this.doFilterMaterial(); + } + else + { + this.setMaterialList(this.getFullMaterialList()); + } + } + + @Command + @NotifyChange("materialList") + public void doFilterMaterial() + { + this.setSelectedItem(null); + List result = this.materialService.filterList(this.getFullMaterialList(), this.getDataFilterMaterial()); + this.setMaterialList(result); + } +} diff --git a/src/main/java/info/bukova/isspst/ui/main/orders/requirements/ReqListMy.java b/src/main/java/info/bukova/isspst/ui/main/orders/requirements/ReqListMy.java index 5183a44b..bc13232f 100644 --- a/src/main/java/info/bukova/isspst/ui/main/orders/requirements/ReqListMy.java +++ b/src/main/java/info/bukova/isspst/ui/main/orders/requirements/ReqListMy.java @@ -18,15 +18,14 @@ import org.zkoss.zk.ui.select.annotation.WireVariable; public class ReqListMy extends RequirementSubpage { - @WireVariable - private RequirementService requirementService; + protected RequirementService requirementService; @WireVariable - private UserService userService; + protected UserService userService; @WireVariable - private WorkgroupService workgroupService; + protected WorkgroupService workgroupService; public List getCentres() { diff --git a/src/main/java/info/bukova/isspst/ui/main/orders/requirements/ReqListMyAll.java b/src/main/java/info/bukova/isspst/ui/main/orders/requirements/ReqListMyAll.java index 07d799a2..9448cb95 100644 --- a/src/main/java/info/bukova/isspst/ui/main/orders/requirements/ReqListMyAll.java +++ b/src/main/java/info/bukova/isspst/ui/main/orders/requirements/ReqListMyAll.java @@ -20,15 +20,14 @@ import org.zkoss.zk.ui.select.annotation.WireVariable; public class ReqListMyAll extends RequirementSubpage { - @WireVariable - private RequirementService requirementService; + protected RequirementService requirementService; @WireVariable - private UserService userService; + protected UserService userService; @WireVariable - private WorkgroupService workgroupService; + protected WorkgroupService workgroupService; public List getCentres() { @@ -58,10 +57,11 @@ public class ReqListMyAll extends RequirementSubpage return new ArrayList(); } } - + @GlobalCommand @NotifyChange({ "dataList", "dataBean", "fullFill" }) - public void reloadRelated() { + public void reloadRelated() + { this.reload(); } } diff --git a/src/main/java/info/bukova/isspst/ui/main/orders/requirements/ReqListMyCenters.java b/src/main/java/info/bukova/isspst/ui/main/orders/requirements/ReqListMyCenters.java index 9a1d9714..0ca89e74 100644 --- a/src/main/java/info/bukova/isspst/ui/main/orders/requirements/ReqListMyCenters.java +++ b/src/main/java/info/bukova/isspst/ui/main/orders/requirements/ReqListMyCenters.java @@ -20,15 +20,14 @@ import org.zkoss.zk.ui.select.annotation.WireVariable; public class ReqListMyCenters extends RequirementSubpage { - @WireVariable - private RequirementService requirementService; + protected RequirementService requirementService; @WireVariable - private UserService userService; + protected UserService userService; @WireVariable - private WorkgroupService workgroupService; + protected WorkgroupService workgroupService; public List getCentres() { @@ -58,10 +57,11 @@ public class ReqListMyCenters extends RequirementSubpage return new ArrayList(); } } - + @GlobalCommand @NotifyChange({ "dataList", "dataBean", "fullFill" }) - public void reloadRelated() { + public void reloadRelated() + { this.reload(); } } diff --git a/src/main/java/info/bukova/isspst/ui/main/orders/requirements/ReqListMyWorkgroups.java b/src/main/java/info/bukova/isspst/ui/main/orders/requirements/ReqListMyWorkgroups.java index 59deff73..52ebb05d 100644 --- a/src/main/java/info/bukova/isspst/ui/main/orders/requirements/ReqListMyWorkgroups.java +++ b/src/main/java/info/bukova/isspst/ui/main/orders/requirements/ReqListMyWorkgroups.java @@ -20,15 +20,14 @@ import org.zkoss.zk.ui.select.annotation.WireVariable; public class ReqListMyWorkgroups extends RequirementSubpage { - @WireVariable - private RequirementService requirementService; + protected RequirementService requirementService; @WireVariable - private UserService userService; + protected UserService userService; @WireVariable - private WorkgroupService workgroupService; + protected WorkgroupService workgroupService; public List getCentres() { @@ -58,10 +57,11 @@ public class ReqListMyWorkgroups extends RequirementSubpage return new ArrayList(); } } - + @GlobalCommand @NotifyChange({ "dataList", "dataBean", "fullFill" }) - public void reloadRelated() { + public void reloadRelated() + { this.reload(); } } diff --git a/src/main/java/info/bukova/isspst/ui/requirement/RequirementForm.java b/src/main/java/info/bukova/isspst/ui/main/orders/requirements/RequirementForm.java similarity index 92% rename from src/main/java/info/bukova/isspst/ui/requirement/RequirementForm.java rename to src/main/java/info/bukova/isspst/ui/main/orders/requirements/RequirementForm.java index 403a527c..7b353114 100644 --- a/src/main/java/info/bukova/isspst/ui/requirement/RequirementForm.java +++ b/src/main/java/info/bukova/isspst/ui/main/orders/requirements/RequirementForm.java @@ -1,11 +1,10 @@ -package info.bukova.isspst.ui.requirement; +package info.bukova.isspst.ui.main.orders.requirements; import info.bukova.isspst.data.Material; import info.bukova.isspst.data.Requirement; import info.bukova.isspst.data.RequirementItem; import info.bukova.isspst.data.RequirementSubject; import info.bukova.isspst.data.Workgroup; -import info.bukova.isspst.services.requirement.RequirementService; import info.bukova.isspst.services.users.UserService; import info.bukova.isspst.services.workgroups.WorkgroupService; import info.bukova.isspst.ui.BigDecimalConverter; @@ -24,7 +23,6 @@ import org.zkoss.bind.annotation.Command; import org.zkoss.bind.annotation.GlobalCommand; import org.zkoss.bind.annotation.Init; import org.zkoss.bind.annotation.NotifyChange; -import org.zkoss.zk.ui.Executions; import org.zkoss.zk.ui.select.annotation.WireVariable; import org.zkoss.zul.Window; import org.zkoss.zul.impl.InputElement; @@ -39,15 +37,12 @@ public class RequirementForm extends FormViewModel @WireVariable private WorkgroupService workgroupService; - @WireVariable - private RequirementService requirementService; - private RequirementItem selectedItem; private int selItemIndex; - + private BigDecimalConverter bigDecimalConverter; - + private RequirementFormValidator requirementFormValidator; private List syncItems; @@ -119,8 +114,9 @@ public class RequirementForm extends FormViewModel @Command public void addSelectedItem() { - Window window = (Window) Executions.createComponents("/main/selectItems.zul", null, null); - window.doModal(); + // Window window = (Window) + // Executions.createComponents("/main/selectItems.zul", null, null); + // window.doModal(); } @Command @@ -151,17 +147,17 @@ public class RequirementForm extends FormViewModel { RequirementItem item = new RequirementItem(); boolean isMaterial = (selected instanceof Material); - //boolean isServiceItem = (selected instanceof ServiceItem); - + // boolean isServiceItem = (selected instanceof ServiceItem); + item.setReqSubject(selected); - + item.setCode(selected.getCode()); item.setName(selected.getName()); item.setQuantity(BigDecimal.valueOf(1)); item.setUnitPrice(BigDecimal.valueOf(0)); item.setTotal(BigDecimal.valueOf(0)); item.setDescription(selected.getDescription()); - + if (isMaterial) { Material materialItem = (Material) selected; @@ -188,8 +184,8 @@ public class RequirementForm extends FormViewModel log.warn("Zavolat z formuláře onFocus pro nastavení vybrané položky!"); return; } - - // Recalculate selecte item + + // Recalculate selected item if ((source != null) && (source.equals("total"))) { BigDecimal quantity = this.selectedItem.getQuantity(); @@ -207,7 +203,7 @@ public class RequirementForm extends FormViewModel { this.selectedItem.setTotal(this.selectedItem.getQuantity().multiply(this.selectedItem.getUnitPrice())); } - + // Calculate total price at form if (form != null) { @@ -217,7 +213,7 @@ public class RequirementForm extends FormViewModel { sumTotal = sumTotal.add(item.getTotal()); } - + form.setField("sumTotal", sumTotal); BindUtils.postNotifyChange(null, null, form, "*"); } diff --git a/src/main/java/info/bukova/isspst/ui/main/orders/requirements/SelectItems.java b/src/main/java/info/bukova/isspst/ui/main/orders/requirements/SelectItems.java new file mode 100644 index 00000000..ab4a0d25 --- /dev/null +++ b/src/main/java/info/bukova/isspst/ui/main/orders/requirements/SelectItems.java @@ -0,0 +1,47 @@ +package info.bukova.isspst.ui.main.orders.requirements; + +import info.bukova.isspst.data.MUnitEmb; +import info.bukova.isspst.data.RequirementSubject; +import info.bukova.isspst.services.munits.MUnitService; + +import java.util.List; + +import org.zkoss.bind.annotation.Init; +import org.zkoss.zk.ui.select.annotation.WireVariable; + +public class SelectItems +{ + protected RequirementSubject selectedItem; + + @WireVariable + protected MUnitService munitService; + + protected List munitList; + + + @Init + public void init() + { + this.setMunitList(munitService.getEmbAll()); + } + + public RequirementSubject getSelectedItem() + { + return selectedItem; + } + + public void setSelectedItem(RequirementSubject selectedItem) + { + this.selectedItem = selectedItem; + } + + public List getMunitList() + { + return munitList; + } + + public void setMunitList(List munitList) + { + this.munitList = munitList; + } +} diff --git a/src/main/java/info/bukova/isspst/ui/main/orders/services/ReqServicesForm.java b/src/main/java/info/bukova/isspst/ui/main/orders/services/ReqServicesForm.java new file mode 100644 index 00000000..bd017a4d --- /dev/null +++ b/src/main/java/info/bukova/isspst/ui/main/orders/services/ReqServicesForm.java @@ -0,0 +1,27 @@ +package info.bukova.isspst.ui.main.orders.services; + +import info.bukova.isspst.ui.main.orders.requirements.RequirementForm; + +import org.zkoss.bind.annotation.Command; +import org.zkoss.bind.annotation.Init; +import org.zkoss.zk.ui.Executions; +import org.zkoss.zul.Window; + +public class ReqServicesForm extends RequirementForm +{ + // private final static Logger log = + // LoggerFactory.getLogger(ReqServicesForm.class.getName()); + + @Init(superclass = true) + public void init() + { + super.init(); + } + + @Command + public void addSelectedItem() + { + Window window = (Window) Executions.createComponents("/main/orders/services/selectServices.zul", null, null); + window.doModal(); + } +} diff --git a/src/main/java/info/bukova/isspst/ui/main/orders/services/ReqServicesListMy.java b/src/main/java/info/bukova/isspst/ui/main/orders/services/ReqServicesListMy.java new file mode 100644 index 00000000..3a30af37 --- /dev/null +++ b/src/main/java/info/bukova/isspst/ui/main/orders/services/ReqServicesListMy.java @@ -0,0 +1,41 @@ +package info.bukova.isspst.ui.main.orders.services; + +import info.bukova.isspst.data.Requirement; +import info.bukova.isspst.services.requirement.RequirementService; +import info.bukova.isspst.ui.main.orders.requirements.ReqListMy; + +import java.util.ArrayList; +import java.util.List; + +import org.springframework.security.access.AccessDeniedException; +import org.zkoss.bind.BindUtils; +import org.zkoss.bind.annotation.Init; +import org.zkoss.zk.ui.select.annotation.WireVariable; + +public class ReqServicesListMy extends ReqListMy +{ + @WireVariable + protected RequirementService reqServicesService; + + @Init + public void init() + { + super.init(); + service = reqServicesService; + formZul = "/main/orders/services/reqHeadForm.zul"; + } + + @Override + protected List getListFromService() + { + try + { + return reqServicesService.getMy(); + } + catch (AccessDeniedException e) + { + BindUtils.postGlobalCommand(null, null, "disableAll", null); + return new ArrayList(); + } + } +} diff --git a/src/main/java/info/bukova/isspst/ui/main/orders/services/ReqServicesListMyAll.java b/src/main/java/info/bukova/isspst/ui/main/orders/services/ReqServicesListMyAll.java new file mode 100644 index 00000000..273035c2 --- /dev/null +++ b/src/main/java/info/bukova/isspst/ui/main/orders/services/ReqServicesListMyAll.java @@ -0,0 +1,41 @@ +package info.bukova.isspst.ui.main.orders.services; + +import info.bukova.isspst.data.Requirement; +import info.bukova.isspst.services.requirement.RequirementService; +import info.bukova.isspst.ui.main.orders.requirements.ReqListMyAll; + +import java.util.ArrayList; +import java.util.List; + +import org.springframework.security.access.AccessDeniedException; +import org.zkoss.bind.BindUtils; +import org.zkoss.bind.annotation.Init; +import org.zkoss.zk.ui.select.annotation.WireVariable; + +public class ReqServicesListMyAll extends ReqListMyAll +{ + @WireVariable + protected RequirementService reqServicesService; + + @Init + public void init() + { + super.init(); + service = reqServicesService; + formZul = "/main/orders/services/reqHeadForm.zul"; + } + + @Override + protected List getListFromService() + { + try + { + return reqServicesService.getAll(); + } + catch (AccessDeniedException e) + { + BindUtils.postGlobalCommand(null, null, "disableAll", null); + return new ArrayList(); + } + } +} diff --git a/src/main/java/info/bukova/isspst/ui/main/orders/services/ReqServicesListMyCenters.java b/src/main/java/info/bukova/isspst/ui/main/orders/services/ReqServicesListMyCenters.java new file mode 100644 index 00000000..57d8b5f2 --- /dev/null +++ b/src/main/java/info/bukova/isspst/ui/main/orders/services/ReqServicesListMyCenters.java @@ -0,0 +1,41 @@ +package info.bukova.isspst.ui.main.orders.services; + +import info.bukova.isspst.data.Requirement; +import info.bukova.isspst.services.requirement.RequirementService; +import info.bukova.isspst.ui.main.orders.requirements.ReqListMyCenters; + +import java.util.ArrayList; +import java.util.List; + +import org.springframework.security.access.AccessDeniedException; +import org.zkoss.bind.BindUtils; +import org.zkoss.bind.annotation.Init; +import org.zkoss.zk.ui.select.annotation.WireVariable; + +public class ReqServicesListMyCenters extends ReqListMyCenters +{ + @WireVariable + protected RequirementService reqServicesService; + + @Init + public void init() + { + super.init(); + service = reqServicesService; + formZul = "/main/orders/services/reqHeadForm.zul"; + } + + @Override + protected List getListFromService() + { + try + { + return reqServicesService.getCentreReq(); + } + catch (AccessDeniedException e) + { + BindUtils.postGlobalCommand(null, null, "disableCentre", null); + return new ArrayList(); + } + } +} diff --git a/src/main/java/info/bukova/isspst/ui/main/orders/services/ReqServicesListMyWorkgroups.java b/src/main/java/info/bukova/isspst/ui/main/orders/services/ReqServicesListMyWorkgroups.java new file mode 100644 index 00000000..2fa85640 --- /dev/null +++ b/src/main/java/info/bukova/isspst/ui/main/orders/services/ReqServicesListMyWorkgroups.java @@ -0,0 +1,41 @@ +package info.bukova.isspst.ui.main.orders.services; + +import info.bukova.isspst.data.Requirement; +import info.bukova.isspst.services.requirement.RequirementService; +import info.bukova.isspst.ui.main.orders.requirements.ReqListMyWorkgroups; + +import java.util.ArrayList; +import java.util.List; + +import org.springframework.security.access.AccessDeniedException; +import org.zkoss.bind.BindUtils; +import org.zkoss.bind.annotation.Init; +import org.zkoss.zk.ui.select.annotation.WireVariable; + +public class ReqServicesListMyWorkgroups extends ReqListMyWorkgroups +{ + @WireVariable + protected RequirementService reqServicesService; + + @Init + public void init() + { + super.init(); + service = reqServicesService; + formZul = "/main/orders/services/reqHeadForm.zul"; + } + + @Override + protected List getListFromService() + { + try + { + return reqServicesService.getWorkgroupReq(); + } + catch (AccessDeniedException e) + { + BindUtils.postGlobalCommand(null, null, "disableWorkgroup", null); + return new ArrayList(); + } + } +} diff --git a/src/main/java/info/bukova/isspst/ui/main/orders/services/SelectServicesItems.java b/src/main/java/info/bukova/isspst/ui/main/orders/services/SelectServicesItems.java new file mode 100644 index 00000000..9cd7939e --- /dev/null +++ b/src/main/java/info/bukova/isspst/ui/main/orders/services/SelectServicesItems.java @@ -0,0 +1,121 @@ +package info.bukova.isspst.ui.main.orders.services; + +import info.bukova.isspst.data.ServiceItem; +import info.bukova.isspst.filters.ServiceItemFilter; +import info.bukova.isspst.services.reqsubjects.ServiceItemService; +import info.bukova.isspst.ui.main.orders.requirements.SelectItems; + +import java.util.List; + +import org.zkoss.bind.annotation.Command; +import org.zkoss.bind.annotation.Init; +import org.zkoss.bind.annotation.NotifyChange; +import org.zkoss.zk.ui.select.annotation.WireVariable; + +public class SelectServicesItems extends SelectItems +{ + @WireVariable + private ServiceItemService serviceItemService; + + private List serviceItemList; + + private List fullServiceItemList; + + + private boolean activeFilterService; + + private ServiceItem filterTmpService; + + private ServiceItemFilter dataFilterService; + + + @Init + public void init() + { + super.init(); + + this.setFullServiceItemList(serviceItemService.getAll()); + this.setServiceItemList(this.getFullServiceItemList()); + + this.setActiveFilterService(false); + this.setFilterTmpService(new ServiceItem()); + this.setDataFilterService(new ServiceItemFilter(this.getFilterTmpService())); + } + + public List getServiceItemList() + { + return serviceItemList; + } + + public void setServiceItemList(List serviceItemList) + { + this.serviceItemList = serviceItemList; + } + + public List getFullServiceItemList() + { + return fullServiceItemList; + } + + public void setFullServiceItemList(List fullServiceItemList) + { + this.fullServiceItemList = fullServiceItemList; + } + + public boolean isActiveFilterService() + { + return activeFilterService; + } + + public void setActiveFilterService(boolean activeFilterService) + { + this.activeFilterService = activeFilterService; + } + + public ServiceItem getFilterTmpService() + { + return this.filterTmpService; + } + + private void setFilterTmpService(ServiceItem serviceItem) + { + this.filterTmpService = serviceItem; + } + + public ServiceItemFilter getDataFilterService() + { + return dataFilterService; + } + + public void setDataFilterService(ServiceItemFilter dataFilterService) + { + this.dataFilterService = dataFilterService; + } + + @Command + @NotifyChange({ "activeFilterService", "serviceItemList", "selectedItem" }) + public void onFilterService() + { + this.setSelectedItem(null); + + this.setActiveFilterService(!this.isActiveFilterService()); + + if (this.isActiveFilterService()) + { + this.doFilterService(); + } + else + { + this.setServiceItemList(this.getFullServiceItemList()); + } + } + + @Command + @NotifyChange("serviceItemList") + public void doFilterService() + { + this.setSelectedItem(null); + List result = this.serviceItemService.filterList(this.getFullServiceItemList(), this.getDataFilterService()); + this.setServiceItemList(result); + } +} diff --git a/src/main/java/info/bukova/isspst/ui/requirement/RequirementList.java b/src/main/java/info/bukova/isspst/ui/requirement/RequirementList.java deleted file mode 100644 index 18480c5e..00000000 --- a/src/main/java/info/bukova/isspst/ui/requirement/RequirementList.java +++ /dev/null @@ -1,56 +0,0 @@ -package info.bukova.isspst.ui.requirement; - -import info.bukova.isspst.data.Requirement; -import info.bukova.isspst.data.Workgroup; -import info.bukova.isspst.filters.RequirementFilter; -import info.bukova.isspst.services.requirement.RequirementService; -import info.bukova.isspst.services.users.UserService; -import info.bukova.isspst.services.workgroups.WorkgroupService; -import info.bukova.isspst.ui.BigDecimalConverter; -import info.bukova.isspst.ui.ListViewModel; - -import java.util.List; - -import org.zkoss.bind.annotation.Init; -import org.zkoss.zk.ui.select.annotation.WireVariable; - -public class RequirementList extends ListViewModel { - - @WireVariable - private RequirementService requirementService; - - @WireVariable - private UserService userService; - - @WireVariable - private WorkgroupService workgroupService; - - private BigDecimalConverter bigDecimalConverter; - - public List getCentres() - { - return workgroupService.getUserCentres(userService.getCurrent()); - } - - public BigDecimalConverter getBigDecimalConverter() - { - return bigDecimalConverter; - } - - public void setBigDecimalConverter(BigDecimalConverter bigDecimalConverter) - { - this.bigDecimalConverter = bigDecimalConverter; - } - - @Init - public void init() - { - - service = requirementService; - dataClass = Requirement.class; - formZul = "requirementsForm.zul"; - dataFilter = new RequirementFilter(getFilterTemplate()); - - this.bigDecimalConverter = new BigDecimalConverter(); - } -} diff --git a/src/main/java/info/bukova/isspst/ui/requirement/SelectItems.java b/src/main/java/info/bukova/isspst/ui/requirement/SelectItems.java deleted file mode 100644 index 9bfec51a..00000000 --- a/src/main/java/info/bukova/isspst/ui/requirement/SelectItems.java +++ /dev/null @@ -1,254 +0,0 @@ -package info.bukova.isspst.ui.requirement; - -import info.bukova.isspst.data.MUnitEmb; -import info.bukova.isspst.data.Material; -import info.bukova.isspst.data.RequirementSubject; -import info.bukova.isspst.data.ServiceItem; -import info.bukova.isspst.filters.MaterialFilter; -import info.bukova.isspst.filters.ServiceItemFilter; -import info.bukova.isspst.services.munits.MUnitService; -import info.bukova.isspst.services.reqsubjects.MaterialService; -import info.bukova.isspst.services.reqsubjects.ServiceItemService; - -import java.util.List; - -import org.zkoss.bind.annotation.Command; -import org.zkoss.bind.annotation.Init; -import org.zkoss.bind.annotation.NotifyChange; -import org.zkoss.zk.ui.select.annotation.WireVariable; - -public class SelectItems -{ - @WireVariable - private MaterialService materialService; - - private List materialList; - - private List fullMaterialList; - - - private boolean activeFilterMaterial; - - private Material filterTmpMaterial; - - private MaterialFilter dataFilterMaterial; - - - @WireVariable - private ServiceItemService serviceItemService; - - private List serviceItemList; - - private List fullServiceItemList; - - - private boolean activeFilterService; - - private ServiceItem filterTmpService; - - private ServiceItemFilter dataFilterService; - - - private RequirementSubject selectedItem; - - @WireVariable - private MUnitService munitService; - - private List munitList; - - - @Init - public void init() - { - this.setFullMaterialList(materialService.getAll()); - this.setMaterialList(this.getFullMaterialList()); - - this.setActiveFilterMaterial(false); - this.setFilterTmpMaterial(new Material()); - this.setDataFilterMaterial(new MaterialFilter(this.getFilterTmpMaterial())); - - - this.setFullServiceItemList(serviceItemService.getAll()); - this.setServiceItemList(this.getFullServiceItemList()); - - this.setActiveFilterService(false); - this.setFilterTmpService(new ServiceItem()); - this.setDataFilterService(new ServiceItemFilter(this.getFilterTmpService())); - - this.setMunitList(munitService.getEmbAll()); - } - - public List getMaterialList() - { - return materialList; - } - - public void setMaterialList(List materialList) - { - this.materialList = materialList; - } - - public List getFullMaterialList() - { - return fullMaterialList; - } - - public void setFullMaterialList(List fullMaterialList) - { - this.fullMaterialList = fullMaterialList; - } - - public boolean isActiveFilterMaterial() - { - return activeFilterMaterial; - } - - public void setActiveFilterMaterial(boolean activeFilterMaterial) - { - this.activeFilterMaterial = activeFilterMaterial; - } - - public Material getFilterTmpMaterial() - { - return this.filterTmpMaterial; - } - - private void setFilterTmpMaterial(Material material) - { - this.filterTmpMaterial = material; - } - - public MaterialFilter getDataFilterMaterial() - { - return dataFilterMaterial; - } - - public void setDataFilterMaterial(MaterialFilter dataFilterMaterial) - { - this.dataFilterMaterial = dataFilterMaterial; - } - - public List getServiceItemList() - { - return serviceItemList; - } - - public void setServiceItemList(List serviceItemList) - { - this.serviceItemList = serviceItemList; - } - - public List getFullServiceItemList() - { - return fullServiceItemList; - } - - public void setFullServiceItemList(List fullServiceItemList) - { - this.fullServiceItemList = fullServiceItemList; - } - - public boolean isActiveFilterService() - { - return activeFilterService; - } - - public void setActiveFilterService(boolean activeFilterService) - { - this.activeFilterService = activeFilterService; - } - - public ServiceItem getFilterTmpService() - { - return this.filterTmpService; - } - - private void setFilterTmpService(ServiceItem serviceItem) - { - this.filterTmpService = serviceItem; - } - - public ServiceItemFilter getDataFilterService() - { - return dataFilterService; - } - - public void setDataFilterService(ServiceItemFilter dataFilterService) - { - this.dataFilterService = dataFilterService; - } - - public RequirementSubject getSelectedItem() - { - return selectedItem; - } - - public void setSelectedItem(RequirementSubject selectedItem) - { - this.selectedItem = selectedItem; - } - - public List getMunitList() - { - return munitList; - } - - public void setMunitList(List munitList) - { - this.munitList = munitList; - } - - @Command - @NotifyChange({ "activeFilterMaterial", "materialList", "selectedItem" }) - public void onFilterMaterial() - { - this.setSelectedItem(null); - - this.setActiveFilterMaterial(!this.isActiveFilterMaterial()); - - if (this.isActiveFilterMaterial()) - { - this.doFilterMaterial(); - } - else - { - this.setMaterialList(this.getFullMaterialList()); - } - } - - @Command - @NotifyChange("materialList") - public void doFilterMaterial() - { - this.setSelectedItem(null); - List result = this.materialService.filterList(this.getFullMaterialList(), this.getDataFilterMaterial()); - this.setMaterialList(result); - } - - @Command - @NotifyChange({ "activeFilterService", "serviceItemList", "selectedItem" }) - public void onFilterService() - { - this.setSelectedItem(null); - - this.setActiveFilterService(!this.isActiveFilterService()); - - if (this.isActiveFilterService()) - { - this.doFilterService(); - } - else - { - this.setServiceItemList(this.getFullServiceItemList()); - } - } - - @Command - @NotifyChange("serviceItemList") - public void doFilterService() - { - this.setSelectedItem(null); - List result = this.serviceItemService.filterList(this.getFullServiceItemList(), this.getDataFilterService()); - this.setServiceItemList(result); - } -} diff --git a/src/main/webapp/WEB-INF/locales/zk-label.properties b/src/main/webapp/WEB-INF/locales/zk-label.properties index 5ce002d2..7f53b891 100644 --- a/src/main/webapp/WEB-INF/locales/zk-label.properties +++ b/src/main/webapp/WEB-INF/locales/zk-label.properties @@ -254,7 +254,9 @@ Information=Informace Requirements=Požadavky Orders=Objednávky +MaterialRequirement=Požadavek na materiál MaterialRequirements=Požadavky na materiál +ServiceRequirement=Požadavek na servis ServiceRequirements=Požadavky na servis CurrentRequirements=Aktuální požadavky diff --git a/src/main/webapp/WEB-INF/spring/root-context.xml b/src/main/webapp/WEB-INF/spring/root-context.xml index 62af5814..8b407f31 100644 --- a/src/main/webapp/WEB-INF/spring/root-context.xml +++ b/src/main/webapp/WEB-INF/spring/root-context.xml @@ -257,6 +257,18 @@ + + + + + + + + + + + + diff --git a/src/main/webapp/main/orders/material/reqHeadForm.zul b/src/main/webapp/main/orders/material/reqHeadForm.zul new file mode 100644 index 00000000..b7dff5fb --- /dev/null +++ b/src/main/webapp/main/orders/material/reqHeadForm.zul @@ -0,0 +1,17 @@ + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/main/orders/material/reqHeadListMy.zul b/src/main/webapp/main/orders/material/reqHeadListMy.zul new file mode 100644 index 00000000..9891f649 --- /dev/null +++ b/src/main/webapp/main/orders/material/reqHeadListMy.zul @@ -0,0 +1,13 @@ + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/main/orders/material/reqHeadListMyAll.zul b/src/main/webapp/main/orders/material/reqHeadListMyAll.zul new file mode 100644 index 00000000..d586ae2d --- /dev/null +++ b/src/main/webapp/main/orders/material/reqHeadListMyAll.zul @@ -0,0 +1,13 @@ + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/main/orders/material/reqHeadListMyCenters.zul b/src/main/webapp/main/orders/material/reqHeadListMyCenters.zul new file mode 100644 index 00000000..a6d9bdc9 --- /dev/null +++ b/src/main/webapp/main/orders/material/reqHeadListMyCenters.zul @@ -0,0 +1,13 @@ + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/main/orders/material/reqHeadListMyWorkgroups.zul b/src/main/webapp/main/orders/material/reqHeadListMyWorkgroups.zul new file mode 100644 index 00000000..09a28449 --- /dev/null +++ b/src/main/webapp/main/orders/material/reqHeadListMyWorkgroups.zul @@ -0,0 +1,13 @@ + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/main/orders/material/selectMaterial.zul b/src/main/webapp/main/orders/material/selectMaterial.zul new file mode 100644 index 00000000..53ed73db --- /dev/null +++ b/src/main/webapp/main/orders/material/selectMaterial.zul @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + +
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + +
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
\ No newline at end of file diff --git a/src/main/webapp/main/orders/material/setup.zul b/src/main/webapp/main/orders/material/setup.zul index ac8b46f6..e081ee7f 100644 --- a/src/main/webapp/main/orders/material/setup.zul +++ b/src/main/webapp/main/orders/material/setup.zul @@ -2,10 +2,10 @@ - String gridMy = "/main/orders/requirements/reqListMy.zul"; - String gridMyCenters = "/main/orders/requirements/reqListMyCenters.zul"; - String gridMyWorkgroups = "/main/orders/requirements/reqListMyWorkgroups.zul"; - String gridAll = "/main/orders/requirements/reqListMyAll.zul"; + String gridMy = "/main/orders/material/reqHeadListMy.zul"; + String gridMyCenters = "/main/orders/material/reqHeadListMyCenters.zul"; + String gridMyWorkgroups = "/main/orders/material/reqHeadListMyWorkgroups.zul"; + String gridAll = "/main/orders/material/reqHeadListMyAll.zul"; String selectItem = "/main/selectMaterial.zul"; - - - - - - - - - - - - ${labels.RequirementsFormNumberSerie} : - - - - - - ${labels.RequirementsFormReqDate} : - - - - - - ${labels.RequirementsFormCenter} : - - - - - - - - ${labels.RequirementsFormDeliveryDate} : - - - - - - ${labels.Amount} : - - - - - - ${labels.RequirementsFormDescription} : - - - - - - - -