Skip to content

Commit

Permalink
fix config for personal dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
mbritense committed Dec 9, 2024
1 parent 0a98138 commit ac30934
Show file tree
Hide file tree
Showing 10 changed files with 1,526 additions and 82 deletions.
1,523 changes: 1,463 additions & 60 deletions package-lock.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ <h3 cdsModalHeaderHeading>{{ 'dashboardManagement.widgets.editDashboard' | trans
</cds-modal>

<ng-template #editDashboardFormTemplate let-obs="obs">
<form *ngIf="editDashboardForm" [formGroup]="editDashboardForm" class="dashboard-modal__form">
<form
*ngIf="editDashboardForm"
[formGroup]="editDashboardForm"
class="dashboard-modal__form"
[cdsLayer]="1"
>
<div class="form__element">
<cds-label
[disabled]="obs.disabled"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ <h3 cdsModalHeaderHeading>
</h3>
</cds-modal-header>

<section cdsModalContent>
<section cdsModalContent [cdsLayer]="1">
<ng-container *ngIf="vars.isDelete">
{{ 'dashboardManagement.widgets.deleteDescription' | translate }}</ng-container
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {
DropdownModule,
IconModule,
InputModule,
LayerModule,
ModalModule,
NotificationModule,
} from 'carbon-components-angular';
Expand Down Expand Up @@ -65,6 +66,7 @@ import {WidgetConfigurationContainerComponent} from './components/widget-configu
IconModule,
WidgetTranslatePipeModule,
CarbonListModule,
LayerModule,
],
exports: [],
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import {DataSourceSpecification} from '../../models';
import {CaseCountConfigurationComponent} from './components';
import {CONDITIONS_HELPER_TEXTS} from '../shared';

export const caseCountDataSourceSpecification: DataSourceSpecification = {
dataSourceKey: 'case-count',
Expand All @@ -35,8 +36,7 @@ export const caseCountDataSourceSpecification: DataSourceSpecification = {
operator: 'Operator',
value: 'Wert',
conditions: 'Bedingungen',
conditionsHelperText:
"Geben Sie optionale Bedingungen zum Abrufen der Anzahl der Fälle für den ausgewählten Falltyp an. Zum Beispiel: 'case:createdBy', 'Gleich', '[email protected]'. Zum Vergleichen mit leeren Werten kann als Wert '${null}' eingegeben werden. Zum Vergleichen mit dem aktuellen Datum kann als Wert '${localDateTimeNow}' eingegeben werden. Damit wird beispielsweise auch folgende Logik unterstützt: '${localDateTimeNow.minusWeeks(2)}'.",
conditionsHelperText: `Geben Sie optionale Bedingungen zum Abrufen der Anzahl der Fälle für den ausgewählten Falltyp an. ${CONDITIONS_HELPER_TEXTS.DE}`,
addCondition: 'Bedingung hinzufügen',
},
en: {
Expand All @@ -53,8 +53,7 @@ export const caseCountDataSourceSpecification: DataSourceSpecification = {
operator: 'Operator',
value: 'Value',
conditions: 'Conditions',
conditionsHelperText:
"Specify optional conditions for retrieving the number of cases for the selected case type. For example: 'case:createdBy', 'Equal to', '[email protected]'. To compare with empty values, '${null}' can be entered as a value. To compare with the current date, '${localDateTimeNow}' can be entered as a value. This also supports, for example, the following logic: '${localDateTimeNow.minusWeeks(2)}'.",
conditionsHelperText: `Specify optional conditions for retrieving the number of cases for the selected case type. ${CONDITIONS_HELPER_TEXTS.EN}`,
addCondition: 'Add condition',
},
nl: {
Expand All @@ -71,8 +70,7 @@ export const caseCountDataSourceSpecification: DataSourceSpecification = {
operator: 'Operator',
value: 'Waarde',
conditions: 'Condities',
conditionsHelperText:
"Geef optionele condities op voor het ophalen van het aantal zaken voor het geselecteerde zaaktype. Bijvoorbeeld: 'case:createdBy', 'Gelijk aan', '[email protected]'. Voor het vergelijken met lege waardes kan '${null}' ingevuld worden als waarde. Voor het vergelijken met de huidige datum kan '${localDateTimeNow}' ingevuld worden als waarde. Deze ondersteunt ook bijvoorbeeld de volgende logica: '${localDateTimeNow.minusWeeks(2)}'.",
conditionsHelperText: `Geef optionele condities op voor het ophalen van het aantal zaken voor het geselecteerde dossiertype. ${CONDITIONS_HELPER_TEXTS.NL}}`,
addCondition: 'Conditie toevoegen',
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import {DataSourceSpecification} from '../../models';
import {CaseCountsConfigurationComponent} from './components';
import {CONDITIONS_HELPER_TEXTS} from '../shared';

export const caseCountsDataSourceSpecification: DataSourceSpecification = {
dataSourceKey: 'case-counts',
Expand All @@ -35,8 +36,7 @@ export const caseCountsDataSourceSpecification: DataSourceSpecification = {
operator: 'Operator',
value: 'Wert',
counts: 'Anzahllen',
countsHelperText:
"Geben Sie eine oder mehrere Bedingungen für mindestens zwei Anzahllen an. Zum Beispiel: 'case:createdBy', 'Gleich', '[email protected]'. Zum Vergleichen mit leeren Werten kann als Wert '${null}' eingegeben werden. Zum Vergleichen mit dem aktuellen Datum kann als Wert '${localDateTimeNow}' eingegeben werden. Damit wird beispielsweise auch folgende Logik unterstützt: '${localDateTimeNow.minusWeeks(2)}'.",
countsHelperText: `Geben Sie eine oder mehrere Bedingungen für jede anzuzeigende Zählung an. Konfigurieren Sie mindestens zwei Zählungen und mindestens eine Bedingung pro Zählung. ${CONDITIONS_HELPER_TEXTS.DE}`,
addCondition: 'Bedingung hinzufügen',
countTitle: 'Anzahltitel',
},
Expand All @@ -54,8 +54,7 @@ export const caseCountsDataSourceSpecification: DataSourceSpecification = {
operator: 'Operator',
value: 'Value',
counts: 'Counts',
countsHelperText:
"Specify one or more conditions for each count that should be displayed. For example: 'case:createdBy', 'Equal to', '[email protected]'. Configure at least two counts and at least one condition per count.",
countsHelperText: `Specify one or more conditions for each count that should be displayed. Configure at least two counts and at least one condition per count. ${CONDITIONS_HELPER_TEXTS.EN}`,
addCondition: 'Add condition',
countTitle: 'Count title',
},
Expand All @@ -73,8 +72,7 @@ export const caseCountsDataSourceSpecification: DataSourceSpecification = {
operator: 'Operator',
value: 'Waarde',
counts: 'Aantallen',
countsHelperText:
"Geef een of meer condities op voor een minimum van twee aantallen. Bijvoorbeeld: 'case:createdBy', 'Gelijk aan', '[email protected]'. Voor het vergelijken met lege waardes kan '${null}' ingevuld worden als waarde. Voor het vergelijken met de huidige datum kan '${localDateTimeNow}' ingevuld worden als waarde. Deze ondersteunt ook bijvoorbeeld de volgende logica: '${localDateTimeNow.minusWeeks(2)}'.",
countsHelperText: `Geef een of meer condities op voor elk aantal dat moet worden weergegeven. Configureer minimaal twee aantallen en minimaal één conditie per aantal. ${CONDITIONS_HELPER_TEXTS.NL}`,
addCondition: 'Conditie toevoegen',
countTitle: 'Aantaltitel',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
</p>

@for (_ of queryItemsList$ | async; track $index; let i = $index) {
<cds-tile class="count-tile" cdsLayer="1">
<div class="count-tile__input">
<cds-tile class="count-tile" [cdsLayer]="1">
<div class="count-tile__input" [cdsLayer]="0">
<v-input
[title]="'countTitle' | widgetTranslate: dataSourceKey | async"
[margin]="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import {DataSourceSpecification} from '../../models';
import {CaseGroupByConfigurationComponent} from './components';
import {CONDITIONS_HELPER_TEXTS} from '../shared';

export const caseGroupByDataSourceSpecification: DataSourceSpecification = {
dataSourceKey: 'case-group-by',
Expand All @@ -36,8 +37,7 @@ export const caseGroupByDataSourceSpecification: DataSourceSpecification = {
operator: 'Operator',
value: 'Wert',
conditions: 'Bedingungen',
conditionsHelperText:
"Geben Sie optionale Bedingungen zum Abrufen der Gruppierung für den ausgewählten Falltyp an. Zum Beispiel: 'case:createdBy', 'Nicht gleichzusetzen mit', '[email protected]'.",
conditionsHelperText: `Geben Sie optionale Bedingungen an, um die Gruppierung für den ausgewählten Falltyp abzurufen. ${CONDITIONS_HELPER_TEXTS.DE}`,
addCondition: 'Bedingung hinzufügen',
enum: 'Anzeige der Werte',
enumHelperText:
Expand All @@ -60,8 +60,7 @@ export const caseGroupByDataSourceSpecification: DataSourceSpecification = {
operator: 'Operator',
value: 'Value',
conditions: 'Conditions',
conditionsHelperText:
"Specify optional conditions for retrieving the grouping for the selected case type. For example: 'case:createdBy', 'Not equal to', '[email protected]'. To compare with empty values, '${null}' can be entered as a value. To compare with the current date, '${localDateTimeNow}' can be entered as a value. This also supports, for example, the following logic: '${localDateTimeNow.minusWeeks(2)}'.",
conditionsHelperText: `Specify optional conditions for retrieving the grouping for the selected case type. ${CONDITIONS_HELPER_TEXTS.EN}`,
addCondition: 'Add condition',
enum: 'Display of values',
enumHelperText:
Expand All @@ -84,8 +83,7 @@ export const caseGroupByDataSourceSpecification: DataSourceSpecification = {
operator: 'Operator',
value: 'Waarde',
conditions: 'Condities',
conditionsHelperText:
"Geef optionele condities op voor het ophalen van de groepering voor het geselecteerde dossiertype. Bijvoorbeeld: 'case:createdBy', 'Niet gelijk aan', '[email protected]'. Voor het vergelijken met lege waardes kan '${null}' ingevuld worden als waarde. Voor het vergelijken met de huidige datum kan '${localDateTimeNow}' ingevuld worden als waarde. Deze ondersteunt ook bijvoorbeeld de volgende logica: '${localDateTimeNow.minusWeeks(2)}'.",
conditionsHelperText: `Geef optionele condities op voor het ophalen van de groepering voor het geselecteerde dossiertype. ${CONDITIONS_HELPER_TEXTS.NL}`,
addCondition: 'Conditie toevoegen',
enum: 'Weergave van waardes',
enumHelperText:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright 2015-2024 Ritense BV, the Netherlands.
*
* Licensed under EUPL, Version 1.2 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

const CONDITIONS_HELPER_TEXTS = {
EN: "For example: 'case:createdBy', 'Not equal to', '[email protected]'. To compare against empty values, you can use '${null}' as a value. To compare with the current date, use '${localDateTimeNow}' as a value. Additionally, logic such as '${localDateTimeNow.minusWeeks(2)}' is supported. The placeholders '${currentUserId}', '${currentUserEmail}', and '${currentUserIdentifier}' enable the display of personalized information for the current dashboard user.",
NL: 'Bijvoorbeeld: ‘case:createdBy’, ‘Not equal to’, ‘[email protected]’. Om te vergelijken met lege waarden, kun je ‘${null}’ gebruiken als waarde. Om te vergelijken met de huidige datum, gebruik je ‘${localDateTimeNow}’ als waarde. Hier wordt logica zoals ‘${localDateTimeNow.minusWeeks(2)}’ ondersteund. De placeholders ‘${currentUserId}’, ‘${currentUserEmail}’ en ‘${currentUserIdentifier}’ maken het mogelijk om gepersonaliseerde informatie weer te geven voor de huidige dashboardgebruiker.',
DE: 'Zum Beispiel: ‘case:createdBy’, ‘Not equal to’, ‘[email protected]’. Um mit leeren Werten zu vergleichen, kann ‘${null}’ als Wert verwendet werden. Um mit dem aktuellen Datum zu vergleichen, kann ‘${localDateTimeNow}’ als Wert verwendet werden. Zusätzlich wird Logik wie ‘${localDateTimeNow.minusWeeks(2)}’ unterstützt. Die Platzhalter ‘${currentUserId}’, ‘${currentUserEmail}’ und ‘${currentUserIdentifier}’ ermöglichen die Anzeige personalisierter Informationen für den aktuellen Dashboard-Benutzer.',
};

export {CONDITIONS_HELPER_TEXTS};
17 changes: 17 additions & 0 deletions projects/valtimo/dashboard/src/lib/data-sources/shared/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright 2015-2024 Ritense BV, the Netherlands.
*
* Licensed under EUPL, Version 1.2 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

export * from './conditions';

0 comments on commit ac30934

Please sign in to comment.