Compare commits
No commits in common. "dev" and "main" have entirely different histories.
5
.gitignore
vendored
5
.gitignore
vendored
@ -133,8 +133,3 @@ dist
|
|||||||
.yarn/install-state.gz
|
.yarn/install-state.gz
|
||||||
.pnp.*
|
.pnp.*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
edits.txt
|
|
||||||
|
|||||||
@ -17,8 +17,3 @@ Grab the latest version (`ITThermal vX.Y.Z.zip`) from the [Releases section](htt
|
|||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
- Uses [jsPDF](https://rawgit.com/MrRio/jsPDF/master/docs/jsPDF.html) library for PDF generation
|
- Uses [jsPDF](https://rawgit.com/MrRio/jsPDF/master/docs/jsPDF.html) library for PDF generation
|
||||||
|
|
||||||
## Contributors
|
|
||||||
|
|
||||||
- Skylar Grant - Initial Development
|
|
||||||
- Isaac Godin - Testing, Feedback, and bugfixes
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/* ITS Thermal Receipt Printer
|
/* ITS Thermal Receipt Printer
|
||||||
* Developed by Skylar Grant for MCCS ITS
|
* Developed by Skylar Grant for MCCS ITS
|
||||||
*/
|
*/
|
||||||
const version = "1.2.8";
|
const version = "1.2.7";
|
||||||
// #############################################################
|
// #############################################################
|
||||||
// Variables
|
// Variables
|
||||||
// #############################################################
|
// #############################################################
|
||||||
@ -31,9 +31,6 @@ const standard = new FontInfo('Helvetica', 12);
|
|||||||
const standardBold = new FontInfo('Helvetica', 12, 'Bold');
|
const standardBold = new FontInfo('Helvetica', 12, 'Bold');
|
||||||
/** @type {FontInfo} */
|
/** @type {FontInfo} */
|
||||||
const monospace = new FontInfo('Courier', 16, 'Bold');
|
const monospace = new FontInfo('Courier', 16, 'Bold');
|
||||||
/** @type {FontInfo} */
|
|
||||||
const smallBold = new FontInfo('Courier', 12, 'Bold');
|
|
||||||
|
|
||||||
|
|
||||||
// #############################################################
|
// #############################################################
|
||||||
// Strings to use generating the PDF
|
// Strings to use generating the PDF
|
||||||
@ -102,10 +99,6 @@ function tempPasswordHandler() {
|
|||||||
function customNoteHandler() {
|
function customNoteHandler() {
|
||||||
// Grab the form values
|
// Grab the form values
|
||||||
const customNoteDetails = document.getElementById('customNoteTextArea').value;
|
const customNoteDetails = document.getElementById('customNoteTextArea').value;
|
||||||
if(customNoteDetails === "rick"){
|
|
||||||
window.open("https://www.youtube.com/watch?v=dQw4w9WgXcQ", '_blank');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (customNoteDetails.trim() === '') {
|
if (customNoteDetails.trim() === '') {
|
||||||
alert('Please enter some details for the note.');
|
alert('Please enter some details for the note.');
|
||||||
return;
|
return;
|
||||||
@ -170,7 +163,7 @@ function prepTempPassword(password, username) {
|
|||||||
if (username) {
|
if (username) {
|
||||||
if (!(username.toLowerCase().endsWith(strings.global.domain))) username += strings.global.domain;
|
if (!(username.toLowerCase().endsWith(strings.global.domain))) username += strings.global.domain;
|
||||||
lineArray.push(new LineItem(s.unLabel.text, s.unLabel.fontInfo, false));
|
lineArray.push(new LineItem(s.unLabel.text, s.unLabel.fontInfo, false));
|
||||||
lineArray.push(new LineItem(username, smallBold, true));
|
lineArray.push(new LineItem(username, monospace, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
lineArray.push(new LineItem(s.pwLabel.text, s.pwLabel.fontInfo, false));
|
lineArray.push(new LineItem(s.pwLabel.text, s.pwLabel.fontInfo, false));
|
||||||
@ -303,28 +296,6 @@ function printPdf() {
|
|||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function generatePassword(length = 12) {
|
|
||||||
const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+-=[]{}|;:,.<>?";
|
|
||||||
let password = "";
|
|
||||||
|
|
||||||
for (let i = 0; i < length; i++) {
|
|
||||||
const randomIndex = Math.floor(Math.random() * characters.length);
|
|
||||||
password += characters[randomIndex];
|
|
||||||
}
|
|
||||||
|
|
||||||
const textareaElement = document.getElementById("tempPwPassword");
|
|
||||||
textareaElement.value = password;
|
|
||||||
|
|
||||||
try {
|
|
||||||
await navigator.clipboard.writeText(password);
|
|
||||||
console.log('text copied');
|
|
||||||
} catch (err) {
|
|
||||||
console.error('Failed: ', err);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// #############################################################
|
// #############################################################
|
||||||
// Event Listeners
|
// Event Listeners
|
||||||
// #############################################################
|
// #############################################################
|
||||||
@ -343,14 +314,6 @@ document.getElementById('customNoteBtn').addEventListener('click', () => {
|
|||||||
alert(`An error occurred while generating the PDF: ${error.message}`);
|
alert(`An error occurred while generating the PDF: ${error.message}`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
document.getElementById('genPassword').addEventListener('click', () => {
|
|
||||||
try {
|
|
||||||
generatePassword();
|
|
||||||
} catch (error) {
|
|
||||||
alert(`An error occurred while generating the PDF: ${error.message}`);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
document.getElementById('deviceTrackerBtn').addEventListener('click', () => {
|
document.getElementById('deviceTrackerBtn').addEventListener('click', () => {
|
||||||
try {
|
try {
|
||||||
deviceTrackerHandler();
|
deviceTrackerHandler();
|
||||||
|
|||||||
323
src/index.html
323
src/index.html
@ -1,181 +1,164 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>ITS Thermal Printer</title>
|
<title>ITS Thermal Printer</title>
|
||||||
<link rel="icon" type="image/x-icon" href="./assets/images/favicon.ico">
|
<link rel="icon" type="image/x-icon" href="./assets/images/favicon.ico">
|
||||||
</head>
|
</head>
|
||||||
<body class="bg-gray-100 leading-normal tracking-normal dark:bg-gray-900">
|
<body class="bg-gray-100 leading-normal tracking-normal dark:bg-gray-900">
|
||||||
<!-- Logo -->
|
<!-- Logo -->
|
||||||
|
<div class="flex justify-center mt-6">
|
||||||
|
<img src="./assets/images/itslogo_color.png" alt="ITS Logo" class="h-24 w-auto">
|
||||||
|
</div>
|
||||||
|
<!-- Title -->
|
||||||
|
<div class="flex flex-col justify-center mt-6">
|
||||||
|
<h1 class="dark:text-gray-300 text-4xl font-bold text-center">ITS Thermal Printer</h1><br />
|
||||||
|
<h4 class="dark:text-gray-300 text-lg text-center">v<span id="versionNumber"></span> Developed for MCCS by <a href="https://git.vfsh.dev/helpd_admin/it-thermal/src/branch/client-only" class="text-blue-700">Skylar Grant</a></h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="flex justify-center mt-6">
|
<!-- Parent container to hold flex columns -->
|
||||||
<a href="https://mainecc.sharepoint.com/sites/ITHelpdesk" target="_blank">
|
<div class="flex justify-center mt-10 space-x-6">
|
||||||
<img src="./assets/images/itslogo_color.png" alt="ITS Logo" class="h-24 w-auto">
|
<!-- Left column -->
|
||||||
</a>
|
<div class="flex flex-col space-y-6 w-full max-w-md">
|
||||||
</div>
|
<!-- Temporary Password -->
|
||||||
<!-- Title -->
|
<div class="bg-white dark:bg-gray-800 p-5 rounded-lg shadow-lg">
|
||||||
<div class="flex flex-col justify-center mt-6">
|
<!-- Title -->
|
||||||
<h1 class="dark:text-gray-300 text-4xl font-bold text-center">ITS Thermal Printer</h1><br />
|
<h1 class="dark:text-gray-300 text-2xl font-bold text-center mb-4">Temporary Password</h1>
|
||||||
<h4 class="dark:text-gray-300 text-lg text-center">v<span id="versionNumber"></span> Developed for MCCS by <a href="https://git.vfsh.dev/sgrant/mccs-thermal" class="text-blue-700">Skylar Grant</a></h4>
|
<!-- Fields -->
|
||||||
</div>
|
<div>
|
||||||
|
<!-- Username -->
|
||||||
|
<label for="tempPwUsername" class="dark:text-gray-300 block text-md font-medium text-gray-700">Username: (optional)</label>
|
||||||
|
<input type="text" id="tempPwUsername" name="tempPwUsername"
|
||||||
<!-- Parent container to hold flex columns -->
|
class="dark:border-gray-700 dark:bg-gray-700 dark:text-white mt-1 ml-2 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
|
||||||
<div class="flex justify-center mt-10 space-x-6">
|
<!-- Password -->
|
||||||
<!-- Left column -->
|
<label for="tempPwPassword" class="dark:text-gray-300 block text-md font-medium text-gray-700">Password:</label>
|
||||||
<div class="flex flex-col space-y-6 w-full max-w-md">
|
<input type="text" id="tempPwPassword" name="tempPwPassword" required
|
||||||
<!-- Temporary Password -->
|
class="dark:border-gray-700 dark:bg-gray-700 dark:text-white mt-1 ml-2 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
|
||||||
<div class="bg-white dark:bg-gray-800 p-5 rounded-lg shadow-lg">
|
|
||||||
<!-- Title -->
|
|
||||||
<h1 class="dark:text-gray-300 text-2xl font-bold text-center mb-4">Temporary Password</h1>
|
|
||||||
<!-- Fields -->
|
|
||||||
<div>
|
|
||||||
<!-- Username -->
|
|
||||||
<label for="tempPwUsername" class="dark:text-gray-300 block text-md font-medium text-gray-700">Username: (optional)</label>
|
|
||||||
<input type="text" id="tempPwUsername" name="tempPwUsername"
|
|
||||||
class="dark:border-gray-700 dark:bg-gray-700 dark:text-white mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
|
|
||||||
<!-- Password -->
|
|
||||||
<label for="tempPwPassword" class="dark:text-gray-300 block text-md font-medium text-gray-700">Password:</label>
|
|
||||||
<input type="text" id="tempPwPassword" name="tempPwPassword"
|
|
||||||
class="dark:border-gray-700 dark:bg-gray-700 dark:text-white mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
|
|
||||||
</div>
|
|
||||||
<!-- Submit Button -->
|
|
||||||
<div class="text-center">
|
|
||||||
<button type="submit"
|
|
||||||
id="tempPasswordBtn"
|
|
||||||
style="background-color: #4b7839;"
|
|
||||||
class="dark:bg-indigo-600 dark:hover:bg-indigo-700 w-full text-white py-2 px-4 rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-opacity-50 mt-4">
|
|
||||||
Generate Receipt
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="text-center">
|
|
||||||
<button type="submit"
|
|
||||||
id="genPassword"
|
|
||||||
style="background-color: #4b7839;"
|
|
||||||
class="dark:bg-indigo-600 dark:hover:bg-indigo-700 w-full text-white py-2 px-4 rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-opacity-50 mt-4">
|
|
||||||
Generate And Copy Password
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Submit Button -->
|
||||||
<!-- Custom Note -->
|
<div class="text-center">
|
||||||
<div class="bg-white dark:bg-gray-800 p-5 rounded-lg shadow-lg">
|
<button type="submit"
|
||||||
<!-- Title -->
|
id="tempPasswordBtn"
|
||||||
<h1 class="dark:text-gray-300 text-2xl font-bold text-center mb-4">Custom Note</h1>
|
style="background-color: #4b7839;"
|
||||||
<!-- Fields -->
|
class="dark:bg-indigo-600 dark:hover:bg-indigo-700 w-full text-white py-2 px-4 rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-opacity-50 mt-4">
|
||||||
<div>
|
|
||||||
<!-- Notes -->
|
|
||||||
<!-- max size added and removed resizing -->
|
|
||||||
<label for="customNoteTextArea" class="dark:text-gray-300 block text-md font-medium text-gray-700">Notes:</label>
|
|
||||||
<textarea id="customNoteTextArea" name="customNoteTextArea" cols="35" rows="10" maxlength="1000" style="resize: none;"
|
|
||||||
class="dark:border-gray-700 dark:bg-gray-700 dark:text-white mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"></textarea>
|
|
||||||
</div>
|
|
||||||
<!-- Submit Button -->
|
|
||||||
<div class="text-center">
|
|
||||||
<button type="submit"
|
|
||||||
id="customNoteBtn"
|
|
||||||
style="background-color: #4b7839;"
|
|
||||||
class="dark:bg-indigo-600 dark:hover:bg-indigo-700 w-full text-white py-2 px-4 rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-opacity-50 mt-4">
|
|
||||||
Generate Receipt
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Right column -->
|
|
||||||
<div class="flex flex-col space-y-6 w-full max-w-md">
|
|
||||||
<!-- Device Tracker -->
|
|
||||||
<div class="bg-white dark:bg-gray-800 p-5 rounded-lg shadow-lg">
|
|
||||||
<!-- Title -->
|
|
||||||
<h1 class="dark:text-gray-300 text-2xl font-bold text-center mb-4">Device Tracker</h1>
|
|
||||||
<!-- Fields -->
|
|
||||||
<div>
|
|
||||||
<!-- Ticket field -->
|
|
||||||
<label for="dtticket" class="dark:text-gray-300 block text-md font-medium text-gray-700">Ticket:</label>
|
|
||||||
<input type="text" id="dtticket" name="dtticket"
|
|
||||||
class="dark:border-gray-700 dark:bg-gray-700 dark:text-white mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
|
|
||||||
<!-- User field -->
|
|
||||||
<label for="dtuser" class="dark:text-gray-300 block text-md font-medium text-gray-700">User:</label>
|
|
||||||
<input type="text" id="dtuser" name="dtuser"
|
|
||||||
class="dark:border-gray-700 dark:bg-gray-700 dark:text-white mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
|
|
||||||
<!-- Radio buttons to pick from "Stock", "Deploy", "Image", "E-Waste", "Repair/Parts" and "Other" -->
|
|
||||||
<label for="dtservice" class="dark:text-gray-300 block text-md font-medium text-gray-700 mb-2">Service:</label>
|
|
||||||
<div class="flex flex-row space-x-20 pl-2">
|
|
||||||
<div class="flex flex-col space-y-2">
|
|
||||||
<label class="inline-flex items-center">
|
|
||||||
<input type="radio" name="dtservice" value="Stock"
|
|
||||||
class="dark:bg-gray-700 dark:border-gray-700 dark:text-white text-indigo-600 focus:ring-indigo-500">
|
|
||||||
<span class=" dark:text-gray-300">Stock</span>
|
|
||||||
</label>
|
|
||||||
<label class="inline-flex items-center">
|
|
||||||
<input type="radio" name="dtservice" value="Deploy"
|
|
||||||
class="dark:bg-gray-700 dark:border-gray-700 dark:text-white text-indigo-600 focus:ring-indigo-500">
|
|
||||||
<span class=" dark:text-gray-300">Deploy</span>
|
|
||||||
</label>
|
|
||||||
<label class="inline-flex items-center">
|
|
||||||
<input type="radio" name="dtservice" value="Image"
|
|
||||||
class="dark:bg-gray-700 dark:border-gray-700 dark:text-white text-indigo-600 focus:ring-indigo-500">
|
|
||||||
<span class=" dark:text-gray-300">Image</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div class="flex flex-col space-y-2">
|
|
||||||
<label class="inline-flex items-center">
|
|
||||||
<input type="radio" name="dtservice" value="E-Waste"
|
|
||||||
class="dark:bg-gray-700 dark:border-gray-700 dark:text-white text-indigo-600 focus:ring-indigo-500">
|
|
||||||
<span class=" dark:text-gray-300">E-Waste</span>
|
|
||||||
</label>
|
|
||||||
<label class="inline-flex items-center">
|
|
||||||
<input type="radio" name="dtservice" value="Repair/Parts"
|
|
||||||
class="dark:bg-gray-700 dark:border-gray-700 dark:text-white text-indigo-600 focus:ring-indigo-500">
|
|
||||||
<span class=" dark:text-gray-300">Repair/Parts</span>
|
|
||||||
</label>
|
|
||||||
<label class="inline-flex items-center">
|
|
||||||
<input type="radio" name="dtservice" value="Other"
|
|
||||||
class="dark:bg-gray-700 dark:border-gray-700 dark:text-white text-indigo-600 focus:ring-indigo-500">
|
|
||||||
<span class=" dark:text-gray-300">Other</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Notes field -->
|
|
||||||
<label for="dtnotes" class="dark:text-gray-300 block text-md font-medium text-gray-700">Notes: (optional)</label>
|
|
||||||
<textarea id="dtnotes" name="dtnotes" cols="35" rows="6" maxlength="500" style="resize: none;"
|
|
||||||
class="dark:border-gray-700 dark:bg-gray-700 dark:text-white mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"></textarea>
|
|
||||||
</div>
|
|
||||||
<!-- Submit Button -->
|
|
||||||
<div class="text-center">
|
|
||||||
<button type="submit"
|
|
||||||
id="deviceTrackerBtn"
|
|
||||||
style="background-color: #4b7839;"
|
|
||||||
class="dark:bg-indigo-600 dark:hover:bg-indigo-700 w-full text-white py-2 px-4 rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-opacity-50 mt-4">
|
|
||||||
Generate Receipt
|
Generate Receipt
|
||||||
</button>
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Custom Note -->
|
||||||
|
<div class="bg-white dark:bg-gray-800 p-5 rounded-lg shadow-lg">
|
||||||
|
<!-- Title -->
|
||||||
|
<h1 class="dark:text-gray-300 text-2xl font-bold text-center mb-4">Custom Note</h1>
|
||||||
|
<!-- Fields -->
|
||||||
|
<div>
|
||||||
|
<!-- Notes -->
|
||||||
|
<label for="customNoteTextArea" class="dark:text-gray-300 block text-md font-medium text-gray-700">Notes:</label>
|
||||||
|
<textarea id="customNoteTextArea" name="customNoteTextArea" cols="35" rows="10" required
|
||||||
|
class="dark:border-gray-700 dark:bg-gray-700 dark:text-white mt-1 ml-2 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"></textarea>
|
||||||
|
</div>
|
||||||
|
<!-- Submit Button -->
|
||||||
|
<div class="text-center">
|
||||||
|
<button type="submit"
|
||||||
|
id="customNoteBtn"
|
||||||
|
style="background-color: #4b7839;"
|
||||||
|
class="dark:bg-indigo-600 dark:hover:bg-indigo-700 w-full text-white py-2 px-4 rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-opacity-50 mt-4">
|
||||||
|
Generate Receipt
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Right column -->
|
||||||
|
<div class="flex flex-col space-y-6 w-full max-w-md">
|
||||||
|
<!-- Device Tracker -->
|
||||||
|
<div class="bg-white dark:bg-gray-800 p-5 rounded-lg shadow-lg">
|
||||||
|
<!-- Title -->
|
||||||
|
<h1 class="dark:text-gray-300 text-2xl font-bold text-center mb-4">Device Tracker</h1>
|
||||||
|
<!-- Fields -->
|
||||||
|
<div>
|
||||||
|
<!-- Ticket field -->
|
||||||
|
<label for="dtticket" class="dark:text-gray-300 block text-md font-medium text-gray-700">Ticket:</label>
|
||||||
|
<input type="text" id="dtticket" name="dtticket" required
|
||||||
|
class="dark:border-gray-700 dark:bg-gray-700 dark:text-white mt-1 ml-2 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
|
||||||
|
<!-- User field -->
|
||||||
|
<label for="dtuser" class="dark:text-gray-300 block text-md font-medium text-gray-700">User:</label>
|
||||||
|
<input type="text" id="dtuser" name="dtuser" required
|
||||||
|
class="dark:border-gray-700 dark:bg-gray-700 dark:text-white mt-1 ml-2 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
|
||||||
|
<!-- Radio buttons to pick from "Stock", "Deploy", "Image", "E-Waste", "Repair/Parts" and "Other" -->
|
||||||
|
<label for="dtservice" class="dark:text-gray-300 block text-md font-medium text-gray-700 mb-2">Service:</label>
|
||||||
|
<div class="flex flex-row space-x-20 pl-2">
|
||||||
|
<div class="flex flex-col space-y-2">
|
||||||
|
<label class="inline-flex items-center">
|
||||||
|
<input type="radio" name="dtservice" value="Stock" required
|
||||||
|
class="dark:bg-gray-700 dark:border-gray-700 dark:text-white text-indigo-600 focus:ring-indigo-500">
|
||||||
|
<span class="ml-2 dark:text-gray-300">Stock</span>
|
||||||
|
</label>
|
||||||
|
<label class="inline-flex items-center">
|
||||||
|
<input type="radio" name="dtservice" value="Deploy"
|
||||||
|
class="dark:bg-gray-700 dark:border-gray-700 dark:text-white text-indigo-600 focus:ring-indigo-500">
|
||||||
|
<span class="ml-2 dark:text-gray-300">Deploy</span>
|
||||||
|
</label>
|
||||||
|
<label class="inline-flex items-center">
|
||||||
|
<input type="radio" name="dtservice" value="Image"
|
||||||
|
class="dark:bg-gray-700 dark:border-gray-700 dark:text-white text-indigo-600 focus:ring-indigo-500">
|
||||||
|
<span class="ml-2 dark:text-gray-300">Image</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-col space-y-2">
|
||||||
|
<label class="inline-flex items-center">
|
||||||
|
<input type="radio" name="dtservice" value="E-Waste"
|
||||||
|
class="dark:bg-gray-700 dark:border-gray-700 dark:text-white text-indigo-600 focus:ring-indigo-500">
|
||||||
|
<span class="ml-2 dark:text-gray-300">E-Waste</span>
|
||||||
|
</label>
|
||||||
|
<label class="inline-flex items-center">
|
||||||
|
<input type="radio" name="dtservice" value="Repair/Parts"
|
||||||
|
class="dark:bg-gray-700 dark:border-gray-700 dark:text-white text-indigo-600 focus:ring-indigo-500">
|
||||||
|
<span class="ml-2 dark:text-gray-300">Repair/Parts</span>
|
||||||
|
</label>
|
||||||
|
<label class="inline-flex items-center">
|
||||||
|
<input type="radio" name="dtservice" value="Other"
|
||||||
|
class="dark:bg-gray-700 dark:border-gray-700 dark:text-white text-indigo-600 focus:ring-indigo-500">
|
||||||
|
<span class="ml-2 dark:text-gray-300">Other</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Notes field -->
|
||||||
|
<label for="dtnotes" class="dark:text-gray-300 block text-md font-medium text-gray-700">Notes: (optional)</label>
|
||||||
|
<textarea id="dtnotes" name="dtnotes" cols="35" rows="4"
|
||||||
|
class="dark:border-gray-700 dark:bg-gray-700 dark:text-white mt-1 ml-2 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- Submit Button -->
|
||||||
|
<div class="text-center">
|
||||||
<!-- (Hidden) PDF Viewer -->
|
<button type="submit"
|
||||||
<div class="flex flex-col space-y-6 w-full max-w-md" id="pdfViewerContainer" style="display:none">
|
id="deviceTrackerBtn"
|
||||||
<div class="rounded-md">
|
style="background-color: #4b7839;"
|
||||||
<iframe id="pdfViewer" src="" width="400px" height="500px"
|
class="dark:bg-indigo-600 dark:hover:bg-indigo-700 w-full text-white py-2 px-4 rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-opacity-50 mt-4">
|
||||||
class="rounded-md"></iframe>
|
Generate Receipt
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Version / Footer -->
|
<!-- (Hidden) PDF Viewer -->
|
||||||
<div id="footer" class="flex justify-center">
|
<div class="flex flex-col space-y-6 w-full max-w-md" id="pdfViewerContainer" style="display:none">
|
||||||
<span id="version"
|
<div class="rounded-md">
|
||||||
class="dark:text-gray-300 text-sm text-center mt-8">(c) 2025 Skylar Grant</span>
|
<iframe id="pdfViewer" src="" width="400px" height="500px"
|
||||||
|
class="rounded-md"></iframe>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Script Calls -->
|
</div>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.debug.js" integrity="sha384-NaWTHo/8YCBYJ59830LTz/P4aQZK1sS0SneOgAvhsIl3zBu8r9RevNg5lHCHAuQ/" crossorigin="anonymous"></script>
|
|
||||||
<script src="./assets/Classes.js"></script>
|
|
||||||
<script src="./assets/ITThermal.js"></script>
|
|
||||||
<script src="https://cdn.tailwindcss.com"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
||||||
|
<!-- Version / Footer -->
|
||||||
|
<div id="footer" class="flex justify-center">
|
||||||
|
<span id="version"
|
||||||
|
class="dark:text-gray-300 text-sm text-center mt-8">(c) 2025 Skylar Grant</span>
|
||||||
|
</div>
|
||||||
|
<!-- Script Calls -->
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.debug.js" integrity="sha384-NaWTHo/8YCBYJ59830LTz/P4aQZK1sS0SneOgAvhsIl3zBu8r9RevNg5lHCHAuQ/" crossorigin="anonymous"></script>
|
||||||
|
<script src="./assets/Classes.js"></script>
|
||||||
|
<script src="./assets/ITThermal.js"></script>
|
||||||
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Loading…
Reference in New Issue
Block a user