From 43eb2c8d02d68d83b4308fa94915e18a09f48f32 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Fri, 5 Aug 2022 17:28:16 +0300 Subject: [PATCH 1/8] search component edited for RTL --- public/css/app.css | 5 +++++ resources/assets/js/components/AkauntingSearch.vue | 7 +++---- resources/views/components/reports/summary/chart.blade.php | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/public/css/app.css b/public/css/app.css index 5aa581c5c..78ffc6b87 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -47913,6 +47913,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/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/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') }}

From d02ab42636a1deb22f773172c910d69ebecaed6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 5 Aug 2022 19:03:57 +0300 Subject: [PATCH 2/8] setting remove media --- app/Abstracts/Http/SettingController.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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; From 0c7afa7460338c90f18526383472feb73fe8a2ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 5 Aug 2022 19:04:38 +0300 Subject: [PATCH 3/8] add dropdown delete button. --- app/Jobs/Banking/UpdateTransaction.php | 2 +- .../js/components/AkauntingDropzoneFileUpload.vue | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) 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/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 @@
- -
From d3e834123f1f2c328f45e43a21ac38ca43987c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 5 Aug 2022 19:08:03 +0300 Subject: [PATCH 4/8] Wizard company logo remove and change issue.. --- app/Http/Controllers/Wizard/Companies.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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)) { From a7066106199fd0375b879c8362c836e60d23cd6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 5 Aug 2022 19:15:33 +0300 Subject: [PATCH 5/8] contact update logo issue solved. --- app/Jobs/Common/UpdateContact.php | 2 ++ 1 file changed, 2 insertions(+) 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()); From ad25f11ae9f2bcfa8a29042cdd9d195e26964fa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 5 Aug 2022 19:22:11 +0300 Subject: [PATCH 6/8] vendor index logo fixed.. --- app/Abstracts/View/Components/Contacts/Index.php | 6 +++--- .../views/components/contacts/form/general.blade.php | 2 +- .../views/components/contacts/index/content.blade.php | 10 +++++----- resources/views/purchases/vendors/index.blade.php | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) 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/resources/views/components/contacts/form/general.blade.php b/resources/views/components/contacts/form/general.blade.php index 98001414c..e3dca638d 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 64fb324cb..da5c51bb6 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/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 @@ - + From 9c215a03a98d6a8e8a699ceb36013113c84149bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 5 Aug 2022 19:39:25 +0300 Subject: [PATCH 7/8] vendor edit set logo.. --- app/Traits/Uploads.php | 8 ++++---- .../views/components/contacts/form/general.blade.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) 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/resources/views/components/contacts/form/general.blade.php b/resources/views/components/contacts/form/general.blade.php index e3dca638d..ed0f30427 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
From 27a43ebdd14d2459c996978a3fe261d0dd78c36b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Sat, 6 Aug 2022 09:42:41 +0300 Subject: [PATCH 8/8] fixed vendor create issue.. --- resources/views/components/contacts/form/general.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/components/contacts/form/general.blade.php b/resources/views/components/contacts/form/general.blade.php index ed0f30427..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