THE GLASSHOUSE

Sustainable Hire

Assets
Sustainable Hire - Equipment Hire body { font-family: Arial, sans-serif; margin: 0; padding: 0; background-color: #f4f4f4; } .container { width: 80%; margin: 0 auto; padding: 20px; background-color: white; border-radius: 5px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); } header { background-color: #333; color: white; padding: 1em; text-align: center; } h2 { text-align: center; margin-top: 0; } #equipment-list { display: flex; flex-wrap: wrap; justify-content: center; } .category { width: 100%; margin-bottom: 2em; } .category h3 { text-align: left; margin-bottom: 0.5em; border-bottom: 2px solid #333; padding-bottom: 0.5em; } .items .item { flex: 1 1 calc(33.333% - 2em); margin: 1em; padding: 1em; border: 1px solid #ddd; border-radius: 5px; text-align: center; } .items .item img { max-width: 100%; height: auto; } #booking-form, #import-items { max-width: 600px; margin: 0 auto; } label { display: block; margin-bottom: 0.5em; } input, select, button { width: 100%; padding: 0.5em; margin-bottom: 1em; border: 1px solid #ddd; border-radius: 5px; }

Sustainable Hire

Available Equipment

Reserve Equipment

Import Items

document.addEventListener("DOMContentLoaded", function() { const items = []; const categories = {}; const paymentMethods = ["Credit Card", "PayPal", "Bank Transfer"]; // Example payment methods const categoryContainer = document.getElementById('categories'); const itemSelect = document.getElementById('item'); const paymentSelect = document.getElementById('payment-details'); const damageBondInput = document.getElementById('damage-bond'); paymentMethods.forEach(method => { const option = document.createElement('option'); option.value = method; option.textContent = method; paymentSelect.appendChild(option); }); function addItem(item) { if (!categories[item.category]) { const categoryDiv = document.createElement('div'); categoryDiv.className = 'category'; categoryDiv.innerHTML = `

${item.category}

`; categoryContainer.appendChild(categoryDiv); categories[item.category] = document.getElementById(`category-${item.category}`); } const itemDiv = document.createElement('div'); itemDiv.className = 'item'; itemDiv.innerHTML = ` ${item.name}

${item.name}

Price: $${item.price}/day

Available: ${item.inventory}

`; categories[item.category].appendChild(itemDiv); const option = document.createElement('option'); option.value = item.id; option.textContent = item.name; itemSelect.appendChild(option); } itemSelect.addEventListener('change', function() { const selectedItemId = parseInt(itemSelect.value); const selectedItem = items.find(item => item.id === selectedItemId); if (selectedItem) { damageBondInput.value = selectedItem.bond; } }); const form = document.getElementById('reservation-form'); form.addEventListener('submit', function(event) { event.preventDefault(); const selectedItemId = parseInt(form.item.value); const selectedStartDate = form['start-date'].value; const selectedEndDate = form['end-date'].value; const selectedPickupLocation = form['pickup-location'].value; const selectedPaymentDetails = form['payment-details'].value; const selectedDamageBond = parseFloat(form['damage-bond'].value); const selectedItem = items.find(item => item.id === selectedItemId); if (selectedItem.inventory { if (index === 0) { console.log("Skipping header line"); return; // Skip header line } const [id, category, name, price, image, inventory, bond] = line.split(','); console.log("Processing line:", line); // Log each line being processed if (id && category && name && price && image && inventory && bond) { const item = { id: parseInt(id), category: category.trim(), name: name.trim(), price: parseFloat(price), image: image.trim(), inventory: parseInt(inventory), bond: parseFloat(bond) }; items.push(item); addItem(item); } else { console.log("Invalid line:", line); // Log invalid lines } }); }; reader.onerror = function(event) { console.error("File could not be read! Code " + event.target.error.code); }; reader.readAsText(file); }); });

LATEST

ARTICLES

GH VENUES

A collection of modern event spaces designed to provide amplified and epic experiences for our guests. Our team of hospitality professionals provides turnkey services for corporate, social and nonprofit events.

Check out our venues:

SOCIAL
MEDIA
				
					<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Sustainable Hire - Equipment Hire</title>
    
</head>
<body>
    <header>
        <h1>Sustainable Hire</h1>
    </header>

    <div class="container">
        <section id="equipment-list">
            <h2>Available Equipment</h2>
            <div id="items">
                <!-- Items will be dynamically added here -->
            </div>
        </section>

        <section id="booking-form">
            <h2>Reserve Equipment</h2>
            <form id="reservation-form">
                <label for="item">Select Item:</label>
                <select id="item" name="item" required></select>

                <label for="start-date">Start Date:</label>
                <input type="date" id="start-date" name="start-date" required>

                <label for="end-date">End Date:</label>
                <input type="date" id="end-date" name="end-date" required>

                <label for="pickup-location">Pickup Location:</label>
                <input type="text" id="pickup-location" name="pickup-location" required>

                <label for="payment-details">Payment Details:</label>
                <input type="text" id="payment-details" name="payment-details" required>

                <label for="damage-bond">Damage Bond:</label>
                <input type="number" id="damage-bond" name="damage-bond" required>

                <button type="submit">Reserve</button>
            </form>
        </section>

        <section id="import-items">
            <h2>Import Items</h2>
            <input type="file" id="csv-file" accept=".csv">
            <button id="import-button">Import</button>
        </section>
    </div>

    <script data-two_delay_src='inline' data-two_delay_id="two_665247eab9927"></script>
</body>
</html>

				
			
STAY IN
THE LOOP
JaceSpace (the OG)
163 Symonds Street
Auckland 1071
Modern City Bliss Modern City Bliss
11 Nicholas Street
Auckland 1010

Copyright 2024 © JaceSpace

PRIVACY POLICY