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

My Gigs 2nd Week PROD Release #172

Merged
merged 28 commits into from
Aug 10, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
182e489
UI Update finish
LieutenantRoger Jul 24, 2021
4e6396a
adjust duration
LieutenantRoger Jul 24, 2021
aa44583
ui optimize
LieutenantRoger Jul 24, 2021
e013a47
fix remark
LieutenantRoger Jul 24, 2021
f8fec69
field calculation
LieutenantRoger Jul 27, 2021
f2cd91a
agg API update
LieutenantRoger Jul 29, 2021
c0b1932
api adjustment
LieutenantRoger Jul 29, 2021
e995a6f
update swagger
LieutenantRoger Jul 29, 2021
a5fcd04
UI Update
LieutenantRoger Jul 29, 2021
4c918a1
Adjust icon
LieutenantRoger Jul 29, 2021
2389450
Merge branch 'gigs-new-ui' into gigs-filter
LieutenantRoger Jul 30, 2021
6993f97
sort completed and withdrawn
LieutenantRoger Jul 30, 2021
823e313
Merge branch 'gigs-new-ui' into gigs-filter
LieutenantRoger Jul 30, 2021
9e08983
fix: remark tooltip
LieutenantRoger Jul 30, 2021
910927b
cache data done
LieutenantRoger Jul 30, 2021
a66edc9
add badges
LieutenantRoger Jul 31, 2021
df8561a
fix: bucket selection
LieutenantRoger Jul 31, 2021
d4782b6
save page
LieutenantRoger Jul 31, 2021
5c628ec
cache data added
LieutenantRoger Jul 31, 2021
bec1856
restore per page
LieutenantRoger Jul 31, 2021
f075ce0
UI fix
LieutenantRoger Jul 31, 2021
a97504b
fix: empty text
LieutenantRoger Jul 31, 2021
8e81f9c
adjust the height
LieutenantRoger Aug 2, 2021
cb61638
restore ci
LieutenantRoger Aug 3, 2021
f4a6a81
clean up code
LieutenantRoger Aug 3, 2021
55bcac3
Merge pull request #171 from topcoder-platform/gigs-filter
LieutenantRoger Aug 5, 2021
8d922ce
handle unknown status
LieutenantRoger Aug 8, 2021
4d4d5c5
Merge pull request #173 from topcoder-platform/gigs-filter
LieutenantRoger Aug 8, 2021
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
Prev Previous commit
Next Next commit
clean up code
  • Loading branch information
LieutenantRoger committed Aug 3, 2021
commit f4a6a81fa080c133890db59d513b4038e6ae1ead
22 changes: 0 additions & 22 deletions src/actions/myGigs.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@ import {
} from "../constants";
import service from "../services/myGigs";

/**
* Action to get my gigs.
* @param {number} page page to fetch
* @param {number} perPage items per page. by default is 10.
* @returns
*/
// async function getMyGigs(status = "open_jobs", page = 1, perPage = PER_PAGE) {
// return service.getMyGigs(status, page, perPage);
// }

async function getMyActiveGigs(
status = "active_jobs",
page = 1,
Expand Down Expand Up @@ -48,16 +38,6 @@ async function getMyArchivedGigsDone(
return service.getMyGigs(status, page, perPage);
}

/**
* Action to load more pages of my gigs
* @param {number} nextPage page to fetch
* @param {*} perPage items per page. by default is 10
* @returns
*/
// async function loadMoreMyGigs(status, nextPage, perPage = PER_PAGE) {
// return service.getMyGigs(status, nextPage, perPage);
// }

async function getProfile() {
return service.getProfile();
}
Expand Down Expand Up @@ -90,8 +70,6 @@ export default createActions({
GET_MY_OPEN_GIGS: getMyOpenGigs,
GET_MY_COMPLETED_GIGS: getMyCompletedGigs,
GET_MY_ARCHIVED_GIGS: getMyArchivedGigsDone,
// GET_MY_GIGS: getMyGigs,
// LOAD_MORE_MY_GIGS: loadMoreMyGigs,
GET_PROFILE: getProfile,
UPDATE_PROFILE: updateProfile,
START_CHECKING_GIGS: startCheckingGigs,
Expand Down
21 changes: 0 additions & 21 deletions src/containers/MyGigs/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,13 @@ import Empty from "../../components/Empty";
import JobListing from "./JobListing";
import actions from "../../actions";
import * as constants from "../../constants";
// import * as utils from "../../utils";

import UpdateGigProfile from "./modals/UpdateGigProfile";
import UpdateSuccess from "./modals/UpdateSuccess";

import "./styles.scss";

const MyGigs = ({
// myGigs,
// getMyGigs,
// loadMore,
// total,
// numLoaded,
myActiveGigs,
myOpenGigs,
myCompletedGigs,
Expand All @@ -40,16 +34,12 @@ const MyGigs = ({
getMyCompletedGigs,
getMyArchivedGigs,
}) => {
// const location = useLocation();
// const params = utils.url.parseUrlQuery(location.search);
const propsRef = useRef();
propsRef.current = {
// getMyGigs,
getMyOpenGigs,
getProfile,
getAllCountries,
startCheckingGigs,
// params,
};

useEffect(() => {
Expand All @@ -64,7 +54,6 @@ const MyGigs = ({
return;
}
if (!checkingGigs) {
// propsRef.current.getMyGigs();
propsRef.current.getMyOpenGigs();
}
}, [checkingGigs]);
Expand Down Expand Up @@ -191,11 +180,6 @@ const MyGigs = ({

MyGigs.propTypes = {
gigStatus: PT.string,
// myGigs: PT.arrayOf(PT.shape()),
// getMyGigs: PT.func,
// loadMore: PT.func,
// total: PT.number,
// numLoaded: PT.number,
profile: PT.shape(),
getProfile: PT.func,
updateProfile: PT.func,
Expand All @@ -217,9 +201,6 @@ MyGigs.propTypes = {
const mapStateToProps = (state) => ({
gigStatus: state.filter.gig.status,
checkingGigs: state.myGigs.checkingGigs,
// myGigs: state.myGigs.myGigs,
// total: state.myGigs.total,
// numLoaded: state.myGigs.numLoaded,
loadingMyGigs: state.myGigs.loadingMyGigs,
myActiveGigs: state.myGigs[constants.GIGS_FILTER_STATUSES.ACTIVE_JOBS],
myOpenGigs: state.myGigs[constants.GIGS_FILTER_STATUSES.OPEN_JOBS],
Expand All @@ -230,8 +211,6 @@ const mapStateToProps = (state) => ({
});

const mapDispatchToProps = {
// getMyGigs: actions.myGigs.getMyGigs,
// loadMore: actions.myGigs.loadMoreMyGigs,
getMyActiveGigs: actions.myGigs.getMyActiveGigs,
getMyOpenGigs: actions.myGigs.getMyOpenGigs,
getMyCompletedGigs: actions.myGigs.getMyCompletedGigs,
Expand Down
56 changes: 0 additions & 56 deletions src/reducers/myGigs.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ import * as constants from "../constants";
const defaultState = {
loadingMyGigs: false,
loadingMyGigsError: null,
// myGigs: null,
// total: 0,
// numLoaded: 0,
[constants.GIGS_FILTER_STATUSES.ACTIVE_JOBS]: {
myGigs: null,
page: 1,
Expand All @@ -32,8 +29,6 @@ const defaultState = {
numLoaded: 0,
total: 0,
},
// loadingMore: false,
// loadingMoreError: null,
profile: {},
loadingProfile: false,
loadingProfileError: null,
Expand All @@ -43,21 +38,6 @@ const defaultState = {
checkingGigs: false,
};

// function onGetMyGigsInit(state) {
// return { ...state, loadingMyGigs: true, loadingMyGigsError: null };
// }

// function onGetMyGigsDone(state, { payload }) {
// return {
// ...state,
// myGigs: sortBy(payload.myGigs, ["sortPrio"]),
// total: payload.total,
// numLoaded: payload.myGigs.length,
// loadingMyGigs: false,
// loadingMyGigsError: null,
// };
// }

function onGetMyActiveGigsInit(state) {
return { ...state, loadingMyGigs: true, loadingMyGigsError: null };
}
Expand Down Expand Up @@ -138,35 +118,6 @@ function onGetMyArchivedGigsDone(state, { payload }) {
};
}

// function onGetMyGigsFailure(state, { payload }) {
// return {
// ...state,
// loadingMyGigs: false,
// loadingMyGigsError: payload,
// myGigs: null,
// total: 0,
// numLoaded: 0,
// };
// }

// function onLoadMoreMyGigsInit(state) {
// return { ...state, loadingMore: true, loadingMoreError: null };
// }

// function onLoadMoreMyGigsDone(state, { payload: { myGigs } }) {
// return {
// ...state,
// myGigs: sortBy(state.myGigs.concat(myGigs), ["sortPrio"]),
// numLoaded: state.numLoaded + size(myGigs),
// loadingMore: false,
// loadingMoreError: null,
// };
// }

// function onLoadMoreMyGigsFailure(state, { payload }) {
// return { ...state, loadingMore: false, loadingMoreError: payload };
// }

function onGetProfileInit(state) {
return { ...state, loadingProfile: true, loadingProfileError: null };
}
Expand Down Expand Up @@ -233,13 +184,6 @@ function onCheckingGigsDone(state) {

export default handleActions(
{
// GET_MY_GIGS_INIT: onGetMyGigsInit,
// GET_MY_GIGS_DONE: onGetMyGigsDone,
// GET_MY_GIGS_FAILURE: onGetMyGigsFailure,
// LOAD_MORE_MY_GIGS_INIT: onLoadMoreMyGigsInit,
// LOAD_MORE_MY_GIGS_DONE: onLoadMoreMyGigsDone,
// LOAD_MORE_MY_GIGS_FAILURE: onLoadMoreMyGigsFailure,

GET_MY_ACTIVE_GIGS_INIT: onGetMyActiveGigsInit,
GET_MY_ACTIVE_GIGS_DONE: onGetMyActiveGigsDone,
GET_MY_OPEN_GIGS_INIT: onGetMyOpenGigsInit,
Expand Down