From c351e050228688ebdb6257f8f07bc0f201ac7529 Mon Sep 17 00:00:00 2001 From: Jane Moroz Date: Tue, 29 Aug 2023 14:03:38 +0300 Subject: [PATCH 01/14] feat: add "my team" table --- src/app/myteam/components/TeamRow.tsx | 31 ++++++++++ src/app/myteam/components/TeamTable.css | 11 ++++ src/app/myteam/components/TeamTable.tsx | 75 +++++++++++++++++++++++++ src/app/myteam/components/index.ts | 2 + src/app/myteam/index.ts | 1 + src/app/myteam/page.tsx | 7 +++ 6 files changed, 127 insertions(+) create mode 100644 src/app/myteam/components/TeamRow.tsx create mode 100644 src/app/myteam/components/TeamTable.css create mode 100644 src/app/myteam/components/TeamTable.tsx create mode 100644 src/app/myteam/components/index.ts create mode 100644 src/app/myteam/index.ts create mode 100644 src/app/myteam/page.tsx diff --git a/src/app/myteam/components/TeamRow.tsx b/src/app/myteam/components/TeamRow.tsx new file mode 100644 index 00000000..4a2ee296 --- /dev/null +++ b/src/app/myteam/components/TeamRow.tsx @@ -0,0 +1,31 @@ +import React from "react"; + +interface TeamMember { + name: string; + discordId: string; + averageHour: number; + location: string; + timeZone: string; + email: string; + position: string; +} + +interface TeamRowProps { + teamMemeber: TeamMember; +} + +function TeamRow({ teamMemeber }: TeamRowProps) { + return ( + + {teamMemeber.name} + {teamMemeber.discordId} + {teamMemeber.averageHour} + {teamMemeber.location} + {teamMemeber.timeZone} + {teamMemeber.email} + {teamMemeber.position} + + ); +} + +export default TeamRow; diff --git a/src/app/myteam/components/TeamTable.css b/src/app/myteam/components/TeamTable.css new file mode 100644 index 00000000..d372f08a --- /dev/null +++ b/src/app/myteam/components/TeamTable.css @@ -0,0 +1,11 @@ +.table { + @apply border-separate; +} + +.table :where(thead, tbody) :where(tr:not(:last-child)), .table :where(thead, tbody) :where(tr:first-child:last-child) { + @apply border-none; +} + +.table :where(thead) { + @apply mb-10; +} \ No newline at end of file diff --git a/src/app/myteam/components/TeamTable.tsx b/src/app/myteam/components/TeamTable.tsx new file mode 100644 index 00000000..ec568bd7 --- /dev/null +++ b/src/app/myteam/components/TeamTable.tsx @@ -0,0 +1,75 @@ +import "./TeamTable.css"; + +import { TeamRow } from "."; + +const data = [ + { + id: "1", + name: "Danney Trieu", + discordId: "danneytrieuwork#2558", + averageHour: 10, + location: "Denver, CO, USA", + timeZone: "MDT", + email: "danney@gmail.com", + position: "Product Owner", + }, + { + id: "2", + name: "Jane Morez", + discordId: "Jan_morez#2341", + averageHour: 15, + location: "Las Vegas, NY, USA", + timeZone: "PDT", + email: "jane@gmail.com", + position: "Back-end Developer", + }, + { + id: "3", + name: "Kayla Montre", + discordId: "KaylaMon#5678", + averageHour: 12, + location: "Las Vegas, NY, USA", + timeZone: "PDT", + email: "kayla@gmail.com", + position: "UX/UI Designer", + }, + { + id: "4", + name: "Jackson Pez", + discordId: "jackson#2558", + averageHour: 10, + location: "Denver, CO, USA", + timeZone: "MDT", + email: "jackson@gmail.com", + position: "Front-end Developer", + }, +]; + +function TeamTable() { + return ( +
+ + {/* head */} + + + + + + + + + + + + + {/* rows */} + {data.map((teamMemeber) => ( + + ))} + +
NameDiscord IDAverage Hour/SprintLocationTime ZoneEmailPosition
+
+ ); +} + +export default TeamTable; diff --git a/src/app/myteam/components/index.ts b/src/app/myteam/components/index.ts new file mode 100644 index 00000000..2e1afbb7 --- /dev/null +++ b/src/app/myteam/components/index.ts @@ -0,0 +1,2 @@ +export { default as TeamTable } from "./TeamTable"; +export { default as TeamRow } from "./TeamRow"; diff --git a/src/app/myteam/index.ts b/src/app/myteam/index.ts new file mode 100644 index 00000000..5a517cce --- /dev/null +++ b/src/app/myteam/index.ts @@ -0,0 +1 @@ +export { default as MyTeamPage } from "./page"; diff --git a/src/app/myteam/page.tsx b/src/app/myteam/page.tsx new file mode 100644 index 00000000..b4921ada --- /dev/null +++ b/src/app/myteam/page.tsx @@ -0,0 +1,7 @@ +import { TeamTable } from "./components"; + +function MyTeamPage() { + return ; +} + +export default MyTeamPage; From 2776ae044d63b72fa9e15755e80a1ebbddd14183 Mon Sep 17 00:00:00 2001 From: Jane Moroz Date: Fri, 1 Sep 2023 10:53:36 +0300 Subject: [PATCH 02/14] style: remove unnecessary style file --- src/app/myteam/components/TeamTable.css | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 src/app/myteam/components/TeamTable.css diff --git a/src/app/myteam/components/TeamTable.css b/src/app/myteam/components/TeamTable.css deleted file mode 100644 index d372f08a..00000000 --- a/src/app/myteam/components/TeamTable.css +++ /dev/null @@ -1,11 +0,0 @@ -.table { - @apply border-separate; -} - -.table :where(thead, tbody) :where(tr:not(:last-child)), .table :where(thead, tbody) :where(tr:first-child:last-child) { - @apply border-none; -} - -.table :where(thead) { - @apply mb-10; -} \ No newline at end of file From dbb67eff996d1050cef277cd1aaec70828c4f0fa Mon Sep 17 00:00:00 2001 From: Jane Moroz Date: Fri, 1 Sep 2023 10:55:09 +0300 Subject: [PATCH 03/14] feat: move data to 'fixture' folder --- src/app/myteam/components/TeamRow.tsx | 12 +---- src/app/myteam/components/TeamTable.tsx | 52 ++----------------- src/app/myteam/components/fixtures/MyTeam.ts | 53 ++++++++++++++++++++ 3 files changed, 58 insertions(+), 59 deletions(-) create mode 100644 src/app/myteam/components/fixtures/MyTeam.ts diff --git a/src/app/myteam/components/TeamRow.tsx b/src/app/myteam/components/TeamRow.tsx index 4a2ee296..50113581 100644 --- a/src/app/myteam/components/TeamRow.tsx +++ b/src/app/myteam/components/TeamRow.tsx @@ -1,14 +1,4 @@ -import React from "react"; - -interface TeamMember { - name: string; - discordId: string; - averageHour: number; - location: string; - timeZone: string; - email: string; - position: string; -} +import { TeamMember } from "./fixtures/MyTeam"; interface TeamRowProps { teamMemeber: TeamMember; diff --git a/src/app/myteam/components/TeamTable.tsx b/src/app/myteam/components/TeamTable.tsx index ec568bd7..42b19a2d 100644 --- a/src/app/myteam/components/TeamTable.tsx +++ b/src/app/myteam/components/TeamTable.tsx @@ -1,56 +1,12 @@ -import "./TeamTable.css"; - +import { teamMembers } from "./fixtures/MyTeam"; import { TeamRow } from "."; -const data = [ - { - id: "1", - name: "Danney Trieu", - discordId: "danneytrieuwork#2558", - averageHour: 10, - location: "Denver, CO, USA", - timeZone: "MDT", - email: "danney@gmail.com", - position: "Product Owner", - }, - { - id: "2", - name: "Jane Morez", - discordId: "Jan_morez#2341", - averageHour: 15, - location: "Las Vegas, NY, USA", - timeZone: "PDT", - email: "jane@gmail.com", - position: "Back-end Developer", - }, - { - id: "3", - name: "Kayla Montre", - discordId: "KaylaMon#5678", - averageHour: 12, - location: "Las Vegas, NY, USA", - timeZone: "PDT", - email: "kayla@gmail.com", - position: "UX/UI Designer", - }, - { - id: "4", - name: "Jackson Pez", - discordId: "jackson#2558", - averageHour: 10, - location: "Denver, CO, USA", - timeZone: "MDT", - email: "jackson@gmail.com", - position: "Front-end Developer", - }, -]; - function TeamTable() { return (
- +
{/* head */} - + @@ -63,7 +19,7 @@ function TeamTable() { {/* rows */} - {data.map((teamMemeber) => ( + {teamMembers.map((teamMemeber) => ( ))} diff --git a/src/app/myteam/components/fixtures/MyTeam.ts b/src/app/myteam/components/fixtures/MyTeam.ts new file mode 100644 index 00000000..5982bc79 --- /dev/null +++ b/src/app/myteam/components/fixtures/MyTeam.ts @@ -0,0 +1,53 @@ +export interface TeamMember { + id: string; + name: string; + discordId: string; + averageHour: number; + location: string; + timeZone: string; + email: string; + position: string; +} + +export const teamMembers: TeamMember[] = [ + { + id: "1", + name: "Danney Trieu", + discordId: "danneytrieuwork#2558", + averageHour: 10, + location: "Denver, CO, USA", + timeZone: "MDT", + email: "danney@gmail.com", + position: "Product Owner", + }, + { + id: "2", + name: "Jane Morez", + discordId: "Jan_morez#2341", + averageHour: 15, + location: "Las Vegas, NY, USA", + timeZone: "PDT", + email: "jane@gmail.com", + position: "Back-end Developer", + }, + { + id: "3", + name: "Kayla Montre", + discordId: "KaylaMon#5678", + averageHour: 12, + location: "Las Vegas, NY, USA", + timeZone: "PDT", + email: "kayla@gmail.com", + position: "UX/UI Designer", + }, + { + id: "4", + name: "Jackson Pez", + discordId: "jackson#2558", + averageHour: 10, + location: "Denver, CO, USA", + timeZone: "MDT", + email: "jackson@gmail.com", + position: "Front-end Developer", + }, +]; From 9bbc2a626c8afd77f9c0aa28ba18d240ba91d398 Mon Sep 17 00:00:00 2001 From: Jane Moroz Date: Fri, 1 Sep 2023 11:00:09 +0300 Subject: [PATCH 04/14] style: fix colors --- src/app/myteam/components/TeamRow.tsx | 2 +- src/app/myteam/components/TeamTable.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/myteam/components/TeamRow.tsx b/src/app/myteam/components/TeamRow.tsx index 50113581..e560457c 100644 --- a/src/app/myteam/components/TeamRow.tsx +++ b/src/app/myteam/components/TeamRow.tsx @@ -7,7 +7,7 @@ interface TeamRowProps { function TeamRow({ teamMemeber }: TeamRowProps) { return ( - + diff --git a/src/app/myteam/components/TeamTable.tsx b/src/app/myteam/components/TeamTable.tsx index 42b19a2d..a4f42f20 100644 --- a/src/app/myteam/components/TeamTable.tsx +++ b/src/app/myteam/components/TeamTable.tsx @@ -4,9 +4,9 @@ import { TeamRow } from "."; function TeamTable() { return (
-
Name Discord ID
{teamMemeber.name}{teamMemeber.name} {teamMemeber.discordId} {teamMemeber.averageHour} {teamMemeber.location}
+
{/* head */} - + @@ -17,7 +17,7 @@ function TeamTable() { - + {/* rows */} {teamMembers.map((teamMemeber) => ( From 022bebfa6d2d28c093fce43ccf9960144a4abac5 Mon Sep 17 00:00:00 2001 From: Jane Moroz Date: Wed, 6 Sep 2023 12:01:09 +0300 Subject: [PATCH 05/14] fix: rename folder 'myteam' to 'my-team' --- src/app/{myteam => my-team}/components/TeamRow.tsx | 0 src/app/{myteam => my-team}/components/TeamTable.tsx | 0 src/app/{myteam => my-team}/components/fixtures/MyTeam.ts | 0 src/app/{myteam => my-team}/components/index.ts | 0 src/app/{myteam => my-team}/index.ts | 0 src/app/{myteam => my-team}/page.tsx | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename src/app/{myteam => my-team}/components/TeamRow.tsx (100%) rename src/app/{myteam => my-team}/components/TeamTable.tsx (100%) rename src/app/{myteam => my-team}/components/fixtures/MyTeam.ts (100%) rename src/app/{myteam => my-team}/components/index.ts (100%) rename src/app/{myteam => my-team}/index.ts (100%) rename src/app/{myteam => my-team}/page.tsx (100%) diff --git a/src/app/myteam/components/TeamRow.tsx b/src/app/my-team/components/TeamRow.tsx similarity index 100% rename from src/app/myteam/components/TeamRow.tsx rename to src/app/my-team/components/TeamRow.tsx diff --git a/src/app/myteam/components/TeamTable.tsx b/src/app/my-team/components/TeamTable.tsx similarity index 100% rename from src/app/myteam/components/TeamTable.tsx rename to src/app/my-team/components/TeamTable.tsx diff --git a/src/app/myteam/components/fixtures/MyTeam.ts b/src/app/my-team/components/fixtures/MyTeam.ts similarity index 100% rename from src/app/myteam/components/fixtures/MyTeam.ts rename to src/app/my-team/components/fixtures/MyTeam.ts diff --git a/src/app/myteam/components/index.ts b/src/app/my-team/components/index.ts similarity index 100% rename from src/app/myteam/components/index.ts rename to src/app/my-team/components/index.ts diff --git a/src/app/myteam/index.ts b/src/app/my-team/index.ts similarity index 100% rename from src/app/myteam/index.ts rename to src/app/my-team/index.ts diff --git a/src/app/myteam/page.tsx b/src/app/my-team/page.tsx similarity index 100% rename from src/app/myteam/page.tsx rename to src/app/my-team/page.tsx From 800484894e6e35660e3ed24c9406e8d327749fed Mon Sep 17 00:00:00 2001 From: Jane Moroz Date: Wed, 6 Sep 2023 12:31:42 +0300 Subject: [PATCH 06/14] fix: fix eslint error --- src/app/tech-stack/components/TechStackContainer.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/app/tech-stack/components/TechStackContainer.tsx b/src/app/tech-stack/components/TechStackContainer.tsx index 97e0e6d6..44bad1f4 100644 --- a/src/app/tech-stack/components/TechStackContainer.tsx +++ b/src/app/tech-stack/components/TechStackContainer.tsx @@ -4,8 +4,10 @@ import { TechStackCard } from "."; export default function TechStackContainer() { return ( -
-
    +
    +
      {Object.keys(techStack).map((cardType, index) => (
    • Date: Wed, 6 Sep 2023 12:48:15 +0300 Subject: [PATCH 07/14] style: use colors from tailwind config --- src/app/globals.css | 1 + src/app/my-team/components/TeamTable.tsx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/globals.css b/src/app/globals.css index cc294bc0..273d332d 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -5,6 +5,7 @@ ::-webkit-scrollbar { width: 4px; + height: 6px } ::-webkit-scrollbar-track { diff --git a/src/app/my-team/components/TeamTable.tsx b/src/app/my-team/components/TeamTable.tsx index a4f42f20..81cd1dc1 100644 --- a/src/app/my-team/components/TeamTable.tsx +++ b/src/app/my-team/components/TeamTable.tsx @@ -3,8 +3,8 @@ import { TeamRow } from "."; function TeamTable() { return ( -
      -
Name Discord IDPosition
+
+
{/* head */} From 390b6681e94b02d3aab18d2f17392e5c3f3c73c9 Mon Sep 17 00:00:00 2001 From: Jane Moroz Date: Wed, 6 Sep 2023 13:48:26 +0300 Subject: [PATCH 08/14] feat: add "Edit" button --- src/app/my-team/components/TeamRow.tsx | 19 ++++++++++++++++++- src/app/my-team/components/TeamTable.tsx | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/app/my-team/components/TeamRow.tsx b/src/app/my-team/components/TeamRow.tsx index e560457c..f7f4cd59 100644 --- a/src/app/my-team/components/TeamRow.tsx +++ b/src/app/my-team/components/TeamRow.tsx @@ -1,4 +1,9 @@ +import { PencilSquareIcon } from "@heroicons/react/24/solid"; import { TeamMember } from "./fixtures/MyTeam"; +import { Button } from "@/components"; + +// Temp: +const currentUserId = "1"; interface TeamRowProps { teamMemeber: TeamMember; @@ -9,7 +14,19 @@ function TeamRow({ teamMemeber }: TeamRowProps) { - + diff --git a/src/app/my-team/components/TeamTable.tsx b/src/app/my-team/components/TeamTable.tsx index 81cd1dc1..50abf626 100644 --- a/src/app/my-team/components/TeamTable.tsx +++ b/src/app/my-team/components/TeamTable.tsx @@ -3,7 +3,7 @@ import { TeamRow } from "."; function TeamTable() { return ( -
+
{teamMemeber.name} {teamMemeber.discordId}{teamMemeber.averageHour} +
+ {teamMemeber.averageHour} + {teamMemeber.id === currentUserId && ( + + )} +
+
{teamMemeber.location} {teamMemeber.timeZone} {teamMemeber.email}
{/* head */} From 6ec6fae14813c8206c9a9f0ba2d48dc6ad703cda Mon Sep 17 00:00:00 2001 From: Jane Moroz Date: Thu, 7 Sep 2023 13:35:13 +0300 Subject: [PATCH 09/14] fix: move temp variable to TeamTable --- src/app/my-team/components/TeamRow.tsx | 8 +++----- src/app/my-team/components/TeamTable.tsx | 9 ++++++++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/app/my-team/components/TeamRow.tsx b/src/app/my-team/components/TeamRow.tsx index f7f4cd59..764c6ce3 100644 --- a/src/app/my-team/components/TeamRow.tsx +++ b/src/app/my-team/components/TeamRow.tsx @@ -2,14 +2,12 @@ import { PencilSquareIcon } from "@heroicons/react/24/solid"; import { TeamMember } from "./fixtures/MyTeam"; import { Button } from "@/components"; -// Temp: -const currentUserId = "1"; - interface TeamRowProps { teamMemeber: TeamMember; + currentUserId: string; } -function TeamRow({ teamMemeber }: TeamRowProps) { +function TeamRow({ teamMemeber, currentUserId }: TeamRowProps) { return ( @@ -20,7 +18,7 @@ function TeamRow({ teamMemeber }: TeamRowProps) { {teamMemeber.id === currentUserId && ( diff --git a/src/app/my-team/components/TeamTable.tsx b/src/app/my-team/components/TeamTable.tsx index 50abf626..aa526e4d 100644 --- a/src/app/my-team/components/TeamTable.tsx +++ b/src/app/my-team/components/TeamTable.tsx @@ -1,6 +1,9 @@ import { teamMembers } from "./fixtures/MyTeam"; import { TeamRow } from "."; +// Temp: +const currentUserId = "1"; + function TeamTable() { return (
@@ -20,7 +23,11 @@ function TeamTable() {
{/* rows */} {teamMembers.map((teamMemeber) => ( - + ))}
{teamMemeber.name}
From 62d7c774327e8f687e538289ec36ac6996511b66 Mon Sep 17 00:00:00 2001 From: Jane Moroz Date: Thu, 7 Sep 2023 13:46:21 +0300 Subject: [PATCH 10/14] fix: fix typo --- src/app/my-team/components/TeamRow.tsx | 20 ++++++++++---------- src/app/my-team/components/TeamTable.tsx | 6 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/app/my-team/components/TeamRow.tsx b/src/app/my-team/components/TeamRow.tsx index 764c6ce3..87670637 100644 --- a/src/app/my-team/components/TeamRow.tsx +++ b/src/app/my-team/components/TeamRow.tsx @@ -3,19 +3,19 @@ import { TeamMember } from "./fixtures/MyTeam"; import { Button } from "@/components"; interface TeamRowProps { - teamMemeber: TeamMember; + teamMember: TeamMember; currentUserId: string; } -function TeamRow({ teamMemeber, currentUserId }: TeamRowProps) { +function TeamRow({ teamMember, currentUserId }: TeamRowProps) { return ( - {teamMemeber.name} - {teamMemeber.discordId} + {teamMember.name} + {teamMember.discordId}
- {teamMemeber.averageHour} - {teamMemeber.id === currentUserId && ( + {teamMember.averageHour} + {teamMember.id === currentUserId && ( diff --git a/src/app/directory/components/fixtures/MyTeam.ts b/src/app/directory/components/fixtures/MyTeam.ts index 5982bc79..297d2e56 100644 --- a/src/app/directory/components/fixtures/MyTeam.ts +++ b/src/app/directory/components/fixtures/MyTeam.ts @@ -14,7 +14,7 @@ export const teamMembers: TeamMember[] = [ id: "1", name: "Danney Trieu", discordId: "danneytrieuwork#2558", - averageHour: 10, + averageHour: 0, location: "Denver, CO, USA", timeZone: "MDT", email: "danney@gmail.com", @@ -24,7 +24,7 @@ export const teamMembers: TeamMember[] = [ id: "2", name: "Jane Morez", discordId: "Jan_morez#2341", - averageHour: 15, + averageHour: 0, location: "Las Vegas, NY, USA", timeZone: "PDT", email: "jane@gmail.com", From dd62b155335098f2473eca0b83a874e7e9a28e5e Mon Sep 17 00:00:00 2001 From: Jane Moroz Date: Sat, 9 Sep 2023 14:01:08 +0300 Subject: [PATCH 13/14] style: change row gap --- src/app/directory/components/TeamRow.module.css | 7 +++++++ src/app/directory/components/TeamTable.tsx | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 src/app/directory/components/TeamRow.module.css diff --git a/src/app/directory/components/TeamRow.module.css b/src/app/directory/components/TeamRow.module.css new file mode 100644 index 00000000..e23e65e9 --- /dev/null +++ b/src/app/directory/components/TeamRow.module.css @@ -0,0 +1,7 @@ +.table :where(td) { + @apply py-1; +} + +.table :where(th) { + @apply pb-6; +} \ No newline at end of file diff --git a/src/app/directory/components/TeamTable.tsx b/src/app/directory/components/TeamTable.tsx index 87722bab..636991f3 100644 --- a/src/app/directory/components/TeamTable.tsx +++ b/src/app/directory/components/TeamTable.tsx @@ -1,3 +1,4 @@ +import styles from "./TeamRow.module.css"; import { teamMembers } from "./fixtures/MyTeam"; import { TeamRow } from "."; @@ -7,7 +8,9 @@ const currentUserId = "1"; function TeamTable() { return (
- +
{/* head */} From 8d31db92e2e1a91c242b978f67d7356ba7068d67 Mon Sep 17 00:00:00 2001 From: Jane Moroz Date: Mon, 11 Sep 2023 13:34:47 +0300 Subject: [PATCH 14/14] style: remove hover effects from the edit btn --- src/app/directory/components/TeamRow.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/directory/components/TeamRow.tsx b/src/app/directory/components/TeamRow.tsx index b14775c0..77c146af 100644 --- a/src/app/directory/components/TeamRow.tsx +++ b/src/app/directory/components/TeamRow.tsx @@ -13,12 +13,12 @@ function TeamRow({ teamMember, currentUserId }: TeamRowProps) {
{teamMember.name} {teamMember.discordId} -
+
{teamMember.averageHour === 0 ? "Add hours" : teamMember.averageHour} {teamMember.id === currentUserId && (