ItEr44S10CUGravacionModelosUnidadesTraballoItEr43S12: Adding type column for clarifying which type the template is
This commit is contained in:
parent
c283874c75
commit
4b0f6c4c9f
5 changed files with 27 additions and 0 deletions
|
|
@ -229,6 +229,11 @@ public abstract class OrderElementTemplate extends BaseEntity implements
|
|||
return infoComponent;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a description of the type or template this object is
|
||||
*/
|
||||
public abstract String getType();
|
||||
|
||||
public abstract List<OrderElementTemplate> getChildrenTemplates();
|
||||
|
||||
@Min(0)
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
|
||||
import org.hibernate.validator.Valid;
|
||||
import org.navalplanner.business.i18n.I18nHelper;
|
||||
import org.navalplanner.business.orders.entities.OrderElement;
|
||||
import org.navalplanner.business.orders.entities.OrderLineGroup;
|
||||
import org.navalplanner.business.trees.ITreeParentNode;
|
||||
|
|
@ -190,4 +191,9 @@ public class OrderLineGroupTemplate extends OrderElementTemplate implements
|
|||
return setupGroupParts(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
return I18nHelper._("Group");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@
|
|||
*/
|
||||
package org.navalplanner.business.templates.entities;
|
||||
|
||||
import static org.navalplanner.business.i18n.I18nHelper._;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
|
@ -80,4 +82,9 @@ public class OrderLineTemplate extends OrderElementTemplate {
|
|||
return setupElementParts(line);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
return _("Line");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@
|
|||
*/
|
||||
package org.navalplanner.business.templates.entities;
|
||||
|
||||
import static org.navalplanner.business.i18n.I18nHelper._;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.hibernate.validator.NotNull;
|
||||
|
|
@ -58,4 +60,9 @@ public class OrderTemplate extends OrderLineGroupTemplate {
|
|||
return new LocalDate().toDateTimeAtStartOfDay().toDate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
return _("Order");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
<grid id="listing" model="@{templateController.templates}" mold="paging"
|
||||
pageSize="10" fixedLayout="true">
|
||||
<columns>
|
||||
<column label="${i18n:_('Type')}" sort="auto(type)" />
|
||||
<column label="${i18n:_('Code')}" sort="auto(code)" />
|
||||
<column label="${i18n:_('Name')}" sort="auto(name)" />
|
||||
<column label="${i18n:_('Days from Beginning to Start')}"
|
||||
|
|
@ -33,6 +34,7 @@
|
|||
</columns>
|
||||
<rows>
|
||||
<row self="@{each='template'}" value="@{template}">
|
||||
<label value="@{template.type}" />
|
||||
<label value="@{template.code}" />
|
||||
<label value="@{template.name}" />
|
||||
<label value="@{template.startAsDaysFromBeginning}" />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue