← back to NationalPaperHangers
views/admin/insurance.ejs
56 lines
<%- include('../partials/head', { title, admin: true }) %>
<%- include('partials/admin-header') %>
<section class="admin-main">
<header class="admin-page-head">
<h1>Insurance</h1>
<p class="muted">Designers in luxury commercial & hospitality often need a fresh Certificate of Insurance naming their firm as additional insured for each job. Filling this in lets us route their COI requests to you (and your broker) automatically.</p>
</header>
<% if (flash && flash.ok) { %><div class="callout callout-success"><%= flash.ok %></div><% } %>
<% if (flash && flash.error) { %><div class="callout callout-warn"><%= flash.error %></div><% } %>
<form method="post" action="/admin/insurance" class="profile-form" style="max-width:720px">
<input type="hidden" name="_csrf" value="<%= csrfToken %>">
<fieldset>
<legend>General liability policy</legend>
<label>Carrier
<input type="text" name="carrier" value="<%= ins.carrier || '' %>" maxlength="200" placeholder="e.g. The Hartford">
</label>
<label>Policy number
<input type="text" name="policy_number" value="<%= ins.policy_number || '' %>" maxlength="200">
</label>
<label>General aggregate ($)
<input type="text" inputmode="numeric" pattern="[0-9,$\s]*" name="general_aggregate_usd"
value="<%= (ins.limits && ins.limits.general_aggregate_usd) || '' %>" placeholder="2,000,000">
</label>
<label>Per-occurrence ($)
<input type="text" inputmode="numeric" pattern="[0-9,$\s]*" name="per_occurrence_usd"
value="<%= (ins.limits && ins.limits.per_occurrence_usd) || '' %>" placeholder="1,000,000">
</label>
<label>Expiry date
<input type="date" name="expiry" value="<%= ins.expiry || '' %>">
</label>
</fieldset>
<fieldset>
<legend>Your broker</legend>
<p class="muted" style="font-size:13px;margin:-4px 0 12px">Optional — but when set we'll CC your broker on incoming COI requests so they can issue the cert without waiting on you to forward.</p>
<label>Broker name
<input type="text" name="broker_name" value="<%= ins.broker_name || '' %>" maxlength="200">
</label>
<label>Broker email
<input type="email" name="broker_email" value="<%= ins.broker_email || '' %>" maxlength="200">
</label>
<label>Broker phone
<input type="tel" name="broker_phone" value="<%= ins.broker_phone || '' %>" maxlength="40">
</label>
</fieldset>
<div style="display:flex;gap:10px;margin-top:8px">
<button type="submit" class="btn btn-primary">Save insurance details</button>
<a href="/admin/coi-requests" class="btn btn-ghost btn-sm">View incoming COI requests →</a>
</div>
</form>
</section>
<%- include('../partials/footer') %>