Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getTranslationFormData(model) {
const translationStore = Store.create();
getTranslationsForModel(model)
.subscribe((translations) => {
translationStore.setState(translations);
});
return Observable
.combineLatest(
getLocales(),
translationStore,
(...data) => Object.assign({
objectToTranslate: model,
setTranslations(translations) {
translationStore.setState({
translations,
});
import Store from '@dhis2/d2-ui-core/store/Store';
export default Store.create();