Skip to content

Commit 4904290

Browse files
author
Mike van den Hoek
committed
(feat): implement mijn taken
1 parent c0434a4 commit 4904290

32 files changed

Lines changed: 1817 additions & 2230 deletions

config/container.php

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@
8686
'rx.client_secret' => function (Container $container) {
8787
return $container->make('gf.setting', ['-rx-mission-client-secret']);
8888
},
89+
'rx.mijn_taken_uri' => function (Container $container) {
90+
return $container->make('gf.setting', ['-rx-mission-mijn-taken-url']);
91+
},
92+
'rx.mijn_taken_api_key' => function (Container $container) {
93+
return $container->make('gf.setting', ['-rx-mission-mijn-taken-api-key']);
94+
},
8995
'rx.authenticator' => function (Container $container) {
9096
return $container->get(Clients\RxMission\Authenticator::class);
9197
},
@@ -110,6 +116,12 @@
110116
'xxllnc.client_secret' => function (Container $container) {
111117
return $container->make('gf.setting', ['-xxllnc-client-secret']);
112118
},
119+
'xxllnc.mijn_taken_uri' => function (Container $container) {
120+
return $container->make('gf.setting', ['-xxllnc-mijn-taken-url']);
121+
},
122+
'xxllnc.mijn_taken_api_key' => function (Container $container) {
123+
return $container->make('gf.setting', ['-xxllnc-mijn-taken-api-key']);
124+
},
113125
'xxllnc.authenticator' => function (Container $container) {
114126
return $container->get(Clients\Xxllnc\Authenticator::class);
115127
},
@@ -199,6 +211,7 @@
199211
$container->get('rx.zaken_uri'),
200212
$container->get('rx.catalogi_uri'),
201213
$container->get('rx.documenten_uri'),
214+
$container->get('rx.mijn_taken_uri')
202215
);
203216
},
204217

@@ -211,6 +224,7 @@
211224
$container->get('xxllnc.zaken_uri'),
212225
$container->get('xxllnc.catalogi_uri'),
213226
$container->get('xxllnc.documenten_uri'),
227+
$container->get('xxllnc.mijn_taken_uri')
214228
);
215229
},
216230

@@ -246,14 +260,16 @@
246260
Clients\RxMission\Authenticator::class => function (Container $container) {
247261
return new Clients\RxMission\Authenticator(
248262
$container->get('rx.client_id'),
249-
$container->get('rx.client_secret')
263+
$container->get('rx.client_secret'),
264+
$container->get('rx.mijn_taken_api_key')
250265
);
251266
},
252267

253268
Clients\Xxllnc\Authenticator::class => function (Container $container) {
254269
return new Clients\Xxllnc\Authenticator(
255270
$container->get('xxllnc.client_id'),
256-
$container->get('xxllnc.client_secret')
271+
$container->get('xxllnc.client_secret'),
272+
$container->get('xxllnc.mijn_taken_api_key')
257273
);
258274
},
259275

resources/dist/build/editor.js

Lines changed: 56 additions & 391 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/dist/build/zaak-frontend.js

Lines changed: 78 additions & 1802 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/dist/build/zaak-styles.css

Lines changed: 753 additions & 1 deletion
Large diffs are not rendered by default.
Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,49 @@
1+
/*
2+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
3+
* This devtool is neither made for production nor for readable output files.
4+
* It uses "eval()" calls to create a separate source file in the browser devtools.
5+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
6+
* or disable the default devtool with "devtool: false".
7+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
8+
*/
19
/******/ (() => { // webpackBootstrap
210
/******/ "use strict";
3-
var __webpack_exports__ = {};
4-
// extracted by mini-css-extract-plugin
11+
/******/ var __webpack_modules__ = ({
512

13+
/***/ "./resources/scss/style.scss":
14+
/*!***********************************!*\
15+
!*** ./resources/scss/style.scss ***!
16+
\***********************************/
17+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
18+
19+
eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n\n//# sourceURL=webpack://owc-gravityforms-zaaksysteem/./resources/scss/style.scss?");
20+
21+
/***/ })
22+
23+
/******/ });
24+
/************************************************************************/
25+
/******/ // The require scope
26+
/******/ var __webpack_require__ = {};
27+
/******/
28+
/************************************************************************/
29+
/******/ /* webpack/runtime/make namespace object */
30+
/******/ (() => {
31+
/******/ // define __esModule on exports
32+
/******/ __webpack_require__.r = (exports) => {
33+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
34+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
35+
/******/ }
36+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
37+
/******/ };
38+
/******/ })();
39+
/******/
40+
/************************************************************************/
41+
/******/
42+
/******/ // startup
43+
/******/ // Load entry module and return exports
44+
/******/ // This entry module can't be inlined because the eval devtool is used.
45+
/******/ var __webpack_exports__ = {};
46+
/******/ __webpack_modules__["./resources/scss/style.scss"](0, __webpack_exports__, __webpack_require__);
47+
/******/
648
/******/ })()
749
;

resources/js/editor/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
import "./register-blocks";
2-
import "./mijn-zaken";
2+
import "./mijn-zaken";
3+
import "./mijn-taken";

resources/js/editor/mijn-taken.js

Lines changed: 261 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,261 @@
1+
const { registerBlockType } = wp.blocks;
2+
const { serverSideRender: ServerSideRender } = wp;
3+
4+
const {
5+
useBlockProps,
6+
InspectorControls,
7+
} = wp.blockEditor;
8+
9+
const {
10+
Panel,
11+
PanelBody,
12+
SelectControl,
13+
RangeControl,
14+
} = wp.components;
15+
16+
const { Fragment } = wp.element;
17+
18+
registerBlockType( 'owc/mijn-taken', {
19+
apiVersion: 2,
20+
title: 'Mijn Taken',
21+
category: 'common',
22+
attributes: {
23+
zaakClient: { type: 'string', default: 'openzaak' },
24+
view: { type: 'string', default: 'default' },
25+
numberOfItems: { type: 'number', default: 2 },
26+
},
27+
edit: ( { attributes, setAttributes } ) => {
28+
const blockProps = useBlockProps();
29+
const { zaakClient } = attributes;
30+
31+
return (
32+
<div { ...blockProps }>
33+
<InspectorControls>
34+
<Panel>
35+
<PanelBody title="Zaaksysteem" initialOpen={ false }>
36+
<p>
37+
Selecteer het zaaksysteem waaruit de taken
38+
opgehaald moeten worden.
39+
</p>
40+
<SelectControl
41+
label="Zaaksysteem"
42+
value={ zaakClient }
43+
options={ [
44+
{ label: 'OpenZaak', value: 'openzaak' },
45+
{
46+
label: 'Decos JOIN',
47+
value: 'decos-join',
48+
},
49+
{
50+
label: 'Rx.Mission',
51+
value: 'rx-mission',
52+
},
53+
{ label: 'xxllnc', value: 'xxllnc' },
54+
{ label: 'Procura', value: 'procura' },
55+
] }
56+
onChange={ ( newzaakClient ) =>
57+
setAttributes( {
58+
zaakClient: newzaakClient,
59+
} )
60+
}
61+
/>
62+
</PanelBody>
63+
{ attributes.view === 'current' && (
64+
<PanelBody>
65+
<RangeControl
66+
min={ 1 }
67+
max={ 20 }
68+
label="Aantal"
69+
help="Het aantal taken dat getoond moeten worden."
70+
value={ attributes.numberOfItems }
71+
onChange={ ( value ) =>
72+
setAttributes( {
73+
numberOfItems: value,
74+
} )
75+
}
76+
/>
77+
</PanelBody>
78+
) }
79+
<PanelBody title="Weergave" initialOpen={ false }>
80+
<SelectControl
81+
label="Selecteer de weergave van de taken"
82+
value={ attributes.view }
83+
options={ [
84+
{
85+
label: 'Standaard',
86+
value: 'default',
87+
},
88+
{
89+
label: 'Lopende Zaken',
90+
value: 'current',
91+
},
92+
] }
93+
onChange={ ( newView ) =>
94+
setAttributes( { view: newView } )
95+
}
96+
/>
97+
</PanelBody>
98+
</Panel>
99+
</InspectorControls>
100+
101+
{ attributes.view === 'default' ? (
102+
<p>Standaardweergave</p>
103+
) : (
104+
<>
105+
<ul
106+
className="zaak-tabs | nav nav-tabs"
107+
id="zaak-tabs"
108+
role="tablist"
109+
>
110+
<li className="nav-item" role="presentation">
111+
<button className="zaak-tabs-link | nav-link active">
112+
Lopende taken
113+
</button>
114+
</li>
115+
<li className="nav-item" role="presentation">
116+
<button className="zaak-tabs-link | nav-link">
117+
Afgeronde taken
118+
</button>
119+
</li>
120+
</ul>
121+
122+
<div className="tab-content" id="myTabContent">
123+
<div className="tab-pane fade show active">
124+
<div className="zaak-card-wrapper">
125+
<div className="zaak-card">
126+
<svg
127+
className="zaak-card-svg"
128+
width="385"
129+
height="200"
130+
viewBox="0 0 385 200"
131+
fill="#F1F1F1"
132+
xmlns="http://www.w3.org/2000/svg"
133+
preserveAspectRatio="none"
134+
>
135+
<path d="M260.532 17.39L249.736 1.32659C249.179 0.497369 248.246 0 247.246 0H3C1.34315 0 0 1.34314 0 3V197C0 198.657 1.34315 200 3.00001 200H381.485C383.142 200 384.485 198.657 384.485 197V109.358V21.7166C384.485 20.0597 383.142 18.7166 381.485 18.7166H263.022C262.023 18.7166 261.089 18.2192 260.532 17.39Z" />
136+
</svg>
137+
<h2 className="zaak-card-title">
138+
Aanvragen uittreksel BRP
139+
</h2>
140+
<div className="zaak-card-footer">
141+
<div className="zaak-card-date">
142+
12 december 2023
143+
</div>
144+
<div className="zaak-card-tag">
145+
Dummy content
146+
</div>
147+
<svg
148+
className="zaak-card-arrow"
149+
width="24"
150+
height="24"
151+
viewBox="0 0 24 24"
152+
xmlns="http://www.w3.org/2000/svg"
153+
>
154+
<path d="M12.2929 5.29289C12.6834 4.90237 13.3166 4.90237 13.7071 5.29289L19.7071 11.2929C19.8946 11.4804 20 11.7348 20 12C20 12.2652 19.8946 12.5196 19.7071 12.7071L13.7071 18.7071C13.3166 19.0976 12.6834 19.0976 12.2929 18.7071C11.9024 18.3166 11.9024 17.6834 12.2929 17.2929L16.5858 13L5 13C4.44772 13 4 12.5523 4 12C4 11.4477 4.44772 11 5 11L16.5858 11L12.2929 6.70711C11.9024 6.31658 11.9024 5.68342 12.2929 5.29289Z" />
155+
</svg>
156+
</div>
157+
</div>
158+
159+
<div className="zaak-card">
160+
<svg
161+
className="zaak-card-svg"
162+
width="385"
163+
height="200"
164+
viewBox="0 0 385 200"
165+
fill="#F1F1F1"
166+
xmlns="http://www.w3.org/2000/svg"
167+
preserveAspectRatio="none"
168+
>
169+
<path d="M260.532 17.39L249.736 1.32659C249.179 0.497369 248.246 0 247.246 0H3C1.34315 0 0 1.34314 0 3V197C0 198.657 1.34315 200 3.00001 200H381.485C383.142 200 384.485 198.657 384.485 197V109.358V21.7166C384.485 20.0597 383.142 18.7166 381.485 18.7166H263.022C262.023 18.7166 261.089 18.2192 260.532 17.39Z" />
170+
</svg>
171+
<h2 className="zaak-card-title">
172+
Aanmelden straatfeest
173+
</h2>
174+
<div className="zaak-card-footer">
175+
<div className="zaak-card-date">
176+
15 oktober 2023
177+
</div>
178+
<svg
179+
className="zaak-card-arrow"
180+
width="24"
181+
height="24"
182+
viewBox="0 0 24 24"
183+
xmlns="http://www.w3.org/2000/svg"
184+
>
185+
<path d="M12.2929 5.29289C12.6834 4.90237 13.3166 4.90237 13.7071 5.29289L19.7071 11.2929C19.8946 11.4804 20 11.7348 20 12C20 12.2652 19.8946 12.5196 19.7071 12.7071L13.7071 18.7071C13.3166 19.0976 12.6834 19.0976 12.2929 18.7071C11.9024 18.3166 11.9024 17.6834 12.2929 17.2929L16.5858 13L5 13C4.44772 13 4 12.5523 4 12C4 11.4477 4.44772 11 5 11L16.5858 11L12.2929 6.70711C11.9024 6.31658 11.9024 5.68342 12.2929 5.29289Z" />
186+
</svg>
187+
</div>
188+
</div>
189+
<div className="zaak-card">
190+
<svg
191+
className="zaak-card-svg"
192+
width="385"
193+
height="200"
194+
viewBox="0 0 385 200"
195+
fill="#F1F1F1"
196+
xmlns="http://www.w3.org/2000/svg"
197+
preserveAspectRatio="none"
198+
>
199+
<path d="M260.532 17.39L249.736 1.32659C249.179 0.497369 248.246 0 247.246 0H3C1.34315 0 0 1.34314 0 3V197C0 198.657 1.34315 200 3.00001 200H381.485C383.142 200 384.485 198.657 384.485 197V109.358V21.7166C384.485 20.0597 383.142 18.7166 381.485 18.7166H263.022C262.023 18.7166 261.089 18.2192 260.532 17.39Z" />
200+
</svg>
201+
<h2 className="zaak-card-title">
202+
Aanvraag rijbewijs
203+
</h2>
204+
<div className="zaak-card-footer">
205+
<div className="zaak-card-date">
206+
20 januari 2023
207+
</div>
208+
<svg
209+
className="zaak-card-arrow"
210+
width="24"
211+
height="24"
212+
viewBox="0 0 24 24"
213+
xmlns="http://www.w3.org/2000/svg"
214+
>
215+
<path d="M12.2929 5.29289C12.6834 4.90237 13.3166 4.90237 13.7071 5.29289L19.7071 11.2929C19.8946 11.4804 20 11.7348 20 12C20 12.2652 19.8946 12.5196 19.7071 12.7071L13.7071 18.7071C13.3166 19.0976 12.6834 19.0976 12.2929 18.7071C11.9024 18.3166 11.9024 17.6834 12.2929 17.2929L16.5858 13L5 13C4.44772 13 4 12.5523 4 12C4 11.4477 4.44772 11 5 11L16.5858 11L12.2929 6.70711C11.9024 6.31658 11.9024 5.68342 12.2929 5.29289Z" />
216+
</svg>
217+
</div>
218+
</div>
219+
220+
<div className="zaak-card">
221+
<svg
222+
className="zaak-card-svg"
223+
width="385"
224+
height="200"
225+
viewBox="0 0 385 200"
226+
fill="#F1F1F1"
227+
xmlns="http://www.w3.org/2000/svg"
228+
preserveAspectRatio="none"
229+
>
230+
<path d="M260.532 17.39L249.736 1.32659C249.179 0.497369 248.246 0 247.246 0H3C1.34315 0 0 1.34314 0 3V197C0 198.657 1.34315 200 3.00001 200H381.485C383.142 200 384.485 198.657 384.485 197V109.358V21.7166C384.485 20.0597 383.142 18.7166 381.485 18.7166H263.022C262.023 18.7166 261.089 18.2192 260.532 17.39Z" />
231+
</svg>
232+
<h2 className="zaak-card-title">
233+
Aanvragen leefbaarheidsbudget
234+
</h2>
235+
<div className="zaak-card-footer">
236+
<div className="zaak-card-date">
237+
11 januari 2023
238+
</div>
239+
<svg
240+
className="zaak-card-arrow"
241+
width="24"
242+
height="24"
243+
viewBox="0 0 24 24"
244+
xmlns="http://www.w3.org/2000/svg"
245+
>
246+
<path d="M12.2929 5.29289C12.6834 4.90237 13.3166 4.90237 13.7071 5.29289L19.7071 11.2929C19.8946 11.4804 20 11.7348 20 12C20 12.2652 19.8946 12.5196 19.7071 12.7071L13.7071 18.7071C13.3166 19.0976 12.6834 19.0976 12.2929 18.7071C11.9024 18.3166 11.9024 17.6834 12.2929 17.2929L16.5858 13L5 13C4.44772 13 4 12.5523 4 12C4 11.4477 4.44772 11 5 11L16.5858 11L12.2929 6.70711C11.9024 6.31658 11.9024 5.68342 12.2929 5.29289Z" />
247+
</svg>
248+
</div>
249+
</div>
250+
</div>
251+
</div>
252+
</div>
253+
</>
254+
) }
255+
</div>
256+
);
257+
},
258+
save: ( { className } ) => {
259+
return <section className={ className }></section>;
260+
},
261+
} );

resources/js/editor/register-blocks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ registerBlockType("owc/gravityforms-zaaksysteem", {
88
return <ServerSideRender block="owc/gravityforms-zaaksysteem" />;
99
},
1010
save: () => () => null,
11-
});
11+
});

0 commit comments

Comments
 (0)