feat: enhance company history module with new font styles, improved localization functions, and optimized layout for better readability

This commit is contained in:
Ümit Tunç
2026-05-21 19:43:54 +03:00
parent 4150931ac8
commit 69710a71b9
6 changed files with 108 additions and 24 deletions
@@ -42,9 +42,7 @@ class EditCompanyHistoryItem extends EditRecord
protected function mutateFormDataBeforeFill(array $data): array
{
$data['translations'] = TranslationTabs::loadTranslations($this->record);
return $data;
return array_merge($data, TranslationTabs::fillFromRecord($this->record));
}
protected function mutateFormDataBeforeSave(array $data): array
+23
View File
@@ -384,3 +384,26 @@ if (!function_exists('t')) {
}
}
if (!function_exists('locale_upper')) {
/**
* Locale-aware uppercase (Turkish: i→İ, ı→I, etc.)
*/
function locale_upper(string $text, ?string $locale = null): string
{
$locale = $locale ?? app()->getLocale();
if (str_starts_with($locale, 'tr')) {
return mb_strtoupper(
str_replace(
['i', 'ı', 'ğ', 'ü', 'ş', 'ö', 'ç'],
['İ', 'I', 'Ğ', 'Ü', 'Ş', 'Ö', 'Ç'],
$text
),
'UTF-8'
);
}
return mb_strtoupper($text, 'UTF-8');
}
}