Compare commits

..

No commits in common. "589b7c0bfb9478e535e053e4a997fd2589312270" and "ffa162287012de8af676e754603b14d4b9aaaba2" have entirely different histories.

2 changed files with 2 additions and 4 deletions

View File

@ -48,7 +48,6 @@
valid: false, valid: false,
customer: { customer: {
name: '', name: '',
address: '',
email: '', email: '',
phone: '' phone: ''
}, },
@ -70,9 +69,9 @@
this.resetForm(); this.resetForm();
}, },
async submitForm() { async submitForm() {
console.log(this.customer)
if (this.$refs.form.validate()) { if (this.$refs.form.validate()) {
try { try {
console.log(this.customer)
const response = await fetch('/don_confiao/api/customers/', { const response = await fetch('/don_confiao/api/customers/', {
method: 'POST', method: 'POST',
headers: { headers: {
@ -96,7 +95,6 @@
resetForm() { resetForm() {
this.customer = { this.customer = {
name: '', name: '',
address: '',
email: '', email: '',
phone: '' phone: ''
}; };

View File

@ -23,4 +23,4 @@ class ProductSerializer(serializers.ModelSerializer):
class CustomerSerializer(serializers.ModelSerializer): class CustomerSerializer(serializers.ModelSerializer):
class Meta: class Meta:
model = Customer model = Customer
fields = ['id', 'name', 'address', 'email', 'phone'] fields = ['id', 'name', 'address']