-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'hotfix/0.1.0.fix-docs'
- Loading branch information
Showing
4 changed files
with
221 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,45 @@ | ||
# SME-PTRF-FrontEnd | ||
# SME-PTRF-FrontEnd | ||
======== | ||
|
||
Front da aplicação *SIG.Escola* da Secretaria de Educação da cidade de São Paulo. | ||
|
||
License: MIT | ||
|
||
Versão: 0.1.0 | ||
|
||
|
||
## Release Notes | ||
|
||
### 0.1.0 - 07/04/2020 - Entregas da Sprint 2 | ||
* Autenticação de usuário | ||
* Cadastro de despesas | ||
* Cadastro de receitas | ||
|
||
|
||
### Para desenvolver | ||
|
||
I) Clone o repositório. | ||
```console | ||
$ git clone https://github.com/prefeiturasp/SME-PTRF-FrontEnd.git front | ||
$ cd front | ||
``` | ||
|
||
II. Instale as dependências. | ||
```console | ||
$ npm i | ||
``` | ||
|
||
III. Configure a instância com o .env | ||
```console | ||
$ cp env_sample .env | ||
``` | ||
|
||
IV. Execute os testes. | ||
```console | ||
$ npm test | ||
``` | ||
|
||
V. Execute a aplicação. | ||
```console | ||
$ npm start | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import React, { Component } from 'react' | ||
import { getVersaoApi } from '../../services/Core.service' | ||
|
||
export class Versao extends Component { | ||
constructor(props) { | ||
super(props) | ||
|
||
this.state = { | ||
versaoApi: '', | ||
versaoFront: '', | ||
} | ||
} | ||
async componentDidMount() { | ||
const versaoApi = await getVersaoApi() | ||
|
||
const pjson = require('../../../package.json') | ||
const versaoFront = pjson.version | ||
|
||
this.setState({ versaoApi, versaoFront }) | ||
} | ||
render() { | ||
return ( | ||
<span>{`${this.state.versaoFront} (API:${this.state.versaoApi})`}</span> | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import api from './Api' | ||
|
||
const authHeader = { | ||
'Content-Type': 'application/json', | ||
} | ||
|
||
export const getVersaoApi = async () => { | ||
return (await api.get(`api/versao`, authHeader)).data['versao'] | ||
} |