Merge branch 'master' of https://github.com/brkcvn/akaunting into code-clean
This commit is contained in:
		| @@ -282,7 +282,7 @@ abstract class Index extends Component | |||||||
|         foreach ($totals as $key => $total) { |         foreach ($totals as $key => $total) { | ||||||
|             $items[] = [ |             $items[] = [ | ||||||
|                 'title'     => ($key == 'overdue') ? trans('general.overdue') : trans('documents.statuses.' . $key), |                 'title'     => ($key == 'overdue') ? trans('general.overdue') : trans('documents.statuses.' . $key), | ||||||
|                 'href'      => route($route, ['search' => 'status:' . $key]), |                 //'href'      => route($route, ['search' => 'status:' . $key]), | ||||||
|                 'amount'    => money($total, setting('default.currency'), true)->formatForHumans(), |                 'amount'    => money($total, setting('default.currency'), true)->formatForHumans(), | ||||||
|                 'tooltip'   => money($total, setting('default.currency'), true)->format(), |                 'tooltip'   => money($total, setting('default.currency'), true)->format(), | ||||||
|             ]; |             ]; | ||||||
|   | |||||||
| @@ -397,7 +397,7 @@ abstract class Index extends Component | |||||||
|  |  | ||||||
|             $items[] = [ |             $items[] = [ | ||||||
|                 'title'     => $title, |                 'title'     => $title, | ||||||
|                 'href'      => $href, |                 //'href'      => $href, | ||||||
|                 'amount'    => $amount, |                 'amount'    => $amount, | ||||||
|                 'tooltip'   => $tooltip, |                 'tooltip'   => $tooltip, | ||||||
|             ]; |             ]; | ||||||
|   | |||||||
| @@ -6,6 +6,8 @@ use App\Abstracts\Http\ApiController; | |||||||
| use App\Http\Requests\Setting\Setting as Request; | use App\Http\Requests\Setting\Setting as Request; | ||||||
| use App\Http\Resources\Setting\Setting as Resource; | use App\Http\Resources\Setting\Setting as Resource; | ||||||
| use App\Models\Setting\Setting; | use App\Models\Setting\Setting; | ||||||
|  | use Laratrust\Middleware\LaratrustMiddleware; | ||||||
|  |  | ||||||
|  |  | ||||||
| class Settings extends ApiController | class Settings extends ApiController | ||||||
| { | { | ||||||
| @@ -15,9 +17,10 @@ class Settings extends ApiController | |||||||
|     public function __construct() |     public function __construct() | ||||||
|     { |     { | ||||||
|         // Add CRUD permission check |         // Add CRUD permission check | ||||||
|         $this->middleware('permission:create-settings-settings')->only('create', 'store', 'duplicate', 'import'); |         // We've added base 3 permission then get all setting thsi permissions | ||||||
|         $this->middleware('permission:read-settings-settings')->only('index', 'show', 'edit', 'export'); |         $this->middleware('permission:create-settings-company|create-settings-defaults|create-settings-localisation')->only('create', 'store', 'duplicate', 'import'); | ||||||
|         $this->middleware('permission:update-settings-settings')->only('update', 'enable', 'disable', 'destroy'); |         $this->middleware('permission:read-settings-company|read-settings-defaults|read-settings-localisation')->only('index', 'show', 'edit', 'export'); | ||||||
|  |         $this->middleware('permission:update-settings-company|update-settings-defaults|update-settings-localisation')->only('update', 'enable', 'disable', 'destroy'); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|   | |||||||
| @@ -113,13 +113,7 @@ class DocumentTransactions extends Controller | |||||||
|         $response = $this->ajaxDispatch(new CreateBankingDocumentTransaction($document, $request)); |         $response = $this->ajaxDispatch(new CreateBankingDocumentTransaction($document, $request)); | ||||||
|  |  | ||||||
|         if ($response['success']) { |         if ($response['success']) { | ||||||
|             $route = config('type.document.' . $document->type . '.route.prefix'); |             $response['redirect'] = url()->previous(); | ||||||
|  |  | ||||||
|             if ($alias = config('type.document.' . $document->type . '.alias')) { |  | ||||||
|                 $route = $alias . '.' . $route; |  | ||||||
|             } |  | ||||||
|  |  | ||||||
|             $response['redirect'] = route($route . '.show', $document->id); |  | ||||||
|  |  | ||||||
|             $message = trans('messages.success.added', ['type' => trans_choice('general.payments', 1)]); |             $message = trans('messages.success.added', ['type' => trans_choice('general.payments', 1)]); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -91,6 +91,8 @@ class Currencies extends Controller | |||||||
|     { |     { | ||||||
|         $response = $this->ajaxDispatch(new UpdateCurrency($currency, $request)); |         $response = $this->ajaxDispatch(new UpdateCurrency($currency, $request)); | ||||||
|  |  | ||||||
|  |         $currency->default = setting('default.currency') == $currency->code; | ||||||
|  |  | ||||||
|         if ($response['success']) { |         if ($response['success']) { | ||||||
|             $message = trans('messages.success.updated', ['type' => $currency->name]); |             $message = trans('messages.success.updated', ['type' => $currency->name]); | ||||||
|         } else { |         } else { | ||||||
|   | |||||||
| @@ -13,7 +13,7 @@ class Pin extends Component | |||||||
|  |  | ||||||
|     public $pinned = false; |     public $pinned = false; | ||||||
|  |  | ||||||
|     public $reportId = null; |     public $report; | ||||||
|  |  | ||||||
|     public function render(): View |     public function render(): View | ||||||
|     { |     { | ||||||
| @@ -38,7 +38,7 @@ class Pin extends Component | |||||||
|                         continue; |                         continue; | ||||||
|                     } |                     } | ||||||
|  |  | ||||||
|                     if (in_array($this->reportId, $pins)) { |                     if (in_array($this->report->id, $pins)) { | ||||||
|                         $this->pinned = true; |                         $this->pinned = true; | ||||||
|  |  | ||||||
|                         break; |                         break; | ||||||
|   | |||||||
| @@ -15,19 +15,22 @@ class UpdateReconciliation extends Job implements ShouldUpdate | |||||||
|             $reconcile = (int) $this->request->get('reconcile'); |             $reconcile = (int) $this->request->get('reconcile'); | ||||||
|             $transactions = $this->request->get('transactions'); |             $transactions = $this->request->get('transactions'); | ||||||
|  |  | ||||||
|  |             $this->model->transactions = $transactions; | ||||||
|             $this->model->reconciled = $reconcile; |             $this->model->reconciled = $reconcile; | ||||||
|             $this->model->save(); |             $this->model->save(); | ||||||
|  |  | ||||||
|             if ($transactions) { |             if ($transactions) { | ||||||
|                 foreach ($transactions as $key => $value) { |                 foreach ($transactions as $key => $value) { | ||||||
|                     if (empty($value)) { |                     $transaction_reconcile = $reconcile; | ||||||
|                         continue; |  | ||||||
|  |                     if (empty($value) || $value === 'false') { | ||||||
|  |                         $transaction_reconcile = 0; | ||||||
|                     } |                     } | ||||||
|  |  | ||||||
|                     $t = explode('_', $key); |                     $t = explode('_', $key); | ||||||
|  |  | ||||||
|                     $transaction = Transaction::find($t[1]); |                     $transaction = Transaction::find($t[1]); | ||||||
|                     $transaction->reconciled = $reconcile; |                     $transaction->reconciled = $transaction_reconcile; | ||||||
|                     $transaction->save(); |                     $transaction->save(); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|   | |||||||
| @@ -43,6 +43,9 @@ class Role extends LaratrustRole | |||||||
|             'icon' => 'edit', |             'icon' => 'edit', | ||||||
|             'url' => route('roles.roles.edit', $this->id), |             'url' => route('roles.roles.edit', $this->id), | ||||||
|             'permission' => 'update-roles-roles', |             'permission' => 'update-roles-roles', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-edit-role-' . $this->id, | ||||||
|  |             ], | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|         $actions[] = [ |         $actions[] = [ | ||||||
| @@ -50,6 +53,9 @@ class Role extends LaratrustRole | |||||||
|             'icon' => 'file_copy', |             'icon' => 'file_copy', | ||||||
|             'url' => route('roles.roles.duplicate', $this->id), |             'url' => route('roles.roles.duplicate', $this->id), | ||||||
|             'permission' => 'create-roles-roles', |             'permission' => 'create-roles-roles', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-duplicate-role-' . $this->id, | ||||||
|  |             ], | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|         $actions[] = [ |         $actions[] = [ | ||||||
| @@ -57,6 +63,9 @@ class Role extends LaratrustRole | |||||||
|             'icon' => 'delete', |             'icon' => 'delete', | ||||||
|             'route' => 'roles.roles.destroy', |             'route' => 'roles.roles.destroy', | ||||||
|             'permission' => 'delete-roles-roles', |             'permission' => 'delete-roles-roles', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-delete-role-' . $this->id, | ||||||
|  |             ], | ||||||
|             'model' => $this, |             'model' => $this, | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -326,6 +326,9 @@ class User extends Authenticatable implements HasLocalePreference | |||||||
|             'icon' => 'edit', |             'icon' => 'edit', | ||||||
|             'url' => route('users.edit', $this->id), |             'url' => route('users.edit', $this->id), | ||||||
|             'permission' => 'update-auth-users', |             'permission' => 'update-auth-users', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-show-user-' . $this->id, | ||||||
|  |             ], | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|         if ($this->hasPendingInvitation()) { |         if ($this->hasPendingInvitation()) { | ||||||
| @@ -334,6 +337,9 @@ class User extends Authenticatable implements HasLocalePreference | |||||||
|                 'icon' => 'replay', |                 'icon' => 'replay', | ||||||
|                 'url' => route('users.invite', $this->id), |                 'url' => route('users.invite', $this->id), | ||||||
|                 'permission' => 'update-auth-users', |                 'permission' => 'update-auth-users', | ||||||
|  |                 'attributes' => [ | ||||||
|  |                     'id' => 'index-line-actions-resend-user-' . $this->id, | ||||||
|  |                 ], | ||||||
|             ]; |             ]; | ||||||
|         } |         } | ||||||
|  |  | ||||||
| @@ -342,6 +348,9 @@ class User extends Authenticatable implements HasLocalePreference | |||||||
|             'icon' => 'delete', |             'icon' => 'delete', | ||||||
|             'route' => 'users.destroy', |             'route' => 'users.destroy', | ||||||
|             'permission' => 'delete-auth-users', |             'permission' => 'delete-auth-users', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-delete-user-' . $this->id, | ||||||
|  |             ], | ||||||
|             'model' => $this, |             'model' => $this, | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -170,6 +170,9 @@ class Account extends Model | |||||||
|             'icon' => 'visibility', |             'icon' => 'visibility', | ||||||
|             'url' => route('accounts.show', $this->id), |             'url' => route('accounts.show', $this->id), | ||||||
|             'permission' => 'read-banking-accounts', |             'permission' => 'read-banking-accounts', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-show-account-' . $this->id, | ||||||
|  |             ], | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|         $actions[] = [ |         $actions[] = [ | ||||||
| @@ -177,6 +180,9 @@ class Account extends Model | |||||||
|             'icon' => 'edit', |             'icon' => 'edit', | ||||||
|             'url' => route('accounts.edit', $this->id), |             'url' => route('accounts.edit', $this->id), | ||||||
|             'permission' => 'update-banking-accounts', |             'permission' => 'update-banking-accounts', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-edit-account-' . $this->id, | ||||||
|  |             ], | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|         $actions[] = [ |         $actions[] = [ | ||||||
| @@ -185,6 +191,9 @@ class Account extends Model | |||||||
|             'route' => 'accounts.destroy', |             'route' => 'accounts.destroy', | ||||||
|             'permission' => 'delete-banking-accounts', |             'permission' => 'delete-banking-accounts', | ||||||
|             'model' => $this, |             'model' => $this, | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-delete-account-' . $this->id, | ||||||
|  |             ], | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|         return $actions; |         return $actions; | ||||||
|   | |||||||
| @@ -28,6 +28,7 @@ class Reconciliation extends Model | |||||||
|     protected $casts = [ |     protected $casts = [ | ||||||
|         'closing_balance' => 'double', |         'closing_balance' => 'double', | ||||||
|         'reconciled' => 'boolean', |         'reconciled' => 'boolean', | ||||||
|  |         'transactions' => 'array', | ||||||
|     ]; |     ]; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -56,6 +57,9 @@ class Reconciliation extends Model | |||||||
|             'icon' => 'edit', |             'icon' => 'edit', | ||||||
|             'url' => route('reconciliations.edit', $this->id), |             'url' => route('reconciliations.edit', $this->id), | ||||||
|             'permission' => 'update-banking-reconciliations', |             'permission' => 'update-banking-reconciliations', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-edit-reconciliation-' . $this->id, | ||||||
|  |             ], | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|         $actions[] = [ |         $actions[] = [ | ||||||
| @@ -63,6 +67,9 @@ class Reconciliation extends Model | |||||||
|             'icon' => 'delete', |             'icon' => 'delete', | ||||||
|             'route' => 'reconciliations.destroy', |             'route' => 'reconciliations.destroy', | ||||||
|             'permission' => 'delete-banking-reconciliations', |             'permission' => 'delete-banking-reconciliations', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-delete-reconciliation-' . $this->id, | ||||||
|  |             ], | ||||||
|             'model' => $this, |             'model' => $this, | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -455,7 +455,7 @@ class Transaction extends Model | |||||||
|                 'url' => route($prefix. '.show', $this->id), |                 'url' => route($prefix. '.show', $this->id), | ||||||
|                 'permission' => 'read-banking-transactions', |                 'permission' => 'read-banking-transactions', | ||||||
|                 'attributes' => [ |                 'attributes' => [ | ||||||
|                     'id' => 'index-more-actions-show-' . $this->id, |                     'id' => 'index-line-actions-show-' . $this->type . '-'  . $this->id, | ||||||
|                 ], |                 ], | ||||||
|             ]; |             ]; | ||||||
|         } catch (\Exception $e) {} |         } catch (\Exception $e) {} | ||||||
| @@ -468,7 +468,7 @@ class Transaction extends Model | |||||||
|                     'url' => route($prefix. '.edit', $this->id), |                     'url' => route($prefix. '.edit', $this->id), | ||||||
|                     'permission' => 'update-banking-transactions', |                     'permission' => 'update-banking-transactions', | ||||||
|                     'attributes' => [ |                     'attributes' => [ | ||||||
|                         'id' => 'index-more-actions-edit-' . $this->id, |                         'id' => 'index-line-actions-edit-' . $this->type . '-'  . $this->id, | ||||||
|                     ], |                     ], | ||||||
|                 ]; |                 ]; | ||||||
|             } |             } | ||||||
| @@ -482,7 +482,7 @@ class Transaction extends Model | |||||||
|                     'url' => route($prefix. '.duplicate', $this->id), |                     'url' => route($prefix. '.duplicate', $this->id), | ||||||
|                     'permission' => 'create-banking-transactions', |                     'permission' => 'create-banking-transactions', | ||||||
|                     'attributes' => [ |                     'attributes' => [ | ||||||
|                         'id' => 'index-more-actions-duplicate-' . $this->id, |                         'id' => 'index-line-actions-duplicate-' . $this->type . '-'  . $this->id, | ||||||
|                     ], |                     ], | ||||||
|                 ]; |                 ]; | ||||||
|             } |             } | ||||||
| @@ -496,7 +496,7 @@ class Transaction extends Model | |||||||
|                     'icon' => 'sensors', |                     'icon' => 'sensors', | ||||||
|                     'permission' => 'create-banking-transactions', |                     'permission' => 'create-banking-transactions', | ||||||
|                     'attributes' => [ |                     'attributes' => [ | ||||||
|                         'id' => 'index-transactions-more-actions-connect-' . $this->id, |                         'id' => 'index-line-actions-connect-' . $this->type . '-'  . $this->id, | ||||||
|                         '@click' => 'onConnectTransactions(\'' . route('transactions.dial', $this->id) . '\')', |                         '@click' => 'onConnectTransactions(\'' . route('transactions.dial', $this->id) . '\')', | ||||||
|                     ], |                     ], | ||||||
|                 ]; |                 ]; | ||||||
| @@ -516,7 +516,7 @@ class Transaction extends Model | |||||||
|                 'url' => route($prefix. '.print', $this->id), |                 'url' => route($prefix. '.print', $this->id), | ||||||
|                 'permission' => 'read-banking-transactions', |                 'permission' => 'read-banking-transactions', | ||||||
|                 'attributes' => [ |                 'attributes' => [ | ||||||
|                     'id' => 'index-more-actions-print-' . $this->id, |                     'id' => 'index-line-actions-print-' . $this->type . '-'  . $this->id, | ||||||
|                     'target' => '_blank', |                     'target' => '_blank', | ||||||
|                 ], |                 ], | ||||||
|             ]; |             ]; | ||||||
| @@ -529,7 +529,7 @@ class Transaction extends Model | |||||||
|                 'url' => route($prefix. '.pdf', $this->id), |                 'url' => route($prefix. '.pdf', $this->id), | ||||||
|                 'permission' => 'read-banking-transactions', |                 'permission' => 'read-banking-transactions', | ||||||
|                 'attributes' => [ |                 'attributes' => [ | ||||||
|                     'id' => 'index-more-actions-pdf-' . $this->id, |                     'id' => 'index-line-actions-pdf-' . $this->type . '-'  . $this->id, | ||||||
|                     'target' => '_blank', |                     'target' => '_blank', | ||||||
|                 ], |                 ], | ||||||
|             ]; |             ]; | ||||||
| @@ -549,7 +549,7 @@ class Transaction extends Model | |||||||
|                         'url' => route('modals.transactions.share.create', $this->id), |                         'url' => route('modals.transactions.share.create', $this->id), | ||||||
|                         'permission' => 'read-banking-transactions', |                         'permission' => 'read-banking-transactions', | ||||||
|                         'attributes' => [ |                         'attributes' => [ | ||||||
|                             'id' => 'index-more-actions-share-' . $this->id, |                             'id' => 'index-line-actions-share-' . $this->type . '-'  . $this->id, | ||||||
|                             '@click' => 'onShareLink("' . route('modals.transactions.share.create', $this->id) . '")', |                             '@click' => 'onShareLink("' . route('modals.transactions.share.create', $this->id) . '")', | ||||||
|                         ], |                         ], | ||||||
|                     ]; |                     ]; | ||||||
| @@ -564,7 +564,7 @@ class Transaction extends Model | |||||||
|                             'url' => route('modals.transactions.emails.create', $this->id), |                             'url' => route('modals.transactions.emails.create', $this->id), | ||||||
|                             'permission' => 'read-banking-transactions', |                             'permission' => 'read-banking-transactions', | ||||||
|                             'attributes' => [ |                             'attributes' => [ | ||||||
|                                 'id' => 'index-more-actions-send-email-' . $this->id, |                                 'id' => 'index-line-actions-send-email-' . $this->type . '-'  . $this->id, | ||||||
|                                 '@click' => 'onEmail("' . route('modals.transactions.emails.create', $this->id) . '")', |                                 '@click' => 'onEmail("' . route('modals.transactions.emails.create', $this->id) . '")', | ||||||
|                             ], |                             ], | ||||||
|                         ]; |                         ]; | ||||||
| @@ -583,6 +583,9 @@ class Transaction extends Model | |||||||
|                             'text' => ! empty($this->recurring) ? 'transactions' : 'recurring_template', |                             'text' => ! empty($this->recurring) ? 'transactions' : 'recurring_template', | ||||||
|                             'route' => $prefix. '.destroy', |                             'route' => $prefix. '.destroy', | ||||||
|                             'permission' => 'delete-banking-transactions', |                             'permission' => 'delete-banking-transactions', | ||||||
|  |                             'attributes' => [ | ||||||
|  |                                 'id' => 'index-line-actions-delete-' . $this->type . '-'  . $this->id, | ||||||
|  |                             ], | ||||||
|                             'model' => $this, |                             'model' => $this, | ||||||
|                         ]; |                         ]; | ||||||
|                     } |                     } | ||||||
| @@ -595,6 +598,9 @@ class Transaction extends Model | |||||||
|                     'icon' => 'block', |                     'icon' => 'block', | ||||||
|                     'url' => route($prefix. '.end', $this->id), |                     'url' => route($prefix. '.end', $this->id), | ||||||
|                     'permission' => 'update-banking-transactions', |                     'permission' => 'update-banking-transactions', | ||||||
|  |                     'attributes' => [ | ||||||
|  |                         'id' => 'index-line-actions-end-' . $this->type . '-'  . $this->id, | ||||||
|  |                     ], | ||||||
|                 ]; |                 ]; | ||||||
|             } catch (\Exception $e) {} |             } catch (\Exception $e) {} | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -246,6 +246,9 @@ class Transfer extends Model | |||||||
|             'icon' => 'visibility', |             'icon' => 'visibility', | ||||||
|             'url' => route('transfers.show', $this->id), |             'url' => route('transfers.show', $this->id), | ||||||
|             'permission' => 'read-banking-transfers', |             'permission' => 'read-banking-transfers', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-show-transfer-' . $this->id, | ||||||
|  |             ], | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|         $actions[] = [ |         $actions[] = [ | ||||||
| @@ -253,6 +256,9 @@ class Transfer extends Model | |||||||
|             'icon' => 'edit', |             'icon' => 'edit', | ||||||
|             'url' => route('transfers.edit', $this->id), |             'url' => route('transfers.edit', $this->id), | ||||||
|             'permission' => 'update-banking-transfers', |             'permission' => 'update-banking-transfers', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-edit-transfer-' . $this->id, | ||||||
|  |             ], | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|         $actions[] = [ |         $actions[] = [ | ||||||
| @@ -260,6 +266,9 @@ class Transfer extends Model | |||||||
|             'icon' => 'file_copy', |             'icon' => 'file_copy', | ||||||
|             'url' => route('transfers.duplicate', $this->id), |             'url' => route('transfers.duplicate', $this->id), | ||||||
|             'permission' => 'update-banking-transfers', |             'permission' => 'update-banking-transfers', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-duplicate-transfer-' . $this->id, | ||||||
|  |             ], | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|         $actions[] = [ |         $actions[] = [ | ||||||
| @@ -267,6 +276,9 @@ class Transfer extends Model | |||||||
|             'icon' => 'delete', |             'icon' => 'delete', | ||||||
|             'route' => 'transfers.destroy', |             'route' => 'transfers.destroy', | ||||||
|             'permission' => 'delete-banking-transfers', |             'permission' => 'delete-banking-transfers', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-delete-transfer-' . $this->id, | ||||||
|  |             ], | ||||||
|             'model' => $this, |             'model' => $this, | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -550,6 +550,9 @@ class Company extends Eloquent implements Ownable | |||||||
|                 'icon' => 'settings_ethernet', |                 'icon' => 'settings_ethernet', | ||||||
|                 'url' => route('companies.switch', $this->id), |                 'url' => route('companies.switch', $this->id), | ||||||
|                 'permission' => 'read-common-companies', |                 'permission' => 'read-common-companies', | ||||||
|  |                 'attributes' => [ | ||||||
|  |                     'id' => 'index-line-actions-switch-company-' . $this->id, | ||||||
|  |                 ], | ||||||
|             ]; |             ]; | ||||||
|         } |         } | ||||||
|  |  | ||||||
| @@ -558,6 +561,9 @@ class Company extends Eloquent implements Ownable | |||||||
|             'icon' => 'edit', |             'icon' => 'edit', | ||||||
|             'url' => route('companies.edit', $this->id), |             'url' => route('companies.edit', $this->id), | ||||||
|             'permission' => 'update-common-companies', |             'permission' => 'update-common-companies', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-edit-company-' . $this->id, | ||||||
|  |             ], | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|         $actions[] = [ |         $actions[] = [ | ||||||
| @@ -565,6 +571,9 @@ class Company extends Eloquent implements Ownable | |||||||
|             'icon' => 'delete', |             'icon' => 'delete', | ||||||
|             'route' => 'companies.destroy', |             'route' => 'companies.destroy', | ||||||
|             'permission' => 'delete-common-companies', |             'permission' => 'delete-common-companies', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-delete-company-' . $this->id, | ||||||
|  |             ], | ||||||
|             'model' => $this, |             'model' => $this, | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -291,6 +291,9 @@ class Contact extends Model | |||||||
|                 'icon' => 'visibility', |                 'icon' => 'visibility', | ||||||
|                 'url' => route($prefix . '.show', $this->id), |                 'url' => route($prefix . '.show', $this->id), | ||||||
|                 'permission' => 'read-' . $group . '-' . $permission_prefix, |                 'permission' => 'read-' . $group . '-' . $permission_prefix, | ||||||
|  |                 'attributes' => [ | ||||||
|  |                     'id' => 'index-line-actions-show-' . $this->type . '-' . $this->id, | ||||||
|  |                 ], | ||||||
|             ]; |             ]; | ||||||
|         } catch (\Exception $e) {} |         } catch (\Exception $e) {} | ||||||
|  |  | ||||||
| @@ -300,6 +303,9 @@ class Contact extends Model | |||||||
|                 'icon' => 'edit', |                 'icon' => 'edit', | ||||||
|                 'url' => route($prefix . '.edit', $this->id), |                 'url' => route($prefix . '.edit', $this->id), | ||||||
|                 'permission' => 'update-' . $group . '-' . $permission_prefix, |                 'permission' => 'update-' . $group . '-' . $permission_prefix, | ||||||
|  |                 'attributes' => [ | ||||||
|  |                     'id' => 'index-line-actions-edit-' . $this->type . '-' . $this->id, | ||||||
|  |                 ], | ||||||
|             ]; |             ]; | ||||||
|         } catch (\Exception $e) {} |         } catch (\Exception $e) {} | ||||||
|  |  | ||||||
| @@ -309,6 +315,9 @@ class Contact extends Model | |||||||
|                 'icon' => 'file_copy', |                 'icon' => 'file_copy', | ||||||
|                 'url' => route($prefix . '.duplicate', $this->id), |                 'url' => route($prefix . '.duplicate', $this->id), | ||||||
|                 'permission' => 'create-' . $group . '-' . $permission_prefix, |                 'permission' => 'create-' . $group . '-' . $permission_prefix, | ||||||
|  |                 'attributes' => [ | ||||||
|  |                     'id' => 'index-line-actions-duplicate-' . $this->type . '-' . $this->id, | ||||||
|  |                 ], | ||||||
|             ]; |             ]; | ||||||
|         } catch (\Exception $e) {} |         } catch (\Exception $e) {} | ||||||
|  |  | ||||||
| @@ -319,6 +328,9 @@ class Contact extends Model | |||||||
|                 'title' => $translation_prefix, |                 'title' => $translation_prefix, | ||||||
|                 'route' => $prefix . '.destroy', |                 'route' => $prefix . '.destroy', | ||||||
|                 'permission' => 'delete-' . $group . '-' . $permission_prefix, |                 'permission' => 'delete-' . $group . '-' . $permission_prefix, | ||||||
|  |                 'attributes' => [ | ||||||
|  |                     'id' => 'index-line-actions-delete-' . $this->type . '-' . $this->id, | ||||||
|  |                 ], | ||||||
|                 'model' => $this, |                 'model' => $this, | ||||||
|             ]; |             ]; | ||||||
|         } catch (\Exception $e) {} |         } catch (\Exception $e) {} | ||||||
|   | |||||||
| @@ -129,6 +129,9 @@ class Dashboard extends Model | |||||||
|                 'icon' => 'settings_ethernet', |                 'icon' => 'settings_ethernet', | ||||||
|                 'url' => route('dashboards.switch', $this->id), |                 'url' => route('dashboards.switch', $this->id), | ||||||
|                 'permission' => 'read-common-dashboards', |                 'permission' => 'read-common-dashboards', | ||||||
|  |                 'attributes' => [ | ||||||
|  |                     'id' => 'index-line-actions-switch-dashboard-' . $this->id, | ||||||
|  |                 ], | ||||||
|             ]; |             ]; | ||||||
|         } |         } | ||||||
|  |  | ||||||
| @@ -137,6 +140,9 @@ class Dashboard extends Model | |||||||
|             'icon' => 'edit', |             'icon' => 'edit', | ||||||
|             'url' => route('dashboards.edit', $this->id), |             'url' => route('dashboards.edit', $this->id), | ||||||
|             'permission' => 'update-common-dashboards', |             'permission' => 'update-common-dashboards', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-edit-dashboard-' . $this->id, | ||||||
|  |             ], | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|         $actions[] = [ |         $actions[] = [ | ||||||
| @@ -144,6 +150,9 @@ class Dashboard extends Model | |||||||
|             'icon' => 'delete', |             'icon' => 'delete', | ||||||
|             'route' => 'dashboards.destroy', |             'route' => 'dashboards.destroy', | ||||||
|             'permission' => 'delete-common-dashboards', |             'permission' => 'delete-common-dashboards', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-delete-dashboard-' . $this->id, | ||||||
|  |             ], | ||||||
|             'model' => $this, |             'model' => $this, | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -174,6 +174,9 @@ class Item extends Model | |||||||
|             'icon' => 'edit', |             'icon' => 'edit', | ||||||
|             'url' => route('items.edit', $this->id), |             'url' => route('items.edit', $this->id), | ||||||
|             'permission' => 'update-common-items', |             'permission' => 'update-common-items', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-edit-item-' . $this->id, | ||||||
|  |             ], | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|         $actions[] = [ |         $actions[] = [ | ||||||
| @@ -181,6 +184,9 @@ class Item extends Model | |||||||
|             'icon' => 'file_copy', |             'icon' => 'file_copy', | ||||||
|             'url' => route('items.duplicate', $this->id), |             'url' => route('items.duplicate', $this->id), | ||||||
|             'permission' => 'create-common-items', |             'permission' => 'create-common-items', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-duplicate-item-' . $this->id, | ||||||
|  |             ], | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|         $actions[] = [ |         $actions[] = [ | ||||||
| @@ -188,6 +194,9 @@ class Item extends Model | |||||||
|             'icon' => 'delete', |             'icon' => 'delete', | ||||||
|             'route' => 'items.destroy', |             'route' => 'items.destroy', | ||||||
|             'permission' => 'delete-common-items', |             'permission' => 'delete-common-items', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-delete-item-' . $this->id, | ||||||
|  |             ], | ||||||
|             'model' => $this, |             'model' => $this, | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -488,18 +488,6 @@ class Document extends Model | |||||||
|             return $actions; |             return $actions; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         try { |  | ||||||
|             $actions[] = [ |  | ||||||
|                 'title' => trans('general.show'), |  | ||||||
|                 'icon' => 'visibility', |  | ||||||
|                 'url' => route($prefix . '.show', $this->id), |  | ||||||
|                 'permission' => 'read-' . $group . '-' . $permission_prefix, |  | ||||||
|                 'attributes' => [ |  | ||||||
|                     'id' => 'index-more-actions-show-' . $this->id, |  | ||||||
|                 ], |  | ||||||
|             ]; |  | ||||||
|         } catch (\Exception $e) {} |  | ||||||
|  |  | ||||||
|         try { |         try { | ||||||
|             if (! $this->reconciled) { |             if (! $this->reconciled) { | ||||||
|                 $actions[] = [ |                 $actions[] = [ | ||||||
| @@ -508,7 +496,7 @@ class Document extends Model | |||||||
|                     'url' => route($prefix . '.edit', $this->id), |                     'url' => route($prefix . '.edit', $this->id), | ||||||
|                     'permission' => 'update-' . $group . '-' . $permission_prefix, |                     'permission' => 'update-' . $group . '-' . $permission_prefix, | ||||||
|                     'attributes' => [ |                     'attributes' => [ | ||||||
|                         'id' => 'index-more-actions-edit-' . $this->id, |                         'id' => 'index-line-actions-edit-' . $this->type . '-' . $this->id, | ||||||
|                     ], |                     ], | ||||||
|                 ]; |                 ]; | ||||||
|             } |             } | ||||||
| @@ -521,12 +509,26 @@ class Document extends Model | |||||||
|                 'url' => route($prefix . '.duplicate', $this->id), |                 'url' => route($prefix . '.duplicate', $this->id), | ||||||
|                 'permission' => 'create-' . $group . '-' . $permission_prefix, |                 'permission' => 'create-' . $group . '-' . $permission_prefix, | ||||||
|                 'attributes' => [ |                 'attributes' => [ | ||||||
|                     'id' => 'index-more-actions-duplicate-' . $this->id, |                     'id' => 'index-line-actions-duplicate-' . $this->type . '-' . $this->id, | ||||||
|                 ], |                 ], | ||||||
|             ]; |             ]; | ||||||
|         } catch (\Exception $e) {} |         } catch (\Exception $e) {} | ||||||
|  |  | ||||||
|         if ($this->status != 'cancelled') { |         if ((empty($this->transactions->count()) || (! empty($this->transactions->count()) && $this->paid != $this->amount))) { | ||||||
|  |             try { | ||||||
|  |                 $actions[] = [ | ||||||
|  |                     'type' => 'button', | ||||||
|  |                     'title' => trans('invoices.add_payment'), | ||||||
|  |                     'icon' => 'paid', | ||||||
|  |                     'url' => route('modals.documents.document.transactions.create', $this->id), | ||||||
|  |                     'permission' => 'read-' . $group . '-' . $permission_prefix, | ||||||
|  |                     'attributes' => [ | ||||||
|  |                         'id' => 'index-line-actions-payment-' . $this->type . '-' . $this->id, | ||||||
|  |                         '@click' => 'onPayment("' . $this->id . '")', | ||||||
|  |                     ], | ||||||
|  |                 ]; | ||||||
|  |             } catch (\Exception $e) {} | ||||||
|  |         } else { | ||||||
|             try { |             try { | ||||||
|                 $actions[] = [ |                 $actions[] = [ | ||||||
|                     'title' => trans('general.print'), |                     'title' => trans('general.print'), | ||||||
| @@ -534,7 +536,22 @@ class Document extends Model | |||||||
|                     'url' => route($prefix . '.print', $this->id), |                     'url' => route($prefix . '.print', $this->id), | ||||||
|                     'permission' => 'read-' . $group . '-' . $permission_prefix, |                     'permission' => 'read-' . $group . '-' . $permission_prefix, | ||||||
|                     'attributes' => [ |                     'attributes' => [ | ||||||
|                         'id' => 'index-more-actions-print-' . $this->id, |                         'id' => 'index-line-actions-print-' . $this->type . '-'  . $this->id, | ||||||
|  |                         'target' => '_blank', | ||||||
|  |                     ], | ||||||
|  |                 ]; | ||||||
|  |             } catch (\Exception $e) {} | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         if (($actions[1]['icon'] != 'print') && ($actions[2]['icon'] != 'print')) { | ||||||
|  |             try { | ||||||
|  |                 $actions[] = [ | ||||||
|  |                     'title' => trans('general.print'), | ||||||
|  |                     'icon' => 'print', | ||||||
|  |                     'url' => route($prefix . '.print', $this->id), | ||||||
|  |                     'permission' => 'read-' . $group . '-' . $permission_prefix, | ||||||
|  |                     'attributes' => [ | ||||||
|  |                         'id' => 'index-line-actions-print-' . $this->type . '-'  . $this->id, | ||||||
|                         'target' => '_blank', |                         'target' => '_blank', | ||||||
|                     ], |                     ], | ||||||
|                 ]; |                 ]; | ||||||
| @@ -548,7 +565,7 @@ class Document extends Model | |||||||
|                 'url' => route($prefix . '.pdf', $this->id), |                 'url' => route($prefix . '.pdf', $this->id), | ||||||
|                 'permission' => 'read-' . $group . '-' . $permission_prefix, |                 'permission' => 'read-' . $group . '-' . $permission_prefix, | ||||||
|                 'attributes' => [ |                 'attributes' => [ | ||||||
|                     'id' => 'index-more-actions-pdf-' . $this->id, |                     'id' => 'index-line-actions-pdf-' . $this->type . '-'  . $this->id, | ||||||
|                     'target' => '_blank', |                     'target' => '_blank', | ||||||
|                 ], |                 ], | ||||||
|             ]; |             ]; | ||||||
| @@ -568,14 +585,14 @@ class Document extends Model | |||||||
|                         'url' => route('modals.'. $prefix . '.share.create', $this->id), |                         'url' => route('modals.'. $prefix . '.share.create', $this->id), | ||||||
|                         'permission' => 'read-' . $group . '-' . $permission_prefix, |                         'permission' => 'read-' . $group . '-' . $permission_prefix, | ||||||
|                         'attributes' => [ |                         'attributes' => [ | ||||||
|                             'id' => 'index-more-actions-share-link-' . $this->id, |                             'id' => 'index-line-actions-share-link-' . $this->type . '-'  . $this->id, | ||||||
|                             '@click' => 'onShareLink("' . route('modals.'. $prefix . '.share.create', $this->id) . '")', |                             '@click' => 'onShareLink("' . route('modals.'. $prefix . '.share.create', $this->id) . '")', | ||||||
|                         ], |                         ], | ||||||
|                     ]; |                     ]; | ||||||
|                 } catch (\Exception $e) {} |                 } catch (\Exception $e) {} | ||||||
|  |  | ||||||
|                 try { |                 try { | ||||||
|                     if (! empty($this->contact) && $this->contact->email && $this->type == 'invoice') { |                     if (! empty($this->contact) && $this->contact->email && ($this->type == 'invoice')) { | ||||||
|                         $actions[] = [ |                         $actions[] = [ | ||||||
|                             'type' => 'button', |                             'type' => 'button', | ||||||
|                             'title' => trans('invoices.send_mail'), |                             'title' => trans('invoices.send_mail'), | ||||||
| @@ -583,7 +600,7 @@ class Document extends Model | |||||||
|                             'url' => route('modals.'. $prefix . '.emails.create', $this->id), |                             'url' => route('modals.'. $prefix . '.emails.create', $this->id), | ||||||
|                             'permission' => 'read-' . $group . '-' . $permission_prefix, |                             'permission' => 'read-' . $group . '-' . $permission_prefix, | ||||||
|                             'attributes' => [ |                             'attributes' => [ | ||||||
|                                 'id'        => 'index-more-actions-send-email-' . $this->id, |                                 'id' => 'index-line-actions-send-email-' . $this->type . '-'  . $this->id, | ||||||
|                                 '@click' => 'onEmail("' . route('modals.'. $prefix . '.emails.create', $this->id) . '")', |                                 '@click' => 'onEmail("' . route('modals.'. $prefix . '.emails.create', $this->id) . '")', | ||||||
|                             ], |                             ], | ||||||
|                         ]; |                         ]; | ||||||
| @@ -603,7 +620,7 @@ class Document extends Model | |||||||
|                         'url' => route($prefix . '.cancelled', $this->id), |                         'url' => route($prefix . '.cancelled', $this->id), | ||||||
|                         'permission' => 'update-' . $group . '-' . $permission_prefix, |                         'permission' => 'update-' . $group . '-' . $permission_prefix, | ||||||
|                         'attributes' => [ |                         'attributes' => [ | ||||||
|                             'id' => 'index-more-actions-cancel-' . $this->id, |                             'id' => 'index-line-actions-cancel-' . $this->type . '-'  . $this->id, | ||||||
|                         ], |                         ], | ||||||
|                     ]; |                     ]; | ||||||
|                 } catch (\Exception $e) {} |                 } catch (\Exception $e) {} | ||||||
| @@ -620,6 +637,9 @@ class Document extends Model | |||||||
|                     'title' => $translation_prefix, |                     'title' => $translation_prefix, | ||||||
|                     'route' => $prefix . '.destroy', |                     'route' => $prefix . '.destroy', | ||||||
|                     'permission' => 'delete-' . $group . '-' . $permission_prefix, |                     'permission' => 'delete-' . $group . '-' . $permission_prefix, | ||||||
|  |                     'attributes' => [ | ||||||
|  |                         'id' => 'index-line-actions-delete-' . $this->type . '-' . $this->id, | ||||||
|  |                     ], | ||||||
|                     'model' => $this, |                     'model' => $this, | ||||||
|                 ]; |                 ]; | ||||||
|             } catch (\Exception $e) {} |             } catch (\Exception $e) {} | ||||||
| @@ -630,6 +650,9 @@ class Document extends Model | |||||||
|                     'icon' => 'block', |                     'icon' => 'block', | ||||||
|                     'url' => route($prefix. '.end', $this->id), |                     'url' => route($prefix. '.end', $this->id), | ||||||
|                     'permission' => 'update-' . $group . '-' . $permission_prefix, |                     'permission' => 'update-' . $group . '-' . $permission_prefix, | ||||||
|  |                     'attributes' => [ | ||||||
|  |                         'id' => 'index-line-actions-end-' . $this->type . '-' . $this->id, | ||||||
|  |                     ], | ||||||
|                 ]; |                 ]; | ||||||
|             } catch (\Exception $e) {} |             } catch (\Exception $e) {} | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -240,6 +240,9 @@ class Category extends Model | |||||||
|             'icon' => 'create', |             'icon' => 'create', | ||||||
|             'url' => route('categories.edit', $this->id), |             'url' => route('categories.edit', $this->id), | ||||||
|             'permission' => 'update-settings-categories', |             'permission' => 'update-settings-categories', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-edit-category-' . $this->id, | ||||||
|  |             ], | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|         if ($this->isTransferCategory()) { |         if ($this->isTransferCategory()) { | ||||||
| @@ -251,6 +254,9 @@ class Category extends Model | |||||||
|             'icon' => 'delete', |             'icon' => 'delete', | ||||||
|             'route' => 'categories.destroy', |             'route' => 'categories.destroy', | ||||||
|             'permission' => 'delete-settings-categories', |             'permission' => 'delete-settings-categories', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-delete-category-' . $this->id, | ||||||
|  |             ], | ||||||
|             'model' => $this, |             'model' => $this, | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -197,6 +197,9 @@ class Currency extends Model | |||||||
|             'icon' => 'edit', |             'icon' => 'edit', | ||||||
|             'url' => route('currencies.edit', $this->id), |             'url' => route('currencies.edit', $this->id), | ||||||
|             'permission' => 'update-settings-currencies', |             'permission' => 'update-settings-currencies', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-edit-currency-' . $this->id, | ||||||
|  |             ], | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|         $actions[] = [ |         $actions[] = [ | ||||||
| @@ -204,6 +207,9 @@ class Currency extends Model | |||||||
|             'icon' => 'delete', |             'icon' => 'delete', | ||||||
|             'route' => 'currencies.destroy', |             'route' => 'currencies.destroy', | ||||||
|             'permission' => 'delete-settings-currencies', |             'permission' => 'delete-settings-currencies', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-delete-currency-' . $this->id, | ||||||
|  |             ], | ||||||
|             'model' => $this, |             'model' => $this, | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -150,6 +150,9 @@ class Tax extends Model | |||||||
|             'icon' => 'edit', |             'icon' => 'edit', | ||||||
|             'url' => route('taxes.edit', $this->id), |             'url' => route('taxes.edit', $this->id), | ||||||
|             'permission' => 'update-settings-taxes', |             'permission' => 'update-settings-taxes', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-edit-tax-' . $this->id, | ||||||
|  |             ], | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|         $actions[] = [ |         $actions[] = [ | ||||||
| @@ -157,6 +160,9 @@ class Tax extends Model | |||||||
|             'icon' => 'delete', |             'icon' => 'delete', | ||||||
|             'route' => 'taxes.destroy', |             'route' => 'taxes.destroy', | ||||||
|             'permission' => 'delete-settings-taxes', |             'permission' => 'delete-settings-taxes', | ||||||
|  |             'attributes' => [ | ||||||
|  |                 'id' => 'index-line-actions-delete-tax-' . $this->id, | ||||||
|  |             ], | ||||||
|             'model' => $this, |             'model' => $this, | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -51,6 +51,18 @@ trait Transactions | |||||||
|         return Str::endsWith($type, '-transfer'); |         return Str::endsWith($type, '-transfer'); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     public function isDocumentTransaction(): bool | ||||||
|  |     { | ||||||
|  |         $document_id = $this->document_id ?? $this->transaction->document_id ?? $this->model->document_id ?? null; | ||||||
|  |  | ||||||
|  |         return ! empty($document_id); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     public function isNotDocumentTransaction(): bool | ||||||
|  |     { | ||||||
|  |         return ! $this->isDocumentTransaction(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|     public function isNotTransferTransaction(): bool |     public function isNotTransferTransaction(): bool | ||||||
|     { |     { | ||||||
|         return ! $this->isTransferTransaction(); |         return ! $this->isTransferTransaction(); | ||||||
|   | |||||||
| @@ -103,6 +103,7 @@ class Scripts extends Component | |||||||
|                 'name' => trans('general.name'), |                 'name' => trans('general.name'), | ||||||
|                 'code' => trans('currencies.code'), |                 'code' => trans('currencies.code'), | ||||||
|                 'rate' => trans('currencies.rate'), |                 'rate' => trans('currencies.rate'), | ||||||
|  |                 'default' => trans('currencies.default'), | ||||||
|                 'enabled' => trans('general.enabled'), |                 'enabled' => trans('general.enabled'), | ||||||
|                 'actions' =>  trans('general.actions') , |                 'actions' =>  trans('general.actions') , | ||||||
|                 'yes' => trans('general.yes'), |                 'yes' => trans('general.yes'), | ||||||
| @@ -162,7 +163,15 @@ class Scripts extends Component | |||||||
|  |  | ||||||
|     protected function getCurrencies() |     protected function getCurrencies() | ||||||
|     { |     { | ||||||
|         return Currency::all(); |         $currencies = collect(); | ||||||
|  |  | ||||||
|  |         Currency::all()->each(function ($currency) use (&$currencies) { | ||||||
|  |             $currency->default = setting('default.currency') == $currency->code; | ||||||
|  |  | ||||||
|  |             $currencies->push($currency); | ||||||
|  |         }); | ||||||
|  |  | ||||||
|  |         return $currencies; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     protected function getCurrencyCodes() |     protected function getCurrencyCodes() | ||||||
|   | |||||||
							
								
								
									
										119
									
								
								composer.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										119
									
								
								composer.lock
									
									
									
										generated
									
									
									
								
							| @@ -907,16 +907,16 @@ | |||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "aws/aws-sdk-php", |             "name": "aws/aws-sdk-php", | ||||||
|             "version": "3.234.5", |             "version": "3.235.1", | ||||||
|             "source": { |             "source": { | ||||||
|                 "type": "git", |                 "type": "git", | ||||||
|                 "url": "https://github.com/aws/aws-sdk-php.git", |                 "url": "https://github.com/aws/aws-sdk-php.git", | ||||||
|                 "reference": "0293e7b4684827688dba3f3b58d99778a99156ae" |                 "reference": "2025db05c7dd22ae414857dadd49207f64c2fc74" | ||||||
|             }, |             }, | ||||||
|             "dist": { |             "dist": { | ||||||
|                 "type": "zip", |                 "type": "zip", | ||||||
|                 "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/0293e7b4684827688dba3f3b58d99778a99156ae", |                 "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/2025db05c7dd22ae414857dadd49207f64c2fc74", | ||||||
|                 "reference": "0293e7b4684827688dba3f3b58d99778a99156ae", |                 "reference": "2025db05c7dd22ae414857dadd49207f64c2fc74", | ||||||
|                 "shasum": "" |                 "shasum": "" | ||||||
|             }, |             }, | ||||||
|             "require": { |             "require": { | ||||||
| @@ -993,9 +993,9 @@ | |||||||
|             "support": { |             "support": { | ||||||
|                 "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", |                 "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", | ||||||
|                 "issues": "https://github.com/aws/aws-sdk-php/issues", |                 "issues": "https://github.com/aws/aws-sdk-php/issues", | ||||||
|                 "source": "https://github.com/aws/aws-sdk-php/tree/3.234.5" |                 "source": "https://github.com/aws/aws-sdk-php/tree/3.235.1" | ||||||
|             }, |             }, | ||||||
|             "time": "2022-08-29T19:14:31+00:00" |             "time": "2022-09-02T18:18:19+00:00" | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "balping/json-raw-encoder", |             "name": "balping/json-raw-encoder", | ||||||
| @@ -1842,16 +1842,16 @@ | |||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "doctrine/dbal", |             "name": "doctrine/dbal", | ||||||
|             "version": "3.4.2", |             "version": "3.4.4", | ||||||
|             "source": { |             "source": { | ||||||
|                 "type": "git", |                 "type": "git", | ||||||
|                 "url": "https://github.com/doctrine/dbal.git", |                 "url": "https://github.com/doctrine/dbal.git", | ||||||
|                 "reference": "22de295f10edbe00df74f517612f1fbd711131e2" |                 "reference": "4cbbe6e4b9ef6c69d5f4c968c637476f47bb54f5" | ||||||
|             }, |             }, | ||||||
|             "dist": { |             "dist": { | ||||||
|                 "type": "zip", |                 "type": "zip", | ||||||
|                 "url": "https://api.github.com/repos/doctrine/dbal/zipball/22de295f10edbe00df74f517612f1fbd711131e2", |                 "url": "https://api.github.com/repos/doctrine/dbal/zipball/4cbbe6e4b9ef6c69d5f4c968c637476f47bb54f5", | ||||||
|                 "reference": "22de295f10edbe00df74f517612f1fbd711131e2", |                 "reference": "4cbbe6e4b9ef6c69d5f4c968c637476f47bb54f5", | ||||||
|                 "shasum": "" |                 "shasum": "" | ||||||
|             }, |             }, | ||||||
|             "require": { |             "require": { | ||||||
| @@ -1864,16 +1864,16 @@ | |||||||
|                 "psr/log": "^1|^2|^3" |                 "psr/log": "^1|^2|^3" | ||||||
|             }, |             }, | ||||||
|             "require-dev": { |             "require-dev": { | ||||||
|                 "doctrine/coding-standard": "9.0.0", |                 "doctrine/coding-standard": "10.0.0", | ||||||
|                 "jetbrains/phpstorm-stubs": "2022.1", |                 "jetbrains/phpstorm-stubs": "2022.2", | ||||||
|                 "phpstan/phpstan": "1.8.2", |                 "phpstan/phpstan": "1.8.3", | ||||||
|                 "phpstan/phpstan-strict-rules": "^1.3", |                 "phpstan/phpstan-strict-rules": "^1.3", | ||||||
|                 "phpunit/phpunit": "9.5.21", |                 "phpunit/phpunit": "9.5.24", | ||||||
|                 "psalm/plugin-phpunit": "0.17.0", |                 "psalm/plugin-phpunit": "0.17.0", | ||||||
|                 "squizlabs/php_codesniffer": "3.7.1", |                 "squizlabs/php_codesniffer": "3.7.1", | ||||||
|                 "symfony/cache": "^5.4|^6.0", |                 "symfony/cache": "^5.4|^6.0", | ||||||
|                 "symfony/console": "^4.4|^5.4|^6.0", |                 "symfony/console": "^4.4|^5.4|^6.0", | ||||||
|                 "vimeo/psalm": "4.24.0" |                 "vimeo/psalm": "4.27.0" | ||||||
|             }, |             }, | ||||||
|             "suggest": { |             "suggest": { | ||||||
|                 "symfony/console": "For helpful console commands such as SQL execution and import of files." |                 "symfony/console": "For helpful console commands such as SQL execution and import of files." | ||||||
| @@ -1933,7 +1933,7 @@ | |||||||
|             ], |             ], | ||||||
|             "support": { |             "support": { | ||||||
|                 "issues": "https://github.com/doctrine/dbal/issues", |                 "issues": "https://github.com/doctrine/dbal/issues", | ||||||
|                 "source": "https://github.com/doctrine/dbal/tree/3.4.2" |                 "source": "https://github.com/doctrine/dbal/tree/3.4.4" | ||||||
|             }, |             }, | ||||||
|             "funding": [ |             "funding": [ | ||||||
|                 { |                 { | ||||||
| @@ -1949,7 +1949,7 @@ | |||||||
|                     "type": "tidelift" |                     "type": "tidelift" | ||||||
|                 } |                 } | ||||||
|             ], |             ], | ||||||
|             "time": "2022-08-21T14:21:06+00:00" |             "time": "2022-09-01T21:26:42+00:00" | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "doctrine/deprecations", |             "name": "doctrine/deprecations", | ||||||
| @@ -4477,16 +4477,16 @@ | |||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "laravel/framework", |             "name": "laravel/framework", | ||||||
|             "version": "v9.26.1", |             "version": "v9.27.0", | ||||||
|             "source": { |             "source": { | ||||||
|                 "type": "git", |                 "type": "git", | ||||||
|                 "url": "https://github.com/laravel/framework.git", |                 "url": "https://github.com/laravel/framework.git", | ||||||
|                 "reference": "1ccfb91afee7a351b09ba1f1b97739096a3ad1cf" |                 "reference": "27572f45120fd3977d92651a71d8c711a9aaa790" | ||||||
|             }, |             }, | ||||||
|             "dist": { |             "dist": { | ||||||
|                 "type": "zip", |                 "type": "zip", | ||||||
|                 "url": "https://api.github.com/repos/laravel/framework/zipball/1ccfb91afee7a351b09ba1f1b97739096a3ad1cf", |                 "url": "https://api.github.com/repos/laravel/framework/zipball/27572f45120fd3977d92651a71d8c711a9aaa790", | ||||||
|                 "reference": "1ccfb91afee7a351b09ba1f1b97739096a3ad1cf", |                 "reference": "27572f45120fd3977d92651a71d8c711a9aaa790", | ||||||
|                 "shasum": "" |                 "shasum": "" | ||||||
|             }, |             }, | ||||||
|             "require": { |             "require": { | ||||||
| @@ -4653,7 +4653,7 @@ | |||||||
|                 "issues": "https://github.com/laravel/framework/issues", |                 "issues": "https://github.com/laravel/framework/issues", | ||||||
|                 "source": "https://github.com/laravel/framework" |                 "source": "https://github.com/laravel/framework" | ||||||
|             }, |             }, | ||||||
|             "time": "2022-08-23T19:00:07+00:00" |             "time": "2022-08-30T13:34:43+00:00" | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "laravel/sanctum", |             "name": "laravel/sanctum", | ||||||
| @@ -4722,25 +4722,26 @@ | |||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "laravel/serializable-closure", |             "name": "laravel/serializable-closure", | ||||||
|             "version": "v1.2.0", |             "version": "v1.2.1", | ||||||
|             "source": { |             "source": { | ||||||
|                 "type": "git", |                 "type": "git", | ||||||
|                 "url": "https://github.com/laravel/serializable-closure.git", |                 "url": "https://github.com/laravel/serializable-closure.git", | ||||||
|                 "reference": "09f0e9fb61829f628205b7c94906c28740ff9540" |                 "reference": "d78fd36ba031a1a695ea5a406f29996948d7011b" | ||||||
|             }, |             }, | ||||||
|             "dist": { |             "dist": { | ||||||
|                 "type": "zip", |                 "type": "zip", | ||||||
|                 "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/09f0e9fb61829f628205b7c94906c28740ff9540", |                 "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/d78fd36ba031a1a695ea5a406f29996948d7011b", | ||||||
|                 "reference": "09f0e9fb61829f628205b7c94906c28740ff9540", |                 "reference": "d78fd36ba031a1a695ea5a406f29996948d7011b", | ||||||
|                 "shasum": "" |                 "shasum": "" | ||||||
|             }, |             }, | ||||||
|             "require": { |             "require": { | ||||||
|                 "php": "^7.3|^8.0" |                 "php": "^7.3|^8.0" | ||||||
|             }, |             }, | ||||||
|             "require-dev": { |             "require-dev": { | ||||||
|                 "pestphp/pest": "^1.18", |                 "nesbot/carbon": "^2.61", | ||||||
|                 "phpstan/phpstan": "^0.12.98", |                 "pestphp/pest": "^1.21.3", | ||||||
|                 "symfony/var-dumper": "^5.3" |                 "phpstan/phpstan": "^1.8.2", | ||||||
|  |                 "symfony/var-dumper": "^5.4.11" | ||||||
|             }, |             }, | ||||||
|             "type": "library", |             "type": "library", | ||||||
|             "extra": { |             "extra": { | ||||||
| @@ -4777,7 +4778,7 @@ | |||||||
|                 "issues": "https://github.com/laravel/serializable-closure/issues", |                 "issues": "https://github.com/laravel/serializable-closure/issues", | ||||||
|                 "source": "https://github.com/laravel/serializable-closure" |                 "source": "https://github.com/laravel/serializable-closure" | ||||||
|             }, |             }, | ||||||
|             "time": "2022-05-16T17:09:47+00:00" |             "time": "2022-08-26T15:25:27+00:00" | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "laravel/slack-notification-channel", |             "name": "laravel/slack-notification-channel", | ||||||
| @@ -6530,16 +6531,16 @@ | |||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "nesbot/carbon", |             "name": "nesbot/carbon", | ||||||
|             "version": "2.62.0", |             "version": "2.62.1", | ||||||
|             "source": { |             "source": { | ||||||
|                 "type": "git", |                 "type": "git", | ||||||
|                 "url": "https://github.com/briannesbitt/Carbon.git", |                 "url": "https://github.com/briannesbitt/Carbon.git", | ||||||
|                 "reference": "7507aec3d626797ce2123cf6c6556683be22b5f8" |                 "reference": "01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a" | ||||||
|             }, |             }, | ||||||
|             "dist": { |             "dist": { | ||||||
|                 "type": "zip", |                 "type": "zip", | ||||||
|                 "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/7507aec3d626797ce2123cf6c6556683be22b5f8", |                 "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a", | ||||||
|                 "reference": "7507aec3d626797ce2123cf6c6556683be22b5f8", |                 "reference": "01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a", | ||||||
|                 "shasum": "" |                 "shasum": "" | ||||||
|             }, |             }, | ||||||
|             "require": { |             "require": { | ||||||
| @@ -6628,7 +6629,7 @@ | |||||||
|                     "type": "tidelift" |                     "type": "tidelift" | ||||||
|                 } |                 } | ||||||
|             ], |             ], | ||||||
|             "time": "2022-08-28T19:48:05+00:00" |             "time": "2022-09-02T07:48:13+00:00" | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "nette/schema", |             "name": "nette/schema", | ||||||
| @@ -6779,16 +6780,16 @@ | |||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "nikic/php-parser", |             "name": "nikic/php-parser", | ||||||
|             "version": "v4.14.0", |             "version": "v4.15.1", | ||||||
|             "source": { |             "source": { | ||||||
|                 "type": "git", |                 "type": "git", | ||||||
|                 "url": "https://github.com/nikic/PHP-Parser.git", |                 "url": "https://github.com/nikic/PHP-Parser.git", | ||||||
|                 "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" |                 "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900" | ||||||
|             }, |             }, | ||||||
|             "dist": { |             "dist": { | ||||||
|                 "type": "zip", |                 "type": "zip", | ||||||
|                 "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", |                 "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", | ||||||
|                 "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", |                 "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", | ||||||
|                 "shasum": "" |                 "shasum": "" | ||||||
|             }, |             }, | ||||||
|             "require": { |             "require": { | ||||||
| @@ -6829,9 +6830,9 @@ | |||||||
|             ], |             ], | ||||||
|             "support": { |             "support": { | ||||||
|                 "issues": "https://github.com/nikic/PHP-Parser/issues", |                 "issues": "https://github.com/nikic/PHP-Parser/issues", | ||||||
|                 "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0" |                 "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.1" | ||||||
|             }, |             }, | ||||||
|             "time": "2022-05-31T20:59:12+00:00" |             "time": "2022-09-04T07:30:47+00:00" | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "nunomaduro/termwind", |             "name": "nunomaduro/termwind", | ||||||
| @@ -12284,16 +12285,16 @@ | |||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "phpunit/php-code-coverage", |             "name": "phpunit/php-code-coverage", | ||||||
|             "version": "9.2.16", |             "version": "9.2.17", | ||||||
|             "source": { |             "source": { | ||||||
|                 "type": "git", |                 "type": "git", | ||||||
|                 "url": "https://github.com/sebastianbergmann/php-code-coverage.git", |                 "url": "https://github.com/sebastianbergmann/php-code-coverage.git", | ||||||
|                 "reference": "2593003befdcc10db5e213f9f28814f5aa8ac073" |                 "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8" | ||||||
|             }, |             }, | ||||||
|             "dist": { |             "dist": { | ||||||
|                 "type": "zip", |                 "type": "zip", | ||||||
|                 "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2593003befdcc10db5e213f9f28814f5aa8ac073", |                 "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aa94dc41e8661fe90c7316849907cba3007b10d8", | ||||||
|                 "reference": "2593003befdcc10db5e213f9f28814f5aa8ac073", |                 "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8", | ||||||
|                 "shasum": "" |                 "shasum": "" | ||||||
|             }, |             }, | ||||||
|             "require": { |             "require": { | ||||||
| @@ -12349,7 +12350,7 @@ | |||||||
|             ], |             ], | ||||||
|             "support": { |             "support": { | ||||||
|                 "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", |                 "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", | ||||||
|                 "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.16" |                 "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.17" | ||||||
|             }, |             }, | ||||||
|             "funding": [ |             "funding": [ | ||||||
|                 { |                 { | ||||||
| @@ -12357,7 +12358,7 @@ | |||||||
|                     "type": "github" |                     "type": "github" | ||||||
|                 } |                 } | ||||||
|             ], |             ], | ||||||
|             "time": "2022-08-20T05:26:47+00:00" |             "time": "2022-08-30T12:24:04+00:00" | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "phpunit/php-file-iterator", |             "name": "phpunit/php-file-iterator", | ||||||
| @@ -12602,16 +12603,16 @@ | |||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "phpunit/phpunit", |             "name": "phpunit/phpunit", | ||||||
|             "version": "9.5.23", |             "version": "9.5.24", | ||||||
|             "source": { |             "source": { | ||||||
|                 "type": "git", |                 "type": "git", | ||||||
|                 "url": "https://github.com/sebastianbergmann/phpunit.git", |                 "url": "https://github.com/sebastianbergmann/phpunit.git", | ||||||
|                 "reference": "888556852e7e9bbeeedb9656afe46118765ade34" |                 "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5" | ||||||
|             }, |             }, | ||||||
|             "dist": { |             "dist": { | ||||||
|                 "type": "zip", |                 "type": "zip", | ||||||
|                 "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/888556852e7e9bbeeedb9656afe46118765ade34", |                 "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d0aa6097bef9fd42458a9b3c49da32c6ce6129c5", | ||||||
|                 "reference": "888556852e7e9bbeeedb9656afe46118765ade34", |                 "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5", | ||||||
|                 "shasum": "" |                 "shasum": "" | ||||||
|             }, |             }, | ||||||
|             "require": { |             "require": { | ||||||
| @@ -12640,7 +12641,7 @@ | |||||||
|                 "sebastian/global-state": "^5.0.1", |                 "sebastian/global-state": "^5.0.1", | ||||||
|                 "sebastian/object-enumerator": "^4.0.3", |                 "sebastian/object-enumerator": "^4.0.3", | ||||||
|                 "sebastian/resource-operations": "^3.0.3", |                 "sebastian/resource-operations": "^3.0.3", | ||||||
|                 "sebastian/type": "^3.0", |                 "sebastian/type": "^3.1", | ||||||
|                 "sebastian/version": "^3.0.2" |                 "sebastian/version": "^3.0.2" | ||||||
|             }, |             }, | ||||||
|             "suggest": { |             "suggest": { | ||||||
| @@ -12684,7 +12685,7 @@ | |||||||
|             ], |             ], | ||||||
|             "support": { |             "support": { | ||||||
|                 "issues": "https://github.com/sebastianbergmann/phpunit/issues", |                 "issues": "https://github.com/sebastianbergmann/phpunit/issues", | ||||||
|                 "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.23" |                 "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.24" | ||||||
|             }, |             }, | ||||||
|             "funding": [ |             "funding": [ | ||||||
|                 { |                 { | ||||||
| @@ -12696,7 +12697,7 @@ | |||||||
|                     "type": "github" |                     "type": "github" | ||||||
|                 } |                 } | ||||||
|             ], |             ], | ||||||
|             "time": "2022-08-22T14:01:36+00:00" |             "time": "2022-08-30T07:42:16+00:00" | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "sebastian/cli-parser", |             "name": "sebastian/cli-parser", | ||||||
| @@ -13870,16 +13871,16 @@ | |||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "spatie/laravel-ignition", |             "name": "spatie/laravel-ignition", | ||||||
|             "version": "1.4.0", |             "version": "1.4.1", | ||||||
|             "source": { |             "source": { | ||||||
|                 "type": "git", |                 "type": "git", | ||||||
|                 "url": "https://github.com/spatie/laravel-ignition.git", |                 "url": "https://github.com/spatie/laravel-ignition.git", | ||||||
|                 "reference": "71c627a0838f107562e89bc2b0201a81f26e9011" |                 "reference": "29deea5d9cf921590184be6956e657c4f4566440" | ||||||
|             }, |             }, | ||||||
|             "dist": { |             "dist": { | ||||||
|                 "type": "zip", |                 "type": "zip", | ||||||
|                 "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/71c627a0838f107562e89bc2b0201a81f26e9011", |                 "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/29deea5d9cf921590184be6956e657c4f4566440", | ||||||
|                 "reference": "71c627a0838f107562e89bc2b0201a81f26e9011", |                 "reference": "29deea5d9cf921590184be6956e657c4f4566440", | ||||||
|                 "shasum": "" |                 "shasum": "" | ||||||
|             }, |             }, | ||||||
|             "require": { |             "require": { | ||||||
| @@ -13956,7 +13957,7 @@ | |||||||
|                     "type": "github" |                     "type": "github" | ||||||
|                 } |                 } | ||||||
|             ], |             ], | ||||||
|             "time": "2022-08-26T13:28:24+00:00" |             "time": "2022-09-01T11:31:14+00:00" | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             "name": "theseer/tokenizer", |             "name": "theseer/tokenizer", | ||||||
|   | |||||||
| @@ -19,9 +19,15 @@ return new class extends Migration | |||||||
|             Type::addType('double', FloatType::class); |             Type::addType('double', FloatType::class); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |         // Document Items | ||||||
|         Schema::table('document_items', function(Blueprint $table) { |         Schema::table('document_items', function(Blueprint $table) { | ||||||
|             $table->double('quantity', 12, 2)->change(); |             $table->double('quantity', 12, 2)->change(); | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|  |         // Reconciliations | ||||||
|  |         Schema::table('reconciliations', function (Blueprint $table) { | ||||||
|  |             $table->text('transactions')->nullable()->after('closing_balance'); | ||||||
|  |         }); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|   | |||||||
							
								
								
									
										8
									
								
								public/css/app.css
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								public/css/app.css
									
									
									
									
										vendored
									
									
								
							| @@ -48183,8 +48183,8 @@ body{ | |||||||
|     grid-column: span 8 / span 8; |     grid-column: span 8 / span 8; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   .sm\:col-span-7{ |   .sm\:col-span-12{ | ||||||
|     grid-column: span 7 / span 7; |     grid-column: span 12 / span 12; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   .sm\:row-span-2{ |   .sm\:row-span-2{ | ||||||
| @@ -48299,6 +48299,10 @@ body{ | |||||||
|     grid-template-columns: repeat(8, minmax(0, 1fr)); |     grid-template-columns: repeat(8, minmax(0, 1fr)); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  |   .sm\:grid-cols-12{ | ||||||
|  |     grid-template-columns: repeat(12, minmax(0, 1fr)); | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|   .sm\:flex-row{ |   .sm\:flex-row{ | ||||||
|     -webkit-box-orient: horizontal; |     -webkit-box-orient: horizontal; | ||||||
|     -webkit-box-direction: normal; |     -webkit-box-direction: normal; | ||||||
|   | |||||||
							
								
								
									
										44
									
								
								resources/assets/js/mixins/wizardAction.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										44
									
								
								resources/assets/js/mixins/wizardAction.js
									
									
									
									
										vendored
									
									
								
							| @@ -8,6 +8,7 @@ export default { | |||||||
|                 name: "", |                 name: "", | ||||||
|                 rate: "", |                 rate: "", | ||||||
|                 select: "", |                 select: "", | ||||||
|  |                 default_currency: 0, | ||||||
|                 enabled: 1 |                 enabled: 1 | ||||||
|             }, |             }, | ||||||
|             error_field: {}, |             error_field: {}, | ||||||
| @@ -15,6 +16,7 @@ export default { | |||||||
|             button_loading: false, |             button_loading: false, | ||||||
|         } |         } | ||||||
|     }, |     }, | ||||||
|  |  | ||||||
|     methods: { |     methods: { | ||||||
|         onAddItem() { |         onAddItem() { | ||||||
|             this.new_datas = true; |             this.new_datas = true; | ||||||
| @@ -25,6 +27,9 @@ export default { | |||||||
|                 this.model.name = ''; |                 this.model.name = ''; | ||||||
|                 this.model.rate = ''; |                 this.model.rate = ''; | ||||||
|                 this.model.select = ''; |                 this.model.select = ''; | ||||||
|  |                 this.model.default = 0; | ||||||
|  |                 this.model.default_currency = 0; | ||||||
|  |                 this.model.enabled = 1; | ||||||
|             } |             } | ||||||
|         }, |         }, | ||||||
|  |  | ||||||
| @@ -36,6 +41,9 @@ export default { | |||||||
|             if (this.model) { |             if (this.model) { | ||||||
|                 this.model.name = item.name ? item.name : ''; |                 this.model.name = item.name ? item.name : ''; | ||||||
|                 this.model.rate = item.rate ? item.rate : ''; |                 this.model.rate = item.rate ? item.rate : ''; | ||||||
|  |                 this.model.enabled = 1; | ||||||
|  |                 this.model.default = item.default ? item.default : 0; | ||||||
|  |                 this.model.default_currency = item.default ? item.default : 0; | ||||||
|                 this.model.select = item.code ? item.code : ''; |                 this.model.select = item.code ? item.code : ''; | ||||||
|             } |             } | ||||||
|         }, |         }, | ||||||
| @@ -50,6 +58,8 @@ export default { | |||||||
|             this.model.name = ''; |             this.model.name = ''; | ||||||
|             this.model.rate = ''; |             this.model.rate = ''; | ||||||
|             this.model.select = ''; |             this.model.select = ''; | ||||||
|  |             this.model.default = 0; | ||||||
|  |             this.model.default_currency = 0; | ||||||
|             this.model.enabled = 1; |             this.model.enabled = 1; | ||||||
|         }, |         }, | ||||||
|  |  | ||||||
| @@ -74,8 +84,8 @@ export default { | |||||||
|         }, |         }, | ||||||
|  |  | ||||||
|         onDeleteItemMessage(event) { |         onDeleteItemMessage(event) { | ||||||
|             let type = event.success ? 'success' : 'error'; |             let type = event.success ? 'success' : 'danger'; | ||||||
|             let timeout = 1000; |             let timeout = 5000; | ||||||
|  |  | ||||||
|             if (event.important) { |             if (event.important) { | ||||||
|                 timeout = 0; |                 timeout = 0; | ||||||
| @@ -84,7 +94,7 @@ export default { | |||||||
|             this.$notify({ |             this.$notify({ | ||||||
|                 message: event.message, |                 message: event.message, | ||||||
|                 timeout: timeout, |                 timeout: timeout, | ||||||
|                 icon: "", |                 icon: "error_outline", | ||||||
|                 type, |                 type, | ||||||
|             }); |             }); | ||||||
|  |  | ||||||
| @@ -108,6 +118,12 @@ export default { | |||||||
|                 }); |                 }); | ||||||
|             } |             } | ||||||
|  |  | ||||||
|  |             if (data.default_currency == 1) { | ||||||
|  |                 data.rate = 1; | ||||||
|  |             } | ||||||
|  |  | ||||||
|  |             data.enabled = 1; | ||||||
|  |  | ||||||
|             window.axios({ |             window.axios({ | ||||||
|                     method: form_method, |                     method: form_method, | ||||||
|                     url: form_url, |                     url: form_url, | ||||||
| @@ -116,25 +132,42 @@ export default { | |||||||
|                 .then(response => { |                 .then(response => { | ||||||
|                     if (form_list.length != undefined) { |                     if (form_list.length != undefined) { | ||||||
|                         if (form_method == 'POST') { |                         if (form_method == 'POST') { | ||||||
|  |                             if (data.default_currency == 1) { | ||||||
|  |                                 form_list.forEach(item => { | ||||||
|  |                                     item.default = 0; | ||||||
|  |                                     item.default_currency = 0; | ||||||
|  |                                 }); | ||||||
|  |                             } | ||||||
|  |  | ||||||
|                             form_list.push({ |                             form_list.push({ | ||||||
|                                 "id": response.data.data.id, |                                 "id": response.data.data.id, | ||||||
|                                 "name": response.data.data.name, |                                 "name": response.data.data.name, | ||||||
|                                 "code": response.data.data.code, |                                 "code": response.data.data.code, | ||||||
|                                 "rate": response.data.data.rate, |                                 "rate": response.data.data.rate, | ||||||
|                                 "enabled": response.data.data.enabled != undefined ? response.data.data.enabled : 'true' |                                 "enabled": response.data.data.enabled != undefined ? response.data.data.enabled : 'true', | ||||||
|  |                                 "default": response.data.data.default ? response.data.data.default : 0, | ||||||
|  |                                 "default_currency": response.data.data.default ? response.data.data.default : 0 | ||||||
|                             }); |                             }); | ||||||
|                         } |                         } | ||||||
|      |      | ||||||
|                         if (form_method == 'PATCH') { |                         if (form_method == 'PATCH') { | ||||||
|                             form_list.forEach(item => { |                             form_list.forEach(item => { | ||||||
|  |                                 if (data.default_currency == 1) { | ||||||
|  |                                     item.default = 0; | ||||||
|  |                                     item.default_currency = 0; | ||||||
|  |                                 } | ||||||
|  |  | ||||||
|                                 if (item.id == form_id) { |                                 if (item.id == form_id) { | ||||||
|                                     item.name = response.data.data.name; |                                     item.name = response.data.data.name; | ||||||
|                                     item.code = response.data.data.code; |                                     item.code = response.data.data.code; | ||||||
|                                     item.rate = response.data.data.rate; |                                     item.rate = response.data.data.rate; | ||||||
|  |                                     item.default = response.data.data.default ? response.data.data.default : 0; | ||||||
|  |                                     item.default_currency = response.data.data.default ? response.data.data.default : 0; | ||||||
|                                 } |                                 } | ||||||
|                             }); |                             }); | ||||||
|                         } |                         } | ||||||
|                     } |                     } | ||||||
|  |  | ||||||
|                     this.onSuccessMessage(response); |                     this.onSuccessMessage(response); | ||||||
|                 }, this) |                 }, this) | ||||||
|                 .catch(error => { |                 .catch(error => { | ||||||
| @@ -146,12 +179,14 @@ export default { | |||||||
|             form_list.forEach(function (item, index) { |             form_list.forEach(function (item, index) { | ||||||
|                 if (item.id == event_id) { |                 if (item.id == event_id) { | ||||||
|                     form_list.splice(index, 1); |                     form_list.splice(index, 1); | ||||||
|  |  | ||||||
|                     return; |                     return; | ||||||
|                 } |                 } | ||||||
|             }, this); |             }, this); | ||||||
|  |  | ||||||
|             this.component = ""; |             this.component = ""; | ||||||
|             document.body.classList.remove("overflow-hidden"); |             document.body.classList.remove("overflow-hidden"); | ||||||
|  |  | ||||||
|             this.onDeleteItemMessage(event); |             this.onDeleteItemMessage(event); | ||||||
|         }, |         }, | ||||||
|  |  | ||||||
| @@ -159,6 +194,7 @@ export default { | |||||||
|             if (this.error_field[field_name]) { |             if (this.error_field[field_name]) { | ||||||
|                 return this.error_field[field_name][0]; |                 return this.error_field[field_name][0]; | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             this.button_loading = false; |             this.button_loading = false; | ||||||
|         }, |         }, | ||||||
|  |  | ||||||
|   | |||||||
| @@ -589,8 +589,10 @@ const app = new Vue({ | |||||||
|             this.form.items[item_index][field_name] = this.items[item_index][field_name]; |             this.form.items[item_index][field_name] = this.items[item_index][field_name]; | ||||||
|         }, |         }, | ||||||
|  |  | ||||||
|         async onPayment() { |         async onPayment(document_id) { | ||||||
|             let document_id = document.getElementById('document_id').value; |             if (typeof  document_id == 'object') { | ||||||
|  |                 document_id = document.getElementById('document_id').value; | ||||||
|  |             } | ||||||
|  |  | ||||||
|             let payment = { |             let payment = { | ||||||
|                 modal: false, |                 modal: false, | ||||||
|   | |||||||
| @@ -54,5 +54,13 @@ const app = new Vue({ | |||||||
|             .catch(error => { |             .catch(error => { | ||||||
|             }); |             }); | ||||||
|         } |         } | ||||||
|  |     }, | ||||||
|  |  | ||||||
|  |     watch: { | ||||||
|  |         'form.default_currency': function (newVal, oldVal) { | ||||||
|  |             if (newVal == 1) { | ||||||
|  |                 this.form.rate = 1; | ||||||
|  |             } | ||||||
|  |         }, | ||||||
|     } |     } | ||||||
| }); | }); | ||||||
|   | |||||||
| @@ -132,7 +132,9 @@ import WizardSteps from "./Steps.vue"; | |||||||
|     export default { |     export default { | ||||||
|         name: "Company", |         name: "Company", | ||||||
|  |  | ||||||
|     mixins: [WizardAction], |         mixins: [ | ||||||
|  |             WizardAction | ||||||
|  |         ], | ||||||
|  |  | ||||||
|         components: { |         components: { | ||||||
|             [Select.name]: Select, |             [Select.name]: Select, | ||||||
|   | |||||||
| @@ -9,7 +9,7 @@ | |||||||
|  |  | ||||||
|             <div class="overflow-x-visible menu-scroll mt-1"> |             <div class="overflow-x-visible menu-scroll mt-1"> | ||||||
|                 <form ref="form" class="py-2 align-middle inline-block min-w-full"> |                 <form ref="form" class="py-2 align-middle inline-block min-w-full"> | ||||||
|                     <table id="tbl-currencies" class="min-w-full divide-y divide-gray-200"> |                     <table v-if="currencies.length" id="tbl-currencies" class="min-w-full divide-y divide-gray-200"> | ||||||
|                         <thead> |                         <thead> | ||||||
|                             <tr class="flex items-center px-1"> |                             <tr class="flex items-center px-1"> | ||||||
|                                 <th class="w-4/12 ltr:pr-6 rtl:pl-6 py-3 ltr:text-left rtl:text-right text-sm font-bold text-black tracking-wider"> |                                 <th class="w-4/12 ltr:pr-6 rtl:pl-6 py-3 ltr:text-left rtl:text-right text-sm font-bold text-black tracking-wider"> | ||||||
| @@ -30,10 +30,29 @@ | |||||||
|                             <tr v-for="(item, index) in currencies" :key="index" data-table-list class="relative flex items-center border-b hover:bg-gray-100 px-1 flex-wrap group"> |                             <tr v-for="(item, index) in currencies" :key="index" data-table-list class="relative flex items-center border-b hover:bg-gray-100 px-1 flex-wrap group"> | ||||||
|                                 <td :class="current_tab == index ? 'hidden' : ''" class="w-4/12 ltr:pr-6 rtl:pl-6 py-4 ltr:text-left rtl:text-right whitespace-nowrap text-sm font-medium text-black"> |                                 <td :class="current_tab == index ? 'hidden' : ''" class="w-4/12 ltr:pr-6 rtl:pl-6 py-4 ltr:text-left rtl:text-right whitespace-nowrap text-sm font-medium text-black"> | ||||||
|                                     {{ item.name }} |                                     {{ item.name }} | ||||||
|  |  | ||||||
|  |                                     <span v-if="item.default" class="cursor-pointer"> | ||||||
|  |                                         <span class="relative auto" data-tooltip-target="wizard-currency-default" data-tooltip-placement="right"> | ||||||
|  |                                             <span class="material-icons-round text-purple text-sm ml-2">lock</span> | ||||||
|  |                                         </span> | ||||||
|  |  | ||||||
|  |                                         <div id="wizard-currency-default" role="tooltip" | ||||||
|  |                                             class="inline-block absolute z-20 py-1 px-2 text-sm font-medium rounded-lg bg-white text-gray-900 w-auto border border-gray-200 shadow-sm tooltip-content whitespace-normal opacity-0 invisible" | ||||||
|  |                                         > | ||||||
|  |                                             {{ translations.currencies.default }} | ||||||
|  |                                             <div  | ||||||
|  |                                                 class="absolute w-2 h-2 before:absolute before:w-2 before:h-2 before:bg-white before:border-gray-200 before:transform before:rotate-45 before:border -left-1 before:border-t-0 before:border-r-0 border-gray-200" | ||||||
|  |                                                 data-popper-arrow | ||||||
|  |                                             > | ||||||
|  |                                             </div> | ||||||
|  |                                         </div> | ||||||
|  |                                     </span> | ||||||
|                                 </td> |                                 </td> | ||||||
|  |  | ||||||
|                                 <td :class="current_tab == index ? 'hidden' : ''" class="w-4/12 ltr:pr-6 rtl:pl-6 py-4 text-center whitespace-nowrap text-sm font-medium text-black"> |                                 <td :class="current_tab == index ? 'hidden' : ''" class="w-4/12 ltr:pr-6 rtl:pl-6 py-4 text-center whitespace-nowrap text-sm font-medium text-black"> | ||||||
|                                     {{ item.code }}  |                                     {{ item.code }}  | ||||||
|                                 </td> |                                 </td> | ||||||
|  |  | ||||||
|                                 <td :class="current_tab == index ? 'hidden' : ''" class="w-4/12 relative ltr:pr-6 rtl:pl-6 py-4 ltr:text-right rtl:text-left whitespace-nowrap text-sm font-medium text-black"> |                                 <td :class="current_tab == index ? 'hidden' : ''" class="w-4/12 relative ltr:pr-6 rtl:pl-6 py-4 ltr:text-right rtl:text-left whitespace-nowrap text-sm font-medium text-black"> | ||||||
|                                     {{ item.rate }} |                                     {{ item.rate }} | ||||||
|  |  | ||||||
| @@ -59,83 +78,14 @@ | |||||||
|                                 </td> |                                 </td> | ||||||
|  |  | ||||||
|                                 <td class="w-full p-0 current-tab" v-if="current_tab == index"> |                                 <td class="w-full p-0 current-tab" v-if="current_tab == index"> | ||||||
|                                     <div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 py-3"> |                                     <div class="grid sm:grid-cols-12 gap-x-8 gap-y-6 py-3"> | ||||||
|                                         <base-input name="name" data-name="name" |                                         <base-input :label="translations.currencies.name" name="name" data-name="name" | ||||||
|                                             form-classes="sm:col-span-2" |                                             form-classes="sm:col-span-4" | ||||||
|                                             v-model="model.name" |                                             v-model="model.name" | ||||||
|                                             :error="onFailErrorGet('name')" |                                             :error="onFailErrorGet('name')" | ||||||
|                                         /> |                                         /> | ||||||
|  |  | ||||||
|                                         <base-input class="sm:col-span-2" :error="onFailErrorGet('code')"> |                                         <base-input :label="translations.currencies.code" class="sm:col-span-3" :error="onFailErrorGet('code')"> | ||||||
|                                             <el-select name="code" v-model="model.select" @change="onChangeCodeItem(model.select)" filterable> |  | ||||||
|                                                 <el-option |  | ||||||
|                                                 v-for="option in currency_codes" |  | ||||||
|                                                 :key="option" |  | ||||||
|                                                 :label="option" |  | ||||||
|                                                 :value="option" |  | ||||||
|                                                 > |  | ||||||
|                                                 </el-option> |  | ||||||
|                                             </el-select> |  | ||||||
|                                         </base-input> |  | ||||||
|  |  | ||||||
|                                         <base-input name="rate" data-name="rate" :placeholder="translations.currencies.rate" |  | ||||||
|                                             form-classes="sm:col-span-2" |  | ||||||
|                                             v-model="model.rate" |  | ||||||
|                                             :error="onFailErrorGet('rate')" |  | ||||||
|                                         /> |  | ||||||
|  |  | ||||||
|                                         <div class="flex justify-end items-center sm:col-span-6"> |  | ||||||
|                                             <base-button class=" flex items-center justify-center px-6 py-1.5 text-base rounded-lg bg-transparent hover:bg-gray-100 ltr:mr-2 rtl:ml-2" @click="onCancelItem()"> |  | ||||||
|                                                 {{ translations.currencies.cancel }} |  | ||||||
|                                             </base-button> |  | ||||||
|  |  | ||||||
|                                             <button |  | ||||||
|                                                 type="submit" |  | ||||||
|                                                 :disabled="button_loading" |  | ||||||
|                                                 class="relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-green-100" |  | ||||||
|                                                 @click="onEditForm(item, $event)" |  | ||||||
|                                             > |  | ||||||
|                                                 <i v-if="button_loading" class="animate-submit delay-[0.28s] absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto before:absolute before:w-2 before:h-2 before:rounded-full before:animate-submit before:delay-[0.14s] after:absolute after:w-2 after:h-2 after:rounded-full after:animate-submit before:-left-3.5 after:-right-3.5 after:delay-[0.42s]"></i>  |  | ||||||
|                                                 <span :class="[{'opacity-0': button_loading}]"> |  | ||||||
|                                                     {{ translations.currencies.save }} |  | ||||||
|                                                 </span> |  | ||||||
|                                             </button> |  | ||||||
|                                         </div> |  | ||||||
|                                     </div> |  | ||||||
|                                 </td> |  | ||||||
|                             </tr> |  | ||||||
|                         </tbody> |  | ||||||
|                     </table> |  | ||||||
|                     <div class="flex flex-col items-center"> |  | ||||||
|                         <div v-if="!currencies.length" class="flex flex-col items-center gap-y-2"> |  | ||||||
|                             <span class="text-dark"> |  | ||||||
|                                 {{ translations.currencies.no_currency }} |  | ||||||
|                             </span> |  | ||||||
|  |  | ||||||
|                             <span class="text-gray-700"> |  | ||||||
|                                 {{ translations.currencies.create_currency }} |  | ||||||
|                             </span> |  | ||||||
|                         </div> |  | ||||||
|  |  | ||||||
|                         <div v-if="currencies.length" class="w-full border-b hover:bg-gray-100" style="height:53px;"> |  | ||||||
|                             <button type="button" class="w-full h-full flex items-center justify-center text-purple font-medium disabled:bg-gray-200" @click="onAddItem()"> |  | ||||||
|                                 <span class="material-icons-outlined text-base font-bold ltr:mr-1 rtl:ml-1">add</span> |  | ||||||
|                                 <span class="bg-no-repeat bg-0-2 bg-0-full hover:bg-full-2 bg-gradient-to-b from-transparent to-purple transition-backgroundSize">{{ translations.currencies.new_currency }}</span> |  | ||||||
|                             </button> |  | ||||||
|                         </div> |  | ||||||
|  |  | ||||||
|                         <button v-else type="button" class="relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-green-100 mt-3" @click="onAddItem()"> |  | ||||||
|                             {{ translations.currencies.new_currency }} |  | ||||||
|                         </button> |  | ||||||
|  |  | ||||||
|                         <div v-if="new_datas" class="grid sm:grid-cols-7 gap-x-8 gap-y-6 my-3.5 w-full"> |  | ||||||
|                             <base-input :label="translations.currencies.name" name="name" data-name="name" :placeholder="translations.currencies.name" |  | ||||||
|                             class="sm:col-span-3" |  | ||||||
|                             v-model="model.name" |  | ||||||
|                             :error="onFailErrorGet('name')" |  | ||||||
|                             /> |  | ||||||
|  |  | ||||||
|                             <base-input :label="translations.currencies.code" class="sm:col-span-2" :error="onFailErrorGet('code')"> |  | ||||||
|                                             <el-select name="code" v-model="model.select" @change="onChangeCodeItem(model.select)" filterable> |                                             <el-select name="code" v-model="model.select" @change="onChangeCodeItem(model.select)" filterable> | ||||||
|                                                 <el-option |                                                 <el-option | ||||||
|                                                 v-for="option in currency_codes" |                                                 v-for="option in currency_codes" | ||||||
| @@ -148,12 +98,106 @@ | |||||||
|                                         </base-input> |                                         </base-input> | ||||||
|  |  | ||||||
|                                         <base-input :label="translations.currencies.rate" name="rate" data-name="rate" :placeholder="translations.currencies.rate" |                                         <base-input :label="translations.currencies.rate" name="rate" data-name="rate" :placeholder="translations.currencies.rate" | ||||||
|                             class="sm:col-span-2" |                                             form-classes="sm:col-span-3" | ||||||
|                                             v-model="model.rate" |                                             v-model="model.rate" | ||||||
|                                             :error="onFailErrorGet('rate')" |                                             :error="onFailErrorGet('rate')" | ||||||
|  |                                             :disabled="model.default_currency == 1" | ||||||
|  |                                         /> | ||||||
|  |  | ||||||
|  |                                         <base-input :label="translations.currencies.default" class="sm:col-span-2" :error="onFailErrorGet('default_currency')"> | ||||||
|  |                                             <div class="flex items-center mt-1"> | ||||||
|  |                                                 <label class="relative w-10 rounded-tl-lg rounded-bl-lg py-2 px-1 text-sm text-center transition-all cursor-pointer" @click="onChangeDefault(1)" v-bind:class="[model.default_currency == 1 ? ['bg-green-500','text-white'] : 'bg-black-100']"> | ||||||
|  |                                                     Yes | ||||||
|  |                                                     <input type="radio" name="default_currency" id="default-1" class="absolute left-0 opacity-0"> | ||||||
|  |                                                 </label> | ||||||
|  |  | ||||||
|  |                                                 <label class="relative w-10 rounded-tr-lg rounded-br-lg py-2 px-1 text-sm text-center transition-all cursor-pointer" @click="onChangeDefault(0)" v-bind:class="[model.default_currency == 0 ? ['bg-red-500','text-white'] : 'bg-black-100']"> | ||||||
|  |                                                     No | ||||||
|  |                                                     <input type="radio" name="default_currency" id="default-0" class="absolute left-0 opacity-0"> | ||||||
|  |                                                 </label> | ||||||
|  |                                             </div> | ||||||
|  |  | ||||||
|  |                                             <input type="hidden" name="default_currency" value="0" v-model="model.default_currency" /> | ||||||
|  |                                         </base-input> | ||||||
|  |  | ||||||
|  |                                         <div class="flex justify-end items-center sm:col-span-12"> | ||||||
|  |                                             <base-button class="flex items-center justify-center px-6 py-1.5 text-base rounded-lg bg-transparent hover:bg-gray-100 ltr:mr-2 rtl:ml-2" @click="onCancelItem()"> | ||||||
|  |                                                 {{ translations.currencies.cancel }} | ||||||
|  |                                             </base-button> | ||||||
|  |  | ||||||
|  |                                             <button | ||||||
|  |                                                 type="submit" | ||||||
|  |                                                 class="relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-green-100" | ||||||
|  |                                                 :disabled="button_loading" | ||||||
|  |                                                 @click="onEditForm(item, $event)" | ||||||
|  |                                             > | ||||||
|  |                                                 <i | ||||||
|  |                                                     class="animate-submit delay-[0.28s] absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto before:absolute before:w-2 before:h-2 before:rounded-full before:animate-submit before:delay-[0.14s]after:absolute after:w-2 after:h-2 after:rounded-full after:animate-submit before:-left-3.5 after:-right-3.5 after:delay-[0.42s]" | ||||||
|  |                                                     v-if="button_loading" | ||||||
|  |                                                 > | ||||||
|  |                                                 </i> | ||||||
|  |  | ||||||
|  |                                                 <span :class="[{'opacity-0': button_loading}]"> | ||||||
|  |                                                     {{ translations.currencies.save }} | ||||||
|  |                                                 </span> | ||||||
|  |                                             </button> | ||||||
|  |                                         </div> | ||||||
|  |                                     </div> | ||||||
|  |                                 </td> | ||||||
|  |                             </tr> | ||||||
|  |                         </tbody> | ||||||
|  |                     </table> | ||||||
|  |  | ||||||
|  |                     <div class="flex flex-col items-center"> | ||||||
|  |                         <div v-if="new_datas" class="grid sm:grid-cols-12 gap-x-8 gap-y-6 px-1 py-3.5 w-full border-b hover:bg-gray-100"> | ||||||
|  |                             <base-input :label="translations.currencies.name"  | ||||||
|  |                                 name="name"  | ||||||
|  |                                 data-name="name"  | ||||||
|  |                                 :placeholder="translations.currencies.name" | ||||||
|  |                                 class="sm:col-span-4" | ||||||
|  |                                 v-model="model.name" | ||||||
|  |                                 :error="onFailErrorGet('name')" | ||||||
|  |                             /> | ||||||
|  |  | ||||||
|  |                             <base-input :label="translations.currencies.code" class="sm:col-span-3" :error="onFailErrorGet('code')"> | ||||||
|  |                                 <el-select name="code" v-model="model.select" @change="onChangeCodeItem(model.select)"filterable> | ||||||
|  |                                     <el-option | ||||||
|  |                                         v-for="option in currency_codes" | ||||||
|  |                                         :key="option" | ||||||
|  |                                         :label="option" | ||||||
|  |                                         :value="option" | ||||||
|  |                                     > | ||||||
|  |                                     </el-option> | ||||||
|  |                                 </el-select> | ||||||
|  |                             </base-input> | ||||||
|  |  | ||||||
|  |                             <base-input :label="translations.currencies.rate" | ||||||
|  |                                 name="rate" | ||||||
|  |                                 data-name="rate" | ||||||
|  |                                 :placeholder="translations.currencies.rate" | ||||||
|  |                                 class="sm:col-span-3" | ||||||
|  |                                 v-model="model.rate" | ||||||
|  |                                 :disabled="model.default_currency == 1" | ||||||
|  |                                 :error="onFailErrorGet('rate')" | ||||||
|                             /> |                             /> | ||||||
|  |  | ||||||
|                             <div class="flex items-center justify-end sm:col-span-7"> |                             <base-input :label="translations.currencies.default" class="sm:col-span-2" :error="onFailErrorGet('default_currency')"> | ||||||
|  |                                 <div class="flex items-center mt-1"> | ||||||
|  |                                     <label class="relative w-10 rounded-tl-lg rounded-bl-lg py-2 px-1 text-sm text-center transition-all cursor-pointer" @click="onChangeDefault(1)" v-bind:class="[model.default_currency == 1 ? ['bg-green-500','text-white'] : 'bg-black-100']"> | ||||||
|  |                                         Yes | ||||||
|  |                                         <input type="radio" name="default_currency" id="default-1" class="absolute left-0 opacity-0"> | ||||||
|  |                                     </label> | ||||||
|  |  | ||||||
|  |                                     <label class="relative w-10 rounded-tr-lg rounded-br-lg py-2 px-1 text-sm text-center transition-all cursor-pointer" @click="onChangeDefault(0)" v-bind:class="[model.default_currency == 0 ? ['bg-red-500','text-white'] : 'bg-black-100']"> | ||||||
|  |                                         No | ||||||
|  |                                         <input type="radio" name="default_currency" id="default-0" class="absolute left-0 opacity-0"> | ||||||
|  |                                     </label> | ||||||
|  |                                 </div> | ||||||
|  |  | ||||||
|  |                                 <input type="hidden" name="default_currency" value="0" v-model="model.default_currency" /> | ||||||
|  |                             </base-input> | ||||||
|  |  | ||||||
|  |                             <div class="flex items-center justify-end sm:col-span-12"> | ||||||
|                                 <base-button class=" flex items-center justify-center px-6 py-1.5 text-base rounded-lg bg-transparent hover:bg-gray-100 ltr:mr-2 rtl:ml-2" @click="new_datas = false"> |                                 <base-button class=" flex items-center justify-center px-6 py-1.5 text-base rounded-lg bg-transparent hover:bg-gray-100 ltr:mr-2 rtl:ml-2" @click="new_datas = false"> | ||||||
|                                     {{ translations.currencies.cancel }} |                                     {{ translations.currencies.cancel }} | ||||||
|                                 </base-button> |                                 </base-button> | ||||||
| @@ -166,6 +210,27 @@ | |||||||
|                                 </button> |                                 </button> | ||||||
|                             </div> |                             </div> | ||||||
|                         </div> |                         </div> | ||||||
|  |  | ||||||
|  |                         <div v-if="! currencies.length && ! new_datas" class="flex flex-col items-center gap-y-2"> | ||||||
|  |                             <span class="text-dark"> | ||||||
|  |                                 {{ translations.currencies.no_currency }} | ||||||
|  |                             </span> | ||||||
|  |  | ||||||
|  |                             <span class="text-gray-700"> | ||||||
|  |                                 {{ translations.currencies.create_currency }} | ||||||
|  |                             </span> | ||||||
|  |                         </div> | ||||||
|  |  | ||||||
|  |                         <button v-if="! currencies.length && ! new_datas" type="button" class="relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-green-100 mt-3" @click="onAddItem()"> | ||||||
|  |                             {{ translations.currencies.new_currency }} | ||||||
|  |                         </button> | ||||||
|  |  | ||||||
|  |                         <div v-if="currencies.length && ! new_datas" class="w-full border-b hover:bg-gray-100" style="height:53px;"> | ||||||
|  |                             <button type="button" class="w-full h-full flex items-center justify-center text-purple font-medium disabled:bg-gray-200" @click="onAddItem()"> | ||||||
|  |                                 <span class="material-icons-outlined text-base font-bold ltr:mr-1 rtl:ml-1">add</span> | ||||||
|  |                                 <span class="bg-no-repeat bg-0-2 bg-0-full hover:bg-full-2 bg-gradient-to-b from-transparent to-purple transition-backgroundSize">{{ translations.currencies.new_currency }}</span> | ||||||
|  |                             </button> | ||||||
|  |                         </div> | ||||||
|                     </div> |                     </div> | ||||||
|                 </form> |                 </form> | ||||||
|             </div> |             </div> | ||||||
| @@ -181,11 +246,11 @@ | |||||||
|             </div> |             </div> | ||||||
|         </div> |         </div> | ||||||
|  |  | ||||||
|         <notifications></notifications> |  | ||||||
|  |  | ||||||
|         <form id="form-dynamic-component" method="POST" action="#"></form> |         <form id="form-dynamic-component" method="POST" action="#"></form> | ||||||
|  |  | ||||||
|         <component v-bind:is="component" @deleted="onDeleteCurrency($event)"></component> |         <component v-bind:is="component" @deleted="onDeleteCurrency($event)"></component> | ||||||
|  |  | ||||||
|  |         <notifications></notifications> | ||||||
|     </div> |     </div> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| @@ -200,7 +265,10 @@ import WizardSteps from "./Steps.vue"; | |||||||
|     export default { |     export default { | ||||||
|         name: "Currencies", |         name: "Currencies", | ||||||
|  |  | ||||||
|     mixins: [MixinsGlobal, WizardAction], |         mixins: [ | ||||||
|  |             MixinsGlobal, | ||||||
|  |             WizardAction | ||||||
|  |         ], | ||||||
|  |  | ||||||
|         components: { |         components: { | ||||||
|             [Select.name]: Select, |             [Select.name]: Select, | ||||||
| @@ -230,10 +298,14 @@ export default { | |||||||
|         data() { |         data() { | ||||||
|             return { |             return { | ||||||
|                 active: 1, |                 active: 1, | ||||||
|             bulk_action: new BulkAction(url + "/settings/currencies"), |                 empty: false, | ||||||
|             }; |             }; | ||||||
|         }, |         }, | ||||||
|  |  | ||||||
|  |         created() { | ||||||
|  |             this.empty = ! this.currencies.length; | ||||||
|  |         }, | ||||||
|  |  | ||||||
|         methods: { |         methods: { | ||||||
|             onClickDelete(item) { |             onClickDelete(item) { | ||||||
|                 this.confirmDelete( |                 this.confirmDelete( | ||||||
| @@ -253,7 +325,24 @@ export default { | |||||||
|             }, |             }, | ||||||
|  |  | ||||||
|             onDeleteCurrency(event) { |             onDeleteCurrency(event) { | ||||||
|  |                 this.empty = this.currencies.length; | ||||||
|  |  | ||||||
|  |                 if (event.success) { | ||||||
|                     this.onEjetItem(event, this.currencies, event.currency_id); |                     this.onEjetItem(event, this.currencies, event.currency_id); | ||||||
|  |  | ||||||
|  |                     this.empty = ! this.currencies.length; | ||||||
|  |                 } else { | ||||||
|  |                     this.component = ""; | ||||||
|  |                     event.important = true; | ||||||
|  |                     document.body.classList.remove("overflow-hidden"); | ||||||
|  |  | ||||||
|  |                     this.onDeleteItemMessage(event); | ||||||
|  |                 } | ||||||
|  |             }, | ||||||
|  |  | ||||||
|  |             onChangeDefault(value) { | ||||||
|  |                 this.model.rate = 1; | ||||||
|  |                 this.model.default_currency = value; | ||||||
|             }, |             }, | ||||||
|  |  | ||||||
|             onChangeCodeItem(code) { |             onChangeCodeItem(code) { | ||||||
|   | |||||||
| @@ -9,7 +9,7 @@ | |||||||
|  |  | ||||||
|     <x-slot name="buttons"> |     <x-slot name="buttons"> | ||||||
|         @can('create-auth-users') |         @can('create-auth-users') | ||||||
|             <x-link href="{{ route('users.create') }}" kind="primary"> |             <x-link href="{{ route('users.create') }}" kind="primary" id="index-more-actions-invite-user"> | ||||||
|                 {{ trans('general.title.invite', ['type' => trans_choice('general.users', 1)]) }} |                 {{ trans('general.title.invite', ['type' => trans_choice('general.users', 1)]) }} | ||||||
|             </x-link> |             </x-link> | ||||||
|         @endcan |         @endcan | ||||||
|   | |||||||
| @@ -11,7 +11,7 @@ | |||||||
|  |  | ||||||
|     <x-slot name="buttons"> |     <x-slot name="buttons"> | ||||||
|         @can('create-banking-accounts') |         @can('create-banking-accounts') | ||||||
|             <x-link href="{{ route('accounts.create') }}" kind="primary"> |             <x-link href="{{ route('accounts.create') }}" kind="primary" id="index-more-actions-new-account"> | ||||||
|                 {{ trans('general.title.new', ['type' => trans_choice('general.accounts', 1)]) }} |                 {{ trans('general.title.new', ['type' => trans_choice('general.accounts', 1)]) }} | ||||||
|             </x-link> |             </x-link> | ||||||
|         @endcan |         @endcan | ||||||
|   | |||||||
| @@ -24,7 +24,7 @@ | |||||||
|     <x-slot name="buttons"> |     <x-slot name="buttons"> | ||||||
|         @stack('create_button_start') |         @stack('create_button_start') | ||||||
|  |  | ||||||
|         <x-dropdown id="dropdown-new-actions"> |         <x-dropdown id="show-new-actions-account"> | ||||||
|             <x-slot name="trigger" class="flex items-center px-3 py-1.5 mb-3 sm:mb-0 bg-green hover:bg-green-700 rounded-xl text-white text-sm font-bold leading-6" override="class"> |             <x-slot name="trigger" class="flex items-center px-3 py-1.5 mb-3 sm:mb-0 bg-green hover:bg-green-700 rounded-xl text-white text-sm font-bold leading-6" override="class"> | ||||||
|                 {{ trans('general.new_more') }} |                 {{ trans('general.new_more') }} | ||||||
|                 <span class="material-icons ltr:ml-2 rtl:mr-2">expand_more</span> |                 <span class="material-icons ltr:ml-2 rtl:mr-2">expand_more</span> | ||||||
| @@ -33,7 +33,7 @@ | |||||||
|             @stack('income_button_start') |             @stack('income_button_start') | ||||||
|  |  | ||||||
|             @can('create-banking-transactions') |             @can('create-banking-transactions') | ||||||
|             <x-dropdown.link href="{{ route('accounts.create-income', $account->id) }}"> |             <x-dropdown.link href="{{ route('accounts.create-income', $account->id) }}" id="show-more-actions-new-income-account"> | ||||||
|                 {{ trans_choice('general.incomes', 1) }} |                 {{ trans_choice('general.incomes', 1) }} | ||||||
|             </x-dropdown.link> |             </x-dropdown.link> | ||||||
|             @endcan |             @endcan | ||||||
| @@ -41,7 +41,7 @@ | |||||||
|             @stack('expense_button_start') |             @stack('expense_button_start') | ||||||
|  |  | ||||||
|             @can('create-banking-transactions') |             @can('create-banking-transactions') | ||||||
|             <x-dropdown.link href="{{ route('accounts.create-expense', $account->id) }}"> |             <x-dropdown.link href="{{ route('accounts.create-expense', $account->id) }}" id="show-more-actions-new-expense-account"> | ||||||
|                 {{ trans_choice('general.expenses', 1) }} |                 {{ trans_choice('general.expenses', 1) }} | ||||||
|             </x-dropdown.link> |             </x-dropdown.link> | ||||||
|             @endcan |             @endcan | ||||||
| @@ -49,7 +49,7 @@ | |||||||
|             @stack('transfer_button_start') |             @stack('transfer_button_start') | ||||||
|  |  | ||||||
|             @can('create-banking-transfers') |             @can('create-banking-transfers') | ||||||
|             <x-dropdown.link href="{{ route('accounts.create-transfer', $account->id) }}"> |             <x-dropdown.link href="{{ route('accounts.create-transfer', $account->id) }}" id="show-more-actions-new-transfer-account"> | ||||||
|                 {{ trans_choice('general.transfers', 1) }} |                 {{ trans_choice('general.transfers', 1) }} | ||||||
|             </x-dropdown.link> |             </x-dropdown.link> | ||||||
|             @endcan |             @endcan | ||||||
| @@ -60,7 +60,7 @@ | |||||||
|         @stack('edit_button_start') |         @stack('edit_button_start') | ||||||
|  |  | ||||||
|         @can('update-banking-accounts') |         @can('update-banking-accounts') | ||||||
|         <x-link href="{{ route('accounts.edit', $account->id) }}"> |         <x-link href="{{ route('accounts.edit', $account->id) }}" id="show-more-actions-edit-account"> | ||||||
|             {{ trans('general.edit') }} |             {{ trans('general.edit') }} | ||||||
|         </x-link> |         </x-link> | ||||||
|         @endcan |         @endcan | ||||||
| @@ -71,7 +71,7 @@ | |||||||
|     <x-slot name="moreButtons"> |     <x-slot name="moreButtons"> | ||||||
|         @stack('more_button_start') |         @stack('more_button_start') | ||||||
|  |  | ||||||
|         <x-dropdown id="dropdown-more-actions"> |         <x-dropdown id="show-more-actions-account"> | ||||||
|             <x-slot name="trigger"> |             <x-slot name="trigger"> | ||||||
|                 <span class="material-icons">more_horiz</span> |                 <span class="material-icons">more_horiz</span> | ||||||
|             </x-slot> |             </x-slot> | ||||||
| @@ -79,7 +79,7 @@ | |||||||
|             @stack('see_performance_button_start') |             @stack('see_performance_button_start') | ||||||
|  |  | ||||||
|             @can('read-banking-accounts') |             @can('read-banking-accounts') | ||||||
|             <x-dropdown.link href="{{ route('accounts.see-performance', $account->id) }}"> |             <x-dropdown.link href="{{ route('accounts.see-performance', $account->id) }}" id="show-more-actions-performance-account"> | ||||||
|                 {{ trans('accounts.see_performance') }} |                 {{ trans('accounts.see_performance') }} | ||||||
|             </x-dropdown.link> |             </x-dropdown.link> | ||||||
|             @endcan |             @endcan | ||||||
| @@ -89,7 +89,7 @@ | |||||||
|             @stack('duplicate_button_start') |             @stack('duplicate_button_start') | ||||||
|  |  | ||||||
|             @can('create-banking-accounts') |             @can('create-banking-accounts') | ||||||
|             <x-dropdown.link href="{{ route('accounts.duplicate', $account->id) }}"> |             <x-dropdown.link href="{{ route('accounts.duplicate', $account->id) }}" id="show-more-actions-duplicate-account"> | ||||||
|                 {{ trans('general.duplicate') }} |                 {{ trans('general.duplicate') }} | ||||||
|             </x-dropdown.link> |             </x-dropdown.link> | ||||||
|             @endcan |             @endcan | ||||||
|   | |||||||
| @@ -81,13 +81,22 @@ | |||||||
|                                 @endif |                                 @endif | ||||||
|  |  | ||||||
|                                 <x-table.td kind="amount" class="none-truncate"> |                                 <x-table.td kind="amount" class="none-truncate"> | ||||||
|                                     @php $type = $item->isIncome() ? 'income' : 'expense'; @endphp |                                     @php | ||||||
|  |                                         $type = $item->isIncome() ? 'income' : 'expense'; | ||||||
|  |                                         $name = $type . '_' . $item->id; | ||||||
|  |  | ||||||
|  |                                         $checked = $item->reconciled; | ||||||
|  |  | ||||||
|  |                                         if (! $reconciliation->reconciled && array_key_exists($name, $reconciliation->transactions)) { | ||||||
|  |                                             $checked = (empty($reconciliation->transactions[$name]) || $reconciliation->transactions[$name] === 'false') ? 0 : 1; | ||||||
|  |                                         } | ||||||
|  |                                     @endphp | ||||||
|  |  | ||||||
|                                     <x-form.input.checkbox name="{{ $type . '_' . $item->id }}" |                                     <x-form.input.checkbox name="{{ $type . '_' . $item->id }}" | ||||||
|                                         label="" |                                         label="" | ||||||
|                                         id="transaction-{{ $item->id . '-'. $type }}" |                                         id="transaction-{{ $item->id . '-'. $type }}" | ||||||
|                                         :value="$item->amount_for_account" |                                         :value="$item->amount_for_account" | ||||||
|                                         :checked="$item->reconciled" |                                         :checked="$checked" | ||||||
|                                         data-field="transactions" |                                         data-field="transactions" | ||||||
|                                         v-model="form.transactions.{{ $type . '_' . $item->id }}" |                                         v-model="form.transactions.{{ $type . '_' . $item->id }}" | ||||||
|                                         class="text-purple focus:outline-none focus:ring-purple focus:border-purple" |                                         class="text-purple focus:outline-none focus:ring-purple focus:border-purple" | ||||||
|   | |||||||
| @@ -9,7 +9,7 @@ | |||||||
|  |  | ||||||
|     <x-slot name="buttons"> |     <x-slot name="buttons"> | ||||||
|         @can('create-banking-reconciliations') |         @can('create-banking-reconciliations') | ||||||
|             <x-link href="{{ route('reconciliations.create') }}" kind="primary"> |             <x-link href="{{ route('reconciliations.create') }}" kind="primary" id="index-more-actions-new-reconciliation"> | ||||||
|                 {{ trans('general.title.new', ['type' => trans_choice('general.reconciliations', 1)]) }} |                 {{ trans('general.title.new', ['type' => trans_choice('general.reconciliations', 1)]) }} | ||||||
|             </x-link> |             </x-link> | ||||||
|         @endcan |         @endcan | ||||||
|   | |||||||
| @@ -11,11 +11,11 @@ | |||||||
|  |  | ||||||
|     <x-slot name="buttons"> |     <x-slot name="buttons"> | ||||||
|         @can('create-banking-transactions') |         @can('create-banking-transactions') | ||||||
|             <x-link href="{{ route('recurring-transactions.create', ['type' => 'income-recurring']) }}" kind="primary"> |             <x-link href="{{ route('recurring-transactions.create', ['type' => 'income-recurring']) }}" kind="primary" id="index-more-actions-new-income-recurring-transaction"> | ||||||
|                 {{ trans('general.title.new', ['type' => trans_choice('general.recurring_incomes', 1)]) }} |                 {{ trans('general.title.new', ['type' => trans_choice('general.recurring_incomes', 1)]) }} | ||||||
|             </x-link> |             </x-link> | ||||||
|  |  | ||||||
|             <x-link href="{{ route('recurring-transactions.create', ['type' => 'expense-recurring']) }}" kind="primary"> |             <x-link href="{{ route('recurring-transactions.create', ['type' => 'expense-recurring']) }}" kind="primary" id="index-more-actions-new-expense-recurring-transaction"> | ||||||
|                 {{ trans('general.title.new', ['type' => trans_choice('general.recurring_expenses', 1)]) }} |                 {{ trans('general.title.new', ['type' => trans_choice('general.recurring_expenses', 1)]) }} | ||||||
|             </x-link> |             </x-link> | ||||||
|         @endcan |         @endcan | ||||||
|   | |||||||
| @@ -11,11 +11,11 @@ | |||||||
|  |  | ||||||
|     <x-slot name="buttons"> |     <x-slot name="buttons"> | ||||||
|         @can('create-banking-transactions') |         @can('create-banking-transactions') | ||||||
|             <x-link href="{{ route('transactions.create', ['type' => 'income']) }}" kind="primary"> |             <x-link href="{{ route('transactions.create', ['type' => 'income']) }}" kind="primary" id="index-more-actions-new-income-transaction"> | ||||||
|                 {{ trans('general.title.new', ['type' => trans_choice('general.incomes', 1)]) }} |                 {{ trans('general.title.new', ['type' => trans_choice('general.incomes', 1)]) }} | ||||||
|             </x-link> |             </x-link> | ||||||
|  |  | ||||||
|             <x-link href="{{ route('transactions.create', ['type' => 'expense']) }}" kind="primary"> |             <x-link href="{{ route('transactions.create', ['type' => 'expense']) }}" kind="primary" id="index-more-actions-new-expense-transaction"> | ||||||
|                 {{ trans('general.title.new', ['type' => trans_choice('general.expenses', 1)]) }} |                 {{ trans('general.title.new', ['type' => trans_choice('general.expenses', 1)]) }} | ||||||
|             </x-link> |             </x-link> | ||||||
|         @endcan |         @endcan | ||||||
|   | |||||||
| @@ -11,7 +11,7 @@ | |||||||
|  |  | ||||||
|     <x-slot name="buttons"> |     <x-slot name="buttons"> | ||||||
|         @can('create-common-companies') |         @can('create-common-companies') | ||||||
|             <x-link href="{{ route('companies.create') }}" kind="primary"> |             <x-link href="{{ route('companies.create') }}" kind="primary" id="index-more-actions-new-company"> | ||||||
|                 {{ trans('general.title.new', ['type' => trans_choice('general.companies', 1)]) }} |                 {{ trans('general.title.new', ['type' => trans_choice('general.companies', 1)]) }} | ||||||
|             </x-link> |             </x-link> | ||||||
|         @endcan |         @endcan | ||||||
|   | |||||||
| @@ -3,7 +3,7 @@ | |||||||
|  |  | ||||||
|     <x-slot name="buttons"> |     <x-slot name="buttons"> | ||||||
|         @can('create-common-dashboards') |         @can('create-common-dashboards') | ||||||
|             <x-link href="{{ route('dashboards.create') }}" kind="primary"> |             <x-link href="{{ route('dashboards.create') }}" kind="primary" id="index-more-actions-new-dasboard"> | ||||||
|                 {{ trans('general.title.new', ['type' => trans_choice('general.dashboards', 1)]) }} |                 {{ trans('general.title.new', ['type' => trans_choice('general.dashboards', 1)]) }} | ||||||
|             </x-link> |             </x-link> | ||||||
|         @endcan |         @endcan | ||||||
|   | |||||||
| @@ -6,7 +6,7 @@ | |||||||
|     <x-slot name="title"> |     <x-slot name="title"> | ||||||
|         @if ($user_dashboards->count() > 1) |         @if ($user_dashboards->count() > 1) | ||||||
|             <div class="flex items-center relative cursor-pointer"> |             <div class="flex items-center relative cursor-pointer"> | ||||||
|                 <x-dropdown id="dashboard-list"> |                 <x-dropdown id="show-dashboard-list"> | ||||||
|                     <x-slot name="trigger" class="flex items-center" override="class"> |                     <x-slot name="trigger" class="flex items-center" override="class"> | ||||||
|                         <span class="text-2xl xl:text-5xl text-black font-light truncate"> |                         <span class="text-2xl xl:text-5xl text-black font-light truncate"> | ||||||
|                             <x-button.hover color="to-black-700"> |                             <x-button.hover color="to-black-700"> | ||||||
| @@ -20,7 +20,7 @@ | |||||||
|                     </x-slot> |                     </x-slot> | ||||||
|  |  | ||||||
|                     @foreach ($user_dashboards as $user_dashboard) |                     @foreach ($user_dashboards as $user_dashboard) | ||||||
|                         <x-dropdown.link href="{{ route('dashboards.switch', $user_dashboard->id) }}"> |                         <x-dropdown.link href="{{ route('dashboards.switch', $user_dashboard->id) }}" id="show-dashboard-switch-{{ $user_dashboard->id }}"> | ||||||
|                             {{ $user_dashboard->name }} |                             {{ $user_dashboard->name }} | ||||||
|                         </x-dropdown.link> |                         </x-dropdown.link> | ||||||
|                     @endforeach |                     @endforeach | ||||||
| @@ -100,9 +100,9 @@ | |||||||
|     @section('dashboard_action') |     @section('dashboard_action') | ||||||
|         @canany(['create-common-widgets', 'read-common-dashboards']) |         @canany(['create-common-widgets', 'read-common-dashboards']) | ||||||
|             <div class="dashboard-action"> |             <div class="dashboard-action"> | ||||||
|                 <x-dropdown id="dropdown-dashboard-company"> |                 <x-dropdown id="show-more-actions-dashboard"> | ||||||
|                     <x-slot name="trigger" class="flex" override="class"> |                     <x-slot name="trigger" class="flex" override="class"> | ||||||
|                         <span id="dashboard-more-actions" class="w-8 h-8 flex items-center justify-center px-2 py-2 ltr:ml-2 rtl:mr-2 hover:bg-gray-100 rounded-xl text-purple text-sm font-medium leading-6"> |                         <span class="w-8 h-8 flex items-center justify-center px-2 py-2 ltr:ml-2 rtl:mr-2 hover:bg-gray-100 rounded-xl text-purple text-sm font-medium leading-6"> | ||||||
|                             <span class="material-icons">more_vert</span> |                             <span class="material-icons">more_vert</span> | ||||||
|                         </span> |                         </span> | ||||||
|                     </x-slot> |                     </x-slot> | ||||||
| @@ -110,7 +110,7 @@ | |||||||
|                     @can('create-common-widgets') |                     @can('create-common-widgets') | ||||||
|                         <x-button |                         <x-button | ||||||
|                             type="button" |                             type="button" | ||||||
|                             id="dashboard-add-widget" |                             id="show-more-actions-add-widget" | ||||||
|                             class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap" |                             class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap" | ||||||
|                             override="class" |                             override="class" | ||||||
|                             title="{{ trans('general.title.add', ['type' => trans_choice('general.widgets', 1)]) }}" |                             title="{{ trans('general.title.add', ['type' => trans_choice('general.widgets', 1)]) }}" | ||||||
| @@ -126,12 +126,12 @@ | |||||||
|  |  | ||||||
|                     @can('update-common-dashboards') |                     @can('update-common-dashboards') | ||||||
|                         @can('create-common-dashboards') |                         @can('create-common-dashboards') | ||||||
|                         <x-dropdown.link href="{{ route('dashboards.create') }}"> |                         <x-dropdown.link href="{{ route('dashboards.create') }}" id="show-more-actions-new-dashboard"> | ||||||
|                             {{ trans('general.title.create', ['type' => trans_choice('general.dashboards', 1)]) }} |                             {{ trans('general.title.create', ['type' => trans_choice('general.dashboards', 1)]) }} | ||||||
|                         </x-dropdown.link> |                         </x-dropdown.link> | ||||||
|                         @endcan |                         @endcan | ||||||
|  |  | ||||||
|                         <x-dropdown.link href="{{ route('dashboards.index') }}"> |                         <x-dropdown.link href="{{ route('dashboards.index') }}" id="show-more-actions-manage-dashboards"> | ||||||
|                             {{ trans('general.title.manage', ['type' => trans_choice('general.dashboards', 2)]) }} |                             {{ trans('general.title.manage', ['type' => trans_choice('general.dashboards', 2)]) }} | ||||||
|                         </x-dropdown.link> |                         </x-dropdown.link> | ||||||
|                     @endcan |                     @endcan | ||||||
|   | |||||||
| @@ -9,7 +9,7 @@ | |||||||
|  |  | ||||||
|     <x-slot name="buttons"> |     <x-slot name="buttons"> | ||||||
|         @can('create-common-items') |         @can('create-common-items') | ||||||
|             <x-link href="{{ route('items.create') }}" kind="primary"> |             <x-link href="{{ route('items.create') }}" kind="primary" id="index-more-actions-new-item"> | ||||||
|                 {{ trans('general.title.new', ['type' => trans_choice('general.items', 1)]) }} |                 {{ trans('general.title.new', ['type' => trans_choice('general.items', 1)]) }} | ||||||
|             </x-link> |             </x-link> | ||||||
|         @endcan |         @endcan | ||||||
| @@ -22,12 +22,12 @@ | |||||||
|             </x-slot> |             </x-slot> | ||||||
|  |  | ||||||
|             @can('create-common-items') |             @can('create-common-items') | ||||||
|                 <x-dropdown.link href="{{ route('import.create', ['common', 'items']) }}"> |                 <x-dropdown.link href="{{ route('import.create', ['common', 'items']) }}" id="index-more-actions-import-item"> | ||||||
|                     {{ trans('import.import') }} |                     {{ trans('import.import') }} | ||||||
|                 </x-dropdown.link> |                 </x-dropdown.link> | ||||||
|             @endcan |             @endcan | ||||||
|  |  | ||||||
|             <x-dropdown.link href="{{ route('items.export', request()->input()) }}"> |             <x-dropdown.link href="{{ route('items.export', request()->input()) }}" id="index-more-actions-export-item"> | ||||||
|                 {{ trans('general.export') }} |                 {{ trans('general.export') }} | ||||||
|             </x-dropdown.link> |             </x-dropdown.link> | ||||||
|         </x-dropdown> |         </x-dropdown> | ||||||
|   | |||||||
| @@ -55,10 +55,10 @@ | |||||||
|                             </div> |                             </div> | ||||||
|  |  | ||||||
|                             <div class="flex items-start ltr:space-x-2 rtl:space-x-reverse"> |                             <div class="flex items-start ltr:space-x-2 rtl:space-x-reverse"> | ||||||
|                                 <livewire:report.pin :categories="$categories" :report-id="$report->id" /> |                                 <livewire:report.pin :categories="$categories" :report="$report" /> | ||||||
|  |  | ||||||
|                                 @canany(['create-common-reports', 'update-common-reports', 'delete-common-reports']) |                                 @canany(['create-common-reports', 'update-common-reports', 'delete-common-reports']) | ||||||
|                                 <x-dropdown id="widget-{{ $category_id }}-{{ $report->id }}"> |                                 <x-dropdown id="index-line-actions-report-{{ $category_id }}-{{ $report->id }}"> | ||||||
|                                     <x-slot name="trigger" class="flex" override="class"> |                                     <x-slot name="trigger" class="flex" override="class"> | ||||||
|                                         <span class="w-8 h-8 flex items-center justify-center px-2 py-2 rtl:mr-4 hover:bg-gray-100 rounded-xl text-purple text-sm font-medium leading-6"> |                                         <span class="w-8 h-8 flex items-center justify-center px-2 py-2 rtl:mr-4 hover:bg-gray-100 rounded-xl text-purple text-sm font-medium leading-6"> | ||||||
|                                             <span class="material-icons">more_vert</span> |                                             <span class="material-icons">more_vert</span> | ||||||
| @@ -66,13 +66,13 @@ | |||||||
|                                     </x-slot> |                                     </x-slot> | ||||||
|  |  | ||||||
|                                     @can('update-common-reports') |                                     @can('update-common-reports') | ||||||
|                                         <x-dropdown.link href="{{ route('reports.edit', $report->id) }}"> |                                         <x-dropdown.link href="{{ route('reports.edit', $report->id) }}" id="index-line-actions-edit-report-{{ $report->id }}"> | ||||||
|                                             {{ trans('general.edit') }} |                                             {{ trans('general.edit') }} | ||||||
|                                         </x-dropdown.link> |                                         </x-dropdown.link> | ||||||
|                                     @endcan |                                     @endcan | ||||||
|  |  | ||||||
|                                     @can('create-common-reports') |                                     @can('create-common-reports') | ||||||
|                                         <x-dropdown.link href="{{ route('reports.duplicate', $report->id) }}"> |                                         <x-dropdown.link href="{{ route('reports.duplicate', $report->id) }}" id="index-line-actions-duplicate-report-{{ $report->id }}"> | ||||||
|                                             {{ trans('general.duplicate') }} |                                             {{ trans('general.duplicate') }} | ||||||
|                                         </x-dropdown.link> |                                         </x-dropdown.link> | ||||||
|                                     @endcan |                                     @endcan | ||||||
|   | |||||||
| @@ -1,14 +1,14 @@ | |||||||
| @if ($checkPermissionCreate) | @if ($checkPermissionCreate) | ||||||
|     @can($permissionCreate) |     @can($permissionCreate) | ||||||
|         @if (! $hideCreate) |         @if (! $hideCreate) | ||||||
|             <x-link href="{{ route($createRoute) }}" kind="primary"> |             <x-link href="{{ route($createRoute) }}" kind="primary" id="index-more-actions-new-{{ $type }}"> | ||||||
|                 {{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }} |                 {{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }} | ||||||
|             </x-link> |             </x-link> | ||||||
|         @endif |         @endif | ||||||
|     @endcan |     @endcan | ||||||
| @else | @else | ||||||
|     @if (! $hideCreate) |     @if (! $hideCreate) | ||||||
|         <x-link href="{{ route($createRoute) }}" kind="primary"> |         <x-link href="{{ route($createRoute) }}" kind="primary" id="index-more-actions-new-{{ $type }}"> | ||||||
|             {{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }} |             {{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }} | ||||||
|         </x-link> |         </x-link> | ||||||
|     @endif |     @endif | ||||||
|   | |||||||
| @@ -6,21 +6,21 @@ | |||||||
|     @if ($checkPermissionCreate) |     @if ($checkPermissionCreate) | ||||||
|         @can($permissionCreate) |         @can($permissionCreate) | ||||||
|             @if (! $hideImport) |             @if (! $hideImport) | ||||||
|                 <x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}"> |                 <x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}" id="index-more-actions-import-{{ $type }}"> | ||||||
|                     {{ trans('import.import') }} |                     {{ trans('import.import') }} | ||||||
|                 </x-dropdown.link> |                 </x-dropdown.link> | ||||||
|             @endif |             @endif | ||||||
|         @endcan |         @endcan | ||||||
|     @else |     @else | ||||||
|         @if (! $hideImport) |         @if (! $hideImport) | ||||||
|             <x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}"> |             <x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}" id="index-more-actions-import-{{ $type }}"> | ||||||
|                 {{ trans('import.import') }} |                 {{ trans('import.import') }} | ||||||
|             </x-dropdown.link> |             </x-dropdown.link> | ||||||
|         @endif |         @endif | ||||||
|     @endif |     @endif | ||||||
|  |  | ||||||
|     @if (! $hideExport) |     @if (! $hideExport) | ||||||
|         <x-dropdown.link href="{{ route($exportRoute, request()->input()) }}"> |         <x-dropdown.link href="{{ route($exportRoute, request()->input()) }}" id="index-more-actions-export-{{ $type }}"> | ||||||
|             {{ trans('general.export') }} |             {{ trans('general.export') }} | ||||||
|         </x-dropdown.link> |         </x-dropdown.link> | ||||||
|     @endif |     @endif | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| @stack('new_button_start') | @stack('new_button_start') | ||||||
|  |  | ||||||
| @if (! $hideNewDropdown) | @if (! $hideNewDropdown) | ||||||
|     <x-dropdown id="customer-new"> |     <x-dropdown id="show-new-actions-{{ $contact->type }}"> | ||||||
|         <x-slot name="trigger" class="flex items-center px-3 py-1.5 mb-3 sm:mb-0 bg-green hover:bg-green-700 rounded-xl text-white text-sm font-bold leading-6" override="class"> |         <x-slot name="trigger" class="flex items-center px-3 py-1.5 mb-3 sm:mb-0 bg-green hover:bg-green-700 rounded-xl text-white text-sm font-bold leading-6" override="class"> | ||||||
|             {{ trans('general.new_more') }} |             {{ trans('general.new_more') }} | ||||||
|             <span class="material-icons ltr:ml-2 rtl:mr-2">expand_more</span> |             <span class="material-icons ltr:ml-2 rtl:mr-2">expand_more</span> | ||||||
| @@ -11,7 +11,7 @@ | |||||||
|  |  | ||||||
|         @if (! $hideButtonDocument) |         @if (! $hideButtonDocument) | ||||||
|             @can($permissionCreateDocument) |             @can($permissionCreateDocument) | ||||||
|                 <x-dropdown.link href="{{ route($routeButtonDocument, $contact->id) }}"> |                 <x-dropdown.link href="{{ route($routeButtonDocument, $contact->id) }}" id="show-more-actions-new-document-{{ $contact->type }}"> | ||||||
|                     {{ trans_choice($textDocument, 1) }} |                     {{ trans_choice($textDocument, 1) }} | ||||||
|                 </x-dropdown.link> |                 </x-dropdown.link> | ||||||
|             @endcan |             @endcan | ||||||
| @@ -21,7 +21,7 @@ | |||||||
|  |  | ||||||
|         @if (! $hideButtonTransaction) |         @if (! $hideButtonTransaction) | ||||||
|             @can($permissionCreateTransaction) |             @can($permissionCreateTransaction) | ||||||
|                 <x-dropdown.link href="{{ route($routeButtonTransaction, $contact->id) }}"> |                 <x-dropdown.link href="{{ route($routeButtonTransaction, $contact->id) }}" id="show-more-actions-new-transaction-{{ $contact->type }}"> | ||||||
|                     {{ trans_choice($textTransaction, 1) }} |                     {{ trans_choice($textTransaction, 1) }} | ||||||
|                 </x-dropdown.link> |                 </x-dropdown.link> | ||||||
|             @endcan |             @endcan | ||||||
| @@ -35,7 +35,7 @@ | |||||||
|  |  | ||||||
| @if (! $hideButtonEdit) | @if (! $hideButtonEdit) | ||||||
|     @can($permissionUpdate) |     @can($permissionUpdate) | ||||||
|         <x-link href="{{ route($routeButtonEdit, $contact->id) }}"> |         <x-link href="{{ route($routeButtonEdit, $contact->id) }}" id="show-more-actions-edit-{{ $contact->type }}"> | ||||||
|             {{ trans('general.edit') }} |             {{ trans('general.edit') }} | ||||||
|         </x-link> |         </x-link> | ||||||
|     @endcan |     @endcan | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| @stack('button_group_start') | @stack('button_group_start') | ||||||
|  |  | ||||||
| @if (! $hideActionsDropdown) | @if (! $hideActionsDropdown) | ||||||
|     <x-dropdown id="dropdown-more-actions"> |     <x-dropdown id="show-more-actions-{{ $contact->type }}"> | ||||||
|         <x-slot name="trigger"> |         <x-slot name="trigger"> | ||||||
|             <span class="material-icons">more_horiz</span> |             <span class="material-icons">more_horiz</span> | ||||||
|         </x-slot> |         </x-slot> | ||||||
| @@ -10,7 +10,7 @@ | |||||||
|  |  | ||||||
|         @if (! $hideButtonDuplicate) |         @if (! $hideButtonDuplicate) | ||||||
|             @can($permissionCreate) |             @can($permissionCreate) | ||||||
|                 <x-dropdown.link href="{{ route($routeButtonDuplicate, $contact->id) }}"> |                 <x-dropdown.link href="{{ route($routeButtonDuplicate, $contact->id) }}" id="show-more-actions-duplicate-{{ $contact->type }}"> | ||||||
|                     {{ trans('general.duplicate') }} |                     {{ trans('general.duplicate') }} | ||||||
|                 </x-dropdown.link> |                 </x-dropdown.link> | ||||||
|             @endcan |             @endcan | ||||||
|   | |||||||
| @@ -1,14 +1,14 @@ | |||||||
| @if ($checkPermissionCreate) | @if ($checkPermissionCreate) | ||||||
|     @can($permissionCreate) |     @can($permissionCreate) | ||||||
|         @if (! $hideCreate) |         @if (! $hideCreate) | ||||||
|             <x-link href="{{ route($createRoute) }}" kind="primary"> |             <x-link href="{{ route($createRoute) }}" kind="primary" id="index-more-actions-new-{{ $type }}"> | ||||||
|                 {{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }} |                 {{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }} | ||||||
|             </x-link> |             </x-link> | ||||||
|         @endif |         @endif | ||||||
|     @endcan |     @endcan | ||||||
| @else | @else | ||||||
|     @if (! $hideCreate) |     @if (! $hideCreate) | ||||||
|         <x-link href="{{ route($createRoute) }}" kind="primary"> |         <x-link href="{{ route($createRoute) }}" kind="primary" id="index-more-actions-new-{{ $type }}"> | ||||||
|             {{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }} |             {{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }} | ||||||
|         </x-link> |         </x-link> | ||||||
|     @endif |     @endif | ||||||
|   | |||||||
| @@ -6,21 +6,21 @@ | |||||||
|     @if ($checkPermissionCreate) |     @if ($checkPermissionCreate) | ||||||
|         @can($permissionCreate) |         @can($permissionCreate) | ||||||
|             @if (! $hideImport) |             @if (! $hideImport) | ||||||
|                 <x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}"> |                 <x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}" id="index-more-actions-import-{{ $type }}"> | ||||||
|                     {{ trans('import.import') }} |                     {{ trans('import.import') }} | ||||||
|                 </x-dropdown.link> |                 </x-dropdown.link> | ||||||
|             @endif |             @endif | ||||||
|         @endcan |         @endcan | ||||||
|     @else |     @else | ||||||
|         @if (! $hideImport) |         @if (! $hideImport) | ||||||
|             <x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}"> |             <x-dropdown.link href="{{ route($importRoute, $importRouteParameters) }}" id="index-more-actions-import-{{ $type }}"> | ||||||
|                 {{ trans('import.import') }} |                 {{ trans('import.import') }} | ||||||
|             </x-dropdown.link> |             </x-dropdown.link> | ||||||
|         @endif |         @endif | ||||||
|     @endif |     @endif | ||||||
|  |  | ||||||
|     @if (! $hideExport) |     @if (! $hideExport) | ||||||
|         <x-dropdown.link href="{{ route($exportRoute, request()->input()) }}"> |         <x-dropdown.link href="{{ route($exportRoute, request()->input()) }}" id="index-more-actions-export-{{ $type }}"> | ||||||
|             {{ trans('general.export') }} |             {{ trans('general.export') }} | ||||||
|         </x-dropdown.link> |         </x-dropdown.link> | ||||||
|     @endif |     @endif | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
| @if (! $hideCreate) | @if (! $hideCreate) | ||||||
|     @can($permissionCreate) |     @can($permissionCreate) | ||||||
|         <x-link href="{{ route($createRoute) }}" kind="primary"> |         <x-link href="{{ route($createRoute) }}" kind="primary" id="show-more-actions-new-{{ $document->type }}"> | ||||||
|             {{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }} |             {{ trans('general.title.new', ['type' => trans_choice($textPage, 1)]) }} | ||||||
|         </x-link> |         </x-link> | ||||||
|     @endcan |     @endcan | ||||||
| @@ -13,7 +13,7 @@ | |||||||
| @if (! in_array($document->status, $hideButtonStatuses)) | @if (! in_array($document->status, $hideButtonStatuses)) | ||||||
|     @if (! $hideEdit) |     @if (! $hideEdit) | ||||||
|         @can($permissionUpdate) |         @can($permissionUpdate) | ||||||
|             <x-link href="{{ route($editRoute, $document->id) }}"> |             <x-link href="{{ route($editRoute, $document->id) }}" id="show-more-actions-edit-{{ $document->type }}"> | ||||||
|                 {{ trans('general.edit') }} |                 {{ trans('general.edit') }} | ||||||
|             </x-link> |             </x-link> | ||||||
|         @endcan |         @endcan | ||||||
|   | |||||||
| @@ -11,7 +11,7 @@ | |||||||
|  |  | ||||||
|     <x-slot name="body"> |     <x-slot name="body"> | ||||||
|         <div class="flex"> |         <div class="flex"> | ||||||
|             <x-link href="{{ route($editRoute, $document->id) }}" @click="e => e.target.classList.add('disabled')"> |             <x-link href="{{ route($editRoute, $document->id) }}" id="show-slider-actions-edit-{{ $document->type }}" @click="e => e.target.classList.add('disabled')"> | ||||||
|                 {{ trans('general.edit') }} |                 {{ trans('general.edit') }} | ||||||
|             </x-link> |             </x-link> | ||||||
|         </div> |         </div> | ||||||
|   | |||||||
| @@ -14,7 +14,7 @@ | |||||||
|                 @if (empty($document->transactions->count()) || (! empty($document->transactions->count()) && $document->paid != $document->amount)) |                 @if (empty($document->transactions->count()) || (! empty($document->transactions->count()) && $document->paid != $document->amount)) | ||||||
|                     <x-button |                     <x-button | ||||||
|                         @click="onPayment" |                         @click="onPayment" | ||||||
|                         id="button-payment" |                         id="show-slider-actions-payment-{{ $document->type }}" | ||||||
|                         class="px-3 py-1.5 mb-3 sm:mb-0 rounded-lg text-xs font-medium leading-6 bg-green hover:bg-green-700 text-white disabled:bg-green-100" |                         class="px-3 py-1.5 mb-3 sm:mb-0 rounded-lg text-xs font-medium leading-6 bg-green hover:bg-green-700 text-white disabled:bg-green-100" | ||||||
|                         override="class" |                         override="class" | ||||||
|                     > |                     > | ||||||
| @@ -32,6 +32,7 @@ | |||||||
|                         'utm_medium' => 'app', |                         'utm_medium' => 'app', | ||||||
|                         'utm_campaign' => 'payment_method', |                         'utm_campaign' => 'payment_method', | ||||||
|                     ]) }}" |                     ]) }}" | ||||||
|  |                     id="show-slider-actions-online-payment-{{ $document->type }}" | ||||||
|                     override="class" |                     override="class" | ||||||
|                     class="py-1.5 mb-3 sm:mb-0 text-xs bg-transparent hover:bg-transparent font-medium leading-6" |                     class="py-1.5 mb-3 sm:mb-0 text-xs bg-transparent hover:bg-transparent font-medium leading-6" | ||||||
|                 > |                 > | ||||||
| @@ -61,7 +62,7 @@ | |||||||
|                         </br> |                         </br> | ||||||
|  |  | ||||||
|                         @if (! empty($transaction->contact) && $transaction->contact->email) |                         @if (! empty($transaction->contact) && $transaction->contact->email) | ||||||
|                             <x-button id="button-email-send" class="text-purple mt-1" override="class" @click="onEmailViaTemplate('{{ route($transactionEmailRoute, $transaction->id) }}', '{{ $transactionEmailTemplate }}')"> |                             <x-button id="show-slider-actions-transaction-send-email-{{ $document->type }}-{{ $transaction->id }}" class="text-purple mt-1" override="class" @click="onEmailViaTemplate('{{ route($transactionEmailRoute, $transaction->id) }}', '{{ $transactionEmailTemplate }}')"> | ||||||
|                                 <x-button.hover color="to-purple"> |                                 <x-button.hover color="to-purple"> | ||||||
|                                     {{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }} |                                     {{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }} | ||||||
|                                 </x-button.hover> |                                 </x-button.hover> | ||||||
| @@ -80,7 +81,7 @@ | |||||||
|  |  | ||||||
|                         <x-button |                         <x-button | ||||||
|                             @click="onEditPayment('{{ $transaction->id }}')" |                             @click="onEditPayment('{{ $transaction->id }}')" | ||||||
|                             id="button-edit-payment" |                             id="show-slider-actions-transaction-edit-{{ $document->type }}-{{ $transaction->id }}" | ||||||
|                             class="text-purple mt-1" |                             class="text-purple mt-1" | ||||||
|                             override="class" |                             override="class" | ||||||
|                         > |                         > | ||||||
|   | |||||||
| @@ -14,7 +14,7 @@ | |||||||
|                 @if(empty($document->transactions->count()) || (! empty($document->transactions->count()) && $document->paid != $document->amount)) |                 @if(empty($document->transactions->count()) || (! empty($document->transactions->count()) && $document->paid != $document->amount)) | ||||||
|                     <x-button |                     <x-button | ||||||
|                         @click="onPayment" |                         @click="onPayment" | ||||||
|                         id="button-payment" |                         id="show-slider-actions-payment-{{ $document->type }}" | ||||||
|                         class="px-3 py-1.5 mb-3 sm:mb-0 rounded-lg text-xs font-medium leading-6 bg-green hover:bg-green-700 text-white disabled:bg-green-100" |                         class="px-3 py-1.5 mb-3 sm:mb-0 rounded-lg text-xs font-medium leading-6 bg-green hover:bg-green-700 text-white disabled:bg-green-100" | ||||||
|                         override="class" |                         override="class" | ||||||
|                     > |                     > | ||||||
| @@ -45,7 +45,7 @@ | |||||||
|                         </br> |                         </br> | ||||||
|  |  | ||||||
|                         @if (! empty($transaction->contact) && $transaction->contact->email) |                         @if (! empty($transaction->contact) && $transaction->contact->email) | ||||||
|                             <x-button id="button-email-send" class="text-purple mt-1" override="class" @click="onEmailViaTemplate('{{ route($transactionEmailRoute, $transaction->id) }}', '{{ $transactionEmailTemplate }}')"> |                             <x-button id="show-slider-actions-transaction-send-email-{{ $document->type }}-{{ $transaction->id }}" class="text-purple mt-1" override="class" @click="onEmailViaTemplate('{{ route($transactionEmailRoute, $transaction->id) }}', '{{ $transactionEmailTemplate }}')"> | ||||||
|                                 <x-button.hover color="to-purple"> |                                 <x-button.hover color="to-purple"> | ||||||
|                                     {{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }} |                                     {{ trans('general.title.send', ['type' => trans_choice('general.receipts', 1)]) }} | ||||||
|                                 </x-button.hover> |                                 </x-button.hover> | ||||||
| @@ -64,7 +64,7 @@ | |||||||
|  |  | ||||||
|                         <x-button |                         <x-button | ||||||
|                             @click="onEditPayment('{{ $transaction->id }}')" |                             @click="onEditPayment('{{ $transaction->id }}')" | ||||||
|                             id="button-edit-payment" |                             id="show-slider-actions-transaction-edit-{{ $document->type }}-{{ $transaction->id }}" | ||||||
|                             class="text-purple mt-1" |                             class="text-purple mt-1" | ||||||
|                             override="class" |                             override="class" | ||||||
|                         > |                         > | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| @stack('button_group_start') | @stack('button_group_start') | ||||||
|  |  | ||||||
| @if (! $hideMoreActions) | @if (! $hideMoreActions) | ||||||
|     <x-dropdown id="dropdown-more-actions"> |     <x-dropdown id="show-more-actions-{{ $document->type }}"> | ||||||
|         <x-slot name="trigger"> |         <x-slot name="trigger"> | ||||||
|             <span class="material-icons">more_horiz</span> |             <span class="material-icons">more_horiz</span> | ||||||
|         </x-slot> |         </x-slot> | ||||||
| @@ -12,7 +12,7 @@ | |||||||
|  |  | ||||||
|         @if (! $hideDuplicate) |         @if (! $hideDuplicate) | ||||||
|             @can($permissionCreate) |             @can($permissionCreate) | ||||||
|                 <x-dropdown.link href="{{ route($duplicateRoute, $document->id) }}"> |                 <x-dropdown.link href="{{ route($duplicateRoute, $document->id) }}" id="show-more-actions-duplicate-{{ $document->type }}"> | ||||||
|                     {{ trans('general.duplicate') }} |                     {{ trans('general.duplicate') }} | ||||||
|                 </x-dropdown.link> |                 </x-dropdown.link> | ||||||
|             @endcan |             @endcan | ||||||
| @@ -27,25 +27,17 @@ | |||||||
|         @stack('button_print_start') |         @stack('button_print_start') | ||||||
|  |  | ||||||
|         @if (! $hidePrint) |         @if (! $hidePrint) | ||||||
|             @if ($checkCancelled) |             <x-dropdown.link href="{{ route($printRoute, $document->id) }}" target="_blank" id="show-more-actions-print-{{ $document->type }}"> | ||||||
|                 @if ($document->status != 'cancelled') |  | ||||||
|                     <x-dropdown.link href="{{ route($printRoute, $document->id) }}" target="_blank"> |  | ||||||
|                 {{ trans('general.print') }} |                 {{ trans('general.print') }} | ||||||
|             </x-dropdown.link> |             </x-dropdown.link> | ||||||
|         @endif |         @endif | ||||||
|             @else |  | ||||||
|                 <x-dropdown.link href="{{ route($printRoute, $document->id) }}" target="_blank"> |  | ||||||
|                     {{ trans('general.print') }} |  | ||||||
|                 </x-dropdown.link> |  | ||||||
|             @endif |  | ||||||
|         @endif |  | ||||||
|  |  | ||||||
|         @stack('button_print_end') |         @stack('button_print_end') | ||||||
|  |  | ||||||
|         @stack('button_pdf_start') |         @stack('button_pdf_start') | ||||||
|  |  | ||||||
|         @if (! $hidePdf) |         @if (! $hidePdf) | ||||||
|             <x-dropdown.link href="{{ route($pdfRoute, $document->id) }}"> |             <x-dropdown.link href="{{ route($pdfRoute, $document->id) }}" id="show-more-actions-pdf-{{ $document->type }}"> | ||||||
|                 {{ trans('general.download_pdf') }} |                 {{ trans('general.download_pdf') }} | ||||||
|             </x-dropdown.link> |             </x-dropdown.link> | ||||||
|         @endif |         @endif | ||||||
| @@ -61,7 +53,7 @@ | |||||||
|  |  | ||||||
|             @if (! $hideShare) |             @if (! $hideShare) | ||||||
|                 @if ($document->status != 'cancelled') |                 @if ($document->status != 'cancelled') | ||||||
|                     <x-dropdown.button @click="onShareLink('{{ route($shareRoute, $document->id) }}')"> |                     <x-dropdown.button id="show-more-actions-share-link-{{ $document->type }}" @click="onShareLink('{{ route($shareRoute, $document->id) }}')"> | ||||||
|                         {{ trans('general.share_link') }} |                         {{ trans('general.share_link') }} | ||||||
|                     </x-dropdown.button> |                     </x-dropdown.button> | ||||||
|                 @endif |                 @endif | ||||||
| @@ -73,7 +65,7 @@ | |||||||
|  |  | ||||||
|             @if (! $hideEmail) |             @if (! $hideEmail) | ||||||
|                 @if ($document->contact_email) |                 @if ($document->contact_email) | ||||||
|                     <x-dropdown.button @click="onEmail('{{ route($emailRoute, $document->id) }}')"> |                     <x-dropdown.button id="show-more-actions-send-email-{{ $document->type }}" @click="onEmail('{{ route($emailRoute, $document->id) }}')"> | ||||||
|                         {{ trans($textEmail) }} |                         {{ trans($textEmail) }} | ||||||
|                     </x-dropdown.button> |                     </x-dropdown.button> | ||||||
|                 @else |                 @else | ||||||
| @@ -88,26 +80,6 @@ | |||||||
|  |  | ||||||
|         @stack('share_button_end') |         @stack('share_button_end') | ||||||
|  |  | ||||||
|         @stack('button_cancelled_start') |  | ||||||
|  |  | ||||||
|         @if (! $hideCancel) |  | ||||||
|             @can($permissionUpdate) |  | ||||||
|                 @if ($checkCancelled) |  | ||||||
|                     @if ($document->status != 'cancelled') |  | ||||||
|                         <x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}"> |  | ||||||
|                             {{ trans('general.cancel') }} |  | ||||||
|                         </x-dropdown.link> |  | ||||||
|                     @endif |  | ||||||
|                 @else |  | ||||||
|                     <x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}"> |  | ||||||
|                         {{ trans('general.cancel') }} |  | ||||||
|                     </x-dropdown.link> |  | ||||||
|                 @endif |  | ||||||
|             @endcan |  | ||||||
|         @endif |  | ||||||
|  |  | ||||||
|         @stack('button_cancelled_end') |  | ||||||
|  |  | ||||||
|         @if (! $hideDivider3) |         @if (! $hideDivider3) | ||||||
|             <x-dropdown.divider /> |             <x-dropdown.divider /> | ||||||
|         @endif |         @endif | ||||||
| @@ -116,7 +88,7 @@ | |||||||
|  |  | ||||||
|         @if (! $hideCustomize) |         @if (! $hideCustomize) | ||||||
|             @can($permissionCustomize) |             @can($permissionCustomize) | ||||||
|                 <x-dropdown.link href="{{ route($customizeRoute) }}"> |                 <x-dropdown.link href="{{ route($customizeRoute) }}" id="show-more-actions-customize-{{ $document->type }}"> | ||||||
|                     {{ trans('general.customize') }} |                     {{ trans('general.customize') }} | ||||||
|                 </x-dropdown.link> |                 </x-dropdown.link> | ||||||
|             @endcan |             @endcan | ||||||
| @@ -127,13 +99,35 @@ | |||||||
|         @stack('end_button_start') |         @stack('end_button_start') | ||||||
|  |  | ||||||
|         @if (! $hideEnd && $document->recurring) |         @if (! $hideEnd && $document->recurring) | ||||||
|             <x-dropdown.link href="{{ route($endRoute, $document->id) }}"> |             <x-dropdown.link href="{{ route($endRoute, $document->id) }}" id="show-more-actions-end-{{ $document->type }}"> | ||||||
|                 {{ trans('recurring.end') }} |                 {{ trans('recurring.end') }} | ||||||
|             </x-dropdown.link> |             </x-dropdown.link> | ||||||
|         @endif |         @endif | ||||||
|  |  | ||||||
|         @stack('end_button_end') |         @stack('end_button_end') | ||||||
|  |  | ||||||
|  |         @stack('button_cancelled_start') | ||||||
|  |  | ||||||
|  |         @if (! $hideCancel) | ||||||
|  |             @can($permissionUpdate) | ||||||
|  |                 <x-dropdown.divider /> | ||||||
|  |  | ||||||
|  |                 @if ($checkCancelled) | ||||||
|  |                     @if ($document->status != 'cancelled') | ||||||
|  |                         <x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}" id="show-more-actions-cancel-{{ $document->type }}"> | ||||||
|  |                             {{ trans('general.cancel') }} | ||||||
|  |                         </x-dropdown.link> | ||||||
|  |                     @endif | ||||||
|  |                 @else | ||||||
|  |                     <x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}" id="show-more-actions-cancel-{{ $document->type }}"> | ||||||
|  |                         {{ trans('general.cancel') }} | ||||||
|  |                     </x-dropdown.link> | ||||||
|  |                 @endif | ||||||
|  |             @endcan | ||||||
|  |         @endif | ||||||
|  |  | ||||||
|  |         @stack('button_cancelled_end') | ||||||
|  |  | ||||||
|         @if (! $hideDivider4) |         @if (! $hideDivider4) | ||||||
|             <x-dropdown.divider /> |             <x-dropdown.divider /> | ||||||
|         @endif |         @endif | ||||||
|   | |||||||
| @@ -14,7 +14,7 @@ | |||||||
|             @if (! $hideMarkReceived) |             @if (! $hideMarkReceived) | ||||||
|                 @can($permissionUpdate) |                 @can($permissionUpdate) | ||||||
|                     @if ($document->status == 'draft') |                     @if ($document->status == 'draft') | ||||||
|                         <x-link href="{{ route($markReceivedRoute, $document->id) }}" kind="secondary" @click="e => e.target.classList.add('disabled')"> |                         <x-link href="{{ route($markReceivedRoute, $document->id) }}" id="show-slider-actions-mark-received-{{ $document->type }}" kind="secondary" @click="e => e.target.classList.add('disabled')"> | ||||||
|                             {{ trans($textMarkReceived) }} |                             {{ trans($textMarkReceived) }} | ||||||
|                         </x-link> |                         </x-link> | ||||||
|                     @else |                     @else | ||||||
|   | |||||||
| @@ -13,7 +13,7 @@ | |||||||
|         <div class="flex flex-wrap space-x-3 rtl:space-x-reverse"> |         <div class="flex flex-wrap space-x-3 rtl:space-x-reverse"> | ||||||
|             @if (! $hideEmail) |             @if (! $hideEmail) | ||||||
|                 @if ($document->contact_email) |                 @if ($document->contact_email) | ||||||
|                     <x-button id="button-email-send" kind="secondary" @click="onEmail('{{ route($emailRoute, $document->id) }}')"> |                     <x-button id="show-slider-actions-send-email-{{ $document->type }}" kind="secondary" @click="onEmail('{{ route($emailRoute, $document->id) }}')"> | ||||||
|                         {{ trans($textEmail) }} |                         {{ trans($textEmail) }} | ||||||
|                     </x-button> |                     </x-button> | ||||||
|                 @else |                 @else | ||||||
| @@ -28,7 +28,7 @@ | |||||||
|             @if (! $hideMarkSent) |             @if (! $hideMarkSent) | ||||||
|                 @can($permissionUpdate) |                 @can($permissionUpdate) | ||||||
|                     @if ($document->status == 'draft') |                     @if ($document->status == 'draft') | ||||||
|                         <x-link href="{{ route($markSentRoute, $document->id) }}" @click="e => e.target.classList.add('disabled')"> |                         <x-link id="show-slider-actions-mark-sent-{{ $document->type }}" href="{{ route($markSentRoute, $document->id) }}" @click="e => e.target.classList.add('disabled')"> | ||||||
|                             {{ trans($textMarkSent) }} |                             {{ trans($textMarkSent) }} | ||||||
|                         </x-link> |                         </x-link> | ||||||
|                     @else |                     @else | ||||||
| @@ -41,7 +41,7 @@ | |||||||
|  |  | ||||||
|             @if (! $hideShare) |             @if (! $hideShare) | ||||||
|                 @if ($document->status != 'cancelled') |                 @if ($document->status != 'cancelled') | ||||||
|                     <x-button @click="onShareLink('{{ route($shareRoute, $document->id) }}')"> |                     <x-button id="show-slider-actions-share-link-{{ $document->type }}" @click="onShareLink('{{ route($shareRoute, $document->id) }}')"> | ||||||
|                         {{ trans('general.share_link') }} |                         {{ trans('general.share_link') }} | ||||||
|                     </x-button> |                     </x-button> | ||||||
|                 @endif |                 @endif | ||||||
|   | |||||||
| @@ -25,7 +25,7 @@ | |||||||
|                     <div> |                     <div> | ||||||
|                         <x-tooltip id="{{ $key }}" placement="top" message="{{ trans($action['name']) }}"> |                         <x-tooltip id="{{ $key }}" placement="top" message="{{ trans($action['name']) }}"> | ||||||
|                             <x-button @click="onChangeBulkAction('{{ $key }}')" |                             <x-button @click="onChangeBulkAction('{{ $key }}')" | ||||||
|                                 id="button-bulk-action-{{ $key }}" |                                 id="index-bulk-actions-{{ $key }}" | ||||||
|                                 class="relative w-8 h-8 flex items-center px-2 mr-2 rounded-lg hover:bg-gray-200" |                                 class="relative w-8 h-8 flex items-center px-2 mr-2 rounded-lg hover:bg-gray-200" | ||||||
|                                 override="class" |                                 override="class" | ||||||
|                                 data-message="{{ ! empty($action['message']) ? trans_choice($action['message'], 2, ['type' => strtolower(trans_choice($text, 2))]) : '' }}" |                                 data-message="{{ ! empty($action['message']) ? trans_choice($action['message'], 2, ['type' => strtolower(trans_choice($text, 2))]) : '' }}" | ||||||
| @@ -40,7 +40,7 @@ | |||||||
|                     <div> |                     <div> | ||||||
|                         <x-tooltip id="{{ $key }}" placement="top" message="{{ trans($action['name']) }}"> |                         <x-tooltip id="{{ $key }}" placement="top" message="{{ trans($action['name']) }}"> | ||||||
|                             <x-button @click="onChangeBulkAction('{{ $key }}')" |                             <x-button @click="onChangeBulkAction('{{ $key }}')" | ||||||
|                                 id="button-bulk-action-{{ $key }}" |                                 id="index-bulk-actions-{{ $key }}" | ||||||
|                                 class="w-8 h-8 flex items-center px-2 rounded-lg hover:bg-gray-200" |                                 class="w-8 h-8 flex items-center px-2 rounded-lg hover:bg-gray-200" | ||||||
|                                 override="class" |                                 override="class" | ||||||
|                                 data-message="{{ ! empty($action['message']) ? trans_choice($action['message'], 2, ['type' => strtolower(trans_choice($text, 2))]) : '' }}" |                                 data-message="{{ ! empty($action['message']) ? trans_choice($action['message'], 2, ['type' => strtolower(trans_choice($text, 2))]) : '' }}" | ||||||
|   | |||||||
| @@ -6,7 +6,9 @@ | |||||||
|             <div @class(['w-1/2 sm:w-1/3 text-center'])> |             <div @class(['w-1/2 sm:w-1/3 text-center'])> | ||||||
|                 @if (! empty($item['tooltip'])) |                 @if (! empty($item['tooltip'])) | ||||||
|                     <x-tooltip id="tooltip-summary-{{ $loop->index }}" placement="top" message="{!! $item['tooltip'] !!}"> |                     <x-tooltip id="tooltip-summary-{{ $loop->index }}" placement="top" message="{!! $item['tooltip'] !!}"> | ||||||
|  |                         @if (! empty($item['href'])) | ||||||
|                         <x-link href="{{ $item['href'] }}" class="group" override="class"> |                         <x-link href="{{ $item['href'] }}" class="group" override="class"> | ||||||
|  |                         @endif | ||||||
|                             @php $text_color = (! empty($item['text_color'])) ? $item['text_color'] : 'text-purple group-hover:text-purple-700'; @endphp |                             @php $text_color = (! empty($item['text_color'])) ? $item['text_color'] : 'text-purple group-hover:text-purple-700'; @endphp | ||||||
|                             <div @class(['relative text-xl sm:text-6xl', $text_color, 'mb-2'])> |                             <div @class(['relative text-xl sm:text-6xl', $text_color, 'mb-2'])> | ||||||
|                                 {!! $item['amount'] !!} |                                 {!! $item['amount'] !!} | ||||||
| @@ -16,10 +18,14 @@ | |||||||
|                             <span class="font-light mt-3"> |                             <span class="font-light mt-3"> | ||||||
|                                 {!! $item['title'] !!} |                                 {!! $item['title'] !!} | ||||||
|                             </span> |                             </span> | ||||||
|  |                         @if (! empty($item['href'])) | ||||||
|                         </x-link> |                         </x-link> | ||||||
|  |                         @endif | ||||||
|                     </x-tooltip> |                     </x-tooltip> | ||||||
|                 @else |                 @else | ||||||
|  |                     @if (! empty($item['href'])) | ||||||
|                     <x-link href="{{ $item['href'] }}" class="group" override="class"> |                     <x-link href="{{ $item['href'] }}" class="group" override="class"> | ||||||
|  |                     @endif | ||||||
|                         @php $text_color = (! empty($item['text_color'])) ? $item['text_color'] : 'text-purple group-hover:text-purple-700'; @endphp |                         @php $text_color = (! empty($item['text_color'])) ? $item['text_color'] : 'text-purple group-hover:text-purple-700'; @endphp | ||||||
|                         <div @class(['relative text-xl sm:text-6xl', $text_color, 'mb-2'])> |                         <div @class(['relative text-xl sm:text-6xl', $text_color, 'mb-2'])> | ||||||
|                             {!! $item['amount'] !!} |                             {!! $item['amount'] !!} | ||||||
| @@ -29,8 +35,10 @@ | |||||||
|                         <span class="font-light mt-3"> |                         <span class="font-light mt-3"> | ||||||
|                             {!! $item['title'] !!} |                             {!! $item['title'] !!} | ||||||
|                         </span> |                         </span> | ||||||
|  |                     @if (! empty($item['href'])) | ||||||
|                     </x-link> |                     </x-link> | ||||||
|                     @endif |                     @endif | ||||||
|  |                 @endif | ||||||
|             </div> |             </div> | ||||||
|         @endforeach |         @endforeach | ||||||
|     @else |     @else | ||||||
|   | |||||||
| @@ -1,6 +1,8 @@ | |||||||
| @stack('scripts_start') | @stack('scripts_start') | ||||||
|     <!-- Core --> |     <!-- Core --> | ||||||
|     <script src="{{ asset('public/vendor/js-cookie/js.cookie.js') }}"></script> |     <script src="{{ asset('public/vendor/js-cookie/js.cookie.js') }}"></script> | ||||||
|  |     <script type="text/javascript" src="{{ asset('public/akaunting-js/generalAction.js') }}"></script> | ||||||
|  |     <script type="text/javascript" src="{{ asset('public/akaunting-js/popper.js') }}"></script> | ||||||
|  |  | ||||||
|     <script type="text/javascript"> |     <script type="text/javascript"> | ||||||
|         var wizard_translations = {!! json_encode($translations) !!}; |         var wizard_translations = {!! json_encode($translations) !!}; | ||||||
|   | |||||||
| @@ -1,6 +1,7 @@ | |||||||
| @foreach($suggestions as $suggestion) | @foreach($suggestions as $suggestion) | ||||||
|     <x-link |     <x-link | ||||||
|         href="{{ url($suggestion->action_url) . '?' . http_build_query((array) $suggestion->action_parameters) }}" |         href="{{ url($suggestion->action_url) . '?' . http_build_query((array) $suggestion->action_parameters) }}" | ||||||
|  |         id="suggestion-{{ $suggestion->alias }}-{{ str_replace('.', '-', request()->route()->getName()) }}" | ||||||
|         class="px-3 py-1.5 mb-3 sm:mb-0 bg-gray-100 hover:bg-gray-200 rounded-xl text-sm font-medium leading-6" |         class="px-3 py-1.5 mb-3 sm:mb-0 bg-gray-100 hover:bg-gray-200 rounded-xl text-sm font-medium leading-6" | ||||||
|         target="{{ $suggestion->action_target }}" |         target="{{ $suggestion->action_target }}" | ||||||
|         override="class" |         override="class" | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  |  | ||||||
| @if (! $hideButtonAddNew) | @if (! $hideButtonAddNew) | ||||||
|     @can($permissionCreate) |     @can($permissionCreate) | ||||||
|         <x-link href="{{ route($routeButtonAddNew, ['type' => $type]) }}" kind="primary"> |         <x-link href="{{ route($routeButtonAddNew, ['type' => $type]) }}" kind="primary" id="show-more-actions-new-{{ $transaction->type }}"> | ||||||
|             {{ trans($textButtonAddNew) }} |             {{ trans($textButtonAddNew) }} | ||||||
|         </x-link> |         </x-link> | ||||||
|     @endcan |     @endcan | ||||||
| @@ -13,7 +13,7 @@ | |||||||
| @if (! $transaction->reconciled && $transaction->isNotTransferTransaction()) | @if (! $transaction->reconciled && $transaction->isNotTransferTransaction()) | ||||||
|     @if (! $hideButtonEdit) |     @if (! $hideButtonEdit) | ||||||
|         @can($permissionUpdate) |         @can($permissionUpdate) | ||||||
|             <x-link href="{{ route($routeButtonEdit, [$transaction->id, 'type' => $type]) }}"> |             <x-link href="{{ route($routeButtonEdit, [$transaction->id, 'type' => $type]) }}" id="show-more-actions-edit-{{ $transaction->type }}"> | ||||||
|                 {{ trans('general.edit') }} |                 {{ trans('general.edit') }} | ||||||
|             </x-link> |             </x-link> | ||||||
|         @endcan |         @endcan | ||||||
|   | |||||||
| @@ -15,14 +15,16 @@ | |||||||
|         </div> |         </div> | ||||||
|     </x-slot> |     </x-slot> | ||||||
|  |  | ||||||
|     <x-slot name="body"> |         <span class="material-icons absolute ltr:right-0 rtl:left-0 top-0 transition-all transform" x-bind:class="create === 1 ? 'rotate-180' : ''">expand_more</span> | ||||||
|  |     </button> | ||||||
|  |  | ||||||
|  |     <div class="overflow-hidden transition-transform origin-top-left ease-linear duration-100" | ||||||
|  |         x-ref="container1" | ||||||
|  |         x-bind:class="create == 1 ? 'h-auto ' : 'scale-y-0 h-0'" | ||||||
|  |     > | ||||||
|         @if ($transaction->isNotTransferTransaction()) |         @if ($transaction->isNotTransferTransaction()) | ||||||
|             <div class="flex my-3 space-x-2 rtl:space-x-reverse"> |             <div class="flex my-3 space-x-2 rtl:space-x-reverse"> | ||||||
|                 <x-link |                 <x-link href="{{ route($routeButtonEdit, [$transaction->id, 'type' => $transaction->type]) }}" id="show-slider-actions-edit-{{ $transaction->type }}" class="px-3 py-1.5 mb-3 sm:mb-0 bg-gray-100 hover:bg-gray-200 rounded-xl text-purple text-xs font-bold leading-6"> | ||||||
|                     href="{{ route($routeButtonEdit, [$transaction->id, 'type' => $transaction->type]) }}" |  | ||||||
|                     class="px-3 py-1.5 mb-3 sm:mb-0 bg-gray-100 hover:bg-gray-200 rounded-xl text-purple text-xs font-bold leading-6" |  | ||||||
|                     override="class" |  | ||||||
|                 > |  | ||||||
|                     {{ trans('general.edit') }} |                     {{ trans('general.edit') }} | ||||||
|                 </x-link> |                 </x-link> | ||||||
|             </div> |             </div> | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| @stack('button_group_start') | @stack('button_group_start') | ||||||
|  |  | ||||||
| @if (! $hideButtonMoreActions) | @if (! $hideButtonMoreActions) | ||||||
|     <x-dropdown id="dropdown-more-actions"> |     <x-dropdown id="show-more-actions-{{ $transaction->type }}"> | ||||||
|         <x-slot name="trigger"> |         <x-slot name="trigger"> | ||||||
|             <span class="material-icons">more_horiz</span> |             <span class="material-icons">more_horiz</span> | ||||||
|         </x-slot> |         </x-slot> | ||||||
| @@ -11,7 +11,7 @@ | |||||||
|         @if (empty($transaction->document_id) && $transaction->isNotTransferTransaction()) |         @if (empty($transaction->document_id) && $transaction->isNotTransferTransaction()) | ||||||
|             @if (! $hideButtonDuplicate) |             @if (! $hideButtonDuplicate) | ||||||
|                 @can($permissionCreate) |                 @can($permissionCreate) | ||||||
|                     <x-dropdown.link href="{{ route($routeButtonDuplicate, [$transaction->id, 'type' => $type]) }}"> |                     <x-dropdown.link href="{{ route($routeButtonDuplicate, [$transaction->id, 'type' => $type]) }}" id="show-more-actions-duplicate-{{ $transaction->type }}"> | ||||||
|                         {{ trans('general.duplicate') }} |                         {{ trans('general.duplicate') }} | ||||||
|                     </x-dropdown.link> |                     </x-dropdown.link> | ||||||
|                 @endcan |                 @endcan | ||||||
| @@ -27,6 +27,7 @@ | |||||||
|                 @can($permissionCreate) |                 @can($permissionCreate) | ||||||
|                     <button |                     <button | ||||||
|                         type="button" |                         type="button" | ||||||
|  |                         id="show-more-actions-connect-{{ $transaction->type }}" | ||||||
|                         class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap" |                         class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap" | ||||||
|                         title="{{ trans('general.connect') }}" |                         title="{{ trans('general.connect') }}" | ||||||
|                         @click="onConnectTransactions('{{ route('transactions.dial', $transaction->id) }}')"> |                         @click="onConnectTransactions('{{ route('transactions.dial', $transaction->id) }}')"> | ||||||
| @@ -38,14 +39,14 @@ | |||||||
|  |  | ||||||
|         @stack('connect_button_end') |         @stack('connect_button_end') | ||||||
|  |  | ||||||
|         @if (! $hideDivider1 && $transaction->isNotTransferTransaction()) |         @if (! $hideDivider1 && $transaction->isNotDocumentTransaction() && $transaction->isNotTransferTransaction()) | ||||||
|             <x-dropdown.divider /> |             <x-dropdown.divider /> | ||||||
|         @endif |         @endif | ||||||
|  |  | ||||||
|         @stack('button_print_start') |         @stack('button_print_start') | ||||||
|  |  | ||||||
|         @if (! $hideButtonPrint) |         @if (! $hideButtonPrint) | ||||||
|             <x-dropdown.link href="{{ route($routeButtonPrint, $transaction->id) }}" target="_blank"> |             <x-dropdown.link href="{{ route($routeButtonPrint, $transaction->id) }}" target="_blank" id="show-more-actions-print-{{ $transaction->type }}"> | ||||||
|                 {{ trans('general.print') }} |                 {{ trans('general.print') }} | ||||||
|             </x-dropdown.link> |             </x-dropdown.link> | ||||||
|         @endif |         @endif | ||||||
| @@ -55,7 +56,7 @@ | |||||||
|         @stack('button_pdf_start') |         @stack('button_pdf_start') | ||||||
|  |  | ||||||
|         @if (! $hideButtonPdf) |         @if (! $hideButtonPdf) | ||||||
|             <x-dropdown.link href="{{ route($routeButtonPdf, $transaction->id) }}" class=""> |             <x-dropdown.link href="{{ route($routeButtonPdf, $transaction->id) }}" class="" id="show-more-actions-pdf-{{ $transaction->type }}"> | ||||||
|                 {{ trans('general.download_pdf') }} |                 {{ trans('general.download_pdf') }} | ||||||
|             </x-dropdown.link> |             </x-dropdown.link> | ||||||
|         @endif |         @endif | ||||||
| @@ -70,7 +71,7 @@ | |||||||
|  |  | ||||||
|         @if ($transaction->isNotTransferTransaction()) |         @if ($transaction->isNotTransferTransaction()) | ||||||
|             @if (! $hideButtonShare) |             @if (! $hideButtonShare) | ||||||
|                 <x-dropdown.button @click="onShareLink('{{ route($shareRoute, $transaction->id) }}')"> |                 <x-dropdown.button id="show-more-actions-share-link-{{ $transaction->type }}" @click="onShareLink('{{ route($shareRoute, $transaction->id) }}')"> | ||||||
|                     {{ trans('general.share_link') }} |                     {{ trans('general.share_link') }} | ||||||
|                 </x-dropdown.button> |                 </x-dropdown.button> | ||||||
|             @endif |             @endif | ||||||
| @@ -83,7 +84,7 @@ | |||||||
|         @if ($transaction->isNotTransferTransaction()) |         @if ($transaction->isNotTransferTransaction()) | ||||||
|             @if (! $hideButtonEmail) |             @if (! $hideButtonEmail) | ||||||
|                 @if (! empty($transaction->contact) && $transaction->contact->email) |                 @if (! empty($transaction->contact) && $transaction->contact->email) | ||||||
|                     <x-dropdown.button @click="onEmail('{{ route($routeButtonEmail, $transaction->id) }}')"> |                     <x-dropdown.button id="show-more-actions-send-email-{{ $transaction->type }}" @click="onEmail('{{ route($routeButtonEmail, $transaction->id) }}')"> | ||||||
|                         {{ trans('invoices.send_mail') }} |                         {{ trans('invoices.send_mail') }} | ||||||
|                     </x-dropdown.button> |                     </x-dropdown.button> | ||||||
|                 @else |                 @else | ||||||
| @@ -105,7 +106,7 @@ | |||||||
|         @stack('button_end_start') |         @stack('button_end_start') | ||||||
|  |  | ||||||
|         @if (! $hideButtonEnd) |         @if (! $hideButtonEnd) | ||||||
|             <x-dropdown.link href="{{ route($routeButtonEnd, $transaction->id) }}"> |             <x-dropdown.link href="{{ route($routeButtonEnd, $transaction->id) }}" id="show-more-actions-end-{{ $transaction->type }}"> | ||||||
|                 {{ trans('recurring.end') }} |                 {{ trans('recurring.end') }} | ||||||
|             </x-dropdown.link> |             </x-dropdown.link> | ||||||
|         @endif |         @endif | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| @stack('add_new_button_start') | @stack('add_new_button_start') | ||||||
|  |  | ||||||
| @can('create-banking-transfers') | @can('create-banking-transfers') | ||||||
|     <x-link href="{{ route('transfers.create') }}" kind="primary"> |     <x-link href="{{ route('transfers.create') }}" kind="primary" id="show-more-actions-new-transfer"> | ||||||
|         {{ trans('general.title.new', ['type' => trans_choice('general.transfers', 1)]) }} |         {{ trans('general.title.new', ['type' => trans_choice('general.transfers', 1)]) }} | ||||||
|     </x-link> |     </x-link> | ||||||
| @endcan | @endcan | ||||||
|   | |||||||
| @@ -10,11 +10,7 @@ | |||||||
|  |  | ||||||
|     <x-slot name="body"> |     <x-slot name="body"> | ||||||
|         <div class="flex my-3 space-x-2 rtl:space-x-reverse"> |         <div class="flex my-3 space-x-2 rtl:space-x-reverse"> | ||||||
|             <x-link |             <x-link href="{{ route('transfers.edit', $transfer->id) }}" id="show-slider-actions-edit-transfer" class="px-3 py-1.5 mb-3 sm:mb-0 bg-gray-100 hover:bg-gray-200 rounded-xl text-purple text-xs font-bold leading-6"> | ||||||
|                 href="{{ route('transfers.edit', $transfer->id) }}" |  | ||||||
|                 class="px-3 py-1.5 mb-3 sm:mb-0 bg-gray-100 hover:bg-gray-200 rounded-xl text-purple text-xs font-bold leading-6" |  | ||||||
|                 override="class" |  | ||||||
|             > |  | ||||||
|                 {{ trans('general.edit') }} |                 {{ trans('general.edit') }} | ||||||
|             </x-link> |             </x-link> | ||||||
|         </div> |         </div> | ||||||
|   | |||||||
| @@ -8,7 +8,7 @@ | |||||||
|     @stack('edit_button_start') |     @stack('edit_button_start') | ||||||
|  |  | ||||||
|     @can('update-banking-transfers') |     @can('update-banking-transfers') | ||||||
|         <x-dropdown.link href="{{ route('transfers.edit', $transfer->id) }}"> |         <x-dropdown.link href="{{ route('transfers.edit', $transfer->id) }}" id="show-more-actions-edit-transfer"> | ||||||
|             {{ trans('general.edit') }} |             {{ trans('general.edit') }} | ||||||
|         </x-dropdown.link> |         </x-dropdown.link> | ||||||
|     @endcan |     @endcan | ||||||
| @@ -16,7 +16,7 @@ | |||||||
|     @stack('duplicate_button_start') |     @stack('duplicate_button_start') | ||||||
|  |  | ||||||
|     @can('create-banking-transfers') |     @can('create-banking-transfers') | ||||||
|         <x-dropdown.link href="{{ route('transfers.duplicate', $transfer->id) }}"> |         <x-dropdown.link href="{{ route('transfers.duplicate', $transfer->id) }}" id="show-more-actions-duplicate-transfer"> | ||||||
|             {{ trans('general.duplicate') }} |             {{ trans('general.duplicate') }} | ||||||
|         </x-dropdown.link> |         </x-dropdown.link> | ||||||
|     @endcan |     @endcan | ||||||
| @@ -27,7 +27,7 @@ | |||||||
|  |  | ||||||
|     @stack('print_button_start') |     @stack('print_button_start') | ||||||
|  |  | ||||||
|     <x-dropdown.link href="{{ route('transfers.print', $transfer->id) }}" target="_blank"> |     <x-dropdown.link href="{{ route('transfers.print', $transfer->id) }}" target="_blank" id="show-more-actions-print-transfer"> | ||||||
|         {{ trans('general.print') }} |         {{ trans('general.print') }} | ||||||
|     </x-dropdown.link> |     </x-dropdown.link> | ||||||
|  |  | ||||||
| @@ -35,7 +35,7 @@ | |||||||
|  |  | ||||||
|     @stack('pdf_button_start') |     @stack('pdf_button_start') | ||||||
|  |  | ||||||
|     <x-dropdown.link href="{{ route('transfers.pdf', $transfer->id) }}"> |     <x-dropdown.link href="{{ route('transfers.pdf', $transfer->id) }}" id="show-more-actions-pdf-transfer"> | ||||||
|         {{ trans('general.download_pdf') }} |         {{ trans('general.download_pdf') }} | ||||||
|     </x-dropdown.link> |     </x-dropdown.link> | ||||||
|  |  | ||||||
|   | |||||||
| @@ -14,9 +14,9 @@ | |||||||
|                 </x-link> |                 </x-link> | ||||||
|             @endif |             @endif | ||||||
|  |  | ||||||
|             <x-dropdown id="dropdown-widget-{{ $class->model->id }}"> |             <x-dropdown id="show-more-actions-widget-{{ $class->model->id }}"> | ||||||
|                 <x-slot name="trigger" class="flex" override="class"> |                 <x-slot name="trigger" class="flex" override="class"> | ||||||
|                     <span id="dashboard-widget-more-actions" class="w-8 h-8 flex items-center justify-center px-2 py-2 hover:bg-gray-100 rounded-xl text-purple text-sm font-medium leading-6"> |                     <span class="w-8 h-8 flex items-center justify-center px-2 py-2 hover:bg-gray-100 rounded-xl text-purple text-sm font-medium leading-6"> | ||||||
|                         <span class="material-icons">more_vert</span> |                         <span class="material-icons">more_vert</span> | ||||||
|                     </span> |                     </span> | ||||||
|                 </x-slot> |                 </x-slot> | ||||||
| @@ -24,7 +24,7 @@ | |||||||
|                 @can('update-common-widgets') |                 @can('update-common-widgets') | ||||||
|                 <x-button |                 <x-button | ||||||
|                     type="button" |                     type="button" | ||||||
|                     id="dashboard-edit-widget" |                     id="show-more-actions-edit-widget-{{ $class->model->id }}" | ||||||
|                     class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap" |                     class="w-full flex items-center text-purple px-2 h-9 leading-9 whitespace-nowrap" | ||||||
|                     override="class" |                     override="class" | ||||||
|                     title="{{ trans('general.edit') }}" |                     title="{{ trans('general.edit') }}" | ||||||
|   | |||||||
| @@ -35,7 +35,7 @@ | |||||||
|                         @if ($notification->type != 'updates') |                         @if ($notification->type != 'updates') | ||||||
|                             <x-tooltip id="notification-{{ $notification->id }}" placement="top" message="{{ trans('notifications.mark_read') }}"> |                             <x-tooltip id="notification-{{ $notification->id }}" placement="top" message="{{ trans('notifications.mark_read') }}"> | ||||||
|                                 <button type="button" wire:click="markRead('{{ $notification->type }}', '{{ $notification->id }}')"> |                                 <button type="button" wire:click="markRead('{{ $notification->type }}', '{{ $notification->id }}')"> | ||||||
|                                     <span id="menu-notification-mark-read" class="material-icons text-lg text-purple hover:scale-125">check_circle_outline</span> |                                     <span id="menu-notification-read-one-{{ $notification->id }}" class="material-icons text-lg text-purple hover:scale-125">check_circle_outline</span> | ||||||
|                                 </button> |                                 </button> | ||||||
|                             </x-tooltip> |                             </x-tooltip> | ||||||
|                         @endif |                         @endif | ||||||
|   | |||||||
| @@ -1,22 +1,24 @@ | |||||||
| <button class="w-8 h-8 flex items-center justify-center px-2 py-2 rounded-xl text-purple text-sm font-medium leading-6" data-tooltip-target="{{ $reportId }}-pin" data-tooltip-placement="bottom"> | @php $reportClassForId = Str::slug(Str::snake(class_basename($report->class))); @endphp | ||||||
|  |  | ||||||
|  | <button class="w-8 h-8 flex items-center justify-center px-2 py-2 rounded-xl text-purple text-sm font-medium leading-6" data-tooltip-target="{{ $report->id }}-pin" data-tooltip-placement="bottom"> | ||||||
|     <span |     <span | ||||||
|         id="{{ $pinned ? 'reports-unpin-' . $reportId : 'reports-pin-' . $reportId }}" |         id="{{ $pinned ? 'index-line-actions-unpin-report-' . $reportClassForId . '-' . $report->id : 'index-line-actions-pin-report-' . $reportClassForId . '-' . $report->id }}" | ||||||
|         @class([ |         @class([ | ||||||
|             'text-lg transform rotate-45 transition-all', |             'text-lg transform rotate-45 transition-all', | ||||||
|             'material-icons-outlined hover:scale-125' => ($pinned) ? false : true, |             'material-icons-outlined hover:scale-125' => ($pinned) ? false : true, | ||||||
|             'material-icons' => (! $pinned) ? false : true, |             'material-icons' => (! $pinned) ? false : true, | ||||||
|         ]) |         ]) | ||||||
|         wire:click="changeStatus('{{ $reportId }}')" |         wire:click="changeStatus('{{ $report->id }}')" | ||||||
|     >push_pin |     >push_pin | ||||||
|     </span> |     </span> | ||||||
|  |  | ||||||
|     @if ($pinned) |     @if ($pinned) | ||||||
|         <div id="{{ $reportId }}-pin" role="tooltip" class="inline-block absolute invisible z-20 py-1 px-2 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 shadow-sm whitespace-nowrap opacity-0 tooltip-content"> |         <div id="{{ $report->id }}-pin" role="tooltip" class="inline-block absolute invisible z-20 py-1 px-2 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 shadow-sm whitespace-nowrap opacity-0 tooltip-content"> | ||||||
|             {{ trans('reports.pin_text.unpin_report') }} |             {{ trans('reports.pin_text.unpin_report') }} | ||||||
|             <div class="absolute w-2 h-2 -top-1 before:content-[' '] before:absolute before:w-2 before:h-2 before:bg-white before:border-gray-200 before:transform before:rotate-45 before:border before:border-b-0 before:border-r-0" data-popper-arrow></div> |             <div class="absolute w-2 h-2 -top-1 before:content-[' '] before:absolute before:w-2 before:h-2 before:bg-white before:border-gray-200 before:transform before:rotate-45 before:border before:border-b-0 before:border-r-0" data-popper-arrow></div> | ||||||
|         </div> |         </div> | ||||||
|      @else |      @else | ||||||
|         <div id="{{ $reportId }}-pin" role="tooltip" class="inline-block absolute invisible z-20 py-1 px-2 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 shadow-sm whitespace-nowrap opacity-0 tooltip-content"> |         <div id="{{ $report->id }}-pin" role="tooltip" class="inline-block absolute invisible z-20 py-1 px-2 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 shadow-sm whitespace-nowrap opacity-0 tooltip-content"> | ||||||
|             {{ trans('reports.pin_text.pin_report') }} |             {{ trans('reports.pin_text.pin_report') }} | ||||||
|             <div class="absolute w-2 h-2 -top-1 before:content-[' '] before:absolute before:w-2 before:h-2 before:bg-white before:border-gray-200 before:transform before:rotate-45 before:border before:border-b-0 before:border-r-0" data-popper-arrow></div> |             <div class="absolute w-2 h-2 -top-1 before:content-[' '] before:absolute before:w-2 before:h-2 before:bg-white before:border-gray-200 before:transform before:rotate-45 before:border before:border-b-0 before:border-r-0" data-popper-arrow></div> | ||||||
|         </div> |         </div> | ||||||
|   | |||||||
| @@ -11,7 +11,7 @@ | |||||||
|  |  | ||||||
|     <x-slot name="buttons"> |     <x-slot name="buttons"> | ||||||
|         @can('create-settings-categories') |         @can('create-settings-categories') | ||||||
|             <x-link href="{{ route('categories.create') }}" kind="primary"> |             <x-link href="{{ route('categories.create') }}" kind="primary" id="index-more-actions-new-category"> | ||||||
|                 {{ trans('general.title.new', ['type' => trans_choice('general.categories', 1)]) }} |                 {{ trans('general.title.new', ['type' => trans_choice('general.categories', 1)]) }} | ||||||
|             </x-link> |             </x-link> | ||||||
|         @endcan |         @endcan | ||||||
| @@ -24,12 +24,12 @@ | |||||||
|             </x-slot> |             </x-slot> | ||||||
|  |  | ||||||
|             @can('create-settings-categories') |             @can('create-settings-categories') | ||||||
|                 <x-dropdown.link href="{{ route('import.create', ['settings', 'categories']) }}"> |                 <x-dropdown.link href="{{ route('import.create', ['settings', 'categories']) }}" id="index-more-actions-import-category"> | ||||||
|                     {{ trans('import.import') }} |                     {{ trans('import.import') }} | ||||||
|                 </x-dropdown.link> |                 </x-dropdown.link> | ||||||
|             @endcan |             @endcan | ||||||
|  |  | ||||||
|             <x-dropdown.link href="{{ route('categories.export', request()->input()) }}"> |             <x-dropdown.link href="{{ route('categories.export', request()->input()) }}" id="index-more-actions-export-category"> | ||||||
|                 {{ trans('general.export') }} |                 {{ trans('general.export') }} | ||||||
|             </x-dropdown.link> |             </x-dropdown.link> | ||||||
|         </x-dropdown> |         </x-dropdown> | ||||||
|   | |||||||
| @@ -22,7 +22,7 @@ | |||||||
|  |  | ||||||
|                         <x-form.group.select name="code" label="{{ trans('currencies.code') }}" :options="$codes" searchable change="onChangeCode" /> |                         <x-form.group.select name="code" label="{{ trans('currencies.code') }}" :options="$codes" searchable change="onChangeCode" /> | ||||||
|  |  | ||||||
|                         <x-form.group.text name="rate" label="{{ trans('currencies.rate') }}" @input="onChangeRate" /> |                         <x-form.group.text name="rate" label="{{ trans('currencies.rate') }}" @input="onChangeRate" ::disabled="form.default_currency == 1" /> | ||||||
|  |  | ||||||
|                         <x-form.group.select name="precision" label="{{ trans('currencies.precision') }}" :options="$precisions" model="form.precision" /> |                         <x-form.group.select name="precision" label="{{ trans('currencies.precision') }}" :options="$precisions" model="form.precision" /> | ||||||
|  |  | ||||||
|   | |||||||
| @@ -16,7 +16,7 @@ | |||||||
|  |  | ||||||
|                         <x-form.group.select name="code" label="{{ trans('currencies.code') }}" :options="$codes" searchable change="onChangeCode" /> |                         <x-form.group.select name="code" label="{{ trans('currencies.code') }}" :options="$codes" searchable change="onChangeCode" /> | ||||||
|  |  | ||||||
|                         <x-form.group.text name="rate" label="{{ trans('currencies.rate') }}" @input="onChangeRate" /> |                         <x-form.group.text name="rate" label="{{ trans('currencies.rate') }}" @input="onChangeRate" ::disabled="form.default_currency == 1" /> | ||||||
|  |  | ||||||
|                         <x-form.group.select name="precision" label="{{ trans('currencies.precision') }}" :options="$precisions" model="form.precision" /> |                         <x-form.group.select name="precision" label="{{ trans('currencies.precision') }}" :options="$precisions" model="form.precision" /> | ||||||
|  |  | ||||||
|   | |||||||
| @@ -11,7 +11,7 @@ | |||||||
|  |  | ||||||
|     <x-slot name="buttons"> |     <x-slot name="buttons"> | ||||||
|         @can('create-settings-currencies') |         @can('create-settings-currencies') | ||||||
|             <x-link href="{{ route('currencies.create') }}" kind="primary"> |             <x-link href="{{ route('currencies.create') }}" kind="primary" id="index-more-actions-new-currency"> | ||||||
|                 {{ trans('general.title.new', ['type' => trans_choice('general.currencies', 1)]) }} |                 {{ trans('general.title.new', ['type' => trans_choice('general.currencies', 1)]) }} | ||||||
|             </x-link> |             </x-link> | ||||||
|         @endcan |         @endcan | ||||||
|   | |||||||
| @@ -11,7 +11,7 @@ | |||||||
|  |  | ||||||
|     <x-slot name="buttons"> |     <x-slot name="buttons"> | ||||||
|         @can('create-settings-taxes') |         @can('create-settings-taxes') | ||||||
|             <x-link href="{{ route('taxes.create') }}" kind="primary"> |             <x-link href="{{ route('taxes.create') }}" kind="primary" id="index-more-actions-new-tax"> | ||||||
|                 {{ trans('general.title.new', ['type' => trans_choice('general.taxes', 1)]) }} |                 {{ trans('general.title.new', ['type' => trans_choice('general.taxes', 1)]) }} | ||||||
|             </x-link> |             </x-link> | ||||||
|         @endcan |         @endcan | ||||||
| @@ -24,12 +24,12 @@ | |||||||
|             </x-slot> |             </x-slot> | ||||||
|  |  | ||||||
|             @can('create-settings-taxes') |             @can('create-settings-taxes') | ||||||
|                 <x-dropdown.link href="{{ route('import.create', ['settings', 'taxes']) }}"> |                 <x-dropdown.link href="{{ route('import.create', ['settings', 'taxes']) }}" id="index-more-actions-import-tax"> | ||||||
|                     {{ trans('import.import') }} |                     {{ trans('import.import') }} | ||||||
|                 </x-dropdown.link> |                 </x-dropdown.link> | ||||||
|             @endcan |             @endcan | ||||||
|  |  | ||||||
|             <x-dropdown.link href="{{ route('taxes.export', request()->input()) }}"> |             <x-dropdown.link href="{{ route('taxes.export', request()->input()) }}" id="index-more-actions-export-tax"> | ||||||
|                 {{ trans('general.export') }} |                 {{ trans('general.export') }} | ||||||
|             </x-dropdown.link> |             </x-dropdown.link> | ||||||
|         </x-dropdown> |         </x-dropdown> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user