()
| 147 | }; |
| 148 | |
| 149 | const getSQLValue = () => { |
| 150 | // Called when SQL tab is active. |
| 151 | if(!schemaState.isDirty) { |
| 152 | return Promise.resolve('-- ' + gettext('No updates.')); |
| 153 | } |
| 154 | |
| 155 | if(schemaState.errors.name) { |
| 156 | return Promise.resolve('-- ' + gettext('Definition incomplete.')); |
| 157 | } |
| 158 | |
| 159 | const changeData = schemaState._changes; |
| 160 | /* |
| 161 | * Call the passed incoming getSQLValue func to get the SQL |
| 162 | * return of getSQLValue should be a promise. |
| 163 | */ |
| 164 | return props.getSQLValue(schemaState.isNew, getForQueryParams(changeData)); |
| 165 | }; |
| 166 | |
| 167 | const getButtonIcon = () => { |
| 168 | if(props.customSaveBtnIconType == 'upload') { |
no test coverage detected