Bug fixing
@@ -27,9 +27,9 @@ import { ensurePermissions } from "../App"
|
||||
import { versionInfo } from "../version"
|
||||
import { config } from "../config"
|
||||
import KeyboardSpacer from "react-native-keyboard-spacer"
|
||||
import hardhatPinImage from "./images/hardhat.png"
|
||||
import clipboardPinImage from "./images/clipboard.png"
|
||||
import questionPinImage from "./images/question.png"
|
||||
import hardhatPinImage from "./images/hardhat-pin.png"
|
||||
import clipboardPinImage from "./images/clipboard-pin.png"
|
||||
import questionPinImage from "./images/question-pin.png"
|
||||
|
||||
const neverAskForLocationPermissionKeyName = "NeverAskForLocationPermission"
|
||||
const neverAskForCameraKeyName = "NeverAskForCameraPermission"
|
||||
@@ -141,7 +141,7 @@ export class Home extends React.Component {
|
||||
|
||||
if (this.state.positionInfo) {
|
||||
const coords = this.state.positionInfo.coords
|
||||
const workItem = sections[sectionIndex]
|
||||
const workItem = this.sections[sectionIndex]
|
||||
const [lng, lat] = workItem.location.coordinates
|
||||
|
||||
this.setState({
|
||||
@@ -159,16 +159,16 @@ export class Home extends React.Component {
|
||||
@autobind
|
||||
handleWorkItemsListPress() {
|
||||
const { positionInfo } = this.state
|
||||
this.props.history.push(
|
||||
`/workItemList${
|
||||
positionInfo
|
||||
? "?latLng=" +
|
||||
coords.latitude.toString() +
|
||||
"," +
|
||||
coords.longitude.toString()
|
||||
: ""
|
||||
}`
|
||||
)
|
||||
|
||||
if (positionInfo) {
|
||||
const { coords } = positionInfo
|
||||
|
||||
this.props.history.push(
|
||||
`/workItemList?latLng=${coords.latitude},${coords.longitude}`
|
||||
)
|
||||
} else {
|
||||
this.props.history.push("/workItemList")
|
||||
}
|
||||
}
|
||||
|
||||
@autobind
|
||||
@@ -184,8 +184,8 @@ export class Home extends React.Component {
|
||||
@autobind
|
||||
handleGlassesPress() {
|
||||
const { lat: lat1, lng: lng1 } = this.state.positionInfo.coords
|
||||
const closestWorkItem = null
|
||||
const shortestDistance = config.minDistanceToItem
|
||||
let closestWorkItem = null
|
||||
let shortestDistance = config.minDistanceToItem
|
||||
|
||||
this.state.sections.forEach((workItem) => {
|
||||
const [lng2, lat2] = workItem.location.coordinates
|
||||
@@ -270,7 +270,7 @@ export class Home extends React.Component {
|
||||
showsBuildings={false}
|
||||
showsTraffic={false}
|
||||
showsIndoors={false}
|
||||
zoomControlEnabled
|
||||
zoomControlEnabled={false}
|
||||
region={region}>
|
||||
{sections.map((workItem, index) => (
|
||||
<Marker
|
||||
|
||||
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.4 KiB |
BIN
mobile/src/Home/images/clipboard-pin@1x.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 1.6 KiB |
BIN
mobile/src/Home/images/hardhat-pin@1x.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 1.7 KiB |
BIN
mobile/src/Home/images/question-pin@1x.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 5.1 KiB |