diff --git a/app/Http/Livewire/ShowPromociones.php b/app/Http/Livewire/ShowPromociones.php index 39fc5ca..34ed63c 100644 --- a/app/Http/Livewire/ShowPromociones.php +++ b/app/Http/Livewire/ShowPromociones.php @@ -47,6 +47,7 @@ class ShowPromociones extends Component public $nombre_promocion; public $descripcion_promocion; public $valor_promocion; + public $valor_compra_promocion; public $estado_promocion; public $fecha_limite_promocion; public $categoria_id_promocion; @@ -447,6 +448,7 @@ class ShowPromociones extends Component $this->validate([ 'nombre_promocion' => 'required', 'descripcion_promocion' => 'required', + 'valor_compra_promocion' => 'required', 'valor_promocion' => 'required', 'estado_promocion' => 'required', 'fecha_limite_promocion' => 'required', @@ -476,6 +478,7 @@ class ShowPromociones extends Component $nueva_promocion->nombre = $this->nombre_promocion; $nueva_promocion->descripcion = $this->descripcion_promocion; $nueva_promocion->precio = $this->valor_promocion; + $nueva_promocion->precio_compra = $this->valor_compra_promocion; $nueva_promocion->visible = $this->estado_promocion; $nueva_promocion->fecha_limite = $this->fecha_limite_promocion; $nueva_promocion->categoria_id = $this->categoria_id_promocion; diff --git a/database/migrations/2023_10_09_101523_add_precio_compra_to_promociones.php b/database/migrations/2023_10_09_101523_add_precio_compra_to_promociones.php new file mode 100644 index 0000000..c0e49de --- /dev/null +++ b/database/migrations/2023_10_09_101523_add_precio_compra_to_promociones.php @@ -0,0 +1,32 @@ +string('precio_compra')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('promociones', function (Blueprint $table) { + // + }); + } +}; diff --git a/resources/views/livewire/show-promociones.blade.php b/resources/views/livewire/show-promociones.blade.php index 99c8237..970ae9f 100644 --- a/resources/views/livewire/show-promociones.blade.php +++ b/resources/views/livewire/show-promociones.blade.php @@ -5,15 +5,16 @@ verPromo: @entangle('verPromo'), categorian: @entangle('categorian'), editarPromo: @entangle('editarPromo'), - credenciales : @entangle('credenciales'), - verPro:false, - copiar:'' + credenciales: @entangle('credenciales'), + verPro: false, + copiar: '' }" class="h-full w-full md:my-2"> -
+
Cargando
|
-
-
-
|
@endforeach
@@ -119,12 +121,14 @@
-
+
| + | + |
|---|---|
| + {{ $lista['nombre'] ?? '' }} - + {{ $lista['cantidad'] ?? '' }} P. - + {{ $lista['dias'] ?? '' }} D. + | - @else - {{ $tarifa->pantallas ?? '' }} {{ $tarifa->pantallas == 1 ? 'pantalla' : 'pantallas' }} - {{ $tarifa->dias ?? '' }} {{ $tarifa->dias == 1 ? 'día' : 'días' }} - - @endif - - @endforeach - -+ + | +
| - | - |
|---|---|
| - {{ $lista['nombre'] ?? '' }} - {{ $lista['cantidad'] ?? '' }} P. - {{ $lista['dias'] ?? '' }} D. - | - -- - | -
- {{$nombrePromo}} -
-- {{$dias}} Dias -
-- ${{number_format($precioAhora)}} -
- Información del cliente: -
-- Ingrese los datos del cliente final. -
-- Este servicio vencerá el {{$fechaFinal}} en {{$dias_comprarPromo}} Dias -
-- {{$this->nombrePromo}} -
-- {{$this->dias }} Dias -
-- ${{number_format($this->precioAhora)}} -
-+ {{ $nombrePromo }} +
++ {{ $dias }} Dias +
++ ${{ number_format($precioAhora) }} +
+- Información de cuentas: -
-+ Información del cliente: +
++ Ingrese los datos del cliente final. +
+{{ $cuenta->correo }}
- -{{ $cuenta->password }} -
- ++ Este servicio vencerá el {{ $fechaFinal }} en {{ $dias_comprarPromo }} Dias +
+{{ $cuenta->servicio->nombre }} - email: {{ $cuenta->correo }} - Pass: {{ $cuenta->password }}
-+ {{ $this->nombrePromo }} +
++ {{ $this->dias }} Dias +
++ ${{ number_format($this->precioAhora) }} +
++ Información de cuentas: +
++ {{ $cuenta->correo }}
+ ++ {{ $cuenta->password }} +
+ ++ {{ $cuenta->servicio->nombre }} - email: {{ $cuenta->correo }} - Pass: + {{ $cuenta->password }}
++ {{ Carbon\Carbon::parse($cuentas->fecha_final)->format('Y/m/d') ?? '' }} +
+ + + @endif + + +- {{ Carbon\Carbon::parse($cuentas->fecha_final)->format('Y/m/d') ?? ''}}
- - @endif - -