Files
2026-05-31 22:40:02 -04:00

63 lines
2.9 KiB
HTML

{% extends "base.html" %}
{% block title %}Map Accounts{% endblock %}
{% block page_title %}Map Bank Accounts{% endblock %}
{% block content %}
<div class="row justify-content-center">
<div class="col-12 col-lg-7">
<div class="pcard mb-3" style="background:#f0fdf4;border-color:#bbf7d0;">
<div style="font-size:13px;color:#166534;">
<i class="bi bi-check-circle-fill me-2"></i>
<strong>{{ enrollment.institution_name }}</strong> connected successfully.
Map each account below to a PFM account, or create a new one automatically.
</div>
</div>
<div class="pcard">
<form method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
{% for ta in teller_accounts %}
<div class="mb-4 pb-4" style="{% if not loop.last %}border-bottom:1px solid var(--border);{% endif %}">
<div class="d-flex align-items-center gap-2 mb-2">
<div style="width:36px;height:36px;border-radius:9px;background:#dbeafe;color:#1e40af;display:flex;align-items:center;justify-content:center;font-size:16px;">
<i class="bi {% if ta.account_subtype == 'credit_card' %}bi-credit-card{% elif ta.account_subtype == 'savings' %}bi-piggy-bank{% else %}bi-bank{% endif %}"></i>
</div>
<div>
<div style="font-size:14px;font-weight:600;">{{ ta.account_name }}</div>
<div style="font-size:11px;color:var(--muted);">
{{ ta.institution_name }} · {{ ta.account_subtype | replace('_',' ') | title }}
· ID: <span class="mono">{{ ta.teller_account_id[-8:] }}</span>
</div>
</div>
</div>
<label class="form-label" style="font-size:13px;font-weight:500;">Map to PFM Account</label>
<select name="pfm_account_{{ ta.id }}" class="form-select form-select-sm">
<option value="">— Skip this account —</option>
<option value="new" {% if not pfm_accounts %}selected{% endif %}>
✨ Create new account automatically
</option>
{% for acct in pfm_accounts %}
<option value="{{ acct.id }}" {% if ta.pfm_account_id == acct.id %}selected{% endif %}>
{{ acct.name }} ({{ acct.account_type | replace('_',' ') | title }})
</option>
{% endfor %}
</select>
<small class="text-muted" style="font-size:11px;">
"Create new" auto-names the account "{{ ta.institution_name }} — {{ ta.account_name }}"
</small>
</div>
{% endfor %}
<div class="d-flex gap-2 mt-2">
<button type="submit" class="btn btn-primary">Save Mapping & Continue</button>
<a href="{{ url_for('teller.index') }}" class="btn btn-outline-secondary">Cancel</a>
</div>
</form>
</div>
</div>
</div>
{% endblock %}