Skip to content

Commit

Permalink
Merge pull request #123 from virtualidentityag/bug/DIAKONIE-386-remov…
Browse files Browse the repository at this point in the history
…e-delete-chat

fix(deleteSession): remove functionality to remove a session
  • Loading branch information
koepferd authored Aug 15, 2024
2 parents e092210 + 2a3393f commit 24cb873
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 194 deletions.
11 changes: 0 additions & 11 deletions src/api/apiDeleteRemove.ts

This file was deleted.

107 changes: 0 additions & 107 deletions src/components/session/DeleteSession.tsx

This file was deleted.

24 changes: 0 additions & 24 deletions src/components/sessionMenu/SessionMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ import { ReactComponent as CallOnIcon } from '../../resources/img/icons/call-on.
import { ReactComponent as CameraOnIcon } from '../../resources/img/icons/camera-on.svg';
import { ReactComponent as CalendarMonthPlusIcon } from '../../resources/img/icons/calendar-plus.svg';
import { supportsE2EEncryptionVideoCall } from '../../utils/videoCallHelpers';
import DeleteSession from '../session/DeleteSession';
import { Text } from '../text/Text';
import { useSearchParam } from '../../hooks/useSearchParams';
import { useAppConfig } from '../../hooks/useAppConfig';
Expand Down Expand Up @@ -299,10 +298,6 @@ export const SessionMenu = (props: SessionMenuProps) => {
}
};

const onSuccessDeleteSession = useCallback(() => {
setRedirectToSessionsList(true);
}, []);

//TODO:
//enquiries: only RS profil
//sessions/peer/team: feedback (if u25), rs, docu
Expand Down Expand Up @@ -566,25 +561,6 @@ export const SessionMenu = (props: SessionMenuProps) => {
</>
)}

{hasUserAuthority(AUTHORITIES.CONSULTANT_DEFAULT, userData) &&
type !== SESSION_LIST_TYPES.ENQUIRY &&
activeSession.isSession &&
!activeSession.isLive && (
<DeleteSession
chatId={activeSession.item.id}
onSuccess={onSuccessDeleteSession}
>
{(onClick) => (
<div
onClick={onClick}
className="sessionMenu__item"
>
{translate('chatFlyout.remove')}
</div>
)}
</DeleteSession>
)}

{activeSession.isGroup && (
<SessionMenuFlyoutGroup
editGroupChatSettingsLink={editGroupChatSettingsLink}
Expand Down
23 changes: 1 addition & 22 deletions src/resources/i18n/de/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@
"groupChatInfo": "Chat-Info",
"imprint": "Impressum",
"leaveGroupChat": "Chat verlassen",
"remove": "Löschen",
"stopGroupChat": "Chat beenden"
},
"consultant": {
Expand Down Expand Up @@ -490,24 +489,6 @@
"headline": "Sie haben Ihren Account bei der Diakonie Beratung erfolgreich gelöscht."
}
},
"deleteSession": {
"confirmOverlay": {
"button": {
"confirm": "Ja",
"deny": "Nein"
},
"copy": "Möchten Sie den Chat wirklich löschen?",
"headline": "Chat löschen"
},
"errorOverlay": {
"button": "Ok",
"headline": "Ups! Wir konnten den Chat gerade nicht löschen. Bitte versuchen Sie es noch einmal."
},
"successOverlay": {
"button": "Ok",
"headline": "Sie haben den Chat erfolgreich gelöscht."
}
},
"e2ee": {
"attachment": {
"decryption_error": "Fehler beim entschlüsseln",
Expand Down Expand Up @@ -1159,7 +1140,6 @@
"legal": {
"infoText": {
"dataprotection": "Datenschutzerklärung",
"termsAndConditions": "Nutzungsbedingungen",
"impressum": "Impressum"
}
},
Expand Down Expand Up @@ -1432,8 +1412,7 @@
"firstName": "Vorname",
"info": {
"private": "Diese Daten können die Ratsuchenden nicht einsehen.",
"public": "Mit dem Anzeigenamen erscheinen Sie bei den Ratsuchenden.",
"nameChangePropagation": "Es kann bis zu 15 Minuten dauern, bis die Änderung des Anzeigenamens wirksam wird."
"public": "Mit dem Anzeigenamen erscheinen Sie bei den Ratsuchenden."
},
"lastName": "Nachname",
"personal": {
Expand Down
11 changes: 0 additions & 11 deletions src/resources/i18n/de@informal/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,6 @@
"headline": "Du hast Deinen Account bei der Diakonie Beratung erfolgreich gelöscht."
}
},
"deleteSession": {
"confirmOverlay": {
"copy": "Möchtest Du den Chat wirklich löschen?"
},
"errorOverlay": {
"headline": "Ups! Wir konnten den Chat gerade nicht löschen. Bitte versuche es erneut."
},
"successOverlay": {
"headline": "Du hast den Chat erfolgreich gelöscht."
}
},
"e2ee": {
"attachment": {
"error": {
Expand Down
19 changes: 0 additions & 19 deletions src/resources/i18n/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,6 @@
"groupChatInfo": "Chat info",
"imprint": "Imprint",
"leaveGroupChat": "Leave chat",
"remove": "Delete",
"stopGroupChat": "End chat"
},
"consultant": {
Expand Down Expand Up @@ -478,24 +477,6 @@
"headline": "You have successfully deleted your Caritas Consulting & Help account."
}
},
"deleteSession": {
"confirmOverlay": {
"button": {
"confirm": "yes",
"deny": "no"
},
"copy": "Do you really want to delete the chat?",
"headline": "Delete chat"
},
"errorOverlay": {
"button": "ok",
"headline": "Oops! We could not delete the chat right now. Please try again."
},
"successOverlay": {
"button": "ok",
"headline": "You have deleted the chat successfully."
}
},
"e2ee": {
"attachment": {
"decryption_error": "Error while decrypting",
Expand Down

0 comments on commit 24cb873

Please sign in to comment.