-
Notifications
You must be signed in to change notification settings - Fork 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
[#2004] Fix order of company branches #942
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #942 +/- ##
========================================
Coverage 94.68% 94.69%
========================================
Files 831 831
Lines 29275 29297 +22
========================================
+ Hits 27720 27742 +22
Misses 1555 1555 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good 👍
I'm not entirely sure if we're doing the right thing here though. I'm testing locally with the test KVK API and now it looks like this for kvk number 68750110
My assumption was that if you selected the hoofdvestiging
, you would be able to see all Aanvragen / vragen for all vestigingen. It seems however that the hoofdvestiging
does have a vestigingnummer
(different from the KVK number), which would mean it would only show the data related to that vestigingsnummer
.
The second choice in my screenshot was what I initially thought was the one you'd select if you want to see all data for all branches and that one happens to be of type=rechtspersoon
:
"resultaten": [
{
"kvkNummer": "68750110",
"handelsnaam": "Test BV Donald",
"type": "rechtspersoon",
"links": [
{
"rel": "basisprofiel",
"href": "https://api.kvk.nl/test/api/v1/basisprofielen/68750110"
}
]
},
{
"kvkNummer": "68750110",
"vestigingsnummer": "000037178598",
"handelsnaam": "Test BV Donald",
"adresType": "bezoekadres",
"straatnaam": "Hizzaarderlaan",
"plaats": "Lollum",
"type": "hoofdvestiging",
"links": [
{
"rel": "basisprofiel",
"href": "https://api.kvk.nl/test/api/v1/basisprofielen/68750110"
},
{
"rel": "vestigingsprofiel",
"href": "https://api.kvk.nl/test/api/v1/vestigingsprofielen/000037178598"
}
]
},
{
"kvkNummer": "68750110",
"vestigingsnummer": "000037178601",
"handelsnaam": "Test BV Donald Nevenvestiging",
"adresType": "bezoekadres",
"straatnaam": "Brinkerinckbaan",
"plaats": "Diepenveen",
"type": "nevenvestiging",
"links": [
{
"rel": "basisprofiel",
"href": "https://api.kvk.nl/test/api/v1/basisprofielen/68750110"
},
{
"rel": "vestigingsprofiel",
"href": "https://api.kvk.nl/test/api/v1/vestigingsprofielen/000037178601"
}
]
}
]
I think we should probably do the following:
- regardless of whether we see a
hoofdvestiging
in the KvK data, the first choice should be the one that allows you to see all data (simply the KVK number) - the second choice should be the
hoofdvestiging
- the rest should be the remaining
nevenvestiging
en (if they exist) and we should not show any other types likerechtspersoon
@alextreme thoughts?
That seems like a better approach yes. Sorry, I mixed up the fact that the 'KvK number without branch selection' (so for acting as the company as a whole) is something different than selecting the hoofdvestiging, which is a branch |
@alextreme @stevenbal What about the case where the response only contains branches with a [
{
"kvkNummer": "69599084",
"vestigingsnummer": "000038509504",
"handelsnaam": "Test EMZ Dagobert",
"adresType": "bezoekadres",
"straatnaam": "Abebe Bikilalaan",
"plaats": "Amsterdam",
"type": "hoofdvestiging",
"links": [
{
"rel": "basisprofiel",
"href": "https://api.kvk.nl/test/api/v1/basisprofielen/69599084"
},
{
"rel": "vestigingsprofiel",
"href": "https://api.kvk.nl/test/api/v1/vestigingsprofielen/000038509504"
}
]
},
{
"kvkNummer": "69599084",
"vestigingsnummer": "000038509520",
"handelsnaam": "Test EMZ Nevenvestiging Govert",
"adresType": "bezoekadres",
"straatnaam": "Geneinde",
"plaats": "Maastricht",
"type": "nevenvestiging",
"links": [
{
"rel": "basisprofiel",
"href": "https://api.kvk.nl/test/api/v1/basisprofielen/69599084"
},
{
"rel": "vestigingsprofiel",
"href": "https://api.kvk.nl/test/api/v1/vestigingsprofielen/000038509520"
}
]
}
] Given our current setup, the user won't be able to log in and retrieve information about the entire company. Should we check for this case and create an additional option (i.e. without vestiging restriction), or display only the options returned by the KvK API? |
@pi-sigma I would do it like this:
|
f7c9c6e
to
1d78364
Compare
1d78364
to
917af4f
Compare
1cd8a25
to
1f12b9e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now, the only remaining thing is the incorrect rebase (which also causes the failing tests)
1f12b9e
to
0cc8000
Compare
Make sure that the main company branch ("hoofdvestiging") comes before any subsidiary ("nevenvestiging")
Taiga: #2004