-
Notifications
You must be signed in to change notification settings - Fork 0
4 - Integrate Search and Listing Documents #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
CainaNascimentoMelo
merged 10 commits into
develop-1
from
A6-4-Integrate-Search-and-Listing-Documents
Sep 17, 2026
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
8060a57
feat(4): Add back front integration for DocumentList and Home
CainaNascimentoMelo 3accdbd
feat(4): Add axios and documentService
CainaNascimentoMelo ebb0d2f
feat(4): Add axios in package.json
CainaNascimentoMelo 394e385
feat(4): Add DocumentList and Home tests
CainaNascimentoMelo d1bce1f
fix(4): Correct NaN error
CainaNascimentoMelo a05f552
style(4): Sort Documents and Home respective folders
CainaNascimentoMelo e875431
feat(4): Add react-icons dependency
CainaNascimentoMelo 494db60
fix(4): Update import paths for Home, DocumentList and App
CainaNascimentoMelo a38bafc
feat(4): Replace SVG icons with react-icons in components
CainaNascimentoMelo deb52b5
feat(4): Add loading and error message styles to Home component
CainaNascimentoMelo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| import { FiEye } from "react-icons/fi"; | ||
| import "./DocumentItem.css"; | ||
|
|
||
| function formatarData(dataISO) { | ||
| if (!dataISO) return "-"; | ||
|
|
||
| const data = new Date(dataISO); | ||
| if (Number.isNaN(data.getTime())) return dataISO; | ||
|
|
||
| return data.toLocaleDateString("pt-BR", { | ||
| day: "2-digit", | ||
| month: "2-digit", | ||
| year: "numeric", | ||
| }); | ||
| } | ||
|
|
||
| function DocumentItem({ document, onView }) { | ||
| const typeClass = document.type | ||
| ?.toLowerCase() | ||
| .replace(/\s+/g, "-"); | ||
|
|
||
| const accessClass = document.accessLevel | ||
| ?.toLowerCase() | ||
| .replace(/\s+/g, "-"); | ||
|
|
||
| return ( | ||
| <div className="document-item"> | ||
| <div className="document-file"> | ||
| <span>{document.tipo_arquivo}</span> | ||
| </div> | ||
|
|
||
| <div className="document-name" title={document.nome}> | ||
| {document.nome} | ||
| </div> | ||
|
|
||
| <div className="document-type"> | ||
| <span className={`type-badge type-${typeClass}`}> | ||
| {document.setor} | ||
| </span> | ||
| </div> | ||
|
|
||
| <div className="document-date"> | ||
| {formatarData(document.data_atualizacao)} | ||
| </div> | ||
|
|
||
| <div className="document-access"> | ||
| <span className={`access-badge access-${accessClass}`}> | ||
| {document.nivel} | ||
| </span> | ||
| </div> | ||
|
|
||
| <div className="document-action"> | ||
| <button onClick={() => onView(document)}> | ||
| <FiEye size={17} /> | ||
| Visualizar | ||
| </button> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } | ||
|
|
||
| export default DocumentItem; |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
src/components/Document/DocumentList.jsx → ...ts/Document/DocumentList/DocumentList.jsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.