-
-
Notifications
You must be signed in to change notification settings - Fork 101
refactor: attach document #4464
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
Merged
Conversation
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
ee7e36f to
5fdfe26
Compare
b40d4f8 to
6ab87a6
Compare
Signed-off-by: Vitor Mattos <vitor@php.rio>
Introduces new IdDocs system to manage identification documents for digital signatures, replacing the AccountFile system. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Adds REST API endpoints for ID documents management: - POST /api/v1/id-docs - Add identification documents - DELETE /api/v1/id-docs - Delete document - GET /api/v1/id-docs - List documents - GET /api/v1/id-docs/approval/list - List documents pending approval Updates PageController route from /account/files to /id-docs Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Updates all service layer code to use IdDocsMapper: - AccountService: replace AccountFileMapper with IdDocsMapper - SignFileService: update validation to use IdDocs - ValidateHelper: migrate document validation logic - FolderService: add IUser object handling - Remove AccountFile dependencies from AccountController Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Updates File entity and related controllers to work with IdDocs instead of AccountFile references. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Removes deprecated AccountFile entity, mapper and service after migration to IdDocs system. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Rename AccountValidation to IdDocsValidation component - Update router paths from /docs/accounts to /docs/id-docs - Update route names: DocsAccountValidation -> DocsIdDocsValidation - Update action handlers to use IdDocsApprove route - Update LeftSidebar navigation links Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Add IdDocsServiceTest with comprehensive test coverage - Update ValidateHelperTest, AccountServiceTest and SignFileServiceTest - Remove AccountFileServiceTest - Fix test mocks to work with IdDocsMapper Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Create IdDocsControllerTest with tests for new endpoints - Update AccountControllerTest removing deprecated tests - Ensure all API endpoints are properly tested Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Updates OpenAPI spec and TypeScript types to reflect: - New IdDocs endpoints - Removed AccountFile endpoints - Fixed complex filter parameter warnings Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
6ab87a6 to
4915cb8
Compare
- Add missing psalm-import-type for LibresignPagination and LibresignFile - Add #[Override] attributes to migration methods - Fix timestamp conversion using getTimestamp() method - Fix signRequestId type from string to int - Fix filter parameter type from string to array<string, mixed> - Fix typo: singRequestId -> signRequestId Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Change pattern name from 'identifier' to 'userId' to match tests - Initialize folderName as empty array instead of null - Maintain support for both IUser objects and string identifiers Fixes test failures in FolderServiceTest::testGetFolderName Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Auto-formatted import order by IDE/linter. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
When signing as unauthenticated user, $user is null and $user?->getUID() returns null. The getIdentificationDocumentsStatus() method expects a string parameter, so we need to use null coalescing operator to provide empty string as fallback. Fixes integration test failures: - request.feature:420 - request.feature:479 - signed.feature:169 Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Add NcActions with validate and delete buttons - Hide validate button when document is already signed (status === 4) - Add deleteDocument method to remove ID documents - Use proper Nextcloud components and icons Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add beforeRouteLeave navigation guard to ensure sidebar closes when navigating away from ID document approval screen. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Use UUIDUtil::getUUID() instead of OCP\Util (consistent with codebase) - Change setMandatory parameter from true to 1 (expects int not bool) - Add IdDocsService and SignFileService to psalm baseline for UUIDUtil Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Add :force-menu="true" to keep actions menu always visible - Add View button with EyeIcon to navigate to validation page - Add Validate button (hidden when status is 4/signed) - Add Delete button with DeleteIcon - Remove redundant View PDF button (merged with View) - Use router.push for in-app navigation Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Add :inline="2" to show first 2 buttons inline - Add :force-name="true" to display button labels - Keep standard NcActions dropdown behavior for remaining actions Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Replace CheckIcon with PencilIcon to better represent the action of signing the ID document for approval Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Add NcAvatar as first column showing document owner - Display owner name in second column - Reorder columns: Avatar, Owner, Type, Status, Actions - Add blank header cell for avatar column Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Add 'Approved by' column showing who validated/signed the document - Display avatar and name of the signer who completed sign_date - Show '-' when document hasn't been signed yet Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Change condition from doc.status to doc.file?.status - Check for status !== 3 (signed) instead of !== 4 - Fixes Sign button appearing on already signed documents Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Add getUserConfigIdDocsFilters() method to load user filter preferences - Move admin permission check into getUserConfigCrlFilters() and getUserConfigCrlSort() - Simplify getConfig() by removing redundant conditionals - Each getUserConfig*() method now handles its own validation and default values Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Add Owner and Status filters with NcActions toolbar - Implement filter persistence using userConfigStore - Apply CRL table structure with frozen columns and sticky headers - Filters saved automatically with 500ms debounce - Load saved filters from user config on mount Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Add IL10N injection to IdDocsMapper for proper translation support - Change status text from generic 'available for signature' to context-specific messages - Status 1 (STATUS_ABLE_TO_SIGN): 'waiting for approval' - Status 3 (STATUS_SIGNED): 'approved' - Helps users better understand their document state in the approval workflow Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Modified /api/v1/file/list endpoint to return identification document settings - Settings are extracted from first file (global per user, not per file) - Enables file list flow to have settings available without additional requests - Complements direct URL flow for comprehensive coverage Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Add null coalescing operator to handle potential null return from getTextOfStatus() - Fixes Psalm InvalidNullableReturnType and NullableReturnStatement errors Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Change from array[] to array<string, mixed> for more accurate type - Fixes Psalm InvalidReturnType and InvalidReturnStatement errors Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Import useIdentificationDocumentStore in files.js - Process settings from /api/v1/file/list response - Update identificationDocumentStore when file list is loaded - Enables proactive identification document detection for file list flow Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Change title from 'Your profile documents' to 'Identification Documents' - Makes component suitable for use in both profile page and sign flow Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Show Documents component directly instead of in modal - Remove uploadDocuments modal code (no longer needed) - Provides more direct and intuitive user experience Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
a843e05 to
3ee0f46
Compare
Member
Author
|
/backport to stable32 |
Member
Author
|
/backport to stable31 |
2 tasks
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.