19 package org.turro.erp.workorder.logic;
21 import org.turro.command.Command;
22 import org.turro.command.Context;
23 import org.turro.elephant.context.Application;
24 import org.turro.elephant.util.ZkossUtils;
25 import org.turro.erp.db.ErpPU;
26 import org.turro.erp.entity.OrderReference;
27 import org.turro.erp.entity.WorkOrder;
28 import org.turro.erp.menu.ErpMenu;
29 import org.turro.erp.reference.OrderReferenceGrid;
30 import org.turro.jpa.composer.EntityComposer;
31 import org.turro.jpa.entity.DaoEntity;
32 import org.turro.zul.frame.Framework;
33 import org.zkoss.zk.ui.Component;
34 import org.zkoss.zk.ui.select.annotation.Listen;
35 import org.zkoss.zk.ui.select.annotation.Wire;
36 import org.zkoss.zul.Tab;
47 @Wire(
"#tabvaluation")
48 private Tab tabvaluation;
51 private Tab tabbudgets;
56 @Listen(
"onSelect = #tablines")
70 entity.setWorkOrderDate(
new java.util.Date());
96 tabtasks.setDisabled(!canViewTasks());
97 tabvaluation.setDisabled(tabtasks.isDisabled());
98 tabbudgets.setDisabled(tabtasks.isDisabled());
103 ZkossUtils.confirmDeletion(
null,
new Command() {
105 public Object execute(Context context) {
115 return !
entity.isEmpty() && (
entity.getId() == 0) || super.shouldBeSaved();
128 private boolean canViewTasks() {
130 if(!or.isEmpty() && or.getId() < 1) {
boolean isInRole(String role)
static Application getApplication()
String getAttributeName()
WorkOrder getEntityInstance(Long id)
DaoEntity getWrapperInstance(Component comp)
static Framework getCurrent()
void setSelectedLabel(String text)
void setSelectedTooltiptext(String text)