Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
b7a79e9479
|
|||
|
85ae2d033e
|
|||
|
6a1458304a
|
|||
|
e33d1ddade
|
2587
.phpstorm.meta.php
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A helper file for Laravel, to provide autocomplete information to your IDE
|
* A helper file for Laravel, to provide autocomplete information to your IDE
|
||||||
* Generated for Laravel 11.40.0.
|
* Generated for Laravel 11.37.0.
|
||||||
*
|
*
|
||||||
* This file should not be included in your code, only analyzed by your IDE!
|
* This file should not be included in your code, only analyzed by your IDE!
|
||||||
*
|
*
|
||||||
@@ -4765,9 +4765,9 @@ namespace Illuminate\Support\Facades {
|
|||||||
*
|
*
|
||||||
* @template TCacheValue
|
* @template TCacheValue
|
||||||
* @param string $key
|
* @param string $key
|
||||||
* @param array{ 0: \DateTimeInterface|\DateInterval|int, 1: \DateTimeInterface|\DateInterval|int } $ttl
|
* @param \Illuminate\Cache\array{ 0: \DateTimeInterface|\DateInterval|int, 1: \DateTimeInterface|\DateInterval|int } $ttl
|
||||||
* @param (callable(): TCacheValue) $callback
|
* @param (callable(): TCacheValue) $callback
|
||||||
* @param array{ seconds?: int, owner?: string }|null $lock
|
* @param \Illuminate\Cache\array{ seconds?: int, owner?: string }|null $lock
|
||||||
* @return TCacheValue
|
* @return TCacheValue
|
||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
@@ -4850,18 +4850,6 @@ namespace Illuminate\Support\Facades {
|
|||||||
return $instance->tags($names);
|
return $instance->tags($names);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the name of the cache store.
|
|
||||||
*
|
|
||||||
* @return string|null
|
|
||||||
* @static
|
|
||||||
*/
|
|
||||||
public static function getName()
|
|
||||||
{
|
|
||||||
/** @var \Illuminate\Cache\Repository $instance */
|
|
||||||
return $instance->getName();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if the current store supports tags.
|
* Determine if the current store supports tags.
|
||||||
*
|
*
|
||||||
@@ -14334,7 +14322,7 @@ namespace Illuminate\Support\Facades {
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @internal
|
* @internal
|
||||||
* @param callable(): SessionInterface $factory
|
* @param \Symfony\Component\HttpFoundation\callable(): SessionInterface $factory
|
||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
public static function setSessionFactory($factory)
|
public static function setSessionFactory($factory)
|
||||||
@@ -15806,19 +15794,6 @@ namespace Illuminate\Support\Facades {
|
|||||||
return $instance->enums($key, $enumClass);
|
return $instance->enums($key, $enumClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Retrieve data from the instance as an array.
|
|
||||||
*
|
|
||||||
* @param array|string|null $key
|
|
||||||
* @return array
|
|
||||||
* @static
|
|
||||||
*/
|
|
||||||
public static function array($key = null)
|
|
||||||
{
|
|
||||||
/** @var \Illuminate\Http\Request $instance */
|
|
||||||
return $instance->array($key);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve data from the instance as a collection.
|
* Retrieve data from the instance as a collection.
|
||||||
*
|
*
|
||||||
@@ -22186,7 +22161,7 @@ namespace Illuminate\Support\Facades {
|
|||||||
/**
|
/**
|
||||||
* Set the prefetching strategy.
|
* Set the prefetching strategy.
|
||||||
*
|
*
|
||||||
* @param 'waterfall'|'aggressive'|null $strategy
|
* @param \Illuminate\Foundation\'waterfall'|\Illuminate\Foundation\'aggressive'|null $strategy
|
||||||
* @param array $config
|
* @param array $config
|
||||||
* @return \Illuminate\Foundation\Vite
|
* @return \Illuminate\Foundation\Vite
|
||||||
* @static
|
* @static
|
||||||
@@ -22665,7 +22640,7 @@ namespace Barryvdh\Debugbar\Facades {
|
|||||||
/**
|
/**
|
||||||
* Returns an array of all data collectors
|
* Returns an array of all data collectors
|
||||||
*
|
*
|
||||||
* @return array[DataCollectorInterface]
|
* @return \DebugBar\array[DataCollectorInterface]
|
||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
public static function getCollectors()
|
public static function getCollectors()
|
||||||
@@ -24256,23 +24231,6 @@ namespace {
|
|||||||
return $instance->updateOrCreate($attributes, $values);
|
return $instance->updateOrCreate($attributes, $values);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a record matching the attributes, or increment the existing record.
|
|
||||||
*
|
|
||||||
* @param array $attributes
|
|
||||||
* @param string $column
|
|
||||||
* @param int|float $default
|
|
||||||
* @param int|float $step
|
|
||||||
* @param array $extra
|
|
||||||
* @return TModel
|
|
||||||
* @static
|
|
||||||
*/
|
|
||||||
public static function incrementOrCreate($attributes, $column = 'count', $default = 1, $step = 1, $extra = [])
|
|
||||||
{
|
|
||||||
/** @var \Illuminate\Database\Eloquent\Builder $instance */
|
|
||||||
return $instance->incrementOrCreate($attributes, $column, $default, $step, $extra);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute the query and get the first result or throw an exception.
|
* Execute the query and get the first result or throw an exception.
|
||||||
*
|
*
|
||||||
@@ -24644,22 +24602,6 @@ namespace {
|
|||||||
return $instance->newModelInstance($attributes);
|
return $instance->newModelInstance($attributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Specify attributes that should be added to any new models created by this builder.
|
|
||||||
*
|
|
||||||
* The given key / value pairs will also be added as where conditions to the query.
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Contracts\Database\Query\Expression|array|string $attributes
|
|
||||||
* @param mixed $value
|
|
||||||
* @return \Illuminate\Database\Eloquent\Builder<static>
|
|
||||||
* @static
|
|
||||||
*/
|
|
||||||
public static function withAttributes($attributes, $value = null)
|
|
||||||
{
|
|
||||||
/** @var \Illuminate\Database\Eloquent\Builder $instance */
|
|
||||||
return $instance->withAttributes($attributes, $value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Apply query-time casts to the model instance.
|
* Apply query-time casts to the model instance.
|
||||||
*
|
*
|
||||||
@@ -24866,7 +24808,7 @@ namespace {
|
|||||||
* Chunk the results of the query.
|
* Chunk the results of the query.
|
||||||
*
|
*
|
||||||
* @param int $count
|
* @param int $count
|
||||||
* @param callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
|
* @param \Illuminate\Database\Eloquent\callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
|
||||||
* @return bool
|
* @return bool
|
||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
@@ -24880,7 +24822,7 @@ namespace {
|
|||||||
* Run a map over each item while chunking.
|
* Run a map over each item while chunking.
|
||||||
*
|
*
|
||||||
* @template TReturn
|
* @template TReturn
|
||||||
* @param callable(TValue): TReturn $callback
|
* @param \Illuminate\Database\Eloquent\callable(TValue): TReturn $callback
|
||||||
* @param int $count
|
* @param int $count
|
||||||
* @return \Illuminate\Support\Collection<int, TReturn>
|
* @return \Illuminate\Support\Collection<int, TReturn>
|
||||||
* @static
|
* @static
|
||||||
@@ -24894,7 +24836,7 @@ namespace {
|
|||||||
/**
|
/**
|
||||||
* Execute a callback over each item while chunking.
|
* Execute a callback over each item while chunking.
|
||||||
*
|
*
|
||||||
* @param callable(TValue, int): mixed $callback
|
* @param \Illuminate\Database\Eloquent\callable(TValue, int): mixed $callback
|
||||||
* @param int $count
|
* @param int $count
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws \RuntimeException
|
* @throws \RuntimeException
|
||||||
@@ -24910,7 +24852,7 @@ namespace {
|
|||||||
* Chunk the results of a query by comparing IDs.
|
* Chunk the results of a query by comparing IDs.
|
||||||
*
|
*
|
||||||
* @param int $count
|
* @param int $count
|
||||||
* @param callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
|
* @param \Illuminate\Database\Eloquent\callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
|
||||||
* @param string|null $column
|
* @param string|null $column
|
||||||
* @param string|null $alias
|
* @param string|null $alias
|
||||||
* @return bool
|
* @return bool
|
||||||
@@ -24926,7 +24868,7 @@ namespace {
|
|||||||
* Chunk the results of a query by comparing IDs in descending order.
|
* Chunk the results of a query by comparing IDs in descending order.
|
||||||
*
|
*
|
||||||
* @param int $count
|
* @param int $count
|
||||||
* @param callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
|
* @param \Illuminate\Database\Eloquent\callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
|
||||||
* @param string|null $column
|
* @param string|null $column
|
||||||
* @param string|null $alias
|
* @param string|null $alias
|
||||||
* @return bool
|
* @return bool
|
||||||
@@ -24942,7 +24884,7 @@ namespace {
|
|||||||
* Chunk the results of a query by comparing IDs in a given order.
|
* Chunk the results of a query by comparing IDs in a given order.
|
||||||
*
|
*
|
||||||
* @param int $count
|
* @param int $count
|
||||||
* @param callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
|
* @param \Illuminate\Database\Eloquent\callable(\Illuminate\Support\Collection<int, TValue>, int): mixed $callback
|
||||||
* @param string|null $column
|
* @param string|null $column
|
||||||
* @param string|null $alias
|
* @param string|null $alias
|
||||||
* @param bool $descending
|
* @param bool $descending
|
||||||
@@ -24959,7 +24901,7 @@ namespace {
|
|||||||
/**
|
/**
|
||||||
* Execute a callback over each item while chunking by ID.
|
* Execute a callback over each item while chunking by ID.
|
||||||
*
|
*
|
||||||
* @param callable(TValue, int): mixed $callback
|
* @param \Illuminate\Database\Eloquent\callable(TValue, int): mixed $callback
|
||||||
* @param int $count
|
* @param int $count
|
||||||
* @param string|null $column
|
* @param string|null $column
|
||||||
* @param string|null $alias
|
* @param string|null $alias
|
||||||
@@ -25049,7 +24991,7 @@ namespace {
|
|||||||
/**
|
/**
|
||||||
* Pass the query to a given callback.
|
* Pass the query to a given callback.
|
||||||
*
|
*
|
||||||
* @param callable($this): mixed $callback
|
* @param \Illuminate\Database\Eloquent\callable($this): mixed $callback
|
||||||
* @return \Illuminate\Database\Eloquent\Builder<static>
|
* @return \Illuminate\Database\Eloquent\Builder<static>
|
||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
@@ -25496,7 +25438,7 @@ namespace {
|
|||||||
* Add a morph-to relationship condition to the query.
|
* Add a morph-to relationship condition to the query.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
|
* @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
|
||||||
* @param \Illuminate\Database\Eloquent\Model|iterable<int, \Illuminate\Database\Eloquent\Model>|string|null $model
|
* @param \Illuminate\Database\Eloquent\Model|string|null $model
|
||||||
* @return \Illuminate\Database\Eloquent\Builder<static>
|
* @return \Illuminate\Database\Eloquent\Builder<static>
|
||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
@@ -25510,7 +25452,7 @@ namespace {
|
|||||||
* Add a not morph-to relationship condition to the query.
|
* Add a not morph-to relationship condition to the query.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
|
* @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
|
||||||
* @param \Illuminate\Database\Eloquent\Model|iterable<int, \Illuminate\Database\Eloquent\Model>|string $model
|
* @param \Illuminate\Database\Eloquent\Model|string $model
|
||||||
* @return \Illuminate\Database\Eloquent\Builder<static>
|
* @return \Illuminate\Database\Eloquent\Builder<static>
|
||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
@@ -25524,7 +25466,7 @@ namespace {
|
|||||||
* Add a morph-to relationship condition to the query with an "or where" clause.
|
* Add a morph-to relationship condition to the query with an "or where" clause.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
|
* @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
|
||||||
* @param \Illuminate\Database\Eloquent\Model|iterable<int, \Illuminate\Database\Eloquent\Model>|string|null $model
|
* @param \Illuminate\Database\Eloquent\Model|string|null $model
|
||||||
* @return \Illuminate\Database\Eloquent\Builder<static>
|
* @return \Illuminate\Database\Eloquent\Builder<static>
|
||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
@@ -25538,7 +25480,7 @@ namespace {
|
|||||||
* Add a not morph-to relationship condition to the query with an "or where" clause.
|
* Add a not morph-to relationship condition to the query with an "or where" clause.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
|
* @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation
|
||||||
* @param \Illuminate\Database\Eloquent\Model|iterable<int, \Illuminate\Database\Eloquent\Model>|string $model
|
* @param \Illuminate\Database\Eloquent\Model|string $model
|
||||||
* @return \Illuminate\Database\Eloquent\Builder<static>
|
* @return \Illuminate\Database\Eloquent\Builder<static>
|
||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Console\Commands;
|
|
||||||
|
|
||||||
use App\Enums\RoleName;
|
|
||||||
use App\Models\Role;
|
|
||||||
use App\Models\User;
|
|
||||||
use Illuminate\Console\Command;
|
|
||||||
use Illuminate\Contracts\Console\PromptsForMissingInput;
|
|
||||||
use Illuminate\Support\Facades\Hash;
|
|
||||||
|
|
||||||
class CreateAdmin extends Command implements PromptsForMissingInput
|
|
||||||
{
|
|
||||||
protected $signature = 'app:create-admin {user : E-Mail for the admin account} {password : Password for the admin account}';
|
|
||||||
protected $description = 'Creates a super admin for the system';
|
|
||||||
|
|
||||||
public function handle(): void
|
|
||||||
{
|
|
||||||
$user = $this->argument('user');
|
|
||||||
$password = $this->argument('password');
|
|
||||||
|
|
||||||
$user = User::create([
|
|
||||||
'name' => $user,
|
|
||||||
'email' => $user,
|
|
||||||
'password' => Hash::make($password),
|
|
||||||
]);
|
|
||||||
|
|
||||||
$role = Role::where('name', RoleName::SuperAdmin)->first();
|
|
||||||
$user->roles()->attach($role);
|
|
||||||
|
|
||||||
$this->info("Admin account created");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -58,7 +58,7 @@ class ResetPassword extends Component
|
|||||||
);
|
);
|
||||||
|
|
||||||
if ($status === Password::PASSWORD_RESET) {
|
if ($status === Password::PASSWORD_RESET) {
|
||||||
$this->toast()->success("Éxito", __($status))->flash()->send();
|
Session::flash('toast', ['type' => 'success', 'message' => __($status)]);
|
||||||
$this->redirectRoute('login', navigate: true);
|
$this->redirectRoute('login', navigate: true);
|
||||||
} else {
|
} else {
|
||||||
throw ValidationException::withMessages(['email' => __($status)]);
|
throw ValidationException::withMessages(['email' => __($status)]);
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ use Illuminate\Pagination\LengthAwarePaginator;
|
|||||||
use Illuminate\Support\Facades\Session;
|
use Illuminate\Support\Facades\Session;
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
use Livewire\Attributes\Computed;
|
use Livewire\Attributes\Computed;
|
||||||
|
use Livewire\Attributes\On;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
use Livewire\WithPagination;
|
use Livewire\WithPagination;
|
||||||
use Log;
|
use Log;
|
||||||
@@ -21,8 +22,6 @@ class Index extends Component
|
|||||||
|
|
||||||
public $searchFecha = null;
|
public $searchFecha = null;
|
||||||
|
|
||||||
public $modal = false;
|
|
||||||
|
|
||||||
public $fecha = null;
|
public $fecha = null;
|
||||||
|
|
||||||
public $caja = null;
|
public $caja = null;
|
||||||
@@ -36,15 +35,16 @@ class Index extends Component
|
|||||||
|
|
||||||
public function createTurno(): void
|
public function createTurno(): void
|
||||||
{
|
{
|
||||||
$this->modal = true;
|
|
||||||
$this->fecha = now()->format('Y-m-d');
|
$this->fecha = now()->format('Y-m-d');
|
||||||
$this->caja = 1;
|
$this->caja = 1;
|
||||||
|
|
||||||
if (Turno::where('fecha', $this->fecha)->exists()) {
|
if (Turno::where('fecha', now())->exists()) {
|
||||||
$this->turno = Turno::where('fecha', $this->fecha)->max('numero_turno') + 1;
|
$this->turno = Turno::where('fecha', now())->max('numero_turno') + 1;
|
||||||
} else {
|
} else {
|
||||||
$this->turno = 1;
|
$this->turno = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->dispatch('show-modal', "turno");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function storeTurno(): void
|
public function storeTurno(): void
|
||||||
@@ -82,19 +82,21 @@ class Index extends Component
|
|||||||
'diez' => 0,
|
'diez' => 0,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->toast()->success("Éxito", "Caja registrada correctamente")->flash()->send();
|
Session::flash('toast', ['type' => 'success', 'message' => 'Caja registrada correctamente']);
|
||||||
|
|
||||||
$this->redirectRoute('cajas.edit', $turno, navigate: true);
|
$this->redirectRoute('cajas.edit', $turno, navigate: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[On('close-modal-turno')]
|
||||||
public function closeTurnoModal(): void
|
public function closeTurnoModal(): void
|
||||||
{
|
{
|
||||||
$this->modal = false;
|
Log::info("Cerrando modal");
|
||||||
$this->fecha = null;
|
$this->fecha = null;
|
||||||
$this->caja = null;
|
$this->caja = null;
|
||||||
$this->turno = null;
|
$this->turno = null;
|
||||||
|
|
||||||
$this->clearValidation();
|
$this->clearValidation();
|
||||||
|
$this->dispatch('hide-modal', 'turno');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function confirmDelete($id): void
|
public function confirmDelete($id): void
|
||||||
@@ -113,20 +115,6 @@ class Index extends Component
|
|||||||
$this->toast()->success('Turno eliminado correctamente')->send();
|
$this->toast()->success('Turno eliminado correctamente')->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[Computed]
|
|
||||||
public function headers(): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
['index' => 'fecha', 'label' => 'Fecha'],
|
|
||||||
['index' => 'numero_caja', 'label' => 'Caja'],
|
|
||||||
['index' => 'numero_turno', 'label' => 'Turno'],
|
|
||||||
['index' => 'ingresos', 'label' => 'Ingresos'],
|
|
||||||
['index' => 'egresos', 'label' => 'Egresos'],
|
|
||||||
['index' => 'arqueo', 'label' => 'Arqueo'],
|
|
||||||
['index' => 'action', 'label' => 'Acciones'],
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
#[Computed]
|
#[Computed]
|
||||||
public function rows(): LengthAwarePaginator
|
public function rows(): LengthAwarePaginator
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ use App\Models\Role;
|
|||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use Illuminate\Contracts\View\View;
|
use Illuminate\Contracts\View\View;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\Facades\Gate;
|
|
||||||
use Illuminate\Support\Facades\Hash;
|
use Illuminate\Support\Facades\Hash;
|
||||||
use Illuminate\Support\Facades\Session;
|
use Illuminate\Support\Facades\Session;
|
||||||
use Illuminate\Validation\Rule;
|
use Illuminate\Validation\Rule;
|
||||||
@@ -54,7 +53,7 @@ class Edit extends Component
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'name' => 'required|string',
|
'name' => 'required|string',
|
||||||
'email' => ['required', 'email', Rule::unique('users', 'email')->ignore($this->user?->id)],
|
'email' => ['required', 'email', Rule::unique('users', 'email')->ignore($this->user->id)],
|
||||||
'password' => $this->change_password ? 'required|string|min:8|confirmed' : 'nullable|string|min:8|confirmed',
|
'password' => $this->change_password ? 'required|string|min:8|confirmed' : 'nullable|string|min:8|confirmed',
|
||||||
'password_confirmation' => $this->change_password ? 'required' : 'nullable',
|
'password_confirmation' => $this->change_password ? 'required' : 'nullable',
|
||||||
'roles' => 'nullable',
|
'roles' => 'nullable',
|
||||||
@@ -87,26 +86,19 @@ class Edit extends Component
|
|||||||
|
|
||||||
$this->user->save();
|
$this->user->save();
|
||||||
|
|
||||||
$isSuperAdmin = $this->user->isAn(RoleName::SuperAdmin);
|
$isSuperAdmin = $this->user->roles()->where('name', RoleName::SuperAdmin)->exists();
|
||||||
|
$this->user->roles()->sync($this->roles);
|
||||||
if ($isSuperAdmin) {
|
if ($isSuperAdmin) {
|
||||||
$this->roles[] = Role::where('name', RoleName::SuperAdmin)->first()->id;
|
$this->user->roles()->attach(Role::where('name', RoleName::SuperAdmin)->first()->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->user->roles()->sync($this->roles);
|
Session::flash('toast', ['type' => 'success', 'message' => 'Usuario modificado correctamente']);
|
||||||
|
|
||||||
$this->toast()->success("Éxito", "Usuario modificado correctamente")->flash()->send();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function store(): void
|
public function store(): void
|
||||||
{
|
{
|
||||||
$this->authorize('create', User::class);
|
$this->authorize('create', User::class);
|
||||||
|
|
||||||
$superadmin = Role::whereName(RoleName::SuperAdmin)->first();
|
|
||||||
|
|
||||||
if(collect($this->roles)->contains($superadmin->id)) {
|
|
||||||
Gate::authorize('create-super-admin', User::class);
|
|
||||||
}
|
|
||||||
|
|
||||||
$user = User::create([
|
$user = User::create([
|
||||||
'name' => $this->name,
|
'name' => $this->name,
|
||||||
'email' => $this->email,
|
'email' => $this->email,
|
||||||
@@ -115,16 +107,12 @@ class Edit extends Component
|
|||||||
|
|
||||||
$user->roles()->sync($this->roles);
|
$user->roles()->sync($this->roles);
|
||||||
|
|
||||||
$this->toast()->success("Éxito", "Usuario registrado correctamente")->flash()->send();
|
Session::flash('toast', ['type' => 'success', 'message' => 'Usuario registrado correctamente']);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[Computed]
|
#[Computed]
|
||||||
public function availableRoles(): Collection
|
public function availableRoles(): Collection
|
||||||
{
|
{
|
||||||
if(Gate::allows('create-super-admin', User::class)) {
|
|
||||||
return Role::all();
|
|
||||||
} else {
|
|
||||||
return Role::whereNot('name', RoleName::SuperAdmin)->get();
|
return Role::whereNot('name', RoleName::SuperAdmin)->get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ class Index extends Component
|
|||||||
return [
|
return [
|
||||||
['index' => 'name', 'label' => 'Nombre'],
|
['index' => 'name', 'label' => 'Nombre'],
|
||||||
['index' => 'email', 'label' => 'Email'],
|
['index' => 'email', 'label' => 'Email'],
|
||||||
['index' => 'roles', 'label' => 'Roles'],
|
|
||||||
['index' => 'action', 'label' => 'Acciones'],
|
['index' => 'action', 'label' => 'Acciones'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -59,6 +58,6 @@ class Index extends Component
|
|||||||
#[Computed]
|
#[Computed]
|
||||||
public function rows(): LengthAwarePaginator
|
public function rows(): LengthAwarePaginator
|
||||||
{
|
{
|
||||||
return User::filterSuperadmin()->with('roles')->paginate();
|
return User::paginate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use App\Enums\RoleName;
|
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
|
||||||
use Illuminate\Database\Eloquent\Concerns\HasUlids;
|
use Illuminate\Database\Eloquent\Concerns\HasUlids;
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||||
@@ -32,23 +30,6 @@ class User extends Authenticatable
|
|||||||
return $this->belongsToMany(Role::class, 'user_roles', 'user_id', 'role_id');
|
return $this->belongsToMany(Role::class, 'user_roles', 'user_id', 'role_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isAn(...$roles): bool
|
|
||||||
{
|
|
||||||
return $this->roles()->whereIn('name', $roles)->exists();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function scopeFilterSuperadmin(Builder $query) {
|
|
||||||
if(!auth()->check()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!auth()->user()->isAn(RoleName::SuperAdmin)) {
|
|
||||||
$query->whereDoesntHave('roles', function (Builder $builder) {
|
|
||||||
$builder->where('name', RoleName::SuperAdmin);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function casts(): array
|
protected function casts(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
|||||||
@@ -10,65 +10,68 @@ class UserPolicy
|
|||||||
{
|
{
|
||||||
public function before(User $user, string $ability): bool|null
|
public function before(User $user, string $ability): bool|null
|
||||||
{
|
{
|
||||||
if (!$user->isAn(RoleName::SuperAdmin, RoleName::Admin)) {
|
$isAdmin = $user->roles()->whereIn('name', [RoleName::SuperAdmin, RoleName::Admin])->exists();
|
||||||
|
|
||||||
|
if (!$isAdmin) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can view any models.
|
||||||
|
*/
|
||||||
public function viewAny(User $user): bool
|
public function viewAny(User $user): bool
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can view the model.
|
||||||
|
*/
|
||||||
public function view(User $user, User $model): bool
|
public function view(User $user, User $model): bool
|
||||||
{
|
{
|
||||||
if($model->isAn(RoleName::SuperAdmin)) {
|
|
||||||
return $user->isAn(RoleName::SuperAdmin);
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can create models.
|
||||||
|
*/
|
||||||
public function create(User $user): bool
|
public function create(User $user): bool
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createSuperAdmin(User $user): bool
|
/**
|
||||||
{
|
* Determine whether the user can update the model.
|
||||||
return $user->isAn(RoleName::SuperAdmin);
|
*/
|
||||||
}
|
|
||||||
|
|
||||||
public function update(User $user, User $model): bool
|
public function update(User $user, User $model): bool
|
||||||
{
|
{
|
||||||
if($model->isAn(RoleName::SuperAdmin)) {
|
|
||||||
return $user->isAn(RoleName::SuperAdmin);
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can delete the model.
|
||||||
|
*/
|
||||||
public function delete(User $user, User $model): bool
|
public function delete(User $user, User $model): bool
|
||||||
{
|
{
|
||||||
if($model->isAn(RoleName::SuperAdmin)) {
|
|
||||||
return $user->isAn(RoleName::SuperAdmin);
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can restore the model.
|
||||||
|
*/
|
||||||
public function restore(User $user, User $model): bool
|
public function restore(User $user, User $model): bool
|
||||||
{
|
{
|
||||||
if($model->isAn(RoleName::SuperAdmin)) {
|
|
||||||
return $user->isAn(RoleName::SuperAdmin);
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can permanently delete the model.
|
||||||
|
*/
|
||||||
public function forceDelete(User $user, User $model): bool
|
public function forceDelete(User $user, User $model): bool
|
||||||
{
|
{
|
||||||
if($model->isAn(RoleName::SuperAdmin)) {
|
|
||||||
return $user->isAn(RoleName::SuperAdmin);
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
186
composer.lock
generated
@@ -2563,16 +2563,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel-lang/publisher",
|
"name": "laravel-lang/publisher",
|
||||||
"version": "16.4.1",
|
"version": "16.4.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/Laravel-Lang/publisher.git",
|
"url": "https://github.com/Laravel-Lang/publisher.git",
|
||||||
"reference": "fc33816edbb13e9fd032243afd565efec265926d"
|
"reference": "7812e7a07e6f2fdb7d258f3ab1d481d1cbf7f32c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/Laravel-Lang/publisher/zipball/fc33816edbb13e9fd032243afd565efec265926d",
|
"url": "https://api.github.com/repos/Laravel-Lang/publisher/zipball/7812e7a07e6f2fdb7d258f3ab1d481d1cbf7f32c",
|
||||||
"reference": "fc33816edbb13e9fd032243afd565efec265926d",
|
"reference": "7812e7a07e6f2fdb7d258f3ab1d481d1cbf7f32c",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -2657,7 +2657,7 @@
|
|||||||
"issues": "https://github.com/Laravel-Lang/publisher/issues",
|
"issues": "https://github.com/Laravel-Lang/publisher/issues",
|
||||||
"source": "https://github.com/Laravel-Lang/publisher"
|
"source": "https://github.com/Laravel-Lang/publisher"
|
||||||
},
|
},
|
||||||
"time": "2025-01-17T10:45:02+00:00"
|
"time": "2024-06-02T00:22:33+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel-lang/routes",
|
"name": "laravel-lang/routes",
|
||||||
@@ -2738,16 +2738,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/framework",
|
"name": "laravel/framework",
|
||||||
"version": "v11.40.0",
|
"version": "v11.37.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laravel/framework.git",
|
"url": "https://github.com/laravel/framework.git",
|
||||||
"reference": "599a28196d284fee158cc10086fd56ac625ad7a3"
|
"reference": "6cb103d2024b087eae207654b3f4b26646119ba5"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laravel/framework/zipball/599a28196d284fee158cc10086fd56ac625ad7a3",
|
"url": "https://api.github.com/repos/laravel/framework/zipball/6cb103d2024b087eae207654b3f4b26646119ba5",
|
||||||
"reference": "599a28196d284fee158cc10086fd56ac625ad7a3",
|
"reference": "6cb103d2024b087eae207654b3f4b26646119ba5",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -2773,7 +2773,7 @@
|
|||||||
"league/flysystem-local": "^3.25.1",
|
"league/flysystem-local": "^3.25.1",
|
||||||
"league/uri": "^7.5.1",
|
"league/uri": "^7.5.1",
|
||||||
"monolog/monolog": "^3.0",
|
"monolog/monolog": "^3.0",
|
||||||
"nesbot/carbon": "^2.72.6|^3.8.4",
|
"nesbot/carbon": "^2.72.2|^3.4",
|
||||||
"nunomaduro/termwind": "^2.0",
|
"nunomaduro/termwind": "^2.0",
|
||||||
"php": "^8.2",
|
"php": "^8.2",
|
||||||
"psr/container": "^1.1.1|^2.0.1",
|
"psr/container": "^1.1.1|^2.0.1",
|
||||||
@@ -2848,7 +2848,6 @@
|
|||||||
"fakerphp/faker": "^1.24",
|
"fakerphp/faker": "^1.24",
|
||||||
"guzzlehttp/promises": "^2.0.3",
|
"guzzlehttp/promises": "^2.0.3",
|
||||||
"guzzlehttp/psr7": "^2.4",
|
"guzzlehttp/psr7": "^2.4",
|
||||||
"laravel/pint": "^1.18",
|
|
||||||
"league/flysystem-aws-s3-v3": "^3.25.1",
|
"league/flysystem-aws-s3-v3": "^3.25.1",
|
||||||
"league/flysystem-ftp": "^3.25.1",
|
"league/flysystem-ftp": "^3.25.1",
|
||||||
"league/flysystem-path-prefixing": "^3.25.1",
|
"league/flysystem-path-prefixing": "^3.25.1",
|
||||||
@@ -2949,7 +2948,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": "2025-01-24T16:17:42+00:00"
|
"time": "2025-01-02T20:10:21+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/octane",
|
"name": "laravel/octane",
|
||||||
@@ -3043,16 +3042,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/prompts",
|
"name": "laravel/prompts",
|
||||||
"version": "v0.3.3",
|
"version": "v0.3.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laravel/prompts.git",
|
"url": "https://github.com/laravel/prompts.git",
|
||||||
"reference": "749395fcd5f8f7530fe1f00dfa84eb22c83d94ea"
|
"reference": "0e0535747c6b8d6d10adca8b68293cf4517abb0f"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laravel/prompts/zipball/749395fcd5f8f7530fe1f00dfa84eb22c83d94ea",
|
"url": "https://api.github.com/repos/laravel/prompts/zipball/0e0535747c6b8d6d10adca8b68293cf4517abb0f",
|
||||||
"reference": "749395fcd5f8f7530fe1f00dfa84eb22c83d94ea",
|
"reference": "0e0535747c6b8d6d10adca8b68293cf4517abb0f",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -3096,9 +3095,9 @@
|
|||||||
"description": "Add beautiful and user-friendly forms to your command-line applications.",
|
"description": "Add beautiful and user-friendly forms to your command-line applications.",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/laravel/prompts/issues",
|
"issues": "https://github.com/laravel/prompts/issues",
|
||||||
"source": "https://github.com/laravel/prompts/tree/v0.3.3"
|
"source": "https://github.com/laravel/prompts/tree/v0.3.2"
|
||||||
},
|
},
|
||||||
"time": "2024-12-30T15:53:31+00:00"
|
"time": "2024-11-12T14:59:47+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/serializable-closure",
|
"name": "laravel/serializable-closure",
|
||||||
@@ -3163,16 +3162,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/telescope",
|
"name": "laravel/telescope",
|
||||||
"version": "v5.3.0",
|
"version": "v5.2.6",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laravel/telescope.git",
|
"url": "https://github.com/laravel/telescope.git",
|
||||||
"reference": "216fd8d41eb17b49469bea9359b4f0f711b882b3"
|
"reference": "7ee46fbea8e3b01108575c8edf7377abddfe8bb9"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laravel/telescope/zipball/216fd8d41eb17b49469bea9359b4f0f711b882b3",
|
"url": "https://api.github.com/repos/laravel/telescope/zipball/7ee46fbea8e3b01108575c8edf7377abddfe8bb9",
|
||||||
"reference": "216fd8d41eb17b49469bea9359b4f0f711b882b3",
|
"reference": "7ee46fbea8e3b01108575c8edf7377abddfe8bb9",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -3226,9 +3225,9 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/laravel/telescope/issues",
|
"issues": "https://github.com/laravel/telescope/issues",
|
||||||
"source": "https://github.com/laravel/telescope/tree/v5.3.0"
|
"source": "https://github.com/laravel/telescope/tree/v5.2.6"
|
||||||
},
|
},
|
||||||
"time": "2024-12-26T21:37:35+00:00"
|
"time": "2024-11-25T20:34:58+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/tinker",
|
"name": "laravel/tinker",
|
||||||
@@ -8033,16 +8032,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "barryvdh/laravel-ide-helper",
|
"name": "barryvdh/laravel-ide-helper",
|
||||||
"version": "v3.5.4",
|
"version": "v3.5.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/barryvdh/laravel-ide-helper.git",
|
"url": "https://github.com/barryvdh/laravel-ide-helper.git",
|
||||||
"reference": "980a87e250fc2a7558bc46e07f61c7594500ea53"
|
"reference": "271682a2a6d57691e1c7ff378f44e4ae6ac2aba0"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/980a87e250fc2a7558bc46e07f61c7594500ea53",
|
"url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/271682a2a6d57691e1c7ff378f44e4ae6ac2aba0",
|
||||||
"reference": "980a87e250fc2a7558bc46e07f61c7594500ea53",
|
"reference": "271682a2a6d57691e1c7ff378f44e4ae6ac2aba0",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -8111,7 +8110,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/barryvdh/laravel-ide-helper/issues",
|
"issues": "https://github.com/barryvdh/laravel-ide-helper/issues",
|
||||||
"source": "https://github.com/barryvdh/laravel-ide-helper/tree/v3.5.4"
|
"source": "https://github.com/barryvdh/laravel-ide-helper/tree/v3.5.3"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -8123,20 +8122,20 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2025-01-14T09:07:00+00:00"
|
"time": "2025-01-08T10:01:30+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "barryvdh/reflection-docblock",
|
"name": "barryvdh/reflection-docblock",
|
||||||
"version": "v2.3.1",
|
"version": "v2.3.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/barryvdh/ReflectionDocBlock.git",
|
"url": "https://github.com/barryvdh/ReflectionDocBlock.git",
|
||||||
"reference": "b6ff9f93603561f50e53b64310495d20b8dff5d8"
|
"reference": "818be8de6af4d16ef3ad51ea9234b3d37026ee5f"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/barryvdh/ReflectionDocBlock/zipball/b6ff9f93603561f50e53b64310495d20b8dff5d8",
|
"url": "https://api.github.com/repos/barryvdh/ReflectionDocBlock/zipball/818be8de6af4d16ef3ad51ea9234b3d37026ee5f",
|
||||||
"reference": "b6ff9f93603561f50e53b64310495d20b8dff5d8",
|
"reference": "818be8de6af4d16ef3ad51ea9234b3d37026ee5f",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -8173,9 +8172,9 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/barryvdh/ReflectionDocBlock/tree/v2.3.1"
|
"source": "https://github.com/barryvdh/ReflectionDocBlock/tree/v2.3.0"
|
||||||
},
|
},
|
||||||
"time": "2025-01-18T19:26:32+00:00"
|
"time": "2024-12-30T10:35:04+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "brianium/paratest",
|
"name": "brianium/paratest",
|
||||||
@@ -8441,16 +8440,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "filp/whoops",
|
"name": "filp/whoops",
|
||||||
"version": "2.17.0",
|
"version": "2.16.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/filp/whoops.git",
|
"url": "https://github.com/filp/whoops.git",
|
||||||
"reference": "075bc0c26631110584175de6523ab3f1652eb28e"
|
"reference": "befcdc0e5dce67252aa6322d82424be928214fa2"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/filp/whoops/zipball/075bc0c26631110584175de6523ab3f1652eb28e",
|
"url": "https://api.github.com/repos/filp/whoops/zipball/befcdc0e5dce67252aa6322d82424be928214fa2",
|
||||||
"reference": "075bc0c26631110584175de6523ab3f1652eb28e",
|
"reference": "befcdc0e5dce67252aa6322d82424be928214fa2",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -8500,7 +8499,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/filp/whoops/issues",
|
"issues": "https://github.com/filp/whoops/issues",
|
||||||
"source": "https://github.com/filp/whoops/tree/2.17.0"
|
"source": "https://github.com/filp/whoops/tree/2.16.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -8508,7 +8507,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2025-01-25T12:00:00+00:00"
|
"time": "2024-09-25T12:00:00+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "hamcrest/hamcrest-php",
|
"name": "hamcrest/hamcrest-php",
|
||||||
@@ -8622,16 +8621,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/pint",
|
"name": "laravel/pint",
|
||||||
"version": "v1.20.0",
|
"version": "v1.19.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laravel/pint.git",
|
"url": "https://github.com/laravel/pint.git",
|
||||||
"reference": "53072e8ea22213a7ed168a8a15b96fbb8b82d44b"
|
"reference": "8169513746e1bac70c85d6ea1524d9225d4886f0"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laravel/pint/zipball/53072e8ea22213a7ed168a8a15b96fbb8b82d44b",
|
"url": "https://api.github.com/repos/laravel/pint/zipball/8169513746e1bac70c85d6ea1524d9225d4886f0",
|
||||||
"reference": "53072e8ea22213a7ed168a8a15b96fbb8b82d44b",
|
"reference": "8169513746e1bac70c85d6ea1524d9225d4886f0",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -8684,7 +8683,7 @@
|
|||||||
"issues": "https://github.com/laravel/pint/issues",
|
"issues": "https://github.com/laravel/pint/issues",
|
||||||
"source": "https://github.com/laravel/pint"
|
"source": "https://github.com/laravel/pint"
|
||||||
},
|
},
|
||||||
"time": "2025-01-14T16:20:53+00:00"
|
"time": "2024-12-30T16:20:10+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "maximebf/debugbar",
|
"name": "maximebf/debugbar",
|
||||||
@@ -8899,37 +8898,37 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nunomaduro/collision",
|
"name": "nunomaduro/collision",
|
||||||
"version": "v8.6.1",
|
"version": "v8.5.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/nunomaduro/collision.git",
|
"url": "https://github.com/nunomaduro/collision.git",
|
||||||
"reference": "86f003c132143d5a2ab214e19933946409e0cae7"
|
"reference": "f5c101b929c958e849a633283adff296ed5f38f5"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/nunomaduro/collision/zipball/86f003c132143d5a2ab214e19933946409e0cae7",
|
"url": "https://api.github.com/repos/nunomaduro/collision/zipball/f5c101b929c958e849a633283adff296ed5f38f5",
|
||||||
"reference": "86f003c132143d5a2ab214e19933946409e0cae7",
|
"reference": "f5c101b929c958e849a633283adff296ed5f38f5",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"filp/whoops": "^2.16.0",
|
"filp/whoops": "^2.16.0",
|
||||||
"nunomaduro/termwind": "^2.3.0",
|
"nunomaduro/termwind": "^2.1.0",
|
||||||
"php": "^8.2.0",
|
"php": "^8.2.0",
|
||||||
"symfony/console": "^7.2.1"
|
"symfony/console": "^7.1.5"
|
||||||
},
|
},
|
||||||
"conflict": {
|
"conflict": {
|
||||||
"laravel/framework": "<11.39.1 || >=13.0.0",
|
"laravel/framework": "<11.0.0 || >=12.0.0",
|
||||||
"phpunit/phpunit": "<11.5.3 || >=12.0.0"
|
"phpunit/phpunit": "<10.5.1 || >=12.0.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"larastan/larastan": "^2.9.12",
|
"larastan/larastan": "^2.9.8",
|
||||||
"laravel/framework": "^11.39.1",
|
"laravel/framework": "^11.28.0",
|
||||||
"laravel/pint": "^1.20.0",
|
"laravel/pint": "^1.18.1",
|
||||||
"laravel/sail": "^1.40.0",
|
"laravel/sail": "^1.36.0",
|
||||||
"laravel/sanctum": "^4.0.7",
|
"laravel/sanctum": "^4.0.3",
|
||||||
"laravel/tinker": "^2.10.0",
|
"laravel/tinker": "^2.10.0",
|
||||||
"orchestra/testbench-core": "^9.9.2",
|
"orchestra/testbench-core": "^9.5.3",
|
||||||
"pestphp/pest": "^3.7.3",
|
"pestphp/pest": "^2.36.0 || ^3.4.0",
|
||||||
"sebastian/environment": "^6.1.0 || ^7.2.0"
|
"sebastian/environment": "^6.1.0 || ^7.2.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
@@ -8967,7 +8966,6 @@
|
|||||||
"cli",
|
"cli",
|
||||||
"command-line",
|
"command-line",
|
||||||
"console",
|
"console",
|
||||||
"dev",
|
|
||||||
"error",
|
"error",
|
||||||
"handling",
|
"handling",
|
||||||
"laravel",
|
"laravel",
|
||||||
@@ -8993,41 +8991,41 @@
|
|||||||
"type": "patreon"
|
"type": "patreon"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2025-01-23T13:41:43+00:00"
|
"time": "2024-10-15T16:06:32+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pestphp/pest",
|
"name": "pestphp/pest",
|
||||||
"version": "v3.7.4",
|
"version": "v3.7.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/pestphp/pest.git",
|
"url": "https://github.com/pestphp/pest.git",
|
||||||
"reference": "4a987d3d5c4e3ba36c76fecbf56113baac2d1b2b"
|
"reference": "bf3178473dcaa53b0458f21dfdb271306ea62512"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/pestphp/pest/zipball/4a987d3d5c4e3ba36c76fecbf56113baac2d1b2b",
|
"url": "https://api.github.com/repos/pestphp/pest/zipball/bf3178473dcaa53b0458f21dfdb271306ea62512",
|
||||||
"reference": "4a987d3d5c4e3ba36c76fecbf56113baac2d1b2b",
|
"reference": "bf3178473dcaa53b0458f21dfdb271306ea62512",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"brianium/paratest": "^7.7.0",
|
"brianium/paratest": "^7.7.0",
|
||||||
"nunomaduro/collision": "^8.6.1",
|
"nunomaduro/collision": "^8.5.0",
|
||||||
"nunomaduro/termwind": "^2.3.0",
|
"nunomaduro/termwind": "^2.3.0",
|
||||||
"pestphp/pest-plugin": "^3.0.0",
|
"pestphp/pest-plugin": "^3.0.0",
|
||||||
"pestphp/pest-plugin-arch": "^3.0.0",
|
"pestphp/pest-plugin-arch": "^3.0.0",
|
||||||
"pestphp/pest-plugin-mutate": "^3.0.5",
|
"pestphp/pest-plugin-mutate": "^3.0.5",
|
||||||
"php": "^8.2.0",
|
"php": "^8.2.0",
|
||||||
"phpunit/phpunit": "^11.5.3"
|
"phpunit/phpunit": "^11.5.1"
|
||||||
},
|
},
|
||||||
"conflict": {
|
"conflict": {
|
||||||
"filp/whoops": "<2.16.0",
|
"filp/whoops": "<2.16.0",
|
||||||
"phpunit/phpunit": ">11.5.3",
|
"phpunit/phpunit": ">11.5.1",
|
||||||
"sebastian/exporter": "<6.0.0",
|
"sebastian/exporter": "<6.0.0",
|
||||||
"webmozart/assert": "<1.11.0"
|
"webmozart/assert": "<1.11.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"pestphp/pest-dev-tools": "^3.3.0",
|
"pestphp/pest-dev-tools": "^3.3.0",
|
||||||
"pestphp/pest-plugin-type-coverage": "^3.2.3",
|
"pestphp/pest-plugin-type-coverage": "^3.2.0",
|
||||||
"symfony/process": "^7.2.0"
|
"symfony/process": "^7.2.0"
|
||||||
},
|
},
|
||||||
"bin": [
|
"bin": [
|
||||||
@@ -9093,7 +9091,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/pestphp/pest/issues",
|
"issues": "https://github.com/pestphp/pest/issues",
|
||||||
"source": "https://github.com/pestphp/pest/tree/v3.7.4"
|
"source": "https://github.com/pestphp/pest/tree/v3.7.1"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -9105,7 +9103,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2025-01-23T14:03:29+00:00"
|
"time": "2024-12-12T11:52:01+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pestphp/pest-plugin",
|
"name": "pestphp/pest-plugin",
|
||||||
@@ -9249,27 +9247,27 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pestphp/pest-plugin-laravel",
|
"name": "pestphp/pest-plugin-laravel",
|
||||||
"version": "v3.1.0",
|
"version": "v3.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/pestphp/pest-plugin-laravel.git",
|
"url": "https://github.com/pestphp/pest-plugin-laravel.git",
|
||||||
"reference": "1c4e994476375c72aa7aebaaa97aa98f5d5378cd"
|
"reference": "7dd98c0c3b3542970ec21fce80ec5c88916ac469"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/pestphp/pest-plugin-laravel/zipball/1c4e994476375c72aa7aebaaa97aa98f5d5378cd",
|
"url": "https://api.github.com/repos/pestphp/pest-plugin-laravel/zipball/7dd98c0c3b3542970ec21fce80ec5c88916ac469",
|
||||||
"reference": "1c4e994476375c72aa7aebaaa97aa98f5d5378cd",
|
"reference": "7dd98c0c3b3542970ec21fce80ec5c88916ac469",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"laravel/framework": "^11.39.1|^12.0.0",
|
"laravel/framework": "^11.22.0",
|
||||||
"pestphp/pest": "^3.7.4",
|
"pestphp/pest": "^3.0.0",
|
||||||
"php": "^8.2.0"
|
"php": "^8.2.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"laravel/dusk": "^8.2.13|dev-develop",
|
"laravel/dusk": "^8.2.5",
|
||||||
"orchestra/testbench": "^9.9.0|^10.0.0",
|
"orchestra/testbench": "^9.4.0",
|
||||||
"pestphp/pest-dev-tools": "^3.3.0"
|
"pestphp/pest-dev-tools": "^3.0.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
@@ -9307,7 +9305,7 @@
|
|||||||
"unit"
|
"unit"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/pestphp/pest-plugin-laravel/tree/v3.1.0"
|
"source": "https://github.com/pestphp/pest-plugin-laravel/tree/v3.0.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -9319,7 +9317,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2025-01-24T13:22:39+00:00"
|
"time": "2024-09-08T23:32:52+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pestphp/pest-plugin-mutate",
|
"name": "pestphp/pest-plugin-mutate",
|
||||||
@@ -10058,16 +10056,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/phpunit",
|
"name": "phpunit/phpunit",
|
||||||
"version": "11.5.3",
|
"version": "11.5.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||||
"reference": "30e319e578a7b5da3543073e30002bf82042f701"
|
"reference": "2b94d4f2450b9869fa64a46fd8a6a41997aef56a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/30e319e578a7b5da3543073e30002bf82042f701",
|
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2b94d4f2450b9869fa64a46fd8a6a41997aef56a",
|
||||||
"reference": "30e319e578a7b5da3543073e30002bf82042f701",
|
"reference": "2b94d4f2450b9869fa64a46fd8a6a41997aef56a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -10081,14 +10079,14 @@
|
|||||||
"phar-io/manifest": "^2.0.4",
|
"phar-io/manifest": "^2.0.4",
|
||||||
"phar-io/version": "^3.2.1",
|
"phar-io/version": "^3.2.1",
|
||||||
"php": ">=8.2",
|
"php": ">=8.2",
|
||||||
"phpunit/php-code-coverage": "^11.0.8",
|
"phpunit/php-code-coverage": "^11.0.7",
|
||||||
"phpunit/php-file-iterator": "^5.1.0",
|
"phpunit/php-file-iterator": "^5.1.0",
|
||||||
"phpunit/php-invoker": "^5.0.1",
|
"phpunit/php-invoker": "^5.0.1",
|
||||||
"phpunit/php-text-template": "^4.0.1",
|
"phpunit/php-text-template": "^4.0.1",
|
||||||
"phpunit/php-timer": "^7.0.1",
|
"phpunit/php-timer": "^7.0.1",
|
||||||
"sebastian/cli-parser": "^3.0.2",
|
"sebastian/cli-parser": "^3.0.2",
|
||||||
"sebastian/code-unit": "^3.0.2",
|
"sebastian/code-unit": "^3.0.1",
|
||||||
"sebastian/comparator": "^6.3.0",
|
"sebastian/comparator": "^6.2.1",
|
||||||
"sebastian/diff": "^6.0.2",
|
"sebastian/diff": "^6.0.2",
|
||||||
"sebastian/environment": "^7.2.0",
|
"sebastian/environment": "^7.2.0",
|
||||||
"sebastian/exporter": "^6.3.0",
|
"sebastian/exporter": "^6.3.0",
|
||||||
@@ -10139,7 +10137,7 @@
|
|||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
||||||
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
|
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
|
||||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.3"
|
"source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.1"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -10155,7 +10153,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2025-01-13T09:36:00+00:00"
|
"time": "2024-12-11T10:52:48+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/cli-parser",
|
"name": "sebastian/cli-parser",
|
||||||
|
|||||||
112
package-lock.json
generated
@@ -1,15 +1,20 @@
|
|||||||
{
|
{
|
||||||
"name": "zenithar",
|
"name": "app",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
|
"dependencies": {
|
||||||
|
"air-datepicker": "^3.5.3"
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tailwindcss/forms": "^0.5.9",
|
"@tailwindcss/forms": "^0.5.9",
|
||||||
|
"@tailwindcss/typography": "^0.5.16",
|
||||||
"autoprefixer": "^10.4.2",
|
"autoprefixer": "^10.4.2",
|
||||||
"axios": "^1.7.4",
|
"axios": "^1.7.4",
|
||||||
"chokidar": "^4.0.3",
|
"chokidar": "^4.0.3",
|
||||||
"concurrently": "^9.0.1",
|
"concurrently": "^9.0.1",
|
||||||
|
"daisyui": "^4.12.23",
|
||||||
"laravel-vite-plugin": "^1.0",
|
"laravel-vite-plugin": "^1.0",
|
||||||
"postcss": "^8.4.31",
|
"postcss": "^8.4.31",
|
||||||
"tailwindcss": "^3.1.0",
|
"tailwindcss": "^3.1.0",
|
||||||
@@ -853,6 +858,36 @@
|
|||||||
"tailwindcss": ">=3.0.0 || >= 3.0.0-alpha.1 || >= 4.0.0-alpha.20"
|
"tailwindcss": ">=3.0.0 || >= 3.0.0-alpha.1 || >= 4.0.0-alpha.20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@tailwindcss/typography": {
|
||||||
|
"version": "0.5.16",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.16.tgz",
|
||||||
|
"integrity": "sha512-0wDLwCVF5V3x3b1SGXPCDcdsbDHMBe+lkFzBRaHeLvNi+nrrnZ1lA18u+OTWO8iSWU2GxUOCvlXtDuqftc1oiA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"lodash.castarray": "^4.4.0",
|
||||||
|
"lodash.isplainobject": "^4.0.6",
|
||||||
|
"lodash.merge": "^4.6.2",
|
||||||
|
"postcss-selector-parser": "6.0.10"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"tailwindcss": ">=3.0.0 || insiders || >=4.0.0-alpha.20 || >=4.0.0-beta.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@tailwindcss/typography/node_modules/postcss-selector-parser": {
|
||||||
|
"version": "6.0.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz",
|
||||||
|
"integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"cssesc": "^3.0.0",
|
||||||
|
"util-deprecate": "^1.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@types/estree": {
|
"node_modules/@types/estree": {
|
||||||
"version": "1.0.6",
|
"version": "1.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
|
||||||
@@ -860,6 +895,12 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/air-datepicker": {
|
||||||
|
"version": "3.5.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/air-datepicker/-/air-datepicker-3.5.3.tgz",
|
||||||
|
"integrity": "sha512-Elf9gLhv/jidN1+TfeRJYMQRUfYx5apXw2dY5DuAMPRnNtQ4Iw9fTTJK772osmXSUB9xQ2Y8Q1Pt6pgBOQLPQw==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/ansi-regex": {
|
"node_modules/ansi-regex": {
|
||||||
"version": "6.1.0",
|
"version": "6.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz",
|
||||||
@@ -1289,6 +1330,17 @@
|
|||||||
"node": ">= 8"
|
"node": ">= 8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/css-selector-tokenizer": {
|
||||||
|
"version": "0.8.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.8.0.tgz",
|
||||||
|
"integrity": "sha512-Jd6Ig3/pe62/qe5SBPTN8h8LeUg/pT4lLgtavPf7updwwHpvFzxvOQBHYj2LZDMjUnBzgvIUSjRcf6oT5HzHFg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"cssesc": "^3.0.0",
|
||||||
|
"fastparse": "^1.1.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/cssesc": {
|
"node_modules/cssesc": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
|
||||||
@@ -1302,6 +1354,36 @@
|
|||||||
"node": ">=4"
|
"node": ">=4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/culori": {
|
||||||
|
"version": "3.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/culori/-/culori-3.3.0.tgz",
|
||||||
|
"integrity": "sha512-pHJg+jbuFsCjz9iclQBqyL3B2HLCBF71BwVNujUYEvCeQMvV97R59MNK3R2+jgJ3a1fcZgI9B3vYgz8lzr/BFQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/daisyui": {
|
||||||
|
"version": "4.12.23",
|
||||||
|
"resolved": "https://registry.npmjs.org/daisyui/-/daisyui-4.12.23.tgz",
|
||||||
|
"integrity": "sha512-EM38duvxutJ5PD65lO/AFMpcw+9qEy6XAZrTpzp7WyaPeO/l+F/Qiq0ECHHmFNcFXh5aVoALY4MGrrxtCiaQCQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"css-selector-tokenizer": "^0.8",
|
||||||
|
"culori": "^3",
|
||||||
|
"picocolors": "^1",
|
||||||
|
"postcss-js": "^4"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=16.9.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/daisyui"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/delayed-stream": {
|
"node_modules/delayed-stream": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||||
@@ -1428,6 +1510,13 @@
|
|||||||
"node": ">= 6"
|
"node": ">= 6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/fastparse": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/fastq": {
|
"node_modules/fastq": {
|
||||||
"version": "1.18.0",
|
"version": "1.18.0",
|
||||||
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.18.0.tgz",
|
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.18.0.tgz",
|
||||||
@@ -1762,6 +1851,27 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/lodash.castarray": {
|
||||||
|
"version": "4.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/lodash.castarray/-/lodash.castarray-4.4.0.tgz",
|
||||||
|
"integrity": "sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/lodash.isplainobject": {
|
||||||
|
"version": "4.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
|
||||||
|
"integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/lodash.merge": {
|
||||||
|
"version": "4.6.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
|
||||||
|
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/lru-cache": {
|
"node_modules/lru-cache": {
|
||||||
"version": "10.4.3",
|
"version": "10.4.3",
|
||||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz",
|
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz",
|
||||||
|
|||||||
@@ -7,13 +7,18 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tailwindcss/forms": "^0.5.9",
|
"@tailwindcss/forms": "^0.5.9",
|
||||||
|
"@tailwindcss/typography": "^0.5.16",
|
||||||
"autoprefixer": "^10.4.2",
|
"autoprefixer": "^10.4.2",
|
||||||
"axios": "^1.7.4",
|
"axios": "^1.7.4",
|
||||||
"chokidar": "^4.0.3",
|
"chokidar": "^4.0.3",
|
||||||
"concurrently": "^9.0.1",
|
"concurrently": "^9.0.1",
|
||||||
|
"daisyui": "^4.12.23",
|
||||||
"laravel-vite-plugin": "^1.0",
|
"laravel-vite-plugin": "^1.0",
|
||||||
"postcss": "^8.4.31",
|
"postcss": "^8.4.31",
|
||||||
"tailwindcss": "^3.1.0",
|
"tailwindcss": "^3.1.0",
|
||||||
"vite": "^6.0"
|
"vite": "^6.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"air-datepicker": "^3.5.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1,20 @@
|
|||||||
import './bootstrap';
|
import './bootstrap';
|
||||||
|
import 'air-datepicker/air-datepicker.css';
|
||||||
|
import {Alpine} from '../../vendor/livewire/livewire/dist/livewire.esm';
|
||||||
|
import AirDatepicker from "air-datepicker";
|
||||||
|
import localeEs from 'air-datepicker/locale/es';
|
||||||
|
|
||||||
|
Alpine.data('datepicker', () => ({
|
||||||
|
init() {
|
||||||
|
new AirDatepicker(this.$el, {
|
||||||
|
locale: localeEs,
|
||||||
|
autoClose: true,
|
||||||
|
buttons: 'clear',
|
||||||
|
onSelect: ({date}) => {
|
||||||
|
this.$el.dispatchEvent(new Event('input'));
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
|
||||||
|
Livewire.start();
|
||||||
|
|||||||
8
resources/views/components/icons/arrow-left.blade.php
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
||||||
|
{{$attributes}}>
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<path d="M5 12l14 0"/>
|
||||||
|
<path d="M5 12l6 6"/>
|
||||||
|
<path d="M5 12l6 -6"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 350 B |
8
resources/views/components/icons/cash.blade.php
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
||||||
|
{{$attributes}}>
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<path d="M7 9m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z"/>
|
||||||
|
<path d="M14 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"/>
|
||||||
|
<path d="M17 9v-2a2 2 0 0 0 -2 -2h-10a2 2 0 0 0 -2 2v6a2 2 0 0 0 2 2h2"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 500 B |
9
resources/views/components/icons/credit-card.blade.php
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
||||||
|
{{$attributes}}>
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<path d="M3 5m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z"/>
|
||||||
|
<path d="M3 10l18 0"/>
|
||||||
|
<path d="M7 15l.01 0"/>
|
||||||
|
<path d="M11 15l2 0"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 447 B |
@@ -0,0 +1,7 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
||||||
|
{{$attributes}}>
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<path d="M16.7 8a3 3 0 0 0 -2.7 -2h-4a3 3 0 0 0 0 6h4a3 3 0 0 1 0 6h-4a3 3 0 0 1 -2.7 -2"/>
|
||||||
|
<path d="M12 3v3m0 12v3"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 397 B |
8
resources/views/components/icons/device-floppy.blade.php
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
||||||
|
{{$attributes}}>
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<path d="M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2"/>
|
||||||
|
<path d="M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"/>
|
||||||
|
<path d="M14 4l0 4l-6 0l0 -4"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 448 B |
8
resources/views/components/icons/edit.blade.php
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
||||||
|
{{$attributes}}>
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<path d="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1"/>
|
||||||
|
<path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z"/>
|
||||||
|
<path d="M16 5l3 3"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 458 B |
8
resources/views/components/icons/home.blade.php
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
||||||
|
{{$attributes}}>
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<path d="M5 12l-2 0l9 -9l9 9l-2 0"/>
|
||||||
|
<path d="M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-7"/>
|
||||||
|
<path d="M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v6"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 428 B |
6
resources/views/components/icons/minus.blade.php
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
||||||
|
{{$attributes}}>
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<path d="M5 12l14 0"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 297 B |
9
resources/views/components/icons/plus-minus.blade.php
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
||||||
|
{{$attributes}}>
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<path d="M4 7h6"/>
|
||||||
|
<path d="M7 4v6"/>
|
||||||
|
<path d="M20 18h-6"/>
|
||||||
|
<path d="M5 19l14 -14"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 371 B |
7
resources/views/components/icons/plus.blade.php
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
||||||
|
{{$attributes}}>
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<path d="M12 5l0 14"/>
|
||||||
|
<path d="M5 12l14 0"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 324 B |
12
resources/views/components/icons/report.blade.php
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
||||||
|
{{$attributes}}>
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<path d="M8 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h5.697"/>
|
||||||
|
<path d="M18 14v4h4"/>
|
||||||
|
<path d="M18 11v-4a2 2 0 0 0 -2 -2h-2"/>
|
||||||
|
<path d="M8 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z"/>
|
||||||
|
<path d="M18 18m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0"/>
|
||||||
|
<path d="M8 11h4"/>
|
||||||
|
<path d="M8 15h3"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 602 B |
8
resources/views/components/icons/settings.blade.php
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
||||||
|
{{$attributes}}>
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<path
|
||||||
|
d="M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z"/>
|
||||||
|
<path d="M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 869 B |
10
resources/views/components/icons/trash.blade.php
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
||||||
|
{{$attributes}}>
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<path d="M4 7l16 0"/>
|
||||||
|
<path d="M10 11l0 6"/>
|
||||||
|
<path d="M14 11l0 6"/>
|
||||||
|
<path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"/>
|
||||||
|
<path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 470 B |
@@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" data-theme="emerald">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
@@ -11,6 +11,9 @@
|
|||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css2?family=Domine:wght@400..700&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Karla:ital,wght@0,200..800;1,200..800&family=Nunito:ital,wght@0,200..1000;1,200..1000&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
|
href="https://fonts.googleapis.com/css2?family=Domine:wght@400..700&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Karla:ital,wght@0,200..800;1,200..800&family=Nunito:ital,wght@0,200..1000;1,200..1000&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
|
||||||
rel="stylesheet">
|
rel="stylesheet">
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@latest/tabler-icons.min.css">
|
||||||
|
|
||||||
|
|
||||||
<tallstackui:script/>
|
<tallstackui:script/>
|
||||||
@livewireStyles
|
@livewireStyles
|
||||||
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
||||||
@@ -19,14 +22,15 @@
|
|||||||
<body class="flex flex-col min-h-screen">
|
<body class="flex flex-col min-h-screen">
|
||||||
<x-dialog/>
|
<x-dialog/>
|
||||||
<x-toast/>
|
<x-toast/>
|
||||||
<x-navbar/>
|
<x-flash/>
|
||||||
|
|
||||||
|
<x-navbar/>
|
||||||
<div class="flex-1 bg-secondary-50 overflow-x-auto">
|
<div class="flex-1 bg-secondary-50 overflow-x-auto">
|
||||||
<main class="container mx-auto px-4 py-8">
|
<main class="container mx-auto px-4 py-8">
|
||||||
{{ $slot }}
|
{{ $slot }}
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
@livewireScripts
|
@livewireScriptConfig
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css2?family=Domine:wght@400..700&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Karla:ital,wght@0,200..800;1,200..800&family=Nunito:ital,wght@0,200..1000;1,200..1000&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
|
href="https://fonts.googleapis.com/css2?family=Domine:wght@400..700&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Karla:ital,wght@0,200..800;1,200..800&family=Nunito:ital,wght@0,200..1000;1,200..1000&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
|
||||||
rel="stylesheet">
|
rel="stylesheet">
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@latest/tabler-icons.min.css">
|
||||||
|
|
||||||
<tallstackui:script/>
|
<tallstackui:script/>
|
||||||
@livewireStyles
|
@livewireStyles
|
||||||
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
||||||
|
|||||||
37
resources/views/components/my-modal.blade.php
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<div x-data="{}"
|
||||||
|
x-init="$refs.dialog.addEventListener('close', () => $dispatch('close-modal-{{$name}}'))"
|
||||||
|
x-on:show-modal.window="
|
||||||
|
console.log($event)
|
||||||
|
if($event.detail[0] === '{{$name}}') {
|
||||||
|
$refs.dialog.showModal();
|
||||||
|
}
|
||||||
|
"
|
||||||
|
x-on:hide-modal.window="
|
||||||
|
if($event.detail[0] === '{{$name}}') {
|
||||||
|
$refs.dialog.close();
|
||||||
|
}
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<dialog class="modal" x-ref="dialog" wire:ignore>
|
||||||
|
<div class="modal-box">
|
||||||
|
<form method="dialog">
|
||||||
|
<button class="btn btn-sm btn-circle btn-ghost absolute right-2 top-2">
|
||||||
|
✕
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
@if(isset($title))
|
||||||
|
<h3 class="text-lg font-bold">{{$title}}</h3>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{$slot}}
|
||||||
|
|
||||||
|
@if(isset($footer))
|
||||||
|
<div class="modal-action">
|
||||||
|
{{$footer}}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</dialog>
|
||||||
|
</div>
|
||||||
@@ -3,37 +3,36 @@
|
|||||||
<div
|
<div
|
||||||
class="container mx-auto flex flex-col items-center justify-between gap-2 px-4 py-4 sm:py-0 sm:h-14 sm:flex-row">
|
class="container mx-auto flex flex-col items-center justify-between gap-2 px-4 py-4 sm:py-0 sm:h-14 sm:flex-row">
|
||||||
<span class="text-4xl sm:text-2xl font-semibold text-primary-700">Aureon</span>
|
<span class="text-4xl sm:text-2xl font-semibold text-primary-700">Aureon</span>
|
||||||
<x-dropdown>
|
<div class="dropdown">
|
||||||
<x-slot:action>
|
<div tabindex="0" role="button" class="btn btn-ghost m-1 text-left">
|
||||||
<button
|
|
||||||
class="flex items-center gap-2 rounded p-1 text-start hover:bg-secondary-50 active:bg-secondary-100"
|
|
||||||
x-on:click="show = !show">
|
|
||||||
<img class="h-8 rounded" src="https://api.dicebear.com/9.x/thumbs/svg" alt="avatar"/>
|
<img class="h-8 rounded" src="https://api.dicebear.com/9.x/thumbs/svg" alt="avatar"/>
|
||||||
<div>
|
<div class="font-normal">
|
||||||
<p class="text-sm">{{auth()->user()->name}}</p>
|
<p class="text-sm">{{auth()->user()->name}}</p>
|
||||||
<p class="text-xs text-secondary">{{auth()->user()->email}}</p>
|
<p class="text-xs text-secondary">{{auth()->user()->email}}</p>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</div>
|
||||||
</x-slot:action>
|
<ul tabindex="0" class="dropdown-content menu bg-base-100 rounded-box z-[1] w-52 p-2 shadow">
|
||||||
|
<li>
|
||||||
<form action="{{route('logout')}}" method="POST">
|
<form action="{{route('logout')}}" method="POST">
|
||||||
@csrf
|
@csrf
|
||||||
<button type="submit" class="w-full">
|
<button type="submit" class="w-full">
|
||||||
<x-dropdown.items text="Cerrar Sesión" separator/>
|
Cerrar Sesión
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</x-dropdown>
|
</li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="border-b">
|
<div class="container mx-auto">
|
||||||
<nav class="container mx-auto flex flex-col sm:h-14 sm:flex-row sm:px-4">
|
<ul class="menu lg:menu-horizontal">
|
||||||
<x-navlink icon="home" :route="route('home.index')" :active="Route::is('home.*')" title="Inicio"/>
|
<x-navlink icon="home" :route="route('home.index')" :active="Route::is('home.*')"
|
||||||
|
title="Inicio"/>
|
||||||
<x-navlink icon="cash" :route="route('cajas.index')" :active="Route::is('cajas.*')" title="Cajas"/>
|
<x-navlink icon="cash" :route="route('cajas.index')" :active="Route::is('cajas.*')" title="Cajas"/>
|
||||||
<x-navlink icon="report" :route="route('reportes.index')" :active="Route::is('reportes.*')"
|
<x-navlink icon="report" :route="route('reportes.index')" :active="Route::is('reportes.*')"
|
||||||
title="Reportes"/>
|
title="Reportes"/>
|
||||||
<x-navlink icon="settings" :route="route('configuracion.index')" :active="Route::is('configuracion.*')"
|
<x-navlink icon="settings" :route="route('configuracion.index')" :active="Route::is('configuracion.*')"
|
||||||
title="Configuración"/>
|
title="Configuración"/>
|
||||||
</nav>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,11 +3,10 @@
|
|||||||
$active = false;
|
$active = false;
|
||||||
}
|
}
|
||||||
@endphp
|
@endphp
|
||||||
<a class="{{ $active
|
|
||||||
? 'bg-primary text-white hover:bg-primary-600 active:bg-primary-700'
|
<li>
|
||||||
: 'text-secondary-600 hover:bg-secondary-50 active:bg-secondary-100' }}
|
<a href="{{ $route }}" wire:navigate class="{{$active ? 'active' : ''}}">
|
||||||
flex items-center gap-1 px-4 py-2 text-sm"
|
<x-dynamic-component :component="'icons.'.$icon" class="w-5 h-5"/>
|
||||||
href="{{ $route }}" wire:navigate>
|
{{$title}}
|
||||||
<x-icon name="{{ $icon }}" sm />
|
|
||||||
<span>{{ $title }}</span>
|
|
||||||
</a>
|
</a>
|
||||||
|
</li>
|
||||||
|
|||||||
@@ -1,16 +1,30 @@
|
|||||||
@use(Illuminate\Support\Number)
|
@use(Illuminate\Support\Number)
|
||||||
<div>
|
<div>
|
||||||
<form wire:submit.prevent="save" class="grid lg:grid-cols-[repeat(2,minmax(0,2fr))_1fr] gap-2 mb-4 items-end">
|
<form wire:submit.prevent="save" class="grid lg:grid-cols-[repeat(2,minmax(0,2fr))_1fr] gap-2 mb-4 items-end">
|
||||||
<x-input label="Total" wire:model="valor" invalidate/>
|
|
||||||
<x-input label="Descripción" wire:model="descripcion" invalidate/>
|
|
||||||
|
|
||||||
<x-button type="submit" icon="{{$this->currentCalculo ? 'device-floppy' : 'plus'}}">
|
<label class="form-control">
|
||||||
|
<div class="label">
|
||||||
|
<span class="label-text">Total</span>
|
||||||
|
</div>
|
||||||
|
<input type="number" class="input input-bordered" wire:model="valor"/>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label class="form-control">
|
||||||
|
<div class="label">
|
||||||
|
<span class="label-text">Descripción</span>
|
||||||
|
</div>
|
||||||
|
<input class="input input-bordered" wire:model="descripcion"/>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<button class="btn" type="submit">
|
||||||
@if($this->currentCalculo)
|
@if($this->currentCalculo)
|
||||||
|
<x-icons.device-floppy/>
|
||||||
Guardar
|
Guardar
|
||||||
@else
|
@else
|
||||||
|
<x-icons.plus/>
|
||||||
Agregar
|
Agregar
|
||||||
@endif
|
@endif
|
||||||
</x-button>
|
</button>
|
||||||
|
|
||||||
<p class="text-sm font-medium text-red-500">
|
<p class="text-sm font-medium text-red-500">
|
||||||
@error('valor'){{$message}}@enderror
|
@error('valor'){{$message}}@enderror
|
||||||
@@ -20,24 +34,56 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
<x-table striped :headers="$this->headers" :rows="$this->rows">
|
|
||||||
@interact('column_valor', $row)
|
<div class="overflox-x-auto">
|
||||||
{{Number::currency($row->valor)}}
|
<table class="table">
|
||||||
@endinteract
|
<thead>
|
||||||
@interact('column_action', $row)
|
<tr>
|
||||||
<x-button sm wire:click="edit('{{$row->id}}')" :key="uniqid()">
|
<th>Total</th>
|
||||||
Editar
|
<th>Descripción</th>
|
||||||
</x-button>
|
<th class="text-end">Acciones</th>
|
||||||
<x-button sm color="red" wire:click="confirmDelete('{{$row->id}}')" :key="uniqid()">
|
</tr>
|
||||||
Eliminar
|
</thead>
|
||||||
</x-button>
|
<tbody>
|
||||||
@endinteract
|
@foreach($this->rows as $row)
|
||||||
</x-table>
|
<tr>
|
||||||
|
<td>{{Number::currency($row->valor)}}</td>
|
||||||
|
<td>{{$row->descripcion}}</td>
|
||||||
|
<td class="w-0 whitespace-nowrap">
|
||||||
|
<button class="btn btn-circle btn-sm" wire:click="edit('{{$row->id}}')">
|
||||||
|
<x-icons.edit class="w-5 h-5"/>
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-circle btn-error btn-sm" wire:click="confirmDelete('{{$row->id}}')">
|
||||||
|
<x-icons.trash class="w-5 h-5"/>
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="mt-4 grid lg:grid-cols-3 gap-4">
|
<div class="mt-4 grid lg:grid-cols-3 gap-4">
|
||||||
<x-input label="Fondo" type="number" wire:model.live.debounce="fondo"/>
|
<label class="form-control">
|
||||||
<x-input label="Suma de Dinero" value="{{Number::currency($this->totalCalculo)}}" readonly/>
|
<div class="label">
|
||||||
<x-input label="Deposito" value="{{Number::currency($this->totalCalculo - (is_numeric($fondo) ? $fondo : 0))}}"
|
<span class="label-text">Fondo</span>
|
||||||
|
</div>
|
||||||
|
<input type="number" class="input input-bordered" wire:model.live="fondo"/>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label class="form-control">
|
||||||
|
<div class="label">
|
||||||
|
<span class="label-text">Suma de Dinero</span>
|
||||||
|
</div>
|
||||||
|
<input class="input input-bordered bg-neutral-content" value="{{Number::currency($this->totalCalculo)}}"
|
||||||
readonly/>
|
readonly/>
|
||||||
|
</label>
|
||||||
|
<label class="form-control">
|
||||||
|
<div class="label">
|
||||||
|
<span class="label-text">Deposito</span>
|
||||||
|
</div>
|
||||||
|
<input class="input input-bordered bg-neutral-content"
|
||||||
|
value="{{Number::currency($this->totalCalculo - (is_numeric($fondo) ? $fondo : 0))}}" readonly/>
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,19 +1,39 @@
|
|||||||
@use(Illuminate\Support\Number)
|
@use(Illuminate\Support\Number)
|
||||||
<div>
|
<div>
|
||||||
<form wire:submit.prevent="save" class="grid lg:grid-cols-[repeat(3,minmax(0,2fr))_1fr] gap-2 mb-4 items-end">
|
<form wire:submit.prevent="save" class="grid lg:grid-cols-[repeat(3,minmax(0,2fr))_1fr] gap-2 mb-4 items-end">
|
||||||
<x-select.styled label="Tipo Documento" :options="$this->tipos" wire:model="tipo" id="tipo" required
|
<label class="form-control">
|
||||||
searchable invalidate/>
|
<div class="label">
|
||||||
<x-input label="Descripción" wire:model="descripcion" invalidate/>
|
<span class="label-text">Tipo Documento</span>
|
||||||
<x-input label="Total" wire:model="valor" invalidate/>
|
</div>
|
||||||
|
<select class="select select-bordered" required wire:model="tipo">
|
||||||
|
@foreach($this->tipos as $tipo)
|
||||||
|
<option>{{$tipo}}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
|
||||||
<x-button type="submit" icon="{{$this->currentDocumento ? 'device-floppy' : 'plus'}}">
|
<label class="form-control">
|
||||||
|
<div class="label">
|
||||||
|
<span class="label-text">Descripción</span>
|
||||||
|
</div>
|
||||||
|
<input class="input input-bordered" wire:model="descripcion"/>
|
||||||
|
</label>
|
||||||
|
<label class="form-control">
|
||||||
|
<div class="label">
|
||||||
|
<span class="label-text">Total</span>
|
||||||
|
</div>
|
||||||
|
<input type="number" class="input input-bordered" wire:model="valor"/>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<button class="btn" type="submit">
|
||||||
@if($this->currentDocumento)
|
@if($this->currentDocumento)
|
||||||
|
<x-icons.device-floppy/>
|
||||||
Guardar
|
Guardar
|
||||||
@else
|
@else
|
||||||
|
<x-icons.plus/>
|
||||||
Agregar
|
Agregar
|
||||||
@endif
|
@endif
|
||||||
</x-button>
|
</button>
|
||||||
|
|
||||||
|
|
||||||
<p class="text-sm font-medium text-red-500">
|
<p class="text-sm font-medium text-red-500">
|
||||||
@error('tipo'){{$message}}@enderror
|
@error('tipo'){{$message}}@enderror
|
||||||
@@ -24,21 +44,38 @@
|
|||||||
<p class="text-sm font-medium text-red-500">
|
<p class="text-sm font-medium text-red-500">
|
||||||
@error('valor'){{$message}}@enderror
|
@error('valor'){{$message}}@enderror
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
<x-table striped :headers="$this->headers" :rows="$this->rows">
|
|
||||||
@interact('column_valor', $row)
|
|
||||||
{{Number::currency($row->valor)}}
|
<div class="overflox-x-auto">
|
||||||
@endinteract
|
<table class="table">
|
||||||
@interact('column_action', $row)
|
<thead>
|
||||||
<x-button sm wire:click="edit('{{$row->id}}')" :key="uniqid()">
|
<tr>
|
||||||
Editar
|
<th>Tipo Documento</th>
|
||||||
</x-button>
|
<th>Descripción</th>
|
||||||
<x-button sm color="red" wire:click="confirmDelete('{{$row->id}}')" :key="uniqid()">
|
<th>Total</th>
|
||||||
Eliminar
|
<th class="text-end">Acciones</th>
|
||||||
</x-button>
|
</tr>
|
||||||
@endinteract
|
</thead>
|
||||||
</x-table>
|
<tbody>
|
||||||
|
@foreach($this->rows as $row)
|
||||||
|
<tr>
|
||||||
|
<td>{{$row->tipo_documento}}</td>
|
||||||
|
<td>{{$row->descripcion}}</td>
|
||||||
|
<td>{{Number::currency($row->valor)}}</td>
|
||||||
|
<td class="w-0 whitespace-nowrap">
|
||||||
|
<button class="btn btn-circle btn-sm" wire:click="edit('{{$row->id}}')">
|
||||||
|
<x-icons.edit class="w-5 h-5"/>
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-circle btn-error btn-sm" wire:click="confirmDelete('{{$row->id}}')">
|
||||||
|
<x-icons.trash class="w-5 h-5"/>
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<p class="text-xl">Documentos Totales: <span class="font-bold">{{$this->totalDocumentos}}</span></p>
|
<p class="text-xl">Documentos Totales: <span class="font-bold">{{$this->totalDocumentos}}</span></p>
|
||||||
|
|||||||
@@ -2,26 +2,37 @@
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div class="grid grid-cols-[auto,minmax(0,1fr)] gap-4 items-baseline">
|
<div class="grid grid-cols-[auto,minmax(0,1fr)] gap-4 items-baseline">
|
||||||
<x-label>$20.000</x-label>
|
<label class="label-text" for="veinte_mil">$20.000</label>
|
||||||
<x-input type="number" wire:model.blur="veinte_mil"/>
|
<input class="input input-bordered" type="number" id="veinte_mil" wire:model.blur="veinte_mil"/>
|
||||||
<x-label>$10.000</x-label>
|
|
||||||
<x-input type="number" wire:model.blur="diez_mil"/>
|
<label class="label-text" for="diez_mil">$10.000</label>
|
||||||
<x-label>$5.000</x-label>
|
<input class="input input-bordered" type="number" id="diez_mil" wire:model.blur="diez_mil"/>
|
||||||
<x-input type="number" wire:model.blur="cinco_mil"/>
|
|
||||||
<x-label>$2.000</x-label>
|
<label class="label-text" for="cinco_mil">$5.000</label>
|
||||||
<x-input type="number" wire:model.blur="dos_mil"/>
|
<input class="input input-bordered" type="number" id="cinco_mil" wire:model.blur="cinco_mil"/>
|
||||||
<x-label>$1.000</x-label>
|
|
||||||
<x-input type="number" wire:model.blur="mil"/>
|
<label class="label-text" for="dos_mil">$2.000</label>
|
||||||
<x-label>$500</x-label>
|
<input class="input input-bordered" type="number" id="dos_mil" wire:model.blur="dos_mil"/>
|
||||||
<x-input type="number" wire:model.blur="quinientos"/>
|
|
||||||
<x-label>$100</x-label>
|
<label class="label-text" for="mil">$1.000</label>
|
||||||
<x-input type="number" wire:model.blur="cien"/>
|
<input class="input input-bordered" type="number" id="mil" wire:model.blur="mil"/>
|
||||||
<x-label>$50</x-label>
|
|
||||||
<x-input type="number" wire:model.blur="cincuenta"/>
|
<label class="label-text" for="quinientos">$500</label>
|
||||||
<x-label>$10</x-label>
|
<input class="input input-bordered" type="number" id="quinientos" wire:model.blur="quinientos"/>
|
||||||
<x-input type="number" wire:model.blur="diez"/>
|
|
||||||
<hr class="border-b my-4 col-span-full"/>
|
<label class="label-text" for="cien">$100</label>
|
||||||
<x-label>Total</x-label>
|
<input class="input input-bordered" type="number" id="cien" wire:model.blur="cien"/>
|
||||||
<x-input value="{{Number::currency($this->totalEfectivo)}}" readonly/>
|
|
||||||
|
<label class="label-text" for="cincuenta">$50</label>
|
||||||
|
<input class="input input-bordered" type="number" id="cincuenta" wire:model.blur="cincuenta"/>
|
||||||
|
|
||||||
|
<label class="label-text" for="diez">$10</label>
|
||||||
|
<input class="input input-bordered" type="number" id="diez" wire:model.blur="diez"/>
|
||||||
|
|
||||||
|
<div class="divider col-span-full"></div>
|
||||||
|
|
||||||
|
<label class="label-text">Total</label>
|
||||||
|
<input class="input input-bordered bg-neutral-content" value="{{Number::currency($this->totalEfectivo)}}"
|
||||||
|
readonly/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,20 +1,44 @@
|
|||||||
@use(Illuminate\Support\Number)
|
@use(Illuminate\Support\Number)
|
||||||
<div>
|
<div>
|
||||||
<form wire:submit.prevent="save" class="grid lg:grid-cols-[repeat(4,minmax(0,2fr))_1fr] gap-2 mb-4 items-end">
|
<form wire:submit.prevent="save" class="grid lg:grid-cols-[repeat(4,minmax(0,2fr))_1fr] gap-2 mb-4 items-end">
|
||||||
<x-select.styled label="Tipo Documento" :options="$this->tipos" wire:model="tipo" id="tipo" required
|
<label class="form-control">
|
||||||
searchable invalidate/>
|
<div class="label">
|
||||||
<x-input label="Nº Documento" wire:model="numero" invalidate/>
|
<span class="label-text">Tipo Documento</span>
|
||||||
<x-input label="Descripción" wire:model="descripcion" invalidate/>
|
</div>
|
||||||
<x-input label="Total" wire:model="valor" invalidate/>
|
<select class="select select-bordered" required wire:model="tipo">
|
||||||
|
@foreach($this->tipos as $tipo)
|
||||||
|
<option>{{$tipo}}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
<label class="form-control">
|
||||||
|
<div class="label">
|
||||||
|
<span class="label-text">Nº Documento</span>
|
||||||
|
</div>
|
||||||
|
<input class="input input-bordered" wire:model="numero"/>
|
||||||
|
</label>
|
||||||
|
<label class="form-control">
|
||||||
|
<div class="label">
|
||||||
|
<span class="label-text">Descripción</span>
|
||||||
|
</div>
|
||||||
|
<input class="input input-bordered" wire:model="descripcion"/>
|
||||||
|
</label>
|
||||||
|
<label class="form-control">
|
||||||
|
<div class="label">
|
||||||
|
<span class="label-text">Total</span>
|
||||||
|
</div>
|
||||||
|
<input type="number" class="input input-bordered" wire:model="valor"/>
|
||||||
|
</label>
|
||||||
|
|
||||||
<x-button type="submit" icon="{{$this->currentEgreso ? 'device-floppy' : 'plus'}}">
|
<button class="btn" type="submit">
|
||||||
@if($this->currentEgreso)
|
@if($this->currentEgreso)
|
||||||
|
<x-icons.device-floppy/>
|
||||||
Guardar
|
Guardar
|
||||||
@else
|
@else
|
||||||
|
<x-icons.plus/>
|
||||||
Agregar
|
Agregar
|
||||||
@endif
|
@endif
|
||||||
</x-button>
|
</button>
|
||||||
|
|
||||||
|
|
||||||
<p class="text-sm font-medium text-red-500">
|
<p class="text-sm font-medium text-red-500">
|
||||||
@error('tipo'){{$message}}@enderror
|
@error('tipo'){{$message}}@enderror
|
||||||
@@ -30,19 +54,38 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
<x-table striped :headers="$this->headers" :rows="$this->rows">
|
|
||||||
@interact('column_valor', $row)
|
<div class="overflox-x-auto">
|
||||||
{{Number::currency($row->valor)}}
|
<table class="table">
|
||||||
@endinteract
|
<thead>
|
||||||
@interact('column_action', $row)
|
<tr>
|
||||||
<x-button sm wire:click="edit('{{$row->id}}')" :key="uniqid()">
|
<th>Tipo Egreso</th>
|
||||||
Editar
|
<th>Número Documento</th>
|
||||||
</x-button>
|
<th>Descripción</th>
|
||||||
<x-button sm color="red" wire:click="confirmDelete('{{$row->id}}')" :key="uniqid()">
|
<th>Total</th>
|
||||||
Eliminar
|
<th class="text-end">Acciones</th>
|
||||||
</x-button>
|
</tr>
|
||||||
@endinteract
|
</thead>
|
||||||
</x-table>
|
<tbody>
|
||||||
|
@foreach($this->rows as $row)
|
||||||
|
<tr>
|
||||||
|
<td>{{$row->tipo_egreso}}</td>
|
||||||
|
<td>{{$row->numero}}</td>
|
||||||
|
<td>{{$row->descripcion}}</td>
|
||||||
|
<td>{{Number::currency($row->valor)}}</td>
|
||||||
|
<td class="w-0 whitespace-nowrap">
|
||||||
|
<button class="btn btn-circle btn-sm" wire:click="edit('{{$row->id}}')">
|
||||||
|
<x-icons.edit class="w-5 h-5"/>
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-circle btn-error btn-sm" wire:click="confirmDelete('{{$row->id}}')">
|
||||||
|
<x-icons.trash class="w-5 h-5"/>
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<p class="text-xl">Egresos Totales: <span class="font-bold">{{$this->totalEgresos}}</span></p>
|
<p class="text-xl">Egresos Totales: <span class="font-bold">{{$this->totalEgresos}}</span></p>
|
||||||
|
|||||||
@@ -1,19 +1,44 @@
|
|||||||
|
@use(Illuminate\Support\Number)
|
||||||
<div>
|
<div>
|
||||||
<form wire:submit.prevent="save" class="grid lg:grid-cols-[repeat(4,minmax(0,2fr))_1fr] gap-2 mb-4 items-end">
|
<form wire:submit.prevent="save" class="grid lg:grid-cols-[repeat(4,minmax(0,2fr))_1fr] gap-2 mb-4 items-end">
|
||||||
<x-select.styled label="Tipo Documento" :options="$this->tipos" wire:model="tipo" required searchable
|
<label class="form-control">
|
||||||
invalidate/>
|
<div class="label">
|
||||||
<x-input type="number" label="Documento Inicial" wire:model="ingreso_inicial" min="0" invalidate/>
|
<span class="label-text">Tipo Documento</span>
|
||||||
<x-input type="number" label="Documento Final" wire:model="ingreso_final" min="0" invalidate/>
|
</div>
|
||||||
<x-input type="number" label="Total" wire:model="total" min="0" invalidate/>
|
<select class="select select-bordered " required wire:model="tipo">
|
||||||
|
@foreach($this->tipos as $tipo)
|
||||||
|
<option>{{$tipo}}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
<label class="form-control">
|
||||||
|
<div class="label">
|
||||||
|
<span class="label-text">Documento Inicial</span>
|
||||||
|
</div>
|
||||||
|
<input type="number" class="input input-bordered" wire:model="ingreso_inicial" min="0"/>
|
||||||
|
</label>
|
||||||
|
<label class="form-control">
|
||||||
|
<div class="label">
|
||||||
|
<span class="label-text">Documento Final</span>
|
||||||
|
</div>
|
||||||
|
<input type="number" class="input input-bordered" wire:model="ingreso_final" min="0"/>
|
||||||
|
</label>
|
||||||
|
<label class="form-control">
|
||||||
|
<div class="label">
|
||||||
|
<span class="label-text">Total</span>
|
||||||
|
</div>
|
||||||
|
<input type="number" class="input input-bordered" wire:model="total" min="0"/>
|
||||||
|
</label>
|
||||||
|
|
||||||
<x-button type="submit" icon="{{$this->currentIngreso ? 'device-floppy' : 'plus'}}">
|
<button class="btn " type="submit">
|
||||||
@if($this->currentIngreso)
|
@if($this->currentIngreso)
|
||||||
|
<x-icons.device-floppy/>
|
||||||
Guardar
|
Guardar
|
||||||
@else
|
@else
|
||||||
|
<x-icons.plus/>
|
||||||
Agregar
|
Agregar
|
||||||
@endif
|
@endif
|
||||||
</x-button>
|
</button>
|
||||||
|
|
||||||
|
|
||||||
<p class="text-sm font-medium text-red-500">
|
<p class="text-sm font-medium text-red-500">
|
||||||
@error('tipo'){{$message}}@enderror
|
@error('tipo'){{$message}}@enderror
|
||||||
@@ -29,25 +54,38 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
<x-table striped :headers="$this->headers" :rows="$this->rows">
|
|
||||||
@interact('column_ingreso_inicial', $row)
|
<div class="overflox-x-auto">
|
||||||
{{\Illuminate\Support\Number::format($row->ingreso_inicial)}}
|
<table class="table">
|
||||||
@endinteract
|
<thead>
|
||||||
@interact('column_ingreso_final', $row)
|
<tr>
|
||||||
{{\Illuminate\Support\Number::format($row->ingreso_final)}}
|
<th>Tipo Documento</th>
|
||||||
@endinteract
|
<th>Documento Inicial</th>
|
||||||
@interact('column_total', $row)
|
<th>Documento Final</th>
|
||||||
{{\Illuminate\Support\Number::currency($row->total)}}
|
<th>Total</th>
|
||||||
@endinteract
|
<th class="text-end">Acciones</th>
|
||||||
@interact('column_action', $row)
|
</tr>
|
||||||
<x-button sm wire:click="edit('{{$row->id}}')" :key="uniqid()">
|
</thead>
|
||||||
Editar
|
<tbody>
|
||||||
</x-button>
|
@foreach($this->rows as $row)
|
||||||
<x-button sm color="red" wire:click="confirmDelete('{{$row->id}}')" :key="uniqid()">
|
<tr>
|
||||||
Eliminar
|
<td>{{$row->tipo_ingreso}}</td>
|
||||||
</x-button>
|
<td>{{Number::format($row->ingreso_inicial)}}</td>
|
||||||
@endinteract
|
<td>{{Number::format($row->ingreso_final)}}</td>
|
||||||
</x-table>
|
<td>{{Number::currency($row->total)}}</td>
|
||||||
|
<td class="w-0 whitespace-nowrap">
|
||||||
|
<button class="btn btn-circle btn-sm" wire:click="edit('{{$row->id}}')">
|
||||||
|
<x-icons.edit class="w-5 h-5"/>
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-circle btn-error btn-sm" wire:click="confirmDelete('{{$row->id}}')">
|
||||||
|
<x-icons.trash class="w-5 h-5"/>
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<p class="text-xl">Ingresos Totales: <span class="font-bold">{{$this->totalIngresos}}</span></p>
|
<p class="text-xl">Ingresos Totales: <span class="font-bold">{{$this->totalIngresos}}</span></p>
|
||||||
|
|||||||
@@ -5,69 +5,132 @@
|
|||||||
{{$this->turno ? "Editar caja" : "Registrar Caja"}}
|
{{$this->turno ? "Editar caja" : "Registrar Caja"}}
|
||||||
</x-title>
|
</x-title>
|
||||||
|
|
||||||
<x-button icon="arrow-left" color="secondary" wire:navigate href="{{route('cajas.index')}}">
|
<button class="btn" wire:navigate href="{{route('cajas.index')}}">
|
||||||
|
<x-icons.arrow-left/>
|
||||||
Volver
|
Volver
|
||||||
</x-button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex gap-8 mb-4">
|
<div class="flex gap-8 mb-4">
|
||||||
<div>
|
<div>
|
||||||
<x-label>Fecha</x-label>
|
<p>Fecha</p>
|
||||||
<p class="font-bold text-secondary">{{$turno->fecha->format('d-m-Y')}}</p>
|
<p class="font-bold">{{$turno->fecha->format('d-m-Y')}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<x-label>Caja</x-label>
|
<p>Caja</p>
|
||||||
<p class="font-bold text-secondary">{{$turno->numero_caja}}</p>
|
<p class="font-bold">{{$turno->numero_caja}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<x-label>Turno</x-label>
|
<p>Turno</p>
|
||||||
<p class="font-bold text-secondary">{{$turno->numero_turno}}</p>
|
<p class="font-bold">{{$turno->numero_turno}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid grid-cols-[minmax(0,4fr)_minmax(0,1fr)] gap-4 items-start">
|
<div class="grid grid-cols-[minmax(0,4fr)_minmax(0,1fr)] gap-4 items-start">
|
||||||
<x-tab wire:model="tab">
|
<div x-data="{tab: @entangle('tab').live}">
|
||||||
<x-tab.items tab="Ingresos">
|
<div role="tablist" class="tabs tabs-lifted">
|
||||||
<x-slot:left>
|
<button role="tab" class="tab gap-2"
|
||||||
<x-icon name="plus" class="w-4 h-4"/>
|
:class="tab === 'Ingresos' ? 'tab-active' : ''"
|
||||||
</x-slot:left>
|
@click="tab = 'Ingresos'">
|
||||||
|
<x-icons.plus class="w-5 h-5"/>
|
||||||
|
Ingresos
|
||||||
|
</button>
|
||||||
|
<button role="tab" class="tab gap-2"
|
||||||
|
:class="tab === 'Egresos' ? 'tab-active' : ''"
|
||||||
|
@click="tab = 'Egresos'">
|
||||||
|
<x-icons.minus class="w-5 h-5"/>
|
||||||
|
Egresos
|
||||||
|
</button>
|
||||||
|
<button role="tab" class="tab gap-2"
|
||||||
|
:class="tab === 'Documentos' ? 'tab-active' : ''"
|
||||||
|
@click="tab = 'Documentos'">
|
||||||
|
<x-icons.credit-card class="w-5 h-5"/>
|
||||||
|
Documentos
|
||||||
|
</button>
|
||||||
|
<button role="tab" class="tab gap-2"
|
||||||
|
:class="tab === 'Calculo de Fondo' ? 'tab-active' : ''"
|
||||||
|
@click="tab = 'Calculo de Fondo'">
|
||||||
|
<x-icons.plus-minus class="w-5 h-5"/>
|
||||||
|
Calculo de Fondo
|
||||||
|
</button>
|
||||||
|
<button role="tab" class="tab gap-2"
|
||||||
|
:class="tab === 'Efectivo' ? 'tab-active' : ''"
|
||||||
|
@click="tab = 'Efectivo'">
|
||||||
|
<x-icons.currency-dollar class="w-5 h-5"/>
|
||||||
|
Efectivo
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="border border-base-300 border-t-0">
|
||||||
|
<div x-show="tab === 'Ingresos'" x-cloak class="p-4">
|
||||||
<livewire:cajas.components.ingresos-component :turno="$turno"/>
|
<livewire:cajas.components.ingresos-component :turno="$turno"/>
|
||||||
</x-tab.items>
|
</div>
|
||||||
<x-tab.items tab="Egresos">
|
<div x-show="tab === 'Egresos'" x-cloak class="p-4">
|
||||||
<x-slot:left>
|
|
||||||
<x-icon name="minus" class="w-4 h-4"/>
|
|
||||||
</x-slot:left>
|
|
||||||
<livewire:cajas.components.egresos-component :turno="$turno"/>
|
<livewire:cajas.components.egresos-component :turno="$turno"/>
|
||||||
</x-tab.items>
|
</div>
|
||||||
<x-tab.items tab="Documentos">
|
<div x-show="tab === 'Documentos'" x-cloak class="p-4">
|
||||||
<x-slot:left>
|
|
||||||
<x-icon name="credit-card" class="w-4 h-4"/>
|
|
||||||
</x-slot:left>
|
|
||||||
<livewire:cajas.components.documentos-component :turno="$turno"/>
|
<livewire:cajas.components.documentos-component :turno="$turno"/>
|
||||||
</x-tab.items>
|
</div>
|
||||||
<x-tab.items tab="Calculo de Fondo">
|
<div x-show="tab === 'Calculo de Fondo'" x-cloak class="p-4">
|
||||||
<x-slot:left>
|
|
||||||
<x-icon name="plus-minus" class="w-4 h-4"/>
|
|
||||||
</x-slot:left>
|
|
||||||
<livewire:cajas.components.calculo-fondo-component :turno="$turno"/>
|
<livewire:cajas.components.calculo-fondo-component :turno="$turno"/>
|
||||||
</x-tab.items>
|
</div>
|
||||||
<x-tab.items tab="Efectivo">
|
<div x-show="tab === 'Efectivo'" x-cloak class="p-4">
|
||||||
<x-slot:left>
|
|
||||||
<x-icon name="currency-dollar" class="w-4 h-4"/>
|
|
||||||
</x-slot:left>
|
|
||||||
<livewire:cajas.components.efectivo-component :turno="$turno"/>
|
<livewire:cajas.components.efectivo-component :turno="$turno"/>
|
||||||
</x-tab.items>
|
</div>
|
||||||
</x-tab>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<x-card class="space-y-4">
|
<div class="space-y-4">
|
||||||
<x-input label="Total Efectivo" value="{{Number::currency($this->totalEfectivo)}}" readonly/>
|
<label class="form-control">
|
||||||
<x-input label="Total Egresos" value="{{Number::currency($this->totalEgresos)}}" readonly/>
|
<div class="label">
|
||||||
<x-input label="Total Documento" value="{{Number::currency($this->totalDocumentos)}}" readonly/>
|
<span class="label-text">Total Efectivo</span>
|
||||||
<hr class="border-b-1 my-4"/>
|
</div>
|
||||||
<x-input label="Rendido" value="{{Number::currency($this->rendido)}}" readonly/>
|
<input type="text" class="input input-bordered bg-neutral-content"
|
||||||
<x-input label="Debe Rendir" value="{{Number::currency($this->debeRendir)}}" readonly/>
|
value="{{Number::currency($this->totalEfectivo)}}"
|
||||||
<x-input label="Diferencia" class="font-bold {{$this->diferencia < 0 ? 'text-red-500' : 'text-green-500'}}"
|
readonly>
|
||||||
value="{{Number::currency($this->diferencia)}}" readonly/>
|
</label>
|
||||||
</x-card>
|
<label class="form-control">
|
||||||
|
<div class="label">
|
||||||
|
<span class="label-text">Total Egresos</span>
|
||||||
|
</div>
|
||||||
|
<input type="text" class="input input-bordered bg-neutral-content"
|
||||||
|
value="{{Number::currency($this->totalEgresos)}}"
|
||||||
|
readonly>
|
||||||
|
</label>
|
||||||
|
<label class="form-control">
|
||||||
|
<div class="label">
|
||||||
|
<span class="label-text">Total Documentos</span>
|
||||||
|
</div>
|
||||||
|
<input type="text" class="input input-bordered bg-neutral-content"
|
||||||
|
value="{{Number::currency($this->totalDocumentos)}}"
|
||||||
|
readonly>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="divider"></div>
|
||||||
|
|
||||||
|
<label class="form-control">
|
||||||
|
<div class="label">
|
||||||
|
<span class="label-text">Rendido</span>
|
||||||
|
</div>
|
||||||
|
<input type="text" class="input input-bordered bg-neutral-content"
|
||||||
|
value="{{Number::currency($this->rendido)}}"
|
||||||
|
readonly>
|
||||||
|
</label>
|
||||||
|
<label class="form-control">
|
||||||
|
<div class="label">
|
||||||
|
<span class="label-text">Debe Rendir</span>
|
||||||
|
</div>
|
||||||
|
<input type="text" class="input input-bordered bg-neutral-content"
|
||||||
|
value="{{Number::currency($this->debeRendir)}}"
|
||||||
|
readonly>
|
||||||
|
</label>
|
||||||
|
<label class="form-control">
|
||||||
|
<div class="label">
|
||||||
|
<span class="label-text">Diferencia</span>
|
||||||
|
</div>
|
||||||
|
<input type="text"
|
||||||
|
class="input input-bordered bg-neutral-content {{$this->diferencia < 0 ? 'text-red-500' : 'text-green-500'}}"
|
||||||
|
value="{{Number::currency($this->diferencia)}}"
|
||||||
|
readonly>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,51 +1,100 @@
|
|||||||
@use(Illuminate\Support\Number)
|
@use(Illuminate\Support\Number)
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<div class="flex flex-col sm:flex-row gap-2 justify-between items-baseline mb-4">
|
<div class="flex flex-col sm:flex-row gap-2 justify-between items-baseline mb-4">
|
||||||
<x-title>Cajas</x-title>
|
<x-title>Cajas</x-title>
|
||||||
<x-button wire:click="createTurno" icon="plus">Registrar Caja</x-button>
|
<button class="btn" wire:click="createTurno">
|
||||||
|
<x-icons.plus/>
|
||||||
|
Registrar Caja
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex">
|
<div class="flex mb-4">
|
||||||
<x-date label="Fecha" wire:model.live="searchFecha" helpers/>
|
<label class="form-control">
|
||||||
|
<div class="label">
|
||||||
|
<span class="label-text">Fecha</span>
|
||||||
|
</div>
|
||||||
|
<input type="date" class="input input-bordered" wire:model.live="searchFecha"/>
|
||||||
|
@error('fecha')
|
||||||
|
<p class="text-sm text-error">{{ $message }}</p>
|
||||||
|
@enderror
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-4">
|
<div class="overflox-x-auto">
|
||||||
<x-table striped :headers="$this->headers" :rows="$this->rows" paginate>
|
<table class="table">
|
||||||
@interact('column_fecha', $row)
|
<thead>
|
||||||
{{$row->fecha->format('d-m-Y')}}
|
<tr>
|
||||||
@endinteract
|
<th>Fecha</th>
|
||||||
@interact('column_ingresos', $row)
|
<th>Caja</th>
|
||||||
{{Number::currency($row->ingresos()->sum('total'))}}
|
<th>Turno</th>
|
||||||
@endinteract
|
<th>Ingresos</th>
|
||||||
@interact('column_egresos', $row)
|
<th>Egresos</th>
|
||||||
{{Number::currency($row->egresos()->sum('valor'))}}
|
<th>Arqueo</th>
|
||||||
@endinteract
|
<th class="text-end">Acciones</th>
|
||||||
@interact('column_arqueo', $row)
|
</tr>
|
||||||
<span class="font-bold {{$row->arqueo >= 0 ? 'text-green-500' : 'text-red-500'}}">
|
</thead>
|
||||||
{{Number::currency($row->arqueo)}}
|
<tbody>
|
||||||
</span>
|
@foreach($this->rows as $row)
|
||||||
@endinteract
|
<tr>
|
||||||
@interact('column_action', $row)
|
<td>{{$row->fecha->format('d-m-Y')}}</td>
|
||||||
<x-button sm :href="route('cajas.edit', $row->id)" wire:navigate :key="uniqid()">
|
<td>{{$row->numero_caja}}</td>
|
||||||
Editar
|
<td>{{$row->numero_turno}}</td>
|
||||||
</x-button>
|
<td>{{Number::currency($row->ingresos()->sum('total'))}}</td>
|
||||||
<x-button sm color="red" wire:click="confirmDelete('{{$row->id}}')" :key="uniqid()">
|
<td>{{Number::currency($row->egresos()->sum('valor'))}}</td>
|
||||||
Eliminar
|
<td class="{{$row->arqueo >= 0 ? 'text-green-500' : 'text-red-500'}}">{{Number::currency($row->arqueo)}}</td>
|
||||||
</x-button>
|
<td class="w-0 whitespace-nowrap">
|
||||||
@endinteract
|
<a class="btn btn-circle btn-sm" wire:navigate href="{{route('cajas.edit', $row->id)}}">
|
||||||
</x-table>
|
<x-icons.edit class="w-5 h-5"/>
|
||||||
|
</a>
|
||||||
|
<button class="btn btn-circle btn-error btn-sm" wire:click="confirmDelete('{{$row->id}}')">
|
||||||
|
<x-icons.trash class="w-5 h-5"/>
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<x-modal title="Registrar Caja" wire center blur>
|
<x-my-modal name="turno" title="Registrar Caja">
|
||||||
<div class="flex flex-col gap-2">
|
<div class="flex flex-col gap-2">
|
||||||
<x-date label="Fecha" wire:model="fecha" format="DD-MM-YYYY"/>
|
<label class="form-control">
|
||||||
<x-input type="number" label="Caja" wire:model="caja"/>
|
<div class="label">
|
||||||
<x-input type="number" label="Turno" wire:model="turno"/>
|
<span class="label-text">Fecha</span>
|
||||||
|
</div>
|
||||||
|
<input type="date" class="input input-bordered" wire:model.live="fecha"/>
|
||||||
|
@error('fecha')
|
||||||
|
<p class="text-sm text-error">{{ $message }}</p>
|
||||||
|
@enderror
|
||||||
|
</label>
|
||||||
|
<label class="form-control">
|
||||||
|
<div class="label">
|
||||||
|
<span class="label-text">Caja</span>
|
||||||
|
</div>
|
||||||
|
<input type="number" class="input input-bordered" wire:model="caja"/>
|
||||||
|
@error('caja')
|
||||||
|
<p class="text-sm text-error">{{ $message }}</p>
|
||||||
|
@enderror
|
||||||
|
</label>
|
||||||
|
<label class="form-control">
|
||||||
|
<div class="label">
|
||||||
|
<span class="label-text">Turno</span>
|
||||||
|
</div>
|
||||||
|
<input type="number" class="input input-bordered" wire:model="turno"/>
|
||||||
|
@error('turno')
|
||||||
|
<p class="text-sm text-error">{{ $message }}</p>
|
||||||
|
@enderror
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<x-slot:footer>
|
<x-slot:footer>
|
||||||
<x-button color="secondary" icon="arrow-left" wire:click="closeTurnoModal">Volver</x-button>
|
<button class="btn" wire:click="closeTurnoModal">
|
||||||
<x-button icon="plus" wire:click="storeTurno">Registrar Caja</x-button>
|
<x-icons.arrow-left/>
|
||||||
|
Volver
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-primary" wire:click="storeTurno">
|
||||||
|
<x-icons.device-floppy/>
|
||||||
|
Registrar Caja
|
||||||
|
</button>
|
||||||
</x-slot:footer>
|
</x-slot:footer>
|
||||||
</x-modal>
|
</x-my-modal>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -7,32 +7,66 @@
|
|||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<form wire:submit.prevent="save">
|
<form wire:submit.prevent="save">
|
||||||
<x-card class="space-y-4">
|
<label class="form-control">
|
||||||
<x-input label="Nombre" wire:model="name"/>
|
<div class="label">
|
||||||
<x-input label="Correo Electrónico" wire:model="email"/>
|
<span class="label-text">Nombre</span>
|
||||||
<x-select.styled label="Roles" :options="$this->availableRoles" select="label:title|value:id" multiple
|
</div>
|
||||||
wire:model="roles"/>
|
<input class="input input-bordered" wire:model="name"/>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label class="form-control">
|
||||||
|
<div class="label">
|
||||||
|
<span class="label-text">Correo Electrónico</span>
|
||||||
|
</div>
|
||||||
|
<input type="email" class="input input-bordered" wire:model="email"/>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
|
||||||
|
<label class="form-control">
|
||||||
|
<div class="label">
|
||||||
|
<span class="label-text">Roles</span>
|
||||||
|
</div>
|
||||||
|
<select class="select select-bordered" required wire:model="roles" multiple>
|
||||||
|
@foreach($this->availableRoles as $role)
|
||||||
|
<option value="{{$role->id}}">{{$role->title}}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
|
||||||
@if($this->user)
|
@if($this->user)
|
||||||
<x-checkbox label="Cambiar contraseña" wire:model.live="change_password"/>
|
<div class="form-control">
|
||||||
|
<label class="label cursor-pointer w-0 whitespace-nowrap space-x-4">
|
||||||
|
<span class="label-text">Cambiar contraseña</span>
|
||||||
|
<input type="checkbox" class="toggle" wire:model.live="change_password"/>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if(!$this->user || $change_password)
|
@if(!$this->user || $change_password)
|
||||||
<x-password label="Contraseña" wire:model="password"/>
|
<label class="form-control">
|
||||||
<x-password label="Confirmación de la contraseña" wire:model="password_confirmation"/>
|
<div class="label">
|
||||||
|
<span class="label-text">Contraseña</span>
|
||||||
|
</div>
|
||||||
|
<input type="password" class="input input-bordered" wire:model="password"/>
|
||||||
|
</label>
|
||||||
|
<label class="form-control">
|
||||||
|
<div class="label">
|
||||||
|
<span class="label-text">Confirmación de la contraseña</span>
|
||||||
|
</div>
|
||||||
|
<input type="password" class="input input-bordered" wire:model="password_confirmation"/>
|
||||||
|
</label>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<x-slot:footer>
|
<div class="flex justify-end gap-2 mt-4">
|
||||||
<x-button wire:navigate :href="route('usuarios.index')" icon="arrow-left" color="secondary">
|
<a wire:navigate href="{{route('usuarios.index')}}" class="btn">
|
||||||
|
<x-icons.arrow-left/>
|
||||||
Volver
|
Volver
|
||||||
</x-button>
|
</a>
|
||||||
<x-button type="submit" icon="plus">
|
<button type="submit" class="btn btn-primary">
|
||||||
|
<x-icons.plus/>
|
||||||
Guardar
|
Guardar
|
||||||
</x-button>
|
</button>
|
||||||
</x-slot:footer>
|
</div>
|
||||||
</x-card>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,29 +1,43 @@
|
|||||||
@php use App\Models\User; @endphp
|
@use(App\Models\User)
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div class="flex flex-col sm:flex-row gap-2 justify-between items-baseline mb-4">
|
<div class="flex flex-col sm:flex-row gap-2 justify-between items-baseline mb-4">
|
||||||
<x-title>Usuarios</x-title>
|
<x-title>Usuarios</x-title>
|
||||||
|
|
||||||
@can('create', User::class)
|
@can('create', User::class)
|
||||||
<x-button :href="route('usuarios.create')" wire:navigate icon="plus">Registrar Usuario</x-button>
|
<button class="btn" href="{{route('usuarios.create')}}" wire:navigate>
|
||||||
|
<x-icons.plus/>
|
||||||
|
Registrar Usuario
|
||||||
|
</button>
|
||||||
@endcan
|
@endcan
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-4">
|
|
||||||
<x-table striped :headers="$this->headers" :rows="$this->rows" paginate>
|
<div class="overflox-x-auto">
|
||||||
@interact('column_roles', $row)
|
<table class="table">
|
||||||
{{$row->roles->pluck('title')->join(', ')}}
|
<thead>
|
||||||
@endinteract
|
<tr>
|
||||||
@interact('column_action', $row)
|
<th>Nombre</th>
|
||||||
@can('update', $row)
|
<th>Email</th>
|
||||||
<x-button sm :href="route('usuarios.edit', $row->id)" wire:navigate :key="uniqid()">
|
<th class="text-end">Acciones</th>
|
||||||
Editar
|
</tr>
|
||||||
</x-button>
|
</thead>
|
||||||
@endcan
|
<tbody>
|
||||||
@can('delete', $row)
|
@foreach($this->rows as $row)
|
||||||
<x-button sm color="red" wire:click="confirmDelete('{{$row->id}}')" :key="uniqid()">
|
<tr>
|
||||||
Eliminar
|
<td>{{$row->name}}</td>
|
||||||
</x-button>
|
<td>{{$row->email}}</td>
|
||||||
@endcan
|
<td class="w-0 whitespace-nowrap">
|
||||||
@endinteract
|
<a class="btn btn-circle btn-sm" wire:navigate href="{{route('usuarios.edit', $row->id)}}">
|
||||||
</x-table>
|
<x-icons.edit class="w-5 h-5"/>
|
||||||
|
</a>
|
||||||
|
<button class="btn btn-circle btn-error btn-sm" wire:click="confirmDelete('{{$row->id}}')">
|
||||||
|
<x-icons.trash class="w-5 h-5"/>
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
import defaultTheme from 'tailwindcss/defaultTheme';
|
import defaultTheme from 'tailwindcss/defaultTheme';
|
||||||
import colors from 'tailwindcss/colors';
|
|
||||||
import forms from '@tailwindcss/forms';
|
|
||||||
|
|
||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
export default {
|
export default {
|
||||||
@@ -20,22 +18,47 @@ export default {
|
|||||||
sans: ['Inter', ...defaultTheme.fontFamily.sans],
|
sans: ['Inter', ...defaultTheme.fontFamily.sans],
|
||||||
serif: ['Domine', ...defaultTheme.fontFamily.serif],
|
serif: ['Domine', ...defaultTheme.fontFamily.serif],
|
||||||
},
|
},
|
||||||
colors: {
|
|
||||||
'primary': {
|
|
||||||
DEFAULT: colors.blue['500'],
|
|
||||||
...colors.blue,
|
|
||||||
},
|
|
||||||
'secondary': {
|
|
||||||
DEFAULT: colors.slate['500'],
|
|
||||||
...colors.slate,
|
|
||||||
},
|
|
||||||
'dark': {
|
|
||||||
DEFAULT: colors.slate['700'],
|
|
||||||
...colors.slate
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
plugins: [forms],
|
daisyui: {
|
||||||
|
themes: [
|
||||||
|
"light",
|
||||||
|
"dark",
|
||||||
|
"cupcake",
|
||||||
|
"bumblebee",
|
||||||
|
"emerald",
|
||||||
|
"corporate",
|
||||||
|
"synthwave",
|
||||||
|
"retro",
|
||||||
|
"cyberpunk",
|
||||||
|
"valentine",
|
||||||
|
"halloween",
|
||||||
|
"garden",
|
||||||
|
"forest",
|
||||||
|
"aqua",
|
||||||
|
"lofi",
|
||||||
|
"pastel",
|
||||||
|
"fantasy",
|
||||||
|
"wireframe",
|
||||||
|
"black",
|
||||||
|
"luxury",
|
||||||
|
"dracula",
|
||||||
|
"cmyk",
|
||||||
|
"autumn",
|
||||||
|
"business",
|
||||||
|
"acid",
|
||||||
|
"lemonade",
|
||||||
|
"night",
|
||||||
|
"coffee",
|
||||||
|
"winter",
|
||||||
|
"dim",
|
||||||
|
"nord",
|
||||||
|
"sunset",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
require('@tailwindcss/typography'),
|
||||||
|
require('daisyui'),
|
||||||
|
],
|
||||||
};
|
};
|
||||||
|
|||||||