<%- include('partials/header') %>

Settings & Config

Configure form requirements, the global spending limit, whitelist authorized credit cards, and manage list items.

<% if (error) { %>
<%= decodeURIComponent(error) %>
<% } %> <% if (success) { %>
<%= decodeURIComponent(success) %>
<% } %>

Form Field Requirements & Spending Limit

$ Default fallback limit

Supervisor Management

<%= supervisors.length %> supervisor(s)
<% if (supervisors && supervisors.length > 0) { %>
<% supervisors.forEach(s => { %> <% }) %>
NameEmailAction
<%= s.name %> <% if (s.group_name) { %> <%= s.group_name %> <% } %>
Autocreated User Login: username <%= s.name.toLowerCase().replace(/[^a-z0-9]/g, '') %>, password password123
<%= s.email || '—' %>
<% } else { %>

No supervisors yet. Add one above to enable the dropdown on expense forms.

<% } %>

Job Number Management

<%= jobNumbers.length %> job(s)
CSV Job Numbers Import
Download Template
<% const pendingJobs = jobNumbers.filter(j => j.pending_confirmation); const activeJobs = jobNumbers.filter(j => !j.pending_confirmation); %> <% if (pendingJobs.length > 0) { %>
Job Numbers Awaiting Confirmation <%= pendingJobs.length %> pending
<% pendingJobs.forEach(j => { %> <% }) %>
Job # Submission Details Actions
<%= j.job_number %> <%= j.description %>
<% } %>

Confirmed / Active Job Numbers

<% if (activeJobs && activeJobs.length > 0) { %>
<% activeJobs.forEach(j => { %> <% }) %>
Job #DescriptionAction
<%= j.job_number %> <%= j.description || '—' %>
<% } else { %>

No active job numbers yet. Add one above to enable grouping on expense forms and exports.

<% } %>

Registration Card Whitelist

<%= whitelist.length %> authorized card(s)

When cards are listed here, only users whose card last 4 digits match can register. If the list is empty, anyone can register. Suspended cards cannot be used for registration or credit card expense submissions.

<% if (whitelist && whitelist.length > 0) { %> <% const todayStr = new Date().toISOString().split('T')[0]; const in60Days = new Date(Date.now() + 60 * 24 * 60 * 60 * 1000).toISOString().split('T')[0]; const expiringCards = whitelist.filter(w => w.expiry_date && w.expiry_date >= todayStr && w.expiry_date <= in60Days); %> <% if (expiringCards.length > 0) { %>
Upcoming Expiries (Next 60 Days): <% expiringCards.forEach((c, idx) => { %> ****<%= c.card_digits %> (<%= c.label || 'No Name' %>) expires on <%= c.expiry_date %><%= idx < expiringCards.length - 1 ? ', ' : '' %> <% }) %>
<% } %>
<% whitelist.forEach(w => { %> <% }) %>
Card (last 4) Label Expiry Date Status Added Actions
****<%= w.card_digits %> <%= w.label || '—' %> <% if (w.expiry_date) { %> <%= w.expiry_date %> <% if (w.expiry_date <= todayStr) { %> (Expired) <% } %> <% } else { %> No Expiry <% } %> <%= w.status %> <%= (w.created_at || '').toString().split('T')[0] %>
<% } else { %>

No cards in whitelist — open registration (anyone can sign up).
Add a card above to restrict registration.

<% } %>

Division Management

<%= divisions.length %> division(s)
<% if (divisions && divisions.length > 0) { %>
<% divisions.forEach(d => { %> <% }) %>
Division Name Actions
<%= d.name %>
<% } else { %>

No divisions created yet. Add one above to organize your users.

<% } %>

Reimbursement Expense Types & WBS Codes

<%= reimbursementTypes.length %> type(s)
<% if (reimbursementTypes && reimbursementTypes.length > 0) { %>
<% reimbursementTypes.forEach(t => { %> <% }) %>
Expense Type Associated WBS Code Actions
<%= t.name %> <%= t.wbs_code || '—' %>
<% } else { %>

No reimbursement expense types configured yet.

<% } %>

Gas Card Management

<%= gasCards.length %> gas card(s)
<% if (gasCards && gasCards.length > 0) { %>
<% gasCards.forEach(gc => { %> <% }) %>
Card Number Type Expiry Truck Assigned Assigned User Status Actions
•••• •••• •••• <%= gc.card_number.slice(-4) %> Full number ends in <%= gc.card_number.slice(-4) %> <%= gc.card_type %> <%= gc.expiry_date %> <%= gc.truck_assigned || '—' %>
<% if (gc.active === 1) { %> <% } else { %> <% } %>
<% } else { %>

No gas cards configured yet.

<% } %>
<%- include('partials/footer') %>