From 1ef535d13253f34b227b5e485a7c9a5cb6131b07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Cmit=20Tun=C3=A7?= Date: Fri, 29 May 2026 07:18:26 +0300 Subject: [PATCH] feat: add SWIFT code field to bank accounts and update card UI for improved copy functionality and layout responsiveness. --- .../Schemas/Sections/BankAccountsSection.php | 6 + .../corporate/bank-accounts.blade.php | 369 ++++++++++++++++-- 2 files changed, 342 insertions(+), 33 deletions(-) diff --git a/app/Filament/Admin/Resources/Pages/Schemas/Sections/BankAccountsSection.php b/app/Filament/Admin/Resources/Pages/Schemas/Sections/BankAccountsSection.php index 441f22d..034fb73 100644 --- a/app/Filament/Admin/Resources/Pages/Schemas/Sections/BankAccountsSection.php +++ b/app/Filament/Admin/Resources/Pages/Schemas/Sections/BankAccountsSection.php @@ -47,8 +47,14 @@ class BankAccountsSection 'GBP' => 'Sterlin (£)', ]) ->default('TRY') + ->live() ->required(), + TextInput::make('swift_code') + ->label('SWIFT / BIC') + ->placeholder('Örn: TRHBTR2A') + ->required(fn (Get $get): bool => $get('currency') !== 'TRY'), + FileUpload::make('logo') ->label('Banka Logosu') ->image() diff --git a/resources/views/templates/corporate/bank-accounts.blade.php b/resources/views/templates/corporate/bank-accounts.blade.php index 7afcf22..5fd744b 100644 --- a/resources/views/templates/corporate/bank-accounts.blade.php +++ b/resources/views/templates/corporate/bank-accounts.blade.php @@ -35,7 +35,6 @@ .bank-account-card__header { position: relative; padding: 2rem 1.5rem 1.75rem; - background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); border-bottom: 1px solid #e2e8f0; text-align: center; min-height: 180px; @@ -46,21 +45,19 @@ } .bank-account-card__logo-wrap { width: 100%; - max-width: 220px; - height: 88px; + max-width: 240px; + height: 100px; display: flex; align-items: center; justify-content: center; - padding: 0.75rem 1rem; - background: #ffffff; - border-radius: 1rem; - border: 1px solid #e2e8f0; - box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06); + padding: 0; + background: transparent; + border: none; + box-shadow: none; margin: 0 auto; } .bank-account-card__logo-wrap img { max-width: 100%; - max-height: 72px; width: auto; height: auto; object-fit: contain; @@ -135,8 +132,7 @@ border-top: 1px dashed #e2e8f0; } .bank-account-card__iban { - font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; - font-size: 0.9375rem; + font-size: 0.8375rem; font-weight: 700; color: var(--bs-primary); letter-spacing: 0.02em; @@ -148,7 +144,34 @@ border: 1px solid #e2e8f0; user-select: all; } - .bank-account-card__copy-btn { + .bank-account-card__copy-btn-icon { + position: absolute; + right: 8px; + top: 8px; + bottom: 8px; + margin: auto 0; + display: inline-flex; + align-items: center; + justify-content: center; + border: none; + background: transparent; + width: 34px; + height: 34px; + color: var(--bs-primary); + cursor: pointer; + transition: color 0.2s, transform 0.1s; + z-index: 2; + } + .bank-account-card__copy-btn-icon:hover { + color: #0f172a; + } + .bank-account-card__copy-btn-icon:active { + transform: scale(0.9); + } + .bank-account-card__copy-btn-icon.is-copied { + color: #16a34a; + } + .bank-account-card__swift-copy-btn { display: inline-flex; align-items: center; gap: 0.35rem; @@ -162,11 +185,11 @@ cursor: pointer; transition: opacity 0.2s; } - .bank-account-card__copy-btn:hover { + .bank-account-card__swift-copy-btn:hover { opacity: 0.8; text-decoration: underline; } - .bank-account-card__copy-btn.is-copied { + .bank-account-card__swift-copy-btn.is-copied { color: #16a34a; } .bank-account-card__footer-bar { @@ -212,6 +235,123 @@ color: var(--bs-primary); border-bottom-color: var(--bs-primary); } + .bank-accounts-grid { + display: grid; + grid-template-columns: repeat(1, minmax(0, 1fr)); + gap: 1.5rem; + margin-bottom: 2.5rem; + } + @media (min-width: 768px) { + .bank-accounts-grid { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + } + @media (min-width: 1024px) { + .bank-accounts-grid { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + } + .legal-info-box { + background: #ffffff; + border-radius: 1.25rem; + border: 1px solid #e2e8f0; + box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04); + padding: 2.5rem; + margin-top: 3rem; + position: relative; + overflow: hidden; + transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; + } + .legal-info-box:hover { + transform: translateY(-2px); + box-shadow: 0 12px 20px -5px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04); + border-color: #cbd5e1; + } + .legal-info-box__title { + font-size: 1.25rem; + font-weight: 700; + color: #0f172a; + margin-bottom: 1.5rem; + display: flex; + align-items: center; + gap: 0.5rem; + } + .legal-info-box__title i { + color: var(--bs-primary); + font-size: 1.5rem; + } + .legal-info-grid { + display: grid; + grid-template-columns: repeat(1, minmax(0, 1fr)); + gap: 1.5rem; + } + @media (min-width: 768px) { + .legal-info-grid { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + } + @media (min-width: 1024px) { + .legal-info-grid { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + } + .legal-info-item { + display: flex; + flex-direction: column; + } + .legal-info-item__label { + font-size: 0.6875rem; + font-weight: 700; + letter-spacing: 0.08em; + text-transform: uppercase; + color: #94a3b8; + margin-bottom: 0.35rem; + } + .legal-info-item__value { + font-size: 0.9375rem; + font-weight: 600; + color: #1e293b; + line-height: 1.4; + } + .legal-info-box__decor { + position: absolute; + bottom: -20px; + right: -20px; + font-size: 8rem; + color: #f1f5f9; + line-height: 1; + z-index: 0; + pointer-events: none; + } + .legal-info-box__content { + position: relative; + z-index: 1; + } + .btn-copy-inline { + display: inline-flex; + align-items: center; + justify-content: center; + background: transparent; + border: none; + padding: 4px; + color: #94a3b8; + cursor: pointer; + font-size: 0.875rem; + line-height: 1; + border-radius: 4px; + flex-shrink: 0; + transition: color 0.2s, background-color 0.2s, transform 0.1s; + } + .btn-copy-inline:hover { + color: var(--bs-primary); + background-color: #f1f5f9; + } + .btn-copy-inline:active { + transform: scale(0.9); + } + .btn-copy-inline.is-copied { + color: #16a34a; + }
@@ -233,13 +373,13 @@ -
+
@forelse($accounts as $index => $account) @php $currency = $account['currency'] ?? 'TRY'; $currencyLabel = ($currencySymbols[$currency] ?? '') . ' ' . $currency; @endphp -
+
+ + + @if($page->content)
@@ -316,9 +567,35 @@ @push('scripts') @endpush