deploy / deploy (push) Successful in 5m54s
Change-Id: I75c3a03bc3b1b487e780bd2b66e8fb1f2b2e115d
326 lines
6.4 KiB
HTML
326 lines
6.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>POC Tracker</title>
|
|
|
|
<style>
|
|
:root {
|
|
--bg: #f4f6f8;
|
|
--card: white;
|
|
--text: #333;
|
|
--primary: #0078d4;
|
|
}
|
|
|
|
.dark-mode {
|
|
--bg: #1e1e1e;
|
|
--card: #2d2d30;
|
|
--text: #ffffff;
|
|
--primary: #4cc2ff;
|
|
}
|
|
|
|
body {
|
|
font-family: Segoe UI, Arial, sans-serif;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
margin: 0;
|
|
padding: 20px;
|
|
transition: .3s;
|
|
}
|
|
|
|
.container {
|
|
max-width: 1200px;
|
|
margin: auto;
|
|
}
|
|
|
|
.header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.card {
|
|
background: var(--card);
|
|
padding: 20px;
|
|
border-radius: 12px;
|
|
margin-top: 20px;
|
|
box-shadow: 0 2px 8px rgba(0,0,0,.15);
|
|
}
|
|
|
|
input, select {
|
|
width: 100%;
|
|
padding: 10px;
|
|
margin-top: 6px;
|
|
margin-bottom: 15px;
|
|
border-radius: 6px;
|
|
border: 1px solid #ccc;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
button {
|
|
background: var(--primary);
|
|
color: white;
|
|
border: none;
|
|
padding: 10px 18px;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
button:hover {
|
|
opacity: .9;
|
|
}
|
|
|
|
.project {
|
|
border-left: 4px solid var(--primary);
|
|
padding-left: 15px;
|
|
margin-top: 15px;
|
|
}
|
|
|
|
.timeline {
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.timeline-item {
|
|
display: flex;
|
|
align-items: center;
|
|
margin: 8px 0;
|
|
}
|
|
|
|
.timeline-item input[type="checkbox"] {
|
|
width: auto;
|
|
margin-right: 10px;
|
|
}
|
|
|
|
.progress-bar {
|
|
height: 24px;
|
|
background: #ddd;
|
|
border-radius: 20px;
|
|
overflow: hidden;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.progress-fill {
|
|
background: #28a745;
|
|
height: 100%;
|
|
text-align: center;
|
|
color: white;
|
|
line-height: 24px;
|
|
}
|
|
|
|
.theme-toggle {
|
|
font-size: 18px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="container">
|
|
|
|
<div class="header">
|
|
<h1>POC Project Tracker</h1>
|
|
<button class="theme-toggle" onclick="toggleTheme()">
|
|
Toggle Dark Mode
|
|
</button>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<h2>Create New POC</h2>
|
|
|
|
<label>Customer Name</label>
|
|
<input id="customerName" type="text">
|
|
|
|
<label>Business / Industry</label>
|
|
<input id="businessName" type="text">
|
|
|
|
<label>POC Start Date</label>
|
|
<input id="startDate" type="date">
|
|
|
|
<label>POC End Date</label>
|
|
<input id="endDate" type="date">
|
|
|
|
<button onclick="addProject()">Add POC</button>
|
|
</div>
|
|
|
|
<div id="projects"></div>
|
|
|
|
</div>
|
|
|
|
<script>
|
|
|
|
let projects = JSON.parse(localStorage.getItem("pocProjects")) || [];
|
|
|
|
const defaultMilestones = [
|
|
"Discovery Meeting",
|
|
"Environment Setup",
|
|
"Requirements Review",
|
|
"Demo Delivery",
|
|
"Customer Testing",
|
|
"Feedback Review",
|
|
"Final Presentation",
|
|
"POC Completion"
|
|
];
|
|
|
|
function saveProjects() {
|
|
localStorage.setItem("pocProjects", JSON.stringify(projects));
|
|
}
|
|
|
|
function toggleTheme() {
|
|
document.body.classList.toggle("dark-mode");
|
|
|
|
if(document.body.classList.contains("dark-mode")){
|
|
localStorage.setItem("theme","dark");
|
|
} else {
|
|
localStorage.setItem("theme","light");
|
|
}
|
|
}
|
|
|
|
function loadTheme() {
|
|
const theme = localStorage.getItem("theme");
|
|
if(theme === "dark"){
|
|
document.body.classList.add("dark-mode");
|
|
}
|
|
}
|
|
|
|
function addProject() {
|
|
|
|
const customer = document.getElementById("customerName").value;
|
|
const business = document.getElementById("businessName").value;
|
|
const start = document.getElementById("startDate").value;
|
|
const end = document.getElementById("endDate").value;
|
|
|
|
if(!customer) {
|
|
alert("Customer name is required.");
|
|
return;
|
|
}
|
|
|
|
const project = {
|
|
id: Date.now(),
|
|
customer,
|
|
business,
|
|
start,
|
|
end,
|
|
milestones: defaultMilestones.map(m => ({
|
|
name: m,
|
|
completed: false
|
|
}))
|
|
};
|
|
|
|
projects.push(project);
|
|
|
|
saveProjects();
|
|
renderProjects();
|
|
|
|
document.getElementById("customerName").value = "";
|
|
document.getElementById("businessName").value = "";
|
|
}
|
|
|
|
function toggleMilestone(projectId, milestoneIndex) {
|
|
|
|
const project = projects.find(p => p.id === projectId);
|
|
|
|
project.milestones[milestoneIndex].completed =
|
|
!project.milestones[milestoneIndex].completed;
|
|
|
|
saveProjects();
|
|
renderProjects();
|
|
}
|
|
|
|
function deleteProject(projectId) {
|
|
|
|
if(!confirm("Delete this POC project?"))
|
|
return;
|
|
|
|
projects = projects.filter(p => p.id !== projectId);
|
|
|
|
saveProjects();
|
|
renderProjects();
|
|
}
|
|
|
|
function calculateProgress(project) {
|
|
|
|
const completed = project.milestones.filter(
|
|
m => m.completed
|
|
).length;
|
|
|
|
return Math.round(
|
|
(completed / project.milestones.length) * 100
|
|
);
|
|
}
|
|
|
|
function renderProjects() {
|
|
|
|
const container = document.getElementById("projects");
|
|
container.innerHTML = "";
|
|
|
|
projects.forEach(project => {
|
|
|
|
const progress = calculateProgress(project);
|
|
|
|
const milestoneHTML = project.milestones.map(
|
|
(m,i) => `
|
|
<div class="timeline-item">
|
|
<input
|
|
type="checkbox"
|
|
${m.completed ? "checked" : ""}
|
|
onchange="toggleMilestone(${project.id},${i})"
|
|
/>
|
|
${m.name}
|
|
</div>
|
|
`
|
|
).join("");
|
|
|
|
container.innerHTML += `
|
|
|
|
<div class="card">
|
|
|
|
<div class="project">
|
|
|
|
<h2>${project.customer}</h2>
|
|
|
|
<p>
|
|
<strong>Business:</strong>
|
|
${project.business}
|
|
</p>
|
|
|
|
<p>
|
|
<strong>Timeline:</strong>
|
|
${project.start || "N/A"}
|
|
→
|
|
${project.end || "N/A"}
|
|
</p>
|
|
|
|
<div class="progress-bar">
|
|
<div class="progress-fill"
|
|
style="width:${progress}%">
|
|
${progress}%
|
|
</div>
|
|
</div>
|
|
|
|
<div class="timeline">
|
|
<h3>Milestones</h3>
|
|
${milestoneHTML}
|
|
</div>
|
|
|
|
<br>
|
|
|
|
<button
|
|
onclick="deleteProject(${project.id})">
|
|
Delete
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
`;
|
|
});
|
|
}
|
|
|
|
loadTheme();
|
|
renderProjects();
|
|
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|