diff --git a/src/app/components/edit-resource/edit-resource.component.html b/src/app/components/edit-resource/edit-resource.component.html index 06e508a6..2ef49fdf 100644 --- a/src/app/components/edit-resource/edit-resource.component.html +++ b/src/app/components/edit-resource/edit-resource.component.html @@ -54,12 +54,10 @@ diff --git a/src/app/models/resource.ts b/src/app/models/resource.ts index 9bb64b4e..fbd3f5ae 100644 --- a/src/app/models/resource.ts +++ b/src/app/models/resource.ts @@ -18,6 +18,7 @@ export class Resource { showTranslations: boolean; metatool?: Resource; variants: Resource[]; + 'default-variant'?: Resource; translations: Translation[]; attachments: Attachment[]; pages: Page[]; @@ -35,7 +36,6 @@ export class Resource { | 'gospel' | 'growth' | 'training'; - 'attr-default-variant'?: string; 'attr-default-order'?: number; 'attr-hidden'?: boolean; 'attr-spotlight'?: boolean; diff --git a/src/app/service/resource/resource.service.ts b/src/app/service/resource/resource.service.ts index d7c9ef4e..5c01bab5 100644 --- a/src/app/service/resource/resource.service.ts +++ b/src/app/service/resource/resource.service.ts @@ -73,6 +73,9 @@ export class ResourceService extends AbstractService { system_id: Resource.getSystemId(resource), resource_type_id: Resource.getResourceTypeId(resource), metatool_id: (resource.metatool && resource.metatool.id) || null, + default_variant_id: + (resource['default-variant'] && resource['default-variant'].id) || + null, onesky_project_id: resource.oneskyProjectId, description: resource.description, manifest: resource.manifest, @@ -83,7 +86,6 @@ export class ResourceService extends AbstractService { 'attr-about-overview-video-youtube': resource.aboutOverviewVideoYoutube || null, 'attr-category': resource['attr-category'] || null, - 'attr-default-variant': resource['attr-default-variant'] || null, 'attr-default-order': resource['attr-default-order'] || null, 'attr-hidden': resource['attr-hidden'] || null, 'attr-spotlight': resource['attr-spotlight'] || null,