Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/table view for issues #1648

Merged
merged 268 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
268 commits
Select commit Hold shift + click to select a range
f91b3db
Merge pull request #395 from ever-co/develop
evereq Dec 20, 2022
59090f1
Merge pull request #397 from ever-co/develop
evereq Dec 20, 2022
2349f51
Merge pull request #402 from ever-co/develop
evereq Dec 23, 2022
73b705e
Merge pull request #406 from ever-co/develop
evereq Dec 23, 2022
c59901c
Merge pull request #409 from ever-co/develop
evereq Dec 30, 2022
e4fd1d6
Merge pull request #414 from ever-co/develop
evereq Jan 3, 2023
28f073d
Merge pull request #420 from ever-co/develop
evereq Jan 6, 2023
9bb2163
Merge pull request #423 from ever-co/develop
evereq Jan 6, 2023
cae5c6f
Merge pull request #425 from ever-co/develop
evereq Jan 7, 2023
19a4529
Merge pull request #426 from ever-co/develop
evereq Jan 7, 2023
ee8a902
Merge pull request #431 from ever-co/develop
evereq Jan 9, 2023
a01f638
Merge pull request #433 from ever-co/develop
evereq Jan 9, 2023
307fc02
Merge pull request #434 from ever-co/develop
evereq Jan 9, 2023
24de6d4
Merge pull request #436 from ever-co/develop
evereq Jan 9, 2023
9ae13c4
Merge pull request #437 from ever-co/develop
evereq Jan 9, 2023
4640ed8
Merge pull request #446 from ever-co/develop
evereq Jan 12, 2023
9953c28
Merge pull request #470 from ever-co/develop
evereq Jan 24, 2023
116942b
Merge pull request #476 from ever-co/develop
evereq Jan 28, 2023
50a0c34
Merge pull request #482 from ever-co/develop
evereq Feb 1, 2023
f5f528e
Merge pull request #490 from ever-co/develop
evereq Feb 6, 2023
9435b27
Merge pull request #492 from ever-co/develop
evereq Feb 6, 2023
0b52670
Merge pull request #494 from ever-co/develop
evereq Feb 6, 2023
92ec5bf
Merge pull request #497 from ever-co/develop
evereq Feb 6, 2023
711a31f
Merge pull request #501 from ever-co/develop
evereq Feb 9, 2023
baad5ea
Merge pull request #516 from ever-co/develop
evereq Feb 12, 2023
790d591
Merge pull request #518 from ever-co/develop
evereq Feb 12, 2023
acaee3a
Merge pull request #526 from ever-co/develop
evereq Feb 13, 2023
72aa867
Merge pull request #529 from ever-co/develop
evereq Feb 14, 2023
15bdd45
Merge pull request #531 from ever-co/develop
evereq Feb 14, 2023
b451ddd
Merge pull request #533 from ever-co/develop
evereq Feb 15, 2023
b126395
Merge pull request #536 from ever-co/develop
evereq Feb 15, 2023
4b33e13
Merge pull request #539 from ever-co/develop
evereq Feb 16, 2023
e2d7ac2
Merge pull request #541 from ever-co/develop
evereq Feb 16, 2023
0f8e60d
Merge pull request #544 from ever-co/develop
evereq Feb 17, 2023
0341472
Merge pull request #548 from ever-co/develop
evereq Feb 18, 2023
e74b0c9
Merge pull request #550 from ever-co/develop
evereq Feb 19, 2023
e975875
Merge pull request #552 from ever-co/develop
evereq Feb 19, 2023
1b17acf
Merge pull request #554 from ever-co/develop
evereq Feb 20, 2023
7ff457c
Merge pull request #556 from ever-co/develop
evereq Feb 20, 2023
81677fd
Merge pull request #558 from ever-co/develop
evereq Feb 21, 2023
8d44b7d
Merge pull request #569 from ever-co/develop
evereq Feb 22, 2023
6430ed8
Merge pull request #572 from ever-co/develop
evereq Feb 22, 2023
f85ba84
Merge pull request #574 from ever-co/develop
evereq Feb 23, 2023
3f8fd1c
Merge pull request #576 from ever-co/develop
evereq Feb 23, 2023
0557dde
Merge pull request #579 from ever-co/develop
evereq Feb 23, 2023
6faccb4
Merge pull request #581 from ever-co/develop
evereq Feb 23, 2023
49c35bc
Merge pull request #583 from ever-co/develop
evereq Feb 23, 2023
e738b0b
Merge pull request #589 from ever-co/develop
evereq Feb 24, 2023
c173993
Merge pull request #594 from ever-co/develop
evereq Feb 25, 2023
a075ec5
Merge pull request #599 from ever-co/develop
evereq Feb 28, 2023
cecf1ae
Merge pull request #603 from ever-co/develop
evereq Feb 28, 2023
a3fcbe4
Merge pull request #606 from ever-co/develop
evereq Mar 2, 2023
a6c25a1
Merge pull request #611 from ever-co/develop
evereq Mar 3, 2023
af3fc61
Merge pull request #615 from ever-co/develop
evereq Mar 3, 2023
719d862
Merge pull request #617 from ever-co/develop
evereq Mar 3, 2023
051f586
Merge pull request #618 from ever-co/develop
evereq Mar 3, 2023
5090cd0
Merge pull request #621 from ever-co/develop
evereq Mar 5, 2023
f5ee2ee
Merge pull request #624 from ever-co/develop
evereq Mar 6, 2023
47f06ee
Merge pull request #626 from ever-co/develop
evereq Mar 7, 2023
967248e
Merge pull request #630 from ever-co/develop
evereq Mar 7, 2023
1bedd96
Merge pull request #634 from ever-co/develop
evereq Mar 9, 2023
8ebca5b
Merge pull request #636 from ever-co/develop
evereq Mar 9, 2023
25a4cd2
Merge pull request #638 from ever-co/develop
evereq Mar 10, 2023
c0ed775
Merge pull request #640 from ever-co/develop
evereq Mar 10, 2023
a7ab431
Merge pull request #652 from ever-co/develop
evereq Mar 13, 2023
d7eb425
Merge pull request #657 from ever-co/develop
evereq Mar 15, 2023
fb3d1ff
Merge pull request #659 from ever-co/develop
evereq Mar 15, 2023
b394561
Merge pull request #661 from ever-co/develop
evereq Mar 15, 2023
ed1eb85
Merge pull request #664 from ever-co/develop
evereq Mar 16, 2023
3fc8595
Merge pull request #667 from ever-co/develop
evereq Mar 16, 2023
73f69c9
Merge pull request #672 from ever-co/develop
evereq Mar 17, 2023
07c6ed9
Merge pull request #676 from ever-co/develop
evereq Mar 18, 2023
417646b
Merge pull request #684 from ever-co/develop
evereq Mar 18, 2023
a9f23a0
Merge pull request #689 from ever-co/develop
evereq Mar 19, 2023
9027bdf
Merge pull request #691 from ever-co/develop
evereq Mar 19, 2023
d21dfb1
Merge pull request #692 from ever-co/develop
evereq Mar 19, 2023
c7f1950
Merge pull request #696 from ever-co/develop
evereq Mar 21, 2023
97dd97e
Merge pull request #698 from ever-co/develop
evereq Mar 22, 2023
f404734
Merge pull request #703 from ever-co/develop
evereq Mar 23, 2023
1f2600d
Merge pull request #707 from ever-co/develop
evereq Mar 24, 2023
4ef2202
Merge pull request #709 from ever-co/develop
evereq Mar 24, 2023
6f77772
Merge pull request #711 from ever-co/develop
evereq Mar 24, 2023
ecedb14
Merge pull request #713 from ever-co/develop
evereq Mar 24, 2023
86a8348
Merge pull request #715 from ever-co/develop
evereq Mar 25, 2023
6c95f92
Merge pull request #722 from ever-co/develop
evereq Mar 27, 2023
707aa52
Merge pull request #725 from ever-co/develop
evereq Mar 28, 2023
0256097
Merge pull request #728 from ever-co/develop
evereq Mar 28, 2023
4b0c136
Merge pull request #736 from ever-co/develop
evereq Mar 30, 2023
2f245d1
Merge pull request #742 from ever-co/develop
evereq Mar 31, 2023
582de3c
Merge pull request #749 from ever-co/develop
evereq Apr 2, 2023
0121b40
Merge pull request #751 from ever-co/develop
evereq Apr 2, 2023
ec3e116
Merge pull request #757 from ever-co/develop
evereq Apr 5, 2023
d91886b
Merge pull request #759 from ever-co/develop
evereq Apr 6, 2023
376ab0e
Merge pull request #761 from ever-co/develop
evereq Apr 6, 2023
552009f
Merge pull request #763 from ever-co/develop
evereq Apr 6, 2023
cdb5157
Merge pull request #768 from ever-co/develop
evereq Apr 10, 2023
6f21b06
Merge pull request #770 from ever-co/develop
evereq Apr 10, 2023
172e6d7
Merge pull request #772 from ever-co/develop
evereq Apr 10, 2023
aa7d11a
Merge pull request #779 from ever-co/develop
evereq Apr 12, 2023
8aabe06
Merge pull request #782 from ever-co/develop
evereq Apr 14, 2023
0e98069
Merge pull request #787 from ever-co/develop
evereq Apr 14, 2023
8e1ec1b
Merge pull request #789 from ever-co/develop
evereq Apr 15, 2023
c437375
Merge pull request #791 from ever-co/develop
evereq Apr 15, 2023
6e18779
Merge pull request #796 from ever-co/develop
evereq Apr 17, 2023
cdb12e7
Merge pull request #799 from ever-co/develop
evereq Apr 20, 2023
8acb6d5
Merge pull request #801 from ever-co/develop
evereq Apr 20, 2023
19e7a42
Merge pull request #806 from ever-co/develop
evereq Apr 24, 2023
1f951d5
Merge pull request #809 from ever-co/develop
evereq Apr 25, 2023
fcb6b15
Merge pull request #816 from ever-co/develop
evereq Apr 26, 2023
a3a8fbe
Merge pull request #818 from ever-co/develop
evereq Apr 27, 2023
295ac8f
Merge pull request #821 from ever-co/develop
evereq Apr 27, 2023
ead56ec
Merge pull request #827 from ever-co/develop
evereq Apr 28, 2023
f91c37d
Merge pull request #829 from ever-co/develop
evereq Apr 29, 2023
83d64dc
Merge pull request #832 from ever-co/develop
evereq Apr 30, 2023
1ade8bb
Merge pull request #836 from ever-co/develop
evereq May 2, 2023
dccb326
Merge pull request #839 from ever-co/develop
evereq May 4, 2023
6779c51
Merge pull request #842 from ever-co/develop
evereq May 8, 2023
a5f1f4d
Merge pull request #845 from ever-co/develop
evereq May 9, 2023
e973eb4
Merge pull request #851 from ever-co/develop
evereq May 12, 2023
d63aee2
Merge pull request #855 from ever-co/develop
evereq May 14, 2023
7be6b42
Merge pull request #857 from ever-co/develop
evereq May 15, 2023
58b31af
Merge pull request #860 from ever-co/develop
evereq May 15, 2023
a12c757
Merge pull request #865 from ever-co/develop
evereq May 16, 2023
a6b4dcf
Merge pull request #869 from ever-co/develop
evereq May 18, 2023
0cb8e34
Merge pull request #874 from ever-co/develop
evereq May 19, 2023
6d80531
Merge pull request #877 from ever-co/develop
evereq May 19, 2023
5d04e37
Merge pull request #895 from ever-co/develop
evereq May 22, 2023
1bc2eb9
Merge pull request #897 from ever-co/develop
evereq May 22, 2023
02b786e
Merge pull request #899 from ever-co/develop
evereq May 22, 2023
9a408d1
Merge pull request #917 from ever-co/develop
evereq May 24, 2023
e17eef9
Merge pull request #929 from ever-co/develop
evereq May 25, 2023
1caefe7
Merge pull request #941 from ever-co/develop
evereq Jun 10, 2023
7d9be39
Merge pull request #943 from ever-co/develop
evereq Jun 10, 2023
1a04188
Merge pull request #945 from ever-co/develop
evereq Jun 12, 2023
1e53855
Merge pull request #949 from ever-co/develop
evereq Jun 22, 2023
b3f0b00
Merge pull request #955 from ever-co/develop
evereq Jun 25, 2023
0935530
Merge pull request #969 from ever-co/develop
evereq Jun 27, 2023
c9579cb
Merge pull request #971 from ever-co/develop
evereq Jun 27, 2023
f4bd753
Merge pull request #979 from ever-co/develop
evereq Jul 1, 2023
bccac9a
Merge pull request #982 from ever-co/develop
evereq Jul 1, 2023
d735406
Merge pull request #984 from ever-co/develop
evereq Jul 2, 2023
8e22a0e
Merge pull request #989 from ever-co/develop
evereq Jul 5, 2023
3915392
Merge pull request #997 from ever-co/develop
evereq Jul 7, 2023
aaffbb2
Merge pull request #1000 from ever-co/develop
evereq Jul 8, 2023
994ed59
Merge pull request #1002 from ever-co/develop
evereq Jul 8, 2023
1e77f19
Merge pull request #1008 from ever-co/develop
evereq Jul 9, 2023
fbe04fa
Merge pull request #1016 from ever-co/develop
evereq Jul 12, 2023
d5976b3
Merge pull request #1018 from ever-co/develop
evereq Jul 12, 2023
de22782
Merge pull request #1023 from ever-co/develop
evereq Jul 13, 2023
265546d
Merge pull request #1025 from ever-co/develop
evereq Jul 14, 2023
243ffba
Merge pull request #1026 from ever-co/develop
evereq Jul 15, 2023
7c52a99
Merge pull request #1031 from ever-co/develop
evereq Jul 17, 2023
7c8740d
Merge pull request #1035 from ever-co/develop
evereq Jul 18, 2023
bf9a57c
Merge pull request #1037 from ever-co/develop
evereq Jul 19, 2023
fa9bc97
Merge pull request #1048 from ever-co/develop
evereq Jul 21, 2023
43e5134
Merge pull request #1054 from ever-co/develop
evereq Jul 23, 2023
e1e0df3
Merge pull request #1055 from ever-co/develop
evereq Jul 24, 2023
a68a9e4
Merge pull request #1070 from ever-co/develop
evereq Jul 25, 2023
faa8f9f
Merge pull request #1093 from ever-co/develop
evereq Jul 25, 2023
c7ab22a
Merge pull request #1096 from ever-co/develop
evereq Jul 26, 2023
5caeedd
Merge pull request #1101 from ever-co/develop
evereq Jul 26, 2023
6ed9743
Merge pull request #1114 from ever-co/develop
evereq Jul 28, 2023
f271adf
Merge pull request #1115 from ever-co/develop
evereq Jul 28, 2023
30d70dc
Merge pull request #1119 from ever-co/develop
evereq Jul 29, 2023
2d83f15
Merge pull request #1126 from ever-co/develop
evereq Jul 30, 2023
6a96274
Merge pull request #1136 from ever-co/develop
evereq Jul 31, 2023
661a017
Merge pull request #1139 from ever-co/develop
evereq Aug 1, 2023
d20d6d3
Merge pull request #1141 from ever-co/develop
evereq Aug 1, 2023
d066e20
Merge pull request #1145 from ever-co/develop
evereq Aug 2, 2023
0c3fc37
Merge pull request #1149 from ever-co/develop
evereq Aug 2, 2023
5b0b655
Merge pull request #1153 from ever-co/develop
evereq Aug 3, 2023
3860e93
Merge pull request #1155 from ever-co/develop
evereq Aug 3, 2023
a34a750
Merge pull request #1158 from ever-co/develop
evereq Aug 4, 2023
184a371
Merge pull request #1161 from ever-co/develop
evereq Aug 4, 2023
5325b52
Merge pull request #1187 from ever-co/develop
evereq Aug 6, 2023
87d865b
Merge pull request #1196 from ever-co/develop
evereq Aug 7, 2023
d69147e
Merge pull request #1200 from ever-co/develop
evereq Aug 8, 2023
7071f17
Merge pull request #1207 from ever-co/develop
evereq Aug 8, 2023
122225e
Merge pull request #1215 from ever-co/develop
evereq Aug 9, 2023
e010ed0
Merge pull request #1219 from ever-co/develop
evereq Aug 10, 2023
3632411
Merge pull request #1220 from ever-co/develop
evereq Aug 10, 2023
092bae3
Merge pull request #1224 from ever-co/develop
evereq Aug 10, 2023
f84e97f
Merge pull request #1229 from ever-co/develop
evereq Aug 11, 2023
47cbbdf
Merge pull request #1231 from ever-co/develop
evereq Aug 12, 2023
e41fc96
Merge pull request #1233 from ever-co/develop
evereq Aug 12, 2023
b96be1a
Merge pull request #1240 from ever-co/develop
evereq Aug 13, 2023
87ce427
Merge pull request #1242 from ever-co/develop
evereq Aug 14, 2023
3bebeec
Merge pull request #1256 from ever-co/develop
evereq Aug 15, 2023
69df61d
Merge pull request #1257 from ever-co/develop
evereq Aug 15, 2023
068f648
Merge pull request #1259 from ever-co/develop
evereq Aug 15, 2023
21c1370
Merge pull request #1264 from ever-co/develop
evereq Aug 15, 2023
0410cb3
Merge pull request #1269 from ever-co/develop
evereq Aug 16, 2023
40d0103
Merge pull request #1275 from ever-co/develop
evereq Aug 17, 2023
41066f6
Merge pull request #1285 from ever-co/develop
evereq Aug 22, 2023
1fda32c
Merge pull request #1287 from ever-co/develop
evereq Aug 23, 2023
656806b
Merge pull request #1289 from ever-co/develop
evereq Aug 23, 2023
669a603
Merge pull request #1296 from ever-co/develop
evereq Aug 25, 2023
857f5d2
Merge pull request #1299 from ever-co/develop
evereq Aug 26, 2023
eaf8daa
Merge pull request #1300 from ever-co/develop
evereq Aug 27, 2023
1ca91b4
Merge pull request #1322 from ever-co/develop
evereq Sep 1, 2023
1142b85
Merge pull request #1323 from ever-co/develop
evereq Sep 1, 2023
00030ad
Merge pull request #1327 from ever-co/develop
evereq Sep 2, 2023
e387d91
Merge pull request #1329 from ever-co/develop
evereq Sep 2, 2023
26d2658
Merge pull request #1332 from ever-co/develop
evereq Sep 3, 2023
b946969
Merge pull request #1335 from ever-co/develop
evereq Sep 6, 2023
b5a1138
Merge pull request #1343 from ever-co/develop
evereq Sep 7, 2023
390f381
Merge pull request #1347 from ever-co/develop
evereq Sep 9, 2023
1f5424e
Merge pull request #1357 from ever-co/develop
evereq Sep 12, 2023
a7f59e2
Merge pull request #1363 from ever-co/develop
evereq Sep 13, 2023
9fabcd8
Merge pull request #1378 from ever-co/develop
evereq Sep 15, 2023
8b07db6
Merge pull request #1380 from ever-co/develop
evereq Sep 15, 2023
d5bf3eb
Merge pull request #1384 from ever-co/develop
evereq Sep 16, 2023
2092fab
Merge pull request #1387 from ever-co/develop
evereq Sep 16, 2023
2b1cedd
Merge pull request #1399 from ever-co/develop
evereq Sep 19, 2023
0ec39ce
Merge pull request #1401 from ever-co/develop
evereq Sep 19, 2023
c69ba06
Merge pull request #1406 from ever-co/develop
evereq Sep 20, 2023
7b827fc
Merge pull request #1414 from ever-co/develop
evereq Sep 21, 2023
e08a52f
Merge pull request #1423 from ever-co/develop
evereq Sep 22, 2023
f22c6c1
Merge pull request #1428 from ever-co/develop
evereq Sep 22, 2023
38f7c7a
Merge pull request #1432 from ever-co/develop
evereq Sep 24, 2023
80b0090
Merge pull request #1440 from ever-co/develop
evereq Sep 26, 2023
b075acb
Merge pull request #1453 from ever-co/develop
evereq Sep 27, 2023
cc537c9
Merge pull request #1458 from ever-co/develop
evereq Sep 27, 2023
ed82094
Merge pull request #1460 from ever-co/develop
evereq Sep 28, 2023
64dd534
Merge pull request #1464 from ever-co/develop
evereq Sep 28, 2023
718b59d
Merge pull request #1467 from ever-co/develop
evereq Sep 29, 2023
a4717eb
Merge pull request #1479 from ever-co/develop
evereq Sep 29, 2023
28c6c2f
Merge pull request #1492 from ever-co/develop
evereq Oct 3, 2023
52445c6
Merge pull request #1503 from ever-co/develop
evereq Oct 4, 2023
38b91bf
Merge pull request #1507 from ever-co/develop
evereq Oct 5, 2023
16d67f3
Merge pull request #1511 from ever-co/develop
evereq Oct 6, 2023
781ee8e
Merge pull request #1516 from ever-co/develop
evereq Oct 7, 2023
c595b81
Merge pull request #1555 from ever-co/develop
evereq Oct 13, 2023
a397bea
Merge pull request #1561 from ever-co/develop
evereq Oct 14, 2023
347685b
Merge pull request #1573 from ever-co/develop
evereq Oct 16, 2023
263bc6f
Merge pull request #1585 from ever-co/develop
evereq Oct 18, 2023
fd8c4f6
Merge pull request #1594 from ever-co/develop
evereq Oct 19, 2023
3e397a4
Merge pull request #1609 from ever-co/develop
evereq Oct 20, 2023
50ec78c
Merge pull request #1616 from ever-co/develop
evereq Oct 21, 2023
e225b62
Merge pull request #1632 from ever-co/develop
evereq Oct 24, 2023
8dc323c
[feat] add table view for issues
YehualashetGit Oct 25, 2023
74e112c
Merge branch 'develop' of github.com:ever-co/ever-teams into feat/tab…
YehualashetGit Oct 25, 2023
8a888ec
fix ts lint error and refactor team member table view
YehualashetGit Oct 25, 2023
b2c45ee
* add footer to team table view
YehualashetGit Oct 26, 2023
0357b5b
* fix lint issue
YehualashetGit Oct 26, 2023
60d15f7
Merge branch 'develop' of github.com:ever-co/ever-teams into feat/tab…
YehualashetGit Oct 26, 2023
6d7b216
address review comment
YehualashetGit Oct 26, 2023
74ea0c2
address review comment
YehualashetGit Oct 26, 2023
9622285
fix ui related issue
YehualashetGit Oct 26, 2023
ca61b94
fix: Background color
badalkhatri0924 Oct 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions apps/web/app/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,9 @@ export const APPLICATION_LANGUAGES_CODE = [
'ru',
'es'
];

export enum KanbanView {
Copy link
Member

@evereq evereq Oct 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@YehualashetGit Maybe let's rename this to "IssuesView"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure I will rename that

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, I think values should be:
CARDS, TABLE, and BLOCKS, please adjust @YehualashetGit :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

CARD = 'card',
TABLE = 'table',
BOARD = 'board'
}
137 changes: 137 additions & 0 deletions apps/web/components/ui/data-table.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
import React from 'react';
import {
ColumnDef,
ColumnFiltersState,
SortingState,
VisibilityState,
flexRender,
getCoreRowModel,
getFacetedRowModel,
getFacetedUniqueValues,
getFilteredRowModel,
getPaginationRowModel,
getSortedRowModel,
useReactTable,
} from "@tanstack/react-table"

import {
Table,
TableHeader,
TableRow,
TableHead,
TableCell,
TableBody,
TableFooter,
} from './table';

interface DataTableProps<TData, TValue> {
columns: ColumnDef<TData, TValue>[]
data: TData[],
footerRows?: React.ReactNode[],
isError?: boolean;
noResultsMessage?: {
heading: string;
content: string;
}
}

function DataTable<TData, TValue>({
columns,
data,
footerRows,
}: DataTableProps<TData, TValue>) {

const [rowSelection, setRowSelection] = React.useState({})
const [columnVisibility, setColumnVisibility] =
React.useState<VisibilityState>({})
const [columnFilters, setColumnFilters] = React.useState<ColumnFiltersState>(
[]
)
const [sorting, setSorting] = React.useState<SortingState>([])

const table = useReactTable({
data,
columns,
state: {
sorting,
columnVisibility,
rowSelection,
columnFilters,
},
enableRowSelection: true,
onRowSelectionChange: setRowSelection,
onSortingChange: setSorting,
onColumnFiltersChange: setColumnFilters,
onColumnVisibilityChange: setColumnVisibility,
getCoreRowModel: getCoreRowModel(),
getFilteredRowModel: getFilteredRowModel(),
getPaginationRowModel: getPaginationRowModel(),
getSortedRowModel: getSortedRowModel(),
getFacetedRowModel: getFacetedRowModel(),
getFacetedUniqueValues: getFacetedUniqueValues(),
})

return (
<Table>
<TableHeader>
{table.getHeaderGroups().map((headerGroup) => (
<TableRow key={headerGroup.id}>
{headerGroup.headers.map((header) => {
return (
<TableHead key={header.id}>
{header.isPlaceholder
? null
: flexRender(
header.column.columnDef.header,
header.getContext()
)}
</TableHead>
)
})}
</TableRow>
))}
</TableHeader>
<TableBody className="divide-y divide-gray-200">
{table.getRowModel().rows?.length ? (
table.getRowModel().rows.map((row) => (
<TableRow
key={row.id}
data-state={row.getIsSelected() && "selected"}
className="mb-4 border-b border-gray-200"
>
{row.getVisibleCells().map((cell) => (
<TableCell key={cell.id}>
{flexRender(
cell.column.columnDef.cell,
cell.getContext()
)}
</TableCell>
))}
</TableRow>
))
) : (
<TableRow>
<TableCell
colSpan={columns.length}
className="h-24 text-center"
>
No results.
</TableCell>
</TableRow>
)}
</TableBody>
{
footerRows && footerRows?.length > 0 && (
<TableFooter className='bg-gray-50 dark:bg-gray-800'>
{footerRows.map((row, index) => (
<TableRow key={`footer-row-${index}}`}>{row}</TableRow>
))}
</TableFooter>
)
}

</Table>
);
}

