feat: add contact action buttons on person detail page
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions

- Send private message (primary action)
- Call phone (if visible)
- Send email (if visible)
- View company profile

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Maciej Pienczyn 2026-03-12 09:59:34 +01:00
parent b045cede3d
commit 869eecc589

View File

@ -159,6 +159,56 @@
font-size: var(--font-size-sm);
}
.contact-actions {
display: flex;
gap: var(--spacing-sm);
flex-wrap: wrap;
margin-top: var(--spacing-lg);
padding-top: var(--spacing-lg);
border-top: 1px solid var(--border);
}
.contact-btn {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 10px 20px;
border-radius: var(--radius-lg);
font-size: var(--font-size-sm);
font-weight: 600;
text-decoration: none;
transition: var(--transition);
cursor: pointer;
}
.contact-btn svg {
width: 18px;
height: 18px;
}
.contact-btn.primary {
background: var(--primary);
color: white;
}
.contact-btn.primary:hover {
background: var(--primary-dark, #1e40af);
transform: translateY(-1px);
box-shadow: var(--shadow);
}
.contact-btn.secondary {
background: var(--background);
color: var(--text-primary);
border: 1px solid var(--border);
}
.contact-btn.secondary:hover {
border-color: var(--primary);
color: var(--primary);
transform: translateY(-1px);
}
.back-link {
display: inline-flex;
align-items: center;
@ -231,6 +281,41 @@
</div>
{% endif %}
</div>
{% if portal_user.id != current_user.id %}
<div class="contact-actions">
<a href="{{ url_for('messages.messages_new', to=portal_user.id) }}" class="contact-btn primary">
<svg fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" d="M8 10h.01M12 10h.01M16 10h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"/>
</svg>
Napisz wiadomość
</a>
{% if portal_user.phone and portal_user.privacy_show_phone != False %}
<a href="tel:{{ portal_user.phone }}" class="contact-btn secondary">
<svg fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"/>
</svg>
Zadzwoń
</a>
{% endif %}
{% if portal_user.email and portal_user.privacy_show_email != False %}
<a href="mailto:{{ portal_user.email }}" class="contact-btn secondary">
<svg fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"/>
</svg>
Wyślij e-mail
</a>
{% endif %}
{% if portal_user.company %}
<a href="{{ url_for('company_detail_by_slug', slug=portal_user.company.slug) }}" class="contact-btn secondary">
<svg fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"/>
</svg>
Profil firmy
</a>
{% endif %}
</div>
{% endif %}
</div>
{% else %}
<div class="person-section">