Skip to content

Commit

Permalink
Merge branch 'next-minor' into story/modeler-extension
Browse files Browse the repository at this point in the history
# Conflicts:
#	package-lock.json
#	projects/valtimo/process-link/src/lib/components/plugin-action-configuration/plugin-action-configuration.component.ts
#	projects/valtimo/process-link/src/lib/components/select-url/select-url.component.ts
  • Loading branch information
mbritense committed Nov 28, 2024
2 parents 4129e3d + 15617a5 commit be2ac49
Show file tree
Hide file tree
Showing 79 changed files with 559 additions and 251 deletions.
12 changes: 11 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,36 @@
<!-- Please consider the following points before creating a pull request. -->

### Describe the changes

Link to the related Github issue:

<!-- Please add any additional comments that might be relevant for reviewing this pull request -->
<!-- Why did you choose to make these changes? Were there any trade-offs you had to consider? -->
<!-- Note: add an empty line with a > to use multiple lines -->

**Relevant comments:**

>
### Breaking changes

<!-- Valtimo aims to comply with the SemVer specification. -->
<!-- Breaking changes are only allowed in the `next-major` branch. -->

- [ ] The contribution only contains changes that are not breaking.

### Documentation

<!-- Release notes should be available in the Valtimo documentation. -->

- [ ] Release notes have been written for these changes.

Link to the pull request in the [Valtimo documentation repository](https://github.com/valtimo-platform/valtimo-documentation):
Link to the pull request in the
[Valtimo documentation repository](https://github.com/valtimo-platform/valtimo-documentation):

>
New features or changes that have been introduced have been documented.

- [ ] Yes
- [ ] Not applicable
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export class InputComponent implements OnInit, OnChanges, OnDestroy {
@Input() public carbonTheme = 'g10';
@Input() public placeholder = '';
@Input() public dataTestId?: string;
@Input() public trim: boolean = false;

@Output() public valueChange: EventEmitter<any> = new EventEmitter();

Expand All @@ -85,6 +86,9 @@ export class InputComponent implements OnInit, OnChanges, OnDestroy {
}

public onValueChange(value: any): void {
if (this.trim) {
value = value?.trim();
}
this.inputValue$.next(value);
}

Expand Down
9 changes: 9 additions & 0 deletions projects/valtimo/config/assets/core/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
"title": "Keine Cases gefunden"
}
},
"noAccess": {
"description": "Sie haben keinen Zugriff auf diesen Fall",
"title": "Zugriff verweigert"
},
"pagination": {
"itemsPerPage": "Cases pro Seite",
"totalItem": "{{start}}-{{end}} von {{total}} Case",
Expand Down Expand Up @@ -160,6 +164,11 @@
"cancel": "Absagen",
"delete": "Löschen"
},
"delete": {
"delete": "Case löschen",
"description": "Möchten Sie diesen Case und alle zugehörigen Informationen wirklich löschen? Diese Aktion kann nicht rückgängig gemacht werden.",
"confirm": "Löschen"
},
"formio": {
"noFormSpecified": "Für diese Registerkarte wurde keine Formulardefinition angegeben.",
"formNotFound": "Die Formulardefinition '{{formDefinitionName}}' konnte nicht gefunden werden."
Expand Down
9 changes: 9 additions & 0 deletions projects/valtimo/config/assets/core/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
"title": "No cases found"
}
},
"noAccess": {
"description": "You do not have access to this case",
"title": "Access denied"
},
"pagination": {
"itemsPerPage": "Cases per page",
"totalItem": "{{start}}-{{end}} of {{total}} case",
Expand Down Expand Up @@ -160,6 +164,11 @@
"cancel": "Cancel",
"delete": "Delete"
},
"delete": {
"delete": "Delete case",
"description": "Are you sure you want to delete this case and all related information? This action cannot be undone.",
"confirm": "Delete"
},
"formio": {
"noFormSpecified": "No form definition has been specified for this tab.",
"formNotFound": "The form definition '{{formDefinitionName}}' could not be found."
Expand Down
9 changes: 9 additions & 0 deletions projects/valtimo/config/assets/core/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
"title": "Geen dossiers gevonden"
}
},
"noAccess": {
"description": "Je hebt geen toegang tot dit dossier",
"title": "Geen toegang"
},
"pagination": {
"itemsPerPage": "Dossiers per pagina",
"totalItem": "{{start}}-{{end}} van {{total}} dossier",
Expand Down Expand Up @@ -160,6 +164,11 @@
"cancel": "Annuleren",
"delete": "Verwijderen"
},
"delete": {
"delete": "Dossier verwijderen",
"description": "Weet u zeker dat u dit dossier en alle gerelateerde informatie wilt verwijderen? Deze actie kan niet ongedaan worden gemaakt.",
"confirm": "Verwijderen"
},
"formio": {
"noFormSpecified": "Voor dit tabblad is geen formulierdefinitie opgegeven.",
"formNotFound": "De formulierdefinitie '{{formDefinitionName}}' kan niet worden gevonden."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,13 @@ <h3 cdsModalHeaderHeading>

<div class="form__element">
<cds-label
[helperText]="'dashboardManagement.widgets.form.urlHelperText' | translate"
[invalidText]="'dashboardManagement.widgets.form.urlHelperText' | translate"
[invalid]="url.dirty && url.invalid"
[helperText]="'dashboardManagement.widgets.form.urlHelperText' | translate"
[invalidText]="'dashboardManagement.widgets.form.urlHelperText' | translate"
[invalid]="url.dirty && url.invalid"
>
{{ 'dashboardManagement.widgets.form.url' | translate }}

<input
cdsText
formControlName="url"
[invalid]="url.dirty && url.invalid"
/>
<input cdsText formControlName="url" [invalid]="url.dirty && url.invalid" />
</cds-label>
</div>
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@
<ng-container *ngIf="widgetConfigurations$ | async as widgetConfigurations">
<ng-container *ngFor="let config of widgetConfigurations">
<div #widgetConfiguration [id]="config.key" class="widget-configuration">
<div (click)="navigateToRoute(config, $event)"
[ngClass]="{
'widget-configuration-content-clickable': (config.url),
}"
class="widget-configuration-content">
<div
(click)="navigateToRoute(config, $event)"
[ngClass]="{
'widget-configuration-content-clickable': config.url,
}"
class="widget-configuration-content"
>
<ng-container #widgetConfigurationContent></ng-container>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,13 @@ export class WidgetDashboardContentComponent implements AfterViewInit, OnDestroy
this._subscriptions?.unsubscribe();
}

public navigateToRoute(widgetConfiguration: DashboardWidgetConfiguration, event: MouseEvent): void {
public navigateToRoute(
widgetConfiguration: DashboardWidgetConfiguration,
event: MouseEvent
): void {
if (widgetConfiguration.url) {
event.preventDefault();
this.router.navigateByUrl(widgetConfiguration.url)
this.router.navigateByUrl(widgetConfiguration.url);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export interface ProcessDocumentDefinitionSearch {
startableByUser?: boolean;
canInitializeDocument?: boolean;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,10 @@ export class DocumentService {
return this.http.put<DocumentResult>(`${this.valtimoEndpointUri}v1/document`, document);
}

public deleteDocument(documentId: string): Observable<void> {
return this.http.delete<void>(`${this.valtimoEndpointUri}v1/document/${documentId}`);
}

// ProcessDocument-calls
public getProcessDocumentDefinitions(): Observable<ProcessDocumentDefinition> {
return this.http.get<ProcessDocumentDefinition>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
*ngIf="{
noTabsConfigured: noTabsConfigured$ | async,
showTaskList: showTaskList$ | async,
showNoAccess: showNoAccess$ | async,
dossierDetailLayout: dossierDetailLayout$ | async,
openTaskAndProcessLinkInModal: openTaskAndProcessLinkInModal$ | async,
taskAndProcessLinkOpenedInPanel: taskAndProcessLinkOpenedInPanel$ | async,
Expand All @@ -67,6 +68,14 @@
<cds-loading></cds-loading>
</div>

<valtimo-no-results
*ngIf="tabContentObs.showNoAccess"
description="{{ 'dossier.noAccess.description' | translate }}"
title="{{ 'dossier.noAccess.title' | translate }}"
illustration="valtimo-layout/img/emptystate-not-authorised.svg"
>
</valtimo-no-results>

<valtimo-no-results
*ngIf="tabContentObs.noTabsConfigured"
[description]="'dossier.tabs.noResultsDescription' | translate"
Expand Down Expand Up @@ -178,7 +187,28 @@
[disabled]="(isAssigning$ | async) || (isAssignedToCurrentUser$ | async)"
(click)="claimAssignee()"
>
<span>{{ 'dossier.claimAssigneeCase' | translate }}</span>
{{ 'dossier.claimAssigneeCase' | translate }}
</cds-overflow-menu-option>
</ng-template>

<ng-template #unassignButton let-canHaveAssignee="canHaveAssignee" let-assigneeId="assigneeId">
<cds-overflow-menu-option
*ngIf="canHaveAssignee"
[disabled]="!assigneeId"
(selected)="unassignAssignee()"
>
{{ 'assignDocument.remove' | translate }}
</cds-overflow-menu-option>
</ng-template>

<ng-template #deleteButton let-canDelete="canDelete">
<cds-overflow-menu-option
*ngIf="canDelete"
[disabled]="(isDeleting$ | async)"
(click)="deleteDocument()"
type="danger"
>
{{ 'dossier.delete.delete' | translate }}
</cds-overflow-menu-option>
</ng-template>

Expand All @@ -195,6 +225,15 @@
</button>
</ng-template>

<valtimo-confirmation-modal
confirmButtonTextTranslationKey="dossier.delete.confirm"
confirmButtonType="danger"
contentTranslationKey="dossier.delete.description"
[showModalSubject$]="showDeleteModal$"
titleTranslationKey="dossier.delete.delete"
(confirmEvent)="onConfirmDelete()"
></valtimo-confirmation-modal>

<ng-container renderInPageHeader [fullWidth]="true">
<ng-template>
<div
Expand All @@ -205,6 +244,7 @@
canAssign: canAssign$ | async,
canClaim: canClaim$ | async,
canHaveAssignee: canHaveAssignee$ | async,
canDelete: canDelete$ | async,
document: document$ | async,
caseStatus: caseStatus$ | async,
} as obs"
Expand Down Expand Up @@ -236,7 +276,7 @@
<div class="buttons-container">
<cds-overflow-menu
[ngClass]="{'--compact': compactMode$ | async}"
*ngIf="obs.canHaveAssignee"
*ngIf="obs.canHaveAssignee || obs.canDelete"
flip="true"
[offset]="(compactMode$ | async) ? {y: 48, x: -4} : {y: 48, x: 4}"
class="overflow-button assign-overflow"
Expand All @@ -248,9 +288,20 @@
"
>
</ng-container>
<cds-overflow-menu-option (selected)="unassignAssignee()" [disabled]="!obs.assigneeId">
{{ 'assignDocument.remove' | translate }}
</cds-overflow-menu-option>
<ng-container
*ngTemplateOutlet="
unassignButton;
context: {canHaveAssignee: obs.canHaveAssignee, assigneeId: obs.assigneeId}
"
>
</ng-container>
<ng-container
*ngTemplateOutlet="
deleteButton;
context: {canDelete: obs.canDelete}
"
>
</ng-container>
</cds-overflow-menu>

<cds-overflow-menu
Expand Down
Loading

0 comments on commit be2ac49

Please sign in to comment.