|
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 ( |
| 186 |
promises.push( |
186 |
av_cat |
| 187 |
av_client.values.getAll(av_cat).then(av => { |
187 |
) { |
| 188 |
this.AVStore[av_var] = av |
188 |
return '"' + authorised_values[av_cat] + '"' |
| 189 |
}) |
|
|
| 190 |
) |
| 191 |
}) |
189 |
}) |
| 192 |
Promise.all(promises).then(() => (this.mainStore.is_loading = false)) |
190 |
|
|
|
191 |
av_client.values |
| 192 |
.getCategoriesWithValues(av_cat_array) |
| 193 |
.then(av_categories => { |
| 194 |
Object.entries(authorised_values).forEach( |
| 195 |
([av_var, av_cat]) => { |
| 196 |
const av_match = av_categories.find( |
| 197 |
element => element.category_name == av_cat |
| 198 |
) |
| 199 |
this.AVStore[av_var] = av_match.authorised_values |
| 200 |
} |
| 201 |
) |
| 202 |
}) |
| 203 |
.then(() => (this.mainStore.is_loading = false)) |
| 193 |
}, |
204 |
}, |
| 194 |
components: { |
205 |
components: { |
| 195 |
Breadcrumb, |
206 |
Breadcrumb, |