Showing networks first in child entity list.
This commit is contained in:
parent
1e089f731a
commit
471ee42c0e
|
|
@ -169,24 +169,6 @@ const entityUrl = (() => {
|
||||||
}
|
}
|
||||||
|
|
||||||
return entity.affiliateUrl || entity.url;
|
return entity.affiliateUrl || entity.url;
|
||||||
|
|
||||||
/*
|
|
||||||
// affiliate might be inherited, only use full URL when directly associated
|
|
||||||
if (entity.affiliate?.url && entity.affiliate.entityId === entity.id) {
|
|
||||||
return entity.affiliate.url;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (entity.affiliate?.parameters) {
|
|
||||||
const newParams = new URLSearchParams({
|
|
||||||
...Object.fromEntries(new URL(entity.url).searchParams),
|
|
||||||
...Object.fromEntries(new URLSearchParams(entity.affiliate.parameters)),
|
|
||||||
});
|
|
||||||
|
|
||||||
return `${entity.url}?${newParams}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
return entity.url;
|
|
||||||
*/
|
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -119,6 +119,7 @@ export async function fetchEntitiesById(entityIds, options = {}, reqUser) {
|
||||||
.whereIn('entities.parent_id', entityIds)
|
.whereIn('entities.parent_id', entityIds)
|
||||||
.whereNot('type', 'info')
|
.whereNot('type', 'info')
|
||||||
.orderBy([
|
.orderBy([
|
||||||
|
{ column: knex.raw('array_position(array[\'network\', \'channel\']::varchar[], type)'), order: 'asc' },
|
||||||
{ column: 'independent', order: 'desc' },
|
{ column: 'independent', order: 'desc' },
|
||||||
{ column: 'slug', order: 'asc' },
|
{ column: 'slug', order: 'asc' },
|
||||||
]) : [],
|
]) : [],
|
||||||
|
|
|
||||||
2
static
2
static
|
|
@ -1 +1 @@
|
||||||
Subproject commit 8ba0b203fad2fa85624590a2547c1ae71f8fb481
|
Subproject commit d1ce4d12582582adad789c7bc1d347f9257b644c
|
||||||
Loading…
Reference in New Issue