Implement full online membership application workflow: - 3-step wizard form with KRS/CEIDG auto-fill - Admin panel for application review (approve/reject/request changes) - Company data update requests for existing members - Dashboard CTA for users without company - API endpoints for NIP lookup and draft management New files: - database/migrations/042_membership_applications.sql - blueprints/membership/ (routes, templates) - blueprints/admin/routes_membership.py - blueprints/api/routes_membership.py - templates/membership/ and templates/admin/membership*.html Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
371 lines
11 KiB
HTML
371 lines
11 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Status Deklaracji - Norda Biznes Partner{% endblock %}
|
|
|
|
{% block extra_css %}
|
|
<style>
|
|
.status-container {
|
|
max-width: 800px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.status-header {
|
|
margin-bottom: var(--spacing-2xl);
|
|
}
|
|
|
|
.status-header h1 {
|
|
font-size: var(--font-size-2xl);
|
|
color: var(--text-primary);
|
|
margin: 0 0 var(--spacing-sm) 0;
|
|
}
|
|
|
|
.no-applications {
|
|
background: var(--surface);
|
|
padding: var(--spacing-2xl);
|
|
border-radius: var(--radius-lg);
|
|
text-align: center;
|
|
}
|
|
|
|
.no-applications p {
|
|
color: var(--text-secondary);
|
|
margin-bottom: var(--spacing-lg);
|
|
}
|
|
|
|
.btn-apply {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--spacing-sm);
|
|
padding: var(--spacing-md) var(--spacing-xl);
|
|
background: var(--primary);
|
|
color: white;
|
|
text-decoration: none;
|
|
border-radius: var(--radius);
|
|
font-weight: 500;
|
|
transition: var(--transition);
|
|
}
|
|
|
|
.btn-apply:hover {
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.application-card {
|
|
background: var(--surface);
|
|
padding: var(--spacing-xl);
|
|
border-radius: var(--radius-lg);
|
|
box-shadow: var(--shadow);
|
|
margin-bottom: var(--spacing-lg);
|
|
}
|
|
|
|
.application-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
margin-bottom: var(--spacing-lg);
|
|
}
|
|
|
|
.application-title {
|
|
font-size: var(--font-size-lg);
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
margin: 0;
|
|
}
|
|
|
|
.application-nip {
|
|
color: var(--text-secondary);
|
|
font-size: var(--font-size-sm);
|
|
}
|
|
|
|
.status-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--spacing-xs);
|
|
padding: var(--spacing-xs) var(--spacing-md);
|
|
border-radius: var(--radius-full);
|
|
font-size: var(--font-size-sm);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.status-draft {
|
|
background: var(--warning-light);
|
|
color: var(--warning);
|
|
}
|
|
|
|
.status-submitted {
|
|
background: rgba(59, 130, 246, 0.1);
|
|
color: #3b82f6;
|
|
}
|
|
|
|
.status-under_review {
|
|
background: rgba(168, 85, 247, 0.1);
|
|
color: #a855f7;
|
|
}
|
|
|
|
.status-changes_requested {
|
|
background: rgba(251, 146, 60, 0.1);
|
|
color: #fb923c;
|
|
}
|
|
|
|
.status-approved {
|
|
background: var(--success-light);
|
|
color: var(--success);
|
|
}
|
|
|
|
.status-rejected {
|
|
background: var(--error-light);
|
|
color: var(--error);
|
|
}
|
|
|
|
.application-dates {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
|
gap: var(--spacing-md);
|
|
margin-bottom: var(--spacing-lg);
|
|
padding: var(--spacing-md);
|
|
background: var(--background);
|
|
border-radius: var(--radius);
|
|
}
|
|
|
|
.date-item {
|
|
font-size: var(--font-size-sm);
|
|
}
|
|
|
|
.date-label {
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.date-value {
|
|
font-weight: 500;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.review-comment {
|
|
background: var(--background);
|
|
border-left: 4px solid var(--warning);
|
|
padding: var(--spacing-md);
|
|
border-radius: var(--radius);
|
|
margin-bottom: var(--spacing-lg);
|
|
}
|
|
|
|
.review-comment.rejected {
|
|
border-color: var(--error);
|
|
}
|
|
|
|
.review-comment h4 {
|
|
margin: 0 0 var(--spacing-sm) 0;
|
|
font-size: var(--font-size-sm);
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.review-comment p {
|
|
margin: 0;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.application-actions {
|
|
display: flex;
|
|
gap: var(--spacing-md);
|
|
}
|
|
|
|
.btn-continue {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--spacing-sm);
|
|
padding: var(--spacing-sm) var(--spacing-lg);
|
|
background: var(--primary);
|
|
color: white;
|
|
text-decoration: none;
|
|
border-radius: var(--radius);
|
|
font-weight: 500;
|
|
transition: var(--transition);
|
|
}
|
|
|
|
.btn-continue:hover {
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.member-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--spacing-sm);
|
|
padding: var(--spacing-sm) var(--spacing-lg);
|
|
background: var(--success-light);
|
|
color: var(--success);
|
|
border-radius: var(--radius);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.timeline {
|
|
position: relative;
|
|
padding-left: var(--spacing-xl);
|
|
}
|
|
|
|
.timeline::before {
|
|
content: '';
|
|
position: absolute;
|
|
left: 8px;
|
|
top: 0;
|
|
bottom: 0;
|
|
width: 2px;
|
|
background: var(--border);
|
|
}
|
|
|
|
.timeline-item {
|
|
position: relative;
|
|
padding-bottom: var(--spacing-lg);
|
|
}
|
|
|
|
.timeline-item::before {
|
|
content: '';
|
|
position: absolute;
|
|
left: calc(-1 * var(--spacing-xl) + 4px);
|
|
top: 4px;
|
|
width: 10px;
|
|
height: 10px;
|
|
border-radius: 50%;
|
|
background: var(--border);
|
|
}
|
|
|
|
.timeline-item.completed::before {
|
|
background: var(--success);
|
|
}
|
|
|
|
.timeline-item.current::before {
|
|
background: var(--primary);
|
|
box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.2);
|
|
}
|
|
|
|
.timeline-label {
|
|
font-weight: 500;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.timeline-date {
|
|
font-size: var(--font-size-sm);
|
|
color: var(--text-secondary);
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="status-container">
|
|
<div class="status-header">
|
|
<h1>Moje deklaracje członkowskie</h1>
|
|
<p class="text-muted">Historia Twoich zgłoszeń do Izby NORDA</p>
|
|
</div>
|
|
|
|
{% if not applications %}
|
|
<div class="no-applications">
|
|
<p>Nie masz jeszcze żadnych deklaracji członkowskich.</p>
|
|
<a href="{{ url_for('membership.apply') }}" class="btn-apply">
|
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<line x1="12" y1="5" x2="12" y2="19"/>
|
|
<line x1="5" y1="12" x2="19" y2="12"/>
|
|
</svg>
|
|
Złóż deklarację
|
|
</a>
|
|
</div>
|
|
{% else %}
|
|
|
|
{% for app in applications %}
|
|
<div class="application-card">
|
|
<div class="application-header">
|
|
<div>
|
|
<h2 class="application-title">{{ app.company_name or 'Nowa deklaracja' }}</h2>
|
|
{% if app.nip %}
|
|
<div class="application-nip">NIP: {{ app.nip }}</div>
|
|
{% endif %}
|
|
</div>
|
|
<span class="status-badge status-{{ app.status }}">
|
|
{{ app.status_label }}
|
|
</span>
|
|
</div>
|
|
|
|
<div class="application-dates">
|
|
<div class="date-item">
|
|
<div class="date-label">Utworzono</div>
|
|
<div class="date-value">{{ app.created_at.strftime('%Y-%m-%d %H:%M') if app.created_at else '-' }}</div>
|
|
</div>
|
|
{% if app.submitted_at %}
|
|
<div class="date-item">
|
|
<div class="date-label">Wysłano</div>
|
|
<div class="date-value">{{ app.submitted_at.strftime('%Y-%m-%d %H:%M') }}</div>
|
|
</div>
|
|
{% endif %}
|
|
{% if app.reviewed_at %}
|
|
<div class="date-item">
|
|
<div class="date-label">Rozpatrzono</div>
|
|
<div class="date-value">{{ app.reviewed_at.strftime('%Y-%m-%d %H:%M') }}</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% if app.review_comment and app.status in ['changes_requested', 'rejected'] %}
|
|
<div class="review-comment {% if app.status == 'rejected' %}rejected{% endif %}">
|
|
<h4>{% if app.status == 'changes_requested' %}Wymagane poprawki{% else %}Powód odrzucenia{% endif %}</h4>
|
|
<p>{{ app.review_comment }}</p>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="application-actions">
|
|
{% if app.status in ['draft', 'changes_requested'] %}
|
|
<a href="{{ url_for('membership.apply_step', step=1) }}" class="btn-continue">
|
|
{% if app.status == 'draft' %}
|
|
Kontynuuj wypełnianie
|
|
{% else %}
|
|
Wprowadź poprawki
|
|
{% endif %}
|
|
→
|
|
</a>
|
|
{% elif app.status == 'approved' %}
|
|
<div class="member-badge">
|
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/>
|
|
<polyline points="22,4 12,14.01 9,11.01"/>
|
|
</svg>
|
|
{% if app.member_number %}Nr członkowski: {{ app.member_number }}{% else %}Członek Izby NORDA{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% if app.status != 'draft' %}
|
|
<div class="timeline" style="margin-top: var(--spacing-xl);">
|
|
<div class="timeline-item completed">
|
|
<div class="timeline-label">Złożono deklarację</div>
|
|
<div class="timeline-date">{{ app.submitted_at.strftime('%Y-%m-%d') if app.submitted_at else '-' }}</div>
|
|
</div>
|
|
|
|
{% if app.status in ['under_review', 'approved', 'rejected', 'changes_requested'] %}
|
|
<div class="timeline-item {% if app.status == 'under_review' %}current{% else %}completed{% endif %}">
|
|
<div class="timeline-label">W trakcie rozpatrywania</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if app.status == 'changes_requested' %}
|
|
<div class="timeline-item current">
|
|
<div class="timeline-label">Wymagane poprawki</div>
|
|
<div class="timeline-date">{{ app.reviewed_at.strftime('%Y-%m-%d') if app.reviewed_at else '' }}</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if app.status == 'approved' %}
|
|
<div class="timeline-item completed">
|
|
<div class="timeline-label">Zatwierdzono</div>
|
|
<div class="timeline-date">{{ app.reviewed_at.strftime('%Y-%m-%d') if app.reviewed_at else '' }}</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if app.status == 'rejected' %}
|
|
<div class="timeline-item" style="opacity: 0.5;">
|
|
<div class="timeline-label">Odrzucono</div>
|
|
<div class="timeline-date">{{ app.reviewed_at.strftime('%Y-%m-%d') if app.reviewed_at else '' }}</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|