Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
Feature/map export (#239)
Browse files Browse the repository at this point in the history
* model enhanced

* add consent ckb for search portal

* text for searchPortalConsent

Co-authored-by: Gordon Grund <[email protected]>
  • Loading branch information
fOppenheimer and ggrund-tsi authored Sep 23, 2021
1 parent 38295da commit e84b117
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/assets/i18n/de/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,6 @@
"user-conflict-error": "Der Benutzername ist bereits vergeben!",
"group-conflict-error": "Der Gruppenname ist bereits vergeben!",
"additional-info": "Zusätzliche Informationen",
"additional-info-tooltip": "Hier kann man zum Beispiel eine Personalausweisnummer eintragen. Die Daten werden auf dem Testbeleg ausgegeben."
"additional-info-tooltip": "Hier kann man zum Beispiel eine Personalausweisnummer eintragen. Die Daten werden auf dem Testbeleg ausgegeben.",
"searchPortalConsent": "Im Schnelltestsuch- portal anzeigen"
}
3 changes: 2 additions & 1 deletion src/assets/i18n/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,6 @@
"for-counter": "für patient data acquisition",
"user-conflict-error": "Username is already in use!",
"additional-info": "Additional Information",
"additional-info-tooltip": "E.G. for ID-Card No."
"additional-info-tooltip": "E.G. for ID-Card No.",
"searchPortalConsent": "Show in quick test search portal"
}
12 changes: 11 additions & 1 deletion src/components/modals/group-modal.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { Button, Modal, Form, Col, Row, Spinner, Fade, Container } from 'react-b

import '../../i18n';
import { useTranslation } from 'react-i18next';
import { FormGroupTextarea, FormGroupInput, FormGroupSelect } from '../modules/form-group.component';
import { FormGroupTextarea, FormGroupInput, FormGroupSelect, FormGroupPermissionCkb } from '../modules/form-group.component';
import { IGroupDetails, IGroupNode, IGroup } from '../../misc/user';
import { useGetGroupDetails } from '../../api';
import CwaSpinner from '../spinner/spinner.component';
Expand All @@ -34,6 +34,7 @@ const emptyGroup: IGroupDetails = {
pocId: '',
name: '',
pocDetails: '',
searchPortalConsent: false,
parentGroup: ''
}

Expand Down Expand Up @@ -231,6 +232,8 @@ const GroupModal = (props: any) => {
InvalidText={t('translation:group-conflict-error')}
/>

{/* <hr /> */}

< FormGroupTextarea controlId='formAdressData' title={t('translation:address-testcenter')} placeholder={t('translation:address-testcenter-placeholder')}
value={data}
required
Expand All @@ -239,6 +242,13 @@ const GroupModal = (props: any) => {
maxLength={300}
/>

<FormGroupPermissionCkb controlId='formRoleCounter' title={t('translation:searchPortalConsent')}
//label={t('translation:for-counter')}
onChange={(evt: any) => updateGroupProp('searchPortalConsent', evt.currentTarget.checked)}
type='checkbox'
checked={group.searchPortalConsent}
/>

{!(group && group.pocId)
? <></>
: <>
Expand Down
2 changes: 1 addition & 1 deletion src/components/modules/form-group.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export const FormGroupConsentCkb = (props: any) => {
export const FormGroupPermissionCkb = (props: any) => {

return (!props ? <></> :
<Form.Group as={Row} controlId='props.controlId' className='mb-1'>
<Form.Group as={Row} controlId={props.controlId} className='mb-1'>
<Form.Label className='input-label' column xs='5' sm='3'>{props.title + (props.required ? '*' : '')}</Form.Label>
<Col xs='7' sm='9' className='jcc-xs-jcfs-md '>
<Form.Check className='d-flex align-self-center'>
Expand Down
1 change: 1 addition & 0 deletions src/misc/user.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export interface IGroupDetails {
name: string,
pocDetails: string,
pocId: string,
searchPortalConsent: boolean,
parentGroup?: string,
}

0 comments on commit e84b117

Please sign in to comment.