Skip to content

Commit

Permalink
Mijn-9226-Feature - Afis changes + fixes (#1511)
Browse files Browse the repository at this point in the history
* Replace InvoiceNo with DocumentReferenceID

* Determine factuurnummer, sort props

* Fix missing paylink

* Add default profitcenter name

* Add error handling

* Generalize afis api response based on state

* Add mock data, add paylik route

* Add clearing date

* Add overgedragen aan belastingen

* Change el

* Remove zaak extension

* Make query less specific

* Cache FE data

* Fix dev download

* Add alert

* Change page layout

* Add some layout + disclaimers

* Add listPageLinkLabel

* Change title

* Change max rows, change listpage route

* Fix query

* Add count

* Add count + align queries

* Add helper

* Rename state params, add overgedragen

* Add total items for custom count

* Update test

* Add totalCount

* Add listPageData

* Remove some redundant props, pass count

* Clean up test

* Add titles

* Clean up declarations, sorting op names etc.

* Move disclaimer

* Add table ceel widths

* Add non-required flag

* Change order

* Make optional

* Fix content

* Don’t select address data

* Disable decos

* Set non-env-dependent values

* Pick factuurDocumentId first

* Add feature toggle

* Remove style

* Start open if emandates are not active

* Add id

* Add dependencyErrors

* Error display

* Update hooks api

* Change display props

* Ad herinnering

* Update tests

* Fix tests

* Use proper operator

* ADd tests

* Always show the title

* Add tests

* Use single api hook for fetching

* Move to alert

* Fix query

* Update snap

* Update snap

* Hide error when clicking again

* Don’t generate download url if we don’t have a documentId

* Change label / organize imports

* Fix assignment condition

* Separate services into files, add additional call to businesspartneraddress

* Restore statuscode

* Check for content

* Change casing

* Add expires
  • Loading branch information
timvanoostrom authored Oct 2, 2024
1 parent ad941f6 commit 67145f0
Show file tree
Hide file tree
Showing 49 changed files with 1,972 additions and 1,585 deletions.
4 changes: 3 additions & 1 deletion mocks/collections.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,14 @@
"get-wpi-specificaties:standard",
"post-afis-businesspartner-bsn:standard",
"post-afis-businesspartner-kvk:standard",
"post-afis-factuur-document:standard",
"get-afis-factuur-document:standard",
"get-afis-businesspartner-details:standard",
"get-afis-businesspartner-address:standard",
"get-afis-businesspartner-phonenumber:standard",
"get-afis-businesspartner-emailaddress:standard",
"get-afis-facturen:standard",
"get-afis-factuur-id:standard",
"get-afis-paylink:standard",
"get-powerbrowser-bb-vergunning-attachments:standard",
"post-powerbrowser-bb-vergunning-attachments:standard",
"post-powerbrowser-token:standard",
Expand Down
41 changes: 31 additions & 10 deletions mocks/fixtures/afis/afgehandelde-facturen.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@rel": "self",
"@title": "SomeITEM"
},
"count": 10,
"entry": [
{
"content": {
Expand All @@ -24,8 +25,10 @@
"DunningLevel": 0,
"ProfitCenterName": "Lisan al Gaib inc.",
"NetDueDate": "2023-12-21T00:00:00",
"ClearingDate": "2024-05-01",
"ReverseDocument": "someReverseDocument123",
"InvoiceNo": "INV-2023-010"
"DocumentReferenceID": "INV-2023-010",
"AccountingDocument": "INV-2023-010"
}
}
},
Expand All @@ -37,8 +40,10 @@
"DunningLevel": 0,
"ProfitCenterName": "Lisan al Gaib inc.",
"NetDueDate": "2023-12-12T00:00:00",
"ClearingDate": "2024-05-01",
"ReverseDocument": "someReverseDocument123",
"InvoiceNo": "INV-2023-008"
"DocumentReferenceID": "INV-2023-008",
"AccountingDocument": "INV-2023-008"
}
}
},
Expand All @@ -50,8 +55,10 @@
"DunningLevel": 0,
"ProfitCenterName": "Lisan al Gaib inc.",
"NetDueDate": "2023-10-26T00:00:00",
"ClearingDate": "2024-05-01",
"ReverseDocument": "someReverseDocument123",
"InvoiceNo": "INV-2023-006"
"DocumentReferenceID": "INV-2023-006",
"AccountingDocument": "INV-2023-006"
}
}
},
Expand All @@ -63,8 +70,10 @@
"DunningLevel": 0,
"ProfitCenterName": "Stellar Innovations Corp.",
"NetDueDate": "2023-08-09T00:00:00",
"ClearingDate": "2024-05-01",
"ReverseDocument": "someReverseDocument123",
"InvoiceNo": "INV-2023-005"
"DocumentReferenceID": "INV-2023-005",
"AccountingDocument": "INV-2023-005"
}
}
},
Expand All @@ -76,8 +85,10 @@
"DunningLevel": 2,
"ProfitCenterName": "Eco Synergy Solutions",
"NetDueDate": "2023-07-27T00:00:00",
"ClearingDate": "2024-05-01",
"ReverseDocument": "",
"InvoiceNo": "INV-2023-003"
"DocumentReferenceID": "INV-2023-003",
"AccountingDocument": "INV-2023-003"
}
}
},
Expand All @@ -89,8 +100,10 @@
"DunningLevel": 0,
"ProfitCenterName": "Nebula Dynamics Ltd.",
"NetDueDate": "2023-06-12T00:00:00",
"ClearingDate": "2024-05-01",
"ReverseDocument": "",
"InvoiceNo": "INV-2023-001"
"DocumentReferenceID": "INV-2023-001",
"AccountingDocument": "INV-2023-001"
}
}
},
Expand All @@ -102,8 +115,10 @@
"DunningLevel": 0,
"ProfitCenterName": "Quantum Horizons GmbH",
"NetDueDate": "2023-05-11T00:00:00",
"ClearingDate": "2024-05-01",
"ReverseDocument": "",
"InvoiceNo": "INV-2023-002"
"DocumentReferenceID": "INV-2023-002",
"AccountingDocument": "INV-2023-002"
}
}
},
Expand All @@ -115,8 +130,10 @@
"DunningLevel": 0,
"ProfitCenterName": "Cyber Nexus Technologies",
"NetDueDate": "2023-04-28T00:00:00",
"ClearingDate": "2024-05-01",
"ReverseDocument": "someReverseDocument123",
"InvoiceNo": "INV-2023-004"
"DocumentReferenceID": "INV-2023-004",
"AccountingDocument": "INV-2023-004"
}
}
},
Expand All @@ -128,8 +145,10 @@
"DunningLevel": 0,
"ProfitCenterName": "Lisan al Gaib inc.",
"NetDueDate": "2023-01-31T00:00:00",
"ClearingDate": "2024-05-01",
"ReverseDocument": "someReverseDocument123",
"InvoiceNo": "INV-2023-007"
"DocumentReferenceID": "INV-2023-007",
"AccountingDocument": "INV-2023-007"
}
}
},
Expand All @@ -141,8 +160,10 @@
"DunningLevel": 0,
"ProfitCenterName": "Lisan al Gaib inc.",
"NetDueDate": "2023-01-01T00:00:00",
"ClearingDate": "2024-05-01",
"ReverseDocument": "someReverseDocument123",
"InvoiceNo": "INV-2023-009"
"DocumentReferenceID": "INV-2023-009",
"AccountingDocument": "INV-2023-009"
}
}
}
Expand Down
36 changes: 22 additions & 14 deletions mocks/fixtures/afis/openstaande-facturen.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@rel": "self",
"@title": "SomeITEM"
},
"count": 7,
"entry": [
{
"content": {
Expand All @@ -28,8 +29,9 @@
"NetDueDate": "2023-12-21T00:00:00",
"NetPaymentAmount": "0.00",
"AmountInBalanceTransacCrcy": "343.00",
"InvoiceNo": "5555555",
"Paylink": "http://localhost:3100/mocks-server/afis/paylink"
"DocumentReferenceID": "5555555",
"AccountingDocument": "5555555",
"Paylink": "http://localhost:3100/mocks-api/afis/paylink"
}
}
},
Expand All @@ -45,8 +47,9 @@
"NetDueDate": "2023-12-12T00:00:00",
"NetPaymentAmount": "0.00",
"AmountInBalanceTransacCrcy": "-80.00",
"InvoiceNo": "5555555",
"Paylink": "http://localhost:3100/mocks-server/afis/paylink"
"DocumentReferenceID": "5555555",
"AccountingDocument": "5555555",
"Paylink": "http://localhost:3100/mocks-api/afis/paylink"
}
}
},
Expand All @@ -62,8 +65,9 @@
"NetDueDate": "2023-10-26T00:00:00",
"NetPaymentAmount": "0.00",
"AmountInBalanceTransacCrcy": "-12.10",
"InvoiceNo": "5555555",
"Paylink": "http://localhost:3100/mocks-server/afis/paylink"
"DocumentReferenceID": "5555555",
"AccountingDocument": "5555555",
"Paylink": "http://localhost:3100/mocks-api/afis/paylink"
}
}
},
Expand All @@ -79,8 +83,9 @@
"NetDueDate": "2023-08-09T00:00:00",
"NetPaymentAmount": "0.00",
"AmountInBalanceTransacCrcy": "-16.00",
"InvoiceNo": "5555555",
"Paylink": "http://localhost:3100/mocks-server/afis/paylink"
"DocumentReferenceID": "5555555",
"AccountingDocument": "5555555",
"Paylink": "http://localhost:3100/mocks-api/afis/paylink"
}
}
},
Expand All @@ -96,8 +101,9 @@
"NetDueDate": "2023-03-23T00:00:00",
"NetPaymentAmount": "-900.98",
"AmountInBalanceTransacCrcy": "1000.00",
"InvoiceNo": "5555555",
"Paylink": "http://localhost:3100/mocks-server/afis/paylink"
"DocumentReferenceID": "5555555",
"AccountingDocument": "5555555",
"Paylink": "http://localhost:3100/mocks-api/afis/paylink"
}
}
},
Expand All @@ -113,8 +119,9 @@
"NetDueDate": "2023-01-31T00:00:00",
"NetPaymentAmount": "0.00",
"AmountInBalanceTransacCrcy": "121.00",
"InvoiceNo": "5555555",
"Paylink": "http://localhost:3100/mocks-server/afis/paylink"
"DocumentReferenceID": "5555555",
"AccountingDocument": "5555555",
"Paylink": "http://localhost:3100/mocks-api/afis/paylink"
}
}
},
Expand All @@ -132,8 +139,9 @@
},
"NetPaymentAmount": "0.00",
"AmountInBalanceTransacCrcy": "230.00",
"InvoiceNo": "5555555",
"Paylink": "http://localhost:3100/mocks-server/afis/paylink"
"DocumentReferenceID": "5555555",
"AccountingDocument": "5555555",
"Paylink": "http://localhost:3100/mocks-api/afis/paylink"
}
}
}
Expand Down
37 changes: 37 additions & 0 deletions mocks/fixtures/afis/overgedragen-facturen.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"feed": {
"@base": "https://sap:8080OPERACCTGDOCITEM_CDS/",
"id": "https://sap:8080OPERACCTGDOCITEM_CDS/SomeITEM",
"title": {
"@type": "text",
"$": "SomeITEM"
},
"updated": "2000-01-22T11:32:02Z",
"author": {
"name": ""
},
"link": {
"@href": "SomeITEM",
"@rel": "self",
"@title": "SomeITEM"
},
"count": 1,
"entry": [
{
"content": {
"@type": "application/xml",
"properties": {
"IsCleared": true,
"DunningLevel": 3,
"ProfitCenterName": "Qui-gon jinn",
"NetDueDate": "2023-12-21T00:00:00",
"ClearingDate": "2024-05-01",
"ReverseDocument": "",
"DocumentReferenceID": "INV-2024-001",
"AccountingDocument": "INV-2024-001"
}
}
}
]
}
}
Loading

0 comments on commit 67145f0

Please sign in to comment.