Skip to content

Commit

Permalink
feat: support further budget periods (#1539)
Browse files Browse the repository at this point in the history
* new budget periods 'half-yearly and 'yearly'
  • Loading branch information
clindeIntershop authored and SGrueber committed Mar 8, 2024
1 parent 9487fc3 commit e2e7aea
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class UserBudgetFormComponent implements OnInit {

currentCurrency: string;

periods = ['weekly', 'monthly', 'quarterly'];
periods = ['weekly', 'monthly', 'quarterly', 'half-yearly', 'yearly'];

private destroyRef = inject(DestroyRef);

Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/forms/utils/forms.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ describe('Forms Service', () => {

describe('getCostCenterBudgetPeriodOptions', () => {
it('should return budget period options if called', () => {
expect(FormsService.getCostCenterBudgetPeriodOptions()).toHaveLength(4);
expect(FormsService.getCostCenterBudgetPeriodOptions()).toHaveLength(6);
});
});
});
2 changes: 1 addition & 1 deletion src/app/shared/forms/utils/forms.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class FormsService {
* Gets budget period select options for cost center budgets.
*/
static getCostCenterBudgetPeriodOptions() {
const periods = ['fixed', 'weekly', 'monthly', 'quarterly'];
const periods = ['fixed', 'weekly', 'monthly', 'quarterly', 'half-yearly', 'yearly'];

return periods.map(period => ({
value: period,
Expand Down
4 changes: 3 additions & 1 deletion src/assets/i18n/de_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,11 @@
"account.costcenter.budget.error.valid": "Geben Sie einen gültigen Geldbetrag ein (Budget).",
"account.costcenter.budget.label": "Budget",
"account.costcenter.budget.period.value.fixed": "vordefiniert",
"account.costcenter.budget.period.value.half-yearly": "halbjährlich",
"account.costcenter.budget.period.value.monthly": "monatlich",
"account.costcenter.budget.period.value.quarterly": "quartalsweise",
"account.costcenter.budget.period.value.weekly": "wöchentlich",
"account.costcenter.budget.period.value.yearly": "jährlich",
"account.costcenter.create.button.label": "Kostenstelle anlegen",
"account.costcenter.create.heading": "Kostenstelle hinzufügen",
"account.costcenter.deactivate.button.label": "Deaktivieren",
Expand Down Expand Up @@ -597,7 +599,7 @@
"approval.detailspage.cost_center.label": "Kostenstelle",
"approval.detailspage.costcenter.approval.heading": "Kostenstellen-Genehmigung",
"approval.detailspage.costcenter.approver.label": "Genehmiger (Kostenstelle)",
"approval.detailspage.costcenter.budget.label": "{{0, select, =weekly{Kostenstellenbudget (wöchentlich)} =monthly{Kostenstellenbudget (monatlich)} =quarterly{Kostenstellenbudget (quartalsweise)} =fixed{Kostenstellenbudget (vordefiniert)}}}",
"approval.detailspage.costcenter.budget.label": "{{0, select, =weekly{Kostenstellenbudget (wöchentlich)} =monthly{Kostenstellenbudget (monatlich)} =quarterly{Kostenstellenbudget (quartalsweise)} =half-yearly{Kostenstellenbudget (halbjährlich)} =yearly{Kostenstellenbudget (jährlich)} =fixed{Kostenstellenbudget (vordefiniert)}}}",
"approval.detailspage.links.return_to_approvals": "Zurück zu Genehmigungen",
"approval.detailspage.links.return_to_requisitions": "Zurück zu Bestellanfragen",
"approval.detailspage.order.request_id": "Bestellanfrage-Nr.",
Expand Down
4 changes: 3 additions & 1 deletion src/assets/i18n/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,11 @@
"account.costcenter.budget.error.valid": "Please enter a valid amount of money (Budget).",
"account.costcenter.budget.label": "Budget",
"account.costcenter.budget.period.value.fixed": "fixed",
"account.costcenter.budget.period.value.half-yearly": "half-yearly",
"account.costcenter.budget.period.value.monthly": "monthly",
"account.costcenter.budget.period.value.quarterly": "quarterly",
"account.costcenter.budget.period.value.weekly": "weekly",
"account.costcenter.budget.period.value.yearly": "yearly",
"account.costcenter.create.button.label": "Create Cost Center",
"account.costcenter.create.heading": "Add Cost Center",
"account.costcenter.deactivate.button.label": "Deactivate",
Expand Down Expand Up @@ -597,7 +599,7 @@
"approval.detailspage.cost_center.label": "Cost Center",
"approval.detailspage.costcenter.approval.heading": "Cost Center Approval",
"approval.detailspage.costcenter.approver.label": "Approver (Cost Center)",
"approval.detailspage.costcenter.budget.label": "{{0, select, =weekly{Cost Center Budget (weekly)} =monthly{Cost Center Budget (monthly)} =quarterly{Cost Center Budget (quarterly)} =fixed{Cost Center Budget (fixed)}}}",
"approval.detailspage.costcenter.budget.label": "{{0, select, =weekly{Cost Center Budget (weekly)} =monthly{Cost Center Budget (monthly)} =quarterly{Cost Center Budget (quarterly)} =half-yearly{Cost Center Budget (half-yearly)} =yearly{Cost Center Budget (yearly)} =fixed{Cost Center Budget (fixed)}}}",
"approval.detailspage.links.return_to_approvals": "Back to Approvals",
"approval.detailspage.links.return_to_requisitions": "Back to Requisitions",
"approval.detailspage.order.request_id": "Requisition No.",
Expand Down
4 changes: 3 additions & 1 deletion src/assets/i18n/fr_FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,11 @@
"account.costcenter.budget.error.valid": "Veuillez saisir une valeur monétaire valide (budget).",
"account.costcenter.budget.label": "Budget",
"account.costcenter.budget.period.value.fixed": "fixe",
"account.costcenter.budget.period.value.half-yearly": "semestriel",
"account.costcenter.budget.period.value.monthly": "mensuel",
"account.costcenter.budget.period.value.quarterly": "trimestriel",
"account.costcenter.budget.period.value.weekly": "hebdomadaire",
"account.costcenter.budget.period.value.yearly": "annuel",
"account.costcenter.create.button.label": "Créer un centre de coûts",
"account.costcenter.create.heading": "Ajouter un centre de coûts",
"account.costcenter.deactivate.button.label": "Désactiver",
Expand Down Expand Up @@ -597,7 +599,7 @@
"approval.detailspage.cost_center.label": "Centre de coûts",
"approval.detailspage.costcenter.approval.heading": "Approbation du centre de coûts",
"approval.detailspage.costcenter.approver.label": "Approbateur du centre de coûts",
"approval.detailspage.costcenter.budget.label": "{{0, select, =weekly{Budget du centre de coûts (hebdomadaire)} =monthly{Budget du centre de coûts (mensuel)} =quarterly{Budget du centre de coûts (trimestriel)} =fixed{Budget du centre de coûts (fixe)}}}",
"approval.detailspage.costcenter.budget.label": "{{0, select, =weekly{Budget du centre de coûts (hebdomadaire)} =monthly{Budget du centre de coûts (mensuel)} =quarterly{Budget du centre de coûts (trimestriel)} =half-yearly{Budget du centre de coûts (semestriel)} =yearly{Budget du centre de coûts (annuel)} =fixed{Budget du centre de coûts (fixe)}}}",
"approval.detailspage.links.return_to_approvals": "Retour aux approbations",
"approval.detailspage.links.return_to_requisitions": "Retour aux réquisitions",
"approval.detailspage.order.request_id": "ID de la demande d’achat",
Expand Down

0 comments on commit e2e7aea

Please sign in to comment.