-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Circulars Archive Group View (#2617)
Resolves #2544.
- Loading branch information
Showing
27 changed files
with
1,055 additions
and
335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
app/routes/circulars._archive._index/SynonymGroupIndex.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/*! | ||
* Copyright © 2023 United States Government as represented by the | ||
* Administrator of the National Aeronautics and Space Administration. | ||
* All Rights Reserved. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
import { Link } from '@remix-run/react' | ||
|
||
import type { SynonymGroupWithMembers } from '../synonyms/synonyms.lib' | ||
|
||
export default function ({ | ||
allItems, | ||
totalItems, | ||
searchString, | ||
query, | ||
}: { | ||
allItems: SynonymGroupWithMembers[] | ||
totalItems: number | ||
searchString: string | ||
query?: string | ||
}) { | ||
return ( | ||
<> | ||
{query && ( | ||
<h3> | ||
{totalItems} result{totalItems != 1 && 's'} found. | ||
</h3> | ||
)} | ||
|
||
{allItems.map(({ synonymId, eventIds, slugs, members }) => ( | ||
<div key={synonymId}> | ||
<details> | ||
<summary> | ||
<Link to={`/circulars/events/${slugs.sort()[0]}${searchString}`}> | ||
{eventIds.join(', ')} | ||
</Link> | ||
</summary> | ||
<ol className="margin-left-3"> | ||
{members.map(({ circularId, subject }) => { | ||
return ( | ||
<li key={circularId} value={circularId}> | ||
<Link to={`/circulars/${circularId}`}>{subject}</Link> | ||
</li> | ||
) | ||
})} | ||
</ol> | ||
</details> | ||
</div> | ||
))} | ||
</> | ||
) | ||
} |
Oops, something went wrong.