diff --git a/mobile/src/config.js b/mobile/src/config.js
index 979d475..3cfb69a 100644
--- a/mobile/src/config.js
+++ b/mobile/src/config.js
@@ -15,8 +15,8 @@ export const config = {
homeRegionDelta: 0.005,
geocodeDelayMilliseconds: 500,
- defaultUser: "john@lyon-smith.org",
- // defaultUser: "",
+ //defaultUser: "john@lyon-smith.org",
+ defaultUser: "",
// This region is downtown Toronto
initialRegion: {
@@ -27,12 +27,12 @@ export const config = {
},
// This region is Bainbridge Island
- initialRegion: {
- latitude: 47.629536,
- longitude: -122.524162,
- latitudeDelta: 0.0922,
- longitudeDelta: 0.0421,
- },
+ // initialRegion: {
+ // latitude: 47.629536,
+ // longitude: -122.524162,
+ // latitudeDelta: 0.0922,
+ // longitudeDelta: 0.0421,
+ // },
// alwaysShowWorkItemInAR: true,
}
diff --git a/website/src/App.js b/website/src/App.js
index 1f8c9f7..f51976e 100644
--- a/website/src/App.js
+++ b/website/src/App.js
@@ -13,7 +13,6 @@ import { Home } from "./Home"
import { Profile } from "./Profile"
import { Users } from "./Users"
import { Teams } from "./Teams"
-import { System } from "./System"
import { Header, Column, Footer } from "ui"
import { BrowserRouter, Route, Switch } from "react-router-dom"
import { sizeInfo } from "ui/style"
@@ -84,12 +83,6 @@ export class App extends Component {
/>
-
diff --git a/website/src/Home/Home.js b/website/src/Home/Home.js
index f1faf6f..f67fac9 100644
--- a/website/src/Home/Home.js
+++ b/website/src/Home/Home.js
@@ -1,47 +1,217 @@
import React, { Component, Fragment } from "react"
import PropTypes from "prop-types"
-import { Row, Column, PanelButton } from "ui"
-import { sizeInfo } from "ui/style"
+import { Box, Image, Column, Row, Button, Link } from "ui"
+import { MessageModal, WaitModal, YesNoMessageModal } from "../Modal"
+import { sizeInfo, colorInfo } from "ui/style"
+import headerLogo from "images/logo.png"
+import autobind from "autobind-decorator"
+import { api } from "../API"
export class Home extends Component {
static propTypes = {
- history: PropTypes.object,
+ changeTitle: PropTypes.func.isRequired,
+ }
+
+ constructor(props) {
+ super(props)
+ this.state = {
+ messageModal: null,
+ waitModal: null,
+ yesNoModal: null,
+ }
+ }
+
+ @autobind
+ handleDeleteActivities() {
+ this.setState({
+ yesNoModal: {
+ question:
+ "Are you sure you want to delete all activities in the system?",
+ onDismiss: this.handleDeleteActivitiesDismiss,
+ },
+ })
+ }
+
+ @autobind
+ handleDeleteActivitiesDismiss(yes) {
+ if (yes) {
+ this.setState({ waitModal: { message: "Deleting All Activities..." } })
+ api
+ .deleteAllActivities()
+ .then(() => {
+ this.setState({
+ waitModal: null,
+ messageModal: {
+ icon: "thumb",
+ message: "All logged activities have been deleted",
+ },
+ })
+ })
+ .catch((error) => {
+ this.setState({
+ waitModal: null,
+ messageModal: {
+ icon: "hand",
+ message: "Unable to request delete activities.",
+ detail: error.message,
+ },
+ })
+ })
+ }
+
+ this.setState({
+ yesNoModal: null,
+ })
+ }
+
+ @autobind
+ handleDeleteWorkItems() {
+ this.setState({
+ yesNoModal: {
+ question:
+ "Are you sure you want to delete all work items & activities in the system?",
+ onDismiss: this.handleDeleteWorkItemsDismiss,
+ },
+ })
+ }
+
+ @autobind
+ handleDeleteWorkItemsDismiss(yes) {
+ if (yes) {
+ this.setState({
+ waitModal: { message: "Deleting All Work Items & Activities..." },
+ })
+ api
+ .deleteAllWorkItems()
+ .then(() => {
+ this.setState({
+ waitModal: null,
+ messageModal: {
+ icon: "thumb",
+ message: "All work items and logged activities have been deleted",
+ },
+ })
+ })
+ .catch((error) => {
+ this.setState({
+ waitModal: null,
+ messageModal: {
+ icon: "hand",
+ message: "Unable to delete work items and activities.",
+ detail: error.message,
+ },
+ })
+ })
+ }
+
+ this.setState({
+ yesNoModal: null,
+ })
+ }
+
+ @autobind
+ handleMessageModalDismiss() {
+ this.setState({ messageModal: null })
}
render() {
+ const { messageModal, yesNoModal, waitModal } = this.state
+
return (
-
- this.props.history.push("/admin/users")}
- />
-
-
-
- this.props.history.push("/admin/teams")}
- />
-
-
-
- this.props.history.push("/admin/system")}
- />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Download Team Data
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
)
}
diff --git a/website/src/System/System.js b/website/src/System/System.js
deleted file mode 100644
index 0c984b1..0000000
--- a/website/src/System/System.js
+++ /dev/null
@@ -1,218 +0,0 @@
-import React, { Component, Fragment } from "react"
-import PropTypes from "prop-types"
-import { Box, Image, Column, Row, Button, Link } from "ui"
-import { MessageModal, WaitModal, YesNoMessageModal } from "../Modal"
-import { sizeInfo, colorInfo } from "ui/style"
-import headerLogo from "images/logo.png"
-import autobind from "autobind-decorator"
-import { api } from "../API"
-
-export class System extends Component {
- static propTypes = {
- changeTitle: PropTypes.func.isRequired,
- }
-
- constructor(props) {
- super(props)
- this.state = {
- messageModal: null,
- waitModal: null,
- yesNoModal: null,
- }
- }
-
- @autobind
- handleDeleteActivities() {
- this.setState({
- yesNoModal: {
- question:
- "Are you sure you want to delete all activities in the system?",
- onDismiss: this.handleDeleteActivitiesDismiss,
- },
- })
- }
-
- @autobind
- handleDeleteActivitiesDismiss(yes) {
- if (yes) {
- this.setState({ waitModal: { message: "Deleting All Activities..." } })
- api
- .deleteAllActivities()
- .then(() => {
- this.setState({
- waitModal: null,
- messageModal: {
- icon: "thumb",
- message: "All logged activities have been deleted",
- },
- })
- })
- .catch((error) => {
- this.setState({
- waitModal: null,
- messageModal: {
- icon: "hand",
- message: "Unable to request delete activities.",
- detail: error.message,
- },
- })
- })
- }
-
- this.setState({
- yesNoModal: null,
- })
- }
-
- @autobind
- handleDeleteWorkItems() {
- this.setState({
- yesNoModal: {
- question:
- "Are you sure you want to delete all work items & activities in the system?",
- onDismiss: this.handleDeleteWorkItemsDismiss,
- },
- })
- }
-
- @autobind
- handleDeleteWorkItemsDismiss(yes) {
- if (yes) {
- this.setState({
- waitModal: { message: "Deleting All Work Items & Activities..." },
- })
- api
- .deleteAllWorkItems()
- .then(() => {
- this.setState({
- waitModal: null,
- messageModal: {
- icon: "thumb",
- message: "All work items and logged activities have been deleted",
- },
- })
- })
- .catch((error) => {
- this.setState({
- waitModal: null,
- messageModal: {
- icon: "hand",
- message: "Unable to delete work items and activities.",
- detail: error.message,
- },
- })
- })
- }
-
- this.setState({
- yesNoModal: null,
- })
- }
-
- @autobind
- handleMessageModalDismiss() {
- this.setState({ messageModal: null })
- }
-
- render() {
- const { messageModal, yesNoModal, waitModal } = this.state
-
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Download Team Data
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- )
- }
-}
diff --git a/website/src/System/index.js b/website/src/System/index.js
deleted file mode 100644
index e993646..0000000
--- a/website/src/System/index.js
+++ /dev/null
@@ -1 +0,0 @@
-export { System } from './System'
diff --git a/website/src/ui/Header.js b/website/src/ui/Header.js
index f2920c6..f8aefcd 100644
--- a/website/src/ui/Header.js
+++ b/website/src/ui/Header.js
@@ -127,6 +127,8 @@ Header.TextButton = Radium(
static style = {
display: "inline-block",
+ position: "relative",
+ top: 3,
fontSize: fontInfo.size.header,
fontFamily: fontInfo.family,
color: fontInfo.color.normal,