mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-10 20:39:48 +08:00
Bugfix/validate filled fields before saving (#444)
* Validate filled fields before saving * remove console
This commit is contained in:
parent
7fcf5bb9a5
commit
1ac405ef53
@ -654,6 +654,10 @@ const panel = {
|
||||
}
|
||||
|
||||
if (isSendToServer) {
|
||||
const fieldsEmpty = getters.getFieldListEmptyMandatory({
|
||||
containerUuid,
|
||||
fieldsList
|
||||
})
|
||||
if (panelType === 'table' || isAdvancedQuery) {
|
||||
if (field.isShowedFromUser && (field.oldValue !== field.value ||
|
||||
['NULL', 'NOT_NULL'].includes(field.operator) ||
|
||||
@ -703,7 +707,7 @@ const panel = {
|
||||
console.warn(`Error getting Advanced Query (notifyFieldChange): ${error.message}. Code: ${error.code}.`)
|
||||
})
|
||||
}
|
||||
} else if (!getters.isNotReadyForSubmit(containerUuid)) {
|
||||
} else if (isEmptyValue(fieldsEmpty)) {
|
||||
// TODO: refactory for it and change for a standard method
|
||||
if (field.panelType === 'browser' && fieldIsDisplayed(field)) {
|
||||
let isReadyForQuery = true
|
||||
@ -788,10 +792,6 @@ const panel = {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const fieldsEmpty = getters.getFieldListEmptyMandatory({
|
||||
containerUuid,
|
||||
fieldsList
|
||||
})
|
||||
showMessage({
|
||||
message: language.t('notifications.mandatoryFieldMissing') + fieldsEmpty,
|
||||
type: 'info'
|
||||
|
Loading…
x
Reference in New Issue
Block a user