export default DataTable;
114 changes: 114 additions & 0 deletions apps/web/components/ui/table.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
import * as React from "react"

import { cn } from "lib/utils"

const Table = React.forwardRef<
HTMLTableElement,
React.HTMLAttributes<HTMLTableElement>
>(({ className, ...props }, ref) => (
<div className="relative w-full overflow-auto">
<table
ref={ref}
className={cn("w-full caption-bottom text-sm", className)}
{...props}
/>
</div>
))
Table.displayName = "Table"

const TableHeader = React.forwardRef<
HTMLTableSectionElement,
React.HTMLAttributes<HTMLTableSectionElement>
>(({ className, ...props }, ref) => (
<thead ref={ref} className={cn("[&_tr]:border-b", className)} {...props} />
))
TableHeader.displayName = "TableHeader"

const TableBody = React.forwardRef<
HTMLTableSectionElement,
React.HTMLAttributes<HTMLTableSectionElement>
>(({ className, ...props }, ref) => (
<tbody
ref={ref}
className={cn("[&_tr:last-child]:border-0", className)}
{...props}
/>
))
TableBody.displayName = "TableBody"

const TableFooter = React.forwardRef<
HTMLTableSectionElement,
React.HTMLAttributes<HTMLTableSectionElement>
>(({ className, ...props }, ref) => (
<tfoot
ref={ref}
className={cn("bg-primary font-medium text-primary-foreground", className)}
{...props}
/>
))
TableFooter.displayName = "TableFooter"

const TableRow = React.forwardRef<
HTMLTableRowElement,
React.HTMLAttributes<HTMLTableRowElement>
>(({ className, ...props }, ref) => (
<tr
ref={ref}
className={cn(
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
className
)}
{...props}
/>
))
TableRow.displayName = "TableRow"

const TableHead = React.forwardRef<
HTMLTableCellElement,
React.ThHTMLAttributes<HTMLTableCellElement>
>(({ className, ...props }, ref) => (
<th
ref={ref}
className={cn(
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
className
)}
{...props}
/>
))
TableHead.displayName = "TableHead"

const TableCell = React.forwardRef<
HTMLTableCellElement,
React.TdHTMLAttributes<HTMLTableCellElement>
>(({ className, ...props }, ref) => (
<td
ref={ref}
className={cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className)}
{...props}
/>
))
TableCell.displayName = "TableCell"

const TableCaption = React.forwardRef<
HTMLTableCaptionElement,
React.HTMLAttributes<HTMLTableCaptionElement>
>(({ className, ...props }, ref) => (
<caption
ref={ref}
className={cn("mt-4 text-sm text-muted-foreground", className)}
{...props}
/>
))
TableCaption.displayName = "TableCaption"

export {
Table,
TableHeader,
TableBody,
TableFooter,
TableHead,
TableRow,
TableCell,
TableCaption,
}
106 changes: 106 additions & 0 deletions apps/web/lib/features/team-member-cell.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
import { useTeamMemberCard, useTMCardTaskEdit, useCollaborative } from "@app/hooks";
import { OT_Member } from "@app/interfaces";
import { clsxm } from "@app/utils";
import { InputField } from "lib/components";
import { TaskTimes } from "./task/task-times";
import { TaskEstimateInfo } from "./team/user-team-card/task-estimate";
import { TaskInfo } from "./team/user-team-card/task-info";
import { UserInfo } from "./team/user-team-card/user-info";
import { UserTeamCardMenu } from "./team/user-team-card/user-team-card-menu";
import React from "react";
import get from "lodash/get";


