Skip to content

Commit

Permalink
feat: sorting by last updated date
Browse files Browse the repository at this point in the history
  • Loading branch information
DanChae03 committed Jan 21, 2025
1 parent 7f3e2f9 commit cf469a1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions apps/journeys-admin/__generated__/GetAdminJourneys.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import { useBreakpoints } from '@core/shared/ui/useBreakpoints'

export enum SortOrder {
CREATED_AT = 'createdAt',
TITLE = 'title'
TITLE = 'title',
UPDATED_AT = 'updatedAt'
}

interface JourneySortProps {
Expand All @@ -44,7 +45,8 @@ export function JourneySort({

const sortOrderLabel = {
createdAt: t('Date Created'),
title: t('Name')
title: t('Name'),
updatedAt: t('Last Modified')
}

useEffect(() => {
Expand Down Expand Up @@ -86,6 +88,11 @@ export function JourneySort({
control={<Radio />}
label={sortOrderLabel.title}
/>
<FormControlLabel
value={SortOrder.UPDATED_AT}
control={<Radio />}
label={sortOrderLabel.updatedAt}
/>
</RadioGroup>
<Box
sx={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export const GET_ADMIN_JOURNEYS = gql`
seoTitle
seoDescription
template
updatedAt
userJourneys {
id
role
Expand Down

0 comments on commit cf469a1

Please sign in to comment.