Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
9084e5f
mark up organization page
Jun 24, 2024
8a64a29
mark up of choose type of chat cart
Jun 25, 2024
4f67cf3
chat for organization
Jul 3, 2024
4f28a1b
rework of user page with organization added page for organizations, a…
Jul 23, 2024
361ace0
rework of user page with organization added page for organizations, a…
Jul 23, 2024
e47894d
fixes of dispatch in create organization
Jul 23, 2024
b63d45e
added option to add user in org
Jul 26, 2024
c8b87a8
Merge branch 'refs/heads/develop' into feature/organization
Jul 26, 2024
ddaca59
Merge branch 'refs/heads/develop' into feature/organization
Jul 29, 2024
ce59de0
added audit request from organization, invite user in organization re…
Aug 9, 2024
08cfe22
fixes of view in organization
Aug 12, 2024
8d3cc8d
added option to change access level of member in organization, and ch…
Aug 20, 2024
1c955f6
changed view of Organization card and added snackbar when invite user
Sep 19, 2024
12adbc1
added radio button tool in organization form
Sep 20, 2024
7a8744e
added radio button tool in organization form
Sep 20, 2024
0939892
added radio button for access in invite user
Sep 24, 2024
80ac9db
colored for role in my organizations
Sep 25, 2024
750d14a
Merge branch 'refs/heads/develop' into feature/organization
Sep 27, 2024
2561e63
merge conflicts
Sep 27, 2024
7c7ed51
added random image generator
Oct 2, 2024
4c1cf9a
removed comments
Oct 4, 2024
b481e00
changed path in image generator
Oct 7, 2024
24f2f5f
logic for chat from org
Oct 11, 2024
de030ca
Merge pull request #382 from auditdbio/random-images
crfergus Oct 11, 2024
97cff5c
chat with organization
Oct 15, 2024
1ebf815
Merge remote-tracking branch 'origin/feature/organization' into featu…
Oct 15, 2024
a34bc33
chat redesign of org list
Oct 18, 2024
cdf1753
Merge branch 'refs/heads/develop' into feature/organization
Oct 22, 2024
824985c
changed org list view in chat
Oct 22, 2024
f293210
fixes of role view in chat for organization
Oct 30, 2024
28420b3
added page for customer search, fixes of invite user in organization,…
Nov 4, 2024
b6a21cd
added link for show user profile in org message author
Nov 4, 2024
9494ae3
added link to view profile of sender in chat
Nov 5, 2024
a0b4b6a
added link to view profile of sender in chat
Nov 5, 2024
2a8a302
added link to view profile of sender in chat
Nov 5, 2024
58c1d11
Merge branch 'refs/heads/develop' into feature/organization
Dec 25, 2024
b4205f9
conflict
Dec 25, 2024
fc7f7bb
fixes of start chat with Organization.jsx
Dec 30, 2024
876f199
fixes of organization card view and fixes of layout organizations pages
Jan 16, 2025
41f18ce
changed button depend of role
Jan 16, 2025
eea8687
fixes of create request for project from auditor organization, change…
Jan 21, 2025
c14b4bb
added title for rules in organization
Jan 21, 2025
0f1e39c
Merge branch 'refs/heads/develop' into feature/organization
Jan 24, 2025
ef74020
fixes after merge conflicts
Jan 24, 2025
f645d35
Merge branch 'refs/heads/develop' into feature/organization
Feb 13, 2025
b38200c
fixes of git scope selection
Feb 13, 2025
21c378a
fixes of infinity loading in my organization page
Mar 7, 2025
306b064
Merge branch 'refs/heads/develop' into feature/organization
Mar 7, 2025
23a41b6
fixes of search organization in invite modal of project, fixes of ava…
Mar 12, 2025
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
36 changes: 36 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"formik-mui": "^4.0.0-alpha.3",
"git-url-parse": "^14.0.0",
"history": "^5.3.0",
"jdenticon": "^3.3.0",
"js-cookie": "^3.0.1",
"katex": "^0.16.4",
"lodash": "^4.17.21",
Expand All @@ -45,6 +46,7 @@
"react-diff-viewer-continued": "^3.4.0",
"react-dom": "^18.2.0",
"react-helmet-async": "^2.0.4",
"react-jdenticon": "^1.4.0",
"react-markdown": "^8.0.7",
"react-markdown-editor-lite": "^1.3.4",
"react-redux": "^8.0.5",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import React from 'react';
import Box from '@mui/material/Box';

const AddUserToOrganization = () => {
return <Box></Box>;
};
//
export default AddUserToOrganization;
65 changes: 50 additions & 15 deletions src/components/Audit-card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,58 @@ const AuditCard = ({ audit, request }) => {
<Tooltip title={audit.project_name} arrow placement="top">
<Typography sx={auditNameStyle}>{audit.project_name}</Typography>
</Tooltip>
<Box sx={{ display: 'grid' }}>
<Tooltip
title={
audit?.auditor_contacts.email !== null
? audit?.auditor_contacts?.email
: 'Hidden'
}
arrow
placement="top"
{audit?.auditor_organization?.id ? (
<Box sx={{ display: 'grid' }}>
<Tooltip
title={
audit?.auditor_organization?.contacts?.email !== null
? audit?.auditor_organization?.contacts?.email
: 'Hidden'
}
arrow
placement="top"
>
<Typography sx={nameTextStyle} noWrap={true}>
{audit?.auditor_organization?.contacts?.email !== null
? audit?.auditor_organization?.contacts?.email
: 'Hidden'}
</Typography>
</Tooltip>
</Box>
) : (
<Box sx={{ display: 'grid' }}>
<Tooltip
title={
audit?.auditor_contacts.email !== null
? audit?.auditor_contacts?.email
: 'Hidden'
}
arrow
placement="top"
>
<Typography sx={nameTextStyle} noWrap={true}>
{audit?.auditor_contacts.email !== null
? audit?.auditor_contacts?.email
: 'Hidden'}
</Typography>
</Tooltip>
</Box>
)}
{audit?.auditor_organization?.id && (
<Box
sx={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
gap: '7px',
}}
>
<Typography sx={nameTextStyle} noWrap={true}>
{audit?.auditor_contacts.email !== null
? audit?.auditor_contacts?.email
: 'Hidden'}
<Typography sx={priceTextStyle}>Organization</Typography>
<Typography sx={auditNameStyle}>
{audit?.auditor_organization?.name}
</Typography>
</Tooltip>
</Box>
</Box>
)}
<Tooltip
title={audit?.tags?.map(el => el).join(', ') ?? ''}
arrow
Expand Down
20 changes: 20 additions & 0 deletions src/components/Audit-request-card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,24 @@ const AuditRequestCard = ({ type, request, audit }) => {
</Box>
</Box>
</Box>
{request.auditor_organization?.id && (
<Box>
<Typography
variant="h5"
sx={{ mb: '7px', fontSize: '14px!important', color: 'grey' }}
textAlign="center"
>
Organization:
</Typography>
<Typography
variant="h5"
sx={[projectNameSx, { height: 'unset', maxHeight: '66px' }]}
textAlign="center"
>
{request.auditor_organization.name}
</Typography>
</Box>
)}
<Box sx={buttonWrapper}>
<Button
variant="contained"
Expand Down Expand Up @@ -239,6 +257,8 @@ const cardWrapper = theme => ({
border: '1px solid rgba(67, 66, 66, 0.1)',
alignItems: 'center',
gap: '15px',
height: '100%',
justifyContent: 'space-between',
'& h5': {
fontSize: '18px',
fontWeight: 500,
Expand Down
12 changes: 11 additions & 1 deletion src/components/Audit-request.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import React from 'react';
import React, { useEffect } from 'react';
import { Box, Button, Grid } from '@mui/material';
import AuditRequestCard from './Audit-request-card';
import { useSelector } from 'react-redux';
import { addTestsLabel } from '../lib/helper.js';
import { useNavigate } from 'react-router-dom/dist';
import Headings from '../router/Headings.jsx';
import { useDispatch } from 'react-redux';
import { getOrganizationAuditRequests } from '../redux/actions/auditAction.js';

const AuditRequest = () => {
const auditRequests = useSelector(s => s.audits.auditRequests);
const organizationAuditRequests = useSelector(
s => s.audits.organizationAuditRequests,
);
const navigate = useNavigate();

const handleNavigate = () => {
Expand Down Expand Up @@ -35,6 +40,11 @@ const AuditRequest = () => {
<AuditRequestCard request={request} />
</Grid>
))}
{organizationAuditRequests?.map(request => (
<Grid item sx={gridItemStyle} key={request.id}>
<AuditRequestCard request={request} />
</Grid>
))}
</Grid>
</Box>
);
Expand Down
70 changes: 41 additions & 29 deletions src/components/AuditorModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { setCurrentChat } from '../redux/actions/chatActions.js';
import ChatIcon from './icons/ChatIcon.jsx';
import { getAuditorRating } from '../redux/actions/auditorAction.js';
import Star from './icons/Star.jsx';
import TypeChat from './Chat/TypeChat.jsx';
import { SCOPE_GIT_BLOCK, SCOPE_LINKS } from '../services/constants.js';

export default function AuditorModal({
Expand All @@ -52,10 +53,12 @@ export default function AuditorModal({
const { auditorRating } = useSelector(s => s.auditor);
const { chatList } = useSelector(s => s.chat);
const myProjects = useSelector(state => state.project.myProjects);
const [isOpenType, setIsOpenType] = useState(false);

const [mode, setMode] = useState('info');
const [message, setMessage] = useState('');
const [scope, setScope] = useState([]);
const { organizations, own } = useSelector(s => s.organization);

const handleInvite = () => {
if (
Expand Down Expand Up @@ -94,29 +97,34 @@ export default function AuditorModal({
};

const handleSendMessage = () => {
window.scrollTo(0, 0);
// TODO add check for pm or org chat
if (organizations.length || own.length) {
setIsOpenType(true);
} else {
window.scrollTo(0, 0);

const existingChat = chatList.find(chat =>
chat.members?.find(
member =>
member.id === auditor?.user_id &&
member.role?.toLowerCase() === AUDITOR,
),
);
const chatId = existingChat ? existingChat.id : auditor?.user_id;
const members = [auditor?.user_id, user.id];
const existingChat = chatList.find(chat =>
chat.members?.find(
member =>
member.id === auditor?.user_id &&
member.role?.toLowerCase() === AUDITOR,
),
);
const chatId = existingChat ? existingChat.id : auditor?.user_id;
const members = [auditor?.user_id, user.id];

dispatch(
setCurrentChat(chatId, {
name: auditor.first_name,
avatar: auditor.avatar,
role: AUDITOR,
isNew: !existingChat,
members,
}),
);
localStorage.setItem('path', window.location.pathname);
navigate(`/chat/${existingChat ? existingChat.id : auditor?.user_id}`);
dispatch(
setCurrentChat(chatId, {
name: auditor.first_name,
avatar: auditor.avatar,
role: AUDITOR,
isNew: !existingChat,
members,
}),
);
localStorage.setItem('path', window.location.pathname);
navigate(`/chat/${existingChat ? existingChat.id : auditor?.user_id}`);
}
};

useEffect(() => {
Expand Down Expand Up @@ -306,14 +314,17 @@ export default function AuditorModal({
Invite to project
</Button>
{!budge && (
<Button
variant="text"
onClick={handleSendMessage}
disabled={auditor?.user_id === user.id}
{...addTestsLabel('message-button')}
>
<ChatIcon />
</Button>
// <Button
// variant="text"
// // sx={[findButton, messageButton]}
// onClick={handleSendMessage}
// disabled={auditor?.user_id === user.id}
// {...addTestsLabel('message-button')}
// >
// <ChatIcon />
// {isOpenType && <TypeChat />}
// </Button>
<TypeChat auditor={auditor} />
)}
</Box>
</Box>
Expand Down Expand Up @@ -678,6 +689,7 @@ const dateWrapper = {
},
},
};

const dateStyle = {
width: '150px',
height: '40px',
Expand Down
Loading