BrightSide Workbench Full Report + Source Code
org.turro.erp.menu.ErpMenu Class Reference
Inheritance diagram for org.turro.erp.menu.ErpMenu:
Collaboration diagram for org.turro.erp.menu.ErpMenu:

Public Member Functions

void addMenus (final ElephantMenuBar bar)
 

Static Public Member Functions

static void showWorkOrder (WorkOrder workOrder)
 
static void showWorkOrder (Long id)
 
static void showTask (Task task)
 
static void showTaskDetail (Long id, boolean view)
 
static void showTaskDetail (Task task, boolean view)
 
static void showUsageDetail (Long id)
 
static void showUsageDetail (RequiredUsage requiredUsage)
 
static void showTask (Long id)
 
static void showAptitude (Long id)
 
static void showResource (Long id)
 
static void showHumanResource (Long id)
 
static void showCustomerOrder (Long id)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 41 of file ErpMenu.java.

Member Function Documentation

◆ addMenus()

void org.turro.erp.menu.ErpMenu.addMenus ( final ElephantMenuBar  bar)

Definition at line 44 of file ErpMenu.java.

44  {
45  RoleMap rm = new RoleMap(Application.getApplication());
46  if(rm.containsKey("erp-purchase,erp-sales")) {
47  // Supply chain
48  Menu m = bar.addMenu(Application.getString("lSupplyChain"));
49  Menupopup mp = bar.addMenupopup(m);
50  // Purchase
51  if(rm.get("erp-purchase:new")) {
52  Menu mm = bar.addMenu(mp, Application.getString("lPurchase"));
53  Menupopup mip = bar.addMenupopup(mm);
54  bar.addMenuitem(mip, Application.getString("lOrders"), "/_zul/images/orders.png", "/WEB-INF/_zul/erp/purchase/orders.zul", false);
55  bar.addMenuitem(mip, Application.getString("lHoursOrder"), null, "/WEB-INF/_zul/erp/purchase/hoursOrder.zul", false);
56  bar.addMenuitem(mip, Application.getString("lProductsOrder"), null, "/WEB-INF/_zul/erp/purchase/productsOrder.zul", false);
57  bar.addMenuSeparator(mp);
58  bar.addMenuitem(mip, Application.getString("lReceipts"), "/_zul/images/receipts.png", "/WEB-INF/_zul/erp/purchase/receipts.zul", false);
59  bar.addMenuitem(mip, Application.getString("lHoursReceipt"), null, "/WEB-INF/_zul/erp/purchase/hoursReceipt.zul", false);
60  bar.addMenuitem(mip, Application.getString("lProductsReceipt"), null, "/WEB-INF/_zul/erp/purchase/productsReceipt.zul", false);
61  }
62  // Sales
63  if(rm.get("erp-sales:new")) {
64  Menu mm = bar.addMenu(mp, Application.getString("lSales"));
65  Menupopup mip = bar.addMenupopup(mm);
66  bar.addMenuitem(mip, Application.getString("lCustomerOrders"), "/_zul/images/orders.png", "/WEB-INF/_zul/erp/sales/orders.zul", false);
67  bar.addMenuitem(mip, Application.getString("lNewCustomerOrder"), "/_zul/images/order_new.png", new EventListener() {
68  @Override
69  public void onEvent(Event event) throws Exception {
71  }
72  }, false);
73  }
74  }
75  if(rm.containsKey("erp-workorder,erp-task,erp-reference")) {
76  // Manufacture
77  Menu m = bar.addMenu(Application.getString("lManufacturing"));
78  Menupopup mp = bar.addMenupopup(m);
79  if(rm.get("erp-task:list")) {
80  bar.addMenuitem(mp, Application.getString("lPendingTasks"), "/_zul/images/task_pending.png", "/WEB-INF/_zul/erp/task/pendingTasks.zul", true);
81  bar.addMenuitem(mp, Application.getString("lWorkload"), "/_zul/images/workload.png", "/WEB-INF/_zul/erp/task/workloads.zul", true);
82  }
83  bar.addMenuitem(mp, Application.getString("lTimeControl"), null, "/WEB-INF/_zul/erp/resource/timeControl.zul", false);
84  if(rm.get("erp-workorder:list") || rm.get("erp-reference:list") || rm.get("erp-task:list")) {
85  Menu mm = bar.addMenu(mp, Application.getString("lWorkOrders"));
86  Menupopup mip = bar.addMenupopup(mm);
87  if(rm.get("erp-workorder:list")) {
88  bar.addMenuitem(mip, Application.getString("lWorkOrders"), "/_zul/images/workorder.png", "/WEB-INF/_zul/erp/workorder/workorders.zul", true);
89  }
90  if(rm.get("erp-task:list")) {
91  bar.addMenuitem(mip, Application.getString("lTasks"), "/_zul/images/task.png", "/WEB-INF/_zul/erp/task/tasks.zul", false);
92  }
93  bar.addToolbarSeparator(true);
94  bar.addMenuSeparator(mip);
95  if(rm.get("erp-workorder:new")) {
96  bar.addMenuitem(mip, Application.getString("lNewWorkOrder"), "/_zul/images/workorder_new.png", new EventListener() {
97  @Override
98  public void onEvent(Event event) throws Exception {
99  showModalZulFile("lNewWorkOrder", "/WEB-INF/_zul/erp/workorder/newWorkorder.zul", null);
100  }
101  }, true);
102  }
103  if(rm.get("erp-workorder:new")) {
104  bar.addMenuitem(mip, Application.getString("lNewProductOrder"), "/_zul/images/productorder_new.png", new EventListener() {
105  @Override
106  public void onEvent(Event event) throws Exception {
107  showModalZulFile("lNewProductOrder", "/WEB-INF/_zul/erp/workorder/newProductorder.zul", null);
108  }
109  }, true);
110  }
111  bar.addToolbarSeparator(true);
112  }
113  if(rm.get("erp-config:list")) {
114  Menu mm = bar.addMenu(mp, Application.getString("lConfiguration"));
115  Menupopup mip = bar.addMenupopup(mm);
116  bar.addMenuitem(mip, Application.getString("lHumanResources"), "/_zul/images/operator.png", "/WEB-INF/_zul/erp/config/humanResources.zul");
117  bar.addMenuitem(mip, Application.getString("lAptitudes"), "/_zul/images/aptitude.png", "/WEB-INF/_zul/erp/config/aptitudes.zul");
118  bar.addMenuitem(mip, Application.getString("lResources"), "/_zul/images/resource.png", "/WEB-INF/_zul/erp/config/resources.zul");
119  }
120  }
121  }
static void showCustomerOrder(Long id)
Definition: ErpMenu.java:182
Here is the call graph for this function:

