From 00f2a607e6fe3bc5959f6f5364870a77d7d61023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 10 Jun 2022 11:14:18 +0300 Subject: [PATCH 01/19] New apps, version and all notification count and read issue solved. #2yrpaz9 --- app/Http/Livewire/Menu/Notifications.php | 44 ++++++++++++++++--- app/Listeners/Menu/ShowInNotifications.php | 3 +- app/View/Components/Layouts/Admin/Menu.php | 19 +++++--- .../components/layouts/admin/menu.blade.php | 15 ++++--- .../livewire/menu/notifications.blade.php | 12 ++--- 5 files changed, 69 insertions(+), 24 deletions(-) diff --git a/app/Http/Livewire/Menu/Notifications.php b/app/Http/Livewire/Menu/Notifications.php index 5f740294b..6b11c30dc 100644 --- a/app/Http/Livewire/Menu/Notifications.php +++ b/app/Http/Livewire/Menu/Notifications.php @@ -27,12 +27,25 @@ class Notifications extends Component return view('livewire.menu.notifications'); } - public function markRead($notification_id) + public function markRead($type, $notification_id, $message = true) { - $notification = DatabaseNotification::find($notification_id); - $data = $notification->getAttribute('data'); + switch ($type) { + case 'updates': + $this->markUpdateRead($notification_id); + break; + case 'new-apps': + $this->markNewAppRead($notification_id); + break; + default: + $notification = DatabaseNotification::find($notification_id); + $data = $notification->getAttribute('data'); - $notification->markAsRead(); + $notification->markAsRead(); + } + + if (! $message) { + return; + } $type = isset($data['file_name']) ?: trans('general.export'); @@ -44,10 +57,10 @@ class Notifications extends Component public function markReadAll() { - $notifications = user()->unreadNotifications; + $notifications = $this->getNotifications(); foreach ($notifications as $notification) { - $notification->markAsRead(); + $this->markRead($notification->type, $notification->id, false); } $this->dispatchBrowserEvent('mark-read-all', [ @@ -56,6 +69,25 @@ class Notifications extends Component ]); } + public function markUpdateRead($notification_id) + { + // + } + + public function markNewAppRead($notification_id) + { + $notifications = $this->getNotifications(); + + foreach ($notifications as $notification) { + if ($notification->id == $notification_id) { + setting()->set('notifications.' . $notification->notifiable_id . '.' . $notification->data['alias'], '1'); + + setting()->save(); + break; + } + } + } + public function getNotifications(): array { $notifications = new \stdClass(); diff --git a/app/Listeners/Menu/ShowInNotifications.php b/app/Listeners/Menu/ShowInNotifications.php index 38686193b..49d499e47 100644 --- a/app/Listeners/Menu/ShowInNotifications.php +++ b/app/Listeners/Menu/ShowInNotifications.php @@ -65,7 +65,8 @@ class ShowInNotifications $new->notifiable_id = user()->id; $new->data = [ 'title' => $new_app->name, - 'description' => $new_app->alias, + 'description' => '', // $new_app->message, + 'alias' => $new_app->alias, ]; $new->created_at = $new_app->started_at->date; diff --git a/app/View/Components/Layouts/Admin/Menu.php b/app/View/Components/Layouts/Admin/Menu.php index fa627ac67..ff4a91b49 100644 --- a/app/View/Components/Layouts/Admin/Menu.php +++ b/app/View/Components/Layouts/Admin/Menu.php @@ -3,7 +3,7 @@ namespace App\View\Components\Layouts\Admin; use App\Abstracts\View\Component; -use App\Utilities\Versions; +use App\Events\Menu\NotificationsCreated; class Menu extends Component { @@ -21,10 +21,7 @@ class Menu extends Component { $this->companies = $this->getCompanies(); - $version_update = Versions::getUpdates(); - - $this->notification_count = user()->unreadNotifications->count(); - $this->notification_count += count($version_update); + $this->notification_count = $this->getNotificationCount(); return view('components.layouts.admin.menu'); } @@ -39,4 +36,16 @@ class Menu extends Component return $companies; } + + public function getNotificationCount() + { + // Get nofitications + $notifications = new \stdClass(); + $notifications->notifications = []; + $notifications->keyword = ''; + + event(new NotificationsCreated($notifications)); + + return $notifications->notifications->count(); + } } diff --git a/resources/views/components/layouts/admin/menu.blade.php b/resources/views/components/layouts/admin/menu.blade.php index 4b14f840e..1efa0dbc8 100644 --- a/resources/views/components/layouts/admin/menu.blade.php +++ b/resources/views/components/layouts/admin/menu.blade.php @@ -63,15 +63,16 @@ 'flex items-center menu-button justify-center w-8 h-8 mb-2.5 relative cursor-pointer js-menu-toggles', 'animate-vibrate' => $notification_count, ]) - data-menu="notifications-menu"> + data-menu="notifications-menu" + > notifications - - @if ($notification_count) - - {{ $notification_count }} - - @endif + + @if ($notification_count) + + {{ $notification_count }} + + @endif @endcan diff --git a/resources/views/livewire/menu/notifications.blade.php b/resources/views/livewire/menu/notifications.blade.php index 6f6e9c4e5..31249be66 100644 --- a/resources/views/livewire/menu/notifications.blade.php +++ b/resources/views/livewire/menu/notifications.blade.php @@ -8,8 +8,8 @@ @endif @if ($notifications) -
- +
+ @@ -30,9 +30,11 @@
@if ($notification->type != 'updates') - + + + @endif
From a84ac4902455e54213ab75c38c5179d41dd9492c Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Fri, 10 Jun 2022 11:49:40 +0300 Subject: [PATCH 02/19] option spacing control when search --- public/css/app.css | 12 ++++++------ resources/assets/sass/app.css | 8 ++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/public/css/app.css b/public/css/app.css index d27e36a75..2be8f9bc1 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -46881,7 +46881,7 @@ input[type="date"]::-webkit-inner-spin-button, border-bottom-right-radius: 4px; cursor: pointer !important; margin-top: 8px; - margin-bottom: 0 !important; + margin-bottom: -8px !important; } .el-select__footer:hover { @@ -46902,11 +46902,7 @@ input[type="date"]::-webkit-inner-spin-button, } .el-select-dropdown__list { - padding: 8px 0 0 0; -} - -.el-select-dropdown__item:last-child { - margin-bottom: 8px; + padding: 8px 0 8px 0; } .el-select .el-select__tags { @@ -48223,6 +48219,10 @@ body{ grid-template-columns: repeat(4, minmax(0, 1fr)); } + .sm\:grid-cols-2{ + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + .sm\:grid-cols-3{ grid-template-columns: repeat(3, minmax(0, 1fr)); } diff --git a/resources/assets/sass/app.css b/resources/assets/sass/app.css index 9d0dd3991..457283f40 100644 --- a/resources/assets/sass/app.css +++ b/resources/assets/sass/app.css @@ -309,7 +309,7 @@ border-bottom-right-radius: 4px; cursor: pointer !important; margin-top: 8px; - margin-bottom: 0 !important; + margin-bottom: -8px !important; } .el-select__footer:hover { @@ -330,11 +330,7 @@ } .el-select-dropdown__list { - padding: 8px 0 0 0; -} - -.el-select-dropdown__item:last-child { - margin-bottom: 8px; + padding: 8px 0 8px 0; } .el-select .el-select__tags { From 096057d557f348cf80e5708e03fe54ca4bd488f6 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Fri, 10 Jun 2022 14:52:30 +0300 Subject: [PATCH 03/19] maintenance page styling --- .../views/components/layouts/maintenance/body.blade.php | 3 ++- .../views/components/layouts/maintenance/head.blade.php | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/resources/views/components/layouts/maintenance/body.blade.php b/resources/views/components/layouts/maintenance/body.blade.php index 1660abbd4..74cdb8f3b 100644 --- a/resources/views/components/layouts/maintenance/body.blade.php +++ b/resources/views/components/layouts/maintenance/body.blade.php @@ -1,9 +1,10 @@ +
{{ trans('maintenance.message') }}
- {{ trans('maintenance.message') }}
+ diff --git a/resources/views/components/layouts/maintenance/head.blade.php b/resources/views/components/layouts/maintenance/head.blade.php index 3a0b58b65..77ff01076 100644 --- a/resources/views/components/layouts/maintenance/head.blade.php +++ b/resources/views/components/layouts/maintenance/head.blade.php @@ -11,9 +11,9 @@ - - - + + + @stack('css') From b1e2bb0342c9c16c988b4b8dbd88ef6e30a004c6 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Fri, 10 Jun 2022 15:14:43 +0300 Subject: [PATCH 04/19] change category color --- resources/views/settings/categories/index.blade.php | 2 +- resources/views/settings/categories/sub_category.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/settings/categories/index.blade.php b/resources/views/settings/categories/index.blade.php index 10a72ec7f..614e466bf 100644 --- a/resources/views/settings/categories/index.blade.php +++ b/resources/views/settings/categories/index.blade.php @@ -99,7 +99,7 @@ - circle + circle diff --git a/resources/views/settings/categories/sub_category.blade.php b/resources/views/settings/categories/sub_category.blade.php index d58cbb508..be9afa002 100644 --- a/resources/views/settings/categories/sub_category.blade.php +++ b/resources/views/settings/categories/sub_category.blade.php @@ -39,7 +39,7 @@ - circle + circle From 4ab6e5d96bc747ba3fca0f32f3ebcd362fce0e25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihan=20=C5=9Eent=C3=BCrk?= <53110792+CihanSenturk@users.noreply.github.com> Date: Fri, 10 Jun 2022 15:15:00 +0300 Subject: [PATCH 05/19] widget model alias scope added --- app/Models/Common/Widget.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/app/Models/Common/Widget.php b/app/Models/Common/Widget.php index 71652501c..481ac63bf 100644 --- a/app/Models/Common/Widget.php +++ b/app/Models/Common/Widget.php @@ -5,6 +5,7 @@ namespace App\Models\Common; use App\Abstracts\Model; use Bkwld\Cloner\Cloneable; use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Support\Str; class Widget extends Model { @@ -28,6 +29,20 @@ class Widget extends Model 'settings' => 'object', ]; + /** + * Scope to only include widgets of a given alias. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * @param string $alias + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeAlias($query, $alias) + { + $class = ($alias == 'core') ? 'App\\\\' : 'Modules\\\\' . Str::studly($alias) . '\\\\'; + + return $query->where('class', 'like', $class . '%'); + } + public function dashboard() { return $this->belongsTo('App\Models\Common\Dashboard'); From 151392b6939e352017adc3610d532814db95b20e Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Fri, 10 Jun 2022 15:46:13 +0300 Subject: [PATCH 06/19] color widget change color controlled for hexcode --- resources/assets/js/components/AkauntingColor.vue | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/resources/assets/js/components/AkauntingColor.vue b/resources/assets/js/components/AkauntingColor.vue index 75fbebfbc..7d710b10b 100644 --- a/resources/assets/js/components/AkauntingColor.vue +++ b/resources/assets/js/components/AkauntingColor.vue @@ -15,7 +15,7 @@ ref="dropdownMenu" @click="openPalette" :class="`bg-${color}`" - :style="{ backgroundColor: color }" + :style="this.color.includes('#') ? `backgroundColor: ${color}` : `backgroundColor: #${color}`" > @@ -115,8 +115,6 @@ export default { return { isOpen: false, color: 'green-500', - hexCode: null, - colors: [ 'gray', 'red', @@ -174,13 +172,11 @@ export default { setColor(event) { this.isOpen = false; this.color = event.target.getAttribute('colorid'); - this.hexCode = null; + this.$refs.dropdownMenu.style = ''; }, addColor() { let code = this.color; - - this.hexCode = code.includes('#') ? code : '#' + code; }, closeIfClickedOutside(event) { From 6cd42b2b56bc484e76874dc024243ce4716fe2f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Fri, 10 Jun 2022 17:16:10 +0300 Subject: [PATCH 07/19] updated debugbar config --- config/debugbar.php | 98 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 85 insertions(+), 13 deletions(-) diff --git a/config/debugbar.php b/config/debugbar.php index 6f7fb4c4f..d731eeb8c 100644 --- a/config/debugbar.php +++ b/config/debugbar.php @@ -14,9 +14,10 @@ return [ | */ - 'enabled' => env('APP_DEBUG', false), + 'enabled' => env('DEBUGBAR_ENABLED', env('APP_DEBUG', false)), 'except' => [ - 'telescope*' + 'telescope*', + 'horizon*', ], /* @@ -33,12 +34,56 @@ return [ */ 'storage' => [ 'enabled' => true, - 'driver' => 'file', // redis, file, pdo, custom + 'driver' => 'file', // redis, file, pdo, socket, custom 'path' => storage_path('debugbar'), // For file driver 'connection' => null, // Leave null for default connection (Redis/PDO) - 'provider' => '' // Instance of StorageInterface for custom driver + 'provider' => '', // Instance of StorageInterface for custom driver + 'hostname' => '127.0.0.1', // Hostname to use with the "socket" driver + 'port' => 2304, // Port to use with the "socket" driver ], + /* + |-------------------------------------------------------------------------- + | Editor + |-------------------------------------------------------------------------- + | + | Choose your preferred editor to use when clicking file name. + | + | Supported: "phpstorm", "vscode", "vscode-insiders", "vscode-remote", + | "vscode-insiders-remote", "vscodium", "textmate", "emacs", + | "sublime", "atom", "nova", "macvim", "idea", "netbeans", + | "xdebug", "espresso" + | + */ + + 'editor' => env('DEBUGBAR_EDITOR', 'phpstorm'), + + /* + |-------------------------------------------------------------------------- + | Remote Path Mapping + |-------------------------------------------------------------------------- + | + | If you are using a remote dev server, like Laravel Homestead, Docker, or + | even a remote VPS, it will be necessary to specify your path mapping. + | + | Leaving one, or both of these, empty or null will not trigger the remote + | URL changes and Debugbar will treat your editor links as local files. + | + | "remote_sites_path" is an absolute base path for your sites or projects + | in Homestead, Vagrant, Docker, or another remote development server. + | + | Example value: "/home/vagrant/Code" + | + | "local_sites_path" is an absolute base path for your sites or projects + | on your local computer where your IDE or code editor is running on. + | + | Example values: "/Users//Code", "C:\Users\\Documents\Code" + | + */ + + 'remote_sites_path' => env('DEBUGBAR_REMOTE_SITES_PATH', ''), + 'local_sites_path' => env('DEBUGBAR_LOCAL_SITES_PATH', ''), + /* |-------------------------------------------------------------------------- | Vendors @@ -64,6 +109,9 @@ return [ | you can use this option to disable sending the data through the headers. | | Optionally, you can also send ServerTiming headers on ajax requests for the Chrome DevTools. + | + | Note for your request to be identified as ajax requests they must either send the header + | X-Requested-With with the value XMLHttpRequest (most JS libraries send this), or have application/json as a Accept header. */ 'capture_ajax' => true, @@ -111,7 +159,7 @@ return [ 'views' => true, // Views with their data 'route' => true, // Current route information 'auth' => false, // Display Laravel authentication status - 'gate' => false, // Display Laravel Gate checks + 'gate' => true, // Display Laravel Gate checks 'session' => true, // Display session data 'symfony_request' => true, // Only one can be enabled.. 'mail' => false, // Catch mail messages @@ -122,7 +170,8 @@ return [ 'files' => false, // Show the included files 'config' => false, // Display config settings 'cache' => false, // Display cache events - 'models' => true, // Display models + 'models' => true, // Display models + 'livewire' => true, // Display Livewire (when available) ], /* @@ -141,28 +190,31 @@ return [ 'db' => [ 'with_params' => true, // Render SQL with the parameters substituted 'backtrace' => true, // Use a backtrace to find the origin of the query in your files. - 'timeline' => true, // Add the queries to the timeline + 'backtrace_exclude_paths' => [], // Paths to exclude from backtrace. (in addition to defaults) + 'timeline' => false, // Add the queries to the timeline + 'duration_background' => true, // Show shaded background on each query relative to how long it took to execute. 'explain' => [ // Show EXPLAIN output on queries 'enabled' => false, - 'types' => ['SELECT'], // // workaround ['SELECT'] only. https://github.com/barryvdh/laravel-debugbar/issues/888 ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+ + 'types' => ['SELECT'], // Deprecated setting, is always only SELECT ], 'hints' => true, // Show hints for common mistakes - 'show_copy' => true, // Show copy button next to the query + 'show_copy' => false, // Show copy button next to the query ], 'mail' => [ - 'full_log' => false + 'full_log' => false, ], 'views' => [ + 'timeline' => false, // Add the views to the timeline (Experimental) 'data' => false, //Note: Can slow down the application, because the data can be quite large.. ], 'route' => [ - 'label' => true // show complete route on bar + 'label' => true, // show complete route on bar ], 'logs' => [ - 'file' => null + 'file' => null, ], 'cache' => [ - 'values' => true // collect cache values + 'values' => true, // collect cache values ], ], @@ -200,4 +252,24 @@ return [ | To override default domain, specify it as a non-empty value. */ 'route_domain' => null, + + /* + |-------------------------------------------------------------------------- + | DebugBar theme + |-------------------------------------------------------------------------- + | + | Switches between light and dark theme. If set to auto it will respect system preferences + | Possible values: auto, light, dark + */ + 'theme' => env('DEBUGBAR_THEME', 'auto'), + + /* + |-------------------------------------------------------------------------- + | Backtrace stack limit + |-------------------------------------------------------------------------- + | + | By default, the DebugBar limits the number of frames returned by the 'debug_backtrace()' function. + | If you need larger stacktraces, you can increase this number. Setting it to 0 will result in no limit. + */ + 'debug_backtrace_limit' => 50, ]; From baf597ee70e83f2f0d69145f14296c740a47ad17 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Fri, 10 Jun 2022 17:39:14 +0300 Subject: [PATCH 08/19] text controlled for donut chart --- app/Abstracts/Report.php | 2 +- app/Widgets/ExpensesByCategory.php | 2 +- public/css/app.css | 31 +++++++++++++++++++ resources/assets/sass/app.css | 27 ++++++++++++++++ .../reports/summary/chart.blade.php | 2 +- resources/views/widgets/donut_chart.blade.php | 2 +- 6 files changed, 62 insertions(+), 4 deletions(-) diff --git a/app/Abstracts/Report.php b/app/Abstracts/Report.php index 9151b8cf7..06397a854 100644 --- a/app/Abstracts/Report.php +++ b/app/Abstracts/Report.php @@ -237,7 +237,7 @@ abstract class Report ->setColors(array_values($colors)) ->setDataset($this->tables[$table_key], 'donut', array_values($values)); - $chart->options['legend']['width'] = 150; + $chart->options['legend']['width'] = 105; $chart->options['legend']['position'] = 'right'; return $chart; diff --git a/app/Widgets/ExpensesByCategory.php b/app/Widgets/ExpensesByCategory.php index 11010876a..269dfb9b2 100644 --- a/app/Widgets/ExpensesByCategory.php +++ b/app/Widgets/ExpensesByCategory.php @@ -27,7 +27,7 @@ class ExpensesByCategory extends Widget $chart = $this->getDonutChart(trans_choice('general.expenses', 2), '100%', 300, 6); - $chart->options['legend']['width'] = 210; + $chart->options['legend']['width'] = 160; $chart->options['legend']['position'] = 'right'; return $this->view('widgets.donut_chart', [ diff --git a/public/css/app.css b/public/css/app.css index 2be8f9bc1..47c26e139 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -47115,6 +47115,37 @@ html[dir='rtl'] .el-input__suffix { } /* element-ui */ + /* apex-chart */ + .apexcharts-donut-custom span.apexcharts-legend-text { + display: -webkit-box !important; + -webkit-line-clamp: 1 !important; + -webkit-box-orient: vertical !important; + overflow: hidden !important; + height: 1rem !important; + } + + .apexcharts-donut-custom .apexcharts-legend-series { + display: -webkit-box !important; + display: -ms-flexbox !important; + display: flex !important; + -webkit-box-align: center !important; + -ms-flex-align: center !important; + align-items: center !important; + } + + .apexcharts-donut-custom .apexcharts-legend { + padding: 0 !important; + } + + .apexcharts-donut-custom .apexcharts-legend-marker { + width: 18px !important; + } + + .apexcharts-donut-custom-report .apexcharts-legend-marker { + width: 12px !important; + } + /* apex-chart */ + /* collapse */ .active-collapse{ opacity: 1; diff --git a/resources/assets/sass/app.css b/resources/assets/sass/app.css index 457283f40..918028804 100644 --- a/resources/assets/sass/app.css +++ b/resources/assets/sass/app.css @@ -452,6 +452,33 @@ html[dir='rtl'] .el-input__suffix { } /* element-ui */ + /* apex-chart */ + .apexcharts-donut-custom span.apexcharts-legend-text { + display: -webkit-box !important; + -webkit-line-clamp: 1 !important; + -webkit-box-orient: vertical !important; + overflow: hidden !important; + height: 1rem !important; + } + + .apexcharts-donut-custom .apexcharts-legend-series { + display: flex !important; + align-items: center !important; + } + + .apexcharts-donut-custom .apexcharts-legend { + padding: 0 !important; + } + + .apexcharts-donut-custom .apexcharts-legend-marker { + width: 18px !important; + } + + .apexcharts-donut-custom-report .apexcharts-legend-marker { + width: 12px !important; + } + /* apex-chart */ + /* collapse */ .active-collapse { @apply opacity-100; diff --git a/resources/views/components/reports/summary/chart.blade.php b/resources/views/components/reports/summary/chart.blade.php index 78a6e2860..298d668e3 100644 --- a/resources/views/components/reports/summary/chart.blade.php +++ b/resources/views/components/reports/summary/chart.blade.php @@ -18,7 +18,7 @@ {!! $charts['bar']->container() !!} -
+
{!! $charts['donut']->container() !!}
diff --git a/resources/views/widgets/donut_chart.blade.php b/resources/views/widgets/donut_chart.blade.php index d5a79b1bd..013d10f40 100644 --- a/resources/views/widgets/donut_chart.blade.php +++ b/resources/views/widgets/donut_chart.blade.php @@ -1,4 +1,4 @@ -
+
@include($class->views['header'], ['header_class' => ''])
From 2e3a08ae40f6a6cb2662f7a00584444897d9c4e1 Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Fri, 10 Jun 2022 17:40:44 +0300 Subject: [PATCH 09/19] text width control --- public/css/app.css | 8 -------- resources/assets/sass/app.css | 8 -------- 2 files changed, 16 deletions(-) diff --git a/public/css/app.css b/public/css/app.css index 47c26e139..cb0ec6e5e 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -47136,14 +47136,6 @@ html[dir='rtl'] .el-input__suffix { .apexcharts-donut-custom .apexcharts-legend { padding: 0 !important; } - - .apexcharts-donut-custom .apexcharts-legend-marker { - width: 18px !important; - } - - .apexcharts-donut-custom-report .apexcharts-legend-marker { - width: 12px !important; - } /* apex-chart */ /* collapse */ diff --git a/resources/assets/sass/app.css b/resources/assets/sass/app.css index 918028804..0b13f324f 100644 --- a/resources/assets/sass/app.css +++ b/resources/assets/sass/app.css @@ -469,14 +469,6 @@ html[dir='rtl'] .el-input__suffix { .apexcharts-donut-custom .apexcharts-legend { padding: 0 !important; } - - .apexcharts-donut-custom .apexcharts-legend-marker { - width: 18px !important; - } - - .apexcharts-donut-custom-report .apexcharts-legend-marker { - width: 12px !important; - } /* apex-chart */ /* collapse */ From fc1bc450801e2cfbb0675884990675f844f82838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 10 Jun 2022 17:47:27 +0300 Subject: [PATCH 10/19] styling.. --- .../documents/template/classic.blade.php | 165 +++++++++++----- .../documents/template/default.blade.php | 130 +++++++----- .../documents/template/modern.blade.php | 187 ++++++++++++------ 3 files changed, 327 insertions(+), 155 deletions(-) diff --git a/resources/views/components/documents/template/classic.blade.php b/resources/views/components/documents/template/classic.blade.php index 004f07041..5b8bab05b 100644 --- a/resources/views/components/documents/template/classic.blade.php +++ b/resources/views/components/documents/template/classic.blade.php @@ -12,7 +12,7 @@
@stack('company_logo_start') - @if (!$hideCompanyLogo) + @if (! $hideCompanyLogo) @if (!empty($document->contact->logo) && !empty($document->contact->logo->id)) @else @@ -31,19 +31,20 @@ {{ $textDocumentSubheading }}

@endif - @if (!$hideCompanyDetails) - @if (!$hideCompanyName) + + @if (! $hideCompanyDetails) + @if (! $hideCompanyName)

{{ setting('company.name') }}

@endif - @if (!$hideCompanyAddress) + @if (! $hideCompanyAddress)

{!! nl2br(setting('company.address')) !!} {!! $document->company->location !!}

@endif - @if (!$hideCompanyTaxNumber) + @if (! $hideCompanyTaxNumber) @if (setting('company.tax_number'))

@@ -54,7 +55,7 @@ @endif @endif - @if (!$hideCompanyPhone) + @if (! $hideCompanyPhone) @if (setting('company.phone'))

{{ setting('company.phone') }} @@ -62,8 +63,10 @@ @endif @endif - @if (!$hideCompanyEmail) -

{{ setting('company.email') }}

+ @if (! $hideCompanyEmail) +

+ {{ setting('company.email') }} +

@endif @endif @stack('company_details_end') @@ -81,9 +84,14 @@
@stack('invoice_number_input_start') - @if (!$hideDocumentNumber) + @if (! $hideDocumentNumber)
- {{ trans($textDocumentNumber) }}:
+ + {{ trans($textDocumentNumber) }}: + + +
+ {{ $document->document_number }}
@endif @@ -102,17 +110,21 @@
@if (! $hideContactInfo) -

{{ trans($textContactInfo) }}

+

+ {{ trans($textContactInfo) }} +

@endif @stack('name_input_start') - @if (!$hideContactName) -

{{ $document->contact_name }}

+ @if (! $hideContactName) +

+ {{ $document->contact_name }} +

@endif @stack('name_input_end') @stack('address_input_start') - @if (!$hideContactAddress) + @if (! $hideContactAddress)

{!! nl2br($document->contact_address) !!}
@@ -122,7 +134,7 @@ @stack('address_input_end') @stack('tax_number_input_start') - @if (!$hideContactTaxNumber) + @if (! $hideContactTaxNumber) @if ($document->contact_tax_number)

@@ -135,7 +147,7 @@ @stack('tax_number_input_end') @stack('phone_input_start') - @if (!$hideContactPhone) + @if (! $hideContactPhone) @if ($document->contact_phone)

{{ $document->contact_phone }} @@ -145,8 +157,10 @@ @stack('phone_input_end') @stack('email_start') - @if (!$hideContactEmail) -

{{ $document->contact_email }}

+ @if (! $hideContactEmail) +

+ {{ $document->contact_email }} +

@endif @stack('email_input_end')
@@ -155,30 +169,45 @@
@stack('order_number_input_start') - @if (!$hideOrderNumber) + @if (! $hideOrderNumber) @if ($document->order_number)

- {{ trans($textOrderNumber) }}: - {{ $document->order_number }} + + {{ trans($textOrderNumber) }}: + + + + {{ $document->order_number }} +

@endif @endif @stack('order_number_input_end') @stack('issued_at_input_start') - @if (!$hideIssuedAt) + @if (! $hideIssuedAt)

- {{ trans($textIssuedAt) }}: - @date($document->issued_at) + + {{ trans($textIssuedAt) }}: + + + + @date($document->issued_at) +

@endif @stack('issued_at_input_end') @stack('due_at_input_start') - @if (!$hideDueAt) + @if (! $hideDueAt)

- {{ trans($textDueAt) }}: - @date($document->due_at) + + {{ trans($textDueAt) }}: + + + + @date($document->due_at) +

@endif @stack('due_at_input_end') @@ -186,8 +215,13 @@ @foreach ($document->totals_sorted as $total) @if ($total->code == 'total')

- {{ trans($total->name) }}: - @money($total->amount - $document->paid, $document->currency_code, true) + + {{ trans($total->name) }}: + + + + @money($total->amount - $document->paid, $document->currency_code, true) +

@endif @endforeach @@ -195,7 +229,7 @@
-@if (!$hideItems) +@if (! $hideItems)
@@ -203,34 +237,44 @@ @stack('name_th_start') - @if (!$hideItems || (!$hideName && !$hideDescription)) - {{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }} + @if (! $hideItems || (! $hideName && ! $hideDescription)) + + {{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }} + @endif @stack('name_th_end') @stack('quantity_th_start') - @if (!$hideQuantity) - {{ trans($textQuantity) }} + @if (! $hideQuantity) + + {{ trans($textQuantity) }} + @endif @stack('quantity_th_end') @stack('price_th_start') - @if (!$hidePrice) - {{ trans($textPrice) }} + @if (! $hidePrice) + + {{ trans($textPrice) }} + @endif @stack('price_th_end') - @if (!$hideDiscount) + @if (! $hideDiscount) @if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both'])) @stack('discount_td_start') - {{ trans('invoices.discount') }} + + {{ trans('invoices.discount') }} + @stack('discount_td_end') @endif @endif @stack('total_th_start') - @if (!$hideAmount) - {{ trans($textAmount) }} + @if (! $hideAmount) + + {{ trans($textAmount) }} + @endif @stack('total_th_end') @@ -270,9 +314,12 @@
@stack('notes_input_start') - @if($hideNote) + @if ($hideNote) @if ($document->notes) - {{ trans_choice('general.notes', 2) }} + + {{ trans_choice('general.notes', 2) }} + + {!! nl2br($document->notes) !!} @endif @endif @@ -285,23 +332,39 @@ @if ($total->code != 'total') @stack($total->code . '_total_tr_start')
- {{ trans($total->title) }}: - @money($total->amount, $document->currency_code, true) + + {{ trans($total->title) }}: + + + + @money($total->amount, $document->currency_code, true) +
@stack($total->code . '_total_tr_end') @else @if ($document->paid) @stack('paid_total_tr_start')
- {{ trans('invoices.paid') }}: - - @money($document->paid, $document->currency_code, true) + + {{ trans('invoices.paid') }}: + + + + - @money($document->paid, $document->currency_code, true) +
@stack('paid_total_tr_end') @endif + @stack('grand_total_tr_start')
- {{ trans($total->name) }}: - @money($document->amount_due, $document->currency_code, true) + + {{ trans($total->name) }}: + + + + @money($document->amount_due, $document->currency_code, true) +
@stack('grand_total_tr_end') @endif @@ -309,12 +372,14 @@
-@if (!$hideFooter) +@if (! $hideFooter) @if ($document->footer)
- {!! nl2br($document->footer) !!} + + {!! nl2br($document->footer) !!} +
diff --git a/resources/views/components/documents/template/default.blade.php b/resources/views/components/documents/template/default.blade.php index 25e11b115..2e565719a 100644 --- a/resources/views/components/documents/template/default.blade.php +++ b/resources/views/components/documents/template/default.blade.php @@ -12,8 +12,8 @@
@stack('company_logo_start') - @if (!$hideCompanyLogo) - @if (!empty($document->contact->logo) && !empty($document->contact->logo->id)) + @if (! $hideCompanyLogo) + @if (! empty($document->contact->logo) && ! empty($document->contact->logo->id)) @else @@ -31,19 +31,20 @@ {{ $textDocumentSubheading }}

@endif - @if (!$hideCompanyDetails) - @if (!$hideCompanyName) + + @if (! $hideCompanyDetails) + @if (! $hideCompanyName)

{{ setting('company.name') }}

@endif - @if (!$hideCompanyAddress) + @if (! $hideCompanyAddress)

{!! nl2br(setting('company.address')) !!} {!! $document->company->location !!}

@endif - @if (!$hideCompanyTaxNumber) + @if (! $hideCompanyTaxNumber) @if (setting('company.tax_number'))

@@ -53,17 +54,15 @@ @endif - @if (!$hideCompanyPhone) - + @if (! $hideCompanyPhone) @if (setting('company.phone'))

{{ setting('company.phone') }}

@endif - @endif - @if (!$hideCompanyEmail) + @if (! $hideCompanyEmail)

{{ setting('company.email') }}

@endif @endif @@ -80,13 +79,13 @@ @endif @stack('name_input_start') - @if (!$hideContactName) + @if (! $hideContactName)

{{ $document->contact_name }}

@endif @stack('name_input_end') @stack('address_input_start') - @if (!$hideContactAddress) + @if (! $hideContactAddress)

{!! nl2br($document->contact_address) !!}
@@ -96,7 +95,7 @@ @stack('address_input_end') @stack('tax_number_input_start') - @if (!$hideContactTaxNumber) + @if (! $hideContactTaxNumber) @if ($document->contact_tax_number)

@@ -109,7 +108,7 @@ @stack('tax_number_input_end') @stack('phone_input_start') - @if (!$hideContactPhone) + @if (! $hideContactPhone) @if ($document->contact_phone)

{{ $document->contact_phone }} @@ -119,7 +118,7 @@ @stack('phone_input_end') @stack('email_start') - @if (!$hideContactEmail) + @if (! $hideContactEmail)

{{ $document->contact_email }}

@@ -131,48 +130,59 @@
@stack('document_number_input_start') - @if (!$hideDocumentNumber) + @if (! $hideDocumentNumber)

{{ trans($textDocumentNumber) }}: - {{ $document->document_number }} + + + {{ $document->document_number }} +

- @endif @stack('document_number_input_end') @stack('order_number_input_start') - @if (!$hideOrderNumber) + @if (! $hideOrderNumber) @if ($document->order_number)

{{ trans($textOrderNumber) }}: - {{ $document->order_number }} + + + {{ $document->order_number }} +

@endif @endif @stack('order_number_input_end') @stack('issued_at_input_start') - @if (!$hideIssuedAt) + @if (! $hideIssuedAt)

{{ trans($textIssuedAt) }}: - @date($document->issued_at) + + + @date($document->issued_at) +

@endif @stack('issued_at_input_end') @stack('due_at_input_start') - @if (!$hideDueAt) + @if (! $hideDueAt)

{{ trans($textDueAt) }}: - @date($document->due_at) + + + @date($document->due_at) +

@endif @stack('due_at_input_end') @@ -180,7 +190,7 @@
-@if (!$hideItems) +@if (! $hideItems)
@@ -188,38 +198,49 @@ @stack('name_th_start') - @if (!$hideItems || (!$hideName && !$hideDescription)) - {{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }} + @if (! $hideItems || (! $hideName && ! $hideDescription)) + + {{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }} + @endif @stack('name_th_end') @stack('quantity_th_start') - @if (!$hideQuantity) - {{ trans($textQuantity) }} + @if (! $hideQuantity) + + {{ trans($textQuantity) }} + @endif @stack('quantity_th_end') @stack('price_th_start') - @if (!$hidePrice) - {{ trans($textPrice) }} + @if (! $hidePrice) + + {{ trans($textPrice) }} + @endif @stack('price_th_end') - @if (!$hideDiscount) + @if (! $hideDiscount) @if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both'])) @stack('discount_td_start') - {{ trans('invoices.discount') }} + + {{ trans('invoices.discount') }} + @stack('discount_td_end') @endif @endif @stack('total_th_start') - @if (!$hideAmount) - {{ trans($textAmount) }} + @if (! $hideAmount) + + {{ trans($textAmount) }} + @endif @stack('total_th_end') + @if ($document->items->count()) @foreach($document->items as $item) @@ -255,7 +276,10 @@
@stack('notes_input_start') @if ($document->notes) -

{{ trans_choice('general.notes', 2) }}

+

+ {{ trans_choice('general.notes', 2) }} +

+ {!! nl2br($document->notes) !!} @endif @stack('notes_input_end') @@ -267,23 +291,39 @@ @if ($total->code != 'total') @stack($total->code . '_total_tr_start')
- {{ trans($total->title) }}: - @money($total->amount, $document->currency_code, true) + + {{ trans($total->title) }}: + + + + @money($total->amount, $document->currency_code, true) +
@stack($total->code . '_total_tr_end') @else @if ($document->paid) @stack('paid_total_tr_start')
- {{ trans('invoices.paid') }}: - - @money($document->paid, $document->currency_code, true) + + {{ trans('invoices.paid') }}: + + + + - @money($document->paid, $document->currency_code, true) +
@stack('paid_total_tr_end') @endif + @stack('grand_total_tr_start')
- {{ trans($total->name) }}: - @money($document->amount_due, $document->currency_code, true) + + {{ trans($total->name) }}: + + + + @money($document->amount_due, $document->currency_code, true) +
@stack('grand_total_tr_end') @endif @@ -291,12 +331,14 @@
-@if (!$hideFooter) +@if (! $hideFooter) @if ($document->footer)
- {!! nl2br($document->footer) !!} + + {!! nl2br($document->footer) !!} +
diff --git a/resources/views/components/documents/template/modern.blade.php b/resources/views/components/documents/template/modern.blade.php index 6c9a3ea96..8fc0191cf 100644 --- a/resources/views/components/documents/template/modern.blade.php +++ b/resources/views/components/documents/template/modern.blade.php @@ -12,8 +12,8 @@
@stack('company_logo_start') - @if (!$hideCompanyLogo) - @if (!empty($document->contact->logo) && !empty($document->contact->logo->id)) + @if (! $hideCompanyLogo) + @if (! empty($document->contact->logo) && ! empty($document->contact->logo->id)) {{ $document->contact_name }} @else {{ setting('company.name') }} @@ -31,24 +31,29 @@ {{ $textDocumentSubheading }}

@endif - @if (!$hideCompanyName) -

{{ setting('company.name') }}

+ + @if (! $hideCompanyName) +

+ {{ setting('company.name') }} +

@endif - @if (!$hideCompanyDetails) - @if (!$hideCompanyAddress) + + @if (! $hideCompanyDetails) + @if (! $hideCompanyAddress)

{!! nl2br(setting('company.address')) !!} {!! $document->company->location !!}

@endif - @if (!$hideCompanyTaxNumber) + @if (! $hideCompanyTaxNumber)

@if (setting('company.tax_number')) - - {{ trans('general.tax_number') }}: - - {{ setting('company.tax_number') }} + + {{ trans('general.tax_number') }}: + + + {{ setting('company.tax_number') }} @endif

@endif @@ -62,7 +67,9 @@ @endif @if (!$hideCompanyEmail) -

{{ setting('company.email') }}

+

+ {{ setting('company.email') }} +

@endif @endif @stack('company_details_end') @@ -74,31 +81,37 @@
@if (! $hideContactInfo) -

{{ trans($textContactInfo) }}

+

+ {{ trans($textContactInfo) }} +

@endif @stack('name_input_start') - @if (!$hideContactName) -

{{ $document->contact_name }}

+ @if (! $hideContactName) +

+ {{ $document->contact_name }} +

@endif @stack('name_input_end') @stack('address_input_start') - @if (!$hideContactAddress) + @if (! $hideContactAddress)

- {!! nl2br($document->contact_address) !!}
+ {!! nl2br($document->contact_address) !!} +
{!! $document->contact_location !!}

@endif @stack('address_input_end') @stack('tax_number_input_start') - @if (!$hideContactTaxNumber) + @if (! $hideContactTaxNumber) @if ($document->contact_tax_number)

{{ trans('general.tax_number') }}: + {{ $document->contact_tax_number }}

@endif @@ -106,7 +119,7 @@ @stack('tax_number_input_end') @stack('phone_input_start') - @if (!$hideContactPhone) + @if (! $hideContactPhone) @if ($document->contact_phone)

{{ $document->contact_phone }} @@ -116,9 +129,9 @@ @stack('phone_input_end') @stack('email_start') - @if (!$hideContactEmail) + @if (! $hideContactEmail)

- {{ $document->contact_email }} + {{ $document->contact_email }}

@endif @stack('email_input_end') @@ -128,47 +141,67 @@
@stack('order_number_input_start') - @if (!$hideOrderNumber) + @if (! $hideOrderNumber) @if ($document->order_number) -

- {{ trans($textOrderNumber) }}: - {{ $document->order_number }} -

+

+ + {{ trans($textOrderNumber) }}: + + + + {{ $document->order_number }} + +

@endif @endif @stack('order_number_input_end') @stack('invoice_number_input_start') - @if (!$hideDocumentNumber) -

- {{ trans($textDocumentNumber) }}: - {{ $document->document_number }} -

+ @if (! $hideDocumentNumber) +

+ + {{ trans($textDocumentNumber) }}: + + + + {{ $document->document_number }} + +

@endif @stack('invoice_number_input_end') @stack('issued_at_input_start') - @if (!$hideIssuedAt) -

- {{ trans($textIssuedAt) }}: - @date($document->issued_at) -

+ @if (! $hideIssuedAt) +

+ + {{ trans($textIssuedAt) }}: + + + + @date($document->issued_at) + +

@endif @stack('issued_at_input_end') @stack('due_at_input_start') - @if (!$hideDueAt) -

- {{ trans($textDueAt) }}: - @date($document->due_at) -

+ @if (! $hideDueAt) +

+ + {{ trans($textDueAt) }}: + + + + @date($document->due_at) + +

@endif @stack('due_at_input_end')
-@if (!$hideItems) +@if (! $hideItems)
@@ -176,38 +209,49 @@ @stack('name_th_start') - @if (!$hideItems || (!$hideName && !$hideDescription)) - {{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }} + @if (! $hideItems || (! $hideName && ! $hideDescription)) + + {{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }} + @endif @stack('name_th_end') @stack('quantity_th_start') - @if (!$hideQuantity) - {{ trans($textQuantity) }} + @if (! $hideQuantity) + + {{ trans($textQuantity) }} + @endif @stack('quantity_th_end') @stack('price_th_start') - @if (!$hidePrice) - {{ trans($textPrice) }} + @if (! $hidePrice) + + {{ trans($textPrice) }} + @endif @stack('price_th_end') - @if (!$hideDiscount) + @if (! $hideDiscount) @if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both'])) @stack('discount_td_start') - {{ trans('invoices.discount') }} + + {{ trans('invoices.discount') }} + @stack('discount_td_end') @endif @endif @stack('total_th_start') - @if (!$hideAmount) - {{ trans($textAmount) }} + @if (! $hideAmount) + + {{ trans($textAmount) }} + @endif @stack('total_th_end') + @if ($document->items->count()) @foreach($document->items as $item) @@ -243,7 +287,10 @@
@stack('notes_input_start') @if ($document->notes) -

{{ trans_choice('general.notes', 2) }}

+

+ {{ trans_choice('general.notes', 2) }} +

+ {!! nl2br($document->notes) !!} @endif @stack('notes_input_end') @@ -255,23 +302,39 @@ @if ($total->code != 'total') @stack($total->code . '_total_tr_start')
- {{ trans($total->title) }}: - @money($total->amount, $document->currency_code, true) + + {{ trans($total->title) }}: + + + + @money($total->amount, $document->currency_code, true) +
@stack($total->code . '_total_tr_end') @else @if ($document->paid) @stack('paid_total_tr_start')
- {{ trans('invoices.paid') }}: - - @money($document->paid, $document->currency_code, true) + + {{ trans('invoices.paid') }}: + + + + - @money($document->paid, $document->currency_code, true) +
@stack('paid_total_tr_end') @endif + @stack('grand_total_tr_start')
- {{ trans($total->name) }}: - @money($document->amount_due, $document->currency_code, true) + + {{ trans($total->name) }}: + + + + @money($document->amount_due, $document->currency_code, true) +
@stack('grand_total_tr_end') @endif @@ -279,12 +342,14 @@
-@if (!$hideFooter) +@if (! $hideFooter) @if ($document->footer)
- {!! nl2br($document->footer) !!} + + {!! nl2br($document->footer) !!} +
From e2b810e33086153394e8686ce4b58a5fb034e7ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 10 Jun 2022 17:48:30 +0300 Subject: [PATCH 11/19] update composer.lock file --- composer.lock | 111 +++++++++++++++++++++++++------------------------- 1 file changed, 56 insertions(+), 55 deletions(-) diff --git a/composer.lock b/composer.lock index 3231da296..77df1997c 100644 --- a/composer.lock +++ b/composer.lock @@ -608,16 +608,16 @@ }, { "name": "akaunting/laravel-sortable", - "version": "1.0.3", + "version": "1.0.5", "source": { "type": "git", "url": "https://github.com/akaunting/laravel-sortable.git", - "reference": "8cfb79d6b6426cd7f1c01a64025f615e17a88fda" + "reference": "8a5f702d282934c998933f82c3372aab48238ace" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/akaunting/laravel-sortable/zipball/8cfb79d6b6426cd7f1c01a64025f615e17a88fda", - "reference": "8cfb79d6b6426cd7f1c01a64025f615e17a88fda", + "url": "https://api.github.com/repos/akaunting/laravel-sortable/zipball/8a5f702d282934c998933f82c3372aab48238ace", + "reference": "8a5f702d282934c998933f82c3372aab48238ace", "shasum": "" }, "require": { @@ -666,9 +666,9 @@ ], "support": { "issues": "https://github.com/akaunting/laravel-sortable/issues", - "source": "https://github.com/akaunting/laravel-sortable/tree/1.0.3" + "source": "https://github.com/akaunting/laravel-sortable/tree/1.0.5" }, - "time": "2022-01-31T13:15:55+00:00" + "time": "2022-06-10T12:46:42+00:00" }, { "name": "akaunting/laravel-version", @@ -906,16 +906,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.224.3", + "version": "3.225.1", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "52f45dfe0d1e5a77f33c050bde5134901fc54a57" + "reference": "b795c9c14997dac771f66d1f6cbadb62c742373a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/52f45dfe0d1e5a77f33c050bde5134901fc54a57", - "reference": "52f45dfe0d1e5a77f33c050bde5134901fc54a57", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/b795c9c14997dac771f66d1f6cbadb62c742373a", + "reference": "b795c9c14997dac771f66d1f6cbadb62c742373a", "shasum": "" }, "require": { @@ -991,9 +991,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.224.3" + "source": "https://github.com/aws/aws-sdk-php/tree/3.225.1" }, - "time": "2022-06-02T18:22:57+00:00" + "time": "2022-06-09T18:19:43+00:00" }, { "name": "balping/json-raw-encoder", @@ -2924,16 +2924,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.4.3", + "version": "7.4.4", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "74a8602c6faec9ef74b7a9391ac82c5e65b1cdab" + "reference": "e3ff079b22820c2029d4c2a87796b6a0b8716ad8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/74a8602c6faec9ef74b7a9391ac82c5e65b1cdab", - "reference": "74a8602c6faec9ef74b7a9391ac82c5e65b1cdab", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/e3ff079b22820c2029d4c2a87796b6a0b8716ad8", + "reference": "e3ff079b22820c2029d4c2a87796b6a0b8716ad8", "shasum": "" }, "require": { @@ -3028,7 +3028,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.3" + "source": "https://github.com/guzzle/guzzle/tree/7.4.4" }, "funding": [ { @@ -3044,7 +3044,7 @@ "type": "tidelift" } ], - "time": "2022-05-25T13:24:33+00:00" + "time": "2022-06-09T21:39:15+00:00" }, { "name": "guzzlehttp/promises", @@ -3132,16 +3132,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.2.1", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2" + "reference": "83260bb50b8fc753c72d14dc1621a2dac31877ee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/c94a94f120803a18554c1805ef2e539f8285f9a2", - "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/83260bb50b8fc753c72d14dc1621a2dac31877ee", + "reference": "83260bb50b8fc753c72d14dc1621a2dac31877ee", "shasum": "" }, "require": { @@ -3165,7 +3165,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2-dev" + "dev-master": "2.3-dev" } }, "autoload": { @@ -3227,7 +3227,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.2.1" + "source": "https://github.com/guzzle/psr7/tree/2.3.0" }, "funding": [ { @@ -3243,7 +3243,7 @@ "type": "tidelift" } ], - "time": "2022-03-20T21:55:58+00:00" + "time": "2022-06-09T08:26:02+00:00" }, { "name": "hoa/compiler", @@ -4472,16 +4472,16 @@ }, { "name": "laravel/framework", - "version": "v9.16.0", + "version": "v9.17.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "dbad869e737542734c48d36d4cb87ee90455c4b8" + "reference": "091e287678ac723c591509ca6374e4ded4a99b1c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/dbad869e737542734c48d36d4cb87ee90455c4b8", - "reference": "dbad869e737542734c48d36d4cb87ee90455c4b8", + "url": "https://api.github.com/repos/laravel/framework/zipball/091e287678ac723c591509ca6374e4ded4a99b1c", + "reference": "091e287678ac723c591509ca6374e4ded4a99b1c", "shasum": "" }, "require": { @@ -4647,7 +4647,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2022-06-02T18:13:11+00:00" + "time": "2022-06-07T15:09:32+00:00" }, { "name": "laravel/sanctum", @@ -5037,16 +5037,16 @@ }, { "name": "league/commonmark", - "version": "2.3.2", + "version": "2.3.3", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "6eddb90a9e4a1a8c5773226068fcfb48cb36812a" + "reference": "0da1dca5781dd3cfddbe328224d9a7a62571addc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/6eddb90a9e4a1a8c5773226068fcfb48cb36812a", - "reference": "6eddb90a9e4a1a8c5773226068fcfb48cb36812a", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/0da1dca5781dd3cfddbe328224d9a7a62571addc", + "reference": "0da1dca5781dd3cfddbe328224d9a7a62571addc", "shasum": "" }, "require": { @@ -5139,7 +5139,7 @@ "type": "tidelift" } ], - "time": "2022-06-03T14:07:39+00:00" + "time": "2022-06-07T21:28:26+00:00" }, { "name": "league/config", @@ -6215,16 +6215,16 @@ }, { "name": "monolog/monolog", - "version": "2.6.0", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "247918972acd74356b0a91dfaa5adcaec069b6c0" + "reference": "5579edf28aee1190a798bfa5be8bc16c563bd524" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/247918972acd74356b0a91dfaa5adcaec069b6c0", - "reference": "247918972acd74356b0a91dfaa5adcaec069b6c0", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/5579edf28aee1190a798bfa5be8bc16c563bd524", + "reference": "5579edf28aee1190a798bfa5be8bc16c563bd524", "shasum": "" }, "require": { @@ -6303,7 +6303,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.6.0" + "source": "https://github.com/Seldaek/monolog/tree/2.7.0" }, "funding": [ { @@ -6315,7 +6315,7 @@ "type": "tidelift" } ], - "time": "2022-05-10T09:36:00+00:00" + "time": "2022-06-09T08:59:12+00:00" }, { "name": "mtdowling/jmespath.php", @@ -9161,6 +9161,7 @@ "type": "tidelift" } ], + "abandoned": "symfony/error-handler", "time": "2022-04-12T15:19:55+00:00" }, { @@ -11301,21 +11302,21 @@ }, { "name": "webmozart/assert", - "version": "1.10.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" + "ext-ctype": "*", + "php": "^7.2 || ^8.0" }, "conflict": { "phpstan/phpstan": "<0.12.20", @@ -11353,9 +11354,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" + "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, - "time": "2021-03-09T10:59:23+00:00" + "time": "2022-06-03T18:03:27+00:00" } ], "packages-dev": [ @@ -13931,16 +13932,16 @@ }, { "name": "spatie/laravel-ignition", - "version": "1.2.3", + "version": "1.2.4", "source": { "type": "git", "url": "https://github.com/spatie/laravel-ignition.git", - "reference": "51e5daaa7e43c154fe57f1ddfbba862f9fe57646" + "reference": "b90026ba26fe6589101dc5cd6527846290560aea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/51e5daaa7e43c154fe57f1ddfbba862f9fe57646", - "reference": "51e5daaa7e43c154fe57f1ddfbba862f9fe57646", + "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/b90026ba26fe6589101dc5cd6527846290560aea", + "reference": "b90026ba26fe6589101dc5cd6527846290560aea", "shasum": "" }, "require": { @@ -14017,7 +14018,7 @@ "type": "github" } ], - "time": "2022-05-05T15:53:24+00:00" + "time": "2022-06-08T07:07:57+00:00" }, { "name": "theseer/tokenizer", @@ -14177,5 +14178,5 @@ "ext-zip": "*" }, "platform-dev": [], - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } From 5890a99bf92ab365d5dc1b35f9f39712ef1d2119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 10 Jun 2022 18:21:15 +0300 Subject: [PATCH 12/19] Fixed send email checkbox styling. --- resources/views/modals/invoices/email.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/modals/invoices/email.blade.php b/resources/views/modals/invoices/email.blade.php index 3541f195c..3691c9d8e 100644 --- a/resources/views/modals/invoices/email.blade.php +++ b/resources/views/modals/invoices/email.blade.php @@ -7,7 +7,7 @@ - + From 12d3a926d016e8a3fc9664e0dd6b7de38cbbf454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihan=20=C5=9Eent=C3=BCrk?= <53110792+CihanSenturk@users.noreply.github.com> Date: Fri, 10 Jun 2022 18:59:17 +0300 Subject: [PATCH 13/19] select group placeholder made dynamic --- app/Abstracts/View/Components/Form.php | 4 ++++ resources/views/components/form/group/select.blade.php | 6 +----- resources/views/components/form/input/select.blade.php | 6 +----- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/app/Abstracts/View/Components/Form.php b/app/Abstracts/View/Components/Form.php index a92e1cbbd..4c39e8cfd 100644 --- a/app/Abstracts/View/Components/Form.php +++ b/app/Abstracts/View/Components/Form.php @@ -215,6 +215,10 @@ abstract class Form extends Component $label = $this->name; } + if ($this->type == 'select') { + return trans('general.form.select.field', ['field' => $label]); + } + return trans('general.form.enter', ['field' => $label]); } diff --git a/resources/views/components/form/group/select.blade.php b/resources/views/components/form/group/select.blade.php index e71d52ef0..d4b2bbc50 100644 --- a/resources/views/components/form/group/select.blade.php +++ b/resources/views/components/form/group/select.blade.php @@ -33,11 +33,7 @@ title="{!! $label !!}" - @if (isset($attributes['placeholder'])) - placeholder="{{ $attributes['placeholder'] }}" - @else - placeholder="{{ trans('general.form.select.field', ['field' => $label]) }}" - @endif + placeholder="{{ $placeholder }}" name="{{ $name }}" diff --git a/resources/views/components/form/input/select.blade.php b/resources/views/components/form/input/select.blade.php index ea51800cc..ec7ee6366 100644 --- a/resources/views/components/form/input/select.blade.php +++ b/resources/views/components/form/input/select.blade.php @@ -33,11 +33,7 @@ title="{{ $label }}" @endif - @if (isset($attributes['placeholder'])) - placeholder="{{ $attributes['placeholder'] }}" - @else - placeholder="{{ trans('general.form.select.field', ['field' => $label]) }}" - @endif + placeholder="{{ $placeholder }}" name="{{ $name }}" From 92065bd49dd5773970111e8b5ac7cdc75cf64fcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Fri, 10 Jun 2022 19:26:32 +0300 Subject: [PATCH 14/19] improved default scopes --- app/Models/Banking/Account.php | 4 +- app/Models/Banking/Transaction.php | 6 +-- app/Models/Banking/Transfer.php | 36 +++++++++------ app/Models/Common/Contact.php | 8 ++-- app/Models/Document/DocumentHistory.php | 2 +- app/Models/Document/DocumentItem.php | 2 +- app/Models/Document/DocumentItemTax.php | 2 +- app/Models/Document/DocumentTotal.php | 2 +- app/Models/Setting/Category.php | 8 ++-- app/Models/Setting/Currency.php | 12 ++--- app/Models/Setting/Tax.php | 4 +- app/Scopes/Company.php | 2 +- app/Traits/Scopes.php | 59 +++++++++---------------- 13 files changed, 68 insertions(+), 79 deletions(-) diff --git a/app/Models/Banking/Account.php b/app/Models/Banking/Account.php index 7ffafeeea..e2b31976d 100644 --- a/app/Models/Banking/Account.php +++ b/app/Models/Banking/Account.php @@ -51,12 +51,12 @@ class Account extends Model public function expense_transactions() { - return $this->transactions()->whereIn('type', (array) $this->getExpenseTypes()); + return $this->transactions()->whereIn('transactions.type', (array) $this->getExpenseTypes()); } public function income_transactions() { - return $this->transactions()->whereIn('type', (array) $this->getIncomeTypes()); + return $this->transactions()->whereIn('transactions.type', (array) $this->getIncomeTypes()); } public function transactions() diff --git a/app/Models/Banking/Transaction.php b/app/Models/Banking/Transaction.php index f35e9e4b6..013301fc2 100644 --- a/app/Models/Banking/Transaction.php +++ b/app/Models/Banking/Transaction.php @@ -98,7 +98,7 @@ class Transaction extends Model public function bill() { - return $this->belongsTo('App\Models\Document\Document', 'document_id'); + return $this->belongsTo('App\Models\Document\Document', 'document_id')->withoutGlobalScope('App\Scopes\Document'); } public function category() @@ -123,12 +123,12 @@ class Transaction extends Model public function invoice() { - return $this->belongsTo('App\Models\Document\Document', 'document_id'); + return $this->belongsTo('App\Models\Document\Document', 'document_id')->withoutGlobalScope('App\Scopes\Document'); } public function document() { - return $this->belongsTo('App\Models\Document\Document', 'document_id'); + return $this->belongsTo('App\Models\Document\Document', 'document_id')->withoutGlobalScope('App\Scopes\Document'); } public function parent() diff --git a/app/Models/Banking/Transfer.php b/app/Models/Banking/Transfer.php index f9a37b9d3..bd1d92c53 100644 --- a/app/Models/Banking/Transfer.php +++ b/app/Models/Banking/Transfer.php @@ -54,34 +54,42 @@ class Transfer extends Model public function expense_transaction() { - return $this->belongsTo('App\Models\Banking\Transaction', 'expense_transaction_id')->withDefault(['name' => trans('general.na')]); + return $this->belongsTo('App\Models\Banking\Transaction', 'expense_transaction_id') + ->withoutGlobalScope('App\Scopes\Transaction') + ->withDefault(['name' => trans('general.na')]); } public function expense_account() { return $this->belongsToThrough( - 'App\Models\Banking\Account', - 'App\Models\Banking\Transaction', - null, - '', - ['App\Models\Banking\Transaction' => 'expense_transaction_id'] - )->withDefault(['name' => trans('general.na')]); + 'App\Models\Banking\Account', + 'App\Models\Banking\Transaction', + null, + '', + ['App\Models\Banking\Transaction' => 'expense_transaction_id'] + ) + ->withoutGlobalScope('App\Scopes\Transaction') + ->withDefault(['name' => trans('general.na')]); } public function income_transaction() { - return $this->belongsTo('App\Models\Banking\Transaction', 'income_transaction_id')->withDefault(['name' => trans('general.na')]); + return $this->belongsTo('App\Models\Banking\Transaction', 'income_transaction_id') + ->withoutGlobalScope('App\Scopes\Transaction') + ->withDefault(['name' => trans('general.na')]); } public function income_account() { return $this->belongsToThrough( - 'App\Models\Banking\Account', - 'App\Models\Banking\Transaction', - null, - '', - ['App\Models\Banking\Transaction' => 'income_transaction_id'] - )->withDefault(['name' => trans('general.na')]); + 'App\Models\Banking\Account', + 'App\Models\Banking\Transaction', + null, + '', + ['App\Models\Banking\Transaction' => 'income_transaction_id'] + ) + ->withoutGlobalScope('App\Scopes\Transaction') + ->withDefault(['name' => trans('general.na')]); } /** diff --git a/app/Models/Common/Contact.php b/app/Models/Common/Contact.php index 9d1453ee7..2c470f360 100644 --- a/app/Models/Common/Contact.php +++ b/app/Models/Common/Contact.php @@ -94,7 +94,7 @@ class Contact extends Model public function bills() { - return $this->documents()->where('type', Document::BILL_TYPE); + return $this->documents()->where('documents.type', Document::BILL_TYPE); } public function currency() @@ -104,17 +104,17 @@ class Contact extends Model public function expense_transactions() { - return $this->transactions()->whereIn('type', (array) $this->getExpenseTypes()); + return $this->transactions()->whereIn('transactions.type', (array) $this->getExpenseTypes()); } public function income_transactions() { - return $this->transactions()->whereIn('type', (array) $this->getIncomeTypes()); + return $this->transactions()->whereIn('transactions.type', (array) $this->getIncomeTypes()); } public function invoices() { - return $this->documents()->where('type', Document::INVOICE_TYPE); + return $this->documents()->where('documents.type', Document::INVOICE_TYPE); } public function transactions() diff --git a/app/Models/Document/DocumentHistory.php b/app/Models/Document/DocumentHistory.php index e7245862c..ea9ac38c1 100644 --- a/app/Models/Document/DocumentHistory.php +++ b/app/Models/Document/DocumentHistory.php @@ -17,7 +17,7 @@ class DocumentHistory extends Model public function document() { - return $this->belongsTo('App\Models\Document\Document'); + return $this->belongsTo('App\Models\Document\Document')->withoutGlobalScope('App\Scopes\Document'); } public function scopeType(Builder $query, string $type) diff --git a/app/Models/Document/DocumentItem.php b/app/Models/Document/DocumentItem.php index d7b303f31..d4bb8d1cc 100644 --- a/app/Models/Document/DocumentItem.php +++ b/app/Models/Document/DocumentItem.php @@ -69,7 +69,7 @@ class DocumentItem extends Model public function document() { - return $this->belongsTo('App\Models\Document\Document'); + return $this->belongsTo('App\Models\Document\Document')->withoutGlobalScope('App\Scopes\Document'); } public function item() diff --git a/app/Models/Document/DocumentItemTax.php b/app/Models/Document/DocumentItemTax.php index 1db6aa2f8..70af4a2a0 100644 --- a/app/Models/Document/DocumentItemTax.php +++ b/app/Models/Document/DocumentItemTax.php @@ -26,7 +26,7 @@ class DocumentItemTax extends Model public function document() { - return $this->belongsTo('App\Models\Document\Document'); + return $this->belongsTo('App\Models\Document\Document')->withoutGlobalScope('App\Scopes\Document'); } public function item() diff --git a/app/Models/Document/DocumentTotal.php b/app/Models/Document/DocumentTotal.php index c6e2a4c18..8ef203f5c 100644 --- a/app/Models/Document/DocumentTotal.php +++ b/app/Models/Document/DocumentTotal.php @@ -29,7 +29,7 @@ class DocumentTotal extends Model public function document() { - return $this->belongsTo('App\Models\Document\Document'); + return $this->belongsTo('App\Models\Document\Document')->withoutGlobalScope('App\Scopes\Document'); } public function scopeType(Builder $query, string $type) diff --git a/app/Models/Setting/Category.php b/app/Models/Setting/Category.php index c3a85e64e..962e4e795 100644 --- a/app/Models/Setting/Category.php +++ b/app/Models/Setting/Category.php @@ -112,22 +112,22 @@ class Category extends Model public function bills() { - return $this->documents()->where('type', Document::BILL_TYPE); + return $this->documents()->where('documents.type', Document::BILL_TYPE); } public function expense_transactions() { - return $this->transactions()->whereIn('type', (array) $this->getExpenseTypes()); + return $this->transactions()->whereIn('transactions.type', (array) $this->getExpenseTypes()); } public function income_transactions() { - return $this->transactions()->whereIn('type', (array) $this->getIncomeTypes()); + return $this->transactions()->whereIn('transactions.type', (array) $this->getIncomeTypes()); } public function invoices() { - return $this->documents()->where('type', Document::INVOICE_TYPE); + return $this->documents()->where('documents.type', Document::INVOICE_TYPE); } public function items() diff --git a/app/Models/Setting/Currency.php b/app/Models/Setting/Currency.php index 18aa2cde1..3b6ee0da1 100644 --- a/app/Models/Setting/Currency.php +++ b/app/Models/Setting/Currency.php @@ -63,7 +63,7 @@ class Currency extends Model public function bills() { - return $this->documents()->where('type', Document::BILL_TYPE); + return $this->documents()->where('documents.type', Document::BILL_TYPE); } public function contacts() @@ -73,22 +73,22 @@ class Currency extends Model public function customers() { - return $this->contacts()->whereIn('type', (array) $this->getCustomerTypes()); + return $this->contacts()->whereIn('contacts.type', (array) $this->getCustomerTypes()); } public function expense_transactions() { - return $this->transactions()->whereIn('type', (array) $this->getExpenseTypes()); + return $this->transactions()->whereIn('transactions.type', (array) $this->getExpenseTypes()); } public function income_transactions() { - return $this->transactions()->whereIn('type', (array) $this->getIncomeTypes()); + return $this->transactions()->whereIn('transactions.type', (array) $this->getIncomeTypes()); } public function invoices() { - return $this->documents()->where('type', Document::INVOICE_TYPE); + return $this->documents()->where('documents.type', Document::INVOICE_TYPE); } public function transactions() @@ -98,7 +98,7 @@ class Currency extends Model public function vendors() { - return $this->contacts()->whereIn('type', (array) $this->getVendorTypes()); + return $this->contacts()->whereIn('contacts.type', (array) $this->getVendorTypes()); } /** diff --git a/app/Models/Setting/Tax.php b/app/Models/Setting/Tax.php index 5eb66775d..f20299ad3 100644 --- a/app/Models/Setting/Tax.php +++ b/app/Models/Setting/Tax.php @@ -55,12 +55,12 @@ class Tax extends Model public function bill_items() { - return $this->document_items()->where('type', Document::BILL_TYPE); + return $this->document_items()->where('documents.type', Document::BILL_TYPE); } public function invoice_items() { - return $this->document_items()->where('type', Document::INVOICE_TYPE); + return $this->document_items()->where('documents.type', Document::INVOICE_TYPE); } public function scopeName($query, $name) diff --git a/app/Scopes/Company.php b/app/Scopes/Company.php index a7f88ae4b..5e2edb75c 100644 --- a/app/Scopes/Company.php +++ b/app/Scopes/Company.php @@ -37,7 +37,7 @@ class Company implements Scope } // Skip if already exists - if ($this->scopeColumnExists($builder, 'company_id')) { + if ($this->scopeColumnExists($builder, '', 'company_id')) { return; } diff --git a/app/Traits/Scopes.php b/app/Traits/Scopes.php index b93a2dd93..6a40279e6 100644 --- a/app/Traits/Scopes.php +++ b/app/Traits/Scopes.php @@ -8,17 +8,10 @@ use Illuminate\Support\Str; trait Scopes { - /** - * Apply the scope to a given Eloquent query builder. - * - * @param \Illuminate\Database\Eloquent\Builder $builder - * @param \Illuminate\Database\Eloquent\Model $model - * @return void - */ - public function applyNotRecurringScope(Builder $builder, Model $model) + public function applyNotRecurringScope(Builder $builder, Model $model): void { - // Skip if recurring already in query - if ($this->scopeValueExists($builder, 'type', '-recurring')) { + // Skip if type already set + if ($this->scopeColumnExists($builder, $model->getTable(), 'type')) { return; } @@ -26,17 +19,10 @@ trait Scopes $builder->isNotRecurring(); } - /** - * Apply the scope to a given Eloquent query builder. - * - * @param \Illuminate\Database\Eloquent\Builder $builder - * @param \Illuminate\Database\Eloquent\Model $model - * @return void - */ - public function applyNotSplitScope(Builder $builder, Model $model) + public function applyNotSplitScope(Builder $builder, Model $model): void { - // Skip if split already in query - if ($this->scopeValueExists($builder, 'type', '-split')) { + // Skip if type already set + if ($this->scopeColumnExists($builder, $model->getTable(), 'type')) { return; } @@ -44,14 +30,7 @@ trait Scopes $builder->isNotSplit(); } - /** - * Check if scope exists. - * - * @param \Illuminate\Database\Eloquent\Builder $builder - * @param $column - * @return boolean - */ - public function scopeColumnExists($builder, $column) + public function scopeColumnExists(Builder $builder, string $table, string $column): bool { $query = $builder->getQuery(); @@ -63,9 +42,14 @@ trait Scopes if (strstr($where['column'], '.')) { $whr = explode('.', $where['column']); + $where['table'] = $whr[0]; $where['column'] = $whr[1]; } + if (! empty($where['table']) && ! empty($table) && ($where['table'] != $table)) { + continue; + } + if ($where['column'] != $column) { continue; } @@ -76,15 +60,7 @@ trait Scopes return false; } - /** - * Check if scope has the exact value. - * - * @param \Illuminate\Database\Eloquent\Builder $builder - * @param $column - * @param $value - * @return boolean - */ - public function scopeValueExists($builder, $column, $value) + public function scopeValueExists(Builder $builder, string $table, string $column, string $value): bool { $query = $builder->getQuery(); @@ -96,9 +72,14 @@ trait Scopes if (strstr($where['column'], '.')) { $whr = explode('.', $where['column']); + $where['table'] = $whr[0]; $where['column'] = $whr[1]; } + if (! empty($where['table']) && ! empty($table) && ($where['table'] != $table)) { + continue; + } + if ($where['column'] != $column) { continue; } @@ -114,8 +95,8 @@ trait Scopes } // @deprecated version 3.0.0 - public function scopeExists($builder, $column) + public function scopeExists($builder, $column): bool { - return $this->scopeColumnExists($builder, $column); + return $this->scopeColumnExists($builder, '', $column); } } From 69a1c309f011cd5441b6bec7d16e573f02be5e89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 10 Jun 2022 19:36:05 +0300 Subject: [PATCH 15/19] Shoe account title on Transfer pages.. --- app/Http/Controllers/Banking/Transfers.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Banking/Transfers.php b/app/Http/Controllers/Banking/Transfers.php index 78118edc3..897eacdb4 100644 --- a/app/Http/Controllers/Banking/Transfers.php +++ b/app/Http/Controllers/Banking/Transfers.php @@ -48,7 +48,7 @@ class Transfers extends Controller */ public function create() { - $accounts = Account::enabled()->orderBy('name')->pluck('name', 'id'); + $accounts = Account::enabled()->orderBy('name')->get()->pluck('title', 'id'); $currency = Currency::where('code', setting('default.currency'))->first(); @@ -134,7 +134,7 @@ class Transfers extends Controller */ public function edit(Transfer $transfer) { - $accounts = Account::enabled()->orderBy('name')->pluck('name', 'id'); + $accounts = Account::enabled()->orderBy('name')->get()->pluck('title', 'id'); $currency_code = ($transfer->expense_transaction->account) ? $transfer->expense_transaction->account->currency_code : setting('default.currency'); From 8f4654b205a7b4a253b1594feebebb06f1135df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Fri, 10 Jun 2022 21:03:51 +0300 Subject: [PATCH 16/19] fixed table name --- app/Models/Setting/Tax.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/Setting/Tax.php b/app/Models/Setting/Tax.php index f20299ad3..c30920015 100644 --- a/app/Models/Setting/Tax.php +++ b/app/Models/Setting/Tax.php @@ -55,12 +55,12 @@ class Tax extends Model public function bill_items() { - return $this->document_items()->where('documents.type', Document::BILL_TYPE); + return $this->document_items()->where('document_item_taxes.type', Document::BILL_TYPE); } public function invoice_items() { - return $this->document_items()->where('documents.type', Document::INVOICE_TYPE); + return $this->document_items()->where('document_item_taxes.type', Document::INVOICE_TYPE); } public function scopeName($query, $name) From 55a9871e8a9e4baf361300558834ba10eda2c09c Mon Sep 17 00:00:00 2001 From: Crowdin Bot Date: Sat, 11 Jun 2022 00:26:08 +0000 Subject: [PATCH 17/19] new crowdin translations --- resources/lang/ca-ES/general.php | 84 +++++++++++++++++++++++++++++--- 1 file changed, 76 insertions(+), 8 deletions(-) diff --git a/resources/lang/ca-ES/general.php b/resources/lang/ca-ES/general.php index a75215799..d61a2b4b6 100644 --- a/resources/lang/ca-ES/general.php +++ b/resources/lang/ca-ES/general.php @@ -6,15 +6,20 @@ return [ 'items' => 'Article|Articles', 'incomes' => 'Ingrés|Ingressos', 'invoices' => 'Factura|Factures', - 'revenues' => 'Cobrament|Cobraments', + 'recurring_invoices' => 'Factura recurrent|Factures recurrents', 'customers' => 'Client|Clients', + 'incomes' => 'Ingrés|Ingressos', + 'recurring_incomes' => 'Ingrés recurrent|Ingressos recurrents', 'expenses' => 'Despesa|Despeses', + 'recurring_expenses' => 'Despesa recurrent|Despeses recurrents', 'bills' => 'Factura|Factures', - 'payments' => 'Pagament|Pagaments', + 'recurring_bills' => 'Factura recurrent|Factures recurrents', 'vendors' => 'Proveïdor|Proveïdors', 'accounts' => 'Compte|Comptes', 'transfers' => 'Transferència|Transferències', 'transactions' => 'Transacció|Transaccions', + 'payments' => 'Pagament|Pagaments', + 'recurring_transactions'=> 'Transacció recurrent|Transaccions recurrents', 'reports' => 'Informe|Informes', 'settings' => 'Configuració|Configuració', 'categories' => 'Categoria|Categories', @@ -40,6 +45,7 @@ return [ 'statuses' => 'Estat|Estats', 'others' => 'Altre|Altres', 'contacts' => 'Contacte|Contactes', + 'documents' => 'Document|Documents', 'reconciliations' => 'Conciliació|Conciliacions', 'developers' => 'Desenvolupador|Desenvolupadors', 'schedules' => 'Agenda|Agendes', @@ -54,6 +60,16 @@ return [ 'notifications' => 'Notificació|Notificacions', 'countries' => 'País|Països', 'cities' => 'Població/Ciutat|Poblacions/Ciutats', + 'email_services' => 'Servei de correu|Serveis de correu', + 'email_templates' => 'Plantilla de correu|Plantilles de correu', + 'bank_transactions' => 'Transacció bancària|Transaccions bancàries', + 'recurring_templates' => 'Plantilla recurrent|Plantilles recurrents', + 'receipts' => 'Rebut|Rebuts', + 'products' => 'Producte|Productes', + 'services' => 'Servei|Serveis', + 'invitations' => 'Invitació|Invitacions', + 'attachments' => 'Adjunt|Adjunts', + 'histories' => 'Història|Històries', 'welcome' => 'Benvingut/da', 'banking' => 'Bancs', @@ -63,6 +79,7 @@ return [ 'amount' => 'Quantitat', 'enabled' => 'Activat', 'disabled' => 'Desactivat', + 'disabled_type' => 'Aquest :type s\'ha desactivat', 'yes' => 'Sí', 'no' => 'No', 'na' => 'N/A', @@ -77,11 +94,17 @@ return [ 'add_expense' => 'Afegeix despesa', 'add_transfer' => 'Afegeix transferència', 'show' => 'Mostra', + 'create' => 'Crea', 'edit' => 'Edita', 'delete' => 'Esborra', 'send' => 'Envia', + 'send_to' => 'Envia a', + 'receive' => 'Rep', 'share' => 'Comparteix', + 'share_link' => 'Comparteix l\'enllaç', + 'copy_link' => 'Copia l\'enllaç', 'download' => 'Descarrega', + 'restore' => 'Restaura', 'delete_confirm' => 'Confimes que vols esborrar :name :type?', 'name' => 'Nom', 'email' => 'Correu electrònic', @@ -107,6 +130,8 @@ return [ 'loading' => 'Es carrega...', 'from' => 'Des de', 'to' => 'A', + 'subject' => 'Assumpte', + 'body' => 'Cos', 'print' => 'Imprimeix', 'download_pdf' => 'Descarrega PDF', 'customize' => 'Personalitza', @@ -162,12 +187,44 @@ return [ 'is' => 'és', 'isnot' => 'no és', 'recurring_and_more' => 'Recurrent i més...', - 'due_on' => 'Límit el', + 'due' => 'Venciment', + 'due_on' => 'Venç el', 'amount_due' => 'Quantitat', 'financial_year' => 'Any fiscal', 'created' => 'Creat/da', 'state' => 'Província/Estat', 'zip_code' => 'Codi postal', + 'parent' => 'Pare/Mare', + 'split' => 'Divideix', + 'email_send_me' => 'Envia\'m una còpia a mi mateix a :email', + 'connect' => 'Connecta', + 'assign' => 'Assigna', + 'your_notifications' => 'La teva notificació|Les teves notificacions', + 'new' => 'Nou', + 'new_more' => 'Nou...', + 'number' => 'Número', + 'client_portal' => 'Portal del client', + 'issue_date' => 'Data d\'emissió', + 'due_date' => 'Data de venciment', + 'open' => 'Obre', + 'invite' => 'Convida', + 'common' => 'Comuna', + 'api' => 'API', + 'admin_panel' => 'Tauler d\'administració', + 'special' => 'Especial', + 'distribution' => 'Distribució', + 'timeline' => 'Línia de temps', + 'incoming' => 'Entrant', + 'outgoing' => 'Sortint', + 'none' => 'Cap', + 'preferences' => 'Preferències', + 'resend' => 'Reenvia', + 'last_sent' => 'Últim enviament :date', + 'preview_in_window' => 'Previsualitza en una altra finestra', + 'copied' => 'S\'ha copiat', + 'preview_mode' => 'Mode de previsualització', + 'go_back' => 'Torna a :type', + 'validation_error' => 'Error de validació', 'card' => [ 'cards' => 'Tarjeta|Tarjetes', @@ -179,6 +236,7 @@ return [ ], 'title' => [ + 'show' => 'Mostra :type', 'new' => 'Nou :type', 'edit' => 'Edita :type', 'delete' => 'Esborra :type', @@ -187,6 +245,8 @@ return [ 'get' => 'Utilitza :type', 'add' => 'Afegeix :type', 'manage' => 'Gestiona :type', + 'invite' => 'Convida :type', + 'closed' => 'Tancat :type', ], 'form' => [ @@ -215,11 +275,12 @@ return [ ], 'date_range' => [ - 'today' => 'Avui', - 'yesterday' => 'Ahir', - 'last_days' => 'Últims :day dies', - 'this_month' => 'Aquest mes', - 'last_month' => 'Últim mes', + 'today' => 'Avui', + 'yesterday' => 'Ahir', + 'week_ago' => 'Fa una setmana', + 'last_days' => 'Últims :day dies', + 'this_month' => 'Aquest mes', + 'last_month' => 'Últim mes', ], 'empty' => [ @@ -232,8 +293,15 @@ return [ 'payments' => 'Una despesa és una transacció de pagament. Pot ser un registre independent (per exemple un rebut) o anar lligat a una factura de proveïdor.', 'vendors' => 'És necessari crear proveïdors per tal de poder crear factures a proveïdors. Pots veure el balanç del que deus i generar informes per proveïdor.', 'transfers' => 'Les transferències permeten moure els diners d\'un compte a un altre, ja sigui en la mateixa moneda o una altra de diferent.', + 'transactions' => 'Les transaccions permeten crear registres dels ingressos o despeses. Els pagaments de factures/factures també es mostren aquí.', 'taxes' => 'Els impostos s\'apliquen sobre l\'import de les factures. La teva comptabilitat dependrà de la legislació vigent per a cada impost.', 'reconciliations' => 'La conciliació de moviments bancaris és un procés que permet assegurar que les dades entre la comptabilitat i els registres bancaris coincideixen.', + 'recurring_templates' => 'Plantilla recurrent pot ser ingrés o despesa', + + 'actions' => [ + 'new' => 'Entra els detalls i crea el teu primer :type', + 'import' => 'Importa els/les :type existents amb un simple click', + ], ], ]; From 1f7dee362abdace3e8fefe487d90f0abd7cf5bf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Sat, 11 Jun 2022 11:17:33 +0300 Subject: [PATCH 18/19] version update 3.0.0 to 3.0.1 --- config/version.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/version.php b/config/version.php index 459c056e4..e63facf8d 100644 --- a/config/version.php +++ b/config/version.php @@ -10,13 +10,13 @@ return [ 'minor' => '0', - 'patch' => '0', + 'patch' => '1', 'build' => '', 'status' => 'Stable', - 'date' => '1-June-2022', + 'date' => '11-June-2022', 'time' => '10:00', From 182c7281e53ea4a3d3971d3c21723b946d647f61 Mon Sep 17 00:00:00 2001 From: Sevan Nerse Date: Sat, 11 Jun 2022 22:30:51 +0300 Subject: [PATCH 19/19] translation duplicated --- resources/lang/en-GB/general.php | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/lang/en-GB/general.php b/resources/lang/en-GB/general.php index 3adf83d02..b0e6e5bfa 100644 --- a/resources/lang/en-GB/general.php +++ b/resources/lang/en-GB/general.php @@ -4,7 +4,6 @@ return [ 'dashboards' => 'Dashboard|Dashboards', 'items' => 'Item|Items', - 'incomes' => 'Income|Incomes', 'invoices' => 'Invoice|Invoices', 'recurring_invoices' => 'Recurring Invoice|Recurring Invoices', 'customers' => 'Customer|Customers',