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
async function handleSubmit() { | |
try { | |
const data = new FormData(); | |
data.append('cover', values.cover[0].file); | |
data.append('title', values.title); | |
data.append('publishedBy', values.publishedBy); | |
data.append('newsContent', values.newsContent); | |
data.append('publicationDate', values.publicationDate); | |
data.append('updatedBy', values.updatedBy); |
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 fs from 'fs'; | |
import csv from 'csv-parse'; | |
import { getCustomRepository, getRepository, In } from 'typeorm'; | |
import TransactionRepository from '../repositories/TransactionsRepository'; | |
import Transaction from '../models/Transaction'; | |
import Category from '../models/Category'; | |
interface Request { |
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 data = [ | |
[ | |
null, | |
[ | |
"434", | |
3214, | |
"Site CrediHome" | |
] | |
], | |
[ |
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 express = require ("express") | |
const server = express() | |
const cors = require('cors') | |
var fs = require('fs'); | |
const path = require("path"); | |
var slugify = require('slugify') | |
var { format } = require('date-fns') | |
var Mail = require('./lib/Mail') | |
server.use(express.json()) |
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
version: '3.6' | |
networks: | |
learn49-network: | |
driver: bridge | |
services: | |
learn49-api: | |
build: . | |
volumes: |
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
FROM node:12 | |
WORKDIR /usr/src/app | |
COPY package*.json ./ | |
RUN npm install | |
COPY . . |
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 * as React from 'react'; | |
import MUIOutlinedInput from '@material-ui/core/OutlinedInput'; | |
import FormControl from '@material-ui/core/FormControl'; | |
import styled, { css } from 'styled-components'; | |
import { connect, FormikContext, getIn } from 'formik'; | |
import FormHelperText from '@material-ui/core/FormHelperText'; | |
import MaskedInput from 'react-text-mask'; | |
import InputAdornment from '@material-ui/core/InputAdornment'; | |
import Visibility from '@material-ui/icons/Visibility'; | |
import VisibilityOff from '@material-ui/icons/VisibilityOff'; |
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
it('should be able to update account', async () => { | |
const queryAccountSettings = ` | |
query ($subdomain: String!) { | |
getAccountSettingsBySubDomain(subdomain: $subdomain) { | |
id | |
} | |
} | |
`; | |
const variablesAccountSettings = { |
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 UserProvider from '../models/UserProvider'; | |
import Provider from '../models/Provider'; | |
import MedicalExam from '../models/MedicalExam'; | |
class MedicalExamController { | |
async store(req, res) { | |
const { provider } = await UserProvider.findOne({ | |
where: { user_id: req.userId }, | |
include: [ | |
{ |
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 React from 'react'; | |
import { FieldProps, getIn } from 'formik'; | |
import { Chip, TextField } from '@material-ui/core'; | |
import Autocomplete from '@material-ui/lab/Autocomplete'; | |
import useStyles from './styles'; | |
export default function InputMultiValue({ field, form, ...props }: FieldProps) { | |
const classes = useStyles({}); |