client/addons/bank/ui/_site/index.html
Jacob Schmidt 90476345db feat: Enhance admin and bank systems with event handling and UI improvements
This commit introduces significant updates to the admin and bank systems, focusing on improved event handling and user interface enhancements. Key changes include:

- Refactored event handling for player data requests, paygrade updates, and message broadcasting in the admin panel.
- Implemented new event types for handling player funds and transaction history in the bank system.
- Updated JavaScript functions for better interaction with the web-based UI, including dynamic data requests and improved user feedback.
- Removed deprecated functions and streamlined code for better maintainability.

These enhancements aim to provide a more efficient and user-friendly experience for administrators and players alike.
2025-05-10 17:50:11 -05:00

113 lines
4.5 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<!--
Dynamic Resource Loading
The following script loads CSS and JavaScript files dynamically using the A3API
This approach is used instead of static HTML imports to work with Arma 3's file system
-->
<script>
Promise.all([
// Load CSS file
A3API.RequestFile("z\\forge_client\\addons\\bank\\ui\\_site\\styles.css"),
// Load JavaScript file
A3API.RequestFile("z\\forge_client\\addons\\bank\\ui\\_site\\script.js")
]).then(([css, js]) => {
// Apply CSS
const style = document.createElement('style');
style.textContent = css;
document.head.appendChild(style);
// Load and execute JavaScript
const script = document.createElement('script');
script.text = js;
document.head.appendChild(script);
// Initialize the bank interface
initializeBank();
});
</script>
</head>
<body>
<header>
<div class="header-content">
<h1>Federal Deposit Insurance Corporation</h1>
<div class="balance-display">
<div class="balance-item">
<div class="balance-info">
<span class="balance-label">Wallet Balance</span>
<span class="balance-amount" id="walletBalance">$0</span>
</div>
</div>
<div class="balance-divider"></div>
<div class="balance-item">
<div class="balance-info">
<span class="balance-label">Account Balance</span>
<span class="balance-amount" id="accountBalance">$0</span>
</div>
</div>
</div>
</div>
</header>
<main class="container">
<div class="actions-grid">
<!-- Transfer Between Accounts -->
<div class="action-tile">
<h2>Transfer Money</h2>
<div class="form-group">
<label for="transferType">Transfer From</label>
<select id="transferType" required>
<option value="to_wallet">Account to Wallet</option>
<option value="to_account">Wallet to Account</option>
</select>
</div>
<div class="form-group">
<label for="transferAmount">Amount</label>
<input type="number" id="transferAmount" min="1" step="1" required>
</div>
<button type="button" class="submit-btn" onclick="handleTransfer()">Transfer</button>
</div>
<!-- Transfer to Player -->
<div class="action-tile">
<h2>Transfer to Player</h2>
<div class="form-group">
<label for="playerSelect">Player</label>
<select id="playerSelect" required>
<option value="" disabled selected>Select Player</option>
</select>
</div>
<div class="form-group">
<label for="playerTransferAmount">Amount</label>
<input type="number" id="playerTransferAmount" min="1" step="1" required>
</div>
<button type="button" class="submit-btn" onclick="handlePlayerTransfer()">Send Money</button>
</div>
<!-- Submit Timesheet -->
<div class="action-tile">
<h2>Submit Timesheet</h2>
<div class="form-group">
<label for="hoursWorked">Hours Worked</label>
<input type="number" id="hoursWorked" min="1" step="0.5" required>
</div>
<div class="form-group">
<label for="hourlyRate">Hourly Rate</label>
<input type="number" id="hourlyRate" min="1" step="1" required>
</div>
<button type="button" class="submit-btn" onclick="handleTimesheet()">Submit Timesheet</button>
</div>
</div>
<!-- Transaction History -->
<section class="history-section">
<h2>Transaction History</h2>
<ul class="history-list" id="transactionHistory">
<!-- Transactions will be added here dynamically -->
</ul>
</section>
</main>
</body>
</html>