()
| 172 | }; |
| 173 | |
| 174 | const onSave = () => { |
| 175 | setLoaderText('Saving...'); |
| 176 | let _url = url_for( |
| 177 | 'grant_wizard.apply', { |
| 178 | 'sid': encodeURI(sid), |
| 179 | 'did': encodeURI(did), |
| 180 | }); |
| 181 | const post_data = { |
| 182 | acl: selectedAcl.privilege, |
| 183 | objects: selectedObject.current |
| 184 | }; |
| 185 | api.post(_url, post_data) |
| 186 | .then(() => { |
| 187 | setLoaderText(''); |
| 188 | onClose(); |
| 189 | }) |
| 190 | .catch((error) => { |
| 191 | setLoaderText(''); |
| 192 | pgAdmin.Browser.notifier.errorText(gettext(`Error while saving grant wizard data: ${error.response.data.errormsg}`)); |
| 193 | }); |
| 194 | }; |
| 195 | |
| 196 | const disableNextCheck = (stepId) => { |
| 197 | if (Object.keys(selectedRows).length > 0 && stepId === 0) { |
no test coverage detected