new feature: Error code 507 will return if you want to delete a loan that has not been returned
This commit is contained in:
@@ -84,6 +84,14 @@ export const MyLoansPage = () => {
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
if (res.status === 507) {
|
||||
setMsgStatus("error");
|
||||
setMsgTitle(t("error"));
|
||||
setMsgDescription(t("error-deleting-loan-507"));
|
||||
setIsMsg(true);
|
||||
return;
|
||||
}
|
||||
|
||||
setMsgStatus("error");
|
||||
setMsgTitle(t("error"));
|
||||
setMsgDescription(t("error-deleting-loan"));
|
||||
|
||||
@@ -93,5 +93,6 @@
|
||||
"try-naas": "Klick mich",
|
||||
"naas-error": "Fehler mit no-as-a-service",
|
||||
"naas-error-desc": "Ein Fehler ist beim Kommunizieren mit no-as-a-service aufgetreten.",
|
||||
"naas-header": "Eine gute Möglichkeit, nein zu sagen..."
|
||||
"naas-header": "Eine gute Möglichkeit, nein zu sagen...",
|
||||
"error-deleting-loan-507": "Die Ausleihe kann nicht gelöscht werden, da sie noch nicht zurückgegeben wurde."
|
||||
}
|
||||
@@ -93,5 +93,6 @@
|
||||
"try-naas": "Click me",
|
||||
"naas-error": "Error with no-as-a-service",
|
||||
"naas-error-desc": "An error occurred while communicating with no-as-a-service.",
|
||||
"naas-header": "A good way to say no..."
|
||||
"naas-header": "A good way to say no...",
|
||||
"error-deleting-loan-507": "The loan cannot be deleted because it has not been returned yet."
|
||||
}
|
||||
Reference in New Issue
Block a user