Files
SFA/index.html

835 lines
38 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SFA Tool - Renewals</title>
<!-- Add Font Awesome CDN -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background-color: #f5f5f5;
color: #333;
line-height: 1.6;
padding-top: 60px; /* Add padding for fixed header */
}
.container {
max-width: 1600px;
margin: 0 auto;
padding: 0.5rem 1rem;
}
header {
background-color: #2c3e50;
color: white;
padding: 0.5rem 0;
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 1000;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.header-content {
display: flex;
justify-content: space-between;
align-items: center;
}
h1 {
font-size: 1.25rem;
font-weight: 500;
}
nav {
display: flex;
gap: 1.5rem;
}
nav a {
color: white;
text-decoration: none;
padding: 0.25rem 0.75rem;
border-radius: 4px;
transition: background-color 0.2s;
font-size: 0.9rem;
}
nav a:hover {
background-color: rgba(255, 255, 255, 0.1);
}
nav a.active {
background-color: rgba(255, 255, 255, 0.2);
font-weight: 500;
}
.content {
background-color: #fff;
padding: 2rem;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
margin-top: 1.5rem;
}
.task-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1.5rem;
}
.task-filters {
display: flex;
gap: 1rem;
margin-bottom: 1.5rem;
flex-wrap: wrap;
}
.filter-button {
padding: 0.5rem 1rem;
border: 1px solid #ddd;
border-radius: 4px;
background: white;
cursor: pointer;
font-size: 0.9rem;
}
.filter-button:hover {
background: #f5f5f5;
}
.date-filter {
display: flex;
gap: 1rem;
align-items: center;
margin-bottom: 1.5rem;
padding: 1rem;
background: #f8f9fa;
border-radius: 4px;
}
.date-filter label {
font-weight: 500;
color: #666;
}
.date-filter input[type="date"] {
padding: 0.5rem;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 0.9rem;
}
.date-filter .date-range {
display: flex;
align-items: center;
gap: 0.5rem;
}
.date-filter .apply-button {
padding: 0.5rem 1rem;
background: #2c3e50;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 0.9rem;
}
.date-filter .apply-button:hover {
background: #34495e;
}
.task-table {
width: 100%;
border-collapse: collapse;
margin-top: 1rem;
}
.task-table th {
background: #f8f9fa;
padding: 0.75rem;
text-align: left;
font-weight: 500;
color: #666;
border-bottom: 2px solid #eee;
}
.task-table td {
padding: 0.75rem;
border-bottom: 1px solid #eee;
vertical-align: middle;
}
.task-table tr:hover {
background-color: #f8f9fa;
}
.task-status {
padding: 0.25rem 0.5rem;
border-radius: 4px;
font-size: 0.8rem;
display: inline-block;
}
.status-in-progress {
background: #e3f2fd;
color: #1976d2;
}
.status-pending {
background: #fff3e0;
color: #f57c00;
}
.status-completed {
background: #e8f5e9;
color: #388e3c;
}
.status-overdue {
background: #ffebee;
color: #d32f2f;
}
.priority-high {
color: #d32f2f;
font-weight: 500;
}
.priority-medium {
color: #f57c00;
}
.priority-low {
color: #388e3c;
}
.add-task-button {
padding: 0.5rem 1rem;
background: #2c3e50;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 0.9rem;
}
.add-task-button:hover {
background: #34495e;
}
.action-icon {
cursor: pointer;
font-size: 1.2rem;
color: #2c3e50;
transition: color 0.2s;
padding: 0.5rem;
border-radius: 4px;
}
.action-icon:hover {
color: #34495e;
background-color: #f8f9fa;
}
/* Modal styles */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
z-index: 1000;
}
.modal-content {
position: relative;
background-color: #fff;
margin: 10% auto;
padding: 2rem;
width: 80%;
max-width: 800px;
border-radius: 8px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.close-modal {
position: absolute;
right: 1rem;
top: 1rem;
font-size: 1.5rem;
cursor: pointer;
color: #666;
}
.close-modal:hover {
color: #333;
}
.modal-details {
margin-top: 1rem;
max-height: 900px;
overflow-y: auto;
}
.detail-row {
display: flex;
margin-bottom: 1rem;
padding-bottom: 1rem;
border-bottom: 1px solid #eee;
}
.detail-label {
width: 200px;
font-weight: 500;
color: #666;
}
.detail-value {
flex: 1;
}
</style>
</head>
<body>
<header>
<div class="container">
<div class="header-content">
<h1>SFA Tool</h1>
<nav>
<a href="index.html" class="active">Renewals</a>
<a href="my-tasks.html">My Tasks</a>
<a href="profile.html">Profile Settings</a>
</nav>
</div>
</div>
</header>
<main class="container">
<div class="content">
<div class="task-header">
<h2>Renewals</h2>
<button class="add-task-button">+ Add Renewal</button>
</div>
<div class="task-filters">
<button class="filter-button">All Renewals</button>
<button class="filter-button">In Progress</button>
<button class="filter-button">Completed</button>
<button class="filter-button">Overdue</button>
</div>
<div class="date-filter">
<div class="date-range">
<label>From:</label>
<input type="date" value="2024-03-01">
<label>To:</label>
<input type="date" value="2024-03-31">
</div>
<button class="apply-button">Apply Filter</button>
</div>
<table class="task-table">
<thead>
<tr>
<th>Policy Number</th>
<th>Policy Name</th>
<th>Policy Holder Category</th>
<th>Broker Name</th>
<th>Priority</th>
<th>Status</th>
<th>Expiry Date</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td>POL-2024-001</td>
<td>Q1 Sales Report Policy</td>
<td>Corporate</td>
<td>John Smith</td>
<td class="priority-high">High</td>
<td><span class="task-status status-in-progress">In Progress</span></td>
<td>Mar 31, 2024</td>
<td>
<i class="fas fa-eye action-icon" onclick="showDetails('POL-2024-001')"></i>
<i class="fas fa-project-diagram action-icon" onclick="openDiagramModal('Policy 1')"></i>
<i class="fas fa-envelope action-icon" onclick="window.location.href='renewal-mails.html'"></i>
</td>
</tr>
<tr>
<td>POL-2024-002</td>
<td>Customer Database Policy</td>
<td>Enterprise</td>
<td>Sarah Johnson</td>
<td class="priority-medium">Medium</td>
<td><span class="task-status status-pending">Pending</span></td>
<td>Mar 25, 2024</td>
<td>
<i class="fas fa-eye action-icon" onclick="showDetails('POL-2024-002')"></i>
<i class="fas fa-project-diagram action-icon" onclick="openDiagramModal('Policy 2')"></i>
<i class="fas fa-envelope action-icon" onclick="window.location.href='renewal-mails.html'"></i>
</td>
</tr>
<tr>
<td>POL-2024-003</td>
<td>Team Meeting Policy</td>
<td>Small Business</td>
<td>Mike Brown</td>
<td class="priority-low">Low</td>
<td><span class="task-status status-completed">Completed</span></td>
<td>Mar 20, 2024</td>
<td>
<i class="fas fa-eye action-icon" onclick="showDetails('POL-2024-003')"></i>
<i class="fas fa-project-diagram action-icon" onclick="openDiagramModal('Policy 3')"></i>
<i class="fas fa-envelope action-icon" onclick="window.location.href='renewal-mails.html'"></i>
</td>
</tr>
<tr>
<td>POL-2024-004</td>
<td>Client Presentation Policy</td>
<td>Corporate</td>
<td>Emma Wilson</td>
<td class="priority-high">High</td>
<td><span class="task-status status-overdue">Overdue</span></td>
<td>Mar 15, 2024</td>
<td>
<i class="fas fa-eye action-icon" onclick="showDetails('POL-2024-004')"></i>
<i class="fas fa-project-diagram action-icon" onclick="openDiagramModal('Policy 4')"></i>
<i class="fas fa-envelope action-icon" onclick="window.location.href='renewal-mails.html'"></i>
</td>
</tr>
<tr>
<td>POL-2024-005</td>
<td>Sales Training Policy</td>
<td>Enterprise</td>
<td>David Lee</td>
<td class="priority-medium">Medium</td>
<td><span class="task-status status-in-progress">In Progress</span></td>
<td>Mar 28, 2024</td>
<td>
<i class="fas fa-eye action-icon" onclick="showDetails('POL-2024-005')"></i>
<i class="fas fa-project-diagram action-icon" onclick="openDiagramModal('Policy 5')"></i>
<i class="fas fa-envelope action-icon" onclick="window.location.href='renewal-mails.html'"></i>
</td>
</tr>
<tr>
<td>POL-2024-006</td>
<td>Quarterly Budget Policy</td>
<td>Corporate</td>
<td>Lisa Chen</td>
<td class="priority-high">High</td>
<td><span class="task-status status-pending">Pending</span></td>
<td>Mar 30, 2024</td>
<td>
<i class="fas fa-eye action-icon" onclick="showDetails('POL-2024-006')"></i>
<i class="fas fa-project-diagram action-icon" onclick="openDiagramModal('Policy 6')"></i>
<i class="fas fa-envelope action-icon" onclick="window.location.href='renewal-mails.html'"></i>
</td>
</tr>
<tr>
<td>POL-2024-007</td>
<td>Product Launch Policy</td>
<td>Enterprise</td>
<td>Alex Rodriguez</td>
<td class="priority-high">High</td>
<td><span class="task-status status-in-progress">In Progress</span></td>
<td>Mar 27, 2024</td>
<td>
<i class="fas fa-eye action-icon" onclick="showDetails('POL-2024-007')"></i>
<i class="fas fa-project-diagram action-icon" onclick="openDiagramModal('Policy 7')"></i>
<i class="fas fa-envelope action-icon" onclick="window.location.href='renewal-mails.html'"></i>
</td>
</tr>
<tr>
<td>POL-2024-008</td>
<td>Customer Survey Policy</td>
<td>Small Business</td>
<td>Maria Garcia</td>
<td class="priority-medium">Medium</td>
<td><span class="task-status status-completed">Completed</span></td>
<td>Mar 18, 2024</td>
<td>
<i class="fas fa-eye action-icon" onclick="showDetails('POL-2024-008')"></i>
<i class="fas fa-project-diagram action-icon" onclick="openDiagramModal('Policy 8')"></i>
<i class="fas fa-envelope action-icon" onclick="window.location.href='renewal-mails.html'"></i>
</td>
</tr>
<tr>
<td>POL-2024-009</td>
<td>Website License Policy</td>
<td>Corporate</td>
<td>James Wilson</td>
<td class="priority-low">Low</td>
<td><span class="task-status status-overdue">Overdue</span></td>
<td>Mar 12, 2024</td>
<td>
<i class="fas fa-eye action-icon" onclick="showDetails('POL-2024-009')"></i>
<i class="fas fa-project-diagram action-icon" onclick="openDiagramModal('Policy 9')"></i>
<i class="fas fa-envelope action-icon" onclick="window.location.href='renewal-mails.html'"></i>
</td>
</tr>
<tr>
<td>POL-2024-010</td>
<td>Sales Team License Policy</td>
<td>Enterprise</td>
<td>Rachel Kim</td>
<td class="priority-medium">Medium</td>
<td><span class="task-status status-in-progress">In Progress</span></td>
<td>Mar 29, 2024</td>
<td>
<i class="fas fa-eye action-icon" onclick="showDetails('POL-2024-010')"></i>
<i class="fas fa-project-diagram action-icon" onclick="openDiagramModal('Policy 10')"></i>
<i class="fas fa-envelope action-icon" onclick="window.location.href='renewal-mails.html'"></i>
</td>
</tr>
<tr>
<td>POL-2024-011</td>
<td>Marketing Campaign Policy</td>
<td>Corporate</td>
<td>Tom Anderson</td>
<td class="priority-high">High</td>
<td><span class="task-status status-pending">Pending</span></td>
<td>Mar 26, 2024</td>
<td>
<i class="fas fa-eye action-icon" onclick="showDetails('POL-2024-011')"></i>
<i class="fas fa-project-diagram action-icon" onclick="openDiagramModal('Policy 11')"></i>
<i class="fas fa-envelope action-icon" onclick="window.location.href='renewal-mails.html'"></i>
</td>
</tr>
<tr>
<td>POL-2024-012</td>
<td>Inventory System Policy</td>
<td>Enterprise</td>
<td>Patricia Martinez</td>
<td class="priority-medium">Medium</td>
<td><span class="task-status status-completed">Completed</span></td>
<td>Mar 19, 2024</td>
<td>
<i class="fas fa-eye action-icon" onclick="showDetails('POL-2024-012')"></i>
<i class="fas fa-project-diagram action-icon" onclick="openDiagramModal('Policy 12')"></i>
<i class="fas fa-envelope action-icon" onclick="window.location.href='renewal-mails.html'"></i>
</td>
</tr>
<tr>
<td>POL-2024-013</td>
<td>Client Portal Policy</td>
<td>Corporate</td>
<td>Chris Taylor</td>
<td class="priority-high">High</td>
<td><span class="task-status status-in-progress">In Progress</span></td>
<td>Mar 28, 2024</td>
<td>
<i class="fas fa-eye action-icon" onclick="showDetails('POL-2024-013')"></i>
<i class="fas fa-project-diagram action-icon" onclick="openDiagramModal('Policy 13')"></i>
<i class="fas fa-envelope action-icon" onclick="window.location.href='renewal-mails.html'"></i>
</td>
</tr>
<tr>
<td>POL-2024-014</td>
<td>Performance Tool Policy</td>
<td>Small Business</td>
<td>Sophie Clark</td>
<td class="priority-medium">Medium</td>
<td><span class="task-status status-overdue">Overdue</span></td>
<td>Mar 14, 2024</td>
<td>
<i class="fas fa-eye action-icon" onclick="showDetails('POL-2024-014')"></i>
<i class="fas fa-project-diagram action-icon" onclick="openDiagramModal('Policy 14')"></i>
<i class="fas fa-envelope action-icon" onclick="window.location.href='renewal-mails.html'"></i>
</td>
</tr>
<tr>
<td>POL-2024-015</td>
<td>Sales Strategy Policy</td>
<td>Enterprise</td>
<td>Daniel White</td>
<td class="priority-low">Low</td>
<td><span class="task-status status-completed">Completed</span></td>
<td>Mar 17, 2024</td>
<td>
<i class="fas fa-eye action-icon" onclick="showDetails('POL-2024-015')"></i>
<i class="fas fa-project-diagram action-icon" onclick="openDiagramModal('Policy 15')"></i>
<i class="fas fa-envelope action-icon" onclick="window.location.href='renewal-mails.html'"></i>
</td>
</tr>
<tr>
<td>POL-2024-016</td>
<td>CRM License Policy</td>
<td>Corporate</td>
<td>Olivia Brown</td>
<td class="priority-high">High</td>
<td><span class="task-status status-pending">Pending</span></td>
<td>Mar 27, 2024</td>
<td>
<i class="fas fa-eye action-icon" onclick="showDetails('POL-2024-016')"></i>
<i class="fas fa-project-diagram action-icon" onclick="openDiagramModal('Policy 16')"></i>
<i class="fas fa-envelope action-icon" onclick="window.location.href='renewal-mails.html'"></i>
</td>
</tr>
<tr>
<td>POL-2024-017</td>
<td>Team Software Policy</td>
<td>Small Business</td>
<td>Michael Davis</td>
<td class="priority-low">Low</td>
<td><span class="task-status status-in-progress">In Progress</span></td>
<td>Mar 30, 2024</td>
<td>
<i class="fas fa-eye action-icon" onclick="showDetails('POL-2024-017')"></i>
<i class="fas fa-project-diagram action-icon" onclick="openDiagramModal('Policy 17')"></i>
<i class="fas fa-envelope action-icon" onclick="window.location.href='renewal-mails.html'"></i>
</td>
</tr>
<tr>
<td>POL-2024-018</td>
<td>Annual License Policy</td>
<td>Enterprise</td>
<td>Jennifer Lee</td>
<td class="priority-high">High</td>
<td><span class="task-status status-overdue">Overdue</span></td>
<td>Mar 13, 2024</td>
<td>
<i class="fas fa-eye action-icon" onclick="showDetails('POL-2024-018')"></i>
<i class="fas fa-project-diagram action-icon" onclick="openDiagramModal('Policy 18')"></i>
<i class="fas fa-envelope action-icon" onclick="window.location.href='renewal-mails.html'"></i>
</td>
</tr>
<tr>
<td>POL-2024-019</td>
<td>Sales Tool Policy</td>
<td>Corporate</td>
<td>Robert Johnson</td>
<td class="priority-medium">Medium</td>
<td><span class="task-status status-completed">Completed</span></td>
<td>Mar 16, 2024</td>
<td>
<i class="fas fa-eye action-icon" onclick="showDetails('POL-2024-019')"></i>
<i class="fas fa-project-diagram action-icon" onclick="openDiagramModal('Policy 19')"></i>
<i class="fas fa-envelope action-icon" onclick="window.location.href='renewal-mails.html'"></i>
</td>
</tr>
<tr>
<td>POL-2024-020</td>
<td>Market Research Tool Policy</td>
<td>Enterprise</td>
<td>Emily Wilson</td>
<td class="priority-high">High</td>
<td><span class="task-status status-in-progress">In Progress</span></td>
<td>Mar 29, 2024</td>
<td>
<i class="fas fa-eye action-icon" onclick="showDetails('POL-2024-020')"></i>
<i class="fas fa-project-diagram action-icon" onclick="openDiagramModal('Policy 20')"></i>
<i class="fas fa-envelope action-icon" onclick="window.location.href='renewal-mails.html'"></i>
</td>
</tr>
</tbody>
</table>
<!-- Modal for details -->
<div id="detailsModal" class="modal">
<div class="modal-content">
<span class="close-modal" onclick="closeModal()">&times;</span>
<h2>Policy Details</h2>
<div id="modalDetails" class="modal-details">
<!-- Details will be populated by JavaScript -->
</div>
</div>
</div>
<!-- Diagram Modal -->
<div id="diagramModal" class="modal">
<div class="modal-content" style="max-width: 1400px; width: 90%; margin: 2% auto; max-height: 96vh; overflow-y: auto;">
<div class="modal-header" style="padding: 1rem 2rem; border-bottom: 1px solid #eee; position: sticky; top: 0; background: white; z-index: 1;">
<h2>Renewal Diagram</h2>
</div>
<div class="modal-body" style="padding: 2rem;">
<div style="display: flex; gap: 2rem; margin-bottom: 2rem;">
<div id="diagramPlaceholder" style="flex: 2; height: 600px; background-color: #f8f9fa; border: 2px dashed #ccc; display: flex; align-items: center; justify-content: center;">
<p style="color: #666;">Diagram placeholder - Image will be added here</p>
</div>
<div class="diagram-info" style="flex: 1; padding: 1.5rem; background-color: #f8f9fa; border-radius: 4px;">
<div class="next-steps" style="margin-bottom: 2rem;">
<h3 style="margin-bottom: 1rem; color: #2c3e50;">Next Possible Steps for this step</h3>
<div style="display: flex; flex-direction: column; gap: 0.75rem;">
<button class="next-step-button" style="padding: 0.75rem; background-color: #2c3e50; color: white; border: none; border-radius: 4px; cursor: pointer; display: flex; align-items: center; gap: 0.5rem;">
<i class="fas fa-envelope"></i>
Message all involved
</button>
<button class="next-step-button" style="padding: 0.75rem; background-color: #2c3e50; color: white; border: none; border-radius: 4px; cursor: pointer; display: flex; align-items: center; gap: 0.5rem;">
<i class="fas fa-file-signature"></i>
Get Quote from supplier
</button>
<button class="next-step-button" style="padding: 0.75rem; background-color: #2c3e50; color: white; border: none; border-radius: 4px; cursor: pointer; display: flex; align-items: center; gap: 0.5rem;">
<i class="fas fa-check-circle"></i>
Mark as Completed
</button>
</div>
</div>
<h3 style="margin-bottom: 1.5rem; color: #2c3e50;">Key Information for this step</h3>
<div class="info-field">
<label style="display: block; color: #666; font-size: 0.9rem; margin-bottom: 0.25rem;">Policy Number</label>
<div id="diagramPolicyNumber" style="font-weight: 500; margin-bottom: 1.5rem;">-</div>
</div>
<div class="info-field">
<label style="display: block; color: #666; font-size: 0.9rem; margin-bottom: 0.25rem;">Status</label>
<div id="diagramStatus" style="font-weight: 500; margin-bottom: 1.5rem;">-</div>
</div>
<div class="info-field">
<label style="display: block; color: #666; font-size: 0.9rem; margin-bottom: 0.25rem;">Expiry Date</label>
<div id="diagramExpiry" style="font-weight: 500; margin-bottom: 1.5rem;">-</div>
</div>
<div class="info-field">
<label style="display: block; color: #666; font-size: 0.9rem; margin-bottom: 0.25rem;">Broker</label>
<div id="diagramBroker" style="font-weight: 500; margin-bottom: 1.5rem;">-</div>
</div>
</div>
</div>
<div class="mail-history" style="background-color: #f8f9fa; border-radius: 4px; padding: 1.5rem;">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem;">
<h3 style="color: #2c3e50;">Mail History for this step</h3>
<button class="clear-mailbox-button" style="padding: 0.5rem 1rem; background-color: #dc3545; color: white; border: none; border-radius: 4px; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem;">
<i class="fas fa-trash-alt"></i>
Clear these from my mailbox
</button>
</div>
<div id="mailHistoryList" style="max-height: 300px; overflow-y: auto;">
<!-- Mail history items will be populated here -->
</div>
</div>
</div>
</div>
</div>
<script>
function showDetails(policyNumber) {
const modal = document.getElementById('detailsModal');
const detailsContainer = document.getElementById('modalDetails');
// Example details - in a real application, this would come from a database
const details = {
'POL-2024-001': {
'LOB Code': 'PROP',
'COB Code': 'FIRE',
'Policy Number': 'POL-2024-001',
'Policy Holder': 'Acme Corporation',
'Policy Holder Name': 'Acme HQ',
'Policy Holder Category': 'Corporate',
'Policy Holder Phone': '+1 555-123-4567',
'Broker Name': 'John Smith',
'Date Issued': 'Apr 1, 2023',
'Date Effective': 'Apr 1, 2023',
'Date Expiry': 'Mar 31, 2024',
'Net Premium': '$20,000',
'Gross Premium': '$25,000',
'Total Premium': '$25,000',
'Due Amount': '$5,000',
'Claim Count': '2',
'Total Claim': '$12,000',
'Loss Ratio': '48%',
'FAC': 'No',
'Product Description': 'Commercial Property Insurance',
'Is Group': 'No',
'Assigned To': 'Jane Doe',
'Priority': 'High'
}
};
const policyDetails = details[policyNumber] || {
'Policy Number': policyNumber,
'Status': 'Details not available'
};
let detailsHTML = '';
for (const [key, value] of Object.entries(policyDetails)) {
detailsHTML += `
<div class="detail-row">
<div class="detail-label">${key}</div>
<div class="detail-value">${value}</div>
</div>
`;
}
detailsContainer.innerHTML = detailsHTML;
modal.style.display = 'block';
}
function closeModal() {
const modal = document.getElementById('detailsModal');
modal.style.display = 'none';
}
function openDiagramModal(policyName) {
const modal = document.getElementById('diagramModal');
const row = event.target.closest('tr');
// Get the information from the table row
const policyNumber = row.cells[0].textContent;
const status = row.querySelector('.task-status').textContent;
const expiryDate = row.cells[6].textContent;
const brokerName = row.cells[3].textContent;
// Update the information panel
document.getElementById('diagramPolicyNumber').textContent = policyNumber;
document.getElementById('diagramStatus').textContent = status;
document.getElementById('diagramExpiry').textContent = expiryDate;
document.getElementById('diagramBroker').textContent = brokerName;
// Update mail history (in a real application, this would come from a database)
const mailHistoryList = document.getElementById('mailHistoryList');
mailHistoryList.innerHTML = `
<div class="mail-item" style="padding: 1rem; border-bottom: 1px solid #eee; background-color: white; margin-bottom: 1rem; border-radius: 4px; cursor: pointer;" onclick="window.location.href='mail-detail.html'">
<div style="display: flex; justify-content: space-between; margin-bottom: 0.5rem;">
<span style="font-weight: 500;">Initial Renewal Notice</span>
<span style="color: #666; font-size: 0.9rem;">Mar 15, 2024 10:30 AM</span>
</div>
<div style="color: #666; font-size: 0.9rem; margin-bottom: 0.5rem;">Sent to: ${brokerName.toLowerCase().replace(' ', '.')}@broker.com</div>
<div style="color: #666;">Subject: Policy Renewal Notice - ${policyNumber}</div>
</div>
<div class="mail-item" style="padding: 1rem; border-bottom: 1px solid #eee; background-color: white; margin-bottom: 1rem; border-radius: 4px; cursor: pointer;" onclick="window.location.href='mail-detail.html'">
<div style="display: flex; justify-content: space-between; margin-bottom: 0.5rem;">
<span style="font-weight: 500;">Follow-up Reminder</span>
<span style="color: #666; font-size: 0.9rem;">Mar 22, 2024 02:15 PM</span>
</div>
<div style="color: #666; font-size: 0.9rem; margin-bottom: 0.5rem;">Sent to: ${brokerName.toLowerCase().replace(' ', '.')}@broker.com</div>
<div style="color: #666;">Subject: Reminder: Policy Renewal Due - ${policyNumber}</div>
</div>
`;
modal.style.display = 'block';
}
function closeDiagramModal() {
const modal = document.getElementById('diagramModal');
modal.style.display = 'none';
}
// Close modal when clicking outside
window.onclick = function(event) {
const detailsModal = document.getElementById('detailsModal');
const diagramModal = document.getElementById('diagramModal');
if (event.target == detailsModal) {
detailsModal.style.display = 'none';
}
if (event.target == diagramModal) {
diagramModal.style.display = 'none';
}
}
</script>
</div>
</main>
</body>
</html>