Add "allow contact info choice" support for new custorder batch
This commit is contained in:
parent
0237d8c31a
commit
2fa7857daf
|
@ -155,6 +155,7 @@
|
|||
<div class="level-item">
|
||||
{{ orderPhoneNumber }}
|
||||
</div>
|
||||
% if allow_contact_info_choice:
|
||||
<div class="level-item"
|
||||
v-if="contactPhones.length > 1">
|
||||
<b-button type="is-primary"
|
||||
|
@ -223,6 +224,7 @@
|
|||
</b-modal>
|
||||
|
||||
</div>
|
||||
% endif
|
||||
</div>
|
||||
</div>
|
||||
</b-field>
|
||||
|
@ -239,6 +241,7 @@
|
|||
(no valid email on file)
|
||||
</span>
|
||||
</div>
|
||||
% if allow_contact_info_choice:
|
||||
<div class="level-item"
|
||||
v-if="contactEmails.length > 1">
|
||||
<b-button type="is-primary"
|
||||
|
@ -305,6 +308,7 @@
|
|||
</div>
|
||||
</b-modal>
|
||||
</div>
|
||||
% endif
|
||||
</div>
|
||||
</div>
|
||||
</b-field>
|
||||
|
@ -581,20 +585,26 @@
|
|||
|
||||
orderPhoneNumber: ${json.dumps(batch.phone_number)|n},
|
||||
contactPhones: ${json.dumps(contact_phones)|n},
|
||||
|
||||
orderEmailAddress: ${json.dumps(batch.email_address)|n},
|
||||
contactEmails: ${json.dumps(contact_emails)|n},
|
||||
|
||||
% if allow_contact_info_choice:
|
||||
|
||||
existingPhoneUUID: null,
|
||||
otherPhoneNumber: null,
|
||||
addOtherPhoneNumber: false,
|
||||
editPhoneNumberShowDialog: false,
|
||||
editPhoneNumberSaving: false,
|
||||
|
||||
orderEmailAddress: ${json.dumps(batch.email_address)|n},
|
||||
contactEmails: ${json.dumps(contact_emails)|n},
|
||||
existingEmailUUID: null,
|
||||
otherEmailAddress: null,
|
||||
addOtherEmailAddress: false,
|
||||
editEmailAddressShowDialog: false,
|
||||
editEmailAddressSaving: false,
|
||||
|
||||
% endif
|
||||
|
||||
customerName: null,
|
||||
phoneNumber: null,
|
||||
contactNotes: ${json.dumps(contact_notes)|n},
|
||||
|
@ -722,6 +732,8 @@
|
|||
}
|
||||
},
|
||||
|
||||
% if allow_contact_info_choice:
|
||||
|
||||
editPhoneNumberSaveDisabled() {
|
||||
if (this.editPhoneNumberSaving) {
|
||||
return true
|
||||
|
@ -756,6 +768,8 @@
|
|||
return "Save"
|
||||
},
|
||||
|
||||
% endif
|
||||
|
||||
itemsPanelHeader() {
|
||||
let text = "Items"
|
||||
|
||||
|
@ -912,6 +926,8 @@
|
|||
this.contactChanged(this.contactUUID)
|
||||
},
|
||||
|
||||
% if allow_contact_info_choice:
|
||||
|
||||
editPhoneNumberInit() {
|
||||
this.existingPhoneUUID = null
|
||||
let normalOrderPhone = this.orderPhoneNumber.replace(/\D/g, '')
|
||||
|
@ -1016,6 +1032,8 @@
|
|||
})
|
||||
},
|
||||
|
||||
% endif
|
||||
|
||||
showAddItemDialog() {
|
||||
this.customerPanelOpen = false
|
||||
this.editingItem = null
|
||||
|
|
|
@ -255,6 +255,7 @@ class CustomerOrderView(MasterView):
|
|||
context = {'batch': batch,
|
||||
'normalized_batch': self.normalize_batch(batch),
|
||||
'new_order_requires_customer': self.handler.new_order_requires_customer(),
|
||||
'allow_contact_info_choice': self.handler.allow_contact_info_choice(),
|
||||
'restrict_contact_info': self.handler.should_restrict_contact_info(),
|
||||
'contact_display': self.handler.get_contact_display(batch),
|
||||
'contact_phones': self.handler.get_contact_phones(batch),
|
||||
|
|
Loading…
Reference in a new issue