From 1a9ad0a85be952e61ead1bdb4d56aa9fdbabc76b Mon Sep 17 00:00:00 2001 From: mark stoker Date: Thu, 28 Mar 2024 11:37:00 +0100 Subject: [PATCH 01/17] refcatoring en kanalen beheer --- .../Afdelingen/AfdelingenProxyConfig.cs | 0 .../Elasticsearch/ElasticsearchProxyConfig.cs | 0 .../EnterpriseSearchProxyConfig.cs | 0 .../Groepen/GroepenProxyConfig.cs | 0 .../HaalCentraal/HaalCentraalProxyConfig.cs | 0 .../InterneTaak/InterneTaakProxyConfig.cs | 0 .../InterneTaak/PostInterneTaakCustomProxy.cs | 0 Kiss.Bff/{ => Extern}/Kvk/KvkProxyConfig.cs | 0 .../Contactmomenten/ContactmomentDetails.cs | 0 .../ContactmomentenProxyConfig.cs | 0 .../PostContactmomentenCustomProxy.cs | 0 .../ReadContactmomentenDetails.cs | 0 .../WriteContactmomentenDetails.cs | 0 .../ContactVerzoekVragenSet.cs | 0 .../ReadContactverzoekenVragenSets.cs | 0 .../WriteContactverzoekenVragenSets.cs | 0 .../Klanten/KlantenProxyConfig.cs | 0 .../Zaken/DocumentenProxyConfig.cs | 0 .../Zaken/ZakenProxyConfig.cs | 0 .../ZaakGerichtWerken/ZgwTokenProvider.cs | 0 .../GetZaaksysteemDeeplinkConfig.cs | 0 .../Data/BeheerDbContext.cs | 6 + .../20230509075042_Init.Designer.cs | 0 .../Data/Migrations/20230509075042_Init.cs | 0 .../20230510125123_Gelezen.Designer.cs | 0 .../Data/Migrations/20230510125123_Gelezen.cs | 0 .../20230512100343_Links.Designer.cs | 0 .../Data/Migrations/20230512100343_Links.cs | 0 ...30517092612_Gespreksresultaten.Designer.cs | 0 .../20230517092612_Gespreksresultaten.cs | 0 ...230612125041_DataProtectionKey.Designer.cs | 0 .../20230612125041_DataProtectionKey.cs | 0 .../20230613152055_VerwerkingsLog.Designer.cs | 0 .../20230613152055_VerwerkingsLog.cs | 0 .../20230614131932_ManagementLogs.Designer.cs | 0 .../20230614131932_ManagementLogs.cs | 0 ...7_KlantContactmomentWorkaround.Designer.cs | 0 ...0615145757_KlantContactmomentWorkaround.cs | 0 .../20230713182651_FaqIndex.Designer.cs | 0 .../Migrations/20230713182651_FaqIndex.cs | 0 ...0455_RenameTablesAndProperties.Designer.cs | 0 ...0230727120455_RenameTablesAndProperties.cs | 0 ...emove-KlantContactemomentTable.Designer.cs | 0 ...9124340_Remove-KlantContactemomentTable.cs | 0 ...eTableContactverzoekVragenSets.Designer.cs | 0 ...859_CreateTableContactverzoekVragenSets.cs | 0 ...tailsVerantwoordelijkeAfdeling.Designer.cs | 0 ...1130_CmDetailsVerantwoordelijkeAfdeling.cs | 0 ...NameChangeVragenSetNaamToTitel.Designer.cs | 0 ...18100251_NameChangeVragenSetNaamToTitel.cs | 0 ...005_AddAfdelingNaamToVragenset.Designer.cs | 0 ...230921111005_AddAfdelingNaamToVragenset.cs | 0 .../20240328102419_KanalenTabel.Designer.cs | 348 ++++++++++++++++++ .../Migrations/20240328102419_KanalenTabel.cs | 39 ++ .../BeheerDbContextModelSnapshot.cs | 24 ++ Kiss.Bff/{Beheer => Intern}/Faq/GetFaq.cs | 0 .../{ => Intern}/Feedback/SendFeedback.cs | 0 .../GespreksresultatenController.cs | 0 .../Data/Entities/Gespreksresultaat.cs | 0 .../Intern/Kanalen/Data/Entities/Kanaal.cs | 13 + .../Kanalen/Features/KanaalBeheerDetails.cs | 40 ++ .../Intern/Kanalen/Features/KanaalBewerken.cs | 37 ++ .../Kanalen/Features/KanaalToevoegen.cs | 42 +++ .../Kanalen/Features/KanaalVerwijderen.cs | 38 ++ .../Features/KanalenBeheerOverzicht.cs | 36 ++ .../KanalenContactmomentKeuzelijst.cs | 36 ++ .../Links/Controllers/CategorienController.cs | 0 .../Links/Controllers/LinksController.cs | 0 .../Links/Data/Entities/Link.cs | 0 .../Controllers/BerichtenController.cs | 0 .../Controllers/GetFeaturedCountController.cs | 0 .../Controllers/MarkeerGelezenController.cs | 0 .../Controllers/SearchBerichtenController.cs | 0 .../Controllers/SkillsController.cs | 0 .../Data/Entities/Bericht.cs | 0 .../Data/Entities/BerichtGelezen.cs | 0 .../Data/Entities/Skill.cs | 0 .../Verwerking/GetVerwerkingsLogs.cs | 0 .../Verwerking/VerwerkingMiddleware.cs | 0 .../Verwerking/VerwerkingsLog.cs | 0 src/features/Kanalen/KanalenOverzicht.vue | 98 +++++ src/features/Kanalen/index.ts | 1 + src/features/Kanalen/service.ts | 12 + src/features/Kanalen/types.ts | 4 + src/router/index.ts | 18 + src/views/Beheer/BeheerLayout.vue | 3 + src/views/Beheer/Kanalen/KanaalBeheer.vue | 181 +++++++++ src/views/Beheer/Kanalen/KanalenBeheer.vue | 32 ++ 88 files changed, 1008 insertions(+) rename Kiss.Bff/{ => Extern}/Afdelingen/AfdelingenProxyConfig.cs (100%) rename Kiss.Bff/{ => Extern}/Elasticsearch/ElasticsearchProxyConfig.cs (100%) rename Kiss.Bff/{ => Extern}/EnterpriseSearch/EnterpriseSearchProxyConfig.cs (100%) rename Kiss.Bff/{ => Extern}/Groepen/GroepenProxyConfig.cs (100%) rename Kiss.Bff/{ => Extern}/HaalCentraal/HaalCentraalProxyConfig.cs (100%) rename Kiss.Bff/{ => Extern}/InterneTaak/InterneTaakProxyConfig.cs (100%) rename Kiss.Bff/{ => Extern}/InterneTaak/PostInterneTaakCustomProxy.cs (100%) rename Kiss.Bff/{ => Extern}/Kvk/KvkProxyConfig.cs (100%) rename Kiss.Bff/{ => Extern}/ZaakGerichtWerken/Contactmomenten/ContactmomentDetails.cs (100%) rename Kiss.Bff/{ => Extern}/ZaakGerichtWerken/Contactmomenten/ContactmomentenProxyConfig.cs (100%) rename Kiss.Bff/{ => Extern}/ZaakGerichtWerken/Contactmomenten/PostContactmomentenCustomProxy.cs (100%) rename Kiss.Bff/{ => Extern}/ZaakGerichtWerken/Contactmomenten/ReadContactmomentenDetails.cs (100%) rename Kiss.Bff/{ => Extern}/ZaakGerichtWerken/Contactmomenten/WriteContactmomentenDetails.cs (100%) rename Kiss.Bff/{ => Extern}/ZaakGerichtWerken/Contactverzoeken/ContactVerzoekVragenSet.cs (100%) rename Kiss.Bff/{ => Extern}/ZaakGerichtWerken/Contactverzoeken/ReadContactverzoekenVragenSets.cs (100%) rename Kiss.Bff/{ => Extern}/ZaakGerichtWerken/Contactverzoeken/WriteContactverzoekenVragenSets.cs (100%) rename Kiss.Bff/{ => Extern}/ZaakGerichtWerken/Klanten/KlantenProxyConfig.cs (100%) rename Kiss.Bff/{ => Extern}/ZaakGerichtWerken/Zaken/DocumentenProxyConfig.cs (100%) rename Kiss.Bff/{ => Extern}/ZaakGerichtWerken/Zaken/ZakenProxyConfig.cs (100%) rename Kiss.Bff/{ => Extern}/ZaakGerichtWerken/ZgwTokenProvider.cs (100%) rename Kiss.Bff/{ => Extern}/Zaaksysteem/GetZaaksysteemDeeplinkConfig.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/BeheerDbContext.cs (91%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230509075042_Init.Designer.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230509075042_Init.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230510125123_Gelezen.Designer.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230510125123_Gelezen.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230512100343_Links.Designer.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230512100343_Links.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230517092612_Gespreksresultaten.Designer.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230517092612_Gespreksresultaten.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230612125041_DataProtectionKey.Designer.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230612125041_DataProtectionKey.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230613152055_VerwerkingsLog.Designer.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230613152055_VerwerkingsLog.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230614131932_ManagementLogs.Designer.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230614131932_ManagementLogs.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230615145757_KlantContactmomentWorkaround.Designer.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230615145757_KlantContactmomentWorkaround.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230713182651_FaqIndex.Designer.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230713182651_FaqIndex.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230727120455_RenameTablesAndProperties.Designer.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230727120455_RenameTablesAndProperties.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230809124340_Remove-KlantContactemomentTable.Designer.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230809124340_Remove-KlantContactemomentTable.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230828120859_CreateTableContactverzoekVragenSets.Designer.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230828120859_CreateTableContactverzoekVragenSets.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230830131130_CmDetailsVerantwoordelijkeAfdeling.Designer.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230830131130_CmDetailsVerantwoordelijkeAfdeling.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230918100251_NameChangeVragenSetNaamToTitel.Designer.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230918100251_NameChangeVragenSetNaamToTitel.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230921111005_AddAfdelingNaamToVragenset.Designer.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/20230921111005_AddAfdelingNaamToVragenset.cs (100%) create mode 100644 Kiss.Bff/Intern/Data/Migrations/20240328102419_KanalenTabel.Designer.cs create mode 100644 Kiss.Bff/Intern/Data/Migrations/20240328102419_KanalenTabel.cs rename Kiss.Bff/{Beheer => Intern}/Data/Migrations/BeheerDbContextModelSnapshot.cs (93%) rename Kiss.Bff/{Beheer => Intern}/Faq/GetFaq.cs (100%) rename Kiss.Bff/{ => Intern}/Feedback/SendFeedback.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Gespreksresultaten/Controllers/GespreksresultatenController.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Gespreksresultaten/Data/Entities/Gespreksresultaat.cs (100%) create mode 100644 Kiss.Bff/Intern/Kanalen/Data/Entities/Kanaal.cs create mode 100644 Kiss.Bff/Intern/Kanalen/Features/KanaalBeheerDetails.cs create mode 100644 Kiss.Bff/Intern/Kanalen/Features/KanaalBewerken.cs create mode 100644 Kiss.Bff/Intern/Kanalen/Features/KanaalToevoegen.cs create mode 100644 Kiss.Bff/Intern/Kanalen/Features/KanaalVerwijderen.cs create mode 100644 Kiss.Bff/Intern/Kanalen/Features/KanalenBeheerOverzicht.cs create mode 100644 Kiss.Bff/Intern/Kanalen/Features/KanalenContactmomentKeuzelijst.cs rename Kiss.Bff/{Beheer => Intern}/Links/Controllers/CategorienController.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Links/Controllers/LinksController.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Links/Data/Entities/Link.cs (100%) rename Kiss.Bff/{Beheer => Intern}/NieuwsEnWerkinstructies/Controllers/BerichtenController.cs (100%) rename Kiss.Bff/{Beheer => Intern}/NieuwsEnWerkinstructies/Controllers/GetFeaturedCountController.cs (100%) rename Kiss.Bff/{Beheer => Intern}/NieuwsEnWerkinstructies/Controllers/MarkeerGelezenController.cs (100%) rename Kiss.Bff/{Beheer => Intern}/NieuwsEnWerkinstructies/Controllers/SearchBerichtenController.cs (100%) rename Kiss.Bff/{Beheer => Intern}/NieuwsEnWerkinstructies/Controllers/SkillsController.cs (100%) rename Kiss.Bff/{Beheer => Intern}/NieuwsEnWerkinstructies/Data/Entities/Bericht.cs (100%) rename Kiss.Bff/{Beheer => Intern}/NieuwsEnWerkinstructies/Data/Entities/BerichtGelezen.cs (100%) rename Kiss.Bff/{Beheer => Intern}/NieuwsEnWerkinstructies/Data/Entities/Skill.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Verwerking/GetVerwerkingsLogs.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Verwerking/VerwerkingMiddleware.cs (100%) rename Kiss.Bff/{Beheer => Intern}/Verwerking/VerwerkingsLog.cs (100%) create mode 100644 src/features/Kanalen/KanalenOverzicht.vue create mode 100644 src/features/Kanalen/index.ts create mode 100644 src/features/Kanalen/service.ts create mode 100644 src/features/Kanalen/types.ts create mode 100644 src/views/Beheer/Kanalen/KanaalBeheer.vue create mode 100644 src/views/Beheer/Kanalen/KanalenBeheer.vue diff --git a/Kiss.Bff/Afdelingen/AfdelingenProxyConfig.cs b/Kiss.Bff/Extern/Afdelingen/AfdelingenProxyConfig.cs similarity index 100% rename from Kiss.Bff/Afdelingen/AfdelingenProxyConfig.cs rename to Kiss.Bff/Extern/Afdelingen/AfdelingenProxyConfig.cs diff --git a/Kiss.Bff/Elasticsearch/ElasticsearchProxyConfig.cs b/Kiss.Bff/Extern/Elasticsearch/ElasticsearchProxyConfig.cs similarity index 100% rename from Kiss.Bff/Elasticsearch/ElasticsearchProxyConfig.cs rename to Kiss.Bff/Extern/Elasticsearch/ElasticsearchProxyConfig.cs diff --git a/Kiss.Bff/EnterpriseSearch/EnterpriseSearchProxyConfig.cs b/Kiss.Bff/Extern/EnterpriseSearch/EnterpriseSearchProxyConfig.cs similarity index 100% rename from Kiss.Bff/EnterpriseSearch/EnterpriseSearchProxyConfig.cs rename to Kiss.Bff/Extern/EnterpriseSearch/EnterpriseSearchProxyConfig.cs diff --git a/Kiss.Bff/Groepen/GroepenProxyConfig.cs b/Kiss.Bff/Extern/Groepen/GroepenProxyConfig.cs similarity index 100% rename from Kiss.Bff/Groepen/GroepenProxyConfig.cs rename to Kiss.Bff/Extern/Groepen/GroepenProxyConfig.cs diff --git a/Kiss.Bff/HaalCentraal/HaalCentraalProxyConfig.cs b/Kiss.Bff/Extern/HaalCentraal/HaalCentraalProxyConfig.cs similarity index 100% rename from Kiss.Bff/HaalCentraal/HaalCentraalProxyConfig.cs rename to Kiss.Bff/Extern/HaalCentraal/HaalCentraalProxyConfig.cs diff --git a/Kiss.Bff/InterneTaak/InterneTaakProxyConfig.cs b/Kiss.Bff/Extern/InterneTaak/InterneTaakProxyConfig.cs similarity index 100% rename from Kiss.Bff/InterneTaak/InterneTaakProxyConfig.cs rename to Kiss.Bff/Extern/InterneTaak/InterneTaakProxyConfig.cs diff --git a/Kiss.Bff/InterneTaak/PostInterneTaakCustomProxy.cs b/Kiss.Bff/Extern/InterneTaak/PostInterneTaakCustomProxy.cs similarity index 100% rename from Kiss.Bff/InterneTaak/PostInterneTaakCustomProxy.cs rename to Kiss.Bff/Extern/InterneTaak/PostInterneTaakCustomProxy.cs diff --git a/Kiss.Bff/Kvk/KvkProxyConfig.cs b/Kiss.Bff/Extern/Kvk/KvkProxyConfig.cs similarity index 100% rename from Kiss.Bff/Kvk/KvkProxyConfig.cs rename to Kiss.Bff/Extern/Kvk/KvkProxyConfig.cs diff --git a/Kiss.Bff/ZaakGerichtWerken/Contactmomenten/ContactmomentDetails.cs b/Kiss.Bff/Extern/ZaakGerichtWerken/Contactmomenten/ContactmomentDetails.cs similarity index 100% rename from Kiss.Bff/ZaakGerichtWerken/Contactmomenten/ContactmomentDetails.cs rename to Kiss.Bff/Extern/ZaakGerichtWerken/Contactmomenten/ContactmomentDetails.cs diff --git a/Kiss.Bff/ZaakGerichtWerken/Contactmomenten/ContactmomentenProxyConfig.cs b/Kiss.Bff/Extern/ZaakGerichtWerken/Contactmomenten/ContactmomentenProxyConfig.cs similarity index 100% rename from Kiss.Bff/ZaakGerichtWerken/Contactmomenten/ContactmomentenProxyConfig.cs rename to Kiss.Bff/Extern/ZaakGerichtWerken/Contactmomenten/ContactmomentenProxyConfig.cs diff --git a/Kiss.Bff/ZaakGerichtWerken/Contactmomenten/PostContactmomentenCustomProxy.cs b/Kiss.Bff/Extern/ZaakGerichtWerken/Contactmomenten/PostContactmomentenCustomProxy.cs similarity index 100% rename from Kiss.Bff/ZaakGerichtWerken/Contactmomenten/PostContactmomentenCustomProxy.cs rename to Kiss.Bff/Extern/ZaakGerichtWerken/Contactmomenten/PostContactmomentenCustomProxy.cs diff --git a/Kiss.Bff/ZaakGerichtWerken/Contactmomenten/ReadContactmomentenDetails.cs b/Kiss.Bff/Extern/ZaakGerichtWerken/Contactmomenten/ReadContactmomentenDetails.cs similarity index 100% rename from Kiss.Bff/ZaakGerichtWerken/Contactmomenten/ReadContactmomentenDetails.cs rename to Kiss.Bff/Extern/ZaakGerichtWerken/Contactmomenten/ReadContactmomentenDetails.cs diff --git a/Kiss.Bff/ZaakGerichtWerken/Contactmomenten/WriteContactmomentenDetails.cs b/Kiss.Bff/Extern/ZaakGerichtWerken/Contactmomenten/WriteContactmomentenDetails.cs similarity index 100% rename from Kiss.Bff/ZaakGerichtWerken/Contactmomenten/WriteContactmomentenDetails.cs rename to Kiss.Bff/Extern/ZaakGerichtWerken/Contactmomenten/WriteContactmomentenDetails.cs diff --git a/Kiss.Bff/ZaakGerichtWerken/Contactverzoeken/ContactVerzoekVragenSet.cs b/Kiss.Bff/Extern/ZaakGerichtWerken/Contactverzoeken/ContactVerzoekVragenSet.cs similarity index 100% rename from Kiss.Bff/ZaakGerichtWerken/Contactverzoeken/ContactVerzoekVragenSet.cs rename to Kiss.Bff/Extern/ZaakGerichtWerken/Contactverzoeken/ContactVerzoekVragenSet.cs diff --git a/Kiss.Bff/ZaakGerichtWerken/Contactverzoeken/ReadContactverzoekenVragenSets.cs b/Kiss.Bff/Extern/ZaakGerichtWerken/Contactverzoeken/ReadContactverzoekenVragenSets.cs similarity index 100% rename from Kiss.Bff/ZaakGerichtWerken/Contactverzoeken/ReadContactverzoekenVragenSets.cs rename to Kiss.Bff/Extern/ZaakGerichtWerken/Contactverzoeken/ReadContactverzoekenVragenSets.cs diff --git a/Kiss.Bff/ZaakGerichtWerken/Contactverzoeken/WriteContactverzoekenVragenSets.cs b/Kiss.Bff/Extern/ZaakGerichtWerken/Contactverzoeken/WriteContactverzoekenVragenSets.cs similarity index 100% rename from Kiss.Bff/ZaakGerichtWerken/Contactverzoeken/WriteContactverzoekenVragenSets.cs rename to Kiss.Bff/Extern/ZaakGerichtWerken/Contactverzoeken/WriteContactverzoekenVragenSets.cs diff --git a/Kiss.Bff/ZaakGerichtWerken/Klanten/KlantenProxyConfig.cs b/Kiss.Bff/Extern/ZaakGerichtWerken/Klanten/KlantenProxyConfig.cs similarity index 100% rename from Kiss.Bff/ZaakGerichtWerken/Klanten/KlantenProxyConfig.cs rename to Kiss.Bff/Extern/ZaakGerichtWerken/Klanten/KlantenProxyConfig.cs diff --git a/Kiss.Bff/ZaakGerichtWerken/Zaken/DocumentenProxyConfig.cs b/Kiss.Bff/Extern/ZaakGerichtWerken/Zaken/DocumentenProxyConfig.cs similarity index 100% rename from Kiss.Bff/ZaakGerichtWerken/Zaken/DocumentenProxyConfig.cs rename to Kiss.Bff/Extern/ZaakGerichtWerken/Zaken/DocumentenProxyConfig.cs diff --git a/Kiss.Bff/ZaakGerichtWerken/Zaken/ZakenProxyConfig.cs b/Kiss.Bff/Extern/ZaakGerichtWerken/Zaken/ZakenProxyConfig.cs similarity index 100% rename from Kiss.Bff/ZaakGerichtWerken/Zaken/ZakenProxyConfig.cs rename to Kiss.Bff/Extern/ZaakGerichtWerken/Zaken/ZakenProxyConfig.cs diff --git a/Kiss.Bff/ZaakGerichtWerken/ZgwTokenProvider.cs b/Kiss.Bff/Extern/ZaakGerichtWerken/ZgwTokenProvider.cs similarity index 100% rename from Kiss.Bff/ZaakGerichtWerken/ZgwTokenProvider.cs rename to Kiss.Bff/Extern/ZaakGerichtWerken/ZgwTokenProvider.cs diff --git a/Kiss.Bff/Zaaksysteem/GetZaaksysteemDeeplinkConfig.cs b/Kiss.Bff/Extern/Zaaksysteem/GetZaaksysteemDeeplinkConfig.cs similarity index 100% rename from Kiss.Bff/Zaaksysteem/GetZaaksysteemDeeplinkConfig.cs rename to Kiss.Bff/Extern/Zaaksysteem/GetZaaksysteemDeeplinkConfig.cs diff --git a/Kiss.Bff/Beheer/Data/BeheerDbContext.cs b/Kiss.Bff/Intern/Data/BeheerDbContext.cs similarity index 91% rename from Kiss.Bff/Beheer/Data/BeheerDbContext.cs rename to Kiss.Bff/Intern/Data/BeheerDbContext.cs index e6f2c8ce5..53ee3f188 100644 --- a/Kiss.Bff/Beheer/Data/BeheerDbContext.cs +++ b/Kiss.Bff/Intern/Data/BeheerDbContext.cs @@ -1,6 +1,7 @@ using Kiss.Bff.Beheer.Gespreksresultaten.Data.Entities; using Kiss.Bff.Beheer.Links.Data.Entities; using Kiss.Bff.Beheer.Verwerking; +using Kiss.Bff.Intern.Kanalen.Data.Entities; using Kiss.Bff.NieuwsEnWerkinstructies.Data.Entities; using Kiss.Bff.ZaakGerichtWerken.Contactmomenten; using Kiss.Bff.ZaakGerichtWerken.Contactverzoeken; @@ -50,6 +51,10 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.Entity() .Property(p => p.JsonVragen) .HasColumnType("json"); + + modelBuilder.Entity() + .HasIndex(p => p.Naam) + .IsUnique(); } public DbSet Berichten { get; set; } = null!; @@ -61,5 +66,6 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) public DbSet VerwerkingsLogs { get; set; } = null!; public DbSet ContactMomentDetails { get; set; } = null!; public DbSet ContactVerzoekVragenSets { get; set; } = null!; + public DbSet Kanalen { get; set; } = null!; } } diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230509075042_Init.Designer.cs b/Kiss.Bff/Intern/Data/Migrations/20230509075042_Init.Designer.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230509075042_Init.Designer.cs rename to Kiss.Bff/Intern/Data/Migrations/20230509075042_Init.Designer.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230509075042_Init.cs b/Kiss.Bff/Intern/Data/Migrations/20230509075042_Init.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230509075042_Init.cs rename to Kiss.Bff/Intern/Data/Migrations/20230509075042_Init.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230510125123_Gelezen.Designer.cs b/Kiss.Bff/Intern/Data/Migrations/20230510125123_Gelezen.Designer.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230510125123_Gelezen.Designer.cs rename to Kiss.Bff/Intern/Data/Migrations/20230510125123_Gelezen.Designer.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230510125123_Gelezen.cs b/Kiss.Bff/Intern/Data/Migrations/20230510125123_Gelezen.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230510125123_Gelezen.cs rename to Kiss.Bff/Intern/Data/Migrations/20230510125123_Gelezen.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230512100343_Links.Designer.cs b/Kiss.Bff/Intern/Data/Migrations/20230512100343_Links.Designer.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230512100343_Links.Designer.cs rename to Kiss.Bff/Intern/Data/Migrations/20230512100343_Links.Designer.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230512100343_Links.cs b/Kiss.Bff/Intern/Data/Migrations/20230512100343_Links.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230512100343_Links.cs rename to Kiss.Bff/Intern/Data/Migrations/20230512100343_Links.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230517092612_Gespreksresultaten.Designer.cs b/Kiss.Bff/Intern/Data/Migrations/20230517092612_Gespreksresultaten.Designer.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230517092612_Gespreksresultaten.Designer.cs rename to Kiss.Bff/Intern/Data/Migrations/20230517092612_Gespreksresultaten.Designer.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230517092612_Gespreksresultaten.cs b/Kiss.Bff/Intern/Data/Migrations/20230517092612_Gespreksresultaten.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230517092612_Gespreksresultaten.cs rename to Kiss.Bff/Intern/Data/Migrations/20230517092612_Gespreksresultaten.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230612125041_DataProtectionKey.Designer.cs b/Kiss.Bff/Intern/Data/Migrations/20230612125041_DataProtectionKey.Designer.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230612125041_DataProtectionKey.Designer.cs rename to Kiss.Bff/Intern/Data/Migrations/20230612125041_DataProtectionKey.Designer.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230612125041_DataProtectionKey.cs b/Kiss.Bff/Intern/Data/Migrations/20230612125041_DataProtectionKey.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230612125041_DataProtectionKey.cs rename to Kiss.Bff/Intern/Data/Migrations/20230612125041_DataProtectionKey.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230613152055_VerwerkingsLog.Designer.cs b/Kiss.Bff/Intern/Data/Migrations/20230613152055_VerwerkingsLog.Designer.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230613152055_VerwerkingsLog.Designer.cs rename to Kiss.Bff/Intern/Data/Migrations/20230613152055_VerwerkingsLog.Designer.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230613152055_VerwerkingsLog.cs b/Kiss.Bff/Intern/Data/Migrations/20230613152055_VerwerkingsLog.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230613152055_VerwerkingsLog.cs rename to Kiss.Bff/Intern/Data/Migrations/20230613152055_VerwerkingsLog.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230614131932_ManagementLogs.Designer.cs b/Kiss.Bff/Intern/Data/Migrations/20230614131932_ManagementLogs.Designer.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230614131932_ManagementLogs.Designer.cs rename to Kiss.Bff/Intern/Data/Migrations/20230614131932_ManagementLogs.Designer.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230614131932_ManagementLogs.cs b/Kiss.Bff/Intern/Data/Migrations/20230614131932_ManagementLogs.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230614131932_ManagementLogs.cs rename to Kiss.Bff/Intern/Data/Migrations/20230614131932_ManagementLogs.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230615145757_KlantContactmomentWorkaround.Designer.cs b/Kiss.Bff/Intern/Data/Migrations/20230615145757_KlantContactmomentWorkaround.Designer.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230615145757_KlantContactmomentWorkaround.Designer.cs rename to Kiss.Bff/Intern/Data/Migrations/20230615145757_KlantContactmomentWorkaround.Designer.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230615145757_KlantContactmomentWorkaround.cs b/Kiss.Bff/Intern/Data/Migrations/20230615145757_KlantContactmomentWorkaround.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230615145757_KlantContactmomentWorkaround.cs rename to Kiss.Bff/Intern/Data/Migrations/20230615145757_KlantContactmomentWorkaround.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230713182651_FaqIndex.Designer.cs b/Kiss.Bff/Intern/Data/Migrations/20230713182651_FaqIndex.Designer.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230713182651_FaqIndex.Designer.cs rename to Kiss.Bff/Intern/Data/Migrations/20230713182651_FaqIndex.Designer.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230713182651_FaqIndex.cs b/Kiss.Bff/Intern/Data/Migrations/20230713182651_FaqIndex.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230713182651_FaqIndex.cs rename to Kiss.Bff/Intern/Data/Migrations/20230713182651_FaqIndex.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230727120455_RenameTablesAndProperties.Designer.cs b/Kiss.Bff/Intern/Data/Migrations/20230727120455_RenameTablesAndProperties.Designer.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230727120455_RenameTablesAndProperties.Designer.cs rename to Kiss.Bff/Intern/Data/Migrations/20230727120455_RenameTablesAndProperties.Designer.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230727120455_RenameTablesAndProperties.cs b/Kiss.Bff/Intern/Data/Migrations/20230727120455_RenameTablesAndProperties.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230727120455_RenameTablesAndProperties.cs rename to Kiss.Bff/Intern/Data/Migrations/20230727120455_RenameTablesAndProperties.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230809124340_Remove-KlantContactemomentTable.Designer.cs b/Kiss.Bff/Intern/Data/Migrations/20230809124340_Remove-KlantContactemomentTable.Designer.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230809124340_Remove-KlantContactemomentTable.Designer.cs rename to Kiss.Bff/Intern/Data/Migrations/20230809124340_Remove-KlantContactemomentTable.Designer.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230809124340_Remove-KlantContactemomentTable.cs b/Kiss.Bff/Intern/Data/Migrations/20230809124340_Remove-KlantContactemomentTable.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230809124340_Remove-KlantContactemomentTable.cs rename to Kiss.Bff/Intern/Data/Migrations/20230809124340_Remove-KlantContactemomentTable.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230828120859_CreateTableContactverzoekVragenSets.Designer.cs b/Kiss.Bff/Intern/Data/Migrations/20230828120859_CreateTableContactverzoekVragenSets.Designer.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230828120859_CreateTableContactverzoekVragenSets.Designer.cs rename to Kiss.Bff/Intern/Data/Migrations/20230828120859_CreateTableContactverzoekVragenSets.Designer.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230828120859_CreateTableContactverzoekVragenSets.cs b/Kiss.Bff/Intern/Data/Migrations/20230828120859_CreateTableContactverzoekVragenSets.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230828120859_CreateTableContactverzoekVragenSets.cs rename to Kiss.Bff/Intern/Data/Migrations/20230828120859_CreateTableContactverzoekVragenSets.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230830131130_CmDetailsVerantwoordelijkeAfdeling.Designer.cs b/Kiss.Bff/Intern/Data/Migrations/20230830131130_CmDetailsVerantwoordelijkeAfdeling.Designer.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230830131130_CmDetailsVerantwoordelijkeAfdeling.Designer.cs rename to Kiss.Bff/Intern/Data/Migrations/20230830131130_CmDetailsVerantwoordelijkeAfdeling.Designer.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230830131130_CmDetailsVerantwoordelijkeAfdeling.cs b/Kiss.Bff/Intern/Data/Migrations/20230830131130_CmDetailsVerantwoordelijkeAfdeling.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230830131130_CmDetailsVerantwoordelijkeAfdeling.cs rename to Kiss.Bff/Intern/Data/Migrations/20230830131130_CmDetailsVerantwoordelijkeAfdeling.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230918100251_NameChangeVragenSetNaamToTitel.Designer.cs b/Kiss.Bff/Intern/Data/Migrations/20230918100251_NameChangeVragenSetNaamToTitel.Designer.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230918100251_NameChangeVragenSetNaamToTitel.Designer.cs rename to Kiss.Bff/Intern/Data/Migrations/20230918100251_NameChangeVragenSetNaamToTitel.Designer.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230918100251_NameChangeVragenSetNaamToTitel.cs b/Kiss.Bff/Intern/Data/Migrations/20230918100251_NameChangeVragenSetNaamToTitel.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230918100251_NameChangeVragenSetNaamToTitel.cs rename to Kiss.Bff/Intern/Data/Migrations/20230918100251_NameChangeVragenSetNaamToTitel.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230921111005_AddAfdelingNaamToVragenset.Designer.cs b/Kiss.Bff/Intern/Data/Migrations/20230921111005_AddAfdelingNaamToVragenset.Designer.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230921111005_AddAfdelingNaamToVragenset.Designer.cs rename to Kiss.Bff/Intern/Data/Migrations/20230921111005_AddAfdelingNaamToVragenset.Designer.cs diff --git a/Kiss.Bff/Beheer/Data/Migrations/20230921111005_AddAfdelingNaamToVragenset.cs b/Kiss.Bff/Intern/Data/Migrations/20230921111005_AddAfdelingNaamToVragenset.cs similarity index 100% rename from Kiss.Bff/Beheer/Data/Migrations/20230921111005_AddAfdelingNaamToVragenset.cs rename to Kiss.Bff/Intern/Data/Migrations/20230921111005_AddAfdelingNaamToVragenset.cs diff --git a/Kiss.Bff/Intern/Data/Migrations/20240328102419_KanalenTabel.Designer.cs b/Kiss.Bff/Intern/Data/Migrations/20240328102419_KanalenTabel.Designer.cs new file mode 100644 index 000000000..2231ab124 --- /dev/null +++ b/Kiss.Bff/Intern/Data/Migrations/20240328102419_KanalenTabel.Designer.cs @@ -0,0 +1,348 @@ +// +using System; +using Kiss.Bff.Beheer.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace Kiss.Bff.NieuwsEnWerkinstructies.Migrations +{ + [DbContext(typeof(BeheerDbContext))] + [Migration("20240328102419_KanalenTabel")] + partial class KanalenTabel + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.16") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("BerichtSkill", b => + { + b.Property("BerichtenId") + .HasColumnType("integer"); + + b.Property("SkillsId") + .HasColumnType("integer"); + + b.HasKey("BerichtenId", "SkillsId"); + + b.HasIndex("SkillsId"); + + b.ToTable("BerichtSkill"); + }); + + modelBuilder.Entity("Kiss.Bff.Beheer.Gespreksresultaten.Data.Entities.Gespreksresultaat", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateUpdated") + .HasColumnType("timestamp with time zone"); + + b.Property("Definitie") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("Definitie") + .IsUnique(); + + b.ToTable("Gespreksresultaten"); + }); + + modelBuilder.Entity("Kiss.Bff.Beheer.Links.Data.Entities.Link", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Categorie") + .IsRequired() + .HasColumnType("text"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateUpdated") + .HasColumnType("timestamp with time zone"); + + b.Property("Titel") + .IsRequired() + .HasColumnType("text"); + + b.Property("Url") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.ToTable("Links"); + }); + + modelBuilder.Entity("Kiss.Bff.Beheer.Verwerking.VerwerkingsLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ApiEndpoint") + .IsRequired() + .HasColumnType("text"); + + b.Property("InsertedAt") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("NOW()"); + + b.Property("Method") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.ToTable("VerwerkingsLogs"); + }); + + modelBuilder.Entity("Kiss.Bff.Intern.Kanalen.Data.Entities.Kanaal", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateUpdated") + .HasColumnType("timestamp with time zone"); + + b.Property("Naam") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("Naam") + .IsUnique(); + + b.ToTable("Kanalen"); + }); + + modelBuilder.Entity("Kiss.Bff.NieuwsEnWerkinstructies.Data.Entities.Bericht", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateUpdated") + .HasColumnType("timestamp with time zone"); + + b.Property("Inhoud") + .IsRequired() + .HasColumnType("text"); + + b.Property("IsBelangrijk") + .HasColumnType("boolean"); + + b.Property("PublicatieDatum") + .HasColumnType("timestamp with time zone"); + + b.Property("PublicatieEinddatum") + .HasColumnType("timestamp with time zone"); + + b.Property("Titel") + .IsRequired() + .HasColumnType("text"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("character varying(200)"); + + b.HasKey("Id"); + + b.HasIndex("Type"); + + b.ToTable("Berichten"); + }); + + modelBuilder.Entity("Kiss.Bff.NieuwsEnWerkinstructies.Data.Entities.BerichtGelezen", b => + { + b.Property("UserId") + .HasColumnType("text"); + + b.Property("BerichtId") + .HasColumnType("integer"); + + b.Property("GelezenOp") + .HasColumnType("timestamp with time zone"); + + b.HasKey("UserId", "BerichtId"); + + b.HasIndex("BerichtId"); + + b.ToTable("Gelezen"); + }); + + modelBuilder.Entity("Kiss.Bff.NieuwsEnWerkinstructies.Data.Entities.Skill", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateUpdated") + .HasColumnType("timestamp with time zone"); + + b.Property("IsDeleted") + .HasColumnType("boolean"); + + b.Property("Naam") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.ToTable("Skills"); + }); + + modelBuilder.Entity("Kiss.Bff.ZaakGerichtWerken.Contactmomenten.ContactmomentDetails", b => + { + b.Property("Id") + .HasColumnType("text"); + + b.Property("Einddatum") + .HasColumnType("timestamp with time zone"); + + b.Property("EmailadresKcm") + .HasColumnType("text"); + + b.Property("Gespreksresultaat") + .HasColumnType("text"); + + b.Property("SpecifiekeVraag") + .HasColumnType("text"); + + b.Property("Startdatum") + .HasColumnType("timestamp with time zone"); + + b.Property("VerantwoordelijkeAfdeling") + .HasColumnType("text"); + + b.Property("Vraag") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("VerantwoordelijkeAfdeling"); + + b.HasIndex("Vraag"); + + b.ToTable("ContactMomentDetails"); + }); + + modelBuilder.Entity("Kiss.Bff.ZaakGerichtWerken.Contactverzoeken.ContactVerzoekVragenSet", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AfdelingId") + .IsRequired() + .HasColumnType("text"); + + b.Property("AfdelingNaam") + .IsRequired() + .HasColumnType("text"); + + b.Property("JsonVragen") + .HasColumnType("json"); + + b.Property("Titel") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.ToTable("ContactVerzoekVragenSets"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.DataProtection.EntityFrameworkCore.DataProtectionKey", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("FriendlyName") + .HasColumnType("text"); + + b.Property("Xml") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.ToTable("DataProtectionKeys"); + }); + + modelBuilder.Entity("BerichtSkill", b => + { + b.HasOne("Kiss.Bff.NieuwsEnWerkinstructies.Data.Entities.Bericht", null) + .WithMany() + .HasForeignKey("BerichtenId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Kiss.Bff.NieuwsEnWerkinstructies.Data.Entities.Skill", null) + .WithMany() + .HasForeignKey("SkillsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Kiss.Bff.NieuwsEnWerkinstructies.Data.Entities.BerichtGelezen", b => + { + b.HasOne("Kiss.Bff.NieuwsEnWerkinstructies.Data.Entities.Bericht", null) + .WithMany("Gelezen") + .HasForeignKey("BerichtId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Kiss.Bff.NieuwsEnWerkinstructies.Data.Entities.Bericht", b => + { + b.Navigation("Gelezen"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Kiss.Bff/Intern/Data/Migrations/20240328102419_KanalenTabel.cs b/Kiss.Bff/Intern/Data/Migrations/20240328102419_KanalenTabel.cs new file mode 100644 index 000000000..652b68c6e --- /dev/null +++ b/Kiss.Bff/Intern/Data/Migrations/20240328102419_KanalenTabel.cs @@ -0,0 +1,39 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Kiss.Bff.NieuwsEnWerkinstructies.Migrations +{ + public partial class KanalenTabel : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "Kanalen", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + DateCreated = table.Column(type: "timestamp with time zone", nullable: false), + DateUpdated = table.Column(type: "timestamp with time zone", nullable: true), + Naam = table.Column(type: "text", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Kanalen", x => x.Id); + }); + + migrationBuilder.CreateIndex( + name: "IX_Kanalen_Naam", + table: "Kanalen", + column: "Naam", + unique: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "Kanalen"); + } + } +} diff --git a/Kiss.Bff/Beheer/Data/Migrations/BeheerDbContextModelSnapshot.cs b/Kiss.Bff/Intern/Data/Migrations/BeheerDbContextModelSnapshot.cs similarity index 93% rename from Kiss.Bff/Beheer/Data/Migrations/BeheerDbContextModelSnapshot.cs rename to Kiss.Bff/Intern/Data/Migrations/BeheerDbContextModelSnapshot.cs index 3d73eed78..aebb7fef9 100644 --- a/Kiss.Bff/Beheer/Data/Migrations/BeheerDbContextModelSnapshot.cs +++ b/Kiss.Bff/Intern/Data/Migrations/BeheerDbContextModelSnapshot.cs @@ -119,6 +119,30 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("VerwerkingsLogs"); }); + modelBuilder.Entity("Kiss.Bff.Intern.Kanalen.Data.Entities.Kanaal", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("DateCreated") + .HasColumnType("timestamp with time zone"); + + b.Property("DateUpdated") + .HasColumnType("timestamp with time zone"); + + b.Property("Naam") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("Naam") + .IsUnique(); + + b.ToTable("Kanalen"); + }); + modelBuilder.Entity("Kiss.Bff.NieuwsEnWerkinstructies.Data.Entities.Bericht", b => { b.Property("Id") diff --git a/Kiss.Bff/Beheer/Faq/GetFaq.cs b/Kiss.Bff/Intern/Faq/GetFaq.cs similarity index 100% rename from Kiss.Bff/Beheer/Faq/GetFaq.cs rename to Kiss.Bff/Intern/Faq/GetFaq.cs diff --git a/Kiss.Bff/Feedback/SendFeedback.cs b/Kiss.Bff/Intern/Feedback/SendFeedback.cs similarity index 100% rename from Kiss.Bff/Feedback/SendFeedback.cs rename to Kiss.Bff/Intern/Feedback/SendFeedback.cs diff --git a/Kiss.Bff/Beheer/Gespreksresultaten/Controllers/GespreksresultatenController.cs b/Kiss.Bff/Intern/Gespreksresultaten/Controllers/GespreksresultatenController.cs similarity index 100% rename from Kiss.Bff/Beheer/Gespreksresultaten/Controllers/GespreksresultatenController.cs rename to Kiss.Bff/Intern/Gespreksresultaten/Controllers/GespreksresultatenController.cs diff --git a/Kiss.Bff/Beheer/Gespreksresultaten/Data/Entities/Gespreksresultaat.cs b/Kiss.Bff/Intern/Gespreksresultaten/Data/Entities/Gespreksresultaat.cs similarity index 100% rename from Kiss.Bff/Beheer/Gespreksresultaten/Data/Entities/Gespreksresultaat.cs rename to Kiss.Bff/Intern/Gespreksresultaten/Data/Entities/Gespreksresultaat.cs diff --git a/Kiss.Bff/Intern/Kanalen/Data/Entities/Kanaal.cs b/Kiss.Bff/Intern/Kanalen/Data/Entities/Kanaal.cs new file mode 100644 index 000000000..7e8f5c7f6 --- /dev/null +++ b/Kiss.Bff/Intern/Kanalen/Data/Entities/Kanaal.cs @@ -0,0 +1,13 @@ +using System.ComponentModel.DataAnnotations; + +namespace Kiss.Bff.Intern.Kanalen.Data.Entities +{ + public class Kanaal + { + public Guid Id { get; set; } + public DateTimeOffset DateCreated { get; set; } + public DateTimeOffset? DateUpdated { get; set; } + [Required] + public string Naam { get; set; } = string.Empty; + } +} diff --git a/Kiss.Bff/Intern/Kanalen/Features/KanaalBeheerDetails.cs b/Kiss.Bff/Intern/Kanalen/Features/KanaalBeheerDetails.cs new file mode 100644 index 000000000..a780986a1 --- /dev/null +++ b/Kiss.Bff/Intern/Kanalen/Features/KanaalBeheerDetails.cs @@ -0,0 +1,40 @@ +using Kiss.Bff.Beheer.Data; +using Kiss.Bff.Beheer.Gespreksresultaten.Data.Entities; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; + +namespace Kiss.Bff.Intern.Kanalen +{ + [Route("api/[controller]")] + [ApiController] + public class KanaalBeheerDetails : ControllerBase + { + private readonly BeheerDbContext _context; + + public KanaalBeheerDetails(BeheerDbContext context) + { + _context = context; + } + + [HttpGet("{id}")] + public async Task> Get(Guid id) + { + var result = await _context + .Kanalen + .AsNoTracking() + //.Select(x => new KanaalOverzichtModel(x.Id, x.Naam)) + .FirstOrDefaultAsync( x=>x.Id == id ); + + + return result == null + ? NotFound() + : new KanaalOverzichtModel(result.Id, result.Naam); + + // return Ok(result); + } + + } + + public record KanaalOverzichtModel(Guid Id, string Naam); +} diff --git a/Kiss.Bff/Intern/Kanalen/Features/KanaalBewerken.cs b/Kiss.Bff/Intern/Kanalen/Features/KanaalBewerken.cs new file mode 100644 index 000000000..bb0cea75a --- /dev/null +++ b/Kiss.Bff/Intern/Kanalen/Features/KanaalBewerken.cs @@ -0,0 +1,37 @@ +using Kiss.Bff.Beheer.Data; +using Kiss.Bff.Beheer.Gespreksresultaten.Data.Entities; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; + +namespace Kiss.Bff.Intern.Kanalen +{ + [Route("api/[controller]")] + [ApiController] + public class KanaalBewerken : ControllerBase + { + private readonly BeheerDbContext _context; + + public KanaalBewerken(BeheerDbContext context) + { + _context = context; + } + + [HttpPut("{id}")] + [Authorize(Policy = Policies.RedactiePolicy)] + public async Task Put(Guid id, KanaalBewerkenModel model, CancellationToken token) + { + var entity = await _context.Kanalen.FirstOrDefaultAsync(x => x.Id == id, cancellationToken: token); + if (entity == null) return NotFound(); + + entity.DateUpdated = DateTimeOffset.UtcNow; + entity.Naam = model.Naam; + + await _context.SaveChangesAsync(token); + return NoContent(); + } + + } + + public record KanaalBewerkenModel(Guid Id, string Naam); +} diff --git a/Kiss.Bff/Intern/Kanalen/Features/KanaalToevoegen.cs b/Kiss.Bff/Intern/Kanalen/Features/KanaalToevoegen.cs new file mode 100644 index 000000000..e47e9f9af --- /dev/null +++ b/Kiss.Bff/Intern/Kanalen/Features/KanaalToevoegen.cs @@ -0,0 +1,42 @@ +using Kiss.Bff.Beheer.Data; +using Kiss.Bff.Beheer.Gespreksresultaten.Data.Entities; +using Kiss.Bff.Intern.Kanalen.Data.Entities; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; + +namespace Kiss.Bff.Intern.Kanalen +{ + [Route("api/[controller]")] + [ApiController] + public class KanaalToevoegen : ControllerBase + { + private readonly BeheerDbContext _context; + + public KanaalToevoegen(BeheerDbContext context) + { + _context = context; + } + + + [HttpPost] + [Authorize(Policy = Policies.RedactiePolicy)] + public async Task> Post(KanaalToevoegenModel model, CancellationToken token) + { + var entity = new Kanaal + { + DateCreated = DateTimeOffset.UtcNow, + Naam = model.Naam + }; + + await _context.Kanalen.AddAsync(entity, token); + await _context.SaveChangesAsync(token); + + return NoContent(); + //return CreatedAtAction("KanaalToevoegen", new { id = entity.Id }, model with { Id = entity.Id }); + } + + } + + public record KanaalToevoegenModel(Guid Id, string Naam); +} diff --git a/Kiss.Bff/Intern/Kanalen/Features/KanaalVerwijderen.cs b/Kiss.Bff/Intern/Kanalen/Features/KanaalVerwijderen.cs new file mode 100644 index 000000000..e78579e83 --- /dev/null +++ b/Kiss.Bff/Intern/Kanalen/Features/KanaalVerwijderen.cs @@ -0,0 +1,38 @@ +using Kiss.Bff.Beheer.Data; +using Kiss.Bff.Beheer.Gespreksresultaten.Data.Entities; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; + +namespace Kiss.Bff.Intern.Kanalen +{ + [Route("api/[controller]")] + [ApiController] + public class KanaalVerwijderen : ControllerBase + { + private readonly BeheerDbContext _context; + + public KanaalVerwijderen(BeheerDbContext context) + { + _context = context; + } + + + [HttpDelete("{id}")] + [Authorize(Policy = Policies.RedactiePolicy)] + public async Task Delete(Guid id, CancellationToken token) + { + var item = await _context.Kanalen.FirstOrDefaultAsync(x => x.Id == id, cancellationToken: token); + if (item == null) + { + return NoContent(); + } + + _context.Kanalen.Remove(item); + await _context.SaveChangesAsync(token); + + return NoContent(); + } + } + +} diff --git a/Kiss.Bff/Intern/Kanalen/Features/KanalenBeheerOverzicht.cs b/Kiss.Bff/Intern/Kanalen/Features/KanalenBeheerOverzicht.cs new file mode 100644 index 000000000..53616aef4 --- /dev/null +++ b/Kiss.Bff/Intern/Kanalen/Features/KanalenBeheerOverzicht.cs @@ -0,0 +1,36 @@ +using Kiss.Bff.Beheer.Data; +using Kiss.Bff.Beheer.Gespreksresultaten.Data.Entities; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; + +namespace Kiss.Bff.Intern.Kanalen +{ + [Route("api/[controller]")] + [ApiController] + public class KanalenBeheerOverzicht : ControllerBase + { + private readonly BeheerDbContext _context; + + public KanalenBeheerOverzicht(BeheerDbContext context) + { + _context = context; + } + + [HttpGet] + public ActionResult> Get() + { + var result = _context + .Kanalen + .AsNoTracking() + .OrderBy(x => x.Naam) + .Select(x => new KanalenOverzichtModel(x.Id, x.Naam)) + .AsAsyncEnumerable(); + + return Ok(result); + } + + } + + public record KanalenOverzichtModel(Guid Id, string Naam); +} diff --git a/Kiss.Bff/Intern/Kanalen/Features/KanalenContactmomentKeuzelijst.cs b/Kiss.Bff/Intern/Kanalen/Features/KanalenContactmomentKeuzelijst.cs new file mode 100644 index 000000000..525a097c8 --- /dev/null +++ b/Kiss.Bff/Intern/Kanalen/Features/KanalenContactmomentKeuzelijst.cs @@ -0,0 +1,36 @@ +using Kiss.Bff.Beheer.Data; +using Kiss.Bff.Beheer.Gespreksresultaten.Data.Entities; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; + +namespace Kiss.Bff.Intern.Kanalen +{ + [Route("api/[controller]")] + [ApiController] + public class KanalenContactmomentKeuzelijst : ControllerBase + { + private readonly BeheerDbContext _context; + + public KanalenContactmomentKeuzelijst(BeheerDbContext context) + { + _context = context; + } + + [HttpGet] + public ActionResult> Get() + { + var result = _context + .Kanalen + .AsNoTracking() + .OrderBy(x => x.Naam) + .Select(x => new KanalenOverzichtModel(x.Id, x.Naam)) + .AsAsyncEnumerable(); + + return Ok(result); + } + + } + + public record KanalenKeuzelijstModel(Guid Id, string Naam); +} diff --git a/Kiss.Bff/Beheer/Links/Controllers/CategorienController.cs b/Kiss.Bff/Intern/Links/Controllers/CategorienController.cs similarity index 100% rename from Kiss.Bff/Beheer/Links/Controllers/CategorienController.cs rename to Kiss.Bff/Intern/Links/Controllers/CategorienController.cs diff --git a/Kiss.Bff/Beheer/Links/Controllers/LinksController.cs b/Kiss.Bff/Intern/Links/Controllers/LinksController.cs similarity index 100% rename from Kiss.Bff/Beheer/Links/Controllers/LinksController.cs rename to Kiss.Bff/Intern/Links/Controllers/LinksController.cs diff --git a/Kiss.Bff/Beheer/Links/Data/Entities/Link.cs b/Kiss.Bff/Intern/Links/Data/Entities/Link.cs similarity index 100% rename from Kiss.Bff/Beheer/Links/Data/Entities/Link.cs rename to Kiss.Bff/Intern/Links/Data/Entities/Link.cs diff --git a/Kiss.Bff/Beheer/NieuwsEnWerkinstructies/Controllers/BerichtenController.cs b/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Controllers/BerichtenController.cs similarity index 100% rename from Kiss.Bff/Beheer/NieuwsEnWerkinstructies/Controllers/BerichtenController.cs rename to Kiss.Bff/Intern/NieuwsEnWerkinstructies/Controllers/BerichtenController.cs diff --git a/Kiss.Bff/Beheer/NieuwsEnWerkinstructies/Controllers/GetFeaturedCountController.cs b/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Controllers/GetFeaturedCountController.cs similarity index 100% rename from Kiss.Bff/Beheer/NieuwsEnWerkinstructies/Controllers/GetFeaturedCountController.cs rename to Kiss.Bff/Intern/NieuwsEnWerkinstructies/Controllers/GetFeaturedCountController.cs diff --git a/Kiss.Bff/Beheer/NieuwsEnWerkinstructies/Controllers/MarkeerGelezenController.cs b/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Controllers/MarkeerGelezenController.cs similarity index 100% rename from Kiss.Bff/Beheer/NieuwsEnWerkinstructies/Controllers/MarkeerGelezenController.cs rename to Kiss.Bff/Intern/NieuwsEnWerkinstructies/Controllers/MarkeerGelezenController.cs diff --git a/Kiss.Bff/Beheer/NieuwsEnWerkinstructies/Controllers/SearchBerichtenController.cs b/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Controllers/SearchBerichtenController.cs similarity index 100% rename from Kiss.Bff/Beheer/NieuwsEnWerkinstructies/Controllers/SearchBerichtenController.cs rename to Kiss.Bff/Intern/NieuwsEnWerkinstructies/Controllers/SearchBerichtenController.cs diff --git a/Kiss.Bff/Beheer/NieuwsEnWerkinstructies/Controllers/SkillsController.cs b/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Controllers/SkillsController.cs similarity index 100% rename from Kiss.Bff/Beheer/NieuwsEnWerkinstructies/Controllers/SkillsController.cs rename to Kiss.Bff/Intern/NieuwsEnWerkinstructies/Controllers/SkillsController.cs diff --git a/Kiss.Bff/Beheer/NieuwsEnWerkinstructies/Data/Entities/Bericht.cs b/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Data/Entities/Bericht.cs similarity index 100% rename from Kiss.Bff/Beheer/NieuwsEnWerkinstructies/Data/Entities/Bericht.cs rename to Kiss.Bff/Intern/NieuwsEnWerkinstructies/Data/Entities/Bericht.cs diff --git a/Kiss.Bff/Beheer/NieuwsEnWerkinstructies/Data/Entities/BerichtGelezen.cs b/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Data/Entities/BerichtGelezen.cs similarity index 100% rename from Kiss.Bff/Beheer/NieuwsEnWerkinstructies/Data/Entities/BerichtGelezen.cs rename to Kiss.Bff/Intern/NieuwsEnWerkinstructies/Data/Entities/BerichtGelezen.cs diff --git a/Kiss.Bff/Beheer/NieuwsEnWerkinstructies/Data/Entities/Skill.cs b/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Data/Entities/Skill.cs similarity index 100% rename from Kiss.Bff/Beheer/NieuwsEnWerkinstructies/Data/Entities/Skill.cs rename to Kiss.Bff/Intern/NieuwsEnWerkinstructies/Data/Entities/Skill.cs diff --git a/Kiss.Bff/Beheer/Verwerking/GetVerwerkingsLogs.cs b/Kiss.Bff/Intern/Verwerking/GetVerwerkingsLogs.cs similarity index 100% rename from Kiss.Bff/Beheer/Verwerking/GetVerwerkingsLogs.cs rename to Kiss.Bff/Intern/Verwerking/GetVerwerkingsLogs.cs diff --git a/Kiss.Bff/Beheer/Verwerking/VerwerkingMiddleware.cs b/Kiss.Bff/Intern/Verwerking/VerwerkingMiddleware.cs similarity index 100% rename from Kiss.Bff/Beheer/Verwerking/VerwerkingMiddleware.cs rename to Kiss.Bff/Intern/Verwerking/VerwerkingMiddleware.cs diff --git a/Kiss.Bff/Beheer/Verwerking/VerwerkingsLog.cs b/Kiss.Bff/Intern/Verwerking/VerwerkingsLog.cs similarity index 100% rename from Kiss.Bff/Beheer/Verwerking/VerwerkingsLog.cs rename to Kiss.Bff/Intern/Verwerking/VerwerkingsLog.cs diff --git a/src/features/Kanalen/KanalenOverzicht.vue b/src/features/Kanalen/KanalenOverzicht.vue new file mode 100644 index 000000000..b9a238304 --- /dev/null +++ b/src/features/Kanalen/KanalenOverzicht.vue @@ -0,0 +1,98 @@ + + + + + diff --git a/src/features/Kanalen/index.ts b/src/features/Kanalen/index.ts new file mode 100644 index 000000000..5240da62e --- /dev/null +++ b/src/features/Kanalen/index.ts @@ -0,0 +1 @@ +export { default as KanalenOverzicht } from "./KanalenOverzicht.vue"; diff --git a/src/features/Kanalen/service.ts b/src/features/Kanalen/service.ts new file mode 100644 index 000000000..92e36691f --- /dev/null +++ b/src/features/Kanalen/service.ts @@ -0,0 +1,12 @@ +import { fetchLoggedIn, ServiceResult, throwIfNotOk } from "@/services"; + + +async function fetchAll(url: string) { + return await fetchLoggedIn(url) + .then(throwIfNotOk) + .then((r) => r.json()); +} + +export function useKanalen() { + return ServiceResult.fromFetcher("/api/KanalenBeheerOverzicht", fetchAll); +} diff --git a/src/features/Kanalen/types.ts b/src/features/Kanalen/types.ts new file mode 100644 index 000000000..92a6a4264 --- /dev/null +++ b/src/features/Kanalen/types.ts @@ -0,0 +1,4 @@ +export interface OnzinKanWeg { + id: string; + naam: string; +} diff --git a/src/router/index.ts b/src/router/index.ts index db00d2d29..dd00e84f2 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -43,6 +43,11 @@ const ContactverzoekFormulierenBeheer = () => "@/views/Beheer/contactverzoek-formulieren/ContactverzoekFormulierenBeheer.vue" ); + const KanaalBeheer = () => + import("@/views/Beheer/Kanalen/KanaalBeheer.vue"); +const KanalenBeheer = () => + import("@/views/Beheer/Kanalen/KanalenBeheer.vue"); + const guardContactMoment: NavigationGuard = (to, from, next) => { const contactmoment = useContactmomentStore(); if (contactmoment.contactmomentLoopt) { @@ -212,6 +217,19 @@ const router = createRouter({ props: true, meta: {}, }, + { + path: "kanalen", + name: "KanalenBeheer", + component: KanalenBeheer, + meta: {}, + }, + { + path: "kanaal/:id?", + name: "KanaalBeheer", + component: KanaalBeheer, + props: true, + meta: {}, + }, ], }, redirectRoute, diff --git a/src/views/Beheer/BeheerLayout.vue b/src/views/Beheer/BeheerLayout.vue index 3399e908a..090836701 100644 --- a/src/views/Beheer/BeheerLayout.vue +++ b/src/views/Beheer/BeheerLayout.vue @@ -9,6 +9,9 @@ Gespreksresultaten + Kanalen Formulieren contactverzoek diff --git a/src/views/Beheer/Kanalen/KanaalBeheer.vue b/src/views/Beheer/Kanalen/KanaalBeheer.vue new file mode 100644 index 000000000..a96303d5f --- /dev/null +++ b/src/views/Beheer/Kanalen/KanaalBeheer.vue @@ -0,0 +1,181 @@ + + + + + diff --git a/src/views/Beheer/Kanalen/KanalenBeheer.vue b/src/views/Beheer/Kanalen/KanalenBeheer.vue new file mode 100644 index 000000000..af8cc97a3 --- /dev/null +++ b/src/views/Beheer/Kanalen/KanalenBeheer.vue @@ -0,0 +1,32 @@ + + + + + From be2939e3ac058f71d1bda3bbedbad251d1f97264 Mon Sep 17 00:00:00 2001 From: mark stoker Date: Thu, 28 Mar 2024 12:51:13 +0100 Subject: [PATCH 02/17] duplicates niet toestaan --- .../Kanalen/Features/KanaalToevoegen.cs | 10 +++++- src/views/Beheer/Kanalen/KanaalBeheer.vue | 36 ++++++++----------- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/Kiss.Bff/Intern/Kanalen/Features/KanaalToevoegen.cs b/Kiss.Bff/Intern/Kanalen/Features/KanaalToevoegen.cs index e47e9f9af..f7327f3bc 100644 --- a/Kiss.Bff/Intern/Kanalen/Features/KanaalToevoegen.cs +++ b/Kiss.Bff/Intern/Kanalen/Features/KanaalToevoegen.cs @@ -29,11 +29,19 @@ public async Task> Post(KanaalToevoegenModel Naam = model.Naam }; + //de foutmelding bij een savechanges poging varieert afhanelijk van de gebruikte database technologie + //derhalve een custom check om een sinvolle melding te kunnen retourneren + //ook al is er geen 100% garantie dat de naam na deze check bij het opslaan nog steeds uniek is + if(await _context.Kanalen.AnyAsync(x=>x.Naam == model.Naam, token)) + { + return Conflict("De naam van het kanaal moet uniek zijn"); + } + await _context.Kanalen.AddAsync(entity, token); await _context.SaveChangesAsync(token); return NoContent(); - //return CreatedAtAction("KanaalToevoegen", new { id = entity.Id }, model with { Id = entity.Id }); + } } diff --git a/src/views/Beheer/Kanalen/KanaalBeheer.vue b/src/views/Beheer/Kanalen/KanaalBeheer.vue index a96303d5f..585049497 100644 --- a/src/views/Beheer/Kanalen/KanaalBeheer.vue +++ b/src/views/Beheer/Kanalen/KanaalBeheer.vue @@ -9,20 +9,12 @@
  • - + Annuleren
  • @@ -61,7 +53,7 @@ const props = defineProps<{ id?: string }>(); type Kanaal = { id?: string; - naam?: string; + naam?: string; }; const router = useRouter(); @@ -69,9 +61,9 @@ const loading = ref(false); const item = ref(); -const showError = () => { +const showError = (message? :string) => { toast({ - text: "Er is een fout opgetreden. Probeer het later opnieuw.", + text: message ?? "Er is een fout opgetreden. Probeer het later opnieuw.", type: "error", }); }; @@ -108,13 +100,16 @@ const submit = async () => { }, body: JSON.stringify(item.value), }); - if (result.status > 300) { + + if (result.status == 409) { + showError("Er bestaat al een item met dezelfde naam"); + } else if (result.status > 300) { showError(); } else { return handleSuccess(); } } - return handleSuccess(); + } catch { showError(); } finally { @@ -122,11 +117,11 @@ const submit = async () => { } }; - + onMounted(async () => { loading.value = true; -console.log(props) + console.log try { if (props.id) { //load link @@ -141,7 +136,7 @@ console.log(props) } else { item.value = {}; } - + } catch { showError(); } finally { @@ -151,7 +146,6 @@ console.log(props) + \ No newline at end of file diff --git a/src/features/Kanalen/KanalenOverzicht.vue b/src/features/Kanalen/KanalenOverzicht.vue index b9a238304..c647a9ecc 100644 --- a/src/features/Kanalen/KanalenOverzicht.vue +++ b/src/features/Kanalen/KanalenOverzicht.vue @@ -43,7 +43,6 @@ import { const kanalen = useKanalen(); const loading = ref(true); -const error = ref(false); const API_URL = "/api/KanaalVerwijderen/"; const BEHEER_URL = "/beheer/kanaal/"; @@ -54,14 +53,14 @@ const showError = () => { }); }; -//todo verplaatsen naar service + const verwijder = (id: number) => { loading.value = true; return fetchLoggedIn(API_URL + id, { method: "DELETE", }) .then(throwIfNotOk) - //.then(load) + .then(() => kanalen.refresh()) .then(() => toast({ text: "verwijderd", diff --git a/src/features/Kanalen/service.ts b/src/features/Kanalen/service.ts index 0d12a19f2..aaa437aea 100644 --- a/src/features/Kanalen/service.ts +++ b/src/features/Kanalen/service.ts @@ -1,14 +1,26 @@ import { fetchLoggedIn, ServiceResult, throwIfNotOk } from "@/services"; - async function fetchAll(url: string) { return await fetchLoggedIn(url) .then(throwIfNotOk) .then((r) => r.json()); } + + +// const verwijderKanaal = (id: number) => { + +// return fetchLoggedIn("/api/KanaalVerwijderen/" + id, { +// method: "DELETE", +// }) +// .then(load) +// }; + + export function useKanalen() { - return ServiceResult.fromFetcher("/api/KanalenBeheerOverzicht", fetchAll); + const kanalen = ServiceResult.fromFetcher("/api/KanalenBeheerOverzicht", fetchAll, { poll: false } ); + + return kanalen } diff --git a/src/views/Beheer/Kanalen/KanaalBeheer.vue b/src/views/Beheer/Kanalen/KanaalBeheer.vue index 585049497..51368d91a 100644 --- a/src/views/Beheer/Kanalen/KanaalBeheer.vue +++ b/src/views/Beheer/Kanalen/KanaalBeheer.vue @@ -6,26 +6,30 @@ @@ -38,16 +42,10 @@ import { import SimpleSpinner from "@/components/SimpleSpinner.vue"; import { toast } from "@/stores/toast"; import { - ServiceResult, fetchLoggedIn, - mapServiceData, - parseJson, - throwIfNotOk, } from "@/services"; import { useRouter } from "vue-router"; -import SearchCombobox, { - type DatalistItem, -} from "@/components/SearchCombobox.vue"; +import beheerForm from "@/components/beheer/BeheerForm.vue" const props = defineProps<{ id?: string }>(); @@ -61,7 +59,7 @@ const loading = ref(false); const item = ref(); -const showError = (message? :string) => { +const showError = (message?: string) => { toast({ text: message ?? "Er is een fout opgetreden. Probeer het later opnieuw.", type: "error", @@ -109,7 +107,7 @@ const submit = async () => { return handleSuccess(); } } - + } catch { showError(); } finally { @@ -145,31 +143,4 @@ onMounted(async () => { }); - + diff --git a/src/views/Beheer/Kanalen/KanalenBeheer.vue b/src/views/Beheer/Kanalen/KanalenBeheer.vue index af8cc97a3..7cf66cf17 100644 --- a/src/views/Beheer/Kanalen/KanalenBeheer.vue +++ b/src/views/Beheer/Kanalen/KanalenBeheer.vue @@ -1,28 +1,20 @@ + diff --git a/src/views/Beheer/skills/SkillBeheer.vue b/src/views/Beheer/skills/SkillBeheer.vue index ee5fb3cc0..1f1abe07a 100644 --- a/src/views/Beheer/skills/SkillBeheer.vue +++ b/src/views/Beheer/skills/SkillBeheer.vue @@ -4,17 +4,19 @@ @@ -48,6 +50,8 @@ import SimpleSpinner from "@/components/SimpleSpinner.vue"; import { toast } from "@/stores/toast"; import { fetchLoggedIn } from "@/services"; import { useRouter } from "vue-router"; +import BeheerForm from "@/components/beheer/BeheerForm.vue"; + const props = defineProps(["id"]); type skillType = { @@ -133,25 +137,4 @@ onMounted(async () => { }); - + From 9eff9cbf867f42f75be13f61427aaa0c088cf68c Mon Sep 17 00:00:00 2001 From: mark stoker Date: Tue, 2 Apr 2024 11:24:14 +0200 Subject: [PATCH 09/17] cleanup --- src/views/Beheer/gespreksresultaten/GespreksresultaatBeheer.vue | 2 -- src/views/Beheer/skills/SkillBeheer.vue | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/views/Beheer/gespreksresultaten/GespreksresultaatBeheer.vue b/src/views/Beheer/gespreksresultaten/GespreksresultaatBeheer.vue index 2aabfc85f..8ecc289aa 100644 --- a/src/views/Beheer/gespreksresultaten/GespreksresultaatBeheer.vue +++ b/src/views/Beheer/gespreksresultaten/GespreksresultaatBeheer.vue @@ -108,5 +108,3 @@ onMounted(async () => { } }); - - diff --git a/src/views/Beheer/skills/SkillBeheer.vue b/src/views/Beheer/skills/SkillBeheer.vue index 1f1abe07a..1be6a3fdf 100644 --- a/src/views/Beheer/skills/SkillBeheer.vue +++ b/src/views/Beheer/skills/SkillBeheer.vue @@ -136,5 +136,3 @@ onMounted(async () => { } }); - - From 5699a10d985353689c20573d508f47a69eee7bc1 Mon Sep 17 00:00:00 2001 From: mark stoker Date: Tue, 2 Apr 2024 12:41:56 +0200 Subject: [PATCH 10/17] clean up --- src/views/Beheer/Kanalen/KanaalBeheer.vue | 35 +++++++++++------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/src/views/Beheer/Kanalen/KanaalBeheer.vue b/src/views/Beheer/Kanalen/KanaalBeheer.vue index 51368d91a..82c63b945 100644 --- a/src/views/Beheer/Kanalen/KanaalBeheer.vue +++ b/src/views/Beheer/Kanalen/KanaalBeheer.vue @@ -6,18 +6,25 @@ @@ -41,11 +46,9 @@ import { } from "@utrecht/component-library-vue"; import SimpleSpinner from "@/components/SimpleSpinner.vue"; import { toast } from "@/stores/toast"; -import { - fetchLoggedIn, -} from "@/services"; +import { fetchLoggedIn } from "@/services"; import { useRouter } from "vue-router"; -import beheerForm from "@/components/beheer/BeheerForm.vue" +import beheerForm from "@/components/beheer/BeheerForm.vue"; const props = defineProps<{ id?: string }>(); @@ -107,7 +110,6 @@ const submit = async () => { return handleSuccess(); } } - } catch { showError(); } finally { @@ -115,15 +117,15 @@ const submit = async () => { } }; - - onMounted(async () => { loading.value = true; - console.log + console.log; try { if (props.id) { //load link - const response = await fetchLoggedIn("/api/KanaalBeheerDetails/" + props.id); + const response = await fetchLoggedIn( + "/api/KanaalBeheerDetails/" + props.id, + ); if (response.status > 300) { showError(); return; @@ -134,7 +136,6 @@ onMounted(async () => { } else { item.value = {}; } - } catch { showError(); } finally { @@ -142,5 +143,3 @@ onMounted(async () => { } }); - - From 737efb892a844238c3fea6bd18ebd15ee75df20e Mon Sep 17 00:00:00 2001 From: mark stoker Date: Tue, 2 Apr 2024 12:54:04 +0200 Subject: [PATCH 11/17] cleanup --- src/features/Kanalen/service.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/features/Kanalen/service.ts b/src/features/Kanalen/service.ts index 61b636b9c..3c01fac65 100644 --- a/src/features/Kanalen/service.ts +++ b/src/features/Kanalen/service.ts @@ -2,16 +2,22 @@ import { fetchLoggedIn, ServiceResult, throwIfNotOk } from "@/services"; async function fetchAll(url: string) { return await fetchLoggedIn(url) - .then(throwIfNotOk) - .then((r) => r.json()); + .then(throwIfNotOk) + .then((r) => r.json()); } export function useKanalen() { - const kanalen = ServiceResult.fromFetcher("/api/KanalenBeheerOverzicht", fetchAll, { poll: false } ); + const kanalen = ServiceResult.fromFetcher( + "/api/KanalenBeheerOverzicht", + fetchAll, + ); - return kanalen + return kanalen; } export function useKanalenKeuzeLijst() { - return ServiceResult.fromFetcher("/api/KanalenContactmomentKeuzelijst", fetchAll); -} \ No newline at end of file + return ServiceResult.fromFetcher( + "/api/KanalenContactmomentKeuzelijst", + fetchAll, + ); +} From 3a7c46e42c97f5145bd0971712a7956605e4d08c Mon Sep 17 00:00:00 2001 From: mark stoker Date: Tue, 2 Apr 2024 16:57:02 +0200 Subject: [PATCH 12/17] refactoring --- Kiss.Bff.Test/AuthorizationCheckTests.cs | 9 +++++---- Kiss.Bff.Test/BerichtenControllerTests.cs | 2 +- Kiss.Bff.Test/CategorienControllerTests.cs | 2 +- Kiss.Bff.Test/GespreksresultatenUnitTests.cs | 2 +- Kiss.Bff.Test/GetFeaturedCountControllerTests.cs | 2 +- Kiss.Bff.Test/LinksControllerUnitTests.cs | 4 ++-- Kiss.Bff.Test/MarkeerGelezenControllerTests.cs | 2 +- Kiss.Bff.Test/SearchBerichtenControllerTests.cs | 2 +- Kiss.Bff.Test/SkillsUnitTests.cs | 2 +- .../GespreksresultatenController.cs | 2 +- Kiss.Bff/Intern/Kanalen/Features/KanaalBeheerDetails.cs | 4 ---- Kiss.Bff/Intern/Kanalen/Features/KanaalToevoegen.cs | 2 +- .../{Controllers => Features}/CategorienController.cs | 2 +- .../Links/{Controllers => Features}/LinksController.cs | 2 +- .../{Controllers => Features}/BerichtenController.cs | 2 +- .../GetFeaturedCountController.cs | 2 +- .../MarkeerGelezenController.cs | 2 +- .../SearchBerichtenController.cs | 2 +- .../{Controllers => Features}/SkillsController.cs | 2 +- 19 files changed, 23 insertions(+), 26 deletions(-) rename Kiss.Bff/Intern/Gespreksresultaten/{Controllers => Features}/GespreksresultatenController.cs (98%) rename Kiss.Bff/Intern/Links/{Controllers => Features}/CategorienController.cs (94%) rename Kiss.Bff/Intern/Links/{Controllers => Features}/LinksController.cs (99%) rename Kiss.Bff/Intern/NieuwsEnWerkinstructies/{Controllers => Features}/BerichtenController.cs (99%) rename Kiss.Bff/Intern/NieuwsEnWerkinstructies/{Controllers => Features}/GetFeaturedCountController.cs (96%) rename Kiss.Bff/Intern/NieuwsEnWerkinstructies/{Controllers => Features}/MarkeerGelezenController.cs (97%) rename Kiss.Bff/Intern/NieuwsEnWerkinstructies/{Controllers => Features}/SearchBerichtenController.cs (98%) rename Kiss.Bff/Intern/NieuwsEnWerkinstructies/{Controllers => Features}/SkillsController.cs (98%) diff --git a/Kiss.Bff.Test/AuthorizationCheckTests.cs b/Kiss.Bff.Test/AuthorizationCheckTests.cs index 3fd934a27..8859c3f9a 100644 --- a/Kiss.Bff.Test/AuthorizationCheckTests.cs +++ b/Kiss.Bff.Test/AuthorizationCheckTests.cs @@ -9,11 +9,12 @@ using Kiss.Bff.Beheer.Faq; using Kiss.Bff.Beheer.Data; using Microsoft.EntityFrameworkCore; -using Kiss.Bff.Beheer.Gespreksresultaten.Controllers; -using Kiss.Bff.Beheer.Links.Controllers; -using static Kiss.Bff.Beheer.Links.Controllers.LinksController; -using Kiss.Bff.NieuwsEnWerkinstructies.Controllers; + +using static Kiss.Bff.Intern.Links.Features.LinksController; +using Kiss.Bff.NieuwsEnWerkinstructies.Features; using Kiss.Bff.Beheer.Verwerking; +using Kiss.Bff.Intern.Links.Features; +using Kiss.Bff.Intern.Gespreksresultaten.Features; namespace Kiss.Bff.Test { diff --git a/Kiss.Bff.Test/BerichtenControllerTests.cs b/Kiss.Bff.Test/BerichtenControllerTests.cs index 40bead6ae..d64b06db6 100644 --- a/Kiss.Bff.Test/BerichtenControllerTests.cs +++ b/Kiss.Bff.Test/BerichtenControllerTests.cs @@ -1,5 +1,5 @@ using Kiss.Bff.Beheer.Data; -using Kiss.Bff.NieuwsEnWerkinstructies.Controllers; +using Kiss.Bff.NieuwsEnWerkinstructies.Features; using Kiss.Bff.NieuwsEnWerkinstructies.Data.Entities; using Microsoft.AspNetCore.Mvc; diff --git a/Kiss.Bff.Test/CategorienControllerTests.cs b/Kiss.Bff.Test/CategorienControllerTests.cs index 037177b24..e617f3247 100644 --- a/Kiss.Bff.Test/CategorienControllerTests.cs +++ b/Kiss.Bff.Test/CategorienControllerTests.cs @@ -1,6 +1,6 @@ using Kiss.Bff.Beheer.Data; -using Kiss.Bff.Beheer.Links.Controllers; using Kiss.Bff.Beheer.Links.Data.Entities; +using Kiss.Bff.Intern.Links.Features; using Microsoft.AspNetCore.Mvc; namespace Kiss.Bff.Test diff --git a/Kiss.Bff.Test/GespreksresultatenUnitTests.cs b/Kiss.Bff.Test/GespreksresultatenUnitTests.cs index c440fb645..d4f98e659 100644 --- a/Kiss.Bff.Test/GespreksresultatenUnitTests.cs +++ b/Kiss.Bff.Test/GespreksresultatenUnitTests.cs @@ -1,5 +1,5 @@ using Kiss.Bff.Beheer.Data; -using Kiss.Bff.Beheer.Gespreksresultaten.Controllers; +using Kiss.Bff.Intern.Gespreksresultaten.Features; using Kiss.Bff.Beheer.Gespreksresultaten.Data.Entities; using Microsoft.AspNetCore.Mvc; diff --git a/Kiss.Bff.Test/GetFeaturedCountControllerTests.cs b/Kiss.Bff.Test/GetFeaturedCountControllerTests.cs index d7e47b9d8..6f12a335b 100644 --- a/Kiss.Bff.Test/GetFeaturedCountControllerTests.cs +++ b/Kiss.Bff.Test/GetFeaturedCountControllerTests.cs @@ -1,5 +1,5 @@ using Kiss.Bff.Beheer.Data; -using Kiss.Bff.NieuwsEnWerkinstructies.Controllers; +using Kiss.Bff.NieuwsEnWerkinstructies.Features; using Kiss.Bff.NieuwsEnWerkinstructies.Data.Entities; using Microsoft.AspNetCore.Mvc; diff --git a/Kiss.Bff.Test/LinksControllerUnitTests.cs b/Kiss.Bff.Test/LinksControllerUnitTests.cs index c0c9025f6..3b3b661dc 100644 --- a/Kiss.Bff.Test/LinksControllerUnitTests.cs +++ b/Kiss.Bff.Test/LinksControllerUnitTests.cs @@ -1,8 +1,8 @@ using Kiss.Bff.Beheer.Data; -using Kiss.Bff.Beheer.Links.Controllers; using Kiss.Bff.Beheer.Links.Data.Entities; +using Kiss.Bff.Intern.Links.Features; using Microsoft.AspNetCore.Mvc; -using static Kiss.Bff.Beheer.Links.Controllers.LinksController; +using static Kiss.Bff.Intern.Links.Features.LinksController; namespace Kiss.Bff.Test { diff --git a/Kiss.Bff.Test/MarkeerGelezenControllerTests.cs b/Kiss.Bff.Test/MarkeerGelezenControllerTests.cs index b2b31c241..f03e2a816 100644 --- a/Kiss.Bff.Test/MarkeerGelezenControllerTests.cs +++ b/Kiss.Bff.Test/MarkeerGelezenControllerTests.cs @@ -1,6 +1,6 @@ using System.Security.Claims; using Kiss.Bff.Beheer.Data; -using Kiss.Bff.NieuwsEnWerkinstructies.Controllers; +using Kiss.Bff.NieuwsEnWerkinstructies.Features; using Kiss.Bff.NieuwsEnWerkinstructies.Data.Entities; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; diff --git a/Kiss.Bff.Test/SearchBerichtenControllerTests.cs b/Kiss.Bff.Test/SearchBerichtenControllerTests.cs index e63d9e9d4..bbea7ec46 100644 --- a/Kiss.Bff.Test/SearchBerichtenControllerTests.cs +++ b/Kiss.Bff.Test/SearchBerichtenControllerTests.cs @@ -1,6 +1,6 @@ using System.Security.Claims; using Kiss.Bff.Beheer.Data; -using Kiss.Bff.NieuwsEnWerkinstructies.Controllers; +using Kiss.Bff.NieuwsEnWerkinstructies.Features; using Kiss.Bff.NieuwsEnWerkinstructies.Data.Entities; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; diff --git a/Kiss.Bff.Test/SkillsUnitTests.cs b/Kiss.Bff.Test/SkillsUnitTests.cs index bef813502..b790ca78e 100644 --- a/Kiss.Bff.Test/SkillsUnitTests.cs +++ b/Kiss.Bff.Test/SkillsUnitTests.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Mvc; using Kiss.Bff.Beheer.Data; -using Kiss.Bff.NieuwsEnWerkinstructies.Controllers; +using Kiss.Bff.NieuwsEnWerkinstructies.Features; using Kiss.Bff.NieuwsEnWerkinstructies.Data.Entities; using Microsoft.EntityFrameworkCore; diff --git a/Kiss.Bff/Intern/Gespreksresultaten/Controllers/GespreksresultatenController.cs b/Kiss.Bff/Intern/Gespreksresultaten/Features/GespreksresultatenController.cs similarity index 98% rename from Kiss.Bff/Intern/Gespreksresultaten/Controllers/GespreksresultatenController.cs rename to Kiss.Bff/Intern/Gespreksresultaten/Features/GespreksresultatenController.cs index eb9dc6ad7..56d17064f 100644 --- a/Kiss.Bff/Intern/Gespreksresultaten/Controllers/GespreksresultatenController.cs +++ b/Kiss.Bff/Intern/Gespreksresultaten/Features/GespreksresultatenController.cs @@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; -namespace Kiss.Bff.Beheer.Gespreksresultaten.Controllers +namespace Kiss.Bff.Intern.Gespreksresultaten.Features { [Route("api/[controller]")] [ApiController] diff --git a/Kiss.Bff/Intern/Kanalen/Features/KanaalBeheerDetails.cs b/Kiss.Bff/Intern/Kanalen/Features/KanaalBeheerDetails.cs index a780986a1..641c1efcf 100644 --- a/Kiss.Bff/Intern/Kanalen/Features/KanaalBeheerDetails.cs +++ b/Kiss.Bff/Intern/Kanalen/Features/KanaalBeheerDetails.cs @@ -23,15 +23,11 @@ public async Task> Get(Guid id) var result = await _context .Kanalen .AsNoTracking() - //.Select(x => new KanaalOverzichtModel(x.Id, x.Naam)) .FirstOrDefaultAsync( x=>x.Id == id ); - return result == null ? NotFound() : new KanaalOverzichtModel(result.Id, result.Naam); - - // return Ok(result); } } diff --git a/Kiss.Bff/Intern/Kanalen/Features/KanaalToevoegen.cs b/Kiss.Bff/Intern/Kanalen/Features/KanaalToevoegen.cs index f7327f3bc..f88fe4e3f 100644 --- a/Kiss.Bff/Intern/Kanalen/Features/KanaalToevoegen.cs +++ b/Kiss.Bff/Intern/Kanalen/Features/KanaalToevoegen.cs @@ -30,7 +30,7 @@ public async Task> Post(KanaalToevoegenModel }; //de foutmelding bij een savechanges poging varieert afhanelijk van de gebruikte database technologie - //derhalve een custom check om een sinvolle melding te kunnen retourneren + //derhalve een custom check om een zinvolle melding te kunnen retourneren //ook al is er geen 100% garantie dat de naam na deze check bij het opslaan nog steeds uniek is if(await _context.Kanalen.AnyAsync(x=>x.Naam == model.Naam, token)) { diff --git a/Kiss.Bff/Intern/Links/Controllers/CategorienController.cs b/Kiss.Bff/Intern/Links/Features/CategorienController.cs similarity index 94% rename from Kiss.Bff/Intern/Links/Controllers/CategorienController.cs rename to Kiss.Bff/Intern/Links/Features/CategorienController.cs index 542ed3916..2dd4e0fae 100644 --- a/Kiss.Bff/Intern/Links/Controllers/CategorienController.cs +++ b/Kiss.Bff/Intern/Links/Features/CategorienController.cs @@ -2,7 +2,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; -namespace Kiss.Bff.Beheer.Links.Controllers +namespace Kiss.Bff.Intern.Links.Features { [Route("api/[controller]")] [ApiController] diff --git a/Kiss.Bff/Intern/Links/Controllers/LinksController.cs b/Kiss.Bff/Intern/Links/Features/LinksController.cs similarity index 99% rename from Kiss.Bff/Intern/Links/Controllers/LinksController.cs rename to Kiss.Bff/Intern/Links/Features/LinksController.cs index 38905dac9..4345ac8b3 100644 --- a/Kiss.Bff/Intern/Links/Controllers/LinksController.cs +++ b/Kiss.Bff/Intern/Links/Features/LinksController.cs @@ -5,7 +5,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; -namespace Kiss.Bff.Beheer.Links.Controllers +namespace Kiss.Bff.Intern.Links.Features { [Route("api/[controller]")] [ApiController] diff --git a/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Controllers/BerichtenController.cs b/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Features/BerichtenController.cs similarity index 99% rename from Kiss.Bff/Intern/NieuwsEnWerkinstructies/Controllers/BerichtenController.cs rename to Kiss.Bff/Intern/NieuwsEnWerkinstructies/Features/BerichtenController.cs index 744be9307..b71d96d53 100644 --- a/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Controllers/BerichtenController.cs +++ b/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Features/BerichtenController.cs @@ -5,7 +5,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; -namespace Kiss.Bff.NieuwsEnWerkinstructies.Controllers +namespace Kiss.Bff.NieuwsEnWerkinstructies.Features { [Route("api/[controller]")] [Authorize(Policy = Policies.RedactiePolicy)] diff --git a/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Controllers/GetFeaturedCountController.cs b/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Features/GetFeaturedCountController.cs similarity index 96% rename from Kiss.Bff/Intern/NieuwsEnWerkinstructies/Controllers/GetFeaturedCountController.cs rename to Kiss.Bff/Intern/NieuwsEnWerkinstructies/Features/GetFeaturedCountController.cs index 64a91fb04..e333ad86e 100644 --- a/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Controllers/GetFeaturedCountController.cs +++ b/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Features/GetFeaturedCountController.cs @@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; -namespace Kiss.Bff.NieuwsEnWerkinstructies.Controllers +namespace Kiss.Bff.NieuwsEnWerkinstructies.Features { [ApiController] public class GetFeaturedCountController : ControllerBase diff --git a/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Controllers/MarkeerGelezenController.cs b/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Features/MarkeerGelezenController.cs similarity index 97% rename from Kiss.Bff/Intern/NieuwsEnWerkinstructies/Controllers/MarkeerGelezenController.cs rename to Kiss.Bff/Intern/NieuwsEnWerkinstructies/Features/MarkeerGelezenController.cs index 046aef89a..405bfa6f4 100644 --- a/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Controllers/MarkeerGelezenController.cs +++ b/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Features/MarkeerGelezenController.cs @@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore; using Npgsql; -namespace Kiss.Bff.NieuwsEnWerkinstructies.Controllers +namespace Kiss.Bff.NieuwsEnWerkinstructies.Features { [ApiController] public class MarkeerGelezenController : ControllerBase diff --git a/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Controllers/SearchBerichtenController.cs b/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Features/SearchBerichtenController.cs similarity index 98% rename from Kiss.Bff/Intern/NieuwsEnWerkinstructies/Controllers/SearchBerichtenController.cs rename to Kiss.Bff/Intern/NieuwsEnWerkinstructies/Features/SearchBerichtenController.cs index 50cfbee0c..dea2b304a 100644 --- a/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Controllers/SearchBerichtenController.cs +++ b/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Features/SearchBerichtenController.cs @@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; -namespace Kiss.Bff.NieuwsEnWerkinstructies.Controllers +namespace Kiss.Bff.NieuwsEnWerkinstructies.Features { [ApiController] public class SearchBerichtenController : ControllerBase diff --git a/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Controllers/SkillsController.cs b/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Features/SkillsController.cs similarity index 98% rename from Kiss.Bff/Intern/NieuwsEnWerkinstructies/Controllers/SkillsController.cs rename to Kiss.Bff/Intern/NieuwsEnWerkinstructies/Features/SkillsController.cs index 8525f6d95..358ddb74b 100644 --- a/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Controllers/SkillsController.cs +++ b/Kiss.Bff/Intern/NieuwsEnWerkinstructies/Features/SkillsController.cs @@ -5,7 +5,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; -namespace Kiss.Bff.NieuwsEnWerkinstructies.Controllers +namespace Kiss.Bff.NieuwsEnWerkinstructies.Features { [Route("api/[controller]")] [ApiController] From 0da98e6cfe4e80ea7c4dacefef39e8683c8e2972 Mon Sep 17 00:00:00 2001 From: mark stoker Date: Thu, 4 Apr 2024 12:43:49 +0200 Subject: [PATCH 13/17] required in modelbuilder ipv attribuut --- Kiss.Bff/Intern/Data/BeheerDbContext.cs | 8 +++++--- Kiss.Bff/Intern/Kanalen/Data/Entities/Kanaal.cs | 1 - 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Kiss.Bff/Intern/Data/BeheerDbContext.cs b/Kiss.Bff/Intern/Data/BeheerDbContext.cs index 53ee3f188..fa0b87f93 100644 --- a/Kiss.Bff/Intern/Data/BeheerDbContext.cs +++ b/Kiss.Bff/Intern/Data/BeheerDbContext.cs @@ -52,9 +52,11 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .Property(p => p.JsonVragen) .HasColumnType("json"); - modelBuilder.Entity() - .HasIndex(p => p.Naam) - .IsUnique(); + modelBuilder.Entity(k => { + k.HasIndex(p => p.Naam).IsUnique(); + k.Property(p => p.Naam).IsRequired(); + + }); } public DbSet Berichten { get; set; } = null!; diff --git a/Kiss.Bff/Intern/Kanalen/Data/Entities/Kanaal.cs b/Kiss.Bff/Intern/Kanalen/Data/Entities/Kanaal.cs index 7e8f5c7f6..54b30dc63 100644 --- a/Kiss.Bff/Intern/Kanalen/Data/Entities/Kanaal.cs +++ b/Kiss.Bff/Intern/Kanalen/Data/Entities/Kanaal.cs @@ -7,7 +7,6 @@ public class Kanaal public Guid Id { get; set; } public DateTimeOffset DateCreated { get; set; } public DateTimeOffset? DateUpdated { get; set; } - [Required] public string Naam { get; set; } = string.Empty; } } From a474994d3525c58402a2196829f8d040f6b4583f Mon Sep 17 00:00:00 2001 From: mark stoker Date: Thu, 4 Apr 2024 13:47:20 +0200 Subject: [PATCH 14/17] review fixes --- src/components/beheer/BeheerForm.vue | 50 ++++++------ src/features/Kanalen/KanalenOverzicht.vue | 76 ++++++++----------- src/features/Kanalen/service.ts | 6 ++ src/features/Kanalen/types.ts | 4 - src/features/contactmoment/service.ts | 38 +++++----- src/features/contactmoment/types.ts | 2 +- src/services/index.ts | 5 -- src/views/AfhandelingView.vue | 70 ++++++++++------- src/views/Beheer/Kanalen/KanaalBeheer.vue | 64 +++++++++------- src/views/Beheer/Links/LinkBeheer.vue | 8 +- .../GespreksresultaatBeheer.vue | 2 +- 11 files changed, 167 insertions(+), 158 deletions(-) delete mode 100644 src/features/Kanalen/types.ts diff --git a/src/components/beheer/BeheerForm.vue b/src/components/beheer/BeheerForm.vue index b32098aa7..782968a1e 100644 --- a/src/components/beheer/BeheerForm.vue +++ b/src/components/beheer/BeheerForm.vue @@ -3,7 +3,7 @@ - + @@ -18,30 +18,28 @@ - \ No newline at end of file diff --git a/src/features/Kanalen/KanalenOverzicht.vue b/src/features/Kanalen/KanalenOverzicht.vue index c647a9ecc..24fbaf5ff 100644 --- a/src/features/Kanalen/KanalenOverzicht.vue +++ b/src/features/Kanalen/KanalenOverzicht.vue @@ -6,44 +6,36 @@ message="Er ging iets mis. Probeer het later nog eens." /> - + diff --git a/src/views/Beheer/gespreksresultaten/GespreksresultaatBeheer.vue b/src/views/Beheer/gespreksresultaten/GespreksresultaatBeheer.vue index 8ecc289aa..51c0b8bba 100644 --- a/src/views/Beheer/gespreksresultaten/GespreksresultaatBeheer.vue +++ b/src/views/Beheer/gespreksresultaten/GespreksresultaatBeheer.vue @@ -19,7 +19,7 @@ /> -