feat: add multilingual support to bank accounts and legal information sections
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
'EUR' => '€',
|
||||
'GBP' => '£',
|
||||
];
|
||||
$locale = app()->getLocale();
|
||||
$isTr = ($locale === 'tr');
|
||||
@endphp
|
||||
|
||||
<style>
|
||||
@@ -541,8 +543,8 @@
|
||||
<i class="uil uil-university"></i>
|
||||
</div>
|
||||
<div>
|
||||
<h4 class="mb-0 fs-16 font-bold">{!! t('Banka Hesapları') !!}</h4>
|
||||
<span class="fs-12 text-muted">{!! t('EFT / Havale Bilgileri') !!}</span>
|
||||
<h4 class="mb-0 fs-16 font-bold">{!! $isTr ? t('Banka Hesapları') : t('Bank Accounts') !!}</h4>
|
||||
<span class="fs-12 text-muted">{!! $isTr ? t('EFT / Havale Bilgileri') : t('EFT / Wire Transfer Details') !!}</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
@@ -552,8 +554,8 @@
|
||||
<i class="uil uil-shield-check"></i>
|
||||
</div>
|
||||
<div>
|
||||
<h4 class="mb-0 fs-16 font-bold">{!! t('Yasal Bilgiler') !!}</h4>
|
||||
<span class="fs-12 text-muted">{!! t('Fatura & Sicil Kayıtları') !!}</span>
|
||||
<h4 class="mb-0 fs-16 font-bold">{!! $isTr ? t('Yasal Bilgiler') : t('Legal Information') !!}</h4>
|
||||
<span class="fs-12 text-muted">{!! $isTr ? t('Fatura & Sicil Kayıtları') : t('Billing & Registry Records') !!}</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
@@ -563,8 +565,8 @@
|
||||
<i class="uil uil-file-check-alt"></i>
|
||||
</div>
|
||||
<div>
|
||||
<h4 class="mb-0 fs-16 font-bold">{!! t('Antetli Kağıt') !!}</h4>
|
||||
<span class="fs-12 text-muted">{!! t('Resmi Yazı & Hızlı Yazdır') !!}</span>
|
||||
<h4 class="mb-0 fs-16 font-bold">{!! $isTr ? t('Antetli Kağıt') : t('Letterhead') !!}</h4>
|
||||
<span class="fs-12 text-muted">{!! $isTr ? t('Resmi Yazı & Hızlı Yazdır') : t('Official Letter & Quick Print') !!}</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
@@ -612,7 +614,7 @@
|
||||
@endif
|
||||
|
||||
<div class="bank-account-card__field">
|
||||
<span class="bank-account-card__label">{!! t('Hesap Sahibi') !!}</span>
|
||||
<span class="bank-account-card__label">{!! $isTr ? t('Hesap Sahibi') : t('Account Holder') !!}</span>
|
||||
<div class="bank-account-card__value">{{ $account['account_holder'] }}</div>
|
||||
</div>
|
||||
|
||||
@@ -624,9 +626,9 @@
|
||||
type="button"
|
||||
class="bank-account-card__copy-btn-icon"
|
||||
data-iban="{{ $account['iban'] }}"
|
||||
data-copy-label="{!! t('Kopyala') !!}"
|
||||
data-copied-label="{!! t('Kopyalandı') !!}"
|
||||
aria-label="{!! t('IBAN kopyala') !!}"
|
||||
data-copy-label="{!! $isTr ? t('Kopyala') : t('Copy') !!}"
|
||||
data-copied-label="{!! $isTr ? t('Kopyalandı') : t('Copied') !!}"
|
||||
aria-label="{!! $isTr ? t('IBAN kopyala') : t('Copy IBAN') !!}"
|
||||
>
|
||||
<i class="uil uil-copy" style="font-size: 1.15rem;"></i>
|
||||
</button>
|
||||
@@ -645,9 +647,9 @@
|
||||
type="button"
|
||||
class="bank-account-card__copy-btn-icon"
|
||||
data-iban="{{ $swiftCode }}"
|
||||
data-copy-label="{!! t('Kopyala') !!}"
|
||||
data-copied-label="{!! t('Kopyalandı') !!}"
|
||||
aria-label="{!! t('SWIFT kopyala') !!}"
|
||||
data-copy-label="{!! $isTr ? t('Kopyala') : t('Copy') !!}"
|
||||
data-copied-label="{!! $isTr ? t('Kopyalandı') : t('Copied') !!}"
|
||||
aria-label="{!! $isTr ? t('SWIFT kopyala') : t('Copy SWIFT') !!}"
|
||||
>
|
||||
<i class="uil uil-copy" style="font-size: 1.15rem;"></i>
|
||||
</button>
|
||||
@@ -663,8 +665,8 @@
|
||||
<div class="col-12">
|
||||
<div class="bank-accounts-empty">
|
||||
<i class="uil uil-wallet text-6xl text-slate-300 mb-4 d-block"></i>
|
||||
<h3 class="h4 text-slate-500 mb-2">{!! t('Henüz banka hesabı eklenmemiş.') !!}</h3>
|
||||
<p class="text-slate-400 mb-0">{!! t('Yönetim panelinden banka hesaplarınızı ekleyebilirsiniz.') !!}</p>
|
||||
<h3 class="h4 text-slate-500 mb-2">{!! $isTr ? t('Henüz banka hesabı eklenmemiş.') : t('No bank accounts have been added yet.') !!}</h3>
|
||||
<p class="text-slate-400 mb-0">{!! $isTr ? t('Yönetim panelinden banka hesaplarınızı ekleyebilirsiniz.') : t('You can add your bank accounts from the administration panel.') !!}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endforelse
|
||||
@@ -681,11 +683,11 @@
|
||||
<div class="text-center mb-6 d-flex justify-content-center gap-3 flex-wrap">
|
||||
<button type="button" class="btn btn-outline-primary rounded-pill px-4 shadow-sm" onclick="window.print()">
|
||||
<i class="uil uil-print me-2" style="font-size: 1.2rem; vertical-align: middle;"></i>
|
||||
<strong>{!! t('Yazdır / Print') !!}</strong>
|
||||
<strong>{!! $isTr ? t('Yazdır') : t('Print') !!}</strong>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary rounded-pill px-4 shadow-sm text-white" style="background-color: #e31e24 !important; border-color: #e31e24 !important; color: #ffffff !important;" onclick="downloadPDF(this)">
|
||||
<i class="uil uil-file-download-alt me-2" style="font-size: 1.2rem; vertical-align: middle;"></i>
|
||||
<strong>{!! t('PDF İndir / Download PDF') !!}</strong>
|
||||
<strong>{!! $isTr ? t('PDF İndir') : t('Download PDF') !!}</strong>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -792,6 +794,15 @@ function downloadPDF(btn) {
|
||||
|
||||
function run() {
|
||||
var element = document.getElementById('letterheadPrintArea');
|
||||
|
||||
// Save original styles
|
||||
var originalShadow = element.style.boxShadow;
|
||||
var originalHeight = element.style.height;
|
||||
|
||||
// Apply temporary safe styles for PDF capture to fit exactly in 1 page (A4 is 297mm)
|
||||
element.style.boxShadow = 'none';
|
||||
element.style.height = '296mm';
|
||||
|
||||
var opt = {
|
||||
margin: 0,
|
||||
filename: 'truncgil-bank-accounts.pdf',
|
||||
@@ -801,10 +812,18 @@ function downloadPDF(btn) {
|
||||
};
|
||||
|
||||
html2pdf().set(opt).from(element).save().then(function() {
|
||||
// Restore styles
|
||||
element.style.boxShadow = originalShadow;
|
||||
element.style.height = originalHeight;
|
||||
|
||||
btn.disabled = false;
|
||||
btn.innerHTML = originalHTML;
|
||||
}).catch(function(err) {
|
||||
console.error(err);
|
||||
// Restore styles
|
||||
element.style.boxShadow = originalShadow;
|
||||
element.style.height = originalHeight;
|
||||
|
||||
btn.disabled = false;
|
||||
btn.innerHTML = originalHTML;
|
||||
});
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
@php
|
||||
$locale = app()->getLocale();
|
||||
$isTr = ($locale === 'tr');
|
||||
@endphp
|
||||
|
||||
<!-- Legal Info Box -->
|
||||
<div class="legal-info-box">
|
||||
<div class="legal-info-box__decor" aria-hidden="true">
|
||||
@@ -6,32 +11,32 @@
|
||||
<div class="legal-info-box__content">
|
||||
<h3 class="legal-info-box__title">
|
||||
<i class="uil uil-info-circle"></i>
|
||||
<span>{!! t('Yasal & Fatura Bilgileri') !!}</span>
|
||||
<span>{!! $isTr ? t('Yasal & Fatura Bilgileri') : t('Legal & Billing Information') !!}</span>
|
||||
</h3>
|
||||
<div class="legal-info-grid">
|
||||
<div class="legal-info-item">
|
||||
<span class="legal-info-item__label">{!! t('Firma Ünvanı') !!}</span>
|
||||
<span class="legal-info-item__label">{!! $isTr ? t('Firma Ünvanı') : t('Company Name') !!}</span>
|
||||
<div class="legal-info-item__value d-flex align-items-center justify-content-between gap-2">
|
||||
<span>{!! t('TRUNÇGİL TEKNOLOJİ SANAYİ VE TİCARET LİMİTED ŞİRKETİ') !!}</span>
|
||||
<button type="button" class="btn-copy-inline" data-copy-target="TRUNÇGİL TEKNOLOJİ SANAYİ VE TİCARET LİMİTED ŞİRKETİ" aria-label="{!! t('Kopyala') !!}">
|
||||
<button type="button" class="btn-copy-inline" data-copy-target="TRUNÇGİL TEKNOLOJİ SANAYİ VE TİCARET LİMİTED ŞİRKETİ" aria-label="{!! $isTr ? t('Kopyala') : t('Copy') !!}">
|
||||
<i class="uil uil-copy"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="legal-info-item">
|
||||
<span class="legal-info-item__label">{!! t('Vergi Dairesi') !!}</span>
|
||||
<span class="legal-info-item__label">{!! $isTr ? t('Vergi Dairesi') : t('Tax Office') !!}</span>
|
||||
<div class="legal-info-item__value d-flex align-items-center justify-content-between gap-2">
|
||||
<span>{!! t('Şahinbey V.D.') !!}</span>
|
||||
<button type="button" class="btn-copy-inline" data-copy-target="Şahinbey V.D." aria-label="{!! t('Kopyala') !!}">
|
||||
<span>{!! $isTr ? t('Şahinbey V.D.') : t('Sahinbey Tax Office') !!}</span>
|
||||
<button type="button" class="btn-copy-inline" data-copy-target="{{ $isTr ? 'Şahinbey V.D.' : 'Sahinbey Tax Office' }}" aria-label="{!! $isTr ? t('Kopyala') : t('Copy') !!}">
|
||||
<i class="uil uil-copy"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="legal-info-item">
|
||||
<span class="legal-info-item__label">{!! t('Vergi Numarası') !!}</span>
|
||||
<span class="legal-info-item__label">{!! $isTr ? t('Vergi Numarası') : t('Tax ID') !!}</span>
|
||||
<div class="legal-info-item__value d-flex align-items-center justify-content-between gap-2">
|
||||
<span>8591492435</span>
|
||||
<button type="button" class="btn-copy-inline" data-copy-target="8591492435" aria-label="{!! t('Kopyala') !!}">
|
||||
<button type="button" class="btn-copy-inline" data-copy-target="8591492435" aria-label="{!! $isTr ? t('Kopyala') : t('Copy') !!}">
|
||||
<i class="uil uil-copy"></i>
|
||||
</button>
|
||||
</div>
|
||||
@@ -40,7 +45,7 @@
|
||||
<span class="legal-info-item__label">{!! t('MERSİS No') !!}</span>
|
||||
<div class="legal-info-item__value d-flex align-items-center justify-content-between gap-2">
|
||||
<span>0859149243500001</span>
|
||||
<button type="button" class="btn-copy-inline" data-copy-target="0859149243500001" aria-label="{!! t('Kopyala') !!}">
|
||||
<button type="button" class="btn-copy-inline" data-copy-target="0859149243500001" aria-label="{!! $isTr ? t('Kopyala') : t('Copy') !!}">
|
||||
<i class="uil uil-copy"></i>
|
||||
</button>
|
||||
</div>
|
||||
@@ -49,34 +54,34 @@
|
||||
<span class="legal-info-item__label">{!! t('D-U-N-S No') !!}</span>
|
||||
<div class="legal-info-item__value d-flex align-items-center justify-content-between gap-2">
|
||||
<span>595948152</span>
|
||||
<button type="button" class="btn-copy-inline" data-copy-target="595948152" aria-label="{!! t('Kopyala') !!}">
|
||||
<button type="button" class="btn-copy-inline" data-copy-target="595948152" aria-label="{!! $isTr ? t('Kopyala') : t('Copy') !!}">
|
||||
<i class="uil uil-copy"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="legal-info-item">
|
||||
<span class="legal-info-item__label">{!! t('SGK Sicil No') !!}</span>
|
||||
<span class="legal-info-item__label">{!! $isTr ? t('SGK Sicil No') : t('Social Security Register No') !!}</span>
|
||||
<div class="legal-info-item__value d-flex align-items-center justify-content-between gap-2">
|
||||
<span>2-6210-0101-1219355-027-08-80-000</span>
|
||||
<button type="button" class="btn-copy-inline" data-copy-target="2-6210-0101-1219355-027-08-80-000" aria-label="{!! t('Kopyala') !!}">
|
||||
<button type="button" class="btn-copy-inline" data-copy-target="2-6210-0101-1219355-027-08-80-000" aria-label="{!! $isTr ? t('Kopyala') : t('Copy') !!}">
|
||||
<i class="uil uil-copy"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="legal-info-item">
|
||||
<span class="legal-info-item__label">{!! t('E-Posta') !!}</span>
|
||||
<span class="legal-info-item__label">{!! $isTr ? t('E-Posta') : t('Email') !!}</span>
|
||||
<div class="legal-info-item__value d-flex align-items-center justify-content-between gap-2">
|
||||
<a href="mailto:info@truncgil.com.tr" class="text-reset" style="text-decoration: none;">info@truncgil.com.tr</a>
|
||||
<button type="button" class="btn-copy-inline" data-copy-target="info@truncgil.com.tr" aria-label="{!! t('Kopyala') !!}">
|
||||
<button type="button" class="btn-copy-inline" data-copy-target="info@truncgil.com.tr" aria-label="{!! $isTr ? t('Kopyala') : t('Copy') !!}">
|
||||
<i class="uil uil-copy"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="legal-info-item">
|
||||
<span class="legal-info-item__label">{!! t('Adres') !!}</span>
|
||||
<span class="legal-info-item__label">{!! $isTr ? t('Adres') : t('Address') !!}</span>
|
||||
<div class="legal-info-item__value d-flex align-items-center justify-content-between gap-2">
|
||||
<span>{!! t('Çamtepe Mah. Mahmut Tevfik Atay Bul. Gaziantep Teknopark No: 4A İç Kapı No: 1 Şahinbey / Gaziantep') !!}</span>
|
||||
<button type="button" class="btn-copy-inline" data-copy-target="Çamtepe Mah. Mahmut Tevfik Atay Bul. Gaziantep Teknopark No: 4A İç Kapı No: 1 Şahinbey / Gaziantep" aria-label="{!! t('Kopyala') !!}">
|
||||
<span>{!! $isTr ? t('Çamtepe Mah. Mahmut Tevfik Atay Bul. Gaziantep Teknopark No: 4A İç Kapı No: 1 Şahinbey / Gaziantep') : t('Camtepe Mah. Mahmut Tevfik Atay Bul. Gaziantep Teknopark No: 4A Interior Door No: 1 Sahinbey / Gaziantep / TURKEY') !!}</span>
|
||||
<button type="button" class="btn-copy-inline" data-copy-target="{{ $isTr ? 'Çamtepe Mah. Mahmut Tevfik Atay Bul. Gaziantep Teknopark No: 4A İç Kapı No: 1 Şahinbey / Gaziantep' : 'Camtepe Mah. Mahmut Tevfik Atay Bul. Gaziantep Teknopark No: 4A Interior Door No: 1 Sahinbey / Gaziantep / TURKEY' }}" aria-label="{!! $isTr ? t('Kopyala') : t('Copy') !!}">
|
||||
<i class="uil uil-copy"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user