Show "contact notes" when creating new custorder
This commit is contained in:
parent
272b0fd071
commit
711e526822
|
@ -108,7 +108,9 @@
|
|||
</div>
|
||||
|
||||
<div v-show="contactIsKnown"
|
||||
style="padding-left: 10rem;">
|
||||
style="padding-left: 10rem; display: flex;">
|
||||
|
||||
<div :style="{'flex-grow': contactNotes.length ? 0 : 1}">
|
||||
|
||||
<b-field label="Customer" grouped>
|
||||
<b-field style="margin-left: 1rem;""
|
||||
|
@ -248,6 +250,17 @@
|
|||
</b-field>
|
||||
</div>
|
||||
|
||||
<div v-show="contactNotes.length"
|
||||
style="margin-left: 1rem;">
|
||||
<b-notification v-for="note in contactNotes"
|
||||
:key="note"
|
||||
type="is-warning"
|
||||
:closable="false">
|
||||
{{ note }}
|
||||
</b-notification>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="field">
|
||||
<b-radio v-model="contactIsKnown" disabled
|
||||
|
@ -505,6 +518,7 @@
|
|||
customerName: null,
|
||||
phoneNumber: null,
|
||||
orderEmailAddress: ${json.dumps(batch.email_address)|n},
|
||||
contactNotes: ${json.dumps(contact_notes)|n},
|
||||
|
||||
editPhoneNumberShowDialog: false,
|
||||
editPhoneNumberValue: null,
|
||||
|
@ -803,7 +817,6 @@
|
|||
}
|
||||
let that = this
|
||||
this.submitBatchData(params, function(response) {
|
||||
console.log(response.data)
|
||||
% if new_order_requires_customer:
|
||||
that.contactUUID = response.data.customer_uuid
|
||||
% else:
|
||||
|
@ -812,6 +825,7 @@
|
|||
that.orderPhoneNumber = response.data.phone_number
|
||||
that.orderEmailAddress = response.data.email_address
|
||||
that.contactProfileURL = response.data.contact_profile_url
|
||||
that.contactNotes = response.data.contact_notes
|
||||
})
|
||||
},
|
||||
|
||||
|
|
|
@ -256,6 +256,7 @@ class CustomerOrderView(MasterView):
|
|||
'normalized_batch': self.normalize_batch(batch),
|
||||
'new_order_requires_customer': self.handler.new_order_requires_customer(),
|
||||
'contact_profile_url': None,
|
||||
'contact_notes': self.handler.get_contact_notes(batch),
|
||||
'order_items': items,
|
||||
'product_autocomplete_url': self.request.route_url(product_autocomplete)}
|
||||
|
||||
|
@ -391,6 +392,7 @@ class CustomerOrderView(MasterView):
|
|||
'person_uuid': batch.person_uuid,
|
||||
'phone_number': batch.phone_number,
|
||||
'email_address': batch.email_address,
|
||||
'contact_notes': self.handler.get_contact_notes(batch),
|
||||
}
|
||||
|
||||
# maybe add profile URL
|
||||
|
@ -411,6 +413,7 @@ class CustomerOrderView(MasterView):
|
|||
'phone_number': batch.phone_number,
|
||||
'email_address': batch.email_address,
|
||||
'contact_profile_url': None,
|
||||
'contact_notes': self.handler.get_contact_notes(batch),
|
||||
}
|
||||
|
||||
return context
|
||||
|
|
Loading…
Reference in a new issue