Skip to content

feat(SCHUL-611): Notificatie Allegro status update#380

Open
RubenSibon wants to merge 29 commits intomainfrom
feat/SCHUL-611_notificatie-allegro-status-update
Open

feat(SCHUL-611): Notificatie Allegro status update#380
RubenSibon wants to merge 29 commits intomainfrom
feat/SCHUL-611_notificatie-allegro-status-update

Conversation

@RubenSibon
Copy link
Collaborator

@RubenSibon RubenSibon commented Jan 22, 2026

No description provided.

RubenSibon and others added 12 commits January 9, 2026 14:17
* feat: enable proxy usage

* build(release): file w/ tag

* build(Make): re-add node versions

* build(xdebug): client host

* feat: missing files :-)

* feat: make import schuldeisers command working from local

* build(make): add command to enter pod

* refactor(allegro): move duplicate code to helper function

* feat(allegro): implement proxy in more services

* refactor(allegro): make it more DRY

* refactor(allegrohelper): make code more consistent

* build(docker): pull and restart policies

* chore(cleanup): unused imports and spacing

---------

Co-authored-by: jmassink <j.massink@amsterdam.nl>
* build(release): file w/ tag

* build(Make): re-add node versions

* build(xdebug): client host

* build(deps): composer upgrade

* build(deps): npm update

* build(deps): bump webpack-dev-server from 4.15.2 to removed in the npm_and_yarn group across 1 directory (#372)

* build(deps): bump webpack-dev-server

Bumps the npm_and_yarn group with 1 update in the / directory: [webpack-dev-server](https://github.com/webpack/webpack-dev-server).


Removes `webpack-dev-server`

---
updated-dependencies:
- dependency-name: webpack-dev-server
  dependency-version: 
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): upgrade symfony webpack encore

And related pacakges.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ruben Sibon <r.sibon@amsterdam.nl>

* build(deps): upgrade jspdf majorly

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
style(editorconfig): update linelength
…ossier into feat/SCHUL-611_notificatie-allegro-status-update
Copilot AI review requested due to automatic review settings January 22, 2026 13:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@RubenSibon RubenSibon self-assigned this Jan 23, 2026
@RubenSibon RubenSibon marked this pull request as ready for review January 23, 2026 14:23
feat(dossierDasboard.html.twig): don't show export button to normal users
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

tvanoort85
tvanoort85 previously approved these changes Jan 23, 2026
Copy link
Contributor

@tvanoort85 tvanoort85 left a comment

Choose a reason for hiding this comment

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

So far lijkt dit wel ok te zijn :-) heb het niet getest maar codewise heb ik geen mededelingen anders dan die die al gedaan zijn

$io->info('Looking up allegro credentials');

/** @var OrganisatieRepository $organisatieRepository */
$organisatieRepository = $this->em->getRepository(Organisatie::class);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Het is beter om de repository te laten injecten ipv deze via de entity manager op te vragen.

/** @var OrganisatieRepository $organisatieRepository */
$organisatieRepository = $this->em->getRepository(Organisatie::class);

/** @var Organisatie $allegroId */
Copy link
Collaborator

Choose a reason for hiding this comment

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

De type hint hier stelt dat het om een Organisatie gaat, maar de variabele naam geeft aan dat het om slechts een id gaat.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ja inderdaad, ik had het overgenomen uit een ander Command. Ik pas het overal aan.

return Command::SUCCESS;
}

$dossierRepository = $this->em->getRepository(Dossier::class);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Het is beter om de repo to injecten in de constructor.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Aangepast.


