From 35ae3c7459a8521a1c684d5e69d313384c705aa7 Mon Sep 17 00:00:00 2001 From: nat Date: Sun, 9 Jan 2022 19:52:54 -0300 Subject: [PATCH] Empezamos con el input para buscar o crear subpedido --- public/js/app.js | 3 -- public/js/subpedidos-create.js | 20 +++++++++++ resources/views/layouts/app.blade.php | 1 + resources/views/subpedidos_create.blade.php | 37 ++++++++++++++++++++- 4 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 public/js/subpedidos-create.js diff --git a/public/js/app.js b/public/js/app.js index a91dc0a..731039a 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -33,9 +33,6 @@ Vue.component('nav-bar', { isActive: false } }, - mounted() { - console.log("ready"); - }, methods: { toggleState() { this.isActive = !this.isActive; diff --git a/public/js/subpedidos-create.js b/public/js/subpedidos-create.js new file mode 100644 index 0000000..3a03fa6 --- /dev/null +++ b/public/js/subpedidos-create.js @@ -0,0 +1,20 @@ +Vue.component('subpedido-select', { + data() { + return { + subpedido: null, + subpedidosExistentes: [] + } + }, + mounted() { + console.log("ready"); + }, + methods: { + onType() { + axios.get("/api/subpedidos?nombre=" + this.subpedido).then(response => { + console.log(this.subpedido); + this.subpedidosExistentes = response.data + console.log(this.subpedidosExistentes); + }); + } + } +}); \ No newline at end of file diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index b02f652..9ebfd5b 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -34,5 +34,6 @@ + @yield('scripts') diff --git a/resources/views/subpedidos_create.blade.php b/resources/views/subpedidos_create.blade.php index d5061a6..cf5f1b4 100644 --- a/resources/views/subpedidos_create.blade.php +++ b/resources/views/subpedidos_create.blade.php @@ -1,5 +1,40 @@ @extends('layouts.app') @section('content') -SUBPEDIDOS +
+
+

+ Compras MPS +

+

+ Bienvenidx a la aplicación de compras del Mercado Popular de Subsistencia +

+ +
+
+ +
+ +
+

Intentá que sea claro como para que tus compas del barrio te identifiquen.

+

Si ya empezaste a hacer tu pedido, empezá a tipear y luego seleccioná tu nombre en la lista una vez que aparezca:

+
+
+ + + + + + +
+
+
+
+
+
@endsection + +@section('scripts') + + +@endsection \ No newline at end of file