◆ showAptitude()

static void org.turro.erp.menu.ErpMenu.showAptitude ( Long  id)
static

Definition at line 170 of file ErpMenu.java.

170  {
171  showEntity(id, "aptitudeId", "lAptitude", "/WEB-INF/_zul/erp/config/aptitude.zul");
172  }
Here is the caller graph for this function:

◆ showCustomerOrder()

static void org.turro.erp.menu.ErpMenu.showCustomerOrder ( Long  id)
static

Definition at line 182 of file ErpMenu.java.

182  {
183  showEntity(id, "customerOrderId", "lCustomerOrder", "/WEB-INF/_zul/erp/sales/order.zul");
184  }
Here is the caller graph for this function:

◆ showHumanResource()

static void org.turro.erp.menu.ErpMenu.showHumanResource ( Long  id)
static

Definition at line 178 of file ErpMenu.java.

178  {
179  showEntity(id, "humanResourceId", "lHumanResource", "/WEB-INF/_zul/erp/config/humanResource.zul");
180  }
Here is the caller graph for this function:

◆ showResource()

static void org.turro.erp.menu.ErpMenu.showResource ( Long  id)
static

Definition at line 174 of file ErpMenu.java.

174  {
175  showEntity(id, "resourceId", "lResource", "/WEB-INF/_zul/erp/config/resource.zul");
176  }
Here is the caller graph for this function:

◆ showTask() [1/2]

static void org.turro.erp.menu.ErpMenu.showTask ( Long  id)
static

Definition at line 166 of file ErpMenu.java.

166  {
167  showEntity(id, "taskId", "lTask", "/WEB-INF/_zul/erp/task/task.zul");
168  }

◆ showTask() [2/2]

static void org.turro.erp.menu.ErpMenu.showTask ( Task  task)
static

Definition at line 133 of file ErpMenu.java.

133  {
134  HashMap<String, Object> map = new HashMap<String, Object>();
135  map.put("taskGenerated", task);
136  showEntity(task.getId(), "taskId", "lTask", "/WEB-INF/_zul/erp/task/task.zul", map);
137  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showTaskDetail() [1/2]

static void org.turro.erp.menu.ErpMenu.showTaskDetail ( Long  id,
boolean  view 
)
static

Definition at line 139 of file ErpMenu.java.

139  {
140  Task task = new ErpPU().find(Task.class, id);
141  if(task != null) {
142  showTaskDetail(task, view);
143  }
144  }
static void showTaskDetail(Long id, boolean view)
Definition: ErpMenu.java:139

◆ showTaskDetail() [2/2]

static void org.turro.erp.menu.ErpMenu.showTaskDetail ( Task  task,
boolean  view 
)
static

Definition at line 146 of file ErpMenu.java.

146  {
147  HashMap<String, Object> map = new HashMap<String, Object>();
148  map.put("task", task);
149  map.put("view", view);
150  showPopupZulFile("@" + task.getFullDescription(), "/WEB-INF/_zul/erp/task/detail.zul", map);
151  }
Here is the call graph for this function:

◆ showUsageDetail() [1/2]

static void org.turro.erp.menu.ErpMenu.showUsageDetail ( Long  id)
static

Definition at line 153 of file ErpMenu.java.

153  {
154  RequiredUsage requiredUsage = new ErpPU().find(RequiredUsage.class, id);
155  if(requiredUsage != null) {
156  showUsageDetail(requiredUsage);
157  }
158  }
static void showUsageDetail(Long id)
Definition: ErpMenu.java:153

◆ showUsageDetail() [2/2]

static void org.turro.erp.menu.ErpMenu.showUsageDetail ( RequiredUsage  requiredUsage)
static

Definition at line 160 of file ErpMenu.java.

160  {
161  HashMap<String, Object> map = new HashMap<String, Object>();
162  map.put("requiredUsage", requiredUsage);
163  showPopupZulFile("@" + requiredUsage.getTask().getFullDescription(), "/WEB-INF/_zul/erp/task/usageDetail.zul", map);
164  }
Here is the call graph for this function:

◆ showWorkOrder() [1/2]

static void org.turro.erp.menu.ErpMenu.showWorkOrder ( Long  id)
static

Definition at line 129 of file ErpMenu.java.

129  {
130  showEntity(id, "workOrderId", "lWorkOrder", "/WEB-INF/_zul/erp/workorder/workorder.zul");
131  }

◆ showWorkOrder() [2/2]

static void org.turro.erp.menu.ErpMenu.showWorkOrder ( WorkOrder  workOrder)
static

Definition at line 123 of file ErpMenu.java.

123  {
124  HashMap<String, Object> map = new HashMap<String, Object>();
125  map.put("workOrderGenerated", workOrder);
126  showEntity(workOrder.getId(), "workOrderId", "lWorkOrder", "/WEB-INF/_zul/erp/workorder/workorder.zul", map);
127  }
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: