Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
RudiThoeni committed Oct 11, 2024
1 parent 947252d commit ca8a849
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 9 deletions.
41 changes: 37 additions & 4 deletions databrowser/src/config/tourism/article/article.sharedView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@ import {
dataStatesSubCategory,
idReadOnlyCell,
imageGalleryCategory,
odhTagCategory,
seasonCategory,
shortnameCell,
sourceSubCategoryWithDistinct,
textInfoCategory,
licenseInfoCategory,
mappingCategory,
tagCategory,
} from '../../builder/tourism';
import { videoItemsCategory } from '../../builder/tourism/video';
import { DEFAULT_DATE_FORMAT, withOdhBaseUrl } from '../../utils';
Expand Down Expand Up @@ -83,8 +81,43 @@ export const articleSharedView = (): DetailViewConfig | EditViewConfig => ({
},
],
},
odhTagCategory('article'),
tagCategory('article'),
{
name: 'Tags',
slug: 'Tags',
subcategories: [
{
name: '',
properties: [
{
title: 'Assigned ODH Tags (Deprecated)',
component: CellComponent.TagReferenceCell,
arrayMapping: {
targetPropertyName: 'items',
pathToParent: 'SmgTags',
},
params: {
url: withOdhBaseUrl('/v1/ODHTag?mainentity=article'),
keySelector: 'Id',
labelSelector: 'TagName.{language}',
},
},
{
title: 'Assigned Tags',
component: CellComponent.TagReferenceCell,
arrayMapping: {
targetPropertyName: 'items',
pathToParent: 'TagIds',
},
params: {
url: withOdhBaseUrl('/v1/Tag?validforentity=article'),
keySelector: 'Id',
labelSelector: 'TagName.{language}',
},
},
],
},
],
},
{
name: 'Article Details',
slug: 'article-details',
Expand Down
10 changes: 5 additions & 5 deletions databrowser/src/config/tourism/tag/tag.sharedView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const tagSharedView = (): DetailViewConfig | EditViewConfig => ({
},
params: {
url: withOdhBaseUrl(
'/v1/Distinct?odhtype=odhtag&fields=Types.[*]&rawsort=Types.[*]&getasarray=true'
'/v1/Distinct?odhtype=tag&fields=Types.[*]&rawsort=Types.[*]&getasarray=true'
),
},
},
Expand All @@ -71,7 +71,7 @@ export const tagSharedView = (): DetailViewConfig | EditViewConfig => ({
showAddNewValue: 'true',
showValueAsLabelFallback: 'true',
url: withOdhBaseUrl(
'/v1/Distinct?odhtype=odhtag&fields=MainEntity&rawsort=MainEntity&getasarray=true'
'/v1/Distinct?odhtype=tag&fields=MainEntity&rawsort=MainEntity&getasarray=true'
),
},
},
Expand All @@ -84,7 +84,7 @@ export const tagSharedView = (): DetailViewConfig | EditViewConfig => ({
},
params: {
url: withOdhBaseUrl(
'/v1/Distinct?odhtype=odhtag&fields=ValidForEntity.[*]&rawsort=ValidForEntity.[*]&getasarray=true'
'/v1/Distinct?odhtype=tag&fields=ValidForEntity.[*]&rawsort=ValidForEntity.[*]&getasarray=true'
),
},
},
Expand Down Expand Up @@ -119,7 +119,7 @@ export const tagSharedView = (): DetailViewConfig | EditViewConfig => ({
},
params: {
url: withOdhBaseUrl(
'/v1/Distinct?odhtype=odhtag&fields=ODHTagIds.[*]&rawsort=ODHTagIds.[*]&getasarray=true'
'/v1/Distinct?odhtype=tag&fields=ODHTagIds.[*]&rawsort=ODHTagIds.[*]&getasarray=true'
),
},
},
Expand All @@ -132,7 +132,7 @@ export const tagSharedView = (): DetailViewConfig | EditViewConfig => ({
},
params: {
url: withOdhBaseUrl(
'/v1/Distinct?odhtype=odhtag&fields=MappedTagIds.[*]&rawsort=MappedTagIds.[*]&getasarray=true'
'/v1/Distinct?odhtype=tag&fields=MappedTagIds.[*]&rawsort=MappedTagIds.[*]&getasarray=true'
),
},
},
Expand Down

0 comments on commit ca8a849

Please sign in to comment.