|
|
|
|
@ -1129,6 +1129,15 @@ export default {
|
|
|
|
|
e.preventDefault()
|
|
|
|
|
|
|
|
|
|
alert('Please draw fields to prepare the document.')
|
|
|
|
|
} else {
|
|
|
|
|
const submitterWithoutFields =
|
|
|
|
|
this.template.submitters.find((submitter) => !this.template.fields.some((f) => f.submitter_uuid === submitter.uuid))
|
|
|
|
|
|
|
|
|
|
if (submitterWithoutFields) {
|
|
|
|
|
e.preventDefault()
|
|
|
|
|
|
|
|
|
|
alert(`Please add fields for ${submitterWithoutFields.name} to prepare the document or remove the party.`)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onSaveClick () {
|
|
|
|
|
@ -1142,7 +1151,15 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.template.fields.length) {
|
|
|
|
|
if (!this.template.fields.length) {
|
|
|
|
|
alert('Please draw fields to prepare the document.')
|
|
|
|
|
} else {
|
|
|
|
|
const submitterWithoutFields =
|
|
|
|
|
this.template.submitters.find((submitter) => !this.template.fields.some((f) => f.submitter_uuid === submitter.uuid))
|
|
|
|
|
|
|
|
|
|
if (submitterWithoutFields) {
|
|
|
|
|
alert(`Please add fields for ${submitterWithoutFields.name} to prepare the document or remove the party.`)
|
|
|
|
|
} else {
|
|
|
|
|
this.isSaving = true
|
|
|
|
|
|
|
|
|
|
this.save().then(() => {
|
|
|
|
|
@ -1150,8 +1167,7 @@ export default {
|
|
|
|
|
}).finally(() => {
|
|
|
|
|
this.isSaving = false
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
alert('Please draw fields to prepare the document.')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
scrollToArea (area) {
|
|
|
|
|
|