From aee627c678d55e4072e6e731723f032534c09186 Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Wed, 23 Oct 2024 00:23:25 +0200 Subject: [PATCH] Getting the dialogs to actually work --- lib/Controller/BerichtenController.php | 15 +- lib/Controller/KlantenController.php | 14 +- lib/Controller/TakenController.php | 15 +- lib/Controller/ZaakTypenController.php | 15 +- lib/Controller/ZakenController.php | 15 +- lib/Service/ObjectService.php | 2 +- src/modals/Modals.vue | 3 + src/modals/berichten/AddBericht.vue | 183 ------------- src/modals/berichten/EditBericht.vue | 312 +++++++++++++--------- src/modals/klanten/AddKlant.vue | 196 -------------- src/modals/klanten/EditKlant.vue | 348 ++++++++++++++----------- src/modals/taken/AddTaak.vue | 147 ----------- src/modals/taken/EditTaak.vue | 194 ++++++++------ src/modals/zaakTypen/EditZaakType.vue | 14 +- src/modals/zaken/AddZaak.vue | 184 ------------- src/modals/zaken/EditZaak.vue | 215 +++++++++++++++ src/views/berichten/BerichtenIndex.vue | 2 +- src/views/berichten/BerichtenList.vue | 4 +- src/views/klanten/KlantenIndex.vue | 2 +- src/views/klanten/KlantenList.vue | 2 +- src/views/settings/Settings.vue | 8 + src/views/taken/TakenIndex.vue | 2 +- src/views/taken/TakenList.vue | 2 +- src/views/zaken/ZakenIndex.vue | 2 +- 24 files changed, 759 insertions(+), 1137 deletions(-) delete mode 100644 src/modals/berichten/AddBericht.vue delete mode 100644 src/modals/klanten/AddKlant.vue delete mode 100644 src/modals/taken/AddTaak.vue delete mode 100644 src/modals/zaken/AddZaak.vue create mode 100644 src/modals/zaken/EditZaak.vue diff --git a/lib/Controller/BerichtenController.php b/lib/Controller/BerichtenController.php index 80e3679..1b6dba2 100644 --- a/lib/Controller/BerichtenController.php +++ b/lib/Controller/BerichtenController.php @@ -2,12 +2,9 @@ namespace OCA\ZaakAfhandelApp\Controller; -use GuzzleHttp\Client; -use OCA\ZaakAfhandelApp\Service\CallService; +use OCA\ZaakAfhandelApp\Service\ObjectService; use OCP\AppFramework\Controller; -use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\JSONResponse; -use OCA\ZaakAfhandelApp\Service\ObjectService; use OCP\IRequest; class BerichtenController extends Controller @@ -30,7 +27,7 @@ public function __construct( * * @return JSONResponse */ - public function index(CallService $callService): JSONResponse + public function index(): JSONResponse { // Retrieve all request parameters $requestParams = $this->request->getParams(); @@ -50,7 +47,7 @@ public function index(CallService $callService): JSONResponse * * @return JSONResponse */ - public function show(string $id, CallService $callService): JSONResponse + public function show(string $id): JSONResponse { // Fetch the catalog object by its ID $object = $this->objectService->getObject('berichten', $id); @@ -68,7 +65,7 @@ public function show(string $id, CallService $callService): JSONResponse * * @return JSONResponse */ - public function create(CallService $callService): JSONResponse + public function create(): JSONResponse { // Get all parameters from the request $data = $this->request->getParams(); @@ -91,7 +88,7 @@ public function create(CallService $callService): JSONResponse * * @return JSONResponse */ - public function update(string $id, CallService $callService): JSONResponse + public function update(string $id): JSONResponse { // Get all parameters from the request $data = $this->request->getParams(); @@ -114,7 +111,7 @@ public function update(string $id, CallService $callService): JSONResponse * * @return JSONResponse */ - public function destroy(string $id, CallService $callService): JSONResponse + public function destroy(string $id): JSONResponse { // Delete the catalog object $result = $this->objectService->deleteObject('berichten', $id); diff --git a/lib/Controller/KlantenController.php b/lib/Controller/KlantenController.php index 7666369..a8363eb 100644 --- a/lib/Controller/KlantenController.php +++ b/lib/Controller/KlantenController.php @@ -2,11 +2,9 @@ namespace OCA\ZaakAfhandelApp\Controller; -use GuzzleHttp\Client; +use OCA\ZaakAfhandelApp\Service\ObjectService; use OCP\AppFramework\Controller; -use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\JSONResponse; -use OCA\ZaakAfhandelApp\Service\ObjectService; use OCP\IRequest; class KlantenController extends Controller @@ -31,7 +29,7 @@ public function __construct * * @return JSONResponse */ - public function index(CallService $klantenService): JSONResponse + public function index(): JSONResponse { // Retrieve all request parameters $requestParams = $this->request->getParams(); @@ -51,7 +49,7 @@ public function index(CallService $klantenService): JSONResponse * * @return JSONResponse */ - public function show(string $id, CallService $klantenService): JSONResponse + public function show(string $id): JSONResponse { // Fetch the catalog object by its ID $object = $this->objectService->getObject('klanten', $id); @@ -69,7 +67,7 @@ public function show(string $id, CallService $klantenService): JSONResponse * * @return JSONResponse */ - public function create(CallService $callService): JSONResponse + public function create(): JSONResponse { // Get all parameters from the request $data = $this->request->getParams(); @@ -92,7 +90,7 @@ public function create(CallService $callService): JSONResponse * * @return JSONResponse */ - public function update(string $id, CallService $callService): JSONResponse + public function update(string $id): JSONResponse { // Get all parameters from the request $data = $this->request->getParams(); @@ -115,7 +113,7 @@ public function update(string $id, CallService $callService): JSONResponse * * @return JSONResponse */ - public function destroy(string $id, CallService $callService): JSONResponse + public function destroy(string $id): JSONResponse { // Delete the catalog object $result = $this->objectService->deleteObject('klanten', $id); diff --git a/lib/Controller/TakenController.php b/lib/Controller/TakenController.php index 62e8ca4..6d58e69 100644 --- a/lib/Controller/TakenController.php +++ b/lib/Controller/TakenController.php @@ -2,12 +2,9 @@ namespace OCA\ZaakAfhandelApp\Controller; -use GuzzleHttp\Client; -use OCA\ZaakAfhandelApp\Service\CallService; +use OCA\ZaakAfhandelApp\Service\ObjectService; use OCP\AppFramework\Controller; -use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\JSONResponse; -use OCA\ZaakAfhandelApp\Service\ObjectService; use OCP\IRequest; class TakenController extends Controller @@ -29,7 +26,7 @@ public function __construct( * * @return JSONResponse */ - public function index(CallService $klantenService): JSONResponse + public function index(): JSONResponse { // Retrieve all request parameters $requestParams = $this->request->getParams(); @@ -49,7 +46,7 @@ public function index(CallService $klantenService): JSONResponse * * @return JSONResponse */ - public function show(string $id, CallService $klantenService): JSONResponse + public function show(string $id): JSONResponse { // Fetch the catalog object by its ID $object = $this->objectService->getObject('taken', $id); @@ -67,7 +64,7 @@ public function show(string $id, CallService $klantenService): JSONResponse * * @return JSONResponse */ - public function create(CallService $callService): JSONResponse + public function create(): JSONResponse { // Get all parameters from the request $data = $this->request->getParams(); @@ -90,7 +87,7 @@ public function create(CallService $callService): JSONResponse * * @return JSONResponse */ - public function update(string $id, CallService $callService): JSONResponse + public function update(string $id): JSONResponse { // Get all parameters from the request $data = $this->request->getParams(); @@ -113,7 +110,7 @@ public function update(string $id, CallService $callService): JSONResponse * * @return JSONResponse */ - public function destroy(string $id, CallService $callService): JSONResponse + public function destroy(string $id): JSONResponse { // Delete the catalog object $result = $this->objectService->deleteObject('taken', $id); diff --git a/lib/Controller/ZaakTypenController.php b/lib/Controller/ZaakTypenController.php index d300f5a..41451f2 100644 --- a/lib/Controller/ZaakTypenController.php +++ b/lib/Controller/ZaakTypenController.php @@ -2,12 +2,9 @@ namespace OCA\ZaakAfhandelApp\Controller; -use GuzzleHttp\Client; -use OCA\ZaakAfhandelApp\Service\CallService; +use OCA\ZaakAfhandelApp\Service\ObjectService; use OCP\AppFramework\Controller; -use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\JSONResponse; -use OCA\ZaakAfhandelApp\Service\ObjectService; use OCP\IRequest; class ZaakTypenController extends Controller @@ -30,7 +27,7 @@ public function __construct( * * @return JSONResponse */ - public function index(CallService $callService): JSONResponse + public function index(): JSONResponse { // Retrieve all request parameters $requestParams = $this->request->getParams(); @@ -50,7 +47,7 @@ public function index(CallService $callService): JSONResponse * * @return JSONResponse */ - public function show(string $id, CallService $callService): JSONResponse + public function show(string $id): JSONResponse { // Fetch the catalog object by its ID $object = $this->objectService->getObject('zaaktypen', $id); @@ -68,7 +65,7 @@ public function show(string $id, CallService $callService): JSONResponse * * @return JSONResponse */ - public function create(CallService $callService): JSONResponse + public function create(): JSONResponse { // Get all parameters from the request $data = $this->request->getParams(); @@ -91,7 +88,7 @@ public function create(CallService $callService): JSONResponse * * @return JSONResponse */ - public function update(string $id, CallService $callService): JSONResponse + public function update(string $id): JSONResponse { // Get all parameters from the request $data = $this->request->getParams(); @@ -114,7 +111,7 @@ public function update(string $id, CallService $callService): JSONResponse * * @return JSONResponse */ - public function destroy(string $id, CallService $callService): JSONResponse + public function destroy(string $id): JSONResponse { // Delete the catalog object $result = $this->objectService->deleteObject('zaaktypen', $id); diff --git a/lib/Controller/ZakenController.php b/lib/Controller/ZakenController.php index 5939eeb..57ee6ee 100644 --- a/lib/Controller/ZakenController.php +++ b/lib/Controller/ZakenController.php @@ -2,12 +2,9 @@ namespace OCA\ZaakAfhandelApp\Controller; -use GuzzleHttp\Client; -use OCA\ZaakAfhandelApp\Service\CallService; +use OCA\ZaakAfhandelApp\Service\ObjectService; use OCP\AppFramework\Controller; -use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\JSONResponse; -use OCA\ZaakAfhandelApp\Service\ObjectService; use OCP\IRequest; /** @@ -32,7 +29,7 @@ public function __construct( * * @return JSONResponse */ - public function index(CallService $callService): JSONResponse + public function index(): JSONResponse { // Retrieve all request parameters $requestParams = $this->request->getParams(); @@ -52,7 +49,7 @@ public function index(CallService $callService): JSONResponse * * @return JSONResponse */ - public function show(string $id, CallService $callService): JSONResponse + public function show(string $id): JSONResponse { // Fetch the catalog object by its ID $object = $this->objectService->getObject('zaken', $id); @@ -70,7 +67,7 @@ public function show(string $id, CallService $callService): JSONResponse * * @return JSONResponse */ - public function create(CallService $callService): JSONResponse + public function create(): JSONResponse { // Get all parameters from the request $data = $this->request->getParams(); @@ -93,7 +90,7 @@ public function create(CallService $callService): JSONResponse * * @return JSONResponse */ - public function update(string $id, CallService $callService): JSONResponse + public function update(string $id): JSONResponse { // Get all parameters from the request $data = $this->request->getParams(); @@ -116,7 +113,7 @@ public function update(string $id, CallService $callService): JSONResponse * * @return JSONResponse */ - public function destroy(string $id, CallService $callService): JSONResponse + public function destroy(string $id): JSONResponse { // Delete the catalog object $result = $this->objectService->deleteObject('zaken', $id); diff --git a/lib/Service/ObjectService.php b/lib/Service/ObjectService.php index 925212a..1674c9c 100644 --- a/lib/Service/ObjectService.php +++ b/lib/Service/ObjectService.php @@ -36,7 +36,7 @@ public function __construct( private readonly IAppManager $appManager, private readonly IAppConfig $config, ) { - $this->appName = 'opencatalogi'; + $this->appName = 'zaakafhandelapp'; } /** diff --git a/src/modals/Modals.vue b/src/modals/Modals.vue index c1389fd..1613d36 100644 --- a/src/modals/Modals.vue +++ b/src/modals/Modals.vue @@ -10,6 +10,7 @@ import { navigationStore } from '../store/store.js' + @@ -19,6 +20,7 @@ import EditKlant from './klanten/EditKlant.vue' import EditBericht from './berichten/EditBericht.vue' import EditTaak from './taken/EditTaak.vue' import EditRol from './rollen/EditRol.vue' +import EditZaak from './zaken/EditZaak.vue' export default { name: 'Modals', @@ -28,6 +30,7 @@ export default { EditBericht, EditTaak, EditRol, + EditZaak }, } diff --git a/src/modals/berichten/AddBericht.vue b/src/modals/berichten/AddBericht.vue deleted file mode 100644 index 4962ad3..0000000 --- a/src/modals/berichten/AddBericht.vue +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - diff --git a/src/modals/berichten/EditBericht.vue b/src/modals/berichten/EditBericht.vue index ff337a6..c87a779 100644 --- a/src/modals/berichten/EditBericht.vue +++ b/src/modals/berichten/EditBericht.vue @@ -1,171 +1,229 @@ - - - - - - diff --git a/src/modals/klanten/EditKlant.vue b/src/modals/klanten/EditKlant.vue index 906602d..6b78d92 100644 --- a/src/modals/klanten/EditKlant.vue +++ b/src/modals/klanten/EditKlant.vue @@ -1,205 +1,241 @@ - - - - diff --git a/src/modals/taken/EditTaak.vue b/src/modals/taken/EditTaak.vue index 563b34d..cba355c 100644 --- a/src/modals/taken/EditTaak.vue +++ b/src/modals/taken/EditTaak.vue @@ -1,80 +1,97 @@ + - - - - - - diff --git a/src/modals/zaken/EditZaak.vue b/src/modals/zaken/EditZaak.vue new file mode 100644 index 0000000..70cc2c2 --- /dev/null +++ b/src/modals/zaken/EditZaak.vue @@ -0,0 +1,215 @@ + + + + + + + diff --git a/src/views/berichten/BerichtenIndex.vue b/src/views/berichten/BerichtenIndex.vue index 23fb17f..64ab8a4 100644 --- a/src/views/berichten/BerichtenIndex.vue +++ b/src/views/berichten/BerichtenIndex.vue @@ -16,7 +16,7 @@ import { navigationStore, berichtStore } from '../../store/store.js' diff --git a/src/views/berichten/BerichtenList.vue b/src/views/berichten/BerichtenList.vue index 91b6bdb..d9854c7 100644 --- a/src/views/berichten/BerichtenList.vue +++ b/src/views/berichten/BerichtenList.vue @@ -22,7 +22,7 @@ import { navigationStore, berichtStore } from '../../store/store.js' Ververs - + @@ -38,7 +38,7 @@ import { navigationStore, berichtStore } from '../../store/store.js' :details="'1h'" :counter-number="44" :force-display-actions="true" - @click="navigationStore.setBerichtItem(bericht)"> + @click="berichtStore.setBerichtItem(bericht)"> diff --git a/src/views/klanten/KlantenList.vue b/src/views/klanten/KlantenList.vue index 63c0d12..7e2970b 100644 --- a/src/views/klanten/KlantenList.vue +++ b/src/views/klanten/KlantenList.vue @@ -22,7 +22,7 @@ import { navigationStore, klantStore } from '../../store/store.js' Ververs - + diff --git a/src/views/settings/Settings.vue b/src/views/settings/Settings.vue index 155f8e2..9403741 100644 --- a/src/views/settings/Settings.vue +++ b/src/views/settings/Settings.vue @@ -191,6 +191,13 @@ export default { availableSchemas: [], loading: false, }, + zaaktypen: { + selectedSource: '', + selectedRegister: '', + selectedSchema: '', + availableSchemas: [], + loading: false, + }, labelOptions: { options: [ { label: 'Internal', value: 'internal' }, @@ -208,6 +215,7 @@ export default { { id: 'organisaties', title: 'Organisaties', description: 'Configureer de opslag voor organisatiegegevens', helpLink: 'https://example.com/help/organisaties' }, { id: 'personen', title: 'Personen', description: 'Configureer de opslag voor persoonsgegevens', helpLink: 'https://example.com/help/personen' }, { id: 'zaken', title: 'Zaken', description: 'Configureer de opslag voor zaken', helpLink: 'https://example.com/help/zaken' }, + { id: 'zaaktypen', title: 'Zaaktypen', description: 'Configureer de opslag voor zaaktypen', helpLink: 'https://example.com/help/zaaktypen' }, ], } }, diff --git a/src/views/taken/TakenIndex.vue b/src/views/taken/TakenIndex.vue index e3ca7ad..04f421e 100644 --- a/src/views/taken/TakenIndex.vue +++ b/src/views/taken/TakenIndex.vue @@ -16,7 +16,7 @@ import { navigationStore, taakStore } from '../../store/store.js' diff --git a/src/views/taken/TakenList.vue b/src/views/taken/TakenList.vue index ce9eed1..579500c 100644 --- a/src/views/taken/TakenList.vue +++ b/src/views/taken/TakenList.vue @@ -22,7 +22,7 @@ import { navigationStore, taakStore } from '../../store/store.js' Ververs - + diff --git a/src/views/zaken/ZakenIndex.vue b/src/views/zaken/ZakenIndex.vue index c5e2604..1230838 100644 --- a/src/views/zaken/ZakenIndex.vue +++ b/src/views/zaken/ZakenIndex.vue @@ -16,7 +16,7 @@ import { navigationStore, zaakStore } from '../../store/store.js'