ItEr37S12CUAdministracionCategoriaCosteItEr36S14: added the field 'enabled' to the entity CostCategory in all layers
This commit is contained in:
parent
e469b4a9ee
commit
ca986edb17
3 changed files with 17 additions and 0 deletions
|
|
@ -39,6 +39,8 @@ public class CostCategory extends BaseEntity {
|
|||
@NotEmpty
|
||||
private String name;
|
||||
|
||||
private boolean enabled = true;
|
||||
|
||||
@Valid
|
||||
private Set<HourCost> hourCosts = new HashSet<HourCost>();
|
||||
|
||||
|
|
@ -67,6 +69,14 @@ public class CostCategory extends BaseEntity {
|
|||
this.name = name;
|
||||
}
|
||||
|
||||
public boolean getEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
|
||||
public void setEnabled(boolean enabled) {
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
public Set<HourCost> getHourCosts() {
|
||||
return hourCosts;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@
|
|||
|
||||
<property name="name" unique="true"/>
|
||||
|
||||
<property name="enabled"/>
|
||||
|
||||
<set name="hourCosts" inverse="true" cascade="all-delete-orphan">
|
||||
<key column="COST_CATEGORY_ID"/>
|
||||
<one-to-many class="HourCost"/>
|
||||
|
|
|
|||
|
|
@ -41,6 +41,11 @@
|
|||
value="@{controller.costCategory.name}" width="300px"
|
||||
constraint="no empty:${i18n:_('cannot be null or empty')}"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${i18n:_('Enabled')}:" />
|
||||
<checkbox id="enabled"
|
||||
checked="@{controller.costCategory.enabled}" width="300px" />
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue