Closed Andrei-Matibag closed 1 month ago
For Windows: Enable the extension in php.ini
when needed its better if you can provide the line or name
confirm if this is correct
@C-Ivan-Bandilla Yes, that's correct. I've updated the overview of this pr regarding this. Thank you.
UP @biellamariscotes @C-Ivan-Bandilla @Andrei-Matibag
@Andrei-Matibag is the import function working now? If so, can you provide a demo?
@Carl-Tabuso this is the demo for import that the function is working.
https://github.com/user-attachments/assets/38ae0900-96ef-4da7-9ea3-06c1b3b79caf
@Carl-Tabuso this is the demo for import that the function is working.
2024-07-16.20-50-30.mp4
I suggest that upon uploading an invalid file, it should be validated at that very moment. You don't wait for the user to hit the button before showing the modal.
@Carl-Tabuso this is the demo for import that the function is working. 2024-07-16.20-50-30.mp4
I suggest that upon uploading an invalid file, it should be validated at that very moment. You don't wait for the user to hit the button before showing the modal.
It's not an invalid file, It's an invalid format of the content inside the csv/xls file
I have the validation for an invalid file
@Carl-Tabuso this is the demo for import that the function is working. 2024-07-16.20-50-30.mp4
I suggest that upon uploading an invalid file, it should be validated at that very moment. You don't wait for the user to hit the button before showing the modal.
It's not an invalid file, It's an invalid format of the content inside the csv/xls file
I'm sorry for not showing it clearly
Ohh ok, I get it now. That means if the file contents are invalid, there should be a different warning modal, but in your case you simply recycled the modal for invalid file and max 25mb of size, correct?
Ohh ok, I get it now. That means if the file contents are invalid, there should be a different warning modal, but in your case you simply recycled the modal for invalid file and max 25mb of size, correct?
Yes. I base on Figma. So I didn't add another modal for it
Yes. I base on Figma. So I didn't add another modal for it
You should perhaps just change the modal title and contents in this case and have it sent to our gc.
Yes. I base on Figma. So I didn't add another modal for it
You should perhaps just change the modal title and contents in this case and have it sent to our gc.
Okay i'll code it and make a pr. I'll send it to our gc too
@Carl-Tabuso I have a question regarding the export functionality. Are we still gonna add it? In just my point of view it is repetitive because the user already imported those list of students why still export? But if we still gonna add it, in what page should we put the export functionality? There's no update in figma about this so I asked.
@Carl-Tabuso I have a question regarding the export functionality. Are we still gonna add it? In just my point of view it is repetitive because the user already imported those list of students why still export? But if we still gonna add it, in what page should we put the export functionality? There's no update in figma about this so I asked.
Yes, exporting files can also be used to preserve and copy old accounts in the event of permanent deletion or data migration.
About the export UI, I'll ask Yuri and others to provide an update.
@Carl-Tabuso I have a question regarding the export functionality. Are we still gonna add it? In just my point of view it is repetitive because the user already imported those list of students why still export? But if we still gonna add it, in what page should we put the export functionality? There's no update in figma about this so I asked.
Yes, exporting files can also be used to preserve and copy old accounts in the event of permanent deletion or data migration.
About the export UI, I'll ask Yuri and others to provide an update.
Thank you @Carl-Tabuso
Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Is the arrangement of columns here is what will be followed across all orgs — have you talked abut this matter with biella? If so, we may proceed with the merging of this pr
I have an issue with the file input field allowing attachments of pdf. You should add a client-side validation for this. We don't wait for the user to click the button, for him to realize he uploaded a wrong file extension. Kind of like how it works in the registration page. Upon import, the file size and extension is validated on the client-side but also on the server-side later. It bothers me that there is a page reload after clicking the import voters or close button. You can implement ajax for this.
https://github.com/user-attachments/assets/cb8f6dec-4d7a-47c3-a4f9-cd8821d4b6c7
It's quite unclear also to say that there's a duplicate of users found if those user accounts are in the recycle bin. What you can do is rephrase the modal. You can still say that there's a duplicate found and they may also check the recycle bin for such duplicates. You should also add a button state if the server-side is processing the data from the imported file. From the video below, the Import Voters button is vulnerable to shotgun clicks. And yes, the page reload is uncalled for.
Take a closer look here:
https://github.com/user-attachments/assets/5f07ccd0-9290-4390-a5dd-a83c3c8db340
Is the arrangement of columns here is what will be followed across all orgs — have you talked abut this matter with biella? If so, we may proceed with the merging of this pr
We talked about it. She sends the format but we will follow the format I sent. I will just insert the Student ID column as the first header
It's quite unclear also to say that there's a duplicate of users found if those user accounts are in the recycle bin. What you can do is rephrase the modal. You can still say that there's a duplicate found and they may also check the recycle bin for such duplicates. You should also add a button state if the server-side is processing the data from the imported file. From the video below, the Import Voters button is vulnerable to shotgun clicks. And yes, the page reload is uncalled for.
Take a closer look here:
2024-07-17.13-50-04.mp4
I managed to fix this. It will reject the import process even if there's a single invalid data or format in the excel file. It will not be vulnerable to shotgun clicks because it will keep showing the invalid modal.
I will update my pr and the format in the google drive
I included the Student ID but it will not saved in the DB. I disable the button while importing.
https://github.com/user-attachments/assets/08ca82c2-68d1-4723-beb0-e3599ec2b57c
I updated the sample formats in the google drive
Does it check the file for duplicates entries?
https://drive.google.com/file/d/1t42Kqb5xGiMn6pqdFVYss4GqExUSRjCJ/view?usp=sharing
Does it check the file for duplicates entries?
![]()
https://drive.google.com/file/d/1t42Kqb5xGiMn6pqdFVYss4GqExUSRjCJ/view?usp=sharing
does it have same student ID?
does it have same student ID?
Yes it has
This may be user fault but may cause issues in the system if not handled especially if the number of imported users are numerous such as resetting password by email may fail and etc.
I have an issue with the file input field allowing attachments of pdf. You should add a client-side validation for this. We don't wait for the user to click the button, for him to realize he uploaded a wrong file extension. Kind of like how it works in the registration page. Upon import, the file size and extension is validated on the client-side but also on the server-side later. It bothers me that there is a page reload after clicking the import voters or close button. You can implement ajax for this.
2024-07-17.13-42-34.mp4
I managed to fix this. I disabled the button when putting a file other than csv/xls file. I also include the modal of invalid file format
does it have same student ID?
Yes it has
![]()
This may be user fault but may cause issues in the system if not handled especially if the number of imported users are numerous such as resetting password by email may fail and etc.
I fixed this. I put a validation to check duplication of the prefix of email and the "00000" part of the student ID within the file and database for the email
does it have same student ID?
Yes it has
![]()
This may be user fault but may cause issues in the system if not handled especially if the number of imported users are numerous such as resetting password by email may fail and etc.
I fixed this. I put a validation to check duplication of the prefix of email and the "00000" part of the student ID within the file and database for the email
If there's a problem in the Student ID part. I'll try to fix it as soon as possible
If there's a problem in the Student ID part. I'll try to fix it as soon as possible
Will check right now
:tada: This PR is included in version 2.39.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Does this not need an issue ticket label?
Overview
Documentation
PHP 7.4 or later Composer
Installation Steps
For Windows: Enable the extension=gd and extension=zip in php.ini
Additional Information -This library is installed in the vendor folder and will be used for importing/exporting voters in the system -This library is needed as the xlsx/xls and csv files need to use the phpspreadsheet library -Activity log is also included here in this PR -This can be tested now.
This will only accept 'Student ID, Last Name', 'First Name', 'Middle Name', 'Suffix', 'Year Level', 'Section', 'Email' the COR cannot be imported within the excel/csv file as it was not possible. In excel and csv, the PDF is only imported as object and not the file itself.
The following are automatically: $role = 'student_voter'; $accountStatus = 'for_verification'; $voterStatus = 'active'; $voteStatus = NULL;
for csv/excel sample files, it can be found here: https://drive.google.com/drive/folders/1O_q27gTnlqtNn-Fk0q4zZWPpa29S1lnJ?usp=drive_link
this will close the #258 issue