forked from aws-samples/amplify-next-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #260 from cabcookie:consider-activities-with-peopl…
…e-mentioned Consider-activities-with-people-mentioned
- Loading branch information
Showing
7 changed files
with
58 additions
and
40 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import PersonNoteMeeting from "@/components/people/PersonNoteMeeting"; | ||
import PersonNoteProject from "@/components/people/PersonNoteProject"; | ||
import NotesEditor from "@/components/ui-elements/editors/notes-editor/NotesEditor"; | ||
import { format } from "date-fns"; | ||
import { ExternalLink } from "lucide-react"; | ||
import Link from "next/link"; | ||
import { FC } from "react"; | ||
|
||
interface Activity { | ||
id: string; | ||
finishedOn: Date; | ||
projectIds: string[]; | ||
meetingId?: string; | ||
} | ||
|
||
type LeanActivitiyProps = { | ||
activity: Activity; | ||
readonly?: boolean; | ||
}; | ||
|
||
const LeanActivitiy: FC<LeanActivitiyProps> = ({ activity, readonly }) => { | ||
return ( | ||
<div key={activity.id} className="space-y-2"> | ||
<div className="font-semibold text-base"> | ||
{format(activity.finishedOn, "PPp")} | ||
<Link href={`/activities/${activity.id}`}> | ||
<ExternalLink className="inline-block ml-2 w-5 h-5 -translate-y-0.5 text-muted-foreground hover:text-primary" /> | ||
</Link> | ||
</div> | ||
|
||
<div className="text-sm text-muted-foreground"> | ||
{activity.projectIds.map((pId) => ( | ||
<PersonNoteProject key={pId} projectId={pId} /> | ||
))} | ||
<PersonNoteMeeting meetingId={activity.meetingId} /> | ||
</div> | ||
|
||
<NotesEditor activityId={activity.id} readonly={readonly} /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default LeanActivitiy; |
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
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