Skip to content

Commit 7cb248c

Browse files
authored
Merge pull request #12 from WildAid/main
Back Merge 2
2 parents 62d03b6 + 5dd63ca commit 7cb248c

File tree

4 files changed

+12
-18
lines changed

4 files changed

+12
-18
lines changed

src/components/boardings/boarding-edit/basic-info/basic-info.section.js

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const boardingChartOptions = {
2121
};
2222

2323
class BasicInfoSection extends Component {
24-
state = { dateTime: new Date(), location: { latitude: 0, longitude: 0 } };
24+
state = { dateTime: new Date(), location: [0, 0] };
2525

2626
handleDateChange = (value) => {
2727
this.setState({
@@ -35,19 +35,13 @@ class BasicInfoSection extends Component {
3535
};
3636

3737
handleLocationChange = (long, lat) => {
38-
const location = {
39-
longitude: parseFloat(long),
40-
latitude: parseFloat(lat),
41-
};
38+
const location = [parseFloat(long), parseFloat(lat)];
4239
this.setState({
4340
location: location,
4441
});
4542
if (this.props.onChange) {
4643
const { dataObject } = this.props;
47-
dataObject.location = {
48-
longitude: new BSON.Double(parseFloat(long)),
49-
latitude: new BSON.Double(parseFloat(lat)),
50-
};;
44+
dataObject.location = [new BSON.Double(parseFloat(long)), new BSON.Double(parseFloat(lat))];
5145
this.props.onChange(dataObject);
5246
}
5347
};
@@ -122,10 +116,10 @@ class BasicInfoSection extends Component {
122116
id="latitudeField"
123117
label={t("BOARDING_PAGE.VIEW_BOARDING.LATTITUDE")}
124118
className="half-row-view"
125-
value={location.latitude}
119+
value={location[1]}
126120
onChange={(event) => {
127121
this.handleLocationChange(
128-
location.longitude,
122+
location[0],
129123
event.target.value
130124
);
131125
}}
@@ -134,11 +128,11 @@ class BasicInfoSection extends Component {
134128
id="longitudeField"
135129
label={t("BOARDING_PAGE.VIEW_BOARDING.LONGTITUDE")}
136130
className="half-row-view"
137-
value={location.longitude}
131+
value={location[0]}
138132
onChange={(event) => {
139133
this.handleLocationChange(
140134
event.target.value,
141-
location.latitude
135+
location[1]
142136
);
143137
}}
144138
/>

src/components/boardings/boarding-view/basic-info/basic-info.section.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ class BasicInfoSection extends Component {
3838
label={t("BOARDING_PAGE.VIEW_BOARDING.LATTITUDE")}
3939
className="half-row-view"
4040
name="lattitude"
41-
value={location.latitude}
41+
value={location[1]}
4242
/>
4343
<TextField
4444
label={t("BOARDING_PAGE.VIEW_BOARDING.LONGTITUDE")}
4545
className="half-row-view"
4646
name="time"
47-
value={location.longitude}
47+
value={location[0]}
4848
/>
4949
</div>
5050
</section>

src/components/partials/user-editor/user-editor.component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ class UserEditor extends Component {
274274
}
275275
value={values.password}
276276
/>
277-
}
277+
)}
278278
{allowRoleEditing && (
279279
<Fragment>
280280
<FormControl className="form-input">

src/config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
const config = {
2-
appName: 'WildAid O-Fish',
2+
appName: 'WildAid O-FISH',
33
realmServiceName: 'mongodb-atlas',
44
realmAppId: '',
55
database: 'wildaid',
66
chartsConfig: {
7-
baseUrl: "https://charts-dev.mongodb.com/charts-wildaid-xxxxx",
7+
baseUrl: "https://charts.mongodb.com/charts-wildaid-xxxxx",
88
"boardings": {
99
chartId: "chart-id"
1010
},

0 commit comments

Comments
 (0)