Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Amparo
Amparo-frontend
Commits
18827c4a
Commit
18827c4a
authored
1 year ago
by
Alessandro
Browse files
Options
Download
Email Patches
Plain Diff
realizando configurações para deploy
parent
1b966e07
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
Dockerfile
+8
-8
Dockerfile
src/components/CustomTabs/CustomTabs.tsx
+2
-1
src/components/CustomTabs/CustomTabs.tsx
src/components/ExamFilter/examFilter.tsx
+2
-1
src/components/ExamFilter/examFilter.tsx
src/components/ProfilePatientCard/ProfilePatientCard.tsx
+1
-1
src/components/ProfilePatientCard/ProfilePatientCard.tsx
src/pages/ExamesPendentes/ExamesPendentes.tsx
+1
-1
src/pages/ExamesPendentes/ExamesPendentes.tsx
src/pages/HomeMedico/HomeMedico.tsx
+1
-0
src/pages/HomeMedico/HomeMedico.tsx
src/pages/Login/Login.tsx
+7
-0
src/pages/Login/Login.tsx
with
22 additions
and
12 deletions
+22
-12
Dockerfile
View file @
18827c4a
# Build
# Build
Stage
FROM
node:18-alpine AS builder
ARG
VITE_API_URL=${VITE_API_URL}
ARG
VITE_NODE_ENV=${VITE_NODE_ENV}
...
...
@@ -6,20 +6,20 @@ ENV VITE_API_URL=${VITE_API_URL}
ENV
VITE_NODE_ENV=${VITE_NODE_ENV}
WORKDIR
/app
# Copiar os arquivos
COPY
. .
# Roda o 'npm install' sem sobrescrever package-lock.json
# Instale as dependências e crie o build
RUN
npm ci
# Roda a build do Front
RUN
npm run build
# Stage 2 - NGINX
FROM
nginx:alpine as runner
# Set working directory to nginx asset directory
# Remove default nginx static assets
RUN
rm
-rf
/usr/share/nginx/html/
*
# Copy static assets from builder stage
COPY
--from=builder /app/build /usr/share/nginx/html
# Use o diretório 'dist' onde o Vite gera os arquivos de build
COPY
--from=builder /app/dist /usr/share/nginx/html
COPY
./nginx/nginx.conf /etc/nginx/conf.d/default.conf
# Containers run nginx with global directives and daemon off
ENTRYPOINT
["nginx", "-g", "daemon off;"]
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/components/CustomTabs/CustomTabs.tsx
View file @
18827c4a
...
...
@@ -11,7 +11,7 @@ interface CustomTabsProps {
tabs
:
TabItem
[];
initialTab
?:
number
;
}
// @ts-ignore
const
CustomTab
=
styled
(
Tab
)(({
theme
})
=>
({
minWidth
:
'
100px
'
,
height
:
'
30px
'
,
// Ajuste na altura para corresponder ao design do Figma
...
...
@@ -33,6 +33,7 @@ const CustomTab = styled(Tab)(({ theme }) => ({
const
CustomTabs
:
React
.
FC
<
CustomTabsProps
>
=
({
tabs
,
initialTab
=
0
})
=>
{
const
[
value
,
setValue
]
=
React
.
useState
(
initialTab
);
// @ts-ignore
const
handleChange
=
(
event
:
React
.
SyntheticEvent
,
newValue
:
number
)
=>
{
setValue
(
newValue
);
};
...
...
This diff is collapsed.
Click to expand it.
src/components/ExamFilter/examFilter.tsx
View file @
18827c4a
...
...
@@ -11,7 +11,7 @@ interface ExamFilterProps {
tabs
:
TabItem
[];
initialTab
?:
number
;
}
// @ts-ignore
const
ExamFilterTab
=
styled
(
Tab
)(({
theme
})
=>
({
minWidth
:
'
101px
'
,
height
:
'
23px
'
,
...
...
@@ -36,6 +36,7 @@ const ExamFilterTab = styled(Tab)(({ theme }) => ({
const
ExamFilter
:
React
.
FC
<
ExamFilterProps
>
=
({
tabs
,
initialTab
=
0
})
=>
{
const
[
value
,
setValue
]
=
React
.
useState
(
initialTab
);
// @ts-ignore
const
handleChange
=
(
event
:
React
.
SyntheticEvent
,
newValue
:
number
)
=>
{
setValue
(
newValue
);
};
...
...
This diff is collapsed.
Click to expand it.
src/components/ProfilePatientCard/ProfilePatientCard.tsx
View file @
18827c4a
...
...
@@ -19,7 +19,7 @@ interface CardProps {
onClickChangePassword
?:
()
=>
void
;
onClickEditProfile
?:
()
=>
void
;
}
// @ts-ignore
export
function
PatientProfileCard
({
name
,
cpf
,
email
,
dataNascimento
,
numSus
,
profilePicture
,
onClickChangePassword
,
onClickDoctors
,
onClickEditProfile
}:
CardProps
)
{
const
[
notifications
,
setNotifications
]
=
useState
(
false
);
...
...
This diff is collapsed.
Click to expand it.
src/pages/ExamesPendentes/ExamesPendentes.tsx
View file @
18827c4a
import
Footer
from
'
../../components/Footer/Footer
'
;
import
HeaderHome
from
'
../../components/HeaderHome/HeaderHome
'
;
import
AddCircleIcon
from
'
../../assets/
A
ddCircle.svg
'
;
import
AddCircleIcon
from
'
../../assets/
a
ddCircle.svg
'
;
import
'
./ExamesPendentes.css
'
;
import
{
useState
}
from
'
react
'
;
import
ExamListItem
from
'
../../components/ListItem/ListItem
'
;
...
...
This diff is collapsed.
Click to expand it.
src/pages/HomeMedico/HomeMedico.tsx
View file @
18827c4a
...
...
@@ -6,6 +6,7 @@ import MedicamentosIcon from '../../assets/MedicationIcon.svg';
import
InfoIcon
from
'
../../assets/InfoIcon.svg
'
;
import
PacientIcon
from
'
../../assets/PacientIcon.svg
'
;
import
ConsultIcon
from
'
../../assets/ConsultIcon.svg
'
;
// @ts-ignore
import
{
ROUTES
}
from
'
../../routes/constans
'
;
import
Footer
from
'
../../components/Footer/Footer
'
;
// import { useNavigate } from 'react-router-dom';
...
...
This diff is collapsed.
Click to expand it.
src/pages/Login/Login.tsx
View file @
18827c4a
// @ts-ignore
import
React
,
{
useEffect
,
useState
}
from
'
react
'
;
import
Logo
from
'
../../assets/amparo.svg
'
;
import
'
./Login.css
'
;
...
...
@@ -6,15 +7,21 @@ import { ROUTES } from '../../routes/constans';
import
{
useNavigate
}
from
'
react-router-dom
'
;
import
Textfield
from
'
../../components/Textfield/Textfield
'
;
import
CustomButton
from
'
../../components/Button/Button
'
;
// @ts-ignore
import
{
getUser
,
login_post
}
from
'
../../utils/apiService
'
;
export
const
Login
:
React
.
FC
=
()
=>
{
const
[
email
,
setEmail
]
=
useState
<
string
>
(
''
);
// @ts-ignore
const
[
password
,
setPassword
]
=
useState
<
string
>
(
''
);
// @ts-ignore
const
[
erro
,
setErro
]
=
useState
<
string
>
(
''
);
// @ts-ignore
const
[
clicked
,
setClicked
]
=
useState
<
boolean
>
(
false
);
const
navigate
=
useNavigate
();
// @ts-ignore
const
[
data
,
setData
]
=
useState
<
String
>
();
// @ts-ignore
const
[
dataStatus
,
setDataStatus
]
=
useState
<
Number
>
();
const
emailRegex
=
/^
[
a-zA-Z0-9._-
]
+@
[
a-zA-Z0-9.-
]
+
\.[
a-zA-Z
]{2,6}
$/
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment