hola
This commit is contained in:
@@ -317,21 +317,17 @@ class ShowPromociones extends Component
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
|
|
||||||
$descuento = Saldo::where('usuario_id', Auth::user()->id)->first();
|
$descuento = Saldo::where('usuario_id', Auth::user()->id)->first();
|
||||||
$saldo_anterior = $descuento->valor;
|
$saldo_anterior = $descuento->valor;
|
||||||
$nuevo_saldo = $saldo_anterior - ($this->precioAhora *$this->cantidad_comprarPromo);
|
$nuevo_saldo = $saldo_anterior - ($this->precioAhora *$this->cantidad_comprarPromo);
|
||||||
$cobro = $descuento->update(['valor' => $nuevo_saldo]);
|
$cobro = $descuento->update(['valor' => $nuevo_saldo]);
|
||||||
//dd($cobro);
|
|
||||||
if ($cobro) {
|
if ($cobro) {
|
||||||
$historial->update(['estado' => 'activo']);
|
$historial->update(['estado' => 'activo']);
|
||||||
$this->modalComprarPromo = false;
|
$this->modalComprarPromo = false;
|
||||||
$this->credenciales($historial);
|
$this->credenciales($historial);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$eliminar = Historial_cuenta::whereIn('id',$this->n)->delete();
|
$eliminar = Historial_cuenta::whereIn('id',$this->n)->delete();
|
||||||
//dd($eliminar);
|
|
||||||
$this->alert('warning', 'Error en el cobro, comuniquese con soporte!', [
|
$this->alert('warning', 'Error en el cobro, comuniquese con soporte!', [
|
||||||
'position' => 'top']);
|
'position' => 'top']);
|
||||||
}
|
}
|
||||||
@@ -350,12 +346,15 @@ class ShowPromociones extends Component
|
|||||||
$this->modalComprarPromo = false;
|
$this->modalComprarPromo = false;
|
||||||
|
|
||||||
foreach ($this->f as $serviceId) {
|
foreach ($this->f as $serviceId) {
|
||||||
$pendiente = new Pendientes();
|
|
||||||
$pendiente->historial_id = $this->historial->id;
|
for ($y = 0; $y < (int)$this->cantidad_comprarPromo; $y++) {
|
||||||
$pendiente->cantidad = $this->cantidad_comprarPromo;
|
$pendiente = new Pendientes();
|
||||||
$pendiente->estado = 'pendiente';
|
$pendiente->historial_id = $this->historial->id;
|
||||||
$pendiente->servicio_id = $serviceId;
|
$pendiente->cantidad = '1';
|
||||||
$pendiente->save();
|
$pendiente->estado = 'pendiente';
|
||||||
|
$pendiente->servicio_id = $serviceId;
|
||||||
|
$pendiente->save();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->credenciales($this->historial);
|
$this->credenciales($this->historial);
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
"livewire/livewire": "^2.10",
|
"livewire/livewire": "^2.10",
|
||||||
"maatwebsite/excel": "^3.1",
|
"maatwebsite/excel": "^3.1",
|
||||||
"mercadopago/dx-php": "^2.5",
|
"mercadopago/dx-php": "^2.5",
|
||||||
|
"nesbot/carbon": "*",
|
||||||
"psr/simple-cache": "^3.0",
|
"psr/simple-cache": "^3.0",
|
||||||
"rmccue/requests": "^2.0",
|
"rmccue/requests": "^2.0",
|
||||||
"twilio/sdk": "5.0"
|
"twilio/sdk": "5.0"
|
||||||
|
|||||||
Generated
+16
-12
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "843e42abd278d892e18df781a855ae21",
|
"content-hash": "6cc4cc6b404362193eba2971788ab00d",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "aprendible/storage-link-route",
|
"name": "aprendible/storage-link-route",
|
||||||
@@ -4941,16 +4941,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ramsey/uuid",
|
"name": "ramsey/uuid",
|
||||||
"version": "4.7.4",
|
"version": "4.7.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/ramsey/uuid.git",
|
"url": "https://github.com/ramsey/uuid.git",
|
||||||
"reference": "60a4c63ab724854332900504274f6150ff26d286"
|
"reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/ramsey/uuid/zipball/60a4c63ab724854332900504274f6150ff26d286",
|
"url": "https://api.github.com/repos/ramsey/uuid/zipball/5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e",
|
||||||
"reference": "60a4c63ab724854332900504274f6150ff26d286",
|
"reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -5017,7 +5017,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/ramsey/uuid/issues",
|
"issues": "https://github.com/ramsey/uuid/issues",
|
||||||
"source": "https://github.com/ramsey/uuid/tree/4.7.4"
|
"source": "https://github.com/ramsey/uuid/tree/4.7.5"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -5029,20 +5029,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2023-04-15T23:01:58+00:00"
|
"time": "2023-11-08T05:53:05+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "rmccue/requests",
|
"name": "rmccue/requests",
|
||||||
"version": "v2.0.8",
|
"version": "v2.0.9",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/WordPress/Requests.git",
|
"url": "https://github.com/WordPress/Requests.git",
|
||||||
"reference": "fae75bcb83d9d00d0e31ee86a472a036f9f91519"
|
"reference": "422612952ff3bd5163039f8889eaaaab95a432eb"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/WordPress/Requests/zipball/fae75bcb83d9d00d0e31ee86a472a036f9f91519",
|
"url": "https://api.github.com/repos/WordPress/Requests/zipball/422612952ff3bd5163039f8889eaaaab95a432eb",
|
||||||
"reference": "fae75bcb83d9d00d0e31ee86a472a036f9f91519",
|
"reference": "422612952ff3bd5163039f8889eaaaab95a432eb",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -5116,7 +5116,7 @@
|
|||||||
"issues": "https://github.com/WordPress/Requests/issues",
|
"issues": "https://github.com/WordPress/Requests/issues",
|
||||||
"source": "https://github.com/WordPress/Requests"
|
"source": "https://github.com/WordPress/Requests"
|
||||||
},
|
},
|
||||||
"time": "2023-09-11T08:27:57+00:00"
|
"time": "2023-11-08T19:22:04+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/console",
|
"name": "symfony/console",
|
||||||
@@ -10477,5 +10477,9 @@
|
|||||||
"php": "^8.0.2"
|
"php": "^8.0.2"
|
||||||
},
|
},
|
||||||
"platform-dev": [],
|
"platform-dev": [],
|
||||||
|
<<<<<<< HEAD
|
||||||
"plugin-api-version": "2.6.0"
|
"plugin-api-version": "2.6.0"
|
||||||
|
=======
|
||||||
|
"plugin-api-version": "2.3.0"
|
||||||
|
>>>>>>> 0639a78129036a7cb0a4537f0b654bb34a67b06d
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<p class="text-sm">
|
<p class="text-sm">
|
||||||
{{ $item->descripcion }}
|
{{ $item->descripcion }}
|
||||||
</p>
|
</p>
|
||||||
@if (!$item->todos || Auth::user()->rol->nombre == 'administrador')
|
@if (!$item->todos || Auth::user()->rol->nombre == 'administrador' || Auth::user()->rol->nombre == 'super' || Auth::user()->rol->nombre == 'editor')
|
||||||
<span class="text-red-500 font-semibold absolute top-0 right-2 cursor-pointer select-none" wire:click="deleteNotificacion({{ $item->id }})" wire:loading.remove>
|
<span class="text-red-500 font-semibold absolute top-0 right-2 cursor-pointer select-none" wire:click="deleteNotificacion({{ $item->id }})" wire:loading.remove>
|
||||||
x
|
x
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user