Browse Source

[ADD] searcher component

Gogs 7 years ago
parent
commit
682618038b
3 changed files with 43 additions and 9 deletions
  1. 2 8
      src/App.vue
  2. 41 0
      src/components/common/Searcher.vue
  3. 0 1
      src/components/payment/PaymentStep.vue

+ 2 - 8
src/App.vue

@@ -7,7 +7,7 @@
                 products-step
             tab-content(title='Cómo quieres pagar?')
                 journal-step
-            tab-content(:title="selectedJournal && selectedJournal.type === 'cash' ? 'Qué monto vas a pagar?' : 'Tienes alguna referencia de pago?'")
+            tab-content(title='Qué monto vas a pagar?')
                 payment-step
 </template>
 
@@ -19,7 +19,7 @@
     import JournalStep from '@/components/journal/JournalStep'
     import PaymentStep from '@/components/payment/PaymentStep'
 
-    import { mapGetters, mapActions } from 'vuex'
+    import { mapActions } from 'vuex'
 
     export default {
         components: {
@@ -30,15 +30,9 @@
             JournalStep,
             PaymentStep
         },
-        computed: mapGetters([
-            'selectedJournal'
-        ]),
         methods: mapActions([
             'initPurchase'
         ]),
-        /**
-         * 
-         */
         mounted() {
             this.initPurchase()
         }

+ 41 - 0
src/components/common/Searcher.vue

@@ -0,0 +1,41 @@
+<template lang="pug">
+    input.searcher(type='search' placeholder='placeholder')
+</template>
+
+<script>
+    export default {
+        props: {
+            items: {
+                type: Array,
+                default: [],
+                required: true
+            },
+            onSearch: {
+                type: Function,
+                default: null
+            },
+            placeholder: {
+                type: String,
+                default: 'Buscar...'
+            },
+            width: {
+                type: String,
+                default: '100%'
+            },
+            height: {
+                type: String,
+                default: '45px'
+            }
+        }
+    }
+</script>
+
+<style lang="sass">
+    .searcher
+        text-align: center
+        border-radius: 0 !important
+        font:
+            size: 11pt
+            style: normal
+            weight: bold
+</style>

+ 0 - 1
src/components/payment/PaymentStep.vue

@@ -16,7 +16,6 @@
                         .form-item
                             label.form-label Total a devolver
                             input.form-input(:value='amountResidual' readonly)
-                    .bank-payment(v-else) Algo aquí
 </template>