Feat: Datos de contacto customer #46
This commit is contained in:
		| @@ -48,6 +48,7 @@ | ||||
|              valid: false, | ||||
|              customer: { | ||||
|                  name: '', | ||||
|                  address: '', | ||||
|                  email: '', | ||||
|                  phone: '' | ||||
|              }, | ||||
| @@ -69,9 +70,9 @@ | ||||
|              this.resetForm(); | ||||
|          }, | ||||
|          async submitForm() { | ||||
|              console.log(this.customer) | ||||
|              if (this.$refs.form.validate()) { | ||||
|                  try { | ||||
|                      console.log(this.customer) | ||||
|                      const response = await fetch('/don_confiao/api/customers/', { | ||||
|                          method: 'POST', | ||||
|                          headers: { | ||||
| @@ -95,6 +96,7 @@ | ||||
|          resetForm() { | ||||
|              this.customer = { | ||||
|                  name: '', | ||||
|                  address: '', | ||||
|                  email: '', | ||||
|                  phone: '' | ||||
|              }; | ||||
|   | ||||
| @@ -23,4 +23,4 @@ class ProductSerializer(serializers.ModelSerializer): | ||||
| class CustomerSerializer(serializers.ModelSerializer): | ||||
|     class Meta: | ||||
|         model = Customer | ||||
|         fields = ['id', 'name', 'address'] | ||||
|         fields = ['id', 'name', 'address', 'email', 'phone'] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user