From 7b3863b1d5657c005acb141d5da1946db210c5e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Sun, 2 Feb 2020 21:08:00 +0300 Subject: [PATCH] Index page path changes.. --- .../assets/js/components/AkauntingSearch.vue | 260 ++++++++++-------- resources/assets/js/plugins/bulk-action.js | 4 +- .../views/auth/permissions/index.blade.php | 32 +-- resources/views/auth/roles/index.blade.php | 20 +- resources/views/auth/users/index.blade.php | 20 +- .../views/banking/accounts/index.blade.php | 18 +- .../banking/reconciliations/index.blade.php | 18 +- .../views/banking/transfers/index.blade.php | 18 +- .../views/common/companies/index.blade.php | 20 +- .../views/common/dashboards/index.blade.php | 20 +- resources/views/common/items/index.blade.php | 18 +- .../form/bulk_action_row_group.blade.php | 27 +- .../views/partials/form/delete_link.blade.php | 11 +- .../views/purchases/bills/index.blade.php | 20 +- .../views/purchases/payments/index.blade.php | 20 +- .../views/purchases/vendors/index.blade.php | 20 +- .../views/sales/customers/index.blade.php | 20 +- .../views/sales/invoices/index.blade.php | 20 +- .../views/sales/revenues/index.blade.php | 20 +- .../views/settings/categories/index.blade.php | 20 +- .../views/settings/currencies/index.blade.php | 20 +- .../views/settings/taxes/index.blade.php | 20 +- routes/admin.php | 2 +- 23 files changed, 368 insertions(+), 300 deletions(-) diff --git a/resources/assets/js/components/AkauntingSearch.vue b/resources/assets/js/components/AkauntingSearch.vue index 5393334a7..639849c4a 100644 --- a/resources/assets/js/components/AkauntingSearch.vue +++ b/resources/assets/js/components/AkauntingSearch.vue @@ -1,131 +1,175 @@ + + + + + + - - - - - - - - - + + + + diff --git a/resources/assets/js/plugins/bulk-action.js b/resources/assets/js/plugins/bulk-action.js index df81c20bb..0c89fbd4b 100644 --- a/resources/assets/js/plugins/bulk-action.js +++ b/resources/assets/js/plugins/bulk-action.js @@ -74,7 +74,7 @@ export default class BulkAction { this.loading = true; if (this.value != 'export') { - axios.post(url +'/common/bulk-actions/' + path, { + axios.post(path, { 'handle': this.value, 'selected': this.selected }) @@ -97,7 +97,7 @@ export default class BulkAction { }); } else { axios({ - url: url +'/common/bulk-actions/' + path, + url: path, method: 'POST', data:{ 'handle': this.value, diff --git a/resources/views/auth/permissions/index.blade.php b/resources/views/auth/permissions/index.blade.php index 7e8341d0f..20afe0e08 100644 --- a/resources/views/auth/permissions/index.blade.php +++ b/resources/views/auth/permissions/index.blade.php @@ -10,22 +10,22 @@ @section('content')
-
- {!! Form::open([ - 'url' => 'auth/permissions', - 'role' => 'form', - 'method' => 'GET', - 'class' => 'mb-0' - ]) !!} -
-
- {{ trans('general.search') }}: - -
-
+
+ {!! Form::open([ + 'method' => 'GET', + 'route' => 'permissions.index', + 'role' => 'form', + 'class' => 'mb-0' + ]) !!} +
+ +
- {{ Form::bulkActionRowGroup('general.permissions', $bulk_actions, 'auth/permissions') }} - {!! Form::close() !!} + {{ Form::bulkActionRowGroup('general.permissions', $bulk_actions, ['group' => 'auth', 'type' => 'permissions']) }} + {!! Form::close() !!}
@@ -56,7 +56,7 @@ {{ trans('general.edit') }} @permission('delete-auth-permissions') - {!! Form::deleteLink($item, 'auth/permissions') !!} + {!! Form::deleteLink($item, 'permissions.destroy') !!} @endpermission
diff --git a/resources/views/auth/roles/index.blade.php b/resources/views/auth/roles/index.blade.php index afc5f9358..dc8229489 100644 --- a/resources/views/auth/roles/index.blade.php +++ b/resources/views/auth/roles/index.blade.php @@ -10,21 +10,21 @@ @section('content')
-
+
{!! Form::open([ - 'url' => 'auth/roles', - 'role' => 'form', 'method' => 'GET', + 'route' => 'roles.index', + 'role' => 'form', 'class' => 'mb-0' ]) !!} -
-
- {{ trans('general.search') }}: - -
+
+
- {{ Form::bulkActionRowGroup('general.roles', $bulk_actions, 'auth/roles') }} + {{ Form::bulkActionRowGroup('general.roles', $bulk_actions, ['group' => 'auth', 'type' => 'roles']) }} {!! Form::close() !!}
@@ -56,7 +56,7 @@ {{ trans('general.edit') }} @permission('delete-auth-roles') - {!! Form::deleteLink($item, 'auth/roles') !!} + {!! Form::deleteLink($item, 'roles.destroy') !!} @endpermission
diff --git a/resources/views/auth/users/index.blade.php b/resources/views/auth/users/index.blade.php index 9cb76f1a6..64c35d25a 100644 --- a/resources/views/auth/users/index.blade.php +++ b/resources/views/auth/users/index.blade.php @@ -10,21 +10,21 @@ @section('content')
-
+
{!! Form::open([ - 'url' => 'auth/users', - 'role' => 'form', 'method' => 'GET', + 'route' => 'users.index', + 'role' => 'form', 'class' => 'mb-0' ]) !!} -
-
- {{ trans('general.search') }}: - -
+
+
- {{ Form::bulkActionRowGroup('general.users', $bulk_actions, 'auth/users') }} + {{ Form::bulkActionRowGroup('general.users', $bulk_actions, ['group' => 'auth', 'type' => 'users']) }} {!! Form::close() !!}
@@ -83,7 +83,7 @@ {{ trans('general.edit') }} @permission('delete-auth-users') - {!! Form::deleteLink($item, 'auth/users') !!} + {!! Form::deleteLink($item, 'users.destroy') !!} @endpermission
diff --git a/resources/views/banking/accounts/index.blade.php b/resources/views/banking/accounts/index.blade.php index 8a1a36b02..ec3337cb6 100644 --- a/resources/views/banking/accounts/index.blade.php +++ b/resources/views/banking/accounts/index.blade.php @@ -10,21 +10,21 @@ @section('content')
-
+
{!! Form::open([ + 'method' => 'GET', 'route' => 'accounts.index', 'role' => 'form', - 'method' => 'GET', 'class' => 'mb-0' ]) !!} -
-
- {{ trans('general.search') }}: - -
+
+
- {{ Form::bulkActionRowGroup('general.accounts', $bulk_actions, 'banking/accounts') }} + {{ Form::bulkActionRowGroup('general.accounts', $bulk_actions, ['group' => 'banking', 'type' => 'accounts']) }} {!! Form::close() !!}
@@ -70,7 +70,7 @@ {{ trans('general.edit') }} @permission('delete-banking-accounts') - {!! Form::deleteLink($item, 'banking/accounts') !!} + {!! Form::deleteLink($item, 'accounts.destroy') !!} @endpermission
diff --git a/resources/views/banking/reconciliations/index.blade.php b/resources/views/banking/reconciliations/index.blade.php index c10023758..a7db7a732 100644 --- a/resources/views/banking/reconciliations/index.blade.php +++ b/resources/views/banking/reconciliations/index.blade.php @@ -10,21 +10,21 @@ @section('content')
-
+
{!! Form::open([ + 'method' => 'GET', 'route' => 'reconciliations.index', 'role' => 'form', - 'method' => 'GET', 'class' => 'mb-0' ]) !!} -
-
- {{ trans('general.search') }}: - -
+
+
- {{ Form::bulkActionRowGroup('general.reconciliations', $bulk_actions, 'banking/reconciliations') }} + {{ Form::bulkActionRowGroup('general.reconciliations', $bulk_actions, ['group' => 'banking', 'type' => 'reconciliations']) }} {!! Form::close() !!}
@@ -66,7 +66,7 @@ {{ trans('general.edit') }} @permission('delete-banking-reconciliations') - {!! Form::deleteLink($item, 'banking/reconciliations') !!} + {!! Form::deleteLink($item, 'reconciliations.destroy') !!} @endpermission
diff --git a/resources/views/banking/transfers/index.blade.php b/resources/views/banking/transfers/index.blade.php index c36877347..dcd8338ca 100644 --- a/resources/views/banking/transfers/index.blade.php +++ b/resources/views/banking/transfers/index.blade.php @@ -10,21 +10,21 @@ @section('content')
-
+
{!! Form::open([ + 'method' => 'GET', 'route' => 'transfers.index', 'role' => 'form', - 'method' => 'GET', 'class' => 'mb-0' ]) !!} -
-
- {{ trans('general.search') }}: - -
+
+
- {{ Form::bulkActionRowGroup('general.transfers', $bulk_actions, 'banking/transfers') }} + {{ Form::bulkActionRowGroup('general.transfers', $bulk_actions, ['group' => 'banking', 'type' => 'transfers']) }} {!! Form::close() !!}
@@ -58,7 +58,7 @@ {{ trans('general.edit') }} @permission('delete-banking-transfers') - {!! Form::deleteLink($item, 'banking/transfers') !!} + {!! Form::deleteLink($item, 'transfers.destroy') !!} @endpermission
diff --git a/resources/views/common/companies/index.blade.php b/resources/views/common/companies/index.blade.php index 72f5cd08e..b11035723 100644 --- a/resources/views/common/companies/index.blade.php +++ b/resources/views/common/companies/index.blade.php @@ -10,21 +10,21 @@ @section('content')
-
+
{!! Form::open([ + 'method' => 'GET', 'route' => 'companies.index', 'role' => 'form', - 'method' => 'GET', 'class' => 'mb-0' ]) !!} -
-
- {{ trans('general.search') }}: - -
-
+
+ +
- {{ Form::bulkActionRowGroup('general.companies', $bulk_actions, 'common/companies') }} + {{ Form::bulkActionRowGroup('general.companies', $bulk_actions, ['group' => 'common', 'type' => 'companies']) }} {!! Form::close() !!}
@@ -74,7 +74,7 @@ {{ trans('general.edit') }} @permission('delete-common-companies') - {!! Form::deleteLink($item, 'common/companies') !!} + {!! Form::deleteLink($item, 'companies.destroy') !!} @endpermission
diff --git a/resources/views/common/dashboards/index.blade.php b/resources/views/common/dashboards/index.blade.php index 9cd6aa089..c963d0788 100644 --- a/resources/views/common/dashboards/index.blade.php +++ b/resources/views/common/dashboards/index.blade.php @@ -10,21 +10,21 @@ @section('content')
-
+
{!! Form::open([ + 'method' => 'GET', 'route' => 'dashboards.index', 'role' => 'form', - 'method' => 'GET', 'class' => 'mb-0' ]) !!} -
-
- {{ trans('general.search') }}: - -
-
+
+ +
- {{ Form::bulkActionRowGroup('general.dashboards', $bulk_actions, 'common/dashboards') }} + {{ Form::bulkActionRowGroup('general.dashboards', $bulk_actions, ['group' => 'common', 'type' => 'dashboards']) }} {!! Form::close() !!}
@@ -68,7 +68,7 @@ {{ trans('general.edit') }} @permission('delete-common-dashboards') - {!! Form::deleteLink($item, 'common/dashboards') !!} + {!! Form::deleteLink($item, 'dashboards.destroy') !!} @endpermission
diff --git a/resources/views/common/items/index.blade.php b/resources/views/common/items/index.blade.php index d95e556af..d49d1ee61 100644 --- a/resources/views/common/items/index.blade.php +++ b/resources/views/common/items/index.blade.php @@ -13,21 +13,21 @@ @section('content') @if ($items->count())
-
+
{!! Form::open([ + 'method' => 'GET', 'route' => 'items.index', 'role' => 'form', - 'method' => 'GET', 'class' => 'mb-0' ]) !!} -
-
- {{ trans('general.search') }}: - -
+
+
- {{ Form::bulkActionRowGroup('general.items', $bulk_actions, 'common/items') }} + {{ Form::bulkActionRowGroup('general.items', $bulk_actions, ['group' => 'common', 'type' => 'items']) }} {!! Form::close() !!}
@@ -88,7 +88,7 @@ @endpermission @permission('delete-common-items') - {!! Form::deleteLink($item, 'common/items') !!} + {!! Form::deleteLink($item, 'items.destroy') !!} @endpermission
diff --git a/resources/views/partials/form/bulk_action_row_group.blade.php b/resources/views/partials/form/bulk_action_row_group.blade.php index 362dcb57e..9d247d66b 100644 --- a/resources/views/partials/form/bulk_action_row_group.blade.php +++ b/resources/views/partials/form/bulk_action_row_group.blade.php @@ -1,6 +1,15 @@ @stack('bulk_action_row_input_start') + @php + if (is_array($path)) { + $path = route('bulk-actions.action', $path); + } else { + $path = url('common/bulk-actions/' . $path); + } + @endphp -
+
@@ -16,7 +25,10 @@
- @foreach($actions as $key => $action)