export function TaskCell({ row }: { row: any }) {
const member = row.original as OT_Member;
const memberInfo = useTeamMemberCard(member);
const taskEdition = useTMCardTaskEdit(memberInfo?.memberTask);
const publicTeam = false;

return (
<TaskInfo
edition={taskEdition}
memberInfo={memberInfo}
className="2xl:w-80 3xl:w-[32rem] w-1/5 lg:px-4 px-2"
publicTeam={publicTeam}
/>
);
}

export function UserInfoCell({ cell }: { cell: any}) {
const row = get(cell, 'row', {});
const member = row.original as OT_Member;
const publicTeam = get(cell, 'column.columnDef.meta.publicTeam', false);
const memberInfo = useTeamMemberCard(member);

return (
<UserInfo
memberInfo={memberInfo}
className="2xl:w-[20.625rem] w-1/4"
publicTeam={publicTeam}
/>
);
}

export function WorkedOnTaskCell({ row }: { row: any }) {
const member = row.original as OT_Member;
const memberInfo = useTeamMemberCard(member);

return (
<TaskTimes
activeAuthTask={true}
memberInfo={memberInfo}
task={memberInfo?.memberTask}
isAuthUser={memberInfo?.isAuthUser}
className="2xl:w-48 3xl:w-[12rem] w-1/5 lg:px-4 px-2 flex flex-col gap-y-[1.125rem] justify-center"
/>
);
}

export function TaskEstimateInfoCell({ row }: { row: any }) {
const member = row.original as OT_Member;
const memberInfo = useTeamMemberCard(member);
const taskEdition = useTMCardTaskEdit(memberInfo?.memberTask);

return (
<TaskEstimateInfo
memberInfo={memberInfo}
edition={taskEdition}
activeAuthTask={true}
className="lg:px-3 2xl:w-52 3xl:w-64 w-1/5"
/>
);
}

export function ActionMenuCell ({ cell }: { cell: any}) {
const row = get(cell, 'row', {});
const member = row.original as OT_Member;
const active = get(cell, 'column.columnDef.meta.active', false);
const memberInfo = useTeamMemberCard(member);

const { collaborativeSelect, user_selected, onUserSelect } = useCollaborative(
memberInfo.memberUser
);
const taskEdition = useTMCardTaskEdit(memberInfo.memberTask);

return (
<>
{(!collaborativeSelect || active) && (
<UserTeamCardMenu memberInfo={memberInfo} edition={taskEdition} />
)}

{collaborativeSelect && !active && (
<InputField
type="checkbox"
checked={user_selected()}
className={clsxm(
'border-none w-4 h-4 mr-1 accent-primary-light',
'border-2 border-primary-light'
)}
noWrapper={true}
onChange={onUserSelect}
/>
)}
</>
);
}
Loading
Loading