Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: NÃO MERGEAR - Expo 42 #80

Open
wants to merge 58 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
9a66f86
Merge pull request #41 from grupotesseract/develop
evandrododo Feb 7, 2020
da264fd
Merge pull request #43 from grupotesseract/develop
evandrododo Feb 27, 2020
800e231
Merge pull request #44 from grupotesseract/develop
fernandesfernando Mar 2, 2020
853d9b2
Merge pull request #62 from grupotesseract/develop
evandrododo Jun 11, 2020
293ed63
Merge pull request #64 from grupotesseract/develop
evandrododo Jun 19, 2020
8f6748a
Merge pull request #66 from grupotesseract/develop
fernandesfernando Jul 2, 2020
b250707
Merge pull request #71 from grupotesseract/develop
evandrododo Jul 15, 2020
d252a83
Merge branch 'develop'
evandrododo Jul 15, 2020
eab2e38
Merge pull request #75 from grupotesseract/develop
evandrododo Jul 22, 2020
572c0f3
Atualizado versão 37
fernandesfernando May 19, 2021
72c3522
Expo 38
fernandesfernando May 19, 2021
2561c8a
Incluindo teste de flatlist
fernandesfernando May 20, 2021
43f3f69
APlicando renderItem fora do render
fernandesfernando May 20, 2021
b56e3fd
APlicando shouldComponentUpdate na tela de estoque
fernandesfernando May 21, 2021
4e1f48e
AJustando tela de entrada
fernandesfernando May 28, 2021
d9ec6a2
Aplicando shouldComponentUpdate na tela de manutenção
fernandesfernando Jun 2, 2021
2381573
Aplicando componente na tela de manutenção item
fernandesfernando Jun 2, 2021
95aabdd
Atualizado pra versão 39
fernandesfernando Jul 26, 2021
5d4e73a
Versao 40
fernandesfernando Jul 26, 2021
65094cd
Atualizado com sucesso pra versão 40
fernandesfernando Jul 27, 2021
441cc13
Versão correta - pendente refatorar pra usar FlatList
fernandesfernando Jul 27, 2021
5a25f78
Atualizado pra versão 40
fernandesfernando Jul 28, 2021
dfc2f78
Atualizado com sucesso pro expo 41
fernandesfernando Aug 4, 2021
0d430bf
Atualizando com sucesso pro expo 42
fernandesfernando Aug 4, 2021
b595104
style: ajustes de layout
ThaisMap Aug 20, 2021
68289c8
Merge pull request #78 from grupotesseract/style/ajustes-de-layout
fernandesfernando Sep 9, 2021
27ff518
Trocando endereço da API para master
fernandesfernando Sep 10, 2021
aaea1f2
style: ajusta cor dos ActivityIndicators
ThaisMap Oct 7, 2021
294e079
Ajusta typos e interpolações de string
ThaisMap Oct 8, 2021
3798210
Merge pull request #79 from grupotesseract/style/ajuste-loader
fernandesfernando Nov 18, 2021
506c0ea
APlicando salvar fotos item
fernandesfernando Nov 18, 2021
ddffaa9
Aplicando mudança de versão
fernandesfernando Nov 18, 2021
f528b04
Resolvendo conflitos
fernandesfernando Nov 18, 2021
20f5ecd
Merge branch 'expo-42-backup-agoravai' into expo-42
fernandesfernando Nov 18, 2021
d64b215
Ajustes para build Android
ThaisMap Nov 23, 2021
614c82f
Merge pull request #81 from grupotesseract/ajustes-build
fernandesfernando Nov 23, 2021
32c7b3d
Fix picker
fernandesfernando Nov 23, 2021
9400a02
Merge branch 'expo-42' into expo-42-fix
fernandesfernando Nov 23, 2021
d251435
Mudando numero da versão
fernandesfernando Nov 23, 2021
86214af
Merge branch 'expo-42-fix' into expo-42
fernandesfernando Nov 23, 2021
deea020
Removendo asset bundle pattern do app.json
fernandesfernando Nov 23, 2021
35b3199
Mudando número da versão
fernandesfernando Nov 23, 2021
7e83c63
Incluindo owner no app.json
ThaisMap Nov 23, 2021
597f094
Mudando package.json
fernandesfernando Nov 23, 2021
de681ea
Atualizando versão no app.json e modo de submit no eas
ThaisMap Nov 23, 2021
b96542c
Mudando versão no app.json
fernandesfernando Nov 23, 2021
21eb7f6
Fix conflitos
fernandesfernando Nov 23, 2021
0acc013
Mudando esquema de permissões
fernandesfernando Nov 30, 2021
bf32055
AJustando esquema de permissões
fernandesfernando Dec 17, 2021
2454646
Aplicando enableScreens
fernandesfernando Dec 17, 2021
de99113
Não copiar foto para album
fernandesfernando Jan 3, 2022
abe6231
Incluindo um loader ao salvar imagem
fernandesfernando Jan 3, 2022
6def8d1
Tentativas de melhorias de performance
fernandesfernando Jan 5, 2022
6d7d4e0
MUdando versão
fernandesfernando Jan 5, 2022
b4bef05
AJustando getItemLayout
fernandesfernando Jan 5, 2022
1aff8e9
Build version
fernandesfernando Jan 5, 2022
0b1d729
COlocando alert pra todo lado
fernandesfernando Feb 4, 2022
7100ae3
Removendo clippedsubviews
fernandesfernando Feb 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147,406 changes: 147,406 additions & 0 deletions .yarn/releases/yarn-1.22.11.cjs

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


