Calculator Tools Calculator Tools
Create

Flexi-Time Office Management App

Oct 14, 2023

About this app

A simple office management app for managing flexi-time

Flexi-Time Office Management App 👩‍💼 Flexi-Time Office Management App 👨‍💼 Hours Logged: 0 hrs Flexi-Balance: 0 hrs Log Hours

Related apps

Put this on your site

Source

                    <html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Flexi-Time Office Management App</title>
<meta name="description" content="A simple office management app for managing flexi-time">
<meta name="keywords" content="office management, flexi-time, time logging, dashboard">

<script type="text/javascript">
try {
let flexiBalance = 0;
let logHours = 0;

// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
document.getElementById('logHours').addEventListener('click', function() {
logHours = Number(document.getElementById('hours').value);
flexiBalance += logHours - 8; // Assuming 8 as standard working hours

document.getElementById('hoursLogged').innerHTML = logHours;
document.getElementById('flexiBalance').innerHTML = flexiBalance;

document.getElementById('flexiBalance').style.color = flexiBalance >= 0 ? '#008000' : '#FF0000'; // green for positive, red for negative
});
});

} catch (error) {
throw error;
}
</script>

<style>
body {
font-family: 'Comic Sans MS', cursive, sans-serif;
background: linear-gradient(to right, #ff9966, #ff5e62);
color: #fff;
}
#main-container {
margin-top: 3em;
text-align: center;
}
.stat {
font-size: 2em;
margin-top: 1em;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<h1>👩‍💼 Flexi-Time Office Management App 👨‍💼</h1>
<div class="stat">
Hours Logged: <span id="hoursLogged">0</span> hrs
</div>
<div class="stat">
Flexi-Balance: <span id="flexiBalance">0</span> hrs
</div>
<div class="input-group mt-3">
<input id="hours" type="number" class="form-control" placeholder="Enter Hours" min="0">
<button id="logHours" class="btn btn-light">Log Hours</button>
</div>
</div>
</body>
</html>