Adding work item details to activity

This commit is contained in:
John Lyon-Smith
2018-06-04 19:01:12 -07:00
parent cffa0734b8
commit e09a8b87de
6 changed files with 153 additions and 70 deletions

View File

@@ -31,7 +31,7 @@ import { formatLatLng, workItemTypeEnum } from "../util"
import moment from "moment"
import "url-search-params-polyfill"
import { config } from "../config"
import { FormStaticOptionStrip } from "../ui/FormStaticOptionStrip"
import { FormStaticOptionStrip, FormStaticPhotoPanel } from "../ui"
const styles = StyleSheet.create({
container: {
@@ -127,6 +127,7 @@ export class Activity extends React.Component {
dateTime: moment().format(),
details: workItem.details,
workItemType: workItem.workItemType,
workItemPhotos: workItem.photos,
})
this.region = {
@@ -294,6 +295,7 @@ export class Activity extends React.Component {
details,
workItemType,
uploadPercent,
workItemPhotos,
} = this.state
return (
@@ -347,6 +349,10 @@ export class Activity extends React.Component {
value={workItemType}
/>
<FormStaticInput label="Details:" value={details} />
<FormStaticPhotoPanel
label="Work Item Photos:"
value={workItemPhotos}
/>
<FormStaticInput label="Location:" value={location} />
<View style={{ flexDirection: "column", justifyContent: "center" }}>
<MapView