Skip to content

Commit

Permalink
chore: Add custom label to templates (#9703)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dschoordsch authored May 2, 2024
1 parent 723a28f commit e61473e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions packages/client/components/ActivityLibrary/ActivityGrid.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import {Link} from 'react-router-dom'
import {ActivityBadge} from './ActivityBadge'
import {ActivityCard, ActivityCardImage} from './ActivityCard'
import {Template} from './ActivityLibrary'
import {ActivityLibraryCardDescription} from './ActivityLibraryCardDescription'
Expand Down Expand Up @@ -30,6 +31,11 @@ const ActivityGrid = ({templates, selectedCategory}: ActivityGridProps) => {
title={template.name}
type={template.type}
templateRef={template}
badge={
template.scope !== 'PUBLIC' ? (
<ActivityBadge className='m-2 bg-gold-300 text-grape-700'>Custom</ActivityBadge>
) : null
}
>
<ActivityCardImage
className='group-hover/card:hidden'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ graphql`
category
illustrationUrl
isRecommended
isFree
scope
...ActivityLibrary_templateSearchDocument @relay(mask: false)
...ActivityCard_template
...ActivityLibraryCardDescription_template
Expand Down
8 changes: 7 additions & 1 deletion packages/client/components/RetroDrawerTemplateCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import useAtmosphere from '../hooks/useAtmosphere'
import useMutationProps from '../hooks/useMutationProps'
import UpdateMeetingTemplateMutation from '../mutations/UpdateMeetingTemplateMutation'
import {CATEGORY_THEMES, CategoryID} from '././ActivityLibrary/Categories'
import {ActivityBadge} from './ActivityLibrary/ActivityBadge'
import {ActivityCard, ActivityCardImage} from './ActivityLibrary/ActivityCard'
import {ActivityLibraryCardDescription} from './ActivityLibrary/ActivityLibraryCardDescription'

Expand All @@ -27,7 +28,7 @@ const RetroDrawerTemplateCard = (props: Props) => {
name
category
illustrationUrl
isFree
scope
}
`,
templateRef
Expand All @@ -53,6 +54,11 @@ const RetroDrawerTemplateCard = (props: Props) => {
theme={CATEGORY_THEMES[template.category as CategoryID]}
title={template.name}
type='retrospective'
badge={
template.scope !== 'PUBLIC' ? (
<ActivityBadge className='m-2 bg-gold-300 text-grape-700'>Custom</ActivityBadge>
) : null
}
>
<ActivityCardImage
className='group-hover/card:hidden'
Expand Down

0 comments on commit e61473e

Please sign in to comment.