Skip to content

Commit 2c6760e

Browse files
[RPOD Release] Gigs Detail and Apply Integration (#68)
* Excluding Featured Jobs in Normal Jobs section (#25) * excluding special in normaljobs * ci:deploying speicaljobs filter * ci:deploying false special * exclude featured jobs for normal section * restore ci * [Ready for Release] Gigs listing - Special Job section supports filters (#27) * excluding special in normaljobs * ci:deploying speicaljobs filter * client side validation * client side filter special * resolve location filter * client-filter * maintain pagination * [Ready] Dispaly no gigs data when we filtered out all Gigs (#28) * ci:dispaly no gigs * reset ci * [Ready Release] Gigs listing RCRM status integration (#30) * proxy api update * integrate frontend ready * ci:deploying-rcrm-integration * restore ci * Integrate heap.io (#34) * heap-io * revert ci * [Dev Merge 1] Gigs apply integration (#65) * api update done * ci:deploying * Job API update * API Update * deploy gig apply API * fix: job API require externalId param * fix: add hoursPerWeek in the job info * output from challenge: 30215305 * deploying ff output * output from challenge:30217172 * fix: ui * fix: apply button enable by default * fix: issue#47 * fix:skill default value * fix: issue48 * fix: prod url * fix: topcoder-profiel * fix: skills focus * fix: navigate gigs * fix: refine * fix: refine2 * fix:city-country empty value * fix: hanlde profile error * fix: error message * fix: default na * fix: referral validation * fix:country placeholder * fix: get job * avoid multiple api requests * fix:avoid cache gigdetail * fix: mygigs duplicate data * fix: profile url * fix: popup * fix: gig detail page * fix: referral feature * fix: reset * fix: referral apply fix * referral cookie * fix: add loading * optimize:build local applied flag * fix:colon * fix:split id * refine * refine:local cache * reset ci * [Dev Merge 2] Gigs apply integration (#67) * reset ci
1 parent ed05396 commit 2c6760e

File tree

145 files changed

+7355
-203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+7355
-203
lines changed

babel.config.js

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,40 @@
1+
const { extendDefaultPlugins } = require("svgo");
2+
13
let cssLocalIdent;
2-
if (process.env.APPMODE === 'production') {
3-
cssLocalIdent = '[hash:base64:6]';
4+
if (process.env.APPMODE === "production") {
5+
cssLocalIdent = "[hash:base64:6]";
46
} else {
5-
cssLocalIdent = 'gigs_[path][name]___[local]___[hash:base64:6]';
7+
cssLocalIdent = "gigs_[path][name]___[local]___[hash:base64:6]";
68
}
79

810
const config = {
911
presets: [
10-
['@babel/preset-env', { targets: { 'browsers': ['> 1%', 'not dead'] } }],
11-
'@babel/preset-react'
12+
["@babel/preset-env", { targets: { browsers: ["> 1%", "not dead"] } }],
13+
"@babel/preset-react",
1214
],
1315
plugins: [
14-
['module-resolver', {
15-
extensions: ['.js', '.jsx'],
16-
root: [
17-
'./src',
18-
],
19-
}],
2016
[
21-
'inline-react-svg',
17+
"module-resolver",
2218
{
23-
ignorePattern: '[/\/]assets[/\/]images'
24-
}
19+
extensions: [".js", ".jsx"],
20+
root: ["./src"],
21+
},
22+
],
23+
[
24+
"inline-react-svg",
25+
{
26+
ignorePattern: "[/\\\\]assets[/\\\\]images",
27+
svgo: {
28+
plugins: extendDefaultPlugins([
29+
{
30+
name: "cleanupIDs",
31+
params: {
32+
minify: false,
33+
},
34+
},
35+
]),
36+
},
37+
},
2538
],
2639
[
2740
"@babel/plugin-transform-runtime",
@@ -30,15 +43,18 @@ const config = {
3043
regenerator: false,
3144
},
3245
],
33-
['react-css-modules', {
34-
filetypes: {
35-
'.scss': {
36-
syntax: 'postcss-scss',
46+
[
47+
"react-css-modules",
48+
{
49+
filetypes: {
50+
".scss": {
51+
syntax: "postcss-scss",
52+
},
3753
},
54+
generateScopedName: cssLocalIdent,
3855
},
39-
generateScopedName: cssLocalIdent
40-
}],
41-
]
56+
],
57+
],
4258
};
4359

4460
module.exports = config;

config/default.js

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,46 @@ module.exports = {
1111
URL: {
1212
AUTH: process.env.URL_AUTH || "https://accounts-auth0.topcoder-dev.com",
1313
BASE: process.env.URL_BASE || "https://www.topcoder-dev.com",
14-
COMMUNITY_APP: process.env.URL_COMMUNITY_APP || "https://community-app.topcoder-dev.com",
15-
PLATFORM_WEBSITE_URL: process.env.URL_PLATFORM_WEBSITE_URL || "https://platform.topcoder-dev.com",
14+
COMMUNITY_APP:
15+
process.env.URL_COMMUNITY_APP || "https://community-app.topcoder-dev.com",
16+
DISCUSSIONS:
17+
process.env.URL_DISCUSSIONS || "https://discussions.topcoder.com",
18+
PLATFORM_WEBSITE_URL:
19+
process.env.URL_PLATFORM_WEBSITE_URL ||
20+
"https://platform.topcoder-dev.com",
1621
},
22+
PROXY_API: process.env.PROXY_API || "https://platform.topcoder-dev.com",
1723
RECRUIT_API: process.env.RECRUIT_API || "https://www.topcoder-dev.com",
1824
// the server api base path
1925
API_BASE_PATH: process.env.API_BASE_PATH || "/gigs-app/api/my-gigs",
2026
// the log level, default is 'debug'
2127
LOG_LEVEL: process.env.LOG_LEVEL || "error",
2228
// The authorization secret used during token verification.
23-
AUTH_SECRET:
24-
process.env.AUTH_SECRET,
29+
AUTH_SECRET: process.env.AUTH_SECRET,
2530
// The valid issuer of tokens, a json array contains valid issuer.
26-
VALID_ISSUERS:
27-
process.env.VALID_ISSUERS,
31+
VALID_ISSUERS: process.env.VALID_ISSUERS,
2832
// Auth0 URL, used to get TC M2M token
29-
AUTH0_URL:
30-
process.env.AUTH0_URL,
33+
AUTH0_URL: process.env.AUTH0_URL,
3134
// Auth0 audience, used to get TC M2M token
3235
AUTH0_AUDIENCE: process.env.AUTH0_AUDIENCE,
3336
// Auth0 client id, used to get TC M2M token
34-
AUTH0_CLIENT_ID:
35-
process.env.AUTH0_CLIENT_ID,
37+
AUTH0_CLIENT_ID: process.env.AUTH0_CLIENT_ID,
3638
// Auth0 client secret, used to get TC M2M token
37-
AUTH0_CLIENT_SECRET:
38-
process.env.AUTH0_CLIENT_SECRET,
39+
AUTH0_CLIENT_SECRET: process.env.AUTH0_CLIENT_SECRET,
3940
// Proxy Auth0 URL, used to get TC M2M token
4041
AUTH0_PROXY_SERVER_URL: process.env.AUTH0_PROXY_SERVER_URL,
42+
CHALLENGE_LIST_PATH:
43+
process.env.CHALLENGE_LIST_PATH || "/earn/find/challenges",
44+
GIG_LIST_PATH: process.env.GIG_LIST_PATH || "/earn/gigs",
45+
GROWSURF_COOKIE: "_tc_gigs_ref",
46+
GROWSURF_COOKIE_SETTINGS: {
47+
secure: true,
48+
domain: "",
49+
expires: 30, // days
50+
},
51+
APPLIED_GIGS: "_applied_gigs",
4152
m2m: {
42-
M2M_AUDIT_USER_ID:
43-
process.env.M2M_AUDIT_USER_ID ,
53+
M2M_AUDIT_USER_ID: process.env.M2M_AUDIT_USER_ID,
4454
M2M_AUDIT_HANDLE: process.env.M2M_AUDIT_HANDLE,
4555
},
4656
MOCK_API_PORT: process.env.MOCK_API_PORT || 4000,

config/prod.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ module.exports = {
77
AUTH: "https://accounts-auth0.topcoder.com",
88
BASE: "https://www.topcoder.com",
99
COMMUNITY_APP: "https://community-app.topcoder.com",
10+
DISCUSSIONS: "https://discussions.topcoder.com",
1011
PLATFORM_WEBSITE_URL: "https://platform.topcoder.com",
1112
},
1213
RECRUIT_API: "https://www.topcoder.com",
14+
PROXY_API: "https://platform.topcoder.com",
1315
};

package-lock.json

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

package.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
{
22
"name": "@topcoder/micro-frontends-gigs-app",
33
"scripts": {
4-
"start": "node server.js",
5-
"dev-server": "nodemon server.js",
6-
"dev": "cross-env APPENV=dev webpack-dev-server",
7-
"dev-https": "cross-env APPENV=dev webpack-dev-server --https",
8-
"local": "cross-env APPENV=dev webpack-dev-server",
9-
"prod": "cross-env APPENV=prod webpack-dev-server",
4+
"start": "node --max-http-header-size 16384 server.js",
5+
"dev-server": "nodemon --max-http-header-size 16384 server.js",
6+
"dev": "cross-env APPENV=dev NODE_OPTIONS='--max-http-header-size=16384' webpack-dev-server",
7+
"dev-https": "cross-env APPENV=dev NODE_OPTIONS='--max-http-header-size=16384' webpack-dev-server --https",
8+
"prod": "cross-env APPENV=prod NODE_OPTIONS='--max-http-header-size=16384' webpack-dev-server",
109
"build": "cross-env APPENV=${APPENV:-dev} APPMODE=${APPMODE:-development} webpack --mode=${APPMODE:-development}",
1110
"analyze": "cross-env APPMODE=production webpack --mode=production --env.analyze=true",
1211
"lint": "eslint src --ext js,jsx --fix",
@@ -66,6 +65,7 @@
6665
"@babel/runtime": "^7.13.10",
6766
"@reach/router": "^1.3.4",
6867
"autoprefixer": "^8.6.5",
68+
"browser-cookies": "^1.2.0",
6969
"classnames": "^2.3.1",
7070
"cors": "^2.8.5",
7171
"country-calling-code": "0.0.3",
@@ -85,8 +85,10 @@
8585
"react-date-range": "^1.1.3",
8686
"react-dom": "^16.12.0",
8787
"react-dropzone": "^11.3.2",
88+
"react-html-parser": "^2.0.2",
8889
"react-loading": "^2.0.3",
8990
"react-redux": "^7.2.3",
91+
"react-responsive": "^9.0.0-beta.4",
9092
"react-responsive-modal": "^6.1.0",
9193
"react-select": "^1.3.0",
9294
"react-use": "^15.3.4",

src/App.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* Main App component
33
*/
44
import React from "react";
5+
import GigApplyPage from "./containers/GigApplyPage";
6+
import GigDetailsPage from "./containers/GigDetailsPage";
57
import GigsPage from "./containers/GigsPage";
68
import MyGigsPage from "./containers/MyGigsPage";
79

@@ -12,9 +14,11 @@ import "react-responsive-modal/styles.css";
1214

1315
import "./styles/main.scss";
1416

15-
const App = ({ view }) => {
17+
const App = ({ externalId, view }) => {
1618
return (
1719
<div className="layout-wrapper">
20+
{view === "gig-apply" && <GigApplyPage externalId={externalId} />}
21+
{view === "gig-details" && <GigDetailsPage externalId={externalId} />}
1822
{view === "gigs" && <GigsPage />}
1923
{view === "my-gigs" && <MyGigsPage />}
2024
<div id="tooltips-container-id" />

src/actions/gigApply/creators.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import { createActions } from "redux-actions";
2+
import * as ACTION_TYPE from "./types";
3+
4+
const actions = createActions(
5+
{},
6+
ACTION_TYPE.INIT_PROFILE_DATA,
7+
ACTION_TYPE.RESET_APPLICATION,
8+
ACTION_TYPE.RESET_FORM,
9+
ACTION_TYPE.SEND_APPLICATION_ERROR,
10+
ACTION_TYPE.SEND_APPLICATION_PENDING,
11+
ACTION_TYPE.SEND_APPLICATION_SUCCESS,
12+
ACTION_TYPE.SET_AGREED_DURATION,
13+
ACTION_TYPE.SET_AGREED_TERMS,
14+
ACTION_TYPE.SET_AGREED_TIMEZONE,
15+
ACTION_TYPE.SET_CITY,
16+
ACTION_TYPE.SET_COUNTRY,
17+
ACTION_TYPE.SET_PAYMENT,
18+
ACTION_TYPE.SET_PHONE,
19+
ACTION_TYPE.SET_REFERRAL,
20+
ACTION_TYPE.SET_RESUME,
21+
ACTION_TYPE.SET_SKILLS,
22+
ACTION_TYPE.TOUCH_AGREED_DURATION,
23+
ACTION_TYPE.TOUCH_AGREED_TERMS,
24+
ACTION_TYPE.TOUCH_AGREED_TIMEZONE,
25+
ACTION_TYPE.TOUCH_CITY,
26+
ACTION_TYPE.TOUCH_PAYMENT,
27+
ACTION_TYPE.TOUCH_PHONE,
28+
ACTION_TYPE.TOUCH_RESUME,
29+
ACTION_TYPE.TOUCH_SKILLS,
30+
ACTION_TYPE.TOUCH_REFERRAL,
31+
ACTION_TYPE.VALIDATE_CITY,
32+
ACTION_TYPE.VALIDATE_COUNTRY,
33+
ACTION_TYPE.VALIDATE_PAYMENT,
34+
ACTION_TYPE.VALIDATE_PHONE,
35+
ACTION_TYPE.VALIDATE_RESUME,
36+
ACTION_TYPE.VALIDATE_SKILLS,
37+
ACTION_TYPE.VALIDATE_REFERRAL,
38+
ACTION_TYPE.VALIDATE_UNTOUCHED,
39+
{ prefix: "GIG-APPLY", namespace: "--" }
40+
);
41+
42+
export default actions;

0 commit comments

Comments
 (0)