diff --git a/frontend/src/screens/ConfirmacaoFeirante/index.js b/frontend/src/screens/ConfirmacaoFeirante/index.js
index b8e5a65..02a83ba 100644
--- a/frontend/src/screens/ConfirmacaoFeirante/index.js
+++ b/frontend/src/screens/ConfirmacaoFeirante/index.js
@@ -120,8 +120,8 @@ class ConfirmacaoFeirante extends PureComponent {
locations: customMap.locations.map((location, index) => {
const feirantes = confirmados.feirantes
? confirmados.feirantes.filter(
- feirante => feirante.celulaId === index
- )
+ feirante => feirante.celulaId === index
+ )
: [];
const newLocation = {
...location,
@@ -252,8 +252,8 @@ class ConfirmacaoFeirante extends PureComponent {
})}
) : (
-
Sem avisos para a próxima feira
- )}
+ Sem avisos para a próxima feira
+ )}
);
};
@@ -270,23 +270,23 @@ class ConfirmacaoFeirante extends PureComponent {
style={{
backgroundImage: `url(${
process.env.REACT_APP_HOST
- }/image/${feiraEventoImagem})`
+ }/image/${feiraEventoImagem})`
}}
/>
);
};
_renderSteps = () => {
- const {current = 0} = this.state;
+ const { current = 0 } = this.state;
return (
<>
-
-
-
-
+
+
+
+
- {this._renderCurrentStep()}
+ {this._renderCurrentStep()}
>
)
@@ -294,68 +294,78 @@ class ConfirmacaoFeirante extends PureComponent {
_renderAlert = () => {
const { history } = this.props;
- return (
-
-
- É necessário lançar o faturamento da última feira para prosseguir
-
-
- }
- type="info"
- showIcon
- />
-
- );
+ return (
+
+
+ É necessário lançar o faturamento da última feira para prosseguir
+
+
+ }
+ type="info"
+ showIcon
+ />
+
+ );
}
- render() {
- const { loading, feiraAtual, visible, participacao } = this.state;
-
- if (loading) return null;
- if (feiraAtual.data === undefined) {
- return (
-
-
-
- );
- }
-
+ _renderContent = () => {
+ const { feiraAtual, visible, participacao } = this.state;
return (
-
+ <>
{this._renderFotoEventoFeira()}
{this._renderAvisos()}
{
!participacao.faturamento && !moment(feiraAtual.data, 'yyyy-mm-dd').isSame(moment(participacao.data_feira))
- ? this._renderAlert()
+ ? this._renderAlert()
: this._renderSteps()
}
-
+
+ >
+ )
+ }
+
+ render() {
+ const { loading, feiraAtual } = this.state;
+
+ return (
+
+ {
+ !loading && !feiraAtual.data
+ ? (
+
+ ) : this._renderContent()
+
+ }
);
}
@@ -365,4 +375,4 @@ const WrappedHorizontalConfirmacaoFeiranteForm = Form.create({
name: "feiras_form"
})(ConfirmacaoFeirante);
-export default WrappedHorizontalConfirmacaoFeiranteForm;
+export default WrappedHorizontalConfirmacaoFeiranteForm;
\ No newline at end of file