Compare commits
5 commits
5f565a3f5a
...
2337ad9a37
Author | SHA1 | Date | |
---|---|---|---|
2337ad9a37 | |||
99f327445e | |||
b4ca119f9a | |||
9d9ebd75b5 | |||
b79548624f |
7 changed files with 6 additions and 16 deletions
|
@ -12,7 +12,7 @@ class ComprasController
|
||||||
return response()->download($file);
|
return response()->download($file);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function showLoginForm()
|
public function show()
|
||||||
{
|
{
|
||||||
return view('auth/compras_login');
|
return view('auth/compras_login');
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ class Compras
|
||||||
public function handle(Request $request, Closure $next)
|
public function handle(Request $request, Closure $next)
|
||||||
{
|
{
|
||||||
if (!Auth::check())
|
if (!Auth::check())
|
||||||
return redirect()->route('compras.login');
|
return redirect()->route('compras_login.show');
|
||||||
|
|
||||||
if (Auth::user()->is_compras) {
|
if (Auth::user()->is_compras) {
|
||||||
return $next($request);
|
return $next($request);
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
<th>Producto</th>
|
<th>Producto</th>
|
||||||
<th><abbr title="Cantidad">C</abbr></th>
|
<th><abbr title="Cantidad">C</abbr></th>
|
||||||
<th><abbr title="Precio Total">$</abbr></th>
|
<th><abbr title="Precio Total">$</abbr></th>
|
||||||
<th></th>
|
|
||||||
<th><abbr title="Eliminar"></abbr></th>
|
<th><abbr title="Eliminar"></abbr></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -16,7 +15,6 @@
|
||||||
<th class="has-text-right">{{ cantidadBonosDeTransporte }}</th>
|
<th class="has-text-right">{{ cantidadBonosDeTransporte }}</th>
|
||||||
<th class="has-text-right">{{ totalBonosDeTransporte }}</th>
|
<th class="has-text-right">{{ totalBonosDeTransporte }}</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th></th>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-if="this.$root.devoluciones">
|
<tr v-if="this.$root.devoluciones">
|
||||||
<th><p>Devoluciones</p></th>
|
<th><p>Devoluciones</p></th>
|
||||||
|
@ -29,14 +27,12 @@
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</th>
|
</th>
|
||||||
<th></th>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Total total</th>
|
<th>Total total</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th class="has-text-right">{{ total }}</th>
|
<th class="has-text-right">{{ total }}</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th></th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<label class="label">Usuario</label>
|
<label class="label">Usuario</label>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<input required class="input" type="text" name="user" placeholder="Usuario">
|
<input required class="input" type="text" name="name" placeholder="Usuario">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -70,7 +70,7 @@ export default {
|
||||||
<div class="column is-three-quarters">
|
<div class="column is-three-quarters">
|
||||||
<div class="field has-addons">
|
<div class="field has-addons">
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<button class="button is-small" @click.capture="decrementar();">
|
<button :disabled="cantidad < 1" class="button is-small" @click.capture="decrementar();">
|
||||||
<i class="fa fa-solid fa-minus"></i>
|
<i class="fa fa-solid fa-minus"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -82,7 +82,7 @@ export default {
|
||||||
<i class="fa fa-solid fa-plus"></i>
|
<i class="fa fa-solid fa-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<button :disabled="!hayCambios()" class="button is-small is-success ml-3" @click="confirmar()">
|
<button :disabled="!hayCambios() || cantidad < 0" class="button is-small is-success ml-3" @click="confirmar()">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="fas fa-check"></i>
|
<i class="fas fa-check"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -3,11 +3,6 @@
|
||||||
<td>{{ this.producto.nombre }}</td>
|
<td>{{ this.producto.nombre }}</td>
|
||||||
<td class="has-text-right">{{ this.producto.pivot.cantidad }}</td>
|
<td class="has-text-right">{{ this.producto.pivot.cantidad }}</td>
|
||||||
<td class="has-text-right">{{ Math.ceil(this.producto.pivot.total) }}</td>
|
<td class="has-text-right">{{ Math.ceil(this.producto.pivot.total) }}</td>
|
||||||
<td><button @click.capture="seleccionarProducto(producto)" class="button is-warning">
|
|
||||||
<span class="icon">
|
|
||||||
<i class="fas fa-edit"></i>
|
|
||||||
</span>
|
|
||||||
</button></td>
|
|
||||||
<td><button @click.capture="eliminarProducto()" class="button is-danger">
|
<td><button @click.capture="eliminarProducto()" class="button is-danger">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="fas fa-trash-alt"></i>
|
<i class="fas fa-trash-alt"></i>
|
||||||
|
@ -15,7 +10,6 @@
|
||||||
</button></td>
|
</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
</template>
|
</template>
|
||||||
producto
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -76,7 +76,7 @@ Route::middleware('auth')->group( function() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::get('/compras/login', 'ComprasController@showLoginForm')->name('compras.login');
|
Route::get('/compras', 'ComprasController@show')->name('compras_login.show');
|
||||||
|
|
||||||
Route::middleware(['compras'])->group( function() {
|
Route::middleware(['compras'])->group( function() {
|
||||||
Route::get('/compras/pedidos', 'ComprasController@pedidos')->name('compras.pedidos');
|
Route::get('/compras/pedidos', 'ComprasController@pedidos')->name('compras.pedidos');
|
||||||
|
|
Loading…
Add table
Reference in a new issue