yarn-path ".yarn/releases/yarn-1.22.11.cjs"
6 changes: 3 additions & 3 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { AppLoading } from 'expo'
import AppLoading from 'expo-app-loading'
import { Container, StyleProvider } from 'native-base'
import * as Font from 'expo-font'
import { Ionicons } from '@expo/vector-icons'
Expand All @@ -9,7 +9,7 @@ import material from './src/theme/variables/material'
import { Provider } from 'react-redux'
import { PersistGate } from 'redux-persist/integration/react'
import { store, persistor } from './src/store'
import { YellowBox } from 'react-native'
import { LogBox } from 'react-native'

export default class App extends React.Component {

Expand All @@ -31,7 +31,7 @@ export default class App extends React.Component {
}

render() {
YellowBox.ignoreWarnings(['Remote debugger'])
LogBox.ignoreLogs(['Remote debugger'])

if (!this.state.isReady) {
return <AppLoading/>
Expand Down
22 changes: 7 additions & 15 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
{
"expo": {
"name": "Fibra",
"slug": "fibra-mobile",
"name": "Fibra 42 Bauru",
"slug": "fibra-mobile-42-bauru",
"privacy": "public",
"sdkVersion": "36.0.0",
"platforms": [
"ios",
"android",
"web"
],
"owner": "tesseract",
"platforms": ["ios", "android", "web"],
"version": "1.5.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
Expand All @@ -20,22 +16,18 @@
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"assets/*"
],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.tesseract.fibramobile",
"bundleIdentifier": "com.tesseract.fibramobile42bauru",
"buildNumber": "1.0",
"infoPlist": {
"NSCameraUsageDescription": "This app uses the camera to scan QRCodes to identify rooms (itens)."
}
},
"android": {
"versionCode": 3,
"package": "com.tesseract.fibramobile"
"versionCode": 11,
"package": "com.tesseract.fibramobile42bauru"
},
"androidStatusBarColor": "#1d2781",
"androidStatusBar": {
"backgroundColor": "#1d2781",
"barStyle": "light-content"
Expand Down
27 changes: 27 additions & 0 deletions eas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"cli": {
"version": ">= 0.37.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
},
"preview_apk": {
"android": {
"buildType": "apk"
}
},
"production": {}
},
"submit": {
"production": {
"android": {
"track": "production"
}
}
}
}
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { registerRootComponent } from 'expo';
import App from './App';
import { enableScreens } from 'react-native-screens';
enableScreens();

registerRootComponent(App);
69 changes: 38 additions & 31 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "fibra-mobile",
"version": "0.1.0",
"private": true,
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
Expand All @@ -11,43 +10,51 @@
"eject": "expo eject"
},
"dependencies": {
"@react-native-community/async-storage": "^1.6.2",
"@react-native-community/netinfo": "4.6.0",
"@expo/vector-icons": "^12.0.0",
"@react-native-async-storage/async-storage": "~1.15.0",
"@react-native-community/netinfo": "6.0.0",
"@react-native-picker/picker": "1.16.1",
"axios": "^0.19.0",
"expo": "^36.0.0",
"expo-barcode-scanner": "~8.0.0",
"expo-camera": "~8.0.0",
"expo-crypto": "~8.0.0",
"expo-font": "~8.0.0",
"expo-image-picker": "~8.0.1",
"expo-media-library": "~8.0.0",
"expo": "^42.0.0",
"expo-app-loading": "^1.1.2",
"expo-barcode-scanner": "~10.2.2",
"expo-camera": "~11.2.2",
"expo-crypto": "~9.2.0",
"expo-font": "~9.2.1",
"expo-image-picker": "~10.2.2",
"expo-media-library": "~12.1.2",
"fbjs": "^1.0.0",
"native-base": "^2.13.7",
"react": "16.9.0",
"react-dom": "16.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz",
"react-native-gesture-handler": "~1.5.0",
"react-native-numeric-input": "^1.8.3",
"react-native-reanimated": "~1.4.0",
"react-native-screens": "2.0.0-alpha.12",
"react-native-size-matters": "0.3.0",
"react-native-web": "^0.11.7",
"react-navigation": "^4.0.0",
"react-navigation-stack": "^1.8.1",
"react-redux": "^7.1.1",
"redux": "^4.0.4",
"lodash": "^4.17.21",
"native-base": "2.13.14",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz",
"react-native-gesture-handler": "~1.10.2",
"react-native-numeric-input": "^1.9.0",
"react-native-reanimated": "~2.2.0",
"react-native-safe-area-context": "3.2.0",
"react-native-screens": "~3.4.0",
"react-native-size-matters": "0.4.0",
"react-native-svg": "12.1.1",
"react-native-web": "~0.13.12",
"react-navigation": "^4.4.0",
"react-navigation-stack": "^2.10.4",
"react-redux": "^7.2.4",
"redux": "^4.1.0",
"redux-persist": "6.0.0",
"redux-saga": "^1.1.1",
"typesafe-actions": "^4.4.2"
"redux-saga": "^1.1.3",
"styled-components": "^5.3.0",
"styled-system": "^5.1.5",
"typesafe-actions": "^5.1.0"
},
"devDependencies": {
"@types/react": "^16.9.0",
"@types/react-native": "^0.60.15",
"@types/react-redux": "^7.1.4",
"@types/react": "~16.9.35",
"@types/react-native": "~0.63.2",
"@types/react-redux": "^7.1.18",
"@types/redux-saga": "^0.10.5",
"@typescript-eslint/eslint-plugin": "^2.3.2",
"@typescript-eslint/parser": "^2.3.2",
"babel-preset-expo": "^8.0.0",
"babel-preset-expo": "8.3.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-prettier": "^6.3.0",
"eslint-plugin-import": "^2.18.2",
Expand All @@ -56,7 +63,7 @@
"eslint-plugin-react-native": "^3.7.0",
"prettier": "^1.18.2",
"react-native-dropdown": "0.0.6",
"typescript": "^3.7.2"
"typescript": "~4.0.0"
},
"resolutions": {
"**/**/mem": ">=4.0.0",
Expand Down
132 changes: 71 additions & 61 deletions src/screens/Cliente/ManutencaoCliente/ManutencaoCliente.tsx
Original file line number Diff line number Diff line change
@@ -1,102 +1,113 @@
import React, { Component } from 'react'
import { Button, Icon, Text, View } from 'native-base'
import { ActivityIndicator, Alert } from 'react-native'
import { NavigationScreenProp } from 'react-navigation'
import { connect } from 'react-redux'
import { bindActionCreators, Dispatch } from 'redux'

import HeaderLogo from '../../../components/HeaderLogo'
import { ApplicationState } from '../../../store'
import { Planta } from '../../../store/ducks/planta/types'
import * as ProgramacoesActions from '../../../store/ducks/programacoes/actions'
import { ProgramacaoRealizada } from '../../../store/ducks/programacoes/types'
import React, { Component } from 'react';
import { Button, Icon, Text, View } from 'native-base';
import { ActivityIndicator, Alert } from 'react-native';
import { NavigationScreenProp } from 'react-navigation';
import { connect } from 'react-redux';
import { bindActionCreators, Dispatch } from 'redux';

import HeaderLogo from '../../../components/HeaderLogo';
import { ApplicationState } from '../../../store';
import { Planta } from '../../../store/ducks/planta/types';
import * as ProgramacoesActions from '../../../store/ducks/programacoes/actions';
import { ProgramacaoRealizada } from '../../../store/ducks/programacoes/types';
import { AntDesign } from '@expo/vector-icons';

interface StateProps {
plantaAtiva: Planta,
navigation: NavigationScreenProp<any, any>,
programacoesRealizadas: ProgramacaoRealizada[],
plantaAtiva: Planta;
navigation: NavigationScreenProp<any, any>;
programacoesRealizadas: ProgramacaoRealizada[];
}

interface DispatchProps {
concluiManutencaoEletrica({ idProgramacao }): void
concluiManutencaoEletrica({ idProgramacao }): void;
}

type Props = StateProps & DispatchProps
type Props = StateProps & DispatchProps;

class ManutencaoCliente extends Component<Props> {

concluirManutencao = () => {
Alert.alert(
'Concluir Manutenção',
'Deseja concluir esta manutenção?',
[
{
text: 'Cancel',
onPress: () => null,
style: 'cancel',
},
{ text: 'OK', onPress: () => this.handleConcluirManutencao() },
],
)
}
Alert.alert('Concluir Manutenção', 'Deseja concluir esta manutenção?', [
{
text: 'Cancel',
onPress: () => null,
style: 'cancel',
},
{ text: 'OK', onPress: () => this.handleConcluirManutencao() },
]);
};

handleConcluirManutencao = () => {
this.setState({ loadingConcluir: true }, async () => {
const { navigation, concluiManutencaoEletrica } = this.props
const idProgramacao = this.props.plantaAtiva.proximaProgramacao.id
const { navigation, concluiManutencaoEletrica } = this.props;
const idProgramacao = this.props.plantaAtiva.proximaProgramacao.id;
// await concluiManutencaoEletrica({ idProgramacao })
this.setState({ loadingConcluir: false })
navigation.navigate('Menu')
})
}
this.setState({ loadingConcluir: false });
navigation.navigate('Menu');
});
};

render() {
const { plantaAtiva, programacoesRealizadas } = this.props;
if (!plantaAtiva) {
return <ActivityIndicator />
return <ActivityIndicator color='blue' />;
}
const idProgramacao = plantaAtiva.proximaProgramacao.id;
const programacao = programacoesRealizadas.find(p => p.programacao.id === idProgramacao)
const programacao = programacoesRealizadas.find(
(p) => p.programacao.id === idProgramacao
);
const { estoqueConcluido, entradaConcluida } = programacao;

return (
<View style={{flexGrow: 1}}>
<HeaderLogo/>
<View style={{ flexGrow: 1 }}>
<HeaderLogo />

<View padder>
<Button
block
disabled={estoqueConcluido}
onPress={() => this.props.navigation.navigate('QRCodeCliente')}
style={style.btnStyle}>
<AntDesign name="qrcode" color="white" size={28} style={{ marginLeft: 10 }}/>
style={style.btnStyle}
>
<AntDesign
name='qrcode'
color='white'
size={28}
style={{ marginLeft: 10 }}
/>
<Text>QR Code</Text>
</Button>

<Button
block
onPress={() => this.props.navigation.navigate('FotosManutencaoEletrica')}
style={style.btnStyle}>
<Icon name="camera"/>
onPress={() =>
this.props.navigation.navigate('FotosManutencaoEletrica')
}
style={style.btnStyle}
>
<Icon name='camera' />
<Text>Fotos</Text>
</Button>

<Button
block
onPress={() => this.props.navigation.navigate('ManutencaoClienteComentarios')}
style={style.btnStyle}>
<Icon name="md-chatboxes"/>
onPress={() =>
this.props.navigation.navigate('ManutencaoClienteComentarios')
}
style={style.btnStyle}
>
<Icon name='chatbox' />
<Text>Comentários</Text>
</Button>
</View>

<View padder style={{justifyContent: 'flex-end', flexGrow: 1}}>
<Button
block
onPress={() => this.concluirManutencao()}
>
<AntDesign name="check" color="white" size={28} style={{ marginLeft: 10 }}/>
<View padder style={{ justifyContent: 'flex-end', flexGrow: 1 }}>
<Button block onPress={() => this.concluirManutencao()}>
<AntDesign
name='check'
color='white'
size={28}
style={{ marginLeft: 10 }}
/>
<Text>Concluir</Text>
</Button>
</View>
Expand All @@ -108,16 +119,15 @@ class ManutencaoCliente extends Component<Props> {
const style = {
btnStyle: {
marginVertical: 5,
}
}

},
};

const mapStateToProps = (state: ApplicationState) => ({
plantaAtiva: state.plantaReducer.plantaAtiva,
programacoesRealizadas: state.programacoesReducer.programacoesRealizadas
})
programacoesRealizadas: state.programacoesReducer.programacoesRealizadas,
});

const mapDispatchToProps = (dispatch: Dispatch) =>
bindActionCreators(ProgramacoesActions, dispatch);

export default connect(mapStateToProps, mapDispatchToProps)(ManutencaoCliente)
export default connect(mapStateToProps, mapDispatchToProps)(ManutencaoCliente);
Loading