Skip to content

Commit 9b5cac1

Browse files
authored
Merge pull request #745 from Thoth2023/bug/import-studies-txt-doi-null
ajuste importar .txt no formato BIB
2 parents 8b89bcc + 8a6e597 commit 9b5cac1

File tree

5 files changed

+28
-331
lines changed

5 files changed

+28
-331
lines changed

app/Livewire/Conducting/ImportStudies.php

Lines changed: 0 additions & 325 deletions
This file was deleted.

app/Rules/ValidBibFile.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ public function passes($attribute, $value)
1414

1515
$mimeType = $value->getMimeType();
1616
$extension = $value->getClientOriginalExtension();
17-
17+
1818
// Verifica se é um arquivo de texto e tem extensão .bib ou .csv
19-
return (str_starts_with($mimeType, 'text/') || $mimeType === 'application/csv') &&
20-
in_array($extension, ['bib', 'csv']);
19+
return (str_starts_with($mimeType, 'text/') || $mimeType === 'application/csv') &&
20+
in_array($extension, ['bib', 'csv','txt']);
2121
}
2222

2323
public function message()
2424
{
25-
return 'Apenas arquivos .bib e .csv são permitidos.';
25+
return 'Apenas arquivos .bib, .txt(formato BIB) e .csv são permitidos.';
2626
}
2727
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
6+
7+
return new class extends Migration
8+
{
9+
public function up()
10+
{
11+
Schema::table('papers', function (Blueprint $table) {
12+
$table->string('doi')->nullable()->change();
13+
});
14+
}
15+
16+
public function down()
17+
{
18+
Schema::table('papers', function (Blueprint $table) {
19+
$table->string('doi')->nullable(false)->change();
20+
});
21+
}
22+
};

lang/en/project/conducting.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@
475475
],
476476

477477
'help' => [
478-
'content' => 'Upload files in ".bib" or ".csv" format and import the files according to the database defined in the plan.<br>
478+
'content' => 'Upload files in ".bib", ".txt" (format BibTex) or ".csv" format and import the files according to the database defined in the plan.<br>
479479
<ul>
480480
<li><b>Note:</b> If you want to conduct <b>"Peer Review"</b>, it is necessary to invite the researchers and add them to the project before importing the studies (papers).</li>
481481
<li>To add researchers, navigate to <b>"My Projects->Team"</b></li>

lang/pt_BR/project/conducting.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@
296296
'delete' => 'Deletar'
297297
],
298298
'help' => [
299-
'content' => 'Insira Arquivos no Formato ".bib" ou ".csv" e faça a importação de arquivos de acordo com a base inserida no planejamento<br>
299+
'content' => 'Insira Arquivos no Formato ".bib", ".txt (formato BibTex) ou ".csv" e faça a importação de arquivos de acordo com a base inserida no planejamento<br>
300300
<ul>
301301
<li><b>Obs.:</b> Se você deseja realizar <b>"Avaliação por Pares"</b>, é necessário convidar os pesquisadores e adicionar ao projeto antes de importar os estudos (papers)</li>
302302
<li>Para adicionar pesquisadores, navegue até <b>"Meus Projetos->Colaboradores"</b></li>

0 commit comments

Comments
 (0)