foreach ($dossiers as $dossier) {
$header = null;
try {
Copy link
Collaborator

Choose a reason for hiding this comment

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

De indentatie loopt hier verkeerd.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Aangepast.

'tokenStorage' => $this->tokenStorage
]);
} else {
$this->logger->notice('Kan geen notifificatie sturen omdat er geen organisatie opgegeven is of er is voor de medewerker van dit dossier geen e-mailadres ingevuld', ['dossierId' => $dossier->getId(), 'gebruikerId' => $dossier->getMedewerkerOrganisatie() ? $dossier->getMedewerkerOrganisatie()->getId() : 'n/a']);
Copy link
Collaborator

Choose a reason for hiding this comment

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

We weten op dit punt al dat er null komt uit getMedewerkerOriganisatie() toch? Waar dient deze conditie dan nog voor?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

De code formatter heeft hier alleen de identatie aangepast. Ik raak deze functie verder niet aan.

'dossier' => $dossier
]);
} else {
$this->logger->notice('Kan geen notifificatie sturen omdat er geen organisatie opgegeven is of er is voor de medewerker van dit dossier geen e-mailadres ingevuld', ['dossierId' => $dossier->getId(), 'gebruikerId' => $dossier->getMedewerkerOrganisatie() ? $dossier->getMedewerkerOrganisatie()->getId() : 'n/a']);
Copy link
Collaborator

Choose a reason for hiding this comment

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

We weten op dit punt al dat er null komt uit getMedewerkerOriganisatie() toch? Waar dient deze conditie dan nog voor?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Dit is een kopie van de bovenstaande functies. Ik zal kijken hoe ik het kan aanpassen.

Copilot AI review requested due to automatic review settings January 26, 2026 13:27
* @throws \Exception
*/
public function updateDossier(Dossier $dossier)
public function updateDossier(Dossier $dossier, TSRVAanvraagHeader $header = null)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Dit kan niet, je specificeert dat $header een object is van het type TSRVAanvraagHeader en daarna wijs je er null aan toe. Met die default value zou de type hint ?TSRVAanvraagHeader moeten zijn.

* @param Dossier $dossier
* @throws \Exception
*/
public function isDossierInSyncWithAllegro(Dossier $dossier, TSRVAanvraagHeader $header = null)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Dit kan niet, je specificeert dat $header een object is van het type TSRVAanvraagHeader en daarna wijs je er null aan toe. Met die default value zou de type hint ?TSRVAanvraagHeader moeten zijn.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Aangepast.

))
)->getResult();

// TODO: event dispatchen waar de `MailNotificationSubscriber` naar luistert.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Aub de todo implementeren of de comment verwijderen.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

jmassink and others added 6 commits January 27, 2026 10:13
This PR adds an additional file action button for pdf files.

This button opens a pdf inside the browser in a new tab.
This button is only visible for PDF files
HTML and CSS architecture is refactored. Instead of nested div with relative and absolut positions, the buttons are nested files action list container, which works with flexbox
The CSS is made a bit more DRY by introducing mixin's and variables
A new 'full-screen' icon is added
feat(db): drop legacy thumbnail table
…ossier into feat/SCHUL-611_notificatie-allegro-status-update
Copilot AI review requested due to automatic review settings January 27, 2026 12:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

'dossier' => $dossier
]);
} else {
$this->logger->notice('Kan geen notifificatie sturen omdat er geen organisatie opgegeven is of er is voor de medewerker van dit dossier geen e-mailadres ingevuld', ['dossierId' => $dossier->getId(), 'gebruikerId' => $dossier->getMedewerkerOrganisatie() ? $dossier->getMedewerkerOrganisatie()->getId() : 'n/a']);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
$this->logger->notice('Kan geen notifificatie sturen omdat er geen organisatie opgegeven is of er is voor de medewerker van dit dossier geen e-mailadres ingevuld', ['dossierId' => $dossier->getId(), 'gebruikerId' => $dossier->getMedewerkerOrganisatie() ? $dossier->getMedewerkerOrganisatie()->getId() : 'n/a']);
$this->logger->notice('Kan geen notifificatie sturen omdat er geen organisatie opgegeven is of er is voor de medewerker van dit dossier geen e-mailadres ingevuld', ['dossierId' => $dossier->getId(), 'gebruikerId' => 'n/a']);

RubenSibon and others added 4 commits January 27, 2026 15:55
---------

Co-authored-by: jmassink <j.massink@amsterdam.nl>
…ossier into feat/SCHUL-611_notificatie-allegro-status-update
Copilot AI review requested due to automatic review settings January 30, 2026 11:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<p>Hallo {{ dossier.getMedewerkerOrganisatie.getNaam }},</p>
<p>Een door jouw beheerd dossier heeft een statuswijziging gekregen vanuit de GKA.</p>
<p>&nbsp;</p>
<p><a href="{{ url('gemeenteamsterdam_fixxxschuldhulp_allegro_allegrosrveisers', {'dossierId': dossier.getId}) }}">Open dossier</a>
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

Corrected spelling of 'allegrosrveisers' to 'allegrosrvеisers' (assuming this is a typo in the route name).

Copilot uses AI. Check for mistakes.
Comment on lines +12 to +15
<p>Hallo {{ dossier.getMedewerkerOrganisatie.getNaam }},</p>
<p>Een door jouw beheerd dossier heeft een statuswijziging gekregen vanuit de GKA.</p>
<p>&nbsp;</p>
<p><a href="{{ url('gemeenteamsterdam_fixxxschuldhulp_allegro_allegrosrveisers', {'dossierId': dossier.getId}) }}">Open dossier</a>
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

Inconsistent method call syntax between HTML and text blocks. Line 12 uses property access without parentheses while line 21 uses method calls with parentheses. They should match for consistency and correctness.

Suggested change
<p>Hallo {{ dossier.getMedewerkerOrganisatie.getNaam }},</p>
<p>Een door jouw beheerd dossier heeft een statuswijziging gekregen vanuit de GKA.</p>
<p>&nbsp;</p>
<p><a href="{{ url('gemeenteamsterdam_fixxxschuldhulp_allegro_allegrosrveisers', {'dossierId': dossier.getId}) }}">Open dossier</a>
<p>Hallo {{ dossier.getMedewerkerOrganisatie().getNaam() }},</p>
<p>Een door jouw beheerd dossier heeft een statuswijziging gekregen vanuit de GKA.</p>
<p>&nbsp;</p>
<p><a href="{{ url('gemeenteamsterdam_fixxxschuldhulp_allegro_allegrosrveisers', {'dossierId': dossier.getId()}) }}">Open dossier</a>

Copilot uses AI. Check for mistakes.
$incomingStatus = $header?->getStatus();
$incomingExtraStatus = $header?->getExtraStatus();

return $currentStatus !== $incomingStatus || $currentExtraStatus !== $incomingExtraStatus;
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

The method name isDossierInSyncWithAllegro is misleading as it returns true when the dossier is NOT in sync (statuses differ). Consider renaming to isDossierOutOfSyncWithAllegro or hasDossierStatusChanged.

Suggested change
return $currentStatus !== $incomingStatus || $currentExtraStatus !== $incomingExtraStatus;
return $currentStatus === $incomingStatus && $currentExtraStatus === $incomingExtraStatus;

Copilot uses AI. Check for mistakes.
$allegroUser = $this->allegroCommandHelper->getAllegroUserFromAnyOrg();

if (!isset($allegroUser)) {
$io->info('No organistation found whith a complete set of Allegro login data');
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

Corrected spelling of 'organistation' to 'organisation' and 'whith' to 'with'.

Suggested change
$io->info('No organistation found whith a complete set of Allegro login data');
$io->info('No organisation found with a complete set of Allegro login data');

Copilot uses AI. Check for mistakes.

if (null === $allegroId) {
if (!isset($allegroUser)) {
$io->info('No organistation found whith a complete set of Allegro login data');
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

Corrected spelling of 'organistation' to 'organisation' and 'whith' to 'with'.

Suggested change
$io->info('No organistation found whith a complete set of Allegro login data');
$io->info('No organisation found with a complete set of Allegro login data');

Copilot uses AI. Check for mistakes.
public function __construct(
private EntityManagerInterface $em,
) {
$this->em = $em;
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

The assignment $this->em = $em on line 14 is redundant since the parameter is already promoted to a property using private EntityManagerInterface $em in the constructor parameter list.

Suggested change
$this->em = $em;

Copilot uses AI. Check for mistakes.
Comment on lines +36 to +38
$this->service = $service;
$this->allegroCommandHelper = $allegroCommandHelper;
$this->eventDispatcher = $eventDispatcher;
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

Lines 36-38 contain redundant assignments since the parameters are already promoted to properties using constructor property promotion. Only line 35 is needed.

Suggested change
$this->service = $service;
$this->allegroCommandHelper = $allegroCommandHelper;
$this->eventDispatcher = $eventDispatcher;

Copilot uses AI. Check for mistakes.
}
}

public function notifyDossierSyncedWithAllegro(DossierChangedEvent $event)
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

The parameter type should be DossierSyncedWithAllegroEvent instead of DossierChangedEvent to properly match the event being dispatched and maintain type safety.

Suggested change
public function notifyDossierSyncedWithAllegro(DossierChangedEvent $event)
public function notifyDossierSyncedWithAllegro(DossierSyncedWithAllegroEvent $event)

Copilot uses AI. Check for mistakes.
Base automatically changed from release/SCHUL_sprint-7 to main February 3, 2026 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants