Moved from "app/src" to "app/application".

Otherwise phpstorm doesn't understand the paths correctly. He thinks that this is not a complete application, but a package. And when creating a class, the namespace indicates “app” with a small letter, but should be “App”.
This commit is contained in:
2024-04-11 19:52:37 +05:00
parent e41f63f94f
commit b7d0a2453e
314 changed files with 5 additions and 5 deletions

View File

@@ -0,0 +1,16 @@
<script>
(function() {
function clickConfirmAddEventListener(element, index, array) {
element.addEventListener('click', (e) => {
const result = confirm('{{ $alert }}');
if (! result) {
e.preventDefault();
}
});
}
let clickConfirm = document.querySelectorAll('.click-confirm');
if (clickConfirm.length > 0) {
clickConfirm.forEach(clickConfirmAddEventListener);
}
})();
</script>

View File

@@ -0,0 +1,5 @@
@section('meta_title', __('admin-sections.Dashboard'))
@section('h1', __('admin-sections.Dashboard'))
<x-admin.layout>
</x-admin.layout>

View File

@@ -0,0 +1,55 @@
<li @class([
'nav-item',
'active' => request()->route()->named('admin.home')
])>
<a href="{{ route('admin.home') }}" class="nav-link">
<span class="sidebar-icon">
<svg class="icon icon-xs me-2" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"></path><path d="M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"></path></svg>
</span>
<span class="sidebar-text">{{ __('admin-sections.Dashboard') }}</span>
</a>
</li>
@can('viewAny', \App\Models\Project::class)
<li @class([
'nav-item',
'active' => request()->route()->named('admin.projects.*'),
])>
<a href="{{ route('admin.projects.index') }}" class="nav-link">
<span class="sidebar-icon">
<svg class="icon icon-xs me-2" data-slot="icon" fill="none" stroke-width="1.5" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 7.125C2.25 6.504 2.754 6 3.375 6h6c.621 0 1.125.504 1.125 1.125v3.75c0 .621-.504 1.125-1.125 1.125h-6a1.125 1.125 0 0 1-1.125-1.125v-3.75ZM14.25 8.625c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v8.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 0 1-1.125-1.125v-8.25ZM3.75 16.125c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v2.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 0 1-1.125-1.125v-2.25Z"></path>
</svg>
</span>
<span class="sidebar-text">{{ __('admin-sections.Projects') }}</span>
</a>
</li>
@endcan
@can('viewAny', \App\Models\User::class)
<li @class([
'nav-item',
'active' => request()->route()->named('admin.users.*'),
])>
<a href="{{ route('admin.users.index') }}" class="nav-link">
<span class="sidebar-icon">
<svg class="icon icon-xs me-2" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path d="M15 14s1 0 1-1-1-4-5-4-5 3-5 4 1 1 1 1h8Zm-7.978-1A.261.261 0 0 1 7 12.996c.001-.264.167-1.03.76-1.72C8.312 10.629 9.282 10 11 10c1.717 0 2.687.63 3.24 1.276.593.69.758 1.457.76 1.72l-.008.002a.274.274 0 0 1-.014.002H7.022ZM11 7a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm3-2a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM6.936 9.28a5.88 5.88 0 0 0-1.23-.247A7.35 7.35 0 0 0 5 9c-4 0-5 3-5 4 0 .667.333 1 1 1h4.216A2.238 2.238 0 0 1 5 13c0-1.01.377-2.042 1.09-2.904.243-.294.526-.569.846-.816ZM4.92 10A5.493 5.493 0 0 0 4 13H1c0-.26.164-1.03.76-1.724.545-.636 1.492-1.256 3.16-1.275ZM1.5 5.5a3 3 0 1 1 6 0 3 3 0 0 1-6 0Zm3-2a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z"/></svg>
</span>
<span class="sidebar-text">{{ __('admin-sections.Users') }}</span>
</a>
</li>
@endcan
@can('viewAny', \App\Models\Role::class)
<li @class([
'nav-item',
'active' => request()->route()->named('admin.roles.*'),
])>
<a href="{{ route('admin.roles.index') }}" class="nav-link">
<span class="sidebar-icon">
<svg class="icon icon-xs me-2" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"></path><path fill-rule="evenodd" d="M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm3 4a1 1 0 000 2h.01a1 1 0 100-2H7zm3 0a1 1 0 000 2h3a1 1 0 100-2h-3zm-3 4a1 1 0 100 2h.01a1 1 0 100-2H7zm3 0a1 1 0 100 2h3a1 1 0 100-2h-3z" clip-rule="evenodd"></path></svg>
</span>
<span class="sidebar-text">{{ __('admin-sections.User group') }}</span>
</a>
</li>
@endcan

View File

@@ -0,0 +1,11 @@
@csrf
<x-volt.forms.checkbox :title="__('validation.attributes.is_public')" name="is_public" checkboxValue="1" notCheckedValue="0" :userValue="(string) $project->is_public" />
<x-volt.forms.upload.image :title="__('validation.attributes.logo')" :storage="$project->getStorageOne(\App\Enums\StorageType::Logo)" name="logo" :morph="\App\Enums\Morph::Project" :storageType="\App\Enums\StorageType::Logo" />
<x-volt.forms.input :title="__('validation.attributes.name')" name="name" type="text" :value="$project->name" required autofocus />
<x-volt.forms.input :title="__('validation.attributes.code')" name="code" type="text" :value="$project->code" required />
<x-volt.forms.input :title="__('validation.attributes.http_host')" :example="'<strong>https://localhost.com</strong> ' . __('or') . ' <strong>http://localhost.com:8080</strong>'" name="http_host" type="text" :value="$project->http_host" />
<x-volt.forms.languages name="languages" :value="$languages" />
@canany(['create', 'update'], $project)
<button class="btn btn-primary" type="submit">{{ __('Save') }}</button>
@endcanany

View File

@@ -0,0 +1,8 @@
@can('create', \App\Models\Project::class)
<div class="mb-4">
<a href="{{ route('admin.projects.create') }}" class="btn btn-secondary d-inline-flex align-items-center me-2">
<svg class="icon icon-xs me-2" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path></svg>
{{ __('Create') }}
</a>
</div>
@endcan

View File

@@ -0,0 +1,16 @@
@section('meta_title', __('admin-sections.Projects'))
@section('h1', __('admin-sections.Projects'))
<x-admin.layout>
@include('admin.projects._top')
<div class="row">
<div class="col-12 mb-4">
<div class="card border-0 shadow components-section">
<div class="card-body">
<form method="post" action="{{ route('admin.projects.store') }}">
@include('admin.projects._from')
</form>
</div>
</div>
</div>
</div>
</x-admin.layout>

View File

@@ -0,0 +1,17 @@
@section('meta_title', __('admin-sections.Projects'))
@section('h1', __('admin-sections.Projects'))
<x-admin.layout>
@include('admin.projects._top')
<div class="row">
<div class="col-12 mb-4">
<div class="card border-0 shadow components-section">
<div class="card-body">
<form method="post" action="{{ route('admin.projects.update', $project) }}">
@method('PUT')
@include('admin.projects._from')
</form>
</div>
</div>
</div>
</div>
</x-admin.layout>

View File

@@ -0,0 +1,58 @@
@section('meta_title', __('admin-sections.Projects'))
@section('h1', __('admin-sections.Projects'))
<x-admin.layout>
@include('admin.projects._top')
<div class="card border-0 shadow mb-4">
<div class="card-body">
<div class="table-responsive">
<table class="table table-centered table-nowrap mb-0 rounded">
<thead class="thead-light">
<tr>
<th class="border-0">{{ __('validation.attributes.name') }}</th>
<th class="border-0">{{ __('validation.attributes.code') }}</th>
<th class="border-0">{{ __('validation.attributes.http_host') }}</th>
<th class="border-0 rounded-end" style="width: 150px"></th>
</tr>
</thead>
<tbody>
@foreach($projects as $project)
<tr>
<td>
<a href="{{ route('admin.projects.edit', $project) }}" class="fw-bold">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="align-text-top" viewBox="0 0 16 16">
<path d="M12.854.146a.5.5 0 0 0-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 0 0 0-.708l-3-3zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.207l6.5-6.5zm-7.468 7.468A.5.5 0 0 1 6 13.5V13h-.5a.5.5 0 0 1-.5-.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.5-.5V10h-.5a.499.499 0 0 1-.175-.032l-.179.178a.5.5 0 0 0-.11.168l-2 5a.5.5 0 0 0 .65.65l5-2a.5.5 0 0 0 .168-.11l.178-.178z"/>
</svg>
{{ $project->name }}
</a>
</td>
<td>
{{ $project->code }}
</td>
<td>
{{ $project->http_host }}
</td>
<td>
@can('delete', $project)
<form method="post" action="{{ route('admin.projects.destroy', $project) }}">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-danger click-confirm">
{{ __('Delete') }}
</button>
</form>
@endcan
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="card-footer border-0">
{{ $projects->links() }}
</div>
</div>
</div>
</div>
@push('scripts')
@include('admin._scripts._click-confirm', ['alert' => __('Do you want to delete?')])
@endpush
</x-admin.layout>

View File

@@ -0,0 +1,7 @@
@csrf
<x-volt.forms.input :title="__('validation.attributes.name')" name="name" type="text" :value="$role->name" required autofocus />
<x-volt.forms.permissions_for_role :title="__('validation.attributes.permissions')" name="permissions[]" :value="$role->permissions->pluck('permission')->toArray()" :role="$role" />
<x-volt.forms.input :title="__('validation.attributes.code')" name="code" type="text" :value="$role->code" :disabled="!empty($role->id)" required />
@canany(['create', 'update'], $role)
<button class="btn btn-primary" type="submit">{{ __('Save') }}</button>
@endcanany

View File

@@ -0,0 +1,8 @@
@can('create', \App\Models\Role::class)
<div class="mb-4">
<a href="{{ route('admin.roles.create') }}" class="btn btn-secondary d-inline-flex align-items-center me-2">
<svg class="icon icon-xs me-2" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path></svg>
{{ __('Create') }}
</a>
</div>
@endcan

View File

@@ -0,0 +1,16 @@
@section('meta_title', __('admin-sections.User group'))
@section('h1', __('admin-sections.User group'))
<x-admin.layout>
@include('admin.roles._top')
<div class="row">
<div class="col-12 mb-4">
<div class="card border-0 shadow components-section">
<div class="card-body">
<form method="post" action="{{ route('admin.roles.store') }}">
@include('admin.roles._from')
</form>
</div>
</div>
</div>
</div>
</x-admin.layout>

View File

@@ -0,0 +1,20 @@
@section('meta_title', __('admin-sections.User group'))
@section('h1', __('admin-sections.User group'))
<x-admin.layout>
@include('admin.roles._top')
<div class="row">
@if($role->morph_type)
<p>{{ $role->name_with_morph }}</p>
@endif
<div class="col-12 mb-4">
<div class="card border-0 shadow components-section">
<div class="card-body">
<form method="post" action="{{ route('admin.roles.update', $role) }}">
@method('PUT')
@include('admin.roles._from')
</form>
</div>
</div>
</div>
</div>
</x-admin.layout>

View File

@@ -0,0 +1,54 @@
@section('meta_title', __('admin-sections.User group'))
@section('h1', __('admin-sections.User group'))
<x-admin.layout>
@include('admin.roles._top')
<div class="card border-0 shadow mb-4">
<div class="card-body">
<div class="table-responsive">
<table class="table table-centered table-nowrap mb-0 rounded">
<thead class="thead-light">
<tr>
<th class="border-0">{{ __('validation.attributes.name') }}</th>
<th class="border-0">{{ __('validation.attributes.code') }}</th>
<th class="border-0 rounded-end" style="width: 150px"></th>
</tr>
</thead>
<tbody>
@foreach($roles as $role)
<tr>
<td>
<a href="{{ route('admin.roles.edit', $role) }}" class="fw-bold">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="align-text-top" viewBox="0 0 16 16">
<path d="M12.854.146a.5.5 0 0 0-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 0 0 0-.708l-3-3zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.207l6.5-6.5zm-7.468 7.468A.5.5 0 0 1 6 13.5V13h-.5a.5.5 0 0 1-.5-.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.5-.5V10h-.5a.499.499 0 0 1-.175-.032l-.179.178a.5.5 0 0 0-.11.168l-2 5a.5.5 0 0 0 .65.65l5-2a.5.5 0 0 0 .168-.11l.178-.178z"/>
</svg>
{{ $role->name_with_morph }}
</a>
</td>
<td>{{ $role->code }}</td>
<td>
@if($role->is_remove)
@can('delete', $role)
<form method="post" action="{{ route('admin.roles.destroy', $role) }}">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-danger click-confirm">
{{ __('Delete') }}
</button>
</form>
@endcan
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="card-footer border-0">
{{ $roles->links() }}
</div>
</div>
</div>
</div>
@push('scripts')
@include('admin._scripts._click-confirm', ['alert' => __('Do you want to delete?')])
@endpush
</x-admin.layout>

View File

@@ -0,0 +1,12 @@
@csrf
<x-volt.forms.input :title="__('validation.attributes.name')" name="name" type="text" :value="$user->name" required autofocus />
<x-volt.forms.input :title="__('validation.attributes.email')" name="email" type="email" :value="$user->email" required />
@if (empty($user->id))
<x-volt.forms.input :title="__('validation.attributes.password')" name="password" type="password" value="" required autocomplete="off" />
@endif
<hr>
<x-volt.forms.multi_checkbox :title="__('validation.attributes.roles')" name="roles[]" :list="$roles" :value="$userRoles" />
<hr>
@canany(['create', 'update'], $user)
<button class="btn btn-primary" type="submit">{{ __('Save') }}</button>
@endcanany

View File

@@ -0,0 +1,8 @@
@can('create', \App\Models\User::class)
<div class="mb-4">
<a href="{{ route('admin.users.create') }}" class="btn btn-secondary d-inline-flex align-items-center me-2">
<svg class="icon icon-xs me-2" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path></svg>
{{ __('Create') }}
</a>
</div>
@endcan

View File

@@ -0,0 +1,16 @@
@section('meta_title', __('admin-sections.Users'))
@section('h1', __('admin-sections.Users'))
<x-admin.layout>
@include('admin.users._top')
<div class="row">
<div class="col-12 mb-4">
<div class="card border-0 shadow components-section">
<div class="card-body">
<form method="post" action="{{ route('admin.users.store') }}">
@include('admin.users._from')
</form>
</div>
</div>
</div>
</div>
</x-admin.layout>

View File

@@ -0,0 +1,34 @@
@section('meta_title', __('admin-sections.Users'))
@section('h1', __('admin-sections.Users'))
<x-admin.layout>
@include('admin.users._top')
<div class="row">
<div class="col-12 mb-4">
<div class="card border-0 shadow components-section">
<div class="card-body">
<form method="post" action="{{ route('admin.users.update', $user) }}">
@method('PUT')
@include('admin.users._from')
</form>
</div>
</div>
</div>
</div>
@can('update', $user)
<div class="row">
<div class="col-12 mb-4">
<div class="card border-0 shadow components-section">
<div class="card-body">
<form method="post" action="{{ route('admin.users.update-password', $user) }}">
@method('PUT')
@csrf
<x-volt.forms.input :title="__('validation.attributes.password')" name="password" type="password" value="" required autocomplete="off" />
<button class="btn btn-primary" type="submit">{{ __('Save') }}</button>
</form>
</div>
</div>
</div>
</div>
@endcan
</x-admin.layout>

View File

@@ -0,0 +1,52 @@
@section('meta_title', __('admin-sections.Users'))
@section('h1', __('admin-sections.Users'))
<x-admin.layout>
@include('admin.users._top')
<div class="card border-0 shadow mb-4">
<div class="card-body">
<div class="table-responsive">
<table class="table table-centered table-nowrap mb-0 rounded">
<thead class="thead-light">
<tr>
<th class="border-0">{{ __('validation.attributes.name') }}</th>
<th class="border-0">{{ __('validation.attributes.email') }}</th>
<th class="border-0 rounded-end" style="width: 150px"></th>
</tr>
</thead>
<tbody>
@foreach($users as $user)
<tr>
<td>
<a href="{{ route('admin.users.edit', $user) }}" class="fw-bold">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="align-text-top" viewBox="0 0 16 16">
<path d="M12.854.146a.5.5 0 0 0-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 0 0 0-.708l-3-3zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.207l6.5-6.5zm-7.468 7.468A.5.5 0 0 1 6 13.5V13h-.5a.5.5 0 0 1-.5-.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.5-.5V10h-.5a.499.499 0 0 1-.175-.032l-.179.178a.5.5 0 0 0-.11.168l-2 5a.5.5 0 0 0 .65.65l5-2a.5.5 0 0 0 .168-.11l.178-.178z"/>
</svg>
{{ $user->name }}
</a>
</td>
<td>{{ $user->email }}</td>
<td>
@can('delete', $user)
<form method="post" action="{{ route('admin.users.destroy', $user) }}">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-danger click-confirm">
{{ __('Delete') }}
</button>
</form>
@endcan
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="card-footer border-0">
{{ $users->links() }}
</div>
</div>
</div>
</div>
@push('scripts')
@include('admin._scripts._click-confirm', ['alert' => __('Do you want to delete?')])
@endpush
</x-admin.layout>

View File

@@ -0,0 +1,12 @@
<div class="form-check">
@if(!is_null($notCheckedValue))
<input type="hidden" name="{{ $name }}" value="{{ $notCheckedValue }}">
@endif
<input class="form-check-input @error($requestName) is-invalid @enderror" name="{{ $name }}" type="checkbox" value="{{ $checkboxValue }}" @checked($checkboxValue === $userValue) id="form-checkbox-{{ $requestName }}">
<label class="form-check-label" for="form-checkbox-{{ $requestName }}">
{{ $title }}
</label>
@error($name)
<span class="invalid-feedback d-block">{{ $message }}</span>
@enderror
</div>

View File

@@ -0,0 +1,4 @@
<input name="{{ $name }}" value="{{ $value }}" type="hidden" {{ $attributes }} />
@error($requestName)
<span class="invalid-feedback" style="display: block;">{{ $message }}</span>
@enderror

View File

@@ -0,0 +1,11 @@
<div class="mb-4">
<label for="form-input-{{ $requestName }}">{{ $title }}
@if(!empty($example))
<span class="label__example">({{ __('example:') }} {!! $example !!})</span>
@endif
</label>
<input id="form-input-{{ $requestName }}" class="form-control @error($requestName) is-invalid @enderror" name="{{ $name }}" type="{{ $type }}" @if($type !== 'password') value="{{ $value }}" @endif {{ $attributes }}>
@error($requestName)
<span class="invalid-feedback">{{ $message }}</span>
@enderror
</div>

View File

@@ -0,0 +1,94 @@
<hr>
<div class="mb-4">
<label>{{ __('Languages') }}</label>
<div class="table-responsive">
<table class="table table-centered table-nowrap mb-0 rounded table-languages">
<thead class="thead-light">
<tr>
<th class="border-0 rounded-start">{{ __('validation.attributes.title') }}</th>
<th class="border-0">{{ __('validation.attributes.code') }}</th>
<th class="border-0">{{ __('validation.attributes.sort') }}</th>
<th class="border-0">{{ __('validation.attributes.is_default') }}</th>
<th class="border-0 rounded-end"></th>
</tr>
</thead>
<tbody>
@foreach($value as $index => $lang)
<tr class="item-language">
@include('components.volt.forms.languages.language', ['index' => $index, 'name' => $name, 'lang' => $lang])
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<td colspan="5">
<input type="hidden" class="language-number" name="{{ $name . '[language-number]' }}" value="{{ old($name . '.language-number', count($value)) }}">
<button class="btn btn-outline-primary add-language" type="button">+ {{ __('Add language') }}</button>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
@pushOnce('scripts')
<script>
(function() {
function languagesEventListener(tableLanguage) {
let languageIndex = tableLanguage.querySelector('input.language-number'),
addBlock = tableLanguage.querySelector('tbody');
tableLanguage.querySelector('button.add-language').addEventListener('click', (e) => {
++languageIndex.value;
axios.post('{{ route('admin.new-language') }}', {
_token: document.querySelector('meta[name="csrf-token"]').getAttribute('content'),
name: '{{ $name }}',
index: Number(languageIndex.value),
})
.then(response => {
let container = document.createElement("tr");
container.classList = 'item-language';
container.innerHTML = response.data.html;
let button = container.querySelector('button.delete');
addEventButtonDelete(button, tableLanguage);
addBlock.append(container);
languagesHideShowButtonDelete(tableLanguage);
})
.catch(error => {
let container = document.createElement("div");
container.classList = 'alert alert-danger';
container.setAttribute('role', 'alert');
container.innerHTML = `{{ __('There was an error adding a language') }}<button type="button" class="btn-close alert__close" data-bs-dismiss="alert"></button>`;
e.target.after(container);
});
});
languagesHideShowButtonDelete(tableLanguage, tableLanguage);
let buttonsDelete = tableLanguage.querySelectorAll('button.delete');
if (buttonsDelete.length > 0) {
buttonsDelete.forEach(addEventButtonDelete, tableLanguage);
}
}
function addEventButtonDelete(button, tableLanguage) {
button.addEventListener('click', (e) => {
e.target.parentElement.parentElement.remove();
languagesHideShowButtonDelete(tableLanguage);
});
}
function languagesHideShowButtonDelete(tableLanguage) {
let buttons = tableLanguage.querySelectorAll('button.delete'),
display = 'inline-block';
if (buttons.length === 1) {
display = 'none';
}
buttons.forEach(function (button) {
button.style.display = display;
});
}
let languages = document.querySelectorAll('.table-languages');
if (languages.length > 0) {
languages.forEach(languagesEventListener);
}
})();
</script>
@endPushOnce

View File

@@ -0,0 +1,4 @@
<input class="form-control @error(\App\Helpers\Helpers::formatAttributeNameToRequestName($name)) is-invalid @enderror" name="{{ $name }}" type="{{ $type }}" value="{{ $value }}" required>
@error(\App\Helpers\Helpers::formatAttributeNameToRequestName($name))
<span class="invalid-feedback">{{ $message }}</span>
@enderror

View File

@@ -0,0 +1,34 @@
<td>
@if(isset($lang['id']))
<input type="hidden" name="{{ $name . '[items][' .$index . '][id]' }}" value="{{ $lang['id'] }}">
@endif
@include('components.volt.forms.languages.input', [
'value' => $lang['title'],
'name' => $name . '[items][' .$index . '][title]',
'type' => 'text',
])
</td>
<td>
@include('components.volt.forms.languages.input', [
'value' => $lang['code'],
'name' => $name . '[items][' . $index . '][code]',
'type' => 'text',
])
</td>
<td>
@include('components.volt.forms.languages.input', [
'value' => $lang['sort'],
'name' => $name . '[items][' . $index . '][sort]',
'type' => 'number',
])
</td>
<td class="align-middle">
@include('components.volt.forms.languages.radio', [
'value' => $index,
'checked' => $lang['is_default'],
'name' => $name . '[default]',
])
</td>
<td>
<button class="btn btn-danger delete" type="button">X</button>
</td>

View File

@@ -0,0 +1,4 @@
<input class="form-check-input @error(\App\Helpers\Helpers::formatAttributeNameToRequestName($name)) is-invalid @enderror" type="radio" @checked($checked) name="{{ $name }}" value="{{ $value }}">
@error(\App\Helpers\Helpers::formatAttributeNameToRequestName($name))
<span class="invalid-feedback">{{ $message }}</span>
@enderror

View File

@@ -0,0 +1,16 @@
<div class="mb-4">
<div class="h5 pb-3">{{ $title }}</div>
@error($requestName)
<span class="invalid-feedback d-block pb-3">{{ $message }}</span>
@enderror
<div class="row">
@foreach($list as $elementValue => $elementTitle)
<div class="form-check">
<input class="form-check-input" type="checkbox" name="{{ $name }}" value="{{ $elementValue }}" @checked(array_search($elementValue, $value) !== false) id="form-checkbox-{{ $requestName }}-{{ $loop->index }}">
<label class="form-check-label" for="form-checkbox-{{ $requestName }}-{{ $loop->index }}">
{{ $elementTitle }}
</label>
</div>
@endforeach
</div>
</div>

View File

@@ -0,0 +1,24 @@
<div class="pt-3">
<div class="h5 pb-3">{{ $title }}</div>
@error($requestName)
<span class="invalid-feedback d-block pb-3">{{ $message }}</span>
@enderror
@foreach($permissions as $mainPermission)
<div class="row ps-3">
<div class="mb-3">
<span class="h6 fw-bold">{{ $mainPermission->getTitle() }}</span>
</div>
<ul>
@foreach($mainPermission->getPermissions() as $keyPermission => $permission)
<li class="form-check">
<input class="form-check-input" type="checkbox" value="{{ $mainPermission->formatValue($keyPermission) }}" name="{{ $name }}" @checked($role->is_admin || $value->search($mainPermission->formatValue($keyPermission)) !== false) @disabled($role->is_admin) id="form-permission-{{ $requestName }}-{{ $mainPermission->name }}-{{ $keyPermission }}">
<label class="form-check-label" for="form-permission-{{ $requestName }}-{{ $mainPermission->name }}-{{ $keyPermission }}">
{{ $permission }}
</label>
</li>
@endforeach
</ul>
<hr>
</div>
@endforeach
</div>

View File

@@ -0,0 +1,12 @@
<div class="mb-4">
<label for="form-select-{{ $requestName }}">{{ $title }}</label>
<select id="form-select-{{ $requestName }}" aria-label="{{ $title }}" class="form-select @error($requestName) is-invalid @enderror" name="{{ $name }}" {{ $attributes }}>
{{ $slot }}
@foreach($list as $elementKey => $elementValue)
<option value="{{ $elementKey }}" @selected((string) $elementKey === (string) $value)>{{ $elementValue }}</option>
@endforeach
</select>
@error($requestName)
<span class="invalid-feedback">{{ $message }}</span>
@enderror
</div>

View File

@@ -0,0 +1,32 @@
<div class="upload-image mt-3 mb-4 rounded border border-1 p-3" data-morph="{{ $morph->value }}" data-storage-type="{{ $storageType->value }}" data-accepted-files="{{
$acceptedFiles->map(function (string $name) {
return '.' . $name;
})->implode(',')
}}">
<label>{{ $title }}</label>
<div>
<div class="mb-3 add-image" @if(\is_null($storage?->id)) style="display: none;" @endif>
<div class="position-relative d-inline-block">
<img class="img-fluid" src="{{ $storage->url ?? '' }}">
<button class="btn btn-danger m-0 add-image__remove position-absolute top-0 end-0" type="button">X</button>
</div>
</div>
<button class="btn btn-outline-primary upload-image__button" type="button">{{ __('Select images') }} ({{ $acceptedFiles->implode(', ') }})</button>
<div class="progress-wrapper" style="display: none">
<div class="progress-info">
<div class="progress-label">
<span class="text-success">{{ __('loading') }}</span>
</div>
<div class="progress-percentage">
<span class="upload-image__progressbar-text">0%</span>
</div>
</div>
<div class="progress">
<div class="progress-bar bg-success" role="progressbar" style="width: 0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</div>
<span class="invalid-feedback upload-image__error"></span>
<x-volt.forms.input-type-hidden :name="$name . '[file]'" class="save" :value="$storage->id ?? ''" />
<x-volt.forms.input-type-hidden :name="$name . '[delete]'" class="delete" value="0" />
</div>

View File

@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>@yield('meta_title', '')</title>
<meta name="keywords" content="@yield('meta_keywords', '')" />
<meta name="description" content="@yield('meta_description', '')" />
@vite('resources/volt/scss/app.scss')
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="theme-color" content="#ffffff">
</head>
<body>
<main>
<!-- Section -->
<section class="vh-lg-100 mt-5 mt-lg-0 bg-soft d-flex align-items-center">
<div class="container">
{{ $slot }}
</div>
</section>
</main>
@vite('resources/volt/js/app.js')
</body>
</html>

View File

@@ -0,0 +1,135 @@
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>@yield('meta_title', '')</title>
<meta name="keywords" content="@yield('meta_keywords', '')" />
<meta name="description" content="@yield('meta_description', '')" />
@vite('resources/volt/scss/app.scss')
<meta name="csrf-token" content="{{ csrf_token() }}">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="theme-color" content="#ffffff">
</head>
<body>
<nav class="navbar navbar-dark navbar-theme-primary px-4 col-12 d-lg-none">
<span class="navbar-brand me-lg-5">
</span>
<div class="d-flex align-items-center">
<button class="navbar-toggler d-lg-none collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
<span class="navbar-toggler-icon"></span>
</button>
</div>
</nav>
<nav id="sidebarMenu" class="sidebar d-lg-block bg-gray-800 text-white collapse" data-simplebar>
<div class="sidebar-inner px-lg-2 px-4 pt-3">
<div class="user-card d-flex d-md-none align-items-center justify-content-between justify-content-md-center pb-4">
<div class="d-flex align-items-center">
<div class="avatar-lg me-4">
<svg class="card-img-top rounded-circle border-white" fill="#fff" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-6-3a2 2 0 11-4 0 2 2 0 014 0zm-2 4a5 5 0 00-4.546 2.916A5.986 5.986 0 0010 16a5.986 5.986 0 004.546-2.084A5 5 0 0010 11z" clip-rule="evenodd"></path></svg>
</div>
<div class="d-block">
<h2 class="h5 mb-3">{{ __('Hello') }}, {{ auth()->user()->name ?? '' }}</h2>
<form method="post" action="{{ route('logout') }}">
@csrf
<button class="btn btn-secondary btn-sm d-inline-flex align-items-center" type="submit">
<svg class="icon icon-xxs me-1" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"></path></svg>
{{ __('Sign Out') }}
</button>
</form>
</div>
</div>
<div class="collapse-close d-md-none">
<a href="#sidebarMenu" data-bs-toggle="collapse"
data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="true"
aria-label="{{ __('Toggle navigation') }}">
<svg class="icon icon-xs" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>
</a>
</div>
</div>
<ul class="nav flex-column pt-3 pt-md-0">
<li class="nav-item">
<a href="{{ route('admin.home') }}" class="nav-link d-flex align-items-center">
<span class="mt-1 ms-1 sidebar-text">{!! __('Create a website for the project') !!}</span>
</a>
</li>
@if(!empty($navigation))
@include($navigation)
@endif
</ul>
</div>
</nav>
<main class="content min-vh-100 position-relative pb-7 pb-lg-5">
<nav class="navbar navbar-top navbar-expand navbar-dashboard navbar-dark ps-0 pe-2 pb-2 pb-lg-3">
<div class="container-fluid px-0">
<div class="d-flex justify-content-between w-100" id="navbarSupportedContent">
<div class="d-flex align-items-center">
<h1 class="h3">@yield('h1', '')</h1>
</div>
<!-- Navbar links -->
<ul class="navbar-nav align-items-center">
<li class="nav-item dropdown ms-lg-3">
<a class="nav-link dropdown-toggle pt-1 px-0" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
<div class="media d-flex align-items-center">
<svg class="avatar rounded-circle" fill="#000" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-6-3a2 2 0 11-4 0 2 2 0 014 0zm-2 4a5 5 0 00-4.546 2.916A5.986 5.986 0 0010 16a5.986 5.986 0 004.546-2.084A5 5 0 0010 11z" clip-rule="evenodd"></path></svg>
<div class="media-body ms-2 text-dark align-items-center d-none d-lg-block">
<span class="mb-0 font-small fw-bold text-gray-900">{{ auth()->user()->name ?? '' }}</span>
</div>
</div>
</a>
<div class="dropdown-menu dashboard-dropdown dropdown-menu-end mt-2 py-1">
<a class="dropdown-item d-flex align-items-center" href="{{ route('profile.edit') }}">
<svg class="dropdown-icon text-gray-400 me-2" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-6-3a2 2 0 11-4 0 2 2 0 014 0zm-2 4a5 5 0 00-4.546 2.916A5.986 5.986 0 0010 16a5.986 5.986 0 004.546-2.084A5 5 0 0010 11z" clip-rule="evenodd"></path></svg>
{{ __('My Profile') }}
</a>
<a class="dropdown-item d-flex align-items-center" href="{{ route('profile.settings') }}">
<svg class="dropdown-icon text-gray-400 me-2" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z" clip-rule="evenodd"></path></svg>
{{ __('Settings') }}
</a>
<div role="separator" class="dropdown-divider my-1"></div>
<form method="post" action="{{ route('logout') }}">
@csrf
<button class="dropdown-item d-flex align-items-center" type="submit">
<svg class="dropdown-icon text-danger me-2" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"></path></svg>
{{ __('Logout') }}
</button>
</form>
</div>
</li>
</ul>
</div>
</div>
</nav>
@includeWhen($errors->any(), 'layout.private._errors', ['errors' => $errors->all()])
@includeWhen(Session::has('success'), 'layout.private._success', ['success' => Session::get('success')])
{{ $slot }}
<footer class="bg-white shadow p-3 position-absolute start-0 end-0 bottom-0">
<div class="row">
<div class="col-12 col-md-4 col-xl-6 mb-4 mb-md-0">
<p class="mb-0 text-center text-lg-start">Copyright © 2024-<span class="current-year"></span> <a href="https://git.kor-elf.net/kor-elf/" target="_blank" class="text-gray-700">Leonid Nikitin (kor-elf)</a></p>
</div>
<div class="col-12 col-md-8 col-xl-6 text-center text-lg-start">
<!-- List -->
<ul class="list-inline list-group-flush list-group-borderless text-md-end mb-0">
<li class="list-inline-item px-0 px-sm-2">
<a class="text-gray-700 fw-normal" href="https://themesberg.com/product/admin-dashboard/volt-bootstrap-5-dashboard" target="_blank">Volt - Bootstrap 5 Dashboard Template</a>
</li>
</ul>
</div>
</div>
</footer>
</main>
@vite('resources/volt/js/app.js')
@stack('scripts')
</body>
</html>

View File

@@ -0,0 +1,9 @@
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<span class="fas fa-bullhorn me-1"></span>
<ul>
@foreach($errors as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
<button type="button" class="btn-close btn-sm" data-bs-dismiss="alert" aria-label="Close"></button>
</div>

View File

@@ -0,0 +1,5 @@
<div class="alert alert-success alert-dismissible fade show" role="alert">
<span class="fas fa-bullhorn me-1"></span>
{{ $success }}
<button type="button" class="btn-close btn-sm" data-bs-dismiss="alert" aria-label="Close"></button>
</div>

View File

@@ -0,0 +1,63 @@
@section('meta_title', __('Sign in to our platform'))
<x-auth-layout>
<div class="row justify-content-center form-bg-image" data-background-lg="{{ Vite::asset('resources/volt/images/illustrations/signin.svg') }}">
<div class="col-12 d-flex align-items-center justify-content-center">
<div class="bg-white shadow border-0 rounded border-light p-4 p-lg-5 w-100 fmxw-500">
<div class="text-center text-md-center mb-4 mt-md-0">
<h1 class="mb-0 h3">{{ __('Sign in to our platform') }}</h1>
</div>
@if ($errors->any())
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
<form action="{{ route('authorization') }}" class="mt-4" method="post">
@csrf
<!-- Form -->
<div class="form-group mb-4">
<label for="email">{{ __('Your Email') }}</label>
<div class="input-group">
<span class="input-group-text" id="basic-addon1">
<svg class="icon icon-xs text-gray-600" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884z"></path><path d="M18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z"></path></svg>
</span>
<input type="email" name="email" class="form-control" placeholder="example@company.com" id="email" autofocus required>
</div>
</div>
<!-- End of Form -->
<div class="form-group">
<!-- Form -->
<div class="form-group mb-4">
<label for="password">{{ __('Your Password') }}</label>
<div class="input-group">
<span class="input-group-text" id="basic-addon2">
<svg class="icon icon-xs text-gray-600" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z" clip-rule="evenodd"></path></svg>
</span>
<input type="password" name="password" placeholder="Password" class="form-control" id="password" required>
</div>
</div>
<!-- End of Form -->
<div class="d-flex justify-content-between align-items-top mb-4">
<div class="form-check">
<input name="remember" type="hidden" value="0">
<input class="form-check-input" name="remember" type="checkbox" value="1" id="remember">
<label class="form-check-label mb-0" for="remember">
{{ __('Remember me') }}
</label>
</div>
</div>
<div class="form-group mb-4">
@captcha
</div>
</div>
<div class="d-grid">
<button type="submit" class="btn btn-gray-800">{{ __('Sign in') }}</button>
</div>
</form>
</div>
</div>
</div>
</x-auth-layout>

View File

@@ -0,0 +1,34 @@
@can('AdminPanel')
<li class="nav-item">
<a href="{{ route('admin.home') }}" class="nav-link">
<span class="sidebar-icon">
<svg class="icon icon-xs me-2" data-slot="icon" fill="none" stroke-width="1.5" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="M6.429 9.75 2.25 12l4.179 2.25m0-4.5 5.571 3 5.571-3m-11.142 0L2.25 7.5 12 2.25l9.75 5.25-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0 4.179 2.25L12 21.75 2.25 16.5l4.179-2.25m11.142 0-5.571 3-5.571-3"></path>
</svg>
</span>
<span class="sidebar-text">{{ __('admin-sections.AdminPanel') }}</span>
</a>
</li>
@endif
<li @class([
'nav-item',
'active' => request()->route()->named('profile.edit'),
])>
<a href="{{ route('profile.edit') }}" class="nav-link">
<span class="sidebar-icon">
<svg class="icon icon-xs me-2" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-6-3a2 2 0 11-4 0 2 2 0 014 0zm-2 4a5 5 0 00-4.546 2.916A5.986 5.986 0 0010 16a5.986 5.986 0 004.546-2.084A5 5 0 0010 11z" clip-rule="evenodd"></path></svg>
</span>
<span class="sidebar-text">{{ __('My Profile') }}</span>
</a>
</li>
<li @class([
'nav-item',
'active' => request()->route()->named('profile.settings'),
])>
<a href="{{ route('profile.settings') }}" class="nav-link">
<span class="sidebar-icon">
<svg class="icon icon-xs me-2" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z" clip-rule="evenodd"></path></svg>
</span>
<span class="sidebar-text">{{ __('Settings') }}</span>
</a>
</li>

View File

@@ -0,0 +1,34 @@
@section('meta_title', __('My Profile'))
@section('h1', __('My Profile'))
<x-private.layout>
<div class="row">
<div class="col-12 mb-4">
<div class="card border-0 shadow components-section">
<div class="card-body">
<form method="post" action="{{ route('profile.update') }}">
@csrf
@method('PUT')
<x-volt.forms.input :title="__('validation.attributes.email')" name="email" type="email" :value="$user->email" disabled required />
<x-volt.forms.input :title="__('validation.attributes.name')" name="name" type="text" :value="$user->name" required autofocus />
<button class="btn btn-primary" type="submit">{{ __('Save') }}</button>
</form>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-12 mb-4">
<div class="card border-0 shadow components-section">
<div class="card-body">
<form method="post" action="{{ route('profile.update-password') }}">
@csrf
@method('PUT')
<x-volt.forms.input :title="__('validation.attributes.password')" name="password" type="password" required />
<x-volt.forms.input :title="__('validation.attributes.password_confirmation')" name="password_confirmation" type="password" required />
<button class="btn btn-primary" type="submit">{{ __('Save') }}</button>
</form>
</div>
</div>
</div>
</div>
</x-private.layout>

View File

@@ -0,0 +1,23 @@
@section('meta_title', __('Settings'))
@section('h1', __('Settings'))
<x-private.layout>
<div class="row">
<div class="col-12 mb-4">
<div class="card border-0 shadow components-section">
<div class="card-body">
<form method="post" action="{{ route('profile.update-settings') }}">
@csrf
@method('PUT')
<x-volt.forms.select :title="__('validation.attributes.lang')" name="lang" :list="$languages" :value="$user->lang?->value">
<option value="">{{ __('Default') }}</option>
</x-volt.forms.select>
<x-volt.forms.select :title="__('validation.attributes.timezone')" name="timezone" :list="$timezone" :value="$user->timezone">
<option value="">{{ __('Default') }}</option>
</x-volt.forms.select>
<button class="btn btn-primary" type="submit">{{ __('Save') }}</button>
</form>
</div>
</div>
</div>
</div>
</x-private.layout>