Skip to content

Commit 0020efa

Browse files
committed
ADding Dakshata mode selection
1 parent 1e99191 commit 0020efa

File tree

5 files changed

+24
-5
lines changed

5 files changed

+24
-5
lines changed

.env

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
USE_PACKAGED_SEED_DATA=true
22
SERVER_URL=http://
3-
ALLOW_INCOMPLETE_SUBMIT=false
3+
ALLOW_INCOMPLETE_SUBMIT=false
4+
DAKSHATA=false

.env.cg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
USE_PACKAGED_SEED_DATA=false
22
SERVER_URL=http://192.168.0.155:6001
3-
ALLOW_INCOMPLETE_SUBMIT=false
3+
ALLOW_INCOMPLETE_SUBMIT=false
4+
DAKSHATA=true

.env.mp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
USE_PACKAGED_SEED_DATA=false
22
SERVER_URL=http://192.168.0.155:5000
3-
ALLOW_INCOMPLETE_SUBMIT=false
3+
ALLOW_INCOMPLETE_SUBMIT=false
4+
DAKSHATA=true

src/js/views/assessment/QuestionAnswer.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ class QuestionAnswer extends AbstractComponent {
6868
const MeasurableElement = new Map([
6969
["kayakalp", (<View/>)],
7070
["nqas", (
71+
<ListingItem labelColor={PrimaryColors.lighBlue}
72+
item={this.props.currentCheckpoint.checkpoint.measurableElement}/>)],
73+
["dakshata", (
7174
<ListingItem labelColor={PrimaryColors.lighBlue}
7275
item={this.props.currentCheckpoint.checkpoint.measurableElement}/>)]
7376
]).get(this.props.params.mode.toLowerCase());

src/js/views/modes/ModeSelection.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import PrimaryColors from "../styles/PrimaryColors";
99
import Typography from "../styles/Typography";
1010
import Dashboard from '../dashboard/Dashboard';
1111
import Settings from "../settings/Settings";
12+
import Config from 'react-native-config';
13+
1214
const nqasIcon = require('../img/nqas.png');
1315
const kayakalpIcon = require('../img/kayakalp.png');
1416
const nhsrcbanner = require('../img/nhsrcbanner.png');
@@ -31,6 +33,7 @@ class ModeSelection extends AbstractComponent {
3133
},
3234
modeContainer: {
3335
flexDirection: 'row',
36+
flexWrap: 'wrap',
3437
justifyContent: 'space-between',
3538
},
3639
header: {
@@ -52,6 +55,15 @@ class ModeSelection extends AbstractComponent {
5255
}
5356

5457
render() {
58+
let showDakshata = Config.DAKSHATA === 'true';
59+
const Dakshata = showDakshata ? (
60+
<TouchableWithoutFeedback onPress={this.handleOnPress("Dakshata")}>
61+
<View>
62+
<Text style={[Typography.paperFontDisplay2, {color: 'white',}]}>Dakshata</Text>
63+
</View>
64+
</TouchableWithoutFeedback>
65+
) : null;
66+
const additionalStyles = showDakshata ? {alignItems: 'center', justifyContent: 'center'} : {};
5567
return (
5668
<Container theme={FlatUITheme}>
5769
<Header style={ModeSelection.styles.header}>
@@ -71,7 +83,7 @@ class ModeSelection extends AbstractComponent {
7183
}]}>GUNAK गुणक</Title>
7284
</Header>
7385
<Content>
74-
<View style={ModeSelection.styles.container}>
86+
<View style={[ModeSelection.styles.container,]}>
7587
<Text style={[Typography.paperFontHeadline, {
7688
color: PrimaryColors.yellow,
7789
alignSelf: 'center',
@@ -88,7 +100,7 @@ class ModeSelection extends AbstractComponent {
88100
}]}>
89101
Choose an Assessment Type
90102
</Text>
91-
<View style={ModeSelection.styles.modeContainer}>
103+
<View style={[ModeSelection.styles.modeContainer, additionalStyles]}>
92104
<TouchableWithoutFeedback onPress={this.handleOnPress("NQAS")}>
93105
<View style={ModeSelection.styles.mode}>
94106
<Image resizeMode="contain"
@@ -111,6 +123,7 @@ class ModeSelection extends AbstractComponent {
111123
source={kayakalpIcon}/>
112124
</View>
113125
</TouchableWithoutFeedback>
126+
{Dakshata}
114127
</View>
115128
</View>
116129
</Content>

0 commit comments

Comments
 (0)