Skip to content

Commit

Permalink
Merge pull request #108 from ConductionNL/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
remko48 authored Dec 17, 2024
2 parents 2483bc8 + df0ad41 commit 13b43c1
Show file tree
Hide file tree
Showing 60 changed files with 2,922 additions and 1,682 deletions.
50 changes: 26 additions & 24 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
@@ -1,60 +1,62 @@
<?php

return [
'resources' => [
'resources' => [
// Conform https://vng-realisatie.github.io/gemma-zaken/standaard/zaken/redoc-1.5.1
'zaken' => ['url' => 'api/zrc/zaken'],
'resultaten' => ['url' => 'api/zrc/resultaten'],
'rollen' => ['url' => 'api/zrc/rollen'],
'statussen' => ['url' => 'api/zrc/statussen'],
'zaakinformatieobjecten' => ['url' => 'api/zrc/zaakinformatieobjecten'],
'zaakobjecten' => ['url' => 'api/zrc/zaakobjecten'],
'zaakbesluiten' => ['url' => 'api/zrc/zaken/{zaak_uuid}/besluiten'],
'zaakeigenschappen' => ['url' => 'api/zrc/zaken/{zaak_uuid}/eigenschappen'],
'zaakaudittrail' => ['url' => 'api/zrc/zaken/{zaak_uuid}/audit_trail'],
'zaken' => ['url' => 'api/zrc/zaken'],
'resultaten' => ['url' => 'api/zrc/resultaten'],
'rollen' => ['url' => 'api/zrc/rollen'],
'statussen' => ['url' => 'api/zrc/statussen'],
'zaakinformatieobjecten' => ['url' => 'api/zrc/zaakinformatieobjecten'],
'zaakobjecten' => ['url' => 'api/zrc/zaakobjecten'],
'zaakbesluiten' => ['url' => 'api/zrc/zaken/{zaak_uuid}/besluiten'],
'zaakeigenschappen' => ['url' => 'api/zrc/zaken/{zaak_uuid}/eigenschappen'],
'zaakaudittrail' => ['url' => 'api/zrc/zaken/{zaak_uuid}/audit_trail'],
// Conform https://vng-realisatie.github.io/gemma-zaken/standaard/catalogi/redoc-1.3.1
'zaakTypen' => ['url' => 'api/ztc'],
'zaakTypen' => ['url' => 'api/ztc'],
// Conform https://vng-realisatie.github.io/gemma-zaken/standaard/documenten/redoc-1.5.0
'documenten' => ['url' => 'api/drc'],
'documenten' => ['url' => 'api/drc'],
// Conform https://vng-realisatie.github.io/gemma-zaken/standaard/besluiten/redoc-1.0.2
'besluiten' => ['url' => 'api/brc'],
'besluiten' => ['url' => 'api/brc'],
// Conform ???
'zaakTypen' => ['url' => 'api/ztc/zaaktypen'],
// Conform ???
'taken' => ['url' => 'api/taken'],
'klanten' => ['url' => 'api/klanten'],
'berichten' => ['url' => 'api/berichten'],
'zaakTypen' => ['url' => 'api/ztc/zaaktypen'],
// Conform ???
'taken' => ['url' => 'api/taken'],
'klanten' => ['url' => 'api/klanten'],
'berichten' => ['url' => 'api/berichten'],
'contactmomenten' => ['url' => 'api/contactmomenten'],
'medewerkers' => ['url' => 'api/medewerkers'],
],

],
'routes' => [
// Audit trail routes
['name' => 'zaken#getAuditTrail', 'url' => '/api/zaken/{id}/audit_trail', 'verb' => 'GET'],
['name' => 'klanten#getAuditTrail', 'url' => '/api/klanten/{id}/audit_trail', 'verb' => 'GET'],
['name' => 'berichten#getAuditTrail', 'url' => '/api/berichten/{id}/audit_trail', 'verb' => 'GET'],
['name' => 'taken#getAuditTrail', 'url' => '/api/taken/{id}/audit_trail', 'verb' => 'GET'],

// Overige klant routes
['name' => 'klanten#getContactmomenten', 'url' => '/api/klanten/{id}/contactmomenten', 'verb' => 'GET'],
['name' => 'klanten#getTaken', 'url' => '/api/klanten/{id}/taken', 'verb' => 'GET'],
['name' => 'klanten#getBerichten', 'url' => '/api/klanten/{id}/berichten', 'verb' => 'GET'],
['name' => 'klanten#getZaken', 'url' => '/api/klanten/{id}/zaken', 'verb' => 'GET'],
['name' => 'klanten#getZaken', 'url' => '/api/klanten/{id}/zaken', 'verb' => 'GET'],

// Page routes
['name' => 'dashboard#page', 'url' => '/', 'verb' => 'GET'],
['name' => 'configuration#index', 'url' => '/api/configuration', 'verb' => 'GET'],
['name' => 'configuration#create', 'url' => '/api/configuration', 'verb' => 'POST'],
['name' => 'zaken#page', 'url' => '/zaken', 'verb' => 'GET'],
['name' => 'rollen#page', 'url' => '/rollen', 'verb' => 'GET'],
['name' => 'statussen#page', 'url' => '/statussen', 'verb' => 'GET'],
['name' => 'zaakinformatieobjecten#page', 'url' => '/zaakinformatieobjecten', 'verb' => 'GET'],
['name' => 'zaakinformatieobjecten#page', 'url' => '/zaakinformatieobjecten', 'verb' => 'GET'],
['name' => 'zaakTypen#page','url' => '/zaak_typen', 'verb' => 'GET'],
['name' => 'taken#page','url' => '/taken', 'verb' => 'GET'],
['name' => 'klanten#page','url' => '/klanten', 'verb' => 'GET'],
['name' => 'berichten#index','url' => '/berichten', 'verb' => 'GET'],
// user Settings
['name' => 'settings#index','url' => '/settings', 'verb' => 'GET'],
['name' => 'settings#create', 'url' => '/settings', 'verb' => 'POST'],
// User
['name' => 'users#me', 'url' => '/me', 'verb' => 'GET'],
]
];
18 changes: 10 additions & 8 deletions css/dashboardWidgets.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/* import icons css file */
@import "../src/services/icons/icons.css";

