Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add custom label to templates #9703

Merged
merged 1 commit into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading