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
_renderTopBarActions() { | |
if(!this.props.dashboardReservation.status || this.props.dashboardReservation.status == 4) | |
return null | |
if(this.props.dashboardReservation.status == 1) | |
return ( | |
<React.Fragment> | |
<button | |
className='btn btn-outline-primary' | |
onClick={() => this.props.cancelReservation(this.props.match.params.id)} |
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
// Inspired by: https://github.com/davidchambers/Base64.js/blob/master/base64.js | |
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; | |
const Base64 = { | |
btoa: (input:string = '') => { | |
let str = input; | |
let output = ''; | |
for (let block = 0, charCode, i = 0, map = chars; |
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
function getAdditionalData(subTags, value) { | |
let additionalData = {} | |
let subPosition = 0 | |
let subTotalStep = 2 | |
let subSize = 0 | |
subTags.map(subTag => { | |
additionalData[subTag] = { name: subTag } | |
additionalData[subTag].id = value.slice(subPosition, subTotalStep) |
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
import { call, put, takeEvery, select } from 'redux-saga/effects' | |
// Services | |
import { callApi, callServiceApi } from 'services/api' | |
function* login(action) { | |
try { | |
// Set loading state | |
yield put({ | |
type: 'USER_SET_LOADING', |
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
const USER_SET = 'USER_SET' | |
const USER_SET_LOADING = 'USER_SET_LOADING' | |
const USER_LOGOUT = 'USER_LOGOUT' | |
const initialState = { | |
loading: false, | |
userData: {} | |
} | |
export default function user (state = initialState, action = {}) { |
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
var path = require('path'); | |
const webpack = require('webpack'); | |
module.exports = { | |
mode: "development", | |
entry: './src/index.js', | |
watch: true, | |
output: { | |
path: '/xampp7/htdocs/metractive/tagse-frontend/public', | |
filename: 'bundle.js', |
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
import IMAGES from "@constants/images"; | |
const INITIAL_STATE = { | |
data: [], | |
first_access_app: true, | |
car_info: { | |
km_atual: 10000, | |
marca: "Toyota", | |
modelo: "Etios", | |
versao: "1.5 XS Sedan", | |
ano: "2016/2016", |
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
Show hidden characters
{ | |
"presets": ["module:metro-react-native-babel-preset"], | |
"plugins": [ | |
[ | |
"module-resolver", | |
{ | |
"extensions": [ | |
".js", | |
".ios.js", | |
".android.js", |
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
import axios from 'axios' | |
import CONFIGS from '@constants/configs' | |
export const callApi = (call) => { | |
let { | |
title = '', | |
endpoint, | |
method = 'GET', | |
params = null, |
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
export default { | |
url: 'http://35.229.117.212:5000/api' | |
} |
NewerOlder