Skip to content

Commit 646fcc1

Browse files
committed
fix-empty-tables
1 parent 64af47e commit 646fcc1

File tree

3 files changed

+111
-38
lines changed

3 files changed

+111
-38
lines changed

src/assets/oops.svg

+9
Loading

src/components/Docs/users.tsx

+71-36
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,76 @@
1-
import React from 'react'
2-
import DocsMain from './DocsMain'
1+
import React from 'react';
2+
import DocsMain from './DocsMain';
33

4-
const UsersDocs = () => {
5-
return (
6-
<div>
7-
<DocsMain
8-
content={
9-
<div className="flex items-start box-border">
10-
<div className="w-full">
11-
<div className=" w-full sm:px-10 mb-10 text-gray-600 dark:text-slate-300 text-lg ml-0 pt-4">
12-
<h2 className="mb-4 mt-4 text-4xl font-[800] text-primary">
13-
Getting started
14-
</h2>
15-
<div className="mt-5 w-[100%] sm:w-full mb-4">
16-
Devpulse is a semi-open platform i.e. using it, requires a certain level of approval from the owners/managers. If you browse the homepage, you might wonder why there is no signup button, this is because to sign up you need an invitation.
17-
<h3 className="m-2 mb-4 text-2xl font-bold">
18-
Terminology to be familiar with:</h3>
19-
<ul className=" list-disc ml-12">
4+
function UsersDocs() {
5+
return (
6+
<div>
7+
<DocsMain
8+
content={
9+
<div className="flex items-start box-border">
10+
<div className="w-full">
11+
<div className=" w-full sm:px-10 mb-10 text-gray-600 dark:text-slate-300 text-lg ml-0 pt-4">
12+
<h2 className="mb-4 mt-4 text-4xl font-[800] text-primary">
13+
Getting started
14+
</h2>
15+
<div className="mt-5 w-[100%] sm:w-full mb-4">
16+
Devpulse is a semi-open platform i.e. using it, requires a
17+
certain level of approval from the owners/managers. If you
18+
browse the homepage, you might wonder why there is no signup
19+
button, this is because to sign up you need an invitation.
20+
<h3 className="m-2 mb-4 text-2xl font-bold">
21+
Terminology to be familiar with:
22+
</h3>
23+
<ul className=" list-disc ml-12">
24+
<li>
25+
<b>Organizations</b>: each Devpulse user belongs to an
26+
organization. The default organization is Andela. The
27+
admin of a given organisation has the highest privilege;
28+
they are the one in charge of managing the rest of the
29+
users and different administrative tasks
30+
</li>
2031

21-
<li><b>Organizations</b>: each Devpulse user belongs to an organization. The default organization is Andela. The admin of a given organisation has the highest privilege; they are the one in charge of managing the rest of the users and different administrative tasks</li>
22-
23-
<li><b>Programs</b>: each organization should have a program that it is running.</li>
24-
<li><b>Managers:</b> each program should have managers with different access levels. (coordinators, technical team leads, managers)</li>
25-
<li><b>Trainees:</b> an ordinary user of the app will fall under the role of a trainee. As a trainee, you belong to a team, which in turn belongs to a cohort, which in turn belongs to a program</li>
26-
</ul>
27-
28-
<h3 className="m-2 mb-4 text-2xl font-bold">Signing up as a user</h3>
29-
<p>To sign up, <b><u>your org admin must send you an invite</u></b>. The invitation email will contain the details of how to sign up</p>
30-
<h3 className="m-2 mb-4 text-2xl font-bold">Signing in as a user</h3>
31-
<p>To sign in, go to the signin page, provide the correct name of your organization, on the next screen enter username and password.</p>
32-
</div>
33-
</div>
32+
<li>
33+
<b>Programs</b>: each organization should have a program
34+
that it is running.
35+
</li>
36+
<li>
37+
<b>Managers:</b> each program should have managers with
38+
different access levels. (coordinators, technical team
39+
leads, managers)
40+
</li>
41+
<li>
42+
<b>Trainees:</b> an ordinary user of the app will fall
43+
under the role of a trainee. As a trainee, you belong to a
44+
team, which in turn belongs to a cohort, which in turn
45+
belongs to a program
46+
</li>
47+
</ul>
48+
<h3 className="m-2 mb-4 text-2xl font-bold">
49+
Signing up as a user
50+
</h3>
51+
<p>
52+
To sign up,{' '}
53+
<b>
54+
<u>your org admin must send you an invite</u>
55+
</b>
56+
. The invitation email will contain the details of how to
57+
sign up
58+
</p>
59+
<h3 className="m-2 mb-4 text-2xl font-bold">
60+
Signing in as a user
61+
</h3>
62+
<p>
63+
To sign in, go to the signin page, provide the correct name
64+
of your organization, on the next screen enter username and
65+
password.
66+
</p>
3467
</div>
68+
</div>
3569
</div>
36-
}
37-
/>
38-
</div>
39-
)
70+
</div>
71+
}
72+
/>
73+
</div>
74+
);
4075
}
41-
export default UsersDocs
76+
export default UsersDocs;

src/components/TraineePerformance.tsx

+31-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import Button from './Buttons';
99
import RemarksModal from '../pages/ratings/CoordinatorRemarks';
1010
import { UserContext } from '../hook/useAuth';
1111
import { rowsType } from '../pages/ratings/frame';
12+
import oop from '../assets/oops.svg';
1213

1314
export const GET_RATINGS_DATA = gql`
1415
query FetchRatingsTrainee {
@@ -60,7 +61,6 @@ export const GET_RATINGS_DATA = gql`
6061
}
6162
`;
6263

63-
6464
function TraineePerfomance() {
6565
const [usedata, setUserdata] = React.useState([]);
6666
const { data } = useQuery(GET_RATINGS_DATA, {});
@@ -152,6 +152,33 @@ function TraineePerfomance() {
152152
setToggle(false);
153153
};
154154

155+
if (ratings?.length === 0) {
156+
return (
157+
<>
158+
<div className="bg-light-bg dark:bg-dark-frame-bg pb-10">
159+
<div className="">
160+
<div className="bg-white dark:bg-dark-bg shadow-lg py-8 px-5 rounded-md w-full mdl:w-[70%] mdl:m-auto flex">
161+
<div className="flex ml-2 items-center justify-between">
162+
<div className="">
163+
<img src={oop} className="w-[8rem] h-[8rem]" alt="images" />
164+
</div>
165+
</div>
166+
167+
<div className=" flex-1">
168+
<div className="flex w-full h-full items-center justify-between">
169+
<p className="text-gray-800 dark:text-white font-semibold text-[24px] w-[90%] m-auto">
170+
Performance updates are on the way! Stay tuned for the
171+
latest insights!
172+
</p>
173+
</div>
174+
</div>
175+
</div>
176+
</div>
177+
</div>
178+
</>
179+
);
180+
}
181+
155182
return (
156183
<>
157184
<RemarksModal showRemarks={toggle} closeModal={closeFeeds} rows={row} />
@@ -234,7 +261,9 @@ function TraineePerfomance() {
234261
</td>
235262
<td className="px-5 py-5 border-b border-gray-200 bg-white dark:bg-dark-bg text-sm">
236263
<p className="text-gray-900 dark:text-white whitespace-no-wrap text-center">
237-
{item.average %1 === 0? item.average: Number(item.average).toFixed(2)}
264+
{item.average % 1 === 0
265+
? item.average
266+
: Number(item.average).toFixed(2)}
238267
</p>
239268
</td>
240269

0 commit comments

Comments
 (0)