FSWD - 6
FSWD - 6
AIM:
To develop a leave management system for an organization where users can apply different
types of leaves such as casual leave and medical leave. They also can view the available no of days.
ALGORITHM:
Step 2: Choose a Technology Stack Select a web development framework and languages.
Step 3: Create Project Structure Establish directories for HTML, CSS, JavaScript files, and assets.
Step 4: Code HTML Structure Develop HTML templates for each webpage (index, about, resume,
projects, contact).
Step 5: Implement CSS Styling Style HTML elements using CSS for a visually appealing design.
Step 6: Add JavaScript Functionality Integrate JavaScript for interactive features and dynamic
content loading.
Step 7: Test and Debug Conduct thorough testing on different browsers and devices.
PROGRAM:
HTML - 1: (index.html)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Employee Login</title>
<style>
</style>
</head>
<body>
<div class="login-container">
<h1>Employee Login</h1>
<form id="loginForm">
<input type="text" id="employeeID" placeholder="Employee ID" required>
<input type="password" id="password" placeholder="Password" required>
<button type="submit">Login</button>
</form>
<div id="errorMessage" class="error"></div>
</div>
<script>
</script>
</body>
</html>
CSS - 1:
body {
font-family: 'Times New Roman', Times, serif, sans-serif;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #f4f4f4;
margin: 0;
}
.login-container {
background-color: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
width: 300px;
text-align: center;
}
h1 {
color: #333;
}
input, button {
width: 100%;
padding: 8px;
margin-bottom: 10px;
border-radius: 4px;
border: 1px solid #ddd;
}
button {
background-color: #4CAF50;
color: white;
border: none;
}
.error {
color: #d9534f;
font-weight: bold;
margin-top: 10px;
}
JAVASCRIPT - 1:
loginForm.addEventListener("submit", function(e) {
e.preventDefault();
HTML – 2: (leave_management.html)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=2.0">
<title>Leave Management System</title>
<link rel="stylesheet" href="styles.css">
</head>
<style>
</style>
<body>
<div class="container">
<h1>Leave Management System</h1>
<br>
<!-- Leave Balance Section -->
<div class="leave-balance">
<h2>Leave Balance</h2>
<p>Casual Leave: <span id="casual-leave-balance">10</span> days</p>
<p>Medical Leave: <span id="medical-leave-balance">15</span> days</p>
</div>
<button type="submit">Apply</button>
</form>
</div>
<!-- Leave Status Section -->
<div id="statusMessage" class="status"></div>
</div>
<script>
</script>
</body>
</html>
CSS – 2:
body {
font-family: 'Times New Roman', Times, serif;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #f4f4f4;
margin: 0;
}
.container {
background-color: white;
padding: 402px;
border-radius: 8px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
width: 300px;
text-align: center;
}
h1, h2 {
color: #333;
}
form {
margin-top: 15px;
}
label {
display: block;
margin: 10px 0 5px;
}
input, select, button {
width: 100%;
padding: 8px;
margin-bottom: 10px;
border-radius: 4px;
border: 1px solid #ddd;
}
button {
background-color: #4CAF50;
color: white;
border: none;
}
.status {
margin-top: 15px;
color: #d9534f;
font-weight: bold;
}
JAVASCRIPT – 2:
OUTPUT:
Department of IT
Performance 30
Observation 30
Record 40
RESULT: Total 100