Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
camielb committed Jan 13, 2025
2 parents aef17ba + 4bc4978 commit 4bea523
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ jobs:
git config --local user.name "GitHub Action"
git add publiccode.yaml
git commit -m "${{ github.workflow }}" || echo "No changes to commit"
git push
git push --force
trigger-provision:
needs: [push-docker-image]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
<!--
~ SPDX-FileCopyrightText: 2022 Atos
~ SPDX-FileCopyrightText: 2022 Atos, 2024 Lifely
~ SPDX-License-Identifier: EUPL-1.2+
-->

<h1 mat-dialog-title>{{'title.fout' | translate}}</h1>
<div mat-dialog-title>
<h3>{{"dialoog.titel.fout" | translate}}</h3>
<button mat-icon-button (click)="close()">
<mat-icon>close</mat-icon>
</button>
</div>

<div mat-dialog-content>
<p *ngIf="data.error">{{data.error}}</p>
<p *ngIf="data.details">{{data.details}}</p>
Expand All @@ -13,8 +19,9 @@ <h1 mat-dialog-title>{{'title.fout' | translate}}</h1>
</p>
</ng-container>
</div>

<div mat-dialog-actions>
<button autofocus mat-button (click)="close()">
<button autofocus mat-raised-button (click)="close()">
{{'actie.sluiten' | translate}}
</button>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* SPDX-FileCopyrightText: 2024 Lifely
* SPDX-License-Identifier: EUPL-1.2+
*/

.mat-mdc-dialog-actions {
padding: var(--mat-dialog-with-actions-content-padding, 20px 24px);
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { MaterialModule } from "../../shared/material/material.module";
@Component({
standalone: true,
templateUrl: "fout-detailed-dialog.component.html",
styleUrls: ["./fout-detailed-dialog.component.less"],
imports: [TranslateModule, MaterialModule, NgIf, AsyncPipe, NgForOf],
})
export class FoutDetailedDialogComponent {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
<!--
~ SPDX-FileCopyrightText: 2022 Atos
~ SPDX-FileCopyrightText: 2024 Lifely
~ SPDX-License-Identifier: EUPL-1.2+
-->

<h1 mat-dialog-title>{{'title.fout' | translate}}</h1>
<div mat-dialog-title>
<h3>{{"dialoog.titel.fout" | translate}}</h3>
<button mat-icon-button (click)="close()">
<mat-icon>close</mat-icon>
</button>
</div>

<div mat-dialog-content>
<div>{{data}}</div>
</div>
<div mat-dialog-actions>
<button autofocus mat-button (click)="close()">
<button autofocus mat-raised-button (click)="close()">
{{'actie.sluiten' | translate}}
</button>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* SPDX-FileCopyrightText: 2024 Lifely
* SPDX-License-Identifier: EUPL-1.2+
*/

.mat-mdc-dialog-actions {
padding: var(--mat-dialog-with-actions-content-padding, 20px 24px);
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022 Atos
* SPDX-FileCopyrightText: 2022 Atos, 2024 Lifely
* SPDX-License-Identifier: EUPL-1.2+
*/

Expand All @@ -8,6 +8,7 @@ import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog";

@Component({
templateUrl: "fout-dialog.component.html",
styleUrls: ["./fout-dialog.component.less"],
})
export class FoutDialogComponent {
constructor(
Expand Down
23 changes: 13 additions & 10 deletions src/main/app/src/app/fout-afhandeling/fout-afhandeling.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,17 @@ export class FoutAfhandelingService {

public httpErrorAfhandelen(err: HttpErrorResponse): Observable<never> {
if (err.status === 400) {
return this.openFoutDialog(this.translate.instant(err.error.message));
return this.openFoutDialog(
this.translate.instant(
err.error.message || err.message || "dialoog.body.error.technisch",
),
);
}

this.foutmelding = err.message;
if (err.error instanceof ErrorEvent) {
// client-side error
this.foutmelding = `Er is een fout opgetreden`;
this.foutmelding = this.translate.instant("dialoog.body.error.fout");
this.bericht = err.error.message;
this.router.navigate(["/fout-pagina"]);
} else if (err.status === 0 && err.url.startsWith("/rest/")) {
Expand All @@ -133,23 +138,21 @@ export class FoutAfhandelingService {
window.location.reload();
return;
}
this.foutmelding = "Helaas! Je bent uitgelogd.";
this.foutmelding = this.translate.instant("dialoog.body.error.loggedout");
this.bericht = "";
this.router.navigate(["/fout-pagina"]);
} else {
let errorDetail: string;
if (err.error) {
errorDetail = err.error.exception;
} else {
errorDetail = err.message;
}
const errorDetail: string = err.error.exception || err.message;

// only show server error texts in case of a server error (500 family of errors)
// or in case of a 403 Forbidden error
const showServerErrorTexts = err.status >= 500 || err.status === 403;

// show error in context and do not redirect to error page
return this.openFoutDetailedDialog(
this.translate.instant(err.error.message),
this.translate.instant(
err.error.message || err.message || "dialoog.body.error.technisch",
),
errorDetail,
showServerErrorTexts,
);
Expand Down
2 changes: 1 addition & 1 deletion src/main/app/src/app/shared/dialog/dialog.component.less
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022 Atos
* SPDX-FileCopyrightText: 2022 Atos, 2024 Lifely
* SPDX-License-Identifier: EUPL-1.2+
*/

Expand Down
10 changes: 7 additions & 3 deletions src/main/app/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"title.documenten.ontkoppeldeDocumenten": "Unlinked documents",
"title.documenten.inboxDocumenten": "Inbox documents",
"title.formioformulieren": "Form.io forms",
"title.fout": "Error",
"title.formulierdefinities": "Form definitions",
"title.formulierdefinitie.add": "Add form definition",
"title.formulierdefinitie.edit": "Edit Form definition",
Expand Down Expand Up @@ -910,7 +909,12 @@
"zoekVeld.TAAK_TOELICHTING": "Taks explanation",
"zoekVeld.DOCUMENT_TITEL": "Document title",
"zoekVeld.DOCUMENT_BESCHRIJVING": "Document description",
" 10 ": ">>--> TODO <--<<",
" 10 ": ">>--> Dialogen <--<<",
"dialoog.titel.fout": "An error has occurred",
"dialoog.body.error.fout": "An error has occurred.",
"dialoog.body.error.loggedout": "Unfortunately! You have been logged out.",
"dialoog.body.error.technisch": "A technical error has occurred. Please contact the administrator.",
" 11 ": ">>--> TODO <--<<",
"gegevens": "Details",
"persoonsgegevens": "Personal data",
"bedrijfsgegevens": "Company details",
Expand Down Expand Up @@ -941,7 +945,7 @@
"besluittype": "Decision type",
"informatieobjecttype": "Informationobject type",
"zaakafhandelparameters": "Case handling parameters",
" 11 ": ">>--> Zaak formulieren <--<<",
" 12 ": ">>--> Zaak formulieren <--<<",
"melding_klein_evenement.evenement": "Event information",
"melding_klein_evenement.aanvrager.gegevens": "Requester details",
"naamEvenement": "Event name",
Expand Down
10 changes: 7 additions & 3 deletions src/main/app/src/assets/i18n/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"title.documenten.ontkoppeldeDocumenten": "Ontkoppelde documenten",
"title.documenten.inboxDocumenten": "Inbox documenten",
"title.formioformulieren": "Form.io formulieren",
"title.fout": "Fout",
"title.formulierdefinities": "Formulier definities",
"title.formulierdefinitie.add": "Formulier definitie toevoegen",
"title.formulierdefinitie.edit": "Formulier definitie bewerken",
Expand Down Expand Up @@ -910,7 +909,12 @@
"zoekVeld.TAAK_TOELICHTING": "Taak toelichting",
"zoekVeld.DOCUMENT_TITEL": "Documenttitel",
"zoekVeld.DOCUMENT_BESCHRIJVING": "Document beschrijving",
" 10 ": ">>--> TODO <--<<",
" 10 ": ">>--> Dialogen <--<<",
"dialoog.titel.fout": "Er is een fout opgetreden",
"dialoog.body.error.fout": "Er is een fout opgetreden.",
"dialoog.body.error.loggedout": "Helaas! Je bent uitgelogd.",
"dialoog.body.error.technisch": "Er is een technische fout opgetreden. Neem contact op met de beheerder.",
" 11 ": ">>--> TODO <--<<",
"gegevens": "Gegevens",
"persoonsgegevens": "Persoonsgegevens",
"bedrijfsgegevens": "Bedrijfsgegevens",
Expand Down Expand Up @@ -941,7 +945,7 @@
"besluittype": "Besluittype",
"informatieobjecttype": "Informatieobjecttype",
"zaakafhandelparameters": "Zaakafhandelparameters",
" 11 ": ">>--> Zaak formulieren <--<<",
" 12 ": ">>--> Zaak formulieren <--<<",
"melding_klein_evenement.evenement": "Gegevens evenement",
"melding_klein_evenement.aanvrager.gegevens": "Gegevens aanvrager",
"naamEvenement": "Naam evenement",
Expand Down

0 comments on commit 4bea523

Please sign in to comment.