.icon-zaken-widget {
background-image: url("../img/app-dark.svg");
filter: var(--background-invert-if-dark);
}

body.theme--dark .icon-zaken-widget {
background-image: url("../img/app.svg");
}

background-image: url("../img/app-dark.svg");
filter: var(--background-invert-if-dark);
}

body.theme--dark .icon-zaken-widget {
background-image: url("../img/app.svg");
}
76 changes: 76 additions & 0 deletions lib/Controller/UsersController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?php

namespace OCA\ZaakAfhandelApp\Controller;

use OCP\IAppConfig;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Http\JSONResponse;
use OCP\IRequest;
use OCP\IUserSession;

/**
* Class SettingsController
*
* Controller for handling settings-related operations in the OpenCatalogi app.
*/
class UsersController extends Controller
{

/**
* SettingsController constructor.
*
* @param string $appName The name of the app
* @param IAppConfig $config The app configuration
* @param IRequest $request The request object
*/
public function __construct(
$appName,
IRequest $request,
private readonly IAppConfig $config,
private readonly IUserSession $userSession,
) {
parent::__construct($appName, $request);
}

/**
* Gets info about the currently active/logged-in user.
*
* @NoAdminRequired
* @NoCSRFRequired
*
* @return JSONResponse Info about the current user.
*/
public function me(): JSONResponse
{
// Get the current user
$currentUser = $this->userSession->getUser();

try {
$data = [
'user' => [
'id' => $currentUser->getUID(),
'displayName' => $currentUser->getDisplayName(),
'email' => $currentUser->getEMailAddress(),
'systemEmail' => $currentUser->getSystemEMailAddress(),
'primaryEmail' => $currentUser->getPrimaryEMailAddress(),
'lastLogin' => $currentUser->getLastLogin(),
'quota' => $currentUser->getQuota(),
'home' => $currentUser->getHome(),
'backendClassName' => $currentUser->getBackendClassName(),
'avatarImage' => $currentUser->getAvatarImage(64),
'cloudId' => $currentUser->getCloudId(),
'isEnabled' => $currentUser->isEnabled(),
'canChangeDisplayName' => $currentUser->canChangeDisplayName(),
'canChangePassword' => $currentUser->canChangePassword(),
'canChangeAvatar' => $currentUser->canChangeAvatar(),
'managerUids' => $currentUser->getManagerUids(),
],
'medewerker' => 'placeholder-todo'
];
return new JSONResponse($data);
} catch (\Exception $e) {
return new JSONResponse(['error' => $e->getMessage()], 500);
}
}
}
4 changes: 3 additions & 1 deletion lib/Controller/ZaakTypenController.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,11 @@ public function update(string $id): JSONResponse
// Remove the 'id' field if it exists, as we're creating a new object
unset($data['id']);

$data['id'] = $id;

// Save the new catalog object
$object = $this->objectService->saveObject('zaaktypen', $data);

// Return the created object as a JSON response
return new JSONResponse($object);
}
Expand Down
3 changes: 1 addition & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/entities/medewerkers/medewerkers.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const mockMedewerkerData = (): TMedewerker[] => [
tussenvoegsel: 'de',
achternaam: 'Doe',
email: '[email protected]',
telefoonnummer: '0612345678',
},
]

Expand Down
4 changes: 3 additions & 1 deletion src/entities/medewerkers/medewerkers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ export class Medewerker implements TMedewerker {
public tussenvoegsel: string
public achternaam: string
public email: string
public telefoonnummer: string

constructor(source: TMedewerker) {
this.id = source.id || ''
this.voornaam = source.voornaam || ''
this.tussenvoegsel = source.tussenvoegsel || ''
this.achternaam = source.achternaam || ''
this.email = source.email || ''

this.telefoonnummer = source.telefoonnummer || ''
}

public validate(): SafeParseReturnType<TMedewerker, unknown> {
Expand All @@ -25,6 +26,7 @@ export class Medewerker implements TMedewerker {
tussenvoegsel: z.string(),
achternaam: z.string(),
email: z.string().email(),
telefoonnummer: z.string().min(1),
})

return schema.safeParse(this)
Expand Down
1 change: 1 addition & 0 deletions src/entities/medewerkers/medewerkers.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ export type TMedewerker = {
tussenvoegsel: string;
achternaam: string;
email: string;
telefoonnummer: string;
}
2 changes: 1 addition & 1 deletion src/entities/rol/rol.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export type TRol = {
omschrijving: string;
omschrijvingGeneriek: string;
url: string;
zaak: string;
zaak: string; // zaak id
betrokkene: string;
betrokkeneType: string;
afwijkendeNaamBetrokkene: string;
Expand Down
1 change: 1 addition & 0 deletions src/entities/taak/taak.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const mockTaakData = (): TTaak[] => [
toelichting: 'Deze taak omvat het uitvoeren van een gedetailleerde interne audit van de bedrijfsprocessen om te controleren of alle afdelingen voldoen aan de vastgestelde kwaliteitsnormen. De bevindingen worden gedocumenteerd en er worden aanbevelingen gedaan voor verbeteringen.',
actie: 'Voorbereiden van auditchecklist, uitvoeren van audits, rapporteren van bevindingen, aanbevelen van verbeteringen.',
klant: 'urn:uuid:6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b',
medewerker: 'urn:uuid:6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b',
},
]

Expand Down
4 changes: 3 additions & 1 deletion src/entities/taak/taak.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class Taak implements TTaak {
public toelichting: string
public actie: string
public klant: string

public medewerker: string
constructor(source: TTaak) {
this.id = source.id || ''
this.title = source.title || ''
Expand All @@ -26,6 +26,7 @@ export class Taak implements TTaak {
this.toelichting = source.toelichting || ''
this.actie = source.actie || ''
this.klant = source.klant || ''
this.medewerker = source.medewerker || ''
}

public validate(): SafeParseReturnType<TTaak, unknown> {
Expand All @@ -40,6 +41,7 @@ export class Taak implements TTaak {
toelichting: z.string(),
actie: z.string(),
klant: z.string(),
medewerker: z.string(),
})

return schema.safeParse(this)
Expand Down
3 changes: 2 additions & 1 deletion src/entities/taak/taak.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ export type TTaak = {
onderwerp: string;
toelichting: string;
actie: string;
klant: string;
klant: string
medewerker: string
}
1 change: 1 addition & 0 deletions src/entities/zaak/zaak.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const mockZaakData = (): TZaak[] => [
selectielijstklasse: 'http://example.com',
hoofdzaak: 'http://example.com',
klant: '15551d6f-44e3-43f3-a9d2-59e583c91eb0',
berichten: [],
},
]

Expand Down
3 changes: 3 additions & 0 deletions src/entities/zaak/zaak.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export class Zaak implements TZaak {
public selectielijstklasse: string
public hoofdzaak: string
public klant: string
public berichten: string[]

constructor(source: TZaak) {
this.id = source.id || ''
Expand All @@ -51,6 +52,7 @@ export class Zaak implements TZaak {
this.selectielijstklasse = source.selectielijstklasse || ''
this.hoofdzaak = source.hoofdzaak || ''
this.klant = source.klant || ''
this.berichten = source.berichten || []
}

public validate(): SafeParseReturnType<TZaak, unknown> {
Expand Down Expand Up @@ -78,6 +80,7 @@ export class Zaak implements TZaak {
selectielijstklasse: z.string(),
hoofdzaak: z.string(),
klant: z.string(),
berichten: z.array(z.string()),
})

return schema.safeParse(this)
Expand Down
1 change: 1 addition & 0 deletions src/entities/zaak/zaak.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ export type TZaak = {
selectielijstklasse: string;
hoofdzaak: string;
klant: string;
berichten: string[];
}
29 changes: 27 additions & 2 deletions src/entities/zaakTypen/zaakTypen.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,33 @@ import { TZaakType } from './zaakTypen.types'
export const mockZaakTypeData = (): TZaakType[] => [
{
id: '15551d6f-44e3-43f3-a9d2-59e583c91eb0',
name: 'Zaak 3',
summary: 'fsdfshgfhgf',
identificatie: 'Zaak 3',
omschrijving: 'fsdfshgfhgf',
omschrijvingGeneriek: 'fsdfshgfhgf',
vertrouwelijkheidaanduiding: 'fsdfshgfhgf',
doel: 'fsdfshgfhgf',
aanleiding: 'fsdfshgfhgf',
toelichting: 'fsdfshgfhgf',
indicatieInternOfExtern: 'fsdfshgfhgf',
handelingInitiator: 'fsdfshgfhgf',
onderwerp: 'fsdfshgfhgf',
handelingBehandelaar: 'fsdfshgfhgf',
doorlooptijd: 'fsdfshgfhgf',
servicenorm: 'fsdfshgfhgf',
opschortingEnAanhoudingMogelijk: 'fsdfshgfhgf',
verlengingMogelijk: 'fsdfshgfhgf',
verlengingstermijn: 'fsdfshgfhgf',
publicatieIndicatie: 'fsdfshgfhgf',
publicatietekst: 'fsdfshgfhgf',
productenOfDiensten: 'fsdfshgfhgf',
selectielijstProcestype: 'fsdfshgfhgf',
referentieproces: 'fsdfshgfhgf',
catalogus: 'fsdfshgfhgf',
beginGeldigheid: 'fsdfshgfhgf',
eindeGeldigheid: 'fsdfshgfhgf',
beginObject: 'fsdfshgfhgf',
eindeObject: 'fsdfshgfhgf',
versiedatum: 'fsdfshgfhgf',
},
]

Expand Down
Loading

0 comments on commit 13b43c1

Please sign in to comment.