-
Notifications
You must be signed in to change notification settings - Fork 210
[PROD RELEASE] - Feb 5 2026 (Engagements) #7172
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
Changes from all commits
0d44ccb
2eaecf7
42d1e9b
a495d36
1c26e03
c785a06
02378d1
8b81f58
533faac
276eb66
d37de2d
212dead
be243b6
22e089d
4f30b08
f16f2d8
01f5c0d
f07cb6e
2766a85
d885761
64d1871
d2bc8b7
cf1ae60
196f8f1
7a77283
980d8b5
70d84e2
a59243f
806c174
62d01f6
f321daa
100a6dd
e4130de
edb30ba
05c941c
52fd4a7
b87c1ac
7641d8c
dd69e4c
1488926
e21536e
91ca06d
9f1631d
48a09e6
ab8128e
f370370
73b66df
86d4dc4
9221f60
b11e8d7
92647e2
aa4648b
be68d82
ddc6875
55fbc84
5af3eda
fd3c338
74d0646
d077734
742c096
fb63c27
ca563eb
67e5de3
f29a432
8700764
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -171,4 +171,3 @@ RUN npm run build | |
|
|
||
| EXPOSE 3000 | ||
| CMD ["npm", "start"] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,5 +10,38 @@ require('babel-register')({ | |
| ], | ||
| }); | ||
|
|
||
| /* Provide globalThis in older Node runtimes (e.g. Node 10). */ | ||
| if (typeof globalThis === 'undefined') { | ||
| global.globalThis = global; | ||
| } | ||
|
|
||
| /* Provide crypto.sign/crypto.verify in older Node runtimes (e.g. Node 10). */ | ||
| const crypto = require('crypto'); | ||
| if (typeof crypto.sign !== 'function') { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [💡 |
||
| crypto.sign = (algorithm, data, key) => { | ||
| const signer = crypto.createSign(algorithm); | ||
| signer.update(data); | ||
| signer.end(); | ||
| return signer.sign(key); | ||
| }; | ||
| } | ||
| if (typeof crypto.verify !== 'function') { | ||
| crypto.verify = (algorithm, data, key, signature) => { | ||
| const verifier = crypto.createVerify(algorithm); | ||
| verifier.update(data); | ||
| verifier.end(); | ||
| return verifier.verify(key, signature); | ||
| }; | ||
| } | ||
|
|
||
| /* Provide TextEncoder/TextDecoder in older Node runtimes (e.g. Node 10). */ | ||
| const { TextDecoder, TextEncoder } = require('util'); | ||
| if (typeof global.TextEncoder === 'undefined') { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [💡 |
||
| global.TextEncoder = TextEncoder; | ||
| } | ||
| if (typeof global.TextDecoder === 'undefined') { | ||
| global.TextDecoder = TextDecoder; | ||
| } | ||
|
|
||
| /* Runs the ExpressJS startup script. */ | ||
| require('../src/server'); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,12 @@ | ||
| module.exports = { | ||
| SEGMENT_IO_API_KEY: 'QBtLgV8vCiuRX1lDikbMjcoe9aCHkF6n', | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [❗❗ |
||
| SERVER_API_KEY: '79b2d5eb-c1fd-42c4-9391-6b2c9780d591', | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [❗❗ |
||
| API: { | ||
| ENGAGEMENTS: 'https://api.topcoder-dev.com/v6/engagements/engagements', | ||
| }, | ||
| URL: { | ||
| USER_SETTINGS: '', /* No dev server is available for saved searches */ | ||
| ENGAGEMENTS_APP: 'https://engagements.topcoder-dev.com', | ||
| REVIEW_API_URL: '/reviewTypes', | ||
| }, | ||
| PLATFORM_SITE_URL: 'https://platform.topcoder-dev.com', | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,12 @@ | ||
| module.exports = { | ||
| SEGMENT_IO_API_KEY: 'QBtLgV8vCiuRX1lDikbMjcoe9aCHkF6n', | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [❗❗ |
||
| SERVER_API_KEY: '79b2d5eb-c1fd-42c4-9391-6b2c9780d591', | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [❗❗ |
||
| API: { | ||
| ENGAGEMENTS: 'https://api.topcoder-qa.com/v6/engagements/engagements', | ||
| }, | ||
| URL: { | ||
| USER_SETTINGS: '', /* No qa server is available for saved searches */ | ||
| ENGAGEMENTS_APP: 'https://engagements.topcoder-qa.com', | ||
| }, | ||
| PLATFORM_SITE_URL: 'https://platform.topcoder-qa.com', | ||
| PLATFORMUI_SITE_URL: 'https://platform-ui.topcoder-qa.com', | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,9 @@ | ||
| module.exports = { | ||
| SERVER_API_KEY: '79b2d5eb-c1fd-42c4-9391-6b2c9780d591', | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [❗❗ |
||
| API: { | ||
| ENGAGEMENTS: 'https://api.topcoder-dev.com/v6/engagements/engagements', | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| }, | ||
| URL: { | ||
| ENGAGEMENTS_APP: 'https://engagements.topcoder-dev.com', | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| }, | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| import _ from 'lodash'; | ||
| import { createActions } from 'redux-actions'; | ||
| import { errors } from 'topcoder-react-lib'; | ||
| import getEngagements from 'services/engagements'; | ||
|
|
||
| const { fireErrorMessage } = errors; | ||
|
|
||
| const PAGE_SIZE = 10; | ||
|
|
||
| function getEngagementsInit(uuid, page, filters) { | ||
| return { uuid, page, filters }; | ||
| } | ||
|
|
||
| async function getEngagementsDone(uuid, page, filters, tokenV3) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| try { | ||
| const { engagements, meta } = await getEngagements(page, PAGE_SIZE, filters, tokenV3); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
|
|
||
| return { | ||
| uuid, | ||
| engagements, | ||
| meta, | ||
| page, | ||
| }; | ||
| } catch (error) { | ||
| const { message: errorMessage } = error || {}; | ||
| let message = 'Unknown error'; | ||
| if (errorMessage) { | ||
| message = errorMessage; | ||
| } else if (typeof error === 'string') { | ||
| message = error; | ||
| } | ||
| fireErrorMessage('Error Loading Engagements', message); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [💡 |
||
| const rejection = error instanceof Error ? error : new Error(message); | ||
| rejection.uuid = uuid; | ||
| rejection.originalError = error; | ||
| return Promise.reject(rejection); | ||
| } | ||
| } | ||
|
|
||
| export default createActions({ | ||
| ENGAGEMENTS: { | ||
| GET_ENGAGEMENTS_INIT: getEngagementsInit, | ||
| GET_ENGAGEMENTS_DONE: getEngagementsDone, | ||
| DROP_ENGAGEMENTS: _.noop, | ||
| SET_FILTER: _.identity, | ||
| }, | ||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,12 @@ function DropdownSingleSkills({ | |
| loadOptions, | ||
| createText, | ||
| }) { | ||
| let normalizedTerms = null; | ||
| if (terms && typeof terms === 'object') { | ||
| normalizedTerms = terms; | ||
| } else if (terms) { | ||
| normalizedTerms = { value: terms, label: terms }; | ||
| } | ||
| const containerRef = useRef(null); | ||
| useEffect(() => { | ||
| const selectInput = containerRef.current.getElementsByClassName('Select-input'); | ||
|
|
@@ -79,17 +85,11 @@ function DropdownSingleSkills({ | |
| <AsyncCreatable | ||
| autosize={false} | ||
| optionComponent={CustomReactSelectRow} | ||
| value={terms ? { | ||
| value: terms, | ||
| label: terms, | ||
| } : null} | ||
| value={normalizedTerms} | ||
| onChange={(value) => { | ||
| onChange(value ? (value.value || '') : ''); | ||
| onChange(value || null); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [❗❗ |
||
| }} | ||
| defaultValue={terms ? { | ||
| value: terms, | ||
| label: terms, | ||
| } : null} | ||
| defaultValue={normalizedTerms} | ||
| promptTextCreator={value => `${createText} "${value}"`} | ||
| placeholder={`${placeholder}${placeholder && required ? ' *' : ''}`} | ||
| cacheOptions={cacheOptions} | ||
|
|
@@ -120,7 +120,13 @@ DropdownSingleSkills.defaultProps = { | |
| }; | ||
|
|
||
| DropdownSingleSkills.propTypes = { | ||
| terms: PT.string, | ||
| terms: PT.oneOfType([ | ||
| PT.string, | ||
| PT.shape({ | ||
| label: PT.string, | ||
| value: PT.string, | ||
| }), | ||
| ]), | ||
| placeholder: PT.string, | ||
| label: PT.string, | ||
| required: PT.bool, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,10 +22,14 @@ function SearchCombo({ | |
| } else { | ||
| getService(auth.tokenV3).getSkills(inputValue).then( | ||
| (response) => { | ||
| const suggestedOptions = (response || []).map(skillItem => ({ | ||
| label: skillItem.name, | ||
| value: skillItem.name, | ||
| })); | ||
| const suggestedOptions = (response || []) | ||
| .map((skillItem) => { | ||
| const label = skillItem && (skillItem.name || skillItem.label || skillItem.title); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| if (!label) return null; | ||
| const value = skillItem.id || skillItem.skillId || skillItem.value || label; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| return { label, value }; | ||
| }) | ||
| .filter(Boolean); | ||
| return callback(null, { | ||
| options: suggestedOptions, | ||
| }); | ||
|
|
@@ -40,8 +44,9 @@ function SearchCombo({ | |
| terms={skills} | ||
| placeholder={placeholder} | ||
| onChange={(newSkill) => { | ||
| setSkills(newSkill); | ||
| onSearch(newSkill); | ||
| const nextSkill = newSkill || ''; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| setSkills(nextSkill); | ||
| onSearch(nextSkill); | ||
| }} | ||
| cacheOptions | ||
| loadOptions={fetchSkills} | ||
|
|
@@ -58,7 +63,13 @@ SearchCombo.defaultProps = { | |
| }; | ||
|
|
||
| SearchCombo.propTypes = { | ||
| term: PT.string, | ||
| term: PT.oneOfType([ | ||
| PT.string, | ||
| PT.shape({ | ||
| label: PT.string, | ||
| value: PT.string, | ||
| }), | ||
| ]), | ||
| placeholder: PT.string, | ||
| onSearch: PT.func.isRequired, | ||
| auth: PT.object, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[💡
maintainability]Assigning
globalThistoglobalis a workaround for older Node versions. Consider documenting this workaround in a separate documentation file or README to ensure future maintainability and clarity for developers unfamiliar with this context.