Added to configuration class accessors for automatic budget properties
FEA: ItEr77S17AutomaticBudgeting
This commit is contained in:
parent
024f30ab0b
commit
15883806f5
5 changed files with 52 additions and 11 deletions
|
|
@ -116,6 +116,10 @@ public class Configuration extends BaseEntity {
|
|||
|
||||
private Integer secondsPlanningWarning = 30;
|
||||
|
||||
private TypeOfWorkHours budgetDefaultTypeOfWorkHours;
|
||||
|
||||
private Boolean enabledAutomaticBudget = false;
|
||||
|
||||
/**
|
||||
* Maximum users configurable directly in database for SaaS products. If
|
||||
* zero it means that there isn't any limitation.
|
||||
|
|
@ -128,6 +132,7 @@ public class Configuration extends BaseEntity {
|
|||
*/
|
||||
private Integer maxResources = 0;
|
||||
|
||||
|
||||
public void setDefaultCalendar(BaseCalendar defaultCalendar) {
|
||||
this.defaultCalendar = defaultCalendar;
|
||||
}
|
||||
|
|
@ -477,11 +482,11 @@ public class Configuration extends BaseEntity {
|
|||
}
|
||||
|
||||
public TypeOfWorkHours getBudgetDefaultTypeOfWorkHours() {
|
||||
return personalTimesheetsTypeOfWorkHours;
|
||||
return budgetDefaultTypeOfWorkHours;
|
||||
}
|
||||
|
||||
public void setBudgetDefaultTypeOfWorkHours(TypeOfWorkHours typeOfWorkHours) {
|
||||
personalTimesheetsTypeOfWorkHours = typeOfWorkHours;
|
||||
budgetDefaultTypeOfWorkHours = typeOfWorkHours;
|
||||
}
|
||||
|
||||
public PersonalTimesheetsPeriodicityEnum getPersonalTimesheetsPeriodicity() {
|
||||
|
|
@ -511,4 +516,12 @@ public class Configuration extends BaseEntity {
|
|||
this.secondsPlanningWarning = secondsPlanningWarning;
|
||||
}
|
||||
|
||||
public Boolean isEnabledAutomaticBudget() {
|
||||
return enabledAutomaticBudget;
|
||||
}
|
||||
|
||||
public void setEnabledAutomaticBudget(Boolean enabledAutomaticBudget) {
|
||||
this.enabledAutomaticBudget = enabledAutomaticBudget;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1010,6 +1010,14 @@ public class ConfigurationController extends GenericForwardComposer {
|
|||
configurationModel.setBudgetDefaultTypeOfWorkHours(typeOfWorkHours);
|
||||
}
|
||||
|
||||
public Boolean getEnabledAutomaticBudget() {
|
||||
return configurationModel.getEnabledAutomaticBudget();
|
||||
}
|
||||
|
||||
public void setEnabledAutomaticBudget(Boolean enabledAutomaticBudget) {
|
||||
configurationModel.setEnabledAutomaticBudget(enabledAutomaticBudget);
|
||||
}
|
||||
|
||||
public List<PersonalTimesheetsPeriodicityEnum> getPersonalTimesheetsPeriodicities() {
|
||||
return Arrays.asList(PersonalTimesheetsPeriodicityEnum.values());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -733,4 +733,20 @@ public class ConfigurationModel implements IConfigurationModel {
|
|||
configuration.setBudgetDefaultTypeOfWorkHours(typeOfWorkHours);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean getEnabledAutomaticBudget() {
|
||||
if (configuration == null) {
|
||||
return null;
|
||||
}
|
||||
return (configuration.isEnabledAutomaticBudget());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEnabledAutomaticBudget(Boolean enabledAutomaticBudget) {
|
||||
if (configuration != null) {
|
||||
configuration.setEnabledAutomaticBudget(enabledAutomaticBudget);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -196,4 +196,8 @@ public interface IConfigurationModel {
|
|||
|
||||
void setBudgetDefaultTypeOfWorkHours(TypeOfWorkHours typeOfWorkHours);
|
||||
|
||||
Boolean getEnabledAutomaticBudget();
|
||||
|
||||
void setEnabledAutomaticBudget(Boolean enabledAutomaticBudget);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -214,16 +214,16 @@
|
|||
<row>
|
||||
<label
|
||||
value="${i18n:_('Automatic budget')}" />
|
||||
<hbox>
|
||||
<label
|
||||
value="${i18n:_('Hours type')}" />
|
||||
<hbox align="pack">
|
||||
<label
|
||||
value="${i18n:_('Hours type')}" />
|
||||
<bandboxSearch
|
||||
finder="TypeOfWorkHoursBandboxFinder"
|
||||
selectedElement="@{configurationController.budgetDefaultTypeOfWorkHours, access='both'}" />
|
||||
<checkbox
|
||||
label="${i18n:_('calculate based on task criteria and cost categories')}"
|
||||
checked="@{configurationController.enabledAutomaticBudget}" />
|
||||
</hbox>
|
||||
finder="TypeOfWorkHoursBandboxFinder"
|
||||
selectedElement="@{configurationController.budgetDefaultTypeOfWorkHours, access='both'}" />
|
||||
<checkbox
|
||||
label="${i18n:_('calculate based on task criteria and cost categories')}"
|
||||
checked="@{configurationController.enabledAutomaticBudget}" />
|
||||
</hbox>
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue