From 33d83c208897b35ac30a95243ba5f33e2001b840 Mon Sep 17 00:00:00 2001 From: Matheus Coitinho Date: Thu, 31 Jul 2025 13:54:09 -0300 Subject: [PATCH 1/9] =?UTF-8?q?fix:=20habilita=20coment=C3=A1rios=20no=20B?= =?UTF-8?q?abel=20e=20ajusta=20rota=20de=20documenta=C3=A7=C3=A3o=20Swagge?= =?UTF-8?q?r?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .babelrc | 2 +- src/app.js | 2 +- src/config/swagger.js | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.babelrc b/.babelrc index 41e3e571..b0fb7e55 100644 --- a/.babelrc +++ b/.babelrc @@ -23,7 +23,7 @@ ], "@babel/plugin-proposal-class-properties" ], - "comments": false, + "comments": true, "sourceMaps": "inline", "ignore": [ "**/*.d.ts" diff --git a/src/app.js b/src/app.js index 7e87135b..450733a2 100644 --- a/src/app.js +++ b/src/app.js @@ -13,7 +13,7 @@ import routes from './routes'; const app = express(); app.use(cors()); -app.use('/api/docs', swaggerUi.serve, swaggerUi.setup(swaggerSpec)); +app.use('/docs', swaggerUi.serve, swaggerUi.setup(swaggerSpec)); app.use(parser.json()); app.use(morgan('dev')); diff --git a/src/config/swagger.js b/src/config/swagger.js index 42431ef5..0c295cd5 100644 --- a/src/config/swagger.js +++ b/src/config/swagger.js @@ -105,6 +105,7 @@ const options = { }, apis: [ './src/routes/*.js', + './dist/routes/*.js', ], }; From 8ad88658128568e9abc57551d74241b10df0ca69 Mon Sep 17 00:00:00 2001 From: yuriBaza23 Date: Fri, 1 Aug 2025 17:23:41 -0300 Subject: [PATCH 2/9] =?UTF-8?q?feat:=20adquire=20o=20n=C3=BAmero=20de=20c?= =?UTF-8?q?=C3=B3pias=20a=20serem=20feitas=20da=20mesma=20ficha=20tombo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/fichas-tombos-controller.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/controllers/fichas-tombos-controller.js b/src/controllers/fichas-tombos-controller.js index 783aafc6..3ac52a8c 100644 --- a/src/controllers/fichas-tombos-controller.js +++ b/src/controllers/fichas-tombos-controller.js @@ -41,6 +41,7 @@ function formataDataSaida(data) { export default function fichaTomboController(request, response, next) { const { tombo_id: tomboId } = request.params; + const { qtd } = request.query; Promise.resolve() .then(() => { @@ -250,6 +251,7 @@ export default function fichaTomboController(request, response, next) { romano_data_tombo: romanoDataTombo, romano_data_identificacao: romanoDataIdentificacao, romano_data_coleta: romanoDataColeta, + numero_copias: qtd || 1, }; const caminhoArquivoHtml = path.resolve(__dirname, '../views/ficha-tombo.ejs'); From b1f2314dca0fc077ac271b96438d5e50a17db791 Mon Sep 17 00:00:00 2001 From: yuriBaza23 Date: Fri, 1 Aug 2025 17:25:01 -0300 Subject: [PATCH 3/9] =?UTF-8?q?fix:=20corrige=20tamanho=20de=20fontes=20e?= =?UTF-8?q?=20adiciona=20c=C3=B3pias=20da=20mesma=20ficha=20tombo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ficha-tombo.ejs | 44 ++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/src/views/ficha-tombo.ejs b/src/views/ficha-tombo.ejs index c5fbfb7f..2e4a44be 100644 --- a/src/views/ficha-tombo.ejs +++ b/src/views/ficha-tombo.ejs @@ -13,9 +13,10 @@ html, body { - font-size: 11px; + font-size: 12px; font-family: Arial, Helvetica, sans-serif; - padding: 10px; + padding-top: 8px; + padding-left: 8px; } body { @@ -40,7 +41,7 @@ border: 1px solid #333; width: 14cm; min-height: 9cm; - margin-bottom: 20px; + margin-bottom: 5px; } .tabela-principal td { @@ -70,38 +71,41 @@ <% if ( imprimir === '0') { %> <% fotos.length = 1%> <% } %> - <% for (let i = 0; i < fotos.length; i++) { %> - <% if (i !== 0 && i % 3 === 0) { %> -
+ <% const copias = parseInt(numero_copias || 1); %> + <% let fichaIndex = 0; %> + <% for (let i = 0; i < fotos.length; i++) { + for (let j = 0; j < copias; j++) { %> + <% if (fichaIndex !== 0 && fichaIndex % 3 === 0) { %> + <% } %> - <% if (familia && familia.nome) { %> <% } %> <% if (identificacao && identificacao.usuario) { %> <% } %>
Logo UTFPR -
CAMPUS CAMPO MOURÃO
+
CAMPUS CAMPO MOURÃO
- Herbário da Universidade Tecnológica Federal do Paraná - Campus Campo Mourão + Herbário da Universidade Tecnológica Federal do Paraná -
Campus Campo Mourão
- HCF: <%- tombo.hcf %> + HCF <%- tombo.hcf %> - Data: <%- romano_data_tombo %> + +
Data: <%- romano_data_tombo %>
- Família: <%- tombo.familia.nome %> + Família: <%- tombo.familia.nome %>
- Espécie: + Espécie: <% if (genero && genero.nome) { %> <%- genero.nome %> <% } %> @@ -130,22 +134,22 @@
- Nome Vulgar: <%- tombo.nomes_populares %> + Nome Vulgar: <%- tombo.nomes_populares %>
- Identificador: <%- identificacao.usuario.nome %> + Identificador: <%- identificacao.usuario.nome %> - Data: <%- romano_data_identificacao %> + Data: <%- romano_data_identificacao %>
- Local de coleta: + Local de coleta: <% if (localColeta && localColeta.complemento) { %> <%- localColeta.complemento %> <% } %> @@ -168,7 +172,7 @@
- Observações: + Observações: <% if (tombo && tombo.observacao) { %> <%- tombo.observacao %> <% } %> @@ -203,7 +207,7 @@
- <%- tombo.coletores.length == 1 ? 'Coletor' : 'Coletores' %>: <%- tombo.coletores %> + <%- tombo.coletores.length == 1 ? 'Coletor' : 'Coletores' %>: <%- tombo.coletores %> nº: <%- tombo.numero_coleta %> @@ -229,6 +233,8 @@ }); <% } %> + <% fichaIndex++; %> + <% } %> <% } %>