Lines 181-195
export default {
Link Here
|
181 |
av_package_content_types: "ERM_PACKAGE_CONTENT_TYPE", |
181 |
av_package_content_types: "ERM_PACKAGE_CONTENT_TYPE", |
182 |
av_title_publication_types: "ERM_TITLE_PUBLICATION_TYPE", |
182 |
av_title_publication_types: "ERM_TITLE_PUBLICATION_TYPE", |
183 |
} |
183 |
} |
184 |
let promises = [] |
184 |
|
185 |
Object.entries(authorised_values).forEach(([av_var, av_cat]) => { |
185 |
let av_cat_array = Object.keys(authorised_values).map(function(av_cat){return "\""+authorised_values[av_cat]+"\""}); |
186 |
promises.push( |
186 |
|
187 |
av_client.values.getAll(av_cat).then(av => { |
187 |
av_client.values.getCategoriesWithValues(av_cat_array).then(av_categories => { |
188 |
this.AVStore[av_var] = av |
188 |
Object.entries(authorised_values).forEach(([av_var, av_cat]) => { |
189 |
}) |
189 |
const av_match = av_categories.find(element => element.category_name == av_cat); |
190 |
) |
190 |
this.AVStore[av_var] = av_match.authorised_values; |
191 |
}) |
191 |
|
192 |
Promise.all(promises).then(() => (this.mainStore.is_loading = false)) |
192 |
}) |
|
|
193 |
}).then(() => (this.mainStore.is_loading = false)); |
193 |
}, |
194 |
}, |
194 |
components: { |
195 |
components: { |
195 |
Breadcrumb, |
196 |
Breadcrumb, |