diff --git a/public/css/app.css b/public/css/app.css new file mode 100644 index 0000000..6ad3b7e --- /dev/null +++ b/public/css/app.css @@ -0,0 +1,3 @@ +p.navbar-item:empty { + display: none; +} \ No newline at end of file diff --git a/public/js/productos.js b/public/js/productos.js index ed799c4..84d83ef 100644 --- a/public/js/productos.js +++ b/public/js/productos.js @@ -11,10 +11,10 @@ Vue.component('categorias-container', { - - - - `, + + + + `, data() { return { categorias: null @@ -29,38 +29,37 @@ Vue.component('categorias-container', { Vue.component('productos-container', { template: ` -
-
-
-
- Placeholder image -
-
-
-
+
+
+
+
+
+
+ Placeholder image +
-
-

John Smith

-

@johnsmith

+
+
+
+

+

+

+
+
-
- -
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. - Phasellus nec iaculis mauris. @bulmaio. - #css #responsive -
- -
-
-
-
`, +
+
+
+
`, data() { return { - productos: null + productos: [] } }, mounted() { - axios.get("/api/productos").then(response => this.productos = response.data); + axios.get("/api/productos").then(response => { + console.log(response.data); + this.productos = response.data.data; + }); } }); \ No newline at end of file diff --git a/public/js/subpedidos-create.js b/public/js/subpedidos-create.js index f7508bc..41b399a 100644 --- a/public/js/subpedidos-create.js +++ b/public/js/subpedidos-create.js @@ -20,14 +20,12 @@ Vue.component('subpedido-select', { nombre: this.subpedido, grupo_de_compra_id: this.gdcid }).then(response => { + + //se creo el subpedido, guardamos el subpedido en sesion axios.post("/subpedidos/guardar_sesion", { subpedido: response.data }).then(response => { - if (response.status == 200) { window.location.href = 'productos'; - } else { - console.log(response); - } }); }); } diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 7f6655c..dd0f73a 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -15,6 +15,7 @@ + diff --git a/resources/views/productos.blade.php b/resources/views/productos.blade.php index 754f2b4..7a8df53 100644 --- a/resources/views/productos.blade.php +++ b/resources/views/productos.blade.php @@ -2,6 +2,7 @@ @section('content') + @endsection @section('scripts')