Skip to content

Commit

Permalink
bugfix: fix article uri generation
Browse files Browse the repository at this point in the history
  • Loading branch information
elpoelma committed Jan 31, 2025
1 parent ac7b0fa commit 47374a9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/honest-mice-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'frontend-gelinkt-notuleren': patch
---

Ensure both the 'Insert traffic measure' and 'Insert article block' functionalities insert decision articles with correctly defined URIs (not placeholder URIs)
8 changes: 7 additions & 1 deletion app/services/editor/agendapoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ export default class AgendapointEditorService extends Service {
get config() {
const classificatie = this.currentSession.classificatie;
const municipality = this.currentSession.group;
const articleUriGenerator = () =>
`http://data.lblod.info/artikels/${uuidv4()}`;
return {
date: {
formats: [
Expand Down Expand Up @@ -170,6 +172,7 @@ export default class AgendapointEditorService extends Service {
roadsignRegulation: {
endpoint: ENV.mowRegistryEndpoint,
imageBaseUrl: ENV.roadsignImageBaseUrl,
articleUriGenrator: articleUriGenerator,
},
besluitType: {
endpoint: 'https://centrale-vindplaats.lblod.info/sparql',
Expand Down Expand Up @@ -216,7 +219,10 @@ export default class AgendapointEditorService extends Service {
},
},
insertArticle: {
uriGenerator: () => `http://data.lblod.info/artikels/${uuidv4()}`,
uriGenerator: articleUriGenerator,
},
decisionPlugin: {
articleUriGenerator,
},
...this.adminUnitConfig,
};
Expand Down
5 changes: 4 additions & 1 deletion app/templates/agendapoints/edit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@
</:sidebarCollapsible>
<:sidebar>
<this.StructureControlCard @controller={{this.controller}} />
<DecisionPlugin::DecisionPluginCard @controller={{this.controller}} />
<DecisionPlugin::DecisionPluginCard
@controller={{this.controller}}
@options={{this.config.decisionPlugin}}
/>
<CitationPlugin::CitationCard
@controller={{this.controller}}
@config={{this.config.citation}}
Expand Down

0 comments on commit 47374a9

Please sign in to comment.