From 6d98730f4a9560abdac46bccbfc4572cd6280cd6 Mon Sep 17 00:00:00 2001 From: "afiq.hamzah" Date: Sun, 14 Aug 2022 15:48:28 +0800 Subject: [PATCH] Use sweet alert to show error message on card reader. not correctly enter the card --- public/js/mykad-reader.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/public/js/mykad-reader.js b/public/js/mykad-reader.js index 7b111c7..d357e2b 100644 --- a/public/js/mykad-reader.js +++ b/public/js/mykad-reader.js @@ -44,7 +44,12 @@ let handleMyKadReader = () => { form_search_noic.submit(); } }) - .catch(error => console.log(error)); + .catch(error => { + Swal.fire({ + icon: 'error', + title: error, + }); + }); };