From 8e9bf78e5c661589f03fab9f457a886f229fa271 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sun, 21 Jan 2024 19:07:54 -0300 Subject: fix broken build --- packages/aml-backoffice-ui/src/pages/NewFormEntry.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'packages/aml-backoffice-ui/src/pages/NewFormEntry.tsx') diff --git a/packages/aml-backoffice-ui/src/pages/NewFormEntry.tsx b/packages/aml-backoffice-ui/src/pages/NewFormEntry.tsx index 4f9b909e0..ee31ed7a8 100644 --- a/packages/aml-backoffice-ui/src/pages/NewFormEntry.tsx +++ b/packages/aml-backoffice-ui/src/pages/NewFormEntry.tsx @@ -1,4 +1,4 @@ -import { Amounts, TalerExchangeApi, TalerProtocolTimestamp, TranslatedString } from "@gnu-taler/taler-util"; +import { Amounts, HttpStatusCode, TalerExchangeApi, TalerProtocolTimestamp, TranslatedString } from "@gnu-taler/taler-util"; import { LocalNotificationBanner, useLocalNotification, useTranslationContext } from "@gnu-taler/web-util/browser"; import { Fragment, VNode, h } from "preact"; import { useExchangeApiContext } from "../context/config.js"; @@ -54,19 +54,20 @@ export function NewFormEntry({ return; } switch (resp.case) { - case "unauthorized": return notify({ + case HttpStatusCode.Forbidden: + case HttpStatusCode.Unauthorized: return notify({ type: "error", title: i18n.str`Wrong credentials for "${officer.account}"`, description: resp.detail.hint as TranslatedString, debug: resp.detail, }) - case "officer-or-account-not-found": return notify({ + case HttpStatusCode.NotFound: return notify({ type: "error", title: i18n.str`Officer or account not found`, description: resp.detail.hint as TranslatedString, debug: resp.detail, }) - case "officer-disabled-or-recent-decision": return notify({ + case HttpStatusCode.Conflict: return notify({ type: "error", title: i18n.str`Officer disabled or more recent decision was already submitted.`, description: resp.detail.hint as TranslatedString, -- cgit v1.2.3