diff --git a/Clean Up Forms/FormData.xlsx b/Clean Up Forms/FormData.xlsx new file mode 100644 index 0000000..f4ab5ff Binary files /dev/null and b/Clean Up Forms/FormData.xlsx differ diff --git a/reinbursementform.html b/reinbursementform.html new file mode 100644 index 0000000..07b2039 --- /dev/null +++ b/reinbursementform.html @@ -0,0 +1,58 @@ + + + + + + + + Reinbursement Form + + + + + + +
+ + +
+

+ This standardizes all of our reciepts that we recieve and logs them away so that we can easily get the money you spent on the club back to you. +

+

Please put the amount on the reciept we will split the bill on food for you no need to go through mental gymnatics

+
+

Name (Last name if there is someone who shares your name)

+ +
+ +
+

Final Total on reciept $(CAD)

+ +
+ +
+

Reason (optional)

+ +
+ +
+

Picture or PDF of reciept

+ +
+ +
+ +
+
+ + +
+ + + + + diff --git a/subfolder1/subfolder2/JSconertToStandardForm.js b/subfolder1/subfolder2/JSconertToStandardForm.js new file mode 100644 index 0000000..3f330d0 --- /dev/null +++ b/subfolder1/subfolder2/JSconertToStandardForm.js @@ -0,0 +1,76 @@ +//import fs from 'fs'; + +const submitButton = document.getElementById("submitButton"); +const inputBoxes = document.getElementsByTagName("input"); + + +const buttonClick = async (event) => { + submitButton.disabled = true; + submitButton.innerText = "Working..."; + submitButton.style.backgroundColor = 'grey'; + submitButton.classList.add('disabled'); + submitButton.style.cursor = 'not-allowed'; + + var inputValues = []; + for (let key in inputBoxes) { + if (inputBoxes[key].value == undefined) { + break; + } + inputValues.push(inputBoxes[key].value); + } + + let date = new Date(); + var month = (date.getMonth() + 1).toString(); + var day = date.getDate().toString(); + var year = date.getFullYear().toString(); + var currentDate = month + day + year; + let fileWrite = inputValues[0] + currentDate; + let fileExt = getFileExtension(inputValues[3]); + fileWrite += "." + fileExt; + inputValues.push(fileWrite); + console.log( inputValues) + + //fake delay + + await Fakedelay(5000) + console.log("fake delay"); + submitButton.disabled = false; + submitButton.innerText = "Submit"; + submitButton.style.backgroundColor = 'green'; + submitButton.style.cursor = ''; + isButtonDisabled = false; + // Need to send to the synology server through the back end... +}; + + + +function getFileExtension(fileName) { + const lastDotIndex = fileName.lastIndexOf("."); + if (lastDotIndex === -1 || lastDotIndex === fileName.length - 1) { + return "bad"; // No extension found or the dot is at the end of the filename + } + return fileName.slice(lastDotIndex + 1); + } + +const sendForm = async (toSend) => { + if (1) { + return 1; + } + else { + const res = await fetch("http://jsonplaceholder.typicode.com/todos", { + method: "POST", + body: JSON.stringify({ + stuff: 1, + lots: "of stuff" + }), + headers: { + "Optional": "no" + } + }); + } + //to do finish this off so that it works +} + +function Fakedelay(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); + } \ No newline at end of file diff --git a/subfolder1/subfolder2/style.css b/subfolder1/subfolder2/style.css new file mode 100644 index 0000000..9b0c199 --- /dev/null +++ b/subfolder1/subfolder2/style.css @@ -0,0 +1,79 @@ +body { + display: flex; + flex-direction: column; + border: 0px; + margin: 0px; +} +nav { + flex-direction: row; +} + +nav h1 { + flex: 1; + text-align: center; + font-size: xx-large; + font-weight: normal; +} + +aside { + flex-grow: 1; + height: 100px; + flex-direction: row; +} + +article { + width: 70%; + flex-direction: row; +} + +article div { + padding-bottom: 5%; +} + +h4 { + padding-left: 1%; + padding-bottom: 10px; + margin: 0px; + font-weight: normal; + font-size: larger; +} + +input { + padding-top: 0px; + font-size: x-large; +} + +button { + font-size: xx-large; + justify-content: center; +} + +footer { + display: flex; + padding-top: 2%; + justify-content: center; +} +.MainContent { + display: flex; + flex-direction: row; + justify-content: center; +} + +#rightSide { + justify-content: end; +} + +#fileInput { + font-size: large; +} + +#buttonDiv { + display: flex; + justify-content: center; +} + +#submitButton { + background-color: green; + padding: 1%; + border-radius: 15%; +}