(trId: ID)
| 250 | }; |
| 251 | |
| 252 | const handleAssociateScopeConfig = async (trId: ID) => { |
| 253 | const [success] = await operator( |
| 254 | () => |
| 255 | Promise.all( |
| 256 | scopeIds.map(async (scopeId) => { |
| 257 | const scope = await API.scope.get(plugin, connectionId, scopeId); |
| 258 | return API.scope.update(plugin, connectionId, scopeId, { |
| 259 | ...scope, |
| 260 | scopeConfigId: trId !== 'None' ? +trId : null, |
| 261 | }); |
| 262 | }), |
| 263 | ), |
| 264 | { |
| 265 | setOperating, |
| 266 | formatMessage: () => |
| 267 | trId !== 'None' ? 'Associate scope config successful.' : 'Dis-associate scope config successful.', |
| 268 | }, |
| 269 | ); |
| 270 | |
| 271 | if (success) { |
| 272 | handleHideDialog(); |
| 273 | setVersion(version + 1); |
| 274 | message.success( |
| 275 | 'Scope Config(s) have been updated. If you would like to re-transform or re-collect the data in the related project(s), please go to the Project page and do so.', |
| 276 | ); |
| 277 | } |
| 278 | }; |
| 279 | |
| 280 | return ( |
| 281 | <PageHeader |
nothing calls this directly
no test coverage detected