This file contains hidden or 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 * as Yup from 'yup'; | |
import { parseISO, endOfDay, addMonths } from 'date-fns'; | |
import Registration from '../models/Registration'; | |
import Student from '../models/Student'; | |
import Plan from '../models/Plan'; | |
class RegistrationController { | |
async store(req, res) { | |
// validação para os campos | |
const schema = Yup.object().shape({ |
This file contains hidden or 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 { startOfDay, endOfDay, parseISO } from 'date-fns'; | |
import { Op } from 'sequelize'; | |
import Appointment from '../models/Appointment'; | |
import User from '../models/User'; | |
import File from '../models/File'; | |
class ScheduleController { | |
async index(req, res) { | |
const isProvider = await User.findOne({ | |
where: { id: req.userId, provider: true }, |
This file contains hidden or 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 { subDays, endOfDay, startOfDay } from 'date-fns'; | |
import { Op } from 'sequelize'; | |
import * as Yup from 'yup'; | |
import Enrollment from '../models/Enrollment'; | |
import Student from '../models/Student'; | |
import Checkin from '../schemas/Checkin'; | |
// CHECKINS ARMAZENADOS NO MONGO | |
class CheckinController { |
This file contains hidden or 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 { | |
startOfDay, | |
endOfDay, | |
parseISO, | |
isBefore, | |
addMonths, | |
format, | |
} from 'date-fns'; | |
import { Op } from 'sequelize'; | |
import pt from 'date-fns/locale/pt'; |
This file contains hidden or 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 React, { Component } from 'react'; | |
import { connect } from 'react-redux'; | |
import { bindActionCreators } from 'redux'; | |
import { MdAddShoppingCart } from 'react-icons/md'; | |
import { formatPriceBrl } from '../../util/format'; | |
import api from '../../services/api'; | |
import * as CartActions from '../../store/modules/cart/actions'; | |
import { ProductList } from './styles'; |
This file contains hidden or 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 React, { useEffect, useState } from 'react'; | |
import { useSelector } from 'react-redux'; | |
import { Alert, TouchableOpacity } from 'react-native'; | |
import { parseISO, formatRelative } from 'date-fns'; | |
import pt from 'date-fns/locale/pt'; | |
import PropTypes from 'prop-types'; | |
import { withNavigationFocus } from 'react-navigation'; | |
import api from '../../../services/api'; |
This file contains hidden or 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 React, { useRef, useCallback } from 'react'; | |
import { useDispatch, useSelector } from 'react-redux'; | |
import { Form } from '@unform/mobile'; | |
import * as Yup from 'yup'; | |
import PropTypes from 'prop-types'; | |
import getValidationErrors from '../../../utils/getValidationErrors'; | |
import strings from '../../../assets/strings'; | |
import { signInRequest } from '../../../store/modules/auth/actions'; |
This file contains hidden or 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 React, { useRef, useCallback } from 'react'; | |
import { useDispatch, useSelector } from 'react-redux'; | |
import { Form } from '@unform/mobile'; | |
import * as Yup from 'yup'; | |
import PropTypes from 'prop-types'; | |
import getValidationErrors from '../../../utils/getValidationErrors'; | |
import strings from '../../../assets/strings'; | |
import { signInRequest } from '../../../store/modules/auth/actions'; |
This file contains hidden or 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 React, { | |
useState, | |
useEffect, | |
useCallback, | |
useRef, | |
useImperativeHandle, | |
forwardRef, | |
} from 'react'; | |
import { useField } from '@unform/core'; | |
import PropTypes from 'prop-types'; |
This file contains hidden or 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 { injectable, inject } from 'tsyringe'; | |
import path from 'path'; | |
import AppError from '@shared/errors/AppError'; | |
import IMailProvider from '@shared/container/providers/MailProvider/models/IMailProvider'; | |
import IUsersRepository from '../repositories/IUsersRepository'; | |
import IUserTokensRepository from '../repositories/IUserTokensRepository'; | |
interface IRequest { |
OlderNewer