Skip to content

Commit

Permalink
Merge branch 'main' into MIJN-8175-feature/Parkeren-evs-aansluiting
Browse files Browse the repository at this point in the history
  • Loading branch information
OscarBakker authored Nov 7, 2024
2 parents b7e9764 + 9c5e69a commit a6752a9
Show file tree
Hide file tree
Showing 62 changed files with 1,890 additions and 886 deletions.
3 changes: 3 additions & 0 deletions .env.local.template
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ REACT_APP_MONITORING_CONNECTION_STRING
BFF_SERVER_CLIENT_CERT
BFF_SERVER_CLIENT_KEY

# DB Enabled?
BFF_DB_ENABLED=true

# PG Database
PGHOST=
PGUSER=
Expand Down
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export default [
detectObjects: false,
},
],
'no-undef': 'off',
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion mocks/collections.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"get-afis-factuur-id:standard",
"get-afis-paylink:standard",
"get-powerbrowser-bb-zaak-adres:standard",
"post-powerbrowser-search-person:standard",
"post-powerbrowser-search-requests:standard",
"post-powerbrowser-zaak-status:standard",
"get-powerbrowser-bb-zaak-attachment-download:standard",
"get-powerbrowser-bb-zaak-attachments:standard",
Expand Down
179 changes: 86 additions & 93 deletions mocks/fixtures/powerbrowser-bb-attachments.json
Original file line number Diff line number Diff line change
@@ -1,93 +1,86 @@
[
{
"mainTable": "DOCLINK",
"mainId": -994888,
"caption": "begane grond SchniffSchnaffplein 34T BNB.pdf ",
"linkID": -996163,
"note": "Bijlage"
},
{
"mainTable": "DOCLINK",
"mainId": -994886,
"caption": "SchniffSchnaffplein 34T - Amsterdam - 1e Verdieping - 2D.jpg ",
"linkID": -996162,
"note": "Bijlage"
},
{
"mainTable": "DOCLINK",
"mainId": -994884,
"caption": "SchniffSchnaffplein 34T - Amsterdam - 2e Verdieping - 2D.jpg ",
"linkID": -996161,
"note": "Bijlage"
},
{
"mainTable": "DOCLINK",
"mainId": -994882,
"caption": "SchniffSchnaffplein 34T - Amsterdam - 3e Verdieping - 2D.jpg ",
"linkID": -996160,
"note": "Bijlage"
},
{
"mainTable": "DOCLINK",
"mainId": -994880,
"caption": "SchniffSchnaffplein 34T - Amsterdam - 4everdieping.jpg ",
"linkID": -996159,
"note": "Bijlage"
},
{
"mainTable": "DOCLINK",
"mainId": -994878,
"caption": "13-2-2023_Samenvatting_1015KV1A.pdf ",
"linkID": -996158,
"note": "Bijlage"
},
{
"mainTable": "DOCLINK",
"mainId": -994876,
"caption": "Samenvatting-f53b2109-7c4e-4b96-9abf-cb54bd925659.pdf ",
"linkID": -996157,
"note": "Bijlage"
},
{
"mainTable": "DOCLINK",
"mainId": -994874,
"caption": "Onbekend ",
"linkID": -996156,
"note": "Bijlage"
},
{
"mainTable": "DOCLINK",
"mainId": -994872,
"caption": "VAG ",
"linkID": -996155,
"note": "Bijlage"
},
{
"mainTable": "DOCLINK",
"mainId": -994870,
"caption": "RE: Uw vergunningaanvraag Z/12/987987 ",
"linkID": -996154,
"note": "Bijlage"
},
{
"mainTable": "DOCLINK",
"mainId": -994868,
"caption": "Besluit B&B ",
"linkID": -996153,
"note": "Bijlage"
},
{
"mainTable": "DOCLINK",
"mainId": -994866,
"caption": "Begeleidende mail -B&B ",
"linkID": -996152,
"note": "Bijlage"
},
{
"mainTable": "DOCLINK",
"mainId": -994864,
"caption": "Onbekend ",
"linkID": -996151,
"note": "Bijlage"
}
]
{
"mainTableName": "DOCLINK",
"records": [
{
"fmtCpn": "Z2024-WK000245 BB Besluit buiten behandeling stellen D2024-10-000402",
"mainTableName": "DOCLINK",
"id": "1189270",
"fields": [
{
"fieldName": "ID",
"text": "1189270",
"fieldValue": "1189270"
},
{
"fieldName": "OMSCHRIJVING",
"text": "Z2024-WK000245 BB Besluit buiten behandeling stellen",
"fieldValue": "Z2024-WK000245 BB Besluit buiten behandeling stellen"
},
{
"fieldName": "CREATEDATE",
"text": "31-10-2024 16:17",
"fieldValue": "2024-10-31T15:17:06.0000000Z"
},
{
"fieldName": "DOCUMENTNR",
"text": "D2024-10-000402",
"fieldValue": "D2024-10-000402"
}
]
},
{
"fmtCpn": "1-10-2024_Samenvatting_1064LK41.pdf D2024-10-000036",
"mainTableName": "DOCLINK",
"id": "1188904",
"fields": [
{
"fieldName": "ID",
"text": "1188904",
"fieldValue": "1188904"
},
{
"fieldName": "OMSCHRIJVING",
"text": "1-10-2024_Samenvatting_1064LK41.pdf",
"fieldValue": "1-10-2024_Samenvatting_1064LK41.pdf"
},
{
"fieldName": "CREATEDATE",
"text": "01-10-2024 00:00",
"fieldValue": "2024-09-30T22:00:00.0000000Z"
},
{
"fieldName": "DOCUMENTNR",
"text": "D2024-10-000036",
"fieldValue": "D2024-10-000036"
}
]
},
{
"fmtCpn": "Test document.pdf D2024-10-000035",
"mainTableName": "DOCLINK",
"id": "1188903",
"fields": [
{
"fieldName": "ID",
"text": "1188903",
"fieldValue": "1188903"
},
{
"fieldName": "OMSCHRIJVING",
"text": "Test document.pdf",
"fieldValue": "Test document.pdf"
},
{
"fieldName": "CREATEDATE",
"text": "01-10-2024 00:00",
"fieldValue": "2024-09-30T22:00:00.0000000Z"
},
{
"fieldName": "DOCUMENTNR",
"text": "D2024-10-000035",
"fieldValue": "D2024-10-000035"
}
]
}
]
}
17 changes: 17 additions & 0 deletions mocks/fixtures/powerbrowser-bb-zaak-adres.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"mainTableName": "ADRESSEN",
"records": [
{
"fmtCpn": "Jan en allemanplein 58 1122AB Amsterdam",
"mainTableName": "ADRESSEN",
"id": "-999752",
"fields": [
{
"fieldName": "FMT_CAPTION",
"text": "Jan en allemanplein 58 1122AB Amsterdam",
"fieldValue": "Jan en allemanplein 58 1122AB Amsterdam"
}
]
}
]
}
7 changes: 4 additions & 3 deletions mocks/routes/afis.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const httpConstants = require('http2').constants;
const settings = require('../settings');

