From 15f37849a1f353e6dbec2c7e5f8747599a102313 Mon Sep 17 00:00:00 2001 From: Vasilica Olariu Date: Mon, 11 Aug 2025 14:51:36 +0300 Subject: [PATCH 1/8] PM-1608 - update project search: use exact match --- src/actions/projects.js | 2 +- src/actions/users.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/actions/projects.js b/src/actions/projects.js index dfc6bf9b..89b1f6b5 100644 --- a/src/actions/projects.js +++ b/src/actions/projects.js @@ -52,7 +52,7 @@ function _loadProjects (projectNameOrIdFilter = '', paramFilters = {}) { if (!isNaN(projectNameOrIdFilter)) { // if it is number filters['id'] = parseInt(projectNameOrIdFilter, 10) } else { // text search - filters['keyword'] = decodeURIComponent(projectNameOrIdFilter) + filters['keyword'] = `"${decodeURIComponent(projectNameOrIdFilter)}"` } } diff --git a/src/actions/users.js b/src/actions/users.js index 31a65ab2..d1c51ec4 100644 --- a/src/actions/users.js +++ b/src/actions/users.js @@ -82,7 +82,7 @@ export function searchUserProjects (isAdmin = true, keyword) { sort: 'updatedAt desc', perPage: 20, page: 1, - keyword + keyword: `"${keyword}"` } if (!isAdmin) { filters['memberOnly'] = true From 7a1ed528dfb0f2a3ba16c0a4335ab946dcfa3794 Mon Sep 17 00:00:00 2001 From: Vasilica Olariu Date: Mon, 11 Aug 2025 14:51:52 +0300 Subject: [PATCH 2/8] PM-1608 - project search: update search input --- src/components/Select/styles.js | 3 +++ src/components/Users/Users.module.scss | 2 -- src/containers/Projects/styles.module.scss | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/Select/styles.js b/src/components/Select/styles.js index a2b44a38..7a0c05b1 100644 --- a/src/components/Select/styles.js +++ b/src/components/Select/styles.js @@ -55,6 +55,9 @@ export default { paddingRight: '6px', paddingLeft: '10px', border: 'none', + width: '100%', + display: 'grid', + gridTemplateColumns: '1fr', input: { width: '100% !important', height: 'auto !important', diff --git a/src/components/Users/Users.module.scss b/src/components/Users/Users.module.scss index a37c2395..93eaa77e 100644 --- a/src/components/Users/Users.module.scss +++ b/src/components/Users/Users.module.scss @@ -52,8 +52,6 @@ align-items: center; input { - max-width: 280px; - @include upto-sm { display: block; padding-bottom: 10px; diff --git a/src/containers/Projects/styles.module.scss b/src/containers/Projects/styles.module.scss index ef18461d..3fdceafb 100644 --- a/src/containers/Projects/styles.module.scss +++ b/src/containers/Projects/styles.module.scss @@ -51,6 +51,10 @@ border-radius: 3px; border: 1px solid $light-gray; background-color: $lighter-gray; + + > div { + width: 100%; + } } .tcCheckbox { From 7c76389ecb84f392bdade5198cf3d6dc41bc3d57 Mon Sep 17 00:00:00 2001 From: Vasilica Olariu Date: Mon, 11 Aug 2025 15:39:36 +0300 Subject: [PATCH 3/8] PM-1609 - add navigation for user management --- src/components/Buttons/OutlineButton/index.js | 4 +- src/components/ChallengesComponent/index.js | 12 +++++ src/components/Users/index.js | 52 +++++++++++++------ src/containers/Users/index.js | 18 +++++-- 4 files changed, 66 insertions(+), 20 deletions(-) diff --git a/src/components/Buttons/OutlineButton/index.js b/src/components/Buttons/OutlineButton/index.js index 9d5f6914..5bc8140e 100644 --- a/src/components/Buttons/OutlineButton/index.js +++ b/src/components/Buttons/OutlineButton/index.js @@ -22,7 +22,7 @@ const OutlineButton = ({ type, text, link, onClick, url, className, submit, disa if (!_.isEmpty(link)) { return ( - + {text} ) @@ -38,7 +38,7 @@ const OutlineButton = ({ type, text, link, onClick, url, className, submit, disa OutlineButton.propTypes = { type: PropTypes.string.isRequired, text: PropTypes.string.isRequired, - link: PropTypes.string, + link: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), url: PropTypes.string, className: PropTypes.string, onClick: PropTypes.func, diff --git a/src/components/ChallengesComponent/index.js b/src/components/ChallengesComponent/index.js index b9181c20..a110244a 100644 --- a/src/components/ChallengesComponent/index.js +++ b/src/components/ChallengesComponent/index.js @@ -91,6 +91,18 @@ const ChallengesComponent = ({ {activeProject && activeProject.id && !isReadOnly ? (
+ {(checkAdmin(auth.token) || checkManager(auth.token)) && ( + + )} {isAdminOrCopilot && ( { return { @@ -204,20 +214,28 @@ class Users extends Component {
- { - showAddUser && ( -
- this.onAddUserClick()} /> - this.onInviteUserClick()} /> -
- ) - } +
+ { + showAddUser && ( + <> + this.onAddUserClick()} /> + this.onInviteUserClick()} /> + + ) + } + {projectOption && ( + + )} +
{ this.state.showAddUserModal && ( { } Users.propTypes = { + location: PT.object.isRequired, projects: PT.arrayOf(PT.object), resultSearchUserProjects: PT.arrayOf(PT.object), auth: PT.object, @@ -220,4 +232,4 @@ const mapDispatchToProps = { loadNextProjects } -export default connect(mapStateToProps, mapDispatchToProps)(Users) +export default withRouter(connect(mapStateToProps, mapDispatchToProps)(Users)) From 9cd8413483a5ffdbab3c5e758f4e68d241a55068 Mon Sep 17 00:00:00 2001 From: Vasilica Olariu Date: Tue, 12 Aug 2025 15:37:34 +0300 Subject: [PATCH 4/8] Members api fix --- src/config/constants.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/constants.js b/src/config/constants.js index 47e4d2ed..98b19109 100644 --- a/src/config/constants.js +++ b/src/config/constants.js @@ -59,7 +59,7 @@ export const FILE_PICKER_PROGRESS_INTERVAL = 100 export const FILE_PICKER_UPLOAD_RETRY = 2 export const FILE_PICKER_UPLOAD_TIMEOUT = 30 * 60 * 1000 // 30 minutes export const SPECIFICATION_ATTACHMENTS_FOLDER = 'SPECIFICATION_ATTACHMENTS' -export const MEMBERS_API_URL = process.env.MEMBERS_API_URL +export const MEMBERS_API_URL = process.env.MEMBER_API_URL export const getAWSContainerFileURL = (key) => `https://${FILE_PICKER_CONTAINER_NAME}.s3.amazonaws.com/${key}` From 0110fb3dd8fdefadc2a5e03c5fc164c60fa64c63 Mon Sep 17 00:00:00 2001 From: Vasilica Olariu Date: Wed, 13 Aug 2025 07:40:29 +0300 Subject: [PATCH 5/8] PM-1609 - update button colors --- src/components/ChallengesComponent/index.js | 2 +- src/components/Users/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ChallengesComponent/index.js b/src/components/ChallengesComponent/index.js index a110244a..e4357dae 100644 --- a/src/components/ChallengesComponent/index.js +++ b/src/components/ChallengesComponent/index.js @@ -94,7 +94,7 @@ const ChallengesComponent = ({ {(checkAdmin(auth.token) || checkManager(auth.token)) && ( )} From 94cdb18323a2d892b456a36baed7000068f45d71 Mon Sep 17 00:00:00 2001 From: Vasilica Olariu Date: Wed, 13 Aug 2025 07:44:49 +0300 Subject: [PATCH 6/8] show users button for all users --- src/components/ChallengesComponent/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ChallengesComponent/index.js b/src/components/ChallengesComponent/index.js index e4357dae..9182189a 100644 --- a/src/components/ChallengesComponent/index.js +++ b/src/components/ChallengesComponent/index.js @@ -91,7 +91,7 @@ const ChallengesComponent = ({ {activeProject && activeProject.id && !isReadOnly ? (
- {(checkAdmin(auth.token) || checkManager(auth.token)) && ( + {isAdminOrCopilot && ( Date: Wed, 13 Aug 2025 08:05:08 +0300 Subject: [PATCH 7/8] Fix button width & color --- src/components/Users/Users.module.scss | 2 +- src/components/Users/index.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/Users/Users.module.scss b/src/components/Users/Users.module.scss index a37c2395..0d915f33 100644 --- a/src/components/Users/Users.module.scss +++ b/src/components/Users/Users.module.scss @@ -413,7 +413,7 @@ margin-bottom: 20px; gap: 8px; > * { - width: 125px; + width: max-content; } } diff --git a/src/components/Users/index.js b/src/components/Users/index.js index bb7c0bfe..2164338b 100644 --- a/src/components/Users/index.js +++ b/src/components/Users/index.js @@ -14,7 +14,6 @@ import ConfirmationModal from '../Modal/ConfirmationModal' import UserAddModalContent from './user-add.modal' import InviteUserModalContent from './invite-user.modal' // Import the new component import Loader from '../Loader' -import { OutlineButton } from '../Buttons' const theme = { container: styles.modalContainer @@ -230,7 +229,7 @@ class Users extends Component { ) } {projectOption && ( - From 184e715b2d54e946460894e2766afd7dcb05cc26 Mon Sep 17 00:00:00 2001 From: Vasilica Olariu Date: Wed, 13 Aug 2025 09:10:35 +0300 Subject: [PATCH 8/8] make users button available to everyone --- src/components/ChallengesComponent/index.js | 22 ++++++++++----------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/components/ChallengesComponent/index.js b/src/components/ChallengesComponent/index.js index 9182189a..af5a36ea 100644 --- a/src/components/ChallengesComponent/index.js +++ b/src/components/ChallengesComponent/index.js @@ -91,18 +91,16 @@ const ChallengesComponent = ({
{activeProject && activeProject.id && !isReadOnly ? (
- {isAdminOrCopilot && ( - - )} + {isAdminOrCopilot && (