From 558a4118ac1d6bc9d7848cf29822d399a4e16411 Mon Sep 17 00:00:00 2001 From: Valdis Iljuconoks Date: Wed, 7 Aug 2024 10:35:49 +0300 Subject: [PATCH] added error display if add resource failed --- .../4D5A2189D188417485BF6C70546D34A1/Pages/AdminUI.cshtml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/DbLocalizationProvider.AdminUI.AspNetCore/Areas/4D5A2189D188417485BF6C70546D34A1/Pages/AdminUI.cshtml b/src/DbLocalizationProvider.AdminUI.AspNetCore/Areas/4D5A2189D188417485BF6C70546D34A1/Pages/AdminUI.cshtml index fa9ed52..1b0db8b 100644 --- a/src/DbLocalizationProvider.AdminUI.AspNetCore/Areas/4D5A2189D188417485BF6C70546D34A1/Pages/AdminUI.cshtml +++ b/src/DbLocalizationProvider.AdminUI.AspNetCore/Areas/4D5A2189D188417485BF6C70546D34A1/Pages/AdminUI.cshtml @@ -867,7 +867,11 @@ addResource() { this.model.showAddModal = false; - axios.post('api/service/add', this.model.currentResource); + axios + .post('api/service/add', this.model.currentResource) + .catch(function(error) { + this.app.model.error = error.message; + }); this.loadData(); },