diff --git a/cypress/fixtures/registration/consultingType.json b/cypress/fixtures/registration/consultingType.json index eaa00a1c2..0aa5a4500 100644 --- a/cypress/fixtures/registration/consultingType.json +++ b/cypress/fixtures/registration/consultingType.json @@ -24,7 +24,6 @@ "slug": "suchtberatung", "languageFormal": true, "lockedAgencies": false, - "excludeNonMainConsultantsFromTeamSessions": false, "whiteSpot": { "whiteSpotAgencyAssigned": true, "whiteSpotAgencyId": 100 diff --git a/cypress/fixtures/service.consultingtypes.addiction.json b/cypress/fixtures/service.consultingtypes.addiction.json index eaa00a1c2..0aa5a4500 100644 --- a/cypress/fixtures/service.consultingtypes.addiction.json +++ b/cypress/fixtures/service.consultingtypes.addiction.json @@ -24,7 +24,6 @@ "slug": "suchtberatung", "languageFormal": true, "lockedAgencies": false, - "excludeNonMainConsultantsFromTeamSessions": false, "whiteSpot": { "whiteSpotAgencyAssigned": true, "whiteSpotAgencyId": 100 diff --git a/cypress/fixtures/service.consultingtypes.emigration.json b/cypress/fixtures/service.consultingtypes.emigration.json index 83f9f2398..c1e87b1a7 100644 --- a/cypress/fixtures/service.consultingtypes.emigration.json +++ b/cypress/fixtures/service.consultingtypes.emigration.json @@ -26,7 +26,6 @@ "slug": "rw-auswanderung", "languageFormal": true, "lockedAgencies": false, - "excludeNonMainConsultantsFromTeamSessions": false, "whiteSpot": { "whiteSpotAgencyAssigned": true, "whiteSpotAgencyId": 1731 diff --git a/cypress/fixtures/service.consultingtypes.pregnancy.json b/cypress/fixtures/service.consultingtypes.pregnancy.json index 47d68f190..634fbc826 100644 --- a/cypress/fixtures/service.consultingtypes.pregnancy.json +++ b/cypress/fixtures/service.consultingtypes.pregnancy.json @@ -25,7 +25,6 @@ "slug": "suchtberatung", "languageFormal": true, "lockedAgencies": false, - "excludeNonMainConsultantsFromTeamSessions": false, "whiteSpot": { "whiteSpotAgencyAssigned": true, "whiteSpotAgencyId": 100 diff --git a/cypress/fixtures/service.consultingtypes.u25.json b/cypress/fixtures/service.consultingtypes.u25.json index cb671867b..e7e6ca018 100644 --- a/cypress/fixtures/service.consultingtypes.u25.json +++ b/cypress/fixtures/service.consultingtypes.u25.json @@ -28,7 +28,6 @@ "slug": "u25", "languageFormal": false, "lockedAgencies": false, - "excludeNonMainConsultantsFromTeamSessions": false, "whiteSpot": { "whiteSpotAgencyAssigned": false }, diff --git a/cypress/fixtures/service.users.sessions.room.json b/cypress/fixtures/service.users.sessions.room.json index 09d009609..065ba98dd 100644 --- a/cypress/fixtures/service.users.sessions.room.json +++ b/cypress/fixtures/service.users.sessions.room.json @@ -7,7 +7,6 @@ "postcode": "12345", "language": "de", "groupId": "someGroupId", - "isPeerChat": false, "askerRcId": "askerRcId", "e2eLastMessage": null, "lastMessage": null, diff --git a/cypress/support/sessions.ts b/cypress/support/sessions.ts index 692afa88b..4b12b324c 100644 --- a/cypress/support/sessions.ts +++ b/cypress/support/sessions.ts @@ -48,7 +48,6 @@ export const generateConsultantSession = ({ messageDate: 1606900238, messagesRead: messagesRead === undefined ? true : messagesRead, isTeamSession: true, - isPeerChat: false, attachment: null, registrationType: 'REGISTERED', e2eLastMessage: { @@ -114,7 +113,6 @@ export const generateAskerSession = ({ messageDate: null, messagesRead: messagesRead === undefined ? true : messagesRead, isTeamSession: isTeamSession === undefined ? true : isTeamSession, - isPeerChat: false, attachment: null, registrationType: 'REGISTERED', e2eLastMessage: { diff --git a/src/components/askerInfo/AskerInfoContent.tsx b/src/components/askerInfo/AskerInfoContent.tsx index 3902fa223..286e1dd1f 100644 --- a/src/components/askerInfo/AskerInfoContent.tsx +++ b/src/components/askerInfo/AskerInfoContent.tsx @@ -24,7 +24,6 @@ export const AskerInfoContent = () => { const { type } = useContext(SessionTypeContext); const isSessionAssignAvailable = useMemo(() => { - const isPeerChat = activeSession.item.isPeerChat; const isLiveChat = activeSession.isLive; const isGroupChat = activeSession.isGroup; const isEnquiryListView = type === SESSION_LIST_TYPES.ENQUIRY; @@ -36,7 +35,6 @@ export const AskerInfoContent = () => { if (isEnquiryListView) { return ( - isPeerChat && hasUserAuthority( AUTHORITIES.ASSIGN_CONSULTANT_TO_ENQUIRY, userData @@ -45,9 +43,7 @@ export const AskerInfoContent = () => { } return hasUserAuthority( - isPeerChat - ? AUTHORITIES.ASSIGN_CONSULTANT_TO_PEER_SESSION - : AUTHORITIES.ASSIGN_CONSULTANT_TO_SESSION, + AUTHORITIES.ASSIGN_CONSULTANT_TO_SESSION, userData ); }, [activeSession, type, userData]); diff --git a/src/components/session/SessionItemComponent.tsx b/src/components/session/SessionItemComponent.tsx index ca2d96ffe..7dca7e695 100644 --- a/src/components/session/SessionItemComponent.tsx +++ b/src/components/session/SessionItemComponent.tsx @@ -83,8 +83,7 @@ export const SessionItemComponent = (props: SessionItemProps) => { useEffect(() => { setCanWriteMessage( - type !== SESSION_LIST_TYPES.ENQUIRY || - hasUserAuthority(AUTHORITIES.VIEW_ALL_PEER_SESSIONS, userData) + type !== SESSION_LIST_TYPES.ENQUIRY ); }, [type, userData]); @@ -191,16 +190,6 @@ export const SessionItemComponent = (props: SessionItemProps) => { return translate('enquiry.write.input.placeholder.groupChat'); } else if (hasUserAuthority(AUTHORITIES.ASKER_DEFAULT, userData)) { return translate('enquiry.write.input.placeholder.asker'); - } else if ( - hasUserAuthority(AUTHORITIES.VIEW_ALL_PEER_SESSIONS, userData) && - activeSession.isFeedback - ) { - return translate('enquiry.write.input.placeholder.feedback.main'); - } else if ( - hasUserAuthority(AUTHORITIES.CONSULTANT_DEFAULT, userData) && - activeSession.isFeedback - ) { - return translate('enquiry.write.input.placeholder.feedback.peer'); } else if (hasUserAuthority(AUTHORITIES.CONSULTANT_DEFAULT, userData)) { return translate('enquiry.write.input.placeholder.consultant'); } @@ -443,13 +432,6 @@ export const SessionItemComponent = (props: SessionItemProps) => { {type === SESSION_LIST_TYPES.ENQUIRY && ( diff --git a/src/components/sessionsList/EmptyListItem.tsx b/src/components/sessionsList/EmptyListItem.tsx index 14d930c6d..c79e481cd 100644 --- a/src/components/sessionsList/EmptyListItem.tsx +++ b/src/components/sessionsList/EmptyListItem.tsx @@ -31,13 +31,7 @@ export const EmptyListItem = ({ type, sessionListTab }: EmptyListItemProps) => { switch (type) { case SESSION_LIST_TYPES.TEAMSESSION: - const emptyKey = hasUserAuthority( - AUTHORITIES.VIEW_ALL_PEER_SESSIONS, - userData - ) - ? 'peerSessions' - : 'teamSessions'; - return t(`sessionList.empty.${emptyKey}`); + return t(`sessionList.empty.teamSessions`); case SESSION_LIST_TYPES.ENQUIRY: return t('sessionList.empty.known'); case SESSION_LIST_TYPES.MY_SESSION: diff --git a/src/components/sessionsList/SessionsListWrapper.tsx b/src/components/sessionsList/SessionsListWrapper.tsx index 4df7b0974..f76ccbe1d 100644 --- a/src/components/sessionsList/SessionsListWrapper.tsx +++ b/src/components/sessionsList/SessionsListWrapper.tsx @@ -67,34 +67,22 @@ export const SessionsListWrapper = ({ {type === SESSION_LIST_TYPES.MY_SESSION ? translate('sessionList.view.headline') : null} - {type === SESSION_LIST_TYPES.TEAMSESSION && - !hasUserAuthority( - AUTHORITIES.VIEW_ALL_PEER_SESSIONS, - userData - ) + {type === SESSION_LIST_TYPES.TEAMSESSION ? translate('navigation.consultant.teamsessions.large') : null} - {type === SESSION_LIST_TYPES.TEAMSESSION && - hasUserAuthority( - AUTHORITIES.VIEW_ALL_PEER_SESSIONS, - userData - ) - ? translate('sessionList.peersessions.headline') - : null} {type === SESSION_LIST_TYPES.ENQUIRY ? translate('sessionList.preview.headline') : null} {type === SESSION_LIST_TYPES.MY_SESSION && - hasUserAuthority(AUTHORITIES.CREATE_NEW_CHAT, userData) ? ( + hasUserAuthority(AUTHORITIES.CREATE_NEW_CHAT, userData) ? (
- {type === SESSION_LIST_TYPES.TEAMSESSION && - hasUserAuthority( - AUTHORITIES.VIEW_ALL_PEER_SESSIONS, - userData - ) && - activeSession.consultant ? ( -
- {translate('sessionList.user.peer')}:{' '} - {activeSession.consultant.firstName}{' '} - {activeSession.consultant.lastName} -
- ) : ( -
- {!isAsker && - !activeSession.isLive && - !autoSelectPostcode - ? activeSession.item.postcode - : null} -
- )} +
+ {!isAsker && + !activeSession.isLive && + !autoSelectPostcode + ? activeSession.item.postcode + : null} +
{topic?.name && (