소스 검색

[FIX] Modificar Card Cliente

adrielso 7 년 전
부모
커밋
41475672b1
2개의 변경된 파일11개의 추가작업 그리고 5개의 파일을 삭제
  1. 9 3
      src/Payments.vue
  2. 2 2
      src/components/invoice/invoiceContainer/InvoiceCard.vue

+ 9 - 3
src/Payments.vue

@@ -3,7 +3,7 @@
 		form-wizard(title="" subtitle="" finishButtonText="Finalizar" color="#8c9bad" nextButtonText="Continuar" backButtonText="Volver" transition="fade" @on-complete="completeSale()")
 			tab-content(title="Quien es el cliente?" :before-change="checkPartner")
 				partner-step
-			tab-content(title="Cual es la factura?")
+			tab-content(title="Cual es la factura?" :before-change="checkInvoice")
 				invoice-step
 			tab-content(title="Que cuota es?")
 				h6 Move Line
@@ -32,16 +32,22 @@
 			Loader
 		},
 		computed: mapGetters([
-			'hasSelectedPartner'
+			'hasSelectedPartner',
+			'haSelectedInvoices'
 		]),
 		methods: {
 			checkPartner() {
 				if (!this.hasSelectedPartner){
 					this.notify('Nesesitas selecionar un cliente para continuar')
 				}
-
 				return this.hasSelectedPartner
 			},
+			checkInvoice(){
+				if(!this.haSelectedInvoices){
+					this.notify('Nesesitas selecionar una factura para continuar')
+				}
+				return this.haSelectedInvoices
+			},
 			...mapActions([
 			    'initPayment',
 			    'notify',

+ 2 - 2
src/components/invoice/invoiceContainer/InvoiceCard.vue

@@ -1,8 +1,8 @@
 <template lang="pug">
     .invoice-card(@click="selectInvoice(item)" v-bind:class="{ 'selected-invoice': isSelectedInvoice() }")
         h2.invoice-date {{ item.date_invoice}}
-        h2.invoice-title Factura: {{ item.number}}
-        h2.invoice-total Total  {{ item.amount_total}}
+        h2.invoice-title {{ item.number}}
+        h2.invoice-total Total  {{ item.amount_total }}
         h2.invoice-saldo  Saldo {{ item.residual}}
 </template>