diff --git a/app/Abstracts/Http/SettingController.php b/app/Abstracts/Http/SettingController.php index cc0dfbc74..9e087ead9 100644 --- a/app/Abstracts/Http/SettingController.php +++ b/app/Abstracts/Http/SettingController.php @@ -44,6 +44,26 @@ abstract class SettingController extends Controller $total_companies = Company::count(); + // Clear setting media + foreach ($this->file_keys as $file_key) { + $keys = explode('.', $file_key); + + if ($prefix != $keys[0]) { + continue; + } + + if (! setting($file_key, false)) { + continue; + } + + $file_old_key = 'uploaded_' . $keys[1]; + if (array_key_exists($file_old_key, $fields)) { + continue; + } + + setting()->forget($file_key); + } + foreach ($fields as $key => $value) { $real_key = $prefix . '.' . $key; diff --git a/app/Abstracts/View/Components/Contacts/Index.php b/app/Abstracts/View/Components/Contacts/Index.php index a29b02a00..0fe2b5ef0 100644 --- a/app/Abstracts/View/Components/Contacts/Index.php +++ b/app/Abstracts/View/Components/Contacts/Index.php @@ -88,7 +88,7 @@ abstract class Index extends Component public $classBulkAction; /** @var bool */ - public $showPicture; + public $showLogo; /** @var bool */ public $hideName; @@ -179,7 +179,7 @@ abstract class Index extends Component bool $hideEmptyPage = false, bool $hideSummary = false, $summaryItems = [], bool $hideSearchString = false, bool $hideBulkAction = false, string $searchStringModel = '', string $bulkActionClass = '', array $bulkActions = [], array $bulkActionRouteParameters = [], string $searchRoute = '', string $classBulkAction = '', - bool $showPicture = false, bool $hideName = false, bool $hideTaxNumber = false, string $classNameAndTaxNumber = '', string $textName = '', string $textTaxNumber = '', + bool $showLogo = false, bool $hideName = false, bool $hideTaxNumber = false, string $classNameAndTaxNumber = '', string $textName = '', string $textTaxNumber = '', bool $hideEmail = false, bool $hidePhone = false, string $classEmailAndPhone = '', string $textEmail = '', string $textPhone = '', bool $hideCountry = false, bool $hideCurrencyCode = false, string $classCountryAndCurrencyCode = '', string $textCountry = '', string $textCurrencyCode = '', bool $hideOpen = false, bool $hideOverdue = false, string $classOpenAndOverdue = '', string $textOpen = '', string $textOverdue = '', @@ -229,7 +229,7 @@ abstract class Index extends Component $this->classBulkAction = $this->getClassBulkAction($type, $classBulkAction); - $this->showPicture = $showPicture; + $this->showLogo = $showLogo; $this->hideName = $hideName; $this->hideTaxNumber = $hideTaxNumber; $this->classNameAndTaxNumber = $this->getClassNameAndTaxNumber($type, $classNameAndTaxNumber); diff --git a/app/Http/Controllers/Wizard/Companies.php b/app/Http/Controllers/Wizard/Companies.php index d9b69e3ab..e4c234731 100644 --- a/app/Http/Controllers/Wizard/Companies.php +++ b/app/Http/Controllers/Wizard/Companies.php @@ -54,6 +54,22 @@ class Companies extends Controller $file_keys = ['company.logo']; $uploaded_file_keys = ['company.uploaded_logo']; + // Clear setting media + foreach ($file_keys as $file_key) { + $keys = explode('.', $file_key); + + if (! setting($file_key, false)) { + continue; + } + + $file_old_key = 'uploaded_' . $keys[1]; + if (array_key_exists($file_old_key, $fields)) { + continue; + } + + setting()->forget($file_key); + } + foreach ($fields as $key => $value) { // Don't process unwanted keys if (in_array($key, $skip_keys)) { diff --git a/app/Jobs/Banking/UpdateTransaction.php b/app/Jobs/Banking/UpdateTransaction.php index c1fe79deb..45e4a0bce 100644 --- a/app/Jobs/Banking/UpdateTransaction.php +++ b/app/Jobs/Banking/UpdateTransaction.php @@ -24,7 +24,7 @@ class UpdateTransaction extends Job implements ShouldUpdate $this->model->attachMedia($media, 'attachment'); } - } elseif (!$this->request->file('attachment') && $this->model->attachment) { + } elseif (! $this->request->file('attachment') && $this->model->attachment) { $this->deleteMediaModel($this->model, 'attachment', $this->request); } diff --git a/app/Jobs/Common/UpdateContact.php b/app/Jobs/Common/UpdateContact.php index 9c23466fa..8fd090489 100644 --- a/app/Jobs/Common/UpdateContact.php +++ b/app/Jobs/Common/UpdateContact.php @@ -28,6 +28,8 @@ class UpdateContact extends Job implements ShouldUpdate $media = $this->getMedia($this->request->file('logo'), Str::plural($this->model->type)); $this->model->attachMedia($media, 'logo'); + } elseif (! $this->request->file('logo') && $this->model->logo) { + $this->deleteMediaModel($this->model, 'logo', $this->request); } $this->model->update($this->request->all()); diff --git a/app/Traits/Uploads.php b/app/Traits/Uploads.php index 5a261aef0..fcc1d60f3 100644 --- a/app/Traits/Uploads.php +++ b/app/Traits/Uploads.php @@ -57,7 +57,7 @@ trait Uploads { $medias = $model->$parameter; - if (!$medias) { + if (! $medias) { return; } @@ -75,7 +75,7 @@ trait Uploads } } - foreach ((array)$medias as $media) { + foreach ((array) $medias as $media) { if (in_array($media->id, $already_uploaded)) { continue; } @@ -86,7 +86,7 @@ trait Uploads public function getMediaFolder($folder, $company_id = null) { - if (!$company_id) { + if (! $company_id) { $company_id = company_id(); } @@ -98,7 +98,7 @@ trait Uploads public function getMediaPathOnStorage($media) { - if (!is_object($media)) { + if (! is_object($media)) { return false; } diff --git a/public/css/app.css b/public/css/app.css index 6d0fe34f9..4ff18938e 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -47909,6 +47909,11 @@ body{ text-align: right; } +[dir="ltr"] .ltr\:text-xl{ + font-size: 1.25rem; + line-height: 1.75rem; +} + [dir="rtl"] .rtl\:-left-1\.5{ left: -0.375rem; } diff --git a/resources/assets/js/components/AkauntingDropzoneFileUpload.vue b/resources/assets/js/components/AkauntingDropzoneFileUpload.vue index 24c669ea1..675b7783c 100644 --- a/resources/assets/js/components/AkauntingDropzoneFileUpload.vue +++ b/resources/assets/js/components/AkauntingDropzoneFileUpload.vue @@ -17,6 +17,12 @@ + +
+ +
@@ -40,11 +46,11 @@
- -
diff --git a/resources/assets/js/components/AkauntingSearch.vue b/resources/assets/js/components/AkauntingSearch.vue index f97017498..ce11ddd7d 100644 --- a/resources/assets/js/components/AkauntingSearch.vue +++ b/resources/assets/js/components/AkauntingSearch.vue @@ -867,8 +867,7 @@ export default { } html[dir='rtl'] .searh-field .el-tag-option { - border-radius: 0.50rem; - margin-right: 10px; + border-radius: 0 0.5rem 0.5rem 0; } .searh-field .el-tag-operator { @@ -883,12 +882,12 @@ export default { } html[dir='rtl'] .searh-field .el-tag-value { - border-radius: 0.50rem; + border-radius: 0.5rem 0 0 0.5rem; margin-left: 10px; } html[dir='rtl'] .searh-field .el-tag-operator { - border-radius: 0.50rem; + border-radius: 0; } .searh-field .el-select.input-new-tag { diff --git a/resources/views/components/contacts/form/general.blade.php b/resources/views/components/contacts/form/general.blade.php index 98001414c..bc724afa5 100644 --- a/resources/views/components/contacts/form/general.blade.php +++ b/resources/views/components/contacts/form/general.blade.php @@ -64,7 +64,7 @@ @endif @if (! $hideLogo) - + @endif diff --git a/resources/views/components/contacts/index/content.blade.php b/resources/views/components/contacts/index/content.blade.php index 5362e6109..0dd9ffc5d 100644 --- a/resources/views/components/contacts/index/content.blade.php +++ b/resources/views/components/contacts/index/content.blade.php @@ -136,15 +136,15 @@ @stack('name_td_start') @if (! $hideName) - @if ($showPicture) - @if (is_object($item->picture)) - + @if ($showLogo) + @if (is_object($item->logo)) + @else @endif @endif -
+ @@ -157,7 +157,7 @@ @stack('tax_number_td_start') @if (! $hideTaxNumber) - + @endif diff --git a/resources/views/components/reports/summary/chart.blade.php b/resources/views/components/reports/summary/chart.blade.php index 61d476cf7..824e38aa7 100644 --- a/resources/views/components/reports/summary/chart.blade.php +++ b/resources/views/components/reports/summary/chart.blade.php @@ -3,7 +3,7 @@
-
+

{{ trans('general.timeline') }}

{{ trans('general.distribution') }}

diff --git a/resources/views/purchases/vendors/index.blade.php b/resources/views/purchases/vendors/index.blade.php index 3e0b4c88e..43cc8669b 100644 --- a/resources/views/purchases/vendors/index.blade.php +++ b/resources/views/purchases/vendors/index.blade.php @@ -16,7 +16,7 @@ - +