From a9767edbd503ef4f02a640cc6469fbdc422401b7 Mon Sep 17 00:00:00 2001
From: Rhys Nute <nuterd@cardiff.ac.uk>
Date: Mon, 4 Dec 2023 14:19:37 +0000
Subject: [PATCH] Finished part one

---
 src/main/resources/static/css/qrstyle.css      | 2 ++
 src/main/resources/static/qr-scanner.html      | 2 ++
 src/main/resources/static/scripts/qr-script.js | 5 ++++-
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/main/resources/static/css/qrstyle.css b/src/main/resources/static/css/qrstyle.css
index 3889336f..b0c851a9 100644
--- a/src/main/resources/static/css/qrstyle.css
+++ b/src/main/resources/static/css/qrstyle.css
@@ -1,4 +1,6 @@
 /*style sheet for QR code - R Nute*/
+/*Modified from (https://www.geeksforgeeks.org/create-a-qr-code-scanner-or-reader-in-html-css-javascript/)*/
+
 body {
     display: flex;
     justify-content: center;
diff --git a/src/main/resources/static/qr-scanner.html b/src/main/resources/static/qr-scanner.html
index 34a00ba6..70717775 100644
--- a/src/main/resources/static/qr-scanner.html
+++ b/src/main/resources/static/qr-scanner.html
@@ -1,4 +1,6 @@
 <!--setup html page for QR codes - R Nute-->
+<!--Modified from (https://www.geeksforgeeks.org/create-a-qr-code-scanner-or-reader-in-html-css-javascript/)-->
+
 <!DOCTYPE html>
 <html lang="en">
 <head>
diff --git a/src/main/resources/static/scripts/qr-script.js b/src/main/resources/static/scripts/qr-script.js
index 92ab7ddc..8a80c70e 100644
--- a/src/main/resources/static/scripts/qr-script.js
+++ b/src/main/resources/static/scripts/qr-script.js
@@ -1,5 +1,5 @@
 //qr-script file - R Nute
-
+//Modified from (https://www.geeksforgeeks.org/create-a-qr-code-scanner-or-reader-in-html-css-javascript/)
 function domReady(fn){
     if (
         document.readyState === "complete" ||
@@ -14,6 +14,9 @@ domReady(function (message){
     //if QR code found
     function onScanSuccess(decodeText, decodeResult){
         alert("You have collected: " + decodeText, decodeResult);
+        // Open the result, what methods are available through the HTML5 Qr scanner node package?
+        // Record the result, see above.
+        // Get user and tie to user account, intergrate with database, retrieving and storing under user info.
     }
     let htmlscanner = new Html5QrcodeScanner(
     "qr-code-reader",
-- 
GitLab