Closing many tickets
This commit is contained in:
@@ -3,5 +3,5 @@ import { Route, Redirect } from "react-router-native"
|
||||
|
||||
export const DefaultRoute = () => {
|
||||
// NOTE: When working on the app, change this to the page you are working on
|
||||
return <Route render={() => <Redirect to={"/workitem"} />} />
|
||||
return <Route render={() => <Redirect to={"/activity"} />} />
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
Button,
|
||||
TouchableWithoutFeedback,
|
||||
} from "react-native"
|
||||
import { MessageModal, ApiModal } from "../Modal"
|
||||
import { MessageModal, ApiModal, WaitModal } from "../Modal"
|
||||
import logoImage from "./images/deighton.png"
|
||||
import { FormBinder } from "react-form-binder"
|
||||
import { api } from "../API"
|
||||
@@ -19,7 +19,7 @@ import KeyboardSpacer from "react-native-keyboard-spacer"
|
||||
import { versionInfo } from "../version"
|
||||
import autobind from "autobind-decorator"
|
||||
import { isIphoneX } from "react-native-iphone-x-helper"
|
||||
import { defaultUser } from "../config"
|
||||
import { config } from "../config"
|
||||
|
||||
export class Login extends React.Component {
|
||||
static bindings = {
|
||||
@@ -76,9 +76,10 @@ export class Login extends React.Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
binder: new FormBinder({ email: defaultUser }, Login.bindings),
|
||||
binder: new FormBinder({ email: config.defaultUser }, Login.bindings),
|
||||
messageModal: null,
|
||||
apiModal: null,
|
||||
waitModal: null,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,6 +89,7 @@ export class Login extends React.Component {
|
||||
let { history } = this.props
|
||||
|
||||
if (obj) {
|
||||
this.setState({ waitModal: { message: "Loggin In..." } })
|
||||
api
|
||||
.login(obj.email.trim(), obj.password, obj.rememberMe)
|
||||
.then((user) => {
|
||||
@@ -95,6 +97,7 @@ export class Login extends React.Component {
|
||||
})
|
||||
.catch((error) => {
|
||||
this.setState({
|
||||
waitModal: null,
|
||||
messageModal: {
|
||||
icon: "hand",
|
||||
message: "Unable to login",
|
||||
@@ -178,6 +181,10 @@ export class Login extends React.Component {
|
||||
{versionInfo.fullVersion}
|
||||
</Text>
|
||||
</View>
|
||||
<WaitModal
|
||||
open={!!waitModal}
|
||||
message={waitModal ? waitModal.message : ""}
|
||||
/>
|
||||
<MessageModal
|
||||
open={!!messageModal}
|
||||
icon={messageModal ? messageModal.icon : ""}
|
||||
|
||||
Reference in New Issue
Block a user