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

Merge dev into branch #7009

Merged
merged 38 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
341ca13
Fix vertical spacing (TOP-1490)
jmgasper May 20, 2024
44356d2
Merge branch 'develop' of https://github.com/topcoder-platform/commun…
jmgasper May 20, 2024
8a1922d
Cleanup for TOP-1393
jmgasper May 20, 2024
760adc5
Lint and cleanup
jmgasper May 20, 2024
b1868ae
Lint cleanup
jmgasper May 20, 2024
5b2688c
Fix unregister button styling
jmgasper May 21, 2024
fcddb27
Better styling for challenge link in Phoenix spec
jmgasper May 21, 2024
45a245d
Lint
jmgasper May 21, 2024
ca76e46
Typo
jmgasper May 21, 2024
59b7362
TOP-1512 Added some additional styles for the link to Topcoder Phoenix
mmattlin May 22, 2024
2a4ec74
Merge pull request #6983 from topcoder-platform/TOP-1512-phoenix-link…
mmattlin May 22, 2024
c26b6c0
Remove sub-communities (TOP-1548)
jmgasper May 24, 2024
eca51ee
Merge branch 'develop' of https://github.com/topcoder-platform/commun…
jmgasper May 24, 2024
6490c97
Lint
jmgasper May 24, 2024
84f938f
Remove 'register' button on challenge card in challenge listing (TOP-…
jmgasper May 24, 2024
b558596
Change flow for challenge type filter in filter panel (TOP-1550)
jmgasper May 24, 2024
b39fb08
Remove design template items (TOP-1489)
jmgasper May 25, 2024
742bba8
Lint
jmgasper May 27, 2024
d8ac088
TOP-1579 update config of challengesFeed on dashboard
kkartunov May 27, 2024
b76d878
Merge pull request #6984 from topcoder-platform/TOP-1579
kkartunov May 29, 2024
a320438
Show all past challenges to admins, regardless of registration status…
jmgasper Jun 1, 2024
383d30d
Lint
jmgasper Jun 1, 2024
4b82fe8
Test update
jmgasper Jun 4, 2024
325f6df
Update to Wipro text (PS-285)
jmgasper Jun 10, 2024
e30ac1f
Rename tool as Opportunities
vas3a Jun 11, 2024
eb8bd4e
Merge pull request #6989 from topcoder-platform/CORE-566_rename-activ…
jmgasper Jun 11, 2024
c9c5e4f
Remove reference to old tc-website / community.topcoder.com
jmgasper Jun 21, 2024
183218b
Remove reference to old tc-website / community.topcoder.com
jmgasper Jun 21, 2024
73e74da
Lint
jmgasper Jun 21, 2024
672cd73
Lint
jmgasper Jun 21, 2024
0c347e9
Update how we get the initial score to support marathon match formatt…
jmgasper Jul 8, 2024
f316902
Better use of challenge prop
jmgasper Jul 8, 2024
fa8b337
Cleanup
jmgasper Jul 9, 2024
ece2112
Add additional check for ICs that run that don't have the data dashboard
jmgasper Jul 18, 2024
f1ee316
TOP-2194 clean gig referral UIs
kkartunov Jul 24, 2024
0d4cfdb
Merge pull request #6996 from topcoder-platform/TOP-2194
kkartunov Jul 24, 2024
2f23ed4
TOP-2194 bring back main viewport
kkartunov Jul 24, 2024
6302f22
Merge pull request #6997 from topcoder-platform/TOP-2194
kkartunov Jul 24, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -171,46 +171,6 @@ exports[`Matches shallow shapshot 2`] = `
/>
</div>
</div>
<div
className="src-shared-components-challenge-listing-Filters-FiltersPanel-___style__filter-row___2Vfd_"
>
<div
className="src-shared-components-challenge-listing-Filters-FiltersPanel-___style__filter___1-QUz src-shared-components-challenge-listing-Filters-FiltersPanel-___style__filter___1-QUz src-shared-components-challenge-listing-Filters-FiltersPanel-___style__community___3EFG7"
>
<label
className="src-shared-components-challenge-listing-Filters-FiltersPanel-___style__label___3W9TU"
htmlFor="community-select"
>
Sub communities
<input
type="hidden"
/>
</label>
<Select
arrowRenderer={[Function]}
autoBlur={true}
clearable={false}
id="community-select"
onChange={[Function]}
options={
Array [
Object {
"data": <div>
Sample community
</div>,
"label": "Sample community",
"name": "Sample community",
"value": "123",
},
]
}
selectRef={[Function]}
simpleValue={true}
value=""
valueRenderer={[Function]}
/>
</div>
</div>
</div>
<div
className="src-shared-components-challenge-listing-Filters-FiltersPanel-___style__buttons___2r3xW"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ exports[`Matches shallow shapshot 1`] = `
>
<Bucket
activeBucket=""
auth={Object {}}
bucket="all"
challengeTypes={
Array [
Expand Down
62 changes: 0 additions & 62 deletions src/shared/actions/growSurf.js

This file was deleted.

127 changes: 2 additions & 125 deletions src/shared/components/Gigs/GigDetails/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,11 @@ import { isEmpty } from 'lodash';
import React, { useState } from 'react';
import PT from 'prop-types';
import { connect } from 'react-redux';
import { isomorphy, Link, config } from 'topcoder-react-utils';
import { PrimaryButton } from 'topcoder-react-ui-kit';
import { Link, config } from 'topcoder-react-utils';
import ReactHtmlParser from 'react-html-parser';
import { getSalaryType, getCustomField } from 'utils/gigs';
import SubscribeMailChimpTag from 'containers/SubscribeMailChimpTag';
import { isValidEmail } from 'utils/tc';
import './style.scss';
import IconFacebook from 'assets/images/icon-facebook.svg';
import IconTwitter from 'assets/images/icon-twitter.svg';
import IconLinkedIn from 'assets/images/icon-linkedIn.svg';
import IconLocation from 'assets/images/icon-location.svg';
import IconMoney from 'assets/images/icon-payment.svg';
import IconDuration from 'assets/images/icon-calendar-gig.svg';
Expand All @@ -28,7 +23,6 @@ import iconLabel1 from 'assets/images/l1.png';
import iconLabel2 from 'assets/images/l2.png';
import iconLabel3 from 'assets/images/l3.png';
import SadFace from 'assets/images/sad-face-icon.svg';
import ReferralModal from '../ReferralModal';
import LoginModal from '../LoginModal';

// Cleanup HTML from style tags
Expand All @@ -44,28 +38,16 @@ const ReactHtmlParserOptions = {

function GigDetails(props) {
const {
job, application, profile, onSendClick, isReferrSucess, isReferrError, onReferralDone, growSurf,
job, application, profile,
} = props;
let shareUrl;
let retUrl;
if (isomorphy.isClientSide()) {
shareUrl = encodeURIComponent(window.location.href);
if (growSurf && growSurf.data) {
shareUrl = `${window.location.origin}${window.location.pathname}?referralId=${growSurf.data.id}`;
}
retUrl = `${window.location.origin}${window.location.pathname}/apply${window.location.search}`;
}
let skills = getCustomField(job.custom_fields, 'Technologies Required');
if (skills !== 'n/a') skills = skills.split(',').join(', ');
const hPerW = getCustomField(job.custom_fields, 'Hours per week');
const compens = job.min_annual_salary === job.max_annual_salary ? job.max_annual_salary : `${job.min_annual_salary} - ${job.max_annual_salary} (USD)`;

const [isModalOpen, setModalOpen] = useState(false);
const [isLoginModalOpen, setLoginModalOpen] = useState(false);
const [copyBtnText, setCopyBtnText] = useState('COPY');
const [referrEmail, setreferrEmail] = useState();
const duration = getCustomField(job.custom_fields, 'Duration');
let refEmailInput;

return (
<div styleName="container">
Expand Down Expand Up @@ -157,83 +139,6 @@ function GigDetails(props) {
</div>
</div>
<div styleName="right">
<div styleName="referr-area">
<h6>REFER THIS GIG</h6>
{
growSurf && growSurf.data ? (
<React.Fragment>
<span styleName="referralLinkTitile">Share your Referral Link:</span>
<input type="text" styleName="referralLink" readOnly value={`https://topcoder.com/gigs/${job.slug}?referralId=${growSurf.data.id}`} />
<div styleName="copyAndShare">
<PrimaryButton
onClick={() => {
const copyhelper = document.createElement('input');
copyhelper.className = 'copyhelper';
document.body.appendChild(copyhelper);
copyhelper.value = `https://www.topcoder.com/gigs/${job.slug}?referralId=${growSurf.data.id}`;
copyhelper.select();
document.execCommand('copy');
document.body.removeChild(copyhelper);
setCopyBtnText('COPIED');
setTimeout(() => {
setCopyBtnText('COPY');
}, 3000);
}}
>
{copyBtnText}
</PrimaryButton>
<div styleName="shareButtons">
Share on:&nbsp;&nbsp;
<a href={`https://www.linkedin.com/sharing/share-offsite/?url=${shareUrl}`} target="_blank" rel="noopener noreferrer">
<IconLinkedIn />
</a>
<a href={`https://www.facebook.com/sharer/sharer.php?u=${shareUrl}&src=share_button`} target="_blank" rel="noopener noreferrer">
<IconFacebook />
</a>
<a href={`https://twitter.com/intent/tweet?url=${shareUrl}`} target="_blank" rel="noopener noreferrer">
<IconTwitter />
</a>
</div>
</div>
</React.Fragment>
) : (
<div styleName="shareButtons">
Share this job on:&nbsp;&nbsp;
<a href={`https://www.linkedin.com/sharing/share-offsite/?url=${shareUrl}`} target="_blank" rel="noopener noreferrer">
<IconLinkedIn />
</a>
<a href={`https://www.facebook.com/sharer/sharer.php?u=${shareUrl}&src=share_button`} target="_blank" rel="noopener noreferrer">
<IconFacebook />
</a>
<a href={`https://twitter.com/intent/tweet?url=${shareUrl}`} target="_blank" rel="noopener noreferrer">
<IconTwitter />
</a>
</div>
)
}
<div styleName="sepWrap">
<div styleName="sepLine" />
<span>or</span>
<div styleName="sepLine" />
</div>
<p>Refer someone to this gig and earn $500. Just add their email below. See <Link to="/community/gig-referral" styleName="how-it-works" openNewTab>how it works.</Link></p>
<div styleName="referr-form">
<input type="email" placeholder="Email" onChange={e => setreferrEmail(e.target.value)} ref={ref => refEmailInput = ref} />
<button
type="button"
onClick={() => {
if (!isEmpty(profile) && growSurf.data) {
onSendClick(referrEmail);
setreferrEmail();
refEmailInput.value = '';
}
setModalOpen(true);
}}
disabled={!referrEmail || !isValidEmail(referrEmail)}
>SEND
</button>
</div>
</div>
<div styleName="subscribe-area">
<h6>SUBSCRIBE TO WEEKLY GIG UPDATES</h6>
<SubscribeMailChimpTag listId="28bfd3c062" groups={{ d0c48e9da3: true }} />
Expand All @@ -256,27 +161,6 @@ function GigDetails(props) {
</ul>
</div>
<div styleName="support">If you have any questions or doubts, don’t hesitate to email <a href="mailto:[email protected]">[email protected]</a>.</div>
<div styleName="referral">
{
isModalOpen
&& (
<ReferralModal
profile={profile}
onCloseButton={() => {
onReferralDone();
setModalOpen(false);
}}
isReferrSucess={isReferrSucess}
isReferrError={isReferrError}
referralId={growSurf && growSurf.data ? growSurf.data.id : null}
onReferralDone={() => {
onReferralDone(true);
setModalOpen(false);
}}
/>
)
}
</div>
{
isLoginModalOpen && <LoginModal retUrl={retUrl} onCancel={() => setLoginModalOpen(false)} />
}
Expand All @@ -292,19 +176,12 @@ function GigDetails(props) {
GigDetails.defaultProps = {
application: null,
profile: {},
growSurf: {},
isReferrError: null,
};

GigDetails.propTypes = {
job: PT.shape().isRequired,
application: PT.shape(),
profile: PT.shape(),
onSendClick: PT.func.isRequired,
isReferrSucess: PT.bool.isRequired,
isReferrError: PT.shape(),
onReferralDone: PT.func.isRequired,
growSurf: PT.shape(),
};

function mapStateToProps(state) {
Expand Down
4 changes: 0 additions & 4 deletions src/shared/components/Gigs/GigDetails/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@
@include primaryBtn;
}

.referral {
display: flex;
}

.container {
max-width: $screen-lg;
min-height: 50vh;
Expand Down
Loading
Loading