fix: add `nopaging` on metadata section list

This commit is contained in:
vnmedeiros 2022-09-06 12:10:30 -03:00
parent 68279791f5
commit 2ae1ef8d56
2 changed files with 9 additions and 5 deletions

View File

@ -331,7 +331,7 @@ class Taxonomy extends Metadata_Type {
* @return string The HTML representation of the value, containing one or multiple terms, separated by comma, linked to term page
*/
public function get_value_as_html(Item_Metadata_Entity $item_metadata) {
$value = $item_metadata->get_value();
$value = $item_metadata->get_value();
$return = '';
if ( $item_metadata->is_multiple() ) {

View File

@ -297,16 +297,20 @@ export const updateMetadatumMappers = ({commit}, metadatumMappers) => {
// METADATA SECTIONS
export const fetchMetadataSections = ({commit}, { collectionId, isContextEdit, includeDisabled }) => {
let endpoint = '/collection/' + collectionId + '/metadata-sections?';
let endpoint = '/collection/' + collectionId + '/metadata-sections';
let params = {
nopaging: 1
};
if (isContextEdit)
endpoint += 'context=edit&'
params['context'] = 'edit';
if (includeDisabled)
endpoint += 'include_disabled=true'
params['include_disabled'] = true;
return new Promise((resolve, reject) => {
axios.tainacan.get(endpoint)
axios.tainacan.get(endpoint + '?' + qs.stringify(params) )
.then((res) => {
let metadataSections = res.data;
commit('setMetadataSections', metadataSections);