-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added extensions sozialplattform
- Loading branch information
Showing
52 changed files
with
1,893 additions
and
25 deletions.
There are no files selected for viewing
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
42 changes: 42 additions & 0 deletions
42
src/extensions/components/formAccordion/FormAccordionRegistrationText.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { setValueInCookie } from '../../../components/sessionCookie/accessSessionCookie'; | ||
import { AgencyDataInterface } from '../../../globalState'; | ||
import * as React from 'react'; | ||
import { useEffect } from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import './formAccordionRegistrationText.styles'; | ||
|
||
interface FormAccordionRegistrationTextProps { | ||
agency: AgencyDataInterface; | ||
} | ||
|
||
export const FormAccordionRegistrationText = ( | ||
props: FormAccordionRegistrationTextProps | ||
) => { | ||
const { t: translate } = useTranslation(); | ||
|
||
useEffect(() => { | ||
props?.agency?.tenantId && | ||
setValueInCookie( | ||
'tenantId', | ||
props?.agency?.tenantId?.toString() || '0' | ||
); | ||
}, [props.agency]); | ||
|
||
return ( | ||
<p> | ||
{translate('registration.tsys.prefix')} | ||
<span> | ||
<button | ||
type="button" | ||
className="button-as-link-registration" | ||
onClick={() => | ||
window.open(`${window.location.origin}/datenschutz`) | ||
} | ||
> | ||
{translate('registration.tsys.button')} | ||
</button> | ||
</span> | ||
{translate('registration.tsys.sufix')} | ||
</p> | ||
); | ||
}; |
31 changes: 31 additions & 0 deletions
31
src/extensions/components/formAccordion/formAccordionRegistrationText.styles.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
.button-as-link-registration { | ||
border: none; | ||
background: none; | ||
padding: 0; | ||
|
||
color: $link-color; | ||
text-decoration: $link-text-decoration; | ||
font-weight: $link-font-weight; | ||
|
||
&:hover { | ||
color: $link-color-hover; | ||
text-decoration: $link-text-decoration-hover; | ||
cursor: pointer; | ||
} | ||
|
||
&:focus { | ||
outline: $focus-outline; | ||
outline-offset: 4px; | ||
border-radius: 4px; | ||
} | ||
|
||
&:focus:not(:focus-visible) { | ||
outline: none; | ||
} | ||
} | ||
|
||
.registrationForm__dataProtection { | ||
.checkbox__wrapper { | ||
justify-content: start; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/extensions/components/legalInformationLinks/Imprint.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import * as React from 'react'; | ||
import { useTenant } from '../../../../'; | ||
import { LegalPageWrapper } from '../legalPageWrapper/LegalPageWrapper'; | ||
import useDocumentTitle from '../../utils/useDocumentTitle'; | ||
import { useTranslation } from 'react-i18next'; | ||
|
||
export const Imprint = () => { | ||
const [t] = useTranslation(); | ||
const tenant = useTenant(); | ||
useDocumentTitle(t('profile.footer.imprint')); | ||
return ( | ||
<LegalPageWrapper | ||
content={tenant?.content?.impressum || t('profile.footer.imprint')} | ||
className={'terms'} | ||
/> | ||
); | ||
}; |
24 changes: 24 additions & 0 deletions
24
src/extensions/components/legalInformationLinks/Privacy.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import * as React from 'react'; | ||
import { useTenant } from '../../../../'; | ||
import useUrlParamsLoader from '../../../utils/useUrlParamsLoader'; | ||
import { LegalPageWrapper } from '../legalPageWrapper/LegalPageWrapper'; | ||
import useDocumentTitle from '../../utils/useDocumentTitle'; | ||
import { useTranslation } from 'react-i18next'; | ||
|
||
export const Privacy = () => { | ||
const [t] = useTranslation(); | ||
const tenant = useTenant(); | ||
const { agency } = useUrlParamsLoader(); | ||
useDocumentTitle(t('profile.footer.dataprotection')); | ||
|
||
return ( | ||
<LegalPageWrapper | ||
content={ | ||
agency?.agencySpecificPrivacy || | ||
tenant?.content?.renderedPrivacy || | ||
t('profile.footer.dataprotection') | ||
} | ||
className={'terms'} | ||
/> | ||
); | ||
}; |
22 changes: 22 additions & 0 deletions
22
src/extensions/components/legalInformationLinks/TermsAndConditions.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import * as React from 'react'; | ||
import { useTenant } from '../../../../'; | ||
|
||
import { LegalPageWrapper } from '../legalPageWrapper/LegalPageWrapper'; | ||
import useDocumentTitle from '../../utils/useDocumentTitle'; | ||
import { useTranslation } from 'react-i18next'; | ||
|
||
export const TermsAndConditions = () => { | ||
const [t] = useTranslation(); | ||
const tenant = useTenant(); | ||
useDocumentTitle(t('legal.termsAndConditions.label')); | ||
|
||
return ( | ||
<LegalPageWrapper | ||
content={ | ||
tenant?.content?.termsAndConditions || | ||
t('legal.termsAndConditions.label') | ||
} | ||
className="terms" | ||
/> | ||
); | ||
}; |
26 changes: 26 additions & 0 deletions
26
src/extensions/components/legalPageWrapper/LegalPageWrapper.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import clsx from 'clsx'; | ||
import * as React from 'react'; | ||
|
||
import { Stage } from '../stage/stage'; | ||
import htmlParser from '../../resources/scripts/util/htmlParser'; | ||
import './legalPageWrapper.styles.scss'; | ||
|
||
export interface LegalPageWrapperProps { | ||
className?: string; | ||
content: string; | ||
} | ||
export const LegalPageWrapper = ({ | ||
className, | ||
content | ||
}: LegalPageWrapperProps) => { | ||
return ( | ||
<div className={clsx('legalPageWrapper stageLayout', className)}> | ||
<Stage className="stageLayout__stage" /> | ||
<div className={clsx('stageLayout__content', className)}> | ||
<section className="template"> | ||
{typeof content === 'string' && htmlParser(content)} | ||
</section> | ||
</div> | ||
</div> | ||
); | ||
}; |
42 changes: 42 additions & 0 deletions
42
src/extensions/components/legalPageWrapper/legalPageWrapper.styles.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
.legalPageWrapper { | ||
@include breakpoint($fromLarge) { | ||
.stage { | ||
display: flex; | ||
} | ||
} | ||
|
||
.template { | ||
h2 + p, | ||
h3 + p, | ||
h4 + p { | ||
margin-top: 0.3rem; | ||
} | ||
ol { | ||
counter-reset: item; | ||
li { | ||
display: block; | ||
} | ||
|
||
li::before { | ||
content: counters(item, '.') '. '; | ||
counter-increment: item; | ||
font-weight: bold; | ||
} | ||
|
||
ol { | ||
counter-reset: item; | ||
} | ||
} | ||
} | ||
|
||
.stageLayout__content { | ||
align-items: flex-start; | ||
justify-content: flex-start; | ||
padding-top: 120px; | ||
|
||
@include breakpoint($fromLarge) { | ||
width: calc(60vw - 160px); | ||
left: calc(40vw + 80px); | ||
} | ||
} | ||
} |
61 changes: 61 additions & 0 deletions
61
src/extensions/components/profile/profileSettings.routes.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { | ||
hasUserAuthority, | ||
AUTHORITIES, | ||
AppConfigInterface | ||
} from '../../../../'; | ||
import { PasswordReset } from '../../../components/passwordReset/PasswordReset'; | ||
import { ConsultantNotifications } from '../../../components/profile/ConsultantNotifications'; | ||
import { DeleteAccount } from '../../../components/profile/DeleteAccount'; | ||
import { TwoFactorAuth } from '../../../components/twoFactorAuth/TwoFactorAuth'; | ||
import { | ||
TabGroups, | ||
SingleComponentType, | ||
COLUMN_LEFT, | ||
COLUMN_RIGHT | ||
} from '../../../utils/tabsHelper'; | ||
|
||
export const profileRoutesSettings = ( | ||
_selectableLocales: string[], | ||
settings: AppConfigInterface | ||
): (TabGroups | SingleComponentType)[] => [ | ||
{ | ||
title: 'profile.routes.settings.security.title', | ||
url: '/sicherheit', | ||
elements: [ | ||
{ | ||
component: PasswordReset, | ||
column: COLUMN_LEFT, | ||
order: 1 | ||
}, | ||
{ | ||
condition: (userData) => userData.twoFactorAuth?.isEnabled, | ||
component: TwoFactorAuth, | ||
column: COLUMN_LEFT | ||
} | ||
] | ||
}, | ||
{ | ||
title: 'profile.routes.notifications.title', | ||
url: '/email', | ||
elements: [ | ||
{ | ||
condition: (userData) => | ||
hasUserAuthority( | ||
AUTHORITIES.CONSULTANT_DEFAULT, | ||
userData | ||
) && !settings?.releaseToggles?.enableNewNotifications, | ||
component: ConsultantNotifications, | ||
column: COLUMN_RIGHT, | ||
order: 1 | ||
} | ||
] | ||
}, | ||
{ | ||
condition: (userData) => | ||
hasUserAuthority(AUTHORITIES.ASKER_DEFAULT, userData), | ||
component: DeleteAccount, | ||
boxed: false, | ||
order: 99, | ||
fullWidth: true | ||
} | ||
]; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.