fix: a lot a fixes and validation improvements on Pricing; Schedule; AdditionalContacts and Delegate
This commit is contained in:
parent
ee02257362
commit
dc3aaa22c0
6 changed files with 171 additions and 106 deletions
|
|
@ -362,26 +362,6 @@ export default {
|
|||
return new Promise((resolve, reject) => {
|
||||
this.isSaving = true
|
||||
const data = this.$store.state.data
|
||||
data.pricing = data.pricing.map(i => {
|
||||
delete i._id
|
||||
return i
|
||||
})
|
||||
data.schedule = data.schedule.map(i => {
|
||||
delete i._id
|
||||
if (Array.isArray(i.when) && i.when.length > 0) {
|
||||
i.when = i.when.map(w => {
|
||||
delete w._id
|
||||
return w
|
||||
})
|
||||
}
|
||||
return i
|
||||
})
|
||||
if (Array.isArray(data.contacts.peoples)) {
|
||||
data.contacts.peoples = data.contacts.peoples.map(p => {
|
||||
delete p._id
|
||||
return p
|
||||
})
|
||||
}
|
||||
this.$apitator.put('/delegate', data, { withAuth: true }).then(() => {
|
||||
this.isSaving = false
|
||||
if (showSuccessAlert) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue