Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 1f743a1

Browse files
committed
members page prototype v1
1 parent e221d29 commit 1f743a1

File tree

32 files changed

+1015
-23
lines changed

32 files changed

+1015
-23
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ typings/
7171
# dotenv environment variables file
7272
.env
7373
.env.test
74+
.env.sh
7475

7576
# parcel-bundler cache (https://parceljs.org/)
7677
.cache

config/dev.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ module.exports = {
1313
V5: "https://api.topcoder-dev.com/v5",
1414
V3: "https://api.topcoder-dev.com/v3",
1515
},
16+
17+
COMMUNITY_ADMIN_URL: "https://tc-micro-community-admin.herokuapp.com",
1618
};

config/local.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
COMMUNITY_ADMIN_URL: "",
3+
};

package-lock.json

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"eslint-config-prettier": "^6.7.0",
3535
"eslint-config-react-important-stuff": "^2.0.0",
3636
"eslint-plugin-prettier": "^3.1.1",
37+
"file-loader": "^6.2.0",
3738
"identity-obj-proxy": "^3.0.0",
3839
"jest": "^25.2.7",
3940
"jest-cli": "^25.2.7",
@@ -58,7 +59,9 @@
5859
"@reach/router": "^1.3.4",
5960
"@toast-ui/editor": "^2.5.1",
6061
"axios": "^0.21.0",
62+
"body-parser": "^1.19.0",
6163
"classnames": "^2.2.6",
64+
"cors": "^2.8.5",
6265
"express": "^4.17.1",
6366
"final-form": "^4.20.1",
6467
"immutability-helper": "^3.1.1",
@@ -78,6 +81,7 @@
7881
"react-redux-toastr": "^7.6.5",
7982
"react-responsive-modal": "^6.0.1",
8083
"react-select": "^4.0.2",
84+
"react-tabs": "^3.2.1",
8185
"react-use": "^15.3.4",
8286
"redux": "^4.0.5",
8387
"redux-logger": "^3.0.6",

server.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
/* global process */
2-
2+
/**
3+
* Community Admin backend server
4+
*/
35
const express = require("express");
6+
// const betaTesters = require("./src/api/routes/betaTesters");
47

58
const app = express();
69

10+
// static site serve
711
app.use(
812
"/community-admin-app",
913
express.static("./dist", {
@@ -18,6 +22,13 @@ app.use(
1822
})
1923
);
2024

25+
// plugins
26+
// app.use(bodyParser.json());
27+
28+
// API routes
29+
// app.use("/api/testers", betaTesters);
30+
31+
// ping route
2132
app.get("/", function (req, res) {
2233
res.send("alive");
2334
});

src/api/mock/betaMembers.json

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
[
2+
{
3+
"email": "[email protected]",
4+
"handle": "TMALBONPH",
5+
"category": "Veteran Developer",
6+
"participated": 1,
7+
"rating": 0.5,
8+
"invited": 3,
9+
"accepted": 1,
10+
"denied": 1,
11+
"no_response": 1,
12+
"notes": [
13+
"Newer note msg...",
14+
"Lorem Ipsum is simply dummy text of the printing and typesetting industry.\n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."
15+
]
16+
},
17+
{
18+
"email": "[email protected]",
19+
"handle": "Ansary",
20+
"category": "Veteran Developer",
21+
"participated": 0,
22+
"rating": 0.5,
23+
"invited": 1,
24+
"accepted": 1,
25+
"denied": 0,
26+
"no_response": 0,
27+
"notes": []
28+
},
29+
{
30+
"email": "[email protected]",
31+
"handle": "joni7sunny",
32+
"category": "Veteran Design",
33+
"participated": 0,
34+
"rating": 0.5,
35+
"invited": 1,
36+
"accepted": 1,
37+
"denied": 0,
38+
"no_response": 0,
39+
"notes": []
40+
},
41+
{
42+
"email": "[email protected]",
43+
"handle": "kreasindo",
44+
"category": "Veteran Design",
45+
"participated": 0,
46+
"rating": 0.5,
47+
"invited": 1,
48+
"accepted": 1,
49+
"denied": 0,
50+
"no_response": 0,
51+
"notes": []
52+
},
53+
{
54+
"email": "[email protected]",
55+
"handle": "VanitaW",
56+
"category": "Veteran QA",
57+
"participated": 0,
58+
"rating": 0.5,
59+
"invited": 1,
60+
"accepted": 1,
61+
"denied": 0,
62+
"no_response": 0,
63+
"notes": []
64+
},
65+
{
66+
"email": "[email protected]",
67+
"handle": "codejam",
68+
"category": "Veteran QA",
69+
"participated": 0,
70+
"rating": 3,
71+
"invited": 1,
72+
"accepted": 0,
73+
"denied": 0,
74+
"no_response": 0,
75+
"notes": []
76+
},
77+
{
78+
"email": "[email protected]",
79+
"handle": "dimkadimon",
80+
"category": "Veteran Marathon",
81+
"participated": 0,
82+
"rating": 2.5,
83+
"invited": 1,
84+
"accepted": 1,
85+
"denied": 0,
86+
"no_response": 0,
87+
"notes": []
88+
},
89+
{
90+
"email": "[email protected]",
91+
"handle": "cagdas001",
92+
"category": "Veteran Marathon",
93+
"participated": 0,
94+
"rating": 0.5,
95+
"invited": 1,
96+
"accepted": 1,
97+
"denied": 0,
98+
"no_response": 0,
99+
"notes": []
100+
},
101+
{
102+
"email": "[email protected]",
103+
"handle": "hotpepsi",
104+
"category": "Veteran Competitive Programming",
105+
"participated": 0,
106+
"rating": 0.5,
107+
"invited": 1,
108+
"accepted": 1,
109+
"denied": 0,
110+
"no_response": 0,
111+
"notes": []
112+
},
113+
{
114+
"email": "[email protected]",
115+
"handle": "pullasunil",
116+
"category": "Veteran Competitive Programming",
117+
"participated": 0,
118+
"rating": 0.5,
119+
"invited": 1,
120+
"accepted": 1,
121+
"denied": 0,
122+
"no_response": 0,
123+
"notes": []
124+
},
125+
{
126+
"email": "[email protected]",
127+
"handle": "Rokit12",
128+
"category": "Rookie Developer",
129+
"participated": 0,
130+
"rating": 0.5,
131+
"invited": 1,
132+
"accepted": 1,
133+
"denied": 0,
134+
"no_response": 0,
135+
"notes": []
136+
},
137+
{
138+
"email": "[email protected]",
139+
"handle": "hentrymartin",
140+
"category": "Rookie Developer",
141+
"participated": 0,
142+
"rating": 5,
143+
"invited": 1,
144+
"accepted": 1,
145+
"denied": 0,
146+
"no_response": 0,
147+
"notes": []
148+
},
149+
{
150+
"email": "[email protected]",
151+
"handle": "trivia79",
152+
"category": "Rookie Design",
153+
"participated": 0,
154+
"rating": 5,
155+
"invited": 1,
156+
"accepted": 1,
157+
"denied": 0,
158+
"no_response": 0,
159+
"notes": []
160+
},
161+
{
162+
"email": "[email protected]",
163+
"handle": "yoginogi",
164+
"category": "Rookie Design",
165+
"participated": 0,
166+
"rating": 5,
167+
"invited": 1,
168+
"accepted": 1,
169+
"denied": 0,
170+
"no_response": 0,
171+
"notes": []
172+
}
173+
]

src/api/routes/betaTesters.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* The routes related to beta testers integration
3+
*/
4+
5+
import express from "express";
6+
import { getMembers } from "../services/betaTesters";
7+
8+
const cors = require("cors");
9+
10+
const routes = express.Router();
11+
12+
// Enables CORS on those routes according config above
13+
// ToDo configure CORS for set of our trusted domains
14+
routes.use(cors());
15+
routes.options("*", cors());
16+
17+
routes.get("/members", (req, res) =>
18+
getMembers(req, res).then(res.send.bind(res))
19+
);
20+
21+
export default routes;

src/api/services/betaTesters.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* Service to handle beta testers ops
3+
*/
4+
import betaTesters from "../mock/betaMembers.json";
5+
6+
/**
7+
* Get members of Beta Testers programm
8+
* @param {Object} req The request
9+
* @param {Object} res The response
10+
* @returns {Promise}
11+
*/
12+
export async function getMembers(req, res) {
13+
return betaTesters;
14+
}
Lines changed: 16 additions & 0 deletions
Loading

src/assets/images/icon-cross.svg

Lines changed: 16 additions & 0 deletions
Loading

src/assets/images/icon-star-empty.svg

Lines changed: 16 additions & 0 deletions
Loading

src/assets/images/icon-star-full.svg

Lines changed: 16 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)