Skip to content

Commit

Permalink
Added support to Teams chat Url in users and teams pages (#979)
Browse files Browse the repository at this point in the history
* Added support to Teams chat to users and teams

* Updated size of Teams icon

* Create perfect-timers-wash.md

* formatted teams, user astro page

---------

Co-authored-by: Sebastian Rendon <[email protected]>
Co-authored-by: David Boyne <[email protected]>
  • Loading branch information
3 people authored Dec 2, 2024
1 parent 95ed136 commit eb2c620
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/perfect-timers-wash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@eventcatalog/core": patch
---

feat(core): added support to teams chat url in users and teams pages
1 change: 1 addition & 0 deletions examples/default/teams/full-stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ members:
- msmith
email: [email protected]
slackDirectMessageUrl: https://yourteam.slack.com/channels/boyney123
msTeamsDirectMessageUrl: https://teams.microsoft.com/l/channel/<Your Channel Id>/<Your team chat name>?groupId=<Your group Id>&tenantId=<Your tenant Id>
---

## Overview
Expand Down
1 change: 1 addition & 0 deletions examples/default/users/dboyne.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ avatarUrl: "https://pbs.twimg.com/profile_images/1262283153563140096/DYRDqKg6_40
role: Lead developer
email: [email protected]
slackDirectMessageUrl: https://yourteam.slack.com/channels/boyney123
msTeamsDirectMessageUrl: https://teams.microsoft.com/l/chat/0/[email protected]
---

Hello! I'm David Boyne, the Tech Lead of an amazing team called Full Stackers. With a passion for building robust and scalable systems, I specialize in designing and implementing event-driven architectures that power modern, responsive applications.
Expand Down
2 changes: 2 additions & 0 deletions public/icons/ms-teams.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ const users = defineCollection({
hidden: z.boolean().optional(),
email: z.string().optional(),
slackDirectMessageUrl: z.string().optional(),
msTeamsDirectMessageUrl: z.string().optional(),
ownedDomains: z.array(reference('domains')).optional(),
ownedServices: z.array(reference('services')).optional(),
ownedEvents: z.array(reference('events')).optional(),
Expand All @@ -248,6 +249,7 @@ const teams = defineCollection({
email: z.string().optional(),
hidden: z.boolean().optional(),
slackDirectMessageUrl: z.string().optional(),
msTeamsDirectMessageUrl: z.string().optional(),
members: z.array(reference('users')).optional(),
ownedCommands: z.array(reference('commands')).optional(),
ownedDomains: z.array(reference('domains')).optional(),
Expand Down
10 changes: 10 additions & 0 deletions src/pages/docs/teams/[id]/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,16 @@ const ownedEventsList = [...events, ...commands].map((p) => ({
</div>
)
}
{
props.data.msTeamsDirectMessageUrl && (
<div class="flex space-x-1 items-center text-xs text-gray-500 font-bold hover:underline hover:text-primary">
<img src="/icons/ms-teams.svg" class="w-4 h-4" />
<a href={`${props.data.msTeamsDirectMessageUrl}`} target="_blank" rel="noopener noreferrer">
Send DM on Teams
</a>
</div>
)
}
</div>
</div>
</div>
Expand Down
10 changes: 10 additions & 0 deletions src/pages/docs/users/[id]/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ const associatedTeams = teams.map((o) => ({
</div>
)
}
{
props.data.msTeamsDirectMessageUrl && (
<div class="flex space-x-1 items-center text-xs text-gray-500 font-bold hover:underline hover:text-primary">
<img src="/icons/ms-teams.svg" class="w-4 h-4" />
<a href={`${props.data.msTeamsDirectMessageUrl}`} target="_blank" rel="noopener noreferrer">
Send DM on Teams
</a>
</div>
)
}
</div>
</div>
</div>
Expand Down

0 comments on commit eb2c620

Please sign in to comment.