File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
packages/openchs-android/src/views Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 1
- import { Text , TouchableOpacity , View } from "react-native" ;
1
+ import { Text , TouchableOpacity , View , Image } from "react-native" ;
2
2
import ListView from "deprecated-react-native-listview" ;
3
3
import PropTypes from 'prop-types' ;
4
4
import React , { Fragment } from "react" ;
@@ -22,6 +22,7 @@ import EncounterService from "../../service/EncounterService";
22
22
import CustomActivityIndicator from "../CustomActivityIndicator" ;
23
23
import PhoneCall from "../../model/PhoneCall" ;
24
24
import { TaskActionNames as Actions } from "../../action/task/TaskActions" ;
25
+ import SignatureFormElement from "../form/formElement/SignatureFormElement" ;
25
26
26
27
class Observations extends AbstractComponent {
27
28
static propTypes = {
@@ -163,6 +164,13 @@ class Observations extends AbstractComponent {
163
164
</ View >
164
165
</ View >
165
166
) ;
167
+ } else if ( renderType === Concept . dataType . Signature ) {
168
+ return (
169
+ < View style = { this . styles . observationColumn } >
170
+ < Image width = { 100 } height = { 100 } source = { { uri : `file://${ SignatureFormElement . signatureFileDirectory } /${ observationModel . getValueWrapper ( ) . getValue ( ) } ` } } />
171
+ < Text > </ Text >
172
+ </ View >
173
+ ) ;
166
174
} else if ( Concept . dataType . Media . includes ( renderType ) ) {
167
175
const allMediaURIs = _ . split ( displayable . displayValue , ',' ) ;
168
176
return (
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ import SingleSelectEncounterFormElement from "./formElement/SingleSelectEncounte
43
43
import MultiSelectEncounterFormElement from "./formElement/MultiSelectEncounterFormElement" ;
44
44
import MediaV2FormElement from "./formElement/MediaV2FormElement" ;
45
45
import Colors from "../primitives/Colors" ;
46
+ import SignatureFormElement from "./formElement/SignatureFormElement" ;
46
47
47
48
class FormElementGroup extends AbstractComponent {
48
49
static propTypes = {
@@ -220,6 +221,14 @@ class FormElementGroup extends AbstractComponent {
220
221
value = { this . getSelectedAnswer ( formElement . concept , new MultipleCodedValues ( ) ) }
221
222
validationResult = { validationResult }
222
223
/> , uniqueKey , formElement . uuid === erroredUUID ) ;
224
+ } else if ( formElement . concept . datatype === Concept . dataType . Signature ) {
225
+ return this . wrap ( < SignatureFormElement
226
+ key = { uniqueKey }
227
+ element = { formElement }
228
+ actionName = { this . props . actions [ "TOGGLE_SINGLESELECT_ANSWER" ] }
229
+ value = { this . getSelectedAnswer ( formElement . concept , new PrimitiveValue ( ) ) }
230
+ validationResult = { validationResult }
231
+ /> , uniqueKey , formElement . uuid === erroredUUID ) ;
223
232
} else if ( [ Concept . dataType . ImageV2 ] . includes ( formElement . concept . datatype ) ) {
224
233
return this . wrap ( < MediaV2FormElement
225
234
key = { uniqueKey }
You can’t perform that action at this time.
0 commit comments