From d988dcd278a5c30c193a15a4662135c164987e34 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9rgio=20Rafael=20Siqueira?=
Date: Thu, 15 May 2025 14:07:45 -0300
Subject: [PATCH] fix space
---
.gitignore | 6 +
http-api/.gitignore | 3 +-
http-api/app.py | 1 +
http-api/compose.yaml | 6 +-
http-api/routes/enrollments/__init__.py | 5 +
http-api/tests/routes/test_enrollments.py | 20 +
superpage/.prettierrc | 4 +
.../src/components/Accordion/Accordion.astro | 2 +-
superpage/src/components/Accordion/Body.astro | 4 +-
.../src/components/Accordion/Header.astro | 12 +-
superpage/src/components/Accordion/Item.astro | 4 +-
superpage/src/components/Carousel.astro | 108 +++---
superpage/src/components/Clients.astro | 4 +-
superpage/src/components/Contact.jsx | 2 +-
superpage/src/components/Container.astro | 6 +-
superpage/src/components/CookieConsent.astro | 16 +-
.../src/components/Course/BuyDropdown.astro | 334 +++++++++--------
superpage/src/components/Course/Cert.astro | 37 +-
superpage/src/components/Course/Course.astro | 14 +-
superpage/src/components/Course/Faq.astro | 20 +-
.../src/components/Course/FlyoutMenu.astro | 260 +++++++------
superpage/src/components/Course/Modules.astro | 26 +-
.../src/components/Course/Solutions.astro | 228 ++++++------
superpage/src/components/Course/Trainer.astro | 75 ++--
superpage/src/components/Features.astro | 114 +++---
superpage/src/components/Modal.astro | 124 +++----
superpage/src/components/SEO.astro | 98 ++---
superpage/src/components/Search.astro | 58 +--
superpage/src/components/Stats.astro | 40 +-
superpage/src/components/Trends.astro | 16 +-
.../content/courses/cipa-grau-de-risco-3.mdx | 78 ++--
.../content/courses/cipa-grau-de-risco-4.mdx | 23 +-
.../content/courses/combate-a-incendio.mdx | 23 +-
.../courses/direcao-defensiva-08-horas.mdx | 22 +-
.../courses/direcao-defensiva-20-horas.mdx | 87 +++--
.../exposicao-ao-benzeno-portaria-1109.mdx | 5 +-
.../gestao-da-cultura-de-seguranca.mdx | 1 +
superpage/src/content/courses/lei-lucas.mdx | 235 ++++++------
.../content/courses/loto-lockout-e-tagout.mdx | 115 +++---
.../courses/nocoes-em-primeiros-socorros.mdx | 2 +-
...6-equipamento-de-proteo-individual-epi.mdx | 43 ++-
.../src/content/courses/nr-10-basico.mdx | 156 ++++----
.../courses/nr-10-complementar-sep.mdx | 264 +++++++-------
.../courses/nr-10-reciclagem-08-horas.mdx | 95 +++--
.../nr-11-operador-de-empilhadeira.mdx | 124 +++----
.../nr-11-seguranca-em-transpaleteira.mdx | 80 ++--
.../nr-11-seguranca-na-operacao-de-talhas.mdx | 124 +++----
...-11-seguranca-na-operao-de-rebocadores.mdx | 139 ++++---
...ao-armazenagem-e-manuseio-de-materiais.mdx | 154 ++++----
.../courses/nr-12-maquinas-e-equipamentos.mdx | 140 ++++---
.../courses/nr-13-operador-de-caldeiras.mdx | 169 ++++-----
...asos-de-pressao-e-unidades-de-processo.mdx | 172 +++++----
...mia-para-teleatendimento-telemarketing.mdx | 70 ++--
.../src/content/courses/nr-17-ergonomia.mdx | 96 +++--
.../nr-18-plataforma-de-trabalho-aereo.mdx | 99 +++--
...ro-e-amarrador-de-cargas-para-icamento.mdx | 95 +++--
.../src/content/courses/nr-20-basico.mdx | 97 +++--
.../src/content/courses/nr-20-inicicao.mdx | 66 ++--
.../content/courses/nr-20-intermediario.mdx | 136 +++----
.../courses/nr-26-sinalizao-de-seguranca.mdx | 87 ++---
.../nr-33-supervisor-em-espaco-confinado.mdx | 198 +++++-----
...torizados-e-vigias-em-espaco-confinado.mdx | 86 ++---
...uranca-nos-trabalhos-em-altura-teorico.mdx | 130 ++++---
...nr-35-supervisor-de-trabalho-em-altura.mdx | 35 +-
.../pca-programa-de-conservacao-auditiva.mdx | 119 +++---
.../ppr-programa-de-protecao-respiratoria.mdx | 342 +++++++++---------
...demais-formas-de-violencia-no-trabalho.mdx | 109 +++---
.../reciclagem-de-nr-10-sep-08-horas.mdx | 139 ++++---
...11-seguranca-na-opercao-de-rebocadores.mdx | 141 ++++----
...lagem-de-nr-12-maquinas-e-equipamentos.mdx | 139 ++++---
...r-18-plataforma-de-trabalho-aereo-pemt.mdx | 6 +-
.../courses/reciclagem-em-nr-10-basico.mdx | 8 +-
.../reciclagem-em-nr-10-complementar-sep.mdx | 201 +++++-----
...agem-em-nr-11-operador-de-empilhadeira.mdx | 124 +++----
.../reciclagem-em-nr-11-transpaleteiras.mdx | 81 ++---
...iclagem-em-nr-13-operador-de-caldeiras.mdx | 169 ++++-----
...asos-de-pressao-e-unidades-de-processo.mdx | 173 +++++----
...m-nr-18-basico-em-segurana-do-trabalho.mdx | 90 ++---
.../reciclagem-em-nr-20-avancado-ii.mdx | 4 +-
.../courses/reciclagem-em-nr-20-basico.mdx | 5 +-
.../reciclagem-em-nr-20-intermediario.mdx | 3 +-
...nr-33-supervisores-em-espaco-confinado.mdx | 201 +++++-----
...-nr-33-trabalhos-em-espacos-confinados.mdx | 86 ++---
...m-em-nr-35-trabalhos-em-altura-teorico.mdx | 131 ++++---
superpage/src/layouts/Layout.astro | 102 +++---
.../src/layouts/_components/BaseHead.astro | 44 +--
.../src/layouts/_components/Footer.astro | 37 +-
.../src/layouts/_components/Header.astro | 33 +-
superpage/src/pages/404.astro | 10 +-
superpage/src/pages/[slug].astro | 290 +++++++--------
superpage/src/pages/index.astro | 305 ++++++++--------
superpage/src/styles/global.css | 31 +-
92 files changed, 4062 insertions(+), 4154 deletions(-)
create mode 100644 superpage/.prettierrc
diff --git a/.gitignore b/.gitignore
index 52225a1..3d7c239 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,13 @@
.aws-sam
.pytest_cache
+.venv
+.ruff_cache
.DS_Store
.coverage
__pycache__
.python-version
requirements.txt
+.meili_data/
+.dynamodb_volume/
+.elastic_volume/
+.env
diff --git a/http-api/.gitignore b/http-api/.gitignore
index 90371f8..67eed64 100644
--- a/http-api/.gitignore
+++ b/http-api/.gitignore
@@ -1,5 +1,4 @@
-.env
-env.json
dynamodb_volume/
elastic_volume/
meili_data/
+htmlcov/
diff --git a/http-api/app.py b/http-api/app.py
index 726b5ef..85ea70d 100644
--- a/http-api/app.py
+++ b/http-api/app.py
@@ -31,6 +31,7 @@ app = APIGatewayHttpResolver(
app.use(middlewares=[AuthenticationMiddleware()])
app.include_router(courses.router, prefix='/courses')
app.include_router(enrollments.router, prefix='/enrollments')
+app.include_router(enrollments.vacancies, prefix='/enrollments')
app.include_router(orders.router, prefix='/orders')
app.include_router(users.router, prefix='/users')
app.include_router(users.logs, prefix='/users')
diff --git a/http-api/compose.yaml b/http-api/compose.yaml
index fc24509..0e0cb01 100644
--- a/http-api/compose.yaml
+++ b/http-api/compose.yaml
@@ -5,7 +5,7 @@ services:
ports:
- 8000:8000
volumes:
- - ./dynamodb_volume:/home/dynamodblocal/data
+ - ./.dynamodb_volume:/home/dynamodblocal/data
working_dir: /home/dynamodblocal
command: "-jar DynamoDBLocal.jar -sharedDb -dbPath ./data"
@@ -13,7 +13,7 @@ services:
container_name: meilisearch
image: getmeili/meilisearch:v1.13
volumes:
- - ./meili_data:/meili_data
+ - ./.meili_data:/meili_data
restart: unless-stopped
ports:
- 7700:7700
@@ -38,6 +38,6 @@ services:
soft: -1
hard: -1
volumes:
- - ./elastic_volume:/usr/share/elasticsearch/data
+ - ./.elastic_volume:/usr/share/elasticsearch/data
ports:
- 9200:9200
diff --git a/http-api/routes/enrollments/__init__.py b/http-api/routes/enrollments/__init__.py
index 4ed8549..ab46915 100644
--- a/http-api/routes/enrollments/__init__.py
+++ b/http-api/routes/enrollments/__init__.py
@@ -18,6 +18,11 @@ from middlewares.authentication_middleware import User
from rules.enrollment import set_status_as_canceled
from settings import ELASTIC_CONN, ENROLLMENT_TABLE, USER_TABLE
+from .vacancies import router as vacancies
+
+__all__ = ['vacancies']
+
+
router = Router()
elastic_client = Elasticsearch(**ELASTIC_CONN)
enrollment_layer = DynamoDBPersistenceLayer(ENROLLMENT_TABLE, dynamodb_client)
diff --git a/http-api/tests/routes/test_enrollments.py b/http-api/tests/routes/test_enrollments.py
index 9756f04..409bfbd 100644
--- a/http-api/tests/routes/test_enrollments.py
+++ b/http-api/tests/routes/test_enrollments.py
@@ -11,6 +11,26 @@ from layercake.dynamodb import (
from ..conftest import HttpApiProxy, LambdaContext
+def test_vacancies(
+ mock_app,
+ dynamodb_seeds,
+ dynamodb_persistence_layer: DynamoDBPersistenceLayer,
+ http_api_proxy: HttpApiProxy,
+ lambda_context: LambdaContext,
+):
+ r = mock_app.lambda_handler(
+ http_api_proxy(
+ raw_path='/enrollments/vacancies',
+ method=HTTPMethod.GET,
+ headers={'X-Tenant': '*'},
+ ),
+ lambda_context,
+ )
+
+ assert r['statusCode'] == HTTPStatus.OK
+ print(r)
+
+
def test_cancel_enrollment(
mock_app,
dynamodb_seeds,
diff --git a/superpage/.prettierrc b/superpage/.prettierrc
new file mode 100644
index 0000000..586faab
--- /dev/null
+++ b/superpage/.prettierrc
@@ -0,0 +1,4 @@
+{
+ "tabWidth": 2,
+ "useTabs": false,
+}
\ No newline at end of file
diff --git a/superpage/src/components/Accordion/Accordion.astro b/superpage/src/components/Accordion/Accordion.astro
index 00fe550..3435789 100644
--- a/superpage/src/components/Accordion/Accordion.astro
+++ b/superpage/src/components/Accordion/Accordion.astro
@@ -1,3 +1,3 @@
-
+
diff --git a/superpage/src/components/Accordion/Body.astro b/superpage/src/components/Accordion/Body.astro
index 0842deb..d951786 100644
--- a/superpage/src/components/Accordion/Body.astro
+++ b/superpage/src/components/Accordion/Body.astro
@@ -1,5 +1,5 @@
-
+
diff --git a/superpage/src/components/Accordion/Header.astro b/superpage/src/components/Accordion/Header.astro
index 9259d66..a5aae4c 100644
--- a/superpage/src/components/Accordion/Header.astro
+++ b/superpage/src/components/Accordion/Header.astro
@@ -3,11 +3,11 @@ import { Icon } from "astro-icon/components";
---
-
-
+
+
diff --git a/superpage/src/components/Accordion/Item.astro b/superpage/src/components/Accordion/Item.astro
index 9712870..ac22774 100644
--- a/superpage/src/components/Accordion/Item.astro
+++ b/superpage/src/components/Accordion/Item.astro
@@ -1,5 +1,5 @@
-
+
diff --git a/superpage/src/components/Carousel.astro b/superpage/src/components/Carousel.astro
index 069fb61..911f8d8 100644
--- a/superpage/src/components/Carousel.astro
+++ b/superpage/src/components/Carousel.astro
@@ -5,67 +5,67 @@ const { items = [] } = Astro.props;
---
-
+
-
+
-
+
diff --git a/superpage/src/components/Clients.astro b/superpage/src/components/Clients.astro
index 3c716af..30536c8 100644
--- a/superpage/src/components/Clients.astro
+++ b/superpage/src/components/Clients.astro
@@ -10,6 +10,6 @@ import Manserv from "~/icons/logos/manserv.svg";
---
- Alguns clientes que acreditam em nós
-
+ Alguns clientes que acreditam em nós
+
diff --git a/superpage/src/components/Contact.jsx b/superpage/src/components/Contact.jsx
index ba4ec85..4f00101 100644
--- a/superpage/src/components/Contact.jsx
+++ b/superpage/src/components/Contact.jsx
@@ -51,8 +51,8 @@ export default function Contact({ url }) {
)}
-
+
-
+
diff --git a/superpage/src/components/CookieConsent.astro b/superpage/src/components/CookieConsent.astro
index bff22a6..a5e5bdc 100644
--- a/superpage/src/components/CookieConsent.astro
+++ b/superpage/src/components/CookieConsent.astro
@@ -3,18 +3,18 @@ import "vanilla-cookieconsent/dist/cookieconsent.css";
---
diff --git a/superpage/src/components/Course/BuyDropdown.astro b/superpage/src/components/Course/BuyDropdown.astro
index 987e1e6..75f8e18 100644
--- a/superpage/src/components/Course/BuyDropdown.astro
+++ b/superpage/src/components/Course/BuyDropdown.astro
@@ -1,188 +1,182 @@
---
const { course } = Astro.props;
const currency = new Intl.NumberFormat("pt-BR", {
- style: "currency",
- currency: "BRL",
+ style: "currency",
+ currency: "BRL",
}).format(course.unit_price);
---
-
-
+
- Contratar agora
-
-