|
@@ -15,11 +15,11 @@
|
|
|
input.form-input(:class="'form-input-' + type" :value="customer.ruc || ''" v-model='customer.ruc' :readonly="mode === 'details'")
|
|
|
.form-item(:class="'form-item-' + type")
|
|
|
label.form-label(:class="'form-label-' + type") Celular
|
|
|
- input.form-input(:class="'form-input-' + type" :value="customer.phone || ''" v-model='customer.phone' :readonly="mode === 'details'")
|
|
|
+ input.form-input(:class="'form-input-' + type" :value="customer.mobile || ''" v-model='customer.mobile' :readonly="mode === 'details'")
|
|
|
div(v-if="mode === 'details'")
|
|
|
.form-item(:class="'form-item-' + type")
|
|
|
label.form-label(:class="'form-label-' + type") Teléfono
|
|
|
- input.form-input(:class="'form-input-' + type" :value="customer.mobile || ''" readonly)
|
|
|
+ input.form-input(:class="'form-input-' + type" :value="customer.phone || ''" readonly)
|
|
|
.form-item(:class="'form-item-' + type")
|
|
|
label.form-label(:class="'form-label-' + type") Email
|
|
|
input.form-input(:class="'form-input-' + type" :value="customer.email || ''" readonly)
|
|
@@ -30,7 +30,7 @@
|
|
|
label.form-label(:class="'form-label-' + type") Créditos
|
|
|
input.form-input(:class="'form-input-' + type" :value="customer.credit || 0" readonly)
|
|
|
.form-actions(v-if="mode === 'form'")
|
|
|
- button.form-action(@click='onAccept') Aceptar
|
|
|
+ button.form-action(@click='onAccept' :disabled='isValid() === false') Aceptar
|
|
|
button.form-action(@click='onCancel') Cancelar
|
|
|
</template>
|
|
|
|
|
@@ -70,6 +70,9 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ isValid() {
|
|
|
+ return !!this.customer.name && !!this.customer.ruc && !!this.customer.mobile
|
|
|
+ },
|
|
|
onAccept() {
|
|
|
this.$emit('onAccept', this.customer)
|
|
|
},
|