2023-12-05 14:41:25 -08:00
|
|
|
<div>
|
2024-06-17 07:44:07 -07:00
|
|
|
<div class="box box-default">
|
|
|
|
|
|
|
|
<div class="box-header">
|
|
|
|
<h2 class="box-title">
|
2024-08-19 06:48:12 -07:00
|
|
|
<x-icon type="oauth"/>
|
2024-06-17 07:44:07 -07:00
|
|
|
{{ trans('admin/settings/general.oauth_clients') }}
|
2023-12-05 14:41:25 -08:00
|
|
|
</h2>
|
2024-06-17 07:44:07 -07:00
|
|
|
@if ($authorizationError)
|
2023-12-05 18:36:59 -08:00
|
|
|
<div class="alert alert-danger">
|
2024-06-17 07:44:07 -07:00
|
|
|
<p>{{ trans('admin/users/message.insufficient_permissions') }}
|
2023-12-05 18:36:59 -08:00
|
|
|
<br>
|
|
|
|
{{ $authorizationError }}
|
2024-06-17 07:44:07 -07:00
|
|
|
</p>
|
2023-12-05 18:36:59 -08:00
|
|
|
</div>
|
|
|
|
@endif
|
2023-12-05 14:41:25 -08:00
|
|
|
|
2024-06-17 07:44:07 -07:00
|
|
|
<div class="box-tools pull-right">
|
|
|
|
<a class="btn btn-primary"
|
2024-06-17 12:57:04 -07:00
|
|
|
wire:click="$dispatch('openModal')"
|
2024-06-17 07:44:07 -07:00
|
|
|
onclick="$('#modal-create-client').modal('show');">
|
|
|
|
{{ trans('general.create') }}
|
|
|
|
</a>
|
|
|
|
</div>
|
2023-12-05 12:52:14 -08:00
|
|
|
</div>
|
|
|
|
|
2024-06-17 07:44:07 -07:00
|
|
|
<div class="box-body">
|
|
|
|
<!-- Current Clients -->
|
|
|
|
@if($clients->count() === 0)
|
|
|
|
<p>
|
|
|
|
{{ trans('admin/settings/general.oauth_no_clients') }}
|
|
|
|
</p>
|
|
|
|
@endif
|
2023-12-05 14:41:25 -08:00
|
|
|
|
2024-06-17 07:44:07 -07:00
|
|
|
@if ($clients->count() > 0)
|
2024-07-13 10:16:03 -07:00
|
|
|
<table data-cookie-id-table="OAuthClientsTable"
|
|
|
|
data-pagination="true"
|
|
|
|
data-id-table="OAuthClientsTable"
|
|
|
|
data-side-pagination="client"
|
|
|
|
data-sort-order="desc"
|
|
|
|
data-sort-name="created_at"
|
|
|
|
id="OAuthClientsTable"
|
|
|
|
class="table table-striped snipe-table">
|
2023-12-05 14:41:25 -08:00
|
|
|
<thead>
|
2023-12-05 12:52:14 -08:00
|
|
|
<tr>
|
2024-06-17 07:44:07 -07:00
|
|
|
<th>{{ trans('general.id') }}</th>
|
2024-07-13 10:16:03 -07:00
|
|
|
<th data-sortable="true">{{ trans('general.name') }}</th>
|
|
|
|
<th data-sortable="true">{{ trans('admin/settings/general.oauth_redirect_url') }}</th>
|
|
|
|
<th data-sortable="true">{{ trans('admin/settings/general.oauth_secret') }}</th>
|
|
|
|
<th data-sortable="true">{{ trans('general.created_at') }}</th>
|
|
|
|
<th data-sortable="true">{{ trans('general.updated_at') }}</th>
|
2024-07-13 10:24:56 -07:00
|
|
|
<th>
|
|
|
|
<span class="sr-only">
|
|
|
|
{{ trans('general.actions') }}
|
|
|
|
</span>
|
|
|
|
</th>
|
2023-12-05 12:52:14 -08:00
|
|
|
</tr>
|
2023-12-05 14:41:25 -08:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
2023-12-05 12:52:14 -08:00
|
|
|
@foreach($clients as $client)
|
2023-12-05 14:41:25 -08:00
|
|
|
<tr>
|
2023-12-05 12:52:14 -08:00
|
|
|
<!-- ID -->
|
2024-06-17 07:44:07 -07:00
|
|
|
<td>
|
2023-12-05 12:52:14 -08:00
|
|
|
{{ $client->id }}
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<!-- Name -->
|
2024-06-17 07:44:07 -07:00
|
|
|
<td>
|
2023-12-05 12:52:14 -08:00
|
|
|
{{ $client->name }}
|
|
|
|
</td>
|
|
|
|
|
2024-06-17 07:44:07 -07:00
|
|
|
<!-- Redirect -->
|
|
|
|
<td>
|
2024-07-13 10:16:03 -07:00
|
|
|
<code>{{ $client->redirect }}</code>
|
2024-06-17 07:44:07 -07:00
|
|
|
</td>
|
|
|
|
|
2023-12-05 12:52:14 -08:00
|
|
|
<!-- Secret -->
|
2024-06-17 07:44:07 -07:00
|
|
|
<td>
|
2023-12-05 12:52:14 -08:00
|
|
|
<code>{{ $client->secret }}</code>
|
|
|
|
</td>
|
|
|
|
|
2024-07-13 10:16:03 -07:00
|
|
|
<td>
|
|
|
|
{{ $client->created_at ? Helper::getFormattedDateObject($client->created_at, 'datetime', false) : '' }}
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
@if ($client->created_at != $client->updated_at)
|
|
|
|
{{ $client->updated_at ? Helper::getFormattedDateObject($client->updated_at, 'datetime', false) : '' }}
|
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
|
2024-06-17 07:44:07 -07:00
|
|
|
<!-- Edit / Delete Button -->
|
|
|
|
<td class="text-right">
|
|
|
|
|
|
|
|
<a class="action-link btn btn-sm btn-warning"
|
2023-12-05 15:39:35 -08:00
|
|
|
wire:click="editClient('{{ $client->id }}')"
|
2024-06-17 07:44:07 -07:00
|
|
|
onclick="$('#modal-edit-client').modal('show');">
|
2024-07-13 10:24:56 -07:00
|
|
|
<i class="fas fa-pencil-alt" aria-hidden="true"></i>
|
|
|
|
<span class="sr-only">
|
|
|
|
{{ trans('general.update') }}
|
|
|
|
</span>
|
2023-12-05 12:52:14 -08:00
|
|
|
</a>
|
|
|
|
|
2023-12-05 14:41:25 -08:00
|
|
|
<a class="action-link btn btn-danger btn-sm" wire:click="deleteClient('{{ $client->id }}')">
|
2024-06-17 07:44:07 -07:00
|
|
|
<i class="fas fa-trash" aria-hidden="true"></i>
|
|
|
|
<span class="sr-only">
|
2024-07-13 10:16:03 -07:00
|
|
|
{{ trans('general.delete') }}
|
|
|
|
</span>
|
2023-12-05 12:52:14 -08:00
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
2023-12-05 14:41:25 -08:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
@endif
|
2023-12-05 12:52:14 -08:00
|
|
|
</div>
|
2024-06-17 07:44:07 -07:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-12-06 14:20:30 -08:00
|
|
|
<div>
|
|
|
|
@if ($authorized_tokens->count() > 0)
|
|
|
|
<div>
|
2024-06-17 07:44:07 -07:00
|
|
|
<div class="box box-default">
|
|
|
|
<div class="box-header">
|
2024-07-13 10:24:56 -07:00
|
|
|
<h2 class="box-title">
|
2024-06-17 07:44:07 -07:00
|
|
|
{{ trans('admin/settings/general.oauth_authorized_apps') }}
|
|
|
|
</h2>
|
|
|
|
</div>
|
2023-12-06 14:20:30 -08:00
|
|
|
|
2024-06-17 07:44:07 -07:00
|
|
|
<div class="box-body">
|
2023-12-06 14:20:30 -08:00
|
|
|
<!-- Authorized Tokens -->
|
2024-07-13 10:24:56 -07:00
|
|
|
<table data-cookie-id-table="AuthorizedAppsTable"
|
2024-07-13 10:16:03 -07:00
|
|
|
data-pagination="true"
|
2024-07-13 10:24:56 -07:00
|
|
|
data-id-table="AuthorizedAppsTable"
|
2024-07-13 10:16:03 -07:00
|
|
|
data-toolbar="#AuthorizedAppsToolbar"
|
|
|
|
data-side-pagination="client"
|
|
|
|
data-sort-order="desc"
|
|
|
|
data-sort-name="created_at"
|
2024-07-13 10:24:56 -07:00
|
|
|
id="AuthorizedAppsTable"
|
2024-07-13 10:16:03 -07:00
|
|
|
class="table table-striped snipe-table">
|
2023-12-06 14:20:30 -08:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2024-07-13 10:16:03 -07:00
|
|
|
<th data-sortable="true">{{ trans('general.name') }}</th>
|
|
|
|
<th data-sortable="true"> {{ trans('account/general.personal_access_token') }}</th>
|
|
|
|
<th data-sortable="true">{{ trans('admin/settings/general.oauth_scopes') }}</th>
|
|
|
|
<th data-sortable="true">{{ trans('general.created_at') }}</th>
|
2024-07-13 10:24:56 -07:00
|
|
|
<th data-sortable="true">{{ trans('general.expires') }}</th>
|
|
|
|
<th>
|
|
|
|
<span class="sr-only">
|
|
|
|
{{ trans('general.actions') }}
|
|
|
|
</span>
|
|
|
|
</th>
|
2023-12-06 14:20:30 -08:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
|
|
|
|
<tbody>
|
|
|
|
@foreach($authorized_tokens as $token)
|
|
|
|
<tr>
|
|
|
|
<!-- Client Name -->
|
2024-06-17 07:44:07 -07:00
|
|
|
<td>
|
2023-12-06 14:20:30 -08:00
|
|
|
{{ $token->client->name }}
|
|
|
|
</td>
|
|
|
|
|
2024-07-13 10:16:03 -07:00
|
|
|
<td>
|
|
|
|
{{ $token->name }}
|
|
|
|
</td>
|
|
|
|
|
2023-12-06 14:20:30 -08:00
|
|
|
<!-- Scopes -->
|
2024-06-17 07:44:07 -07:00
|
|
|
<td>
|
2023-12-06 14:20:30 -08:00
|
|
|
@if(!$token->scopes)
|
2024-06-17 07:44:07 -07:00
|
|
|
<span class="label label-default">
|
|
|
|
{{ trans('admin/settings/general.no_scopes') }}
|
|
|
|
</span>
|
2023-12-06 14:20:30 -08:00
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
|
2024-07-13 10:16:03 -07:00
|
|
|
<td>
|
|
|
|
{{ $token->created_at ? Helper::getFormattedDateObject($token->created_at, 'datetime', false) : '' }}
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
{{ $token->expires_at ? Helper::getFormattedDateObject($token->expires_at, 'datetime', false) : '' }}
|
|
|
|
</td>
|
2023-12-06 14:20:30 -08:00
|
|
|
<!-- Revoke Button -->
|
2024-06-17 07:44:07 -07:00
|
|
|
<td>
|
|
|
|
<a class="btn btn-sm btn-danger pull-right"
|
2023-12-06 14:20:30 -08:00
|
|
|
wire:click="deleteToken('{{ $token->id }}')"
|
|
|
|
>
|
2024-06-17 07:44:07 -07:00
|
|
|
<i class="fas fa-trash" aria-hidden="true"></i>
|
|
|
|
<span class="sr-only">
|
|
|
|
{{ trans('general.delete') }}
|
|
|
|
</span>
|
2023-12-06 14:20:30 -08:00
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
2024-06-17 07:44:07 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-12-05 12:52:14 -08:00
|
|
|
|
2023-12-05 14:41:25 -08:00
|
|
|
<!-- Create Client Modal -->
|
2023-12-05 15:39:35 -08:00
|
|
|
<div class="modal fade" id="modal-create-client" tabindex="-1" role="dialog" wire:ignore.self>
|
2023-12-05 14:41:25 -08:00
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
2023-12-05 12:52:14 -08:00
|
|
|
|
2023-12-05 14:41:25 -08:00
|
|
|
<h2 class="modal-title">
|
2024-06-17 07:44:07 -07:00
|
|
|
{{ trans('admin/settings/general.create_client') }}
|
2023-12-05 14:41:25 -08:00
|
|
|
</h2>
|
|
|
|
</div>
|
2023-12-05 12:52:14 -08:00
|
|
|
|
2023-12-05 14:41:25 -08:00
|
|
|
<div class="modal-body">
|
|
|
|
<!-- Form Errors -->
|
2023-12-05 15:39:35 -08:00
|
|
|
@if($errors->has('name') || $errors->has('redirect'))
|
|
|
|
<div class="alert alert-danger">
|
|
|
|
<p><strong>Whoops!</strong> Something went wrong!</p>
|
|
|
|
<br>
|
|
|
|
<ul>
|
|
|
|
@if($errors->has('name'))
|
|
|
|
<li>{{ $errors->first('name') }}</li>
|
|
|
|
@endif
|
|
|
|
@if($errors->has('redirect'))
|
|
|
|
<li>{{ $errors->first('redirect') }}</li>
|
|
|
|
@endif
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
@endif
|
2023-12-05 12:52:14 -08:00
|
|
|
|
2023-12-05 14:41:25 -08:00
|
|
|
<!-- Create Client Form -->
|
|
|
|
<form class="form-horizontal" role="form">
|
|
|
|
<!-- Name -->
|
|
|
|
<div class="form-group">
|
2024-06-17 07:44:07 -07:00
|
|
|
<label class="col-md-3 control-label" for="create-client-name">
|
|
|
|
{{ trans('general.name') }}
|
|
|
|
</label>
|
2023-12-05 12:52:14 -08:00
|
|
|
|
2023-12-05 14:41:25 -08:00
|
|
|
<div class="col-md-7">
|
2023-12-05 15:39:35 -08:00
|
|
|
<input id="create-client-name"
|
|
|
|
type="text"
|
|
|
|
aria-label="create-client-name"
|
|
|
|
class="form-control"
|
2024-06-17 13:03:27 -07:00
|
|
|
wire:model="name"
|
2023-12-12 11:28:04 -08:00
|
|
|
wire:keydown.enter="createClient"
|
2024-06-17 07:44:07 -07:00
|
|
|
autofocus>
|
2023-12-05 12:52:14 -08:00
|
|
|
|
2023-12-05 14:41:25 -08:00
|
|
|
<span class="help-block">
|
2024-06-17 07:44:07 -07:00
|
|
|
{{ trans('admin/settings/general.oauth_name_help') }}
|
2023-12-05 14:41:25 -08:00
|
|
|
</span>
|
2023-12-05 12:52:14 -08:00
|
|
|
</div>
|
2023-12-05 14:41:25 -08:00
|
|
|
</div>
|
2023-12-05 12:52:14 -08:00
|
|
|
|
2023-12-05 14:41:25 -08:00
|
|
|
<!-- Redirect URL -->
|
|
|
|
<div class="form-group">
|
2024-06-17 07:44:07 -07:00
|
|
|
<label class="col-md-3 control-label" for="redirect">{{ trans('admin/settings/general.oauth_redirect_url') }}</label>
|
2023-12-05 12:52:14 -08:00
|
|
|
|
2023-12-05 14:41:25 -08:00
|
|
|
<div class="col-md-7">
|
2023-12-05 15:39:35 -08:00
|
|
|
<input type="text"
|
|
|
|
class="form-control"
|
|
|
|
aria-label="redirect"
|
|
|
|
name="redirect"
|
2024-06-17 13:03:27 -07:00
|
|
|
wire:model="redirect"
|
2023-12-12 11:28:04 -08:00
|
|
|
wire:keydown.enter="createClient"
|
2023-12-05 14:41:25 -08:00
|
|
|
>
|
2023-12-05 12:52:14 -08:00
|
|
|
|
2023-12-05 14:41:25 -08:00
|
|
|
<span class="help-block">
|
2024-06-17 07:44:07 -07:00
|
|
|
{{ trans('admin/settings/general.oauth_callback_url') }}
|
2023-12-05 14:41:25 -08:00
|
|
|
</span>
|
2023-12-05 12:52:14 -08:00
|
|
|
</div>
|
2023-12-05 14:41:25 -08:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
2023-12-05 12:52:14 -08:00
|
|
|
|
2023-12-05 14:41:25 -08:00
|
|
|
<!-- Modal Actions -->
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
2023-12-05 15:39:35 -08:00
|
|
|
<button type="button"
|
|
|
|
class="btn btn-primary"
|
|
|
|
wire:click="createClient"
|
2023-12-05 14:41:25 -08:00
|
|
|
>
|
|
|
|
Create
|
|
|
|
</button>
|
2023-12-05 12:52:14 -08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-12-05 14:41:25 -08:00
|
|
|
</div>
|
2024-06-17 07:44:07 -07:00
|
|
|
</div>
|
|
|
|
|
2023-12-05 12:52:14 -08:00
|
|
|
|
2023-12-05 14:41:25 -08:00
|
|
|
<!-- Edit Client Modal -->
|
2023-12-05 15:39:35 -08:00
|
|
|
<div class="modal fade" id="modal-edit-client" tabindex="-1" role="dialog" wire:ignore.self>
|
2023-12-05 14:41:25 -08:00
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
|
<h4 class="modal-title">
|
2024-06-17 07:44:07 -07:00
|
|
|
{{ trans('general.update') }}
|
2023-12-05 14:41:25 -08:00
|
|
|
</h4>
|
|
|
|
</div>
|
2023-12-05 12:52:14 -08:00
|
|
|
|
2023-12-05 15:39:35 -08:00
|
|
|
|
2023-12-05 14:41:25 -08:00
|
|
|
<div class="modal-body">
|
2023-12-05 15:39:35 -08:00
|
|
|
@if($errors->has('newName') || $errors->has('newRedirect'))
|
|
|
|
<div class="alert alert-danger">
|
|
|
|
<p><strong>Whoops!</strong> Something went wrong!</p>
|
|
|
|
<br>
|
|
|
|
<ul>
|
|
|
|
@if($errors->has('newName'))
|
|
|
|
<li>{{ $errors->first('newName') }}</li>
|
|
|
|
@endif
|
|
|
|
@if($errors->has('newRedirect'))
|
|
|
|
<li>{{ $errors->first('newRedirect') }}</li>
|
|
|
|
@endif
|
2023-12-05 18:36:59 -08:00
|
|
|
@if($authorizationError)
|
2023-12-05 18:22:20 -08:00
|
|
|
<li>{{ $authorizationError }}</li>
|
|
|
|
@endif
|
2023-12-05 15:39:35 -08:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
@endif
|
2023-12-05 12:52:14 -08:00
|
|
|
|
2023-12-05 14:41:25 -08:00
|
|
|
<!-- Edit Client Form -->
|
2023-12-05 15:39:35 -08:00
|
|
|
<form class="form-horizontal">
|
2023-12-05 14:41:25 -08:00
|
|
|
<!-- Name -->
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-md-3 control-label" for="edit-client-name">Name</label>
|
2023-12-05 12:52:14 -08:00
|
|
|
|
2023-12-05 14:41:25 -08:00
|
|
|
<div class="col-md-7">
|
2023-12-05 15:39:35 -08:00
|
|
|
<input
|
|
|
|
id="edit-client-name"
|
|
|
|
type="text"
|
|
|
|
aria-label="edit-client-name"
|
|
|
|
class="form-control"
|
2024-05-29 12:08:25 -07:00
|
|
|
wire:model.live="editName"
|
2023-12-12 11:33:51 -08:00
|
|
|
wire:keydown.enter="updateClient('{{ $editClientId }}')"
|
2023-12-05 14:41:25 -08:00
|
|
|
>
|
2023-12-05 12:52:14 -08:00
|
|
|
|
2023-12-05 14:41:25 -08:00
|
|
|
<span class="help-block">
|
2024-06-17 07:44:07 -07:00
|
|
|
{{ trans('admin/settings/general.oauth_name_help') }}
|
2023-12-05 14:41:25 -08:00
|
|
|
</span>
|
2023-12-05 12:52:14 -08:00
|
|
|
</div>
|
2023-12-05 14:41:25 -08:00
|
|
|
</div>
|
2023-12-05 12:52:14 -08:00
|
|
|
|
2023-12-05 14:41:25 -08:00
|
|
|
<!-- Redirect URL -->
|
|
|
|
<div class="form-group">
|
2024-06-17 07:44:07 -07:00
|
|
|
<label class="col-md-3 control-label" for="redirect">{{ trans('admin/settings/general.oauth_redirect_url') }}</label>
|
2023-12-05 12:52:14 -08:00
|
|
|
|
2023-12-05 14:41:25 -08:00
|
|
|
<div class="col-md-7">
|
2023-12-05 15:39:35 -08:00
|
|
|
<input
|
|
|
|
type="text"
|
|
|
|
class="form-control"
|
|
|
|
name="redirect"
|
|
|
|
aria-label="redirect"
|
2024-06-17 13:03:27 -07:00
|
|
|
wire:model="editRedirect"
|
2023-12-12 11:33:51 -08:00
|
|
|
wire:keydown.enter="updateClient('{{ $editClientId }}')"
|
2023-12-05 14:41:25 -08:00
|
|
|
>
|
2023-12-05 12:52:14 -08:00
|
|
|
|
2023-12-05 14:41:25 -08:00
|
|
|
<span class="help-block">
|
2024-06-17 07:44:07 -07:00
|
|
|
{{ trans('admin/settings/general.oauth_callback_url') }}
|
2023-12-05 14:41:25 -08:00
|
|
|
</span>
|
2023-12-05 12:52:14 -08:00
|
|
|
</div>
|
2023-12-05 14:41:25 -08:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
2023-12-05 12:52:14 -08:00
|
|
|
|
2023-12-05 14:41:25 -08:00
|
|
|
<!-- Modal Actions -->
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
2023-12-05 12:52:14 -08:00
|
|
|
|
2023-12-05 18:22:20 -08:00
|
|
|
<button
|
2023-12-05 15:39:35 -08:00
|
|
|
class="btn btn-primary"
|
|
|
|
wire:click="updateClient('{{ $editClientId }}')"
|
2023-12-05 14:41:25 -08:00
|
|
|
>
|
2023-12-05 15:39:35 -08:00
|
|
|
Update Client
|
2023-12-05 14:41:25 -08:00
|
|
|
</button>
|
2023-12-05 12:52:14 -08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-12-05 14:41:25 -08:00
|
|
|
<script>
|
2023-12-05 18:22:20 -08:00
|
|
|
document.addEventListener('DOMContentLoaded', function() {
|
2024-06-04 15:37:41 -07:00
|
|
|
Livewire.on('openModal', () => {
|
2023-12-12 11:28:04 -08:00
|
|
|
$('#modal-create-client').modal('show').on('shown.bs.modal', function() {
|
|
|
|
$(this).find('[autofocus]').focus();
|
|
|
|
});
|
2023-12-05 15:39:35 -08:00
|
|
|
});
|
|
|
|
});
|
2023-12-05 18:22:20 -08:00
|
|
|
window.addEventListener('clientCreated', function() {
|
2023-12-05 15:39:35 -08:00
|
|
|
$('#modal-create-client').modal('hide');
|
|
|
|
});
|
2023-12-05 18:22:20 -08:00
|
|
|
window.addEventListener('editClient', function() {
|
2023-12-05 15:39:35 -08:00
|
|
|
$('#modal-edit-client').modal('show');
|
|
|
|
});
|
2023-12-05 18:22:20 -08:00
|
|
|
window.addEventListener('clientUpdated', function() {
|
|
|
|
$('#modal-edit-client').modal('hide');
|
|
|
|
});
|
|
|
|
|
2023-12-05 15:39:35 -08:00
|
|
|
|
2023-12-05 14:41:25 -08:00
|
|
|
|
|
|
|
</script>
|
2024-06-04 15:37:41 -07:00
|
|
|
</div>
|
2024-06-17 07:44:07 -07:00
|
|
|
|
2024-07-13 10:16:03 -07:00
|
|
|
@section('moar_scripts')
|
|
|
|
@include ('partials.bootstrap-table')
|
|
|
|
@endsection
|
|
|
|
|
2024-06-17 12:57:04 -07:00
|
|
|
|