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

39 informatiecategorieen toekennen #81

Merged
merged 42 commits into from
Oct 29, 2024
Merged
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
a0a2713
chore: splits informatiecategorieen en organisaties endpoints
felixcicatt Oct 21, 2024
d9b97b4
feat: endpoint voor infocategorieen gefilterd voor gebruiker
felixcicatt Oct 21, 2024
b6bf90a
Merge branch 'main' into 39-informatiecategorieen-toekennen
nijmra Oct 21, 2024
bfd878c
feat: setup frontend
nijmra Oct 21, 2024
235458e
feat: gekoppelde informatiecategorieen wip
nijmra Oct 21, 2024
9e9735d
feat: mijn informatiecategorieen
nijmra Oct 22, 2024
3386438
Merge branch 'main' into 39-informatiecategorieen-toekennen
nijmra Oct 22, 2024
1d2b62c
feat: changed reponse type
nijmra Oct 22, 2024
6937de0
chore: API_URL config
nijmra Oct 22, 2024
ea038cc
feat: alert when not linked
nijmra Oct 22, 2024
0e47f9d
refactor: moved file
nijmra Oct 22, 2024
d6a441b
informatiecategorieen teruggeven in registrerencontroller
felixcicatt Oct 22, 2024
da8cd8f
cleanup
felixcicatt Oct 22, 2024
b422ce8
chore: removed listener, refactor
nijmra Oct 22, 2024
116f495
Merge branch '39-informatiecategorieen-toekennen' of https://github.c…
nijmra Oct 22, 2024
47d6552
validatie op informatiecategorieen
felixcicatt Oct 22, 2024
13fbd91
Merge branch '39-informatiecategorieen-toekennen' of https://github.c…
felixcicatt Oct 22, 2024
5eb147c
refactor: form validation composable
nijmra Oct 22, 2024
ca03839
Merge branch '39-informatiecategorieen-toekennen' of https://github.c…
nijmra Oct 22, 2024
8739df7
refactor: remove listeners
nijmra Oct 22, 2024
e20a0cd
feat: fixed required on group
nijmra Oct 22, 2024
5095d3c
chore: formatting
nijmra Oct 22, 2024
59df6f2
refactor: form validation
nijmra Oct 22, 2024
3eebff8
status meegeven vanaf de mock
felixcicatt Oct 22, 2024
c7c591b
refactor: small improvement
nijmra Oct 22, 2024
8f09f39
Merge branch '39-informatiecategorieen-toekennen' of https://github.c…
nijmra Oct 22, 2024
fa2b9d5
review comments wip
nijmra Oct 22, 2024
3106326
review comments
nijmra Oct 23, 2024
0271038
feat: checkbox group
nijmra Oct 23, 2024
d63fc89
feat: required check
nijmra Oct 23, 2024
0735be1
feat: simple invalid handler
nijmra Oct 23, 2024
37532a8
refactor: group listeners
nijmra Oct 23, 2024
8ddd5bf
chore: refactor @invalid @change
nijmra Oct 24, 2024
0b6e38d
refactor: moved style and conditional event handling
nijmra Oct 24, 2024
3ceef3c
Merge branch 'main' into 39-informatiecategorieen-toekennen
felixcicatt Oct 24, 2024
a69b316
cleanup
felixcicatt Oct 24, 2024
3575bae
Merge branch '39-informatiecategorieen-toekennen' of https://github.c…
felixcicatt Oct 24, 2024
8d322ea
https://github.com/GeneriekPublicatiePlatformWoo/Openbaar-Documenten-…
felixcicatt Oct 29, 2024
57eb852
chore: minder afhankelijkheid tussen GebruikersgroepDetails en Gebrui…
felixcicatt Oct 29, 2024
a0c32d0
cleanup
felixcicatt Oct 29, 2024
8cd3ea7
cleanup
felixcicatt Oct 29, 2024
48498ed
cleanup
felixcicatt Oct 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
informatiecategorieen teruggeven in registrerencontroller
felixcicatt committed Oct 22, 2024
commit d6a441b6df7177c8565dec24bb3bbddeace2f580
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System.Text.Json;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;
using ODPC.Apis.Odrc;
using ODPC.Authentication;
using ODPC.Config;

namespace ODPC.Features.Publicaties.PublicatieRegistreren
{
@@ -12,26 +10,21 @@ public class PublicatieRegistrerenController(OdpcUser user, IOdrcClientFactory c
private readonly IOdrcClientFactory _clientFactory = clientFactory;

[HttpPost("api/v1/publicaties")]
public async Task<IActionResult> Post(Publicatie publicatie)
public async Task<IActionResult> Post(Publicatie publicatie, CancellationToken token)
{
publicatie.Uuid = Guid.NewGuid();
publicatie.Registratiedatum = DateTime.Now;

//de mock laten we er nog even in totdat ook het ophalen van gegevens via het register verloopt
PublicatiesMock.Publicaties[publicatie.Uuid] = publicatie;

var client = _clientFactory.Create(user, "Publicatie geregistreerd");
var response = await client.PostAsJsonAsync("/api/v1/publicaties/", publicatie, token);

var response = await client.PostAsJsonAsync("/api/v1/publicaties/", publicatie, new CancellationToken());

response.EnsureSuccessStatusCode();

var responseBody = await response.Content.ReadAsStringAsync();
var viewModel = await response.Content.ReadFromJsonAsync<Publicatie>(token);

var viewModel = JsonSerializer.Deserialize<Publicatie>(responseBody, JsonSerialization.Options);
// TODO deze regel kan eraf als deze story is geimplementeerd: https://github.com/GeneriekPublicatiePlatformWoo/registratie-component/issues/48
viewModel!.GekoppeldeInformatiecategorieen = publicatie.GekoppeldeInformatiecategorieen;

// TODO de mock laten we er nog even in totdat ook het ophalen van gegevens via het register verloopt
PublicatiesMock.Publicaties[viewModel!.Uuid] = viewModel;

return Ok(viewModel);
}

}
}