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

Shutov / #2426 create interface to upload excel data #2467

Draft
wants to merge 40 commits into
base: develop
Choose a base branch
from

Conversation

MarianS23
Copy link
Contributor

@MarianS23 MarianS23 commented Apr 11, 2024

File requirements:

  1. extension .xlsx
  2. proper headers of the Excel table is
    ( Імя директора|Прізвище директора|Назва закладу|Форма власності|ЄДРПОУ|Ліцензія №|Населений пункт|
    Адреса|Електронна пошта|Телефон ) without whitespace before and after each header
  3. script processes only the first 100 lines of the Excel file

Validation requirements to:
1. directors name:
- The field can't be empty
2. directors surname:
- The field can't be empty
3. provider name:
- The field can't be empty
- length more/equal than 1 character , less than 60
4. ownership:
- The field can't be empty
5. identifier(EDRPOU)
- The field can't be empty
- format: 00000000
- duplicate verification ( if you try to load data that exists on the server it will give an error )
6. license number:
- The field can't be empty
7. settlement:
- The field can't be empty
- length more/equal than 1 character, less than 60
- only Cyrillic , no Latin characters
8. address:
- The field can't be empty
- only Cyrillic no Latin characters
9. email:
- The field can't be empty
- format
- duplicate verification ( if you try to load data that exists on the server it will give an error )
10. phone number:
- The field can't be empty
- format ( UA )

Errors indication color scheme:
- RED: you try to load information that already exists in the database (DUPLICATED INFO);
- PINK: empty field ;
- VIOLET: incorrect length, less than 1 character or more than 60;
- YELLOW: incorrect format
identifier(EDRPOU) - must be 8 digits;
email - standard email format (example@gmail.com)
- GREEN: incorrect language
settlement - correct language is 'UA'
address - correct language is 'UA'
Example of an Excel file that includes all invalid fields:
all mistake.xlsx

@github-actions github-actions bot requested review from DmyMi and humanmantis April 11, 2024 00:07
@MarianS23 MarianS23 changed the title #2426 create interfase to upload excel data #2426 create interface to upload excel data Apr 11, 2024
@MarianS23 MarianS23 changed the title #2426 create interface to upload excel data Shutov / #2426 create interface to upload excel data May 23, 2024
Copy link
Contributor

@humanmantis humanmantis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A general note for unit tests - divide the test into arrange/act/assert blocks to improve readability.
See how the tests for app.component look like

Copy link

@MarianS23 MarianS23 marked this pull request as draft June 25, 2024 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants