Skip to content
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

Grouped buttons and more spaces #909

Open
wants to merge 55 commits into
base: main
Choose a base branch
from

Conversation

zak39
Copy link
Collaborator

@zak39 zak39 commented Nov 23, 2023

I grouped buttons to import users with a csv files. I added more spaces in the modal cotainer and changed the checkbox for the
NcCheckboxRadioSwitch component.

Todo

  • Delete the Csv.php file from lib/Files.

@zak39 zak39 added frontend Modification related to frontend refactor labels Nov 23, 2023
@zak39 zak39 self-assigned this Nov 23, 2023
@zak39
Copy link
Collaborator Author

zak39 commented Feb 28, 2024

This PR increases by one the major part because we have function names are changed and is no longer compatible with the previous major release

@zak39 zak39 mentioned this pull request Mar 5, 2024
@zak39 zak39 force-pushed the refactor/improve-select-users-and-csv-import-users branch from ef9a00c to 6d55312 Compare March 20, 2024 08:52
@zak39 zak39 force-pushed the refactor/improve-select-users-and-csv-import-users branch from 3d80c76 to 8f58549 Compare March 27, 2024 15:28
@zak39 zak39 force-pushed the refactor/improve-select-users-and-csv-import-users branch from 02a6f15 to be39381 Compare July 3, 2024 12:50
zak39 added 22 commits July 16, 2024 12:31
I grouped buttons to import users with a csv files.
I added more spaces in the modal cotainer and changed the checkbox for
the
NcCheckboxRadioSwitch component.

Signed-off-by: Baptiste Fotia <[email protected]>
I replaced the wording "Add users" with "Add".

Signed-off-by: Baptiste Fotia <[email protected]>
Check if one or more users exist and if it's not. I return an error with
JSONResponse.

Signed-off-by: Baptiste Fotia <[email protected]>
From the FileCSVController, I refactored all functions to get users data for the frontend in the new UserFormatter class.

Signed-off-by: Baptiste Fotia <[email protected]>
I refactored the import users code by csv files :

- Validate headers ;
- Extract headers ;
- Detect the separator ;
- Check the mimetype ;
- and so on.

Signed-off-by: Baptiste Fotia <[email protected]>
Now, we use CsvReader as a function in a loop (for example).
CsvReader use __invoke and returns a Generator.

Signed-off-by: Baptiste Fotia <[email protected]>
I impoved the reading speed and the extracting of the header name.

Signed-off-by: Baptiste Fotia <[email protected]>
The $header property is readonly for PHP^8.1.

Signed-off-by: Baptiste Fotia <[email protected]>
Improve the wording to upload a file and choose a file from Files.

Signed-off-by: Baptiste Fotia <[email protected]>
I impove in the error responses with Exceptions typed on the
AbstractNotificationException and these exceptions return a JSONResponse
with detailled information.

Signed-off-by: Baptiste Fotia <[email protected]>
I resized the select users modal window to fix the sizing of the remove modal window.

Signed-off-by: Baptiste Fotia <[email protected]>
Signed-off-by: Baptiste Fotia <[email protected]>
I added a mock of the axios in the jest.setup.js file.
Without it, I could not run the npm test.

Signed-off-by: Baptiste Fotia <[email protected]>
I created tabs to choice between a manual select or import by csv files.

I took advantage of the opportunity to split the components and reduce
the size of the code.

Signed-off-by: Baptiste Fotia <[email protected]>
I put the is-member css rule and I replaced the SelecteUsers.vue in the
GroupDetails.vue by AddUsersTabs.vue.

Signed-off-by: Baptiste Fotia <[email protected]>
We take the WM value as role into account.

Signed-off-by: Baptiste Fotia <[email protected]>
I extended the modal window to align other components (buttons and
input) with the text input.

Signed-off-by: Baptiste Fotia <[email protected]>
I forgot to add the isWorkspaceManager() function to check if an user is
WM or admin.

Signed-off-by: Baptiste Fotia <[email protected]>
zak39 added 18 commits July 16, 2024 12:31
We lo longer use this file.

Signed-off-by: Baptiste Fotia <[email protected]>
We search users by email from csv files and I translated the tab titles.

Signed-off-by: Baptiste Fotia <[email protected]>
I deleted the use of a component that has been commented on.

Signed-off-by: Baptiste Fotia <[email protected]>
The NcNoteCard took up the entire width.

Signed-off-by: Baptiste Fotia <[email protected]>
Rename "ManagerConnectionFileInterface" to "BasicStreamInterface" and
create the FileInterface interface which extends from
"BasicStreamInterface" and implement the "getPath" method.
@zak39 zak39 force-pushed the refactor/improve-select-users-and-csv-import-users branch from 5dc1f81 to 79e4ace Compare July 16, 2024 10:31
zak39 and others added 11 commits July 16, 2024 16:36
Now, we use the 'wm' term to define a user as WorkspaceManager for a
workspace.
I ran composer run cs:fix.
Fix the problem with checkbox.
If we have this content in the csv file :

user,role
user1,u
user2
user3,wm

Workspace App doesn't send error notification.
This commit check this case and send error notification.
Refactore the route to be "/space/{spaceId}/import-users/local" and "/space/{spaceId}/import-users/files" to respect the RestFull and we get Workspace information from its spaceId now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Modification related to frontend refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant