seperate upload and report screens
This commit is contained in:
@@ -1,37 +1,34 @@
|
||||
import React, { Component } from 'react';
|
||||
|
||||
import { Container } from 'semantic-ui-react';
|
||||
import { Container, Form } from "semantic-ui-react";
|
||||
|
||||
import MainMenu from '../../components/MainMenu';
|
||||
|
||||
class Home extends Component {
|
||||
state = {
|
||||
apiStatus: 'loading',
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
fetch('/api')
|
||||
.then(response => response.json())
|
||||
.then(result => {
|
||||
if (result.status === 1) {
|
||||
this.setState({apiStatus: 'working'});
|
||||
} else {
|
||||
this.setState({apiStatus: 'NOT WORKING !'});
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
this.setState({apiStatus: `ERROR : ${err}`});
|
||||
})
|
||||
}
|
||||
|
||||
render () {
|
||||
const {apiStatus} = this.state;
|
||||
return (
|
||||
<Container>
|
||||
<MainMenu/>
|
||||
<h3>CRM Integration</h3>
|
||||
<h3>Report</h3>
|
||||
<hr/>
|
||||
<h5>Integration API Status : {apiStatus}</h5>
|
||||
<Form>
|
||||
<Form.Group widths="equal">
|
||||
<Form.Input
|
||||
fluid
|
||||
required
|
||||
label="Start date"
|
||||
type="date"
|
||||
/>
|
||||
<Form.Input
|
||||
fluid
|
||||
required
|
||||
label="End date"
|
||||
type="date"
|
||||
/>
|
||||
</Form.Group>
|
||||
<Form.Button>Generate Report</Form.Button>
|
||||
</Form>
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user