const BASE = '/afis';
Expand Down Expand Up @@ -196,13 +197,13 @@ module.exports = [
};

const stateName = Object.entries(stateFilters).find(
([name, filterValueSegment]) => {
([_name, filterValueSegment]) => {
return req.query?.['$filter']?.includes(filterValueSegment);
}
)?.[0];

if (!stateName) {
return res.status(500).end();
return res.status(httpConstants.HTTP_STATUS_FORBIDDEN).end();
}

// DO NOT adjust this mock data (tests depend on it).
Expand Down Expand Up @@ -268,7 +269,7 @@ module.exports = [
id: 'standard',
type: 'middleware',
options: {
middleware: (req, res, next, core) => {
middleware: (_req, res) => {
const htmlResponse = `<h1>Afis factuur betalen</h1><button onclick="history.back()">Betaal factuur</button>`;
res.send(htmlResponse);
},
Expand Down
47 changes: 19 additions & 28 deletions mocks/routes/powerbrowser.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
const settings = require('../settings');
const BB_ZAKEN = require('../fixtures/powerbrowser-bb-zaken.json');
const BB_ZAAK_STATUS = require('../fixtures/powerbrowser-bb-zaak-status.json');
const BB_SEARCH_DOCUMENTS = require('../fixtures/powerbrowser-bb-attachments.json');
const BB_PERSONEN_ZAKEN = require('../fixtures/powerbrowser-bb-personen-zaken.json');
const BB_SEARCH_PERSON = require('../fixtures/powerbrowser-bb-search-person.json');
const BB_ZAAK_ATTACHMENTS = require('../fixtures/powerbrowser-bb-attachments.json');
const BB_LINK_ZAAK_ADRES = require('../fixtures/powerbrowser-bb-zaak-adres.json');
const BB_ZAAK_STATUS = require('../fixtures/powerbrowser-bb-zaak-status.json');
const BB_ZAKEN = require('../fixtures/powerbrowser-bb-zaken.json');
const settings = require('../settings');

module.exports = [
{
Expand All @@ -22,16 +23,22 @@ module.exports = [
],
},
{
id: 'post-powerbrowser-search-person',
id: 'post-powerbrowser-search-requests',
url: `${settings.MOCK_BASE_PATH}/powerbrowser/SearchRequest`,
method: 'POST',
delay: 5000,
variants: [
{
id: 'standard',
type: 'json',
type: 'middleware',
options: {
status: 200,
body: BB_SEARCH_PERSON,
middleware: (req, res) => {
if (['MAATSCHAP', 'PERSONEN'].includes(req.body.query.tableName)) {
return res.send(BB_SEARCH_PERSON);
}

return res.send(BB_SEARCH_DOCUMENTS);
},
},
},
],
Expand Down Expand Up @@ -81,33 +88,17 @@ module.exports = [
},
],
},

{
id: 'get-powerbrowser-bb-zaak-attachments',
url: `${settings.MOCK_BASE_PATH}/powerbrowser/link/GFO_ZAKEN/:zaaknummer`,
method: 'GET',
variants: [
{
id: 'standard',
type: 'json',
options: {
status: 200,
body: BB_ZAAK_ATTACHMENTS,
},
},
],
},
{
id: 'get-powerbrowser-bb-zaak-adres',
url: `${settings.MOCK_BASE_PATH}/powerbrowser/Record/AdresMbtZaakOrLocatie/GFO_ZAKEN/:zaaknummer`,
method: 'GET',
url: `${settings.MOCK_BASE_PATH}/powerbrowser/Link/GFO_ZAKEN/ADRESSEN/Table`,
method: 'POST',
variants: [
{
id: 'standard',
type: 'text',
type: 'json',
options: {
status: 200,
body: 'Dingemanstraat 12-H 1234AB Amsterdam',
body: BB_LINK_ZAAK_ADRES,
},
},
],
Expand Down
8 changes: 8 additions & 0 deletions package-lock.json

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

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
"cron": "^3.1.7",
"cross-env": "^7.0.3",
"date-fns": "^4.1.0",
"decimal.js": "^10.4.3",
"dotenv": "^16.4.5",
"dotenv-expand": "^11.0.6",
"express": "^4.21.1",
Expand Down Expand Up @@ -121,6 +122,7 @@
"nock": "^13.5.5",
"node-jose": "^2.2.0",
"npm": "^10.9.0",
"outdent": "^0.8.0",
"pg": "^8.13.1",
"prettier": "^3.3.3",
"proj4": "^2.12.1",
Expand Down
7 changes: 6 additions & 1 deletion src/client/AppState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ export const PRISTINE_APPSTATE: AppState = {
NOTIFICATIONS: apiPristineResult([]),

AFIS: apiPristineResult(
{ isKnown: false, businessPartnerIdEncrypted: null },
{
isKnown: false,
businessPartnerIdEncrypted: null,
businessPartnerId: null,
facturen: null,
},
{
isActive: FeatureToggle.afisActive,
profileTypes: ['private', 'commercial'],
Expand Down
Loading

0 comments on commit a6752a9

Please sign in to comment.