-
Notifications
You must be signed in to change notification settings - Fork 2
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
FORMS-674: Search #24
Conversation
7faacd3
to
cdb4dd7
Compare
cdb4dd7
to
7fc9d6e
Compare
7fc9d6e
to
b9bae6d
Compare
cc6ef2f
to
e1b9c86
Compare
e1b9c86
to
dcfca09
Compare
30cd023
to
65a648d
Compare
1f5ce09
to
02ff5a9
Compare
## Example: Find Organisation by CVR number | ||
|
||
```php | ||
|
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.
Should we add a working example here?
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.
Yes … when we have a working example …
src/Service/SF1500/BrugerService.php
Outdated
$model->brugertype = $egenskab->getBrugerTypeTekst(); | ||
} | ||
foreach ($registrering->getRelationListe()->getAdresser() as $adresse) { | ||
// TODO |
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.
Is there still more todo here?
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.
I don't know yet. I don't know if the models will be useful.
d72d8b7
to
8d0cdbc
Compare
8d0cdbc
to
f0233ce
Compare
src/Service/SF1500/BrugerService.php
Outdated
$organisationFunktioner = $service->soeg([ | ||
OrganisationFunktionService::FILTER_FUNKTIONSTYPEID => $this->options['organisation-funktion-manager-id'] | ||
]); |
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.
Could we end up in a scenario where this list is not exhaustive?
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.
I'm not sure I understand this question. We want to search for a specific type (id) and therefore search, i.e. filter, only on OrganisationFunktionService::FILTER_FUNKTIONSTYPEID
.
src/Service/SF1500/BrugerService.php
Outdated
foreach ($registrering->getAttributListe()->getEgenskab() as $egenskab) { | ||
$model->brugernavn = $egenskab->getBrugerNavn(); | ||
$model->brugertype = $egenskab->getBrugerTypeTekst(); | ||
} |
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.
Do we unintentionally overwrite brugernavn
and brugertype
here?
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.
Not unintentionally, but we assume that we have only a single item in the attribute list. I'll add a clarifying comment.
src/Service/SF1500/BrugerService.php
Outdated
$model->brugertype = $egenskab->getBrugerTypeTekst(); | ||
} | ||
foreach (($registrering->getRelationListe()->getAdresser() ?? []) as $adresse) { | ||
$model->setRelation( |
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.
setRelation
to me makes it seem it is overwritten for each $adresse
when in fact it adds to a list of relations. Should we rename to addRelation
?
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.
I'll add a clarifying comment.
https://jira.itkdev.dk/browse/FORMS-674