Skip to content

Commit

Permalink
🚧 Criando comunicação para envio do arquivo .txt com o backend
Browse files Browse the repository at this point in the history
Co-authored-by: João Marcos Moraes de Andrade <JJOAOMARCOSS@users.noreply.github.com>
Co-authored-by: André Goretti Motta <andremotta96@gmail.com>
  • Loading branch information
3 people committed Dec 13, 2024
1 parent 3f1ee42 commit 1ac1541
Show file tree
Hide file tree
Showing 6 changed files with 291 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export class VideoCommentComponent implements OnInit {

this.getComments();


}

getComments() {
Expand Down
5 changes: 3 additions & 2 deletions src/app/pages/catalog/catalog.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ export class CatalogComponent implements OnInit {
const matchesDescription = this.filterTitle ? video.description?.toLowerCase().includes(this.filterTitle.toLowerCase()) : true;
const matchesKeywords = this.filterTitle ? video.keywords?.toLowerCase().includes(this.filterTitle.toLowerCase()) : true;
const matchesCatalog = this.filterTitle ? video.catalog?.toLowerCase().includes(this.filterTitle.toLowerCase()) : true;
const matchesTranscript = this.filterTitle? video.transcript?.toLowerCase().includes(this.filterTitle.toLowerCase()) : true;

return (matchesTitle || matchesDescription || matchesKeywords || matchesCatalog);
});
return (matchesTitle || matchesDescription || matchesKeywords || matchesCatalog || matchesTranscript);
});
}

onProgramClick(videos: IVideo[]) {
Expand Down
13 changes: 8 additions & 5 deletions src/app/pages/video-views/video-views.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,14 @@ <h1>Dados - Vídeos</h1>
<td>{{ video.qtAccess }}</td>
<td>
{{ video.transcript }}
<!-- Caixa de upload -->
<form action="upload" method="post" enctype="multipart/form-data">
<input type="file" name="transcriptFile" id="transcriptFile" accept=".txt"
(change)="onFileUpload($event, video)" />
</form>
<!-- Caixa de upload atual -->
<!-- <form action="/upload" method="post" enctype="multipart/form-data"> -->
<div class="flex juystify-center items-center h-4/5">
<form (submit)="fileUpload($event, video.id!)" class="items-center">
<input type="file" name="transcriptFile" id="transcriptFile" accept=".txt"/>
<button type="submit">Enviar</button>
</form>
</div>
</td>
</tr>
</tbody>
Expand Down
Loading

0 comments on commit 1ac1541

Please sign in to comment.