Skip to content

Commit d87f2a0

Browse files
authored
Merge pull request #254 from chingu-x/dev
1.0.0-alpha.4
2 parents 870de55 + e11cec6 commit d87f2a0

File tree

10 files changed

+63
-21
lines changed

10 files changed

+63
-21
lines changed

CHANGELOG.md

+14
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/).
77

8+
## [1.0.0-alpha.4] - 2024-09-10
9+
10+
### Added
11+
12+
13+
### Changed
14+
- Updated how we're retrieving the discord id to display in the directory page
15+
16+
17+
### Fixed
18+
- Fixed issue with dark mode images being different size https://github.com/chingu-x/chingu-dashboard/issues/200
19+
- Fixed issue with meeting notes section becoming scrollable instead of expanding when saved https://github.com/chingu-x/chingu-dashboard/issues/248
20+
21+
822
## [1.0.0-alpha.3] - 2024-09-05
923

1024
### Added

public/img/empty_ideation_dark.png

-11.6 KB
Loading

public/img/empty_ideation_light.png

1.19 KB
Loading

public/img/empty_resources_dark.png

-14.3 KB
Loading

public/img/empty_resources_light.png

483 Bytes
Loading

src/app/(main)/my-voyage/[teamId]/directory/components/DirectoryComponentWrapper.tsx

+11-4
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,18 @@ export async function fetchTeamDirectory({
4242

4343
if (res) {
4444
updateDirectoryWithCurrentTime(res);
45-
const teamMember = res.voyageTeamMembers;
46-
const elementToSort = teamMember.find(
47-
(element) => element.member.discordId === user?.discordId,
45+
const teamMembers = res.voyageTeamMembers;
46+
const userDiscordId = user?.oAuthProfiles.find(
47+
(profile) => profile.provider.name === "discord",
48+
)?.providerUsername;
49+
const elementToSort = teamMembers.find(
50+
(element) =>
51+
element.member.oAuthProfiles.find(
52+
(profile) => profile.provider.name === "discord",
53+
)?.providerUsername === userDiscordId,
4854
);
49-
moveElementToFirst(teamMember, elementToSort);
55+
56+
moveElementToFirst(teamMembers, elementToSort);
5057
}
5158

5259
return [res, error];

src/app/(main)/my-voyage/[teamId]/directory/components/TeamMember.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,16 @@ interface TeamMemberProps {
1313

1414
export default function TeamMember({ teamMember }: TeamMemberProps) {
1515
const user = useUser().voyageTeamMembers;
16-
const { firstName, lastName, discordId, currentTime } = teamMember.member;
16+
const { firstName, lastName, oAuthProfiles, currentTime } = teamMember.member;
1717
const { id, hrPerSprint, voyageRole } = teamMember;
1818
const isCurrentUser = user.some((user) => user.id === id);
1919
const [isEditing, setIsEditing] = useState<boolean>(false);
2020
const newRef = useRef<HTMLDivElement>(null);
2121

22+
const discordId =
23+
oAuthProfiles.find((profile) => profile.provider.name === "discord")
24+
?.providerUsername || "";
25+
2226
useEffect(() => {
2327
document.addEventListener("mousedown", handleOutsideClick);
2428
return () => {

src/app/(main)/my-voyage/[teamId]/sprints/components/sections/Notes.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ export default function Notes() {
101101
rows={2}
102102
{...register("notes")}
103103
errorMessage={errors.notes?.message}
104+
defaultValue={data ?? ""}
104105
/>
105106
<Button
106107
type="submit"

src/store/features/directory/directorySlice.ts

+16-8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import {
44
type VoyageStatus,
55
} from "@/store/features/user/userSlice";
66

7+
type providerType = "discord";
8+
79
interface VoyageTier {
810
id: number;
911
name: string;
@@ -20,10 +22,12 @@ interface VoyageMember {
2022
firstName: string;
2123
lastName: string;
2224
avatar: string;
23-
githubId: string | null;
24-
discordId: string | null;
25-
twitterId: string | null;
26-
linkedinId: string | null;
25+
oAuthProfiles: {
26+
provider: {
27+
name: providerType;
28+
};
29+
providerUsername: string;
30+
}[];
2731
countryCode: string;
2832
timezone: string;
2933
currentTime: string;
@@ -73,10 +77,14 @@ const initialState: DirectoryState = {
7377
firstName: "",
7478
lastName: "",
7579
avatar: "",
76-
githubId: null,
77-
discordId: null,
78-
twitterId: null,
79-
linkedinId: null,
80+
oAuthProfiles: [
81+
{
82+
provider: {
83+
name: "discord",
84+
},
85+
providerUsername: "",
86+
},
87+
],
8088
countryCode: "",
8189
timezone: "",
8290
currentTime: "",

src/store/features/user/userSlice.ts

+16-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { type PayloadAction, createSlice } from "@reduxjs/toolkit";
22
import { clientSignOut } from "@/store/features/auth/authSlice";
33

4+
type providerType = "discord";
5+
46
export interface VoyageStatus {
57
name: string;
68
}
@@ -31,10 +33,12 @@ export interface User {
3133
firstName: string;
3234
lastName: string;
3335
countryCode: string;
34-
discordId: string;
35-
githubId: string;
36-
twitterId: string;
37-
linkedinId: string;
36+
oAuthProfiles: {
37+
provider: {
38+
name: providerType;
39+
};
40+
providerUsername: string;
41+
}[];
3842
email: string;
3943
timezone: string;
4044
avatar: string;
@@ -48,10 +52,14 @@ const initialState: User = {
4852
firstName: "",
4953
lastName: "",
5054
countryCode: "",
51-
discordId: "",
52-
githubId: "",
53-
twitterId: "",
54-
linkedinId: "",
55+
oAuthProfiles: [
56+
{
57+
provider: {
58+
name: "discord",
59+
},
60+
providerUsername: "",
61+
},
62+
],
5563
email: "",
5664
timezone: "",
5765
avatar: "",

0 commit comments

Comments
 (0)