Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of a new react app for displaying opening hours from CMS with FullCalendar integration - Ddfform 414 #1023

Merged
Merged
Show file tree
Hide file tree
Changes from 51 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
f7c5ba6
Initialize a basic App for `Calendar`
kasperbirch1 Mar 12, 2024
a7146fb
Implement `FullCalendar` functionality
kasperbirch1 Mar 12, 2024
46f03a1
Add `height="100vh"` + `stickyHeaderDates`
kasperbirch1 Mar 12, 2024
4777b1e
Add `allDay` property to default event
kasperbirch1 Mar 12, 2024
d1d842e
Add logic that prevents events from spanning over multiple days
kasperbirch1 Mar 12, 2024
4ce0ef6
WIP: Implementing new Orval-generated hooks to retrieve CMS opening h…
kasperbirch1 Mar 13, 2024
8233f95
Add WireMock for `https://dpl-cms.docker` and add opening hours endpo…
kasperbirch1 Mar 13, 2024
bd0a53e
Use data from `useDplOpeningHoursListGET` in `Calendar` app
kasperbirch1 Mar 13, 2024
7349ded
Add monthly view to FullCalendar
kasperbirch1 Mar 13, 2024
e30239c
Remove `height="100vh"`
kasperbirch1 Mar 13, 2024
5b5872a
Change app name to `OpeningHoursEditor`
kasperbirch1 Mar 13, 2024
f6ed8a8
Add `eslint-disable-next-line no-alert`
kasperbirch1 Mar 13, 2024
3a0cf00
Add `height="auto"`to `FullCalendar`
kasperbirch1 Mar 13, 2024
79d6de0
Convert helper to TypeScript (.ts) file
kasperbirch1 Mar 13, 2024
bd1aaff
Add functionality to edit/remove events in `FullCalendar`
kasperbirch1 Mar 13, 2024
4220af3
Refactor handler functions into `helper.ts`
kasperbirch1 Mar 13, 2024
f5b57f0
Refactor event start/end comparison into `isSameDay` function
kasperbirch1 Mar 14, 2024
4668e00
Refactor `helper.ts` to utilize arrow functions
kasperbirch1 Mar 14, 2024
a1e902d
Remove unnecessary 'inline function' from `eventClick`
kasperbirch1 Mar 14, 2024
6616578
Refactored `handleEventRemove`
kasperbirch1 Mar 14, 2024
1320070
Refactor `OpeningHoursEditorEventContent` into component structure
kasperbirch1 Mar 14, 2024
d221388
Add `selectMirror` and Start/End Time to `OpeningHoursEditorEventCont…
kasperbirch1 Mar 14, 2024
77cbc69
Add `useOpeningHours` hook
kasperbirch1 Mar 15, 2024
25676c2
Refactor `useOpeningHours` hook to fetch opening hours data internally
kasperbirch1 Mar 15, 2024
04316ad
Refactor `isSameDay` to `adjustEndDateToStartDay`
kasperbirch1 Mar 22, 2024
d8ddd99
Move event dates to week 12 in WireMock
kasperbirch1 Mar 20, 2024
70e4c65
POC: Add `Dialog`
kasperbirch1 Mar 20, 2024
00e8bc5
Get rid of TypeScript ESLint errors.
kasperbirch1 Mar 20, 2024
84ba0fd
Add form elements for event editing in `Dialog`
kasperbirch1 Mar 21, 2024
60a7f86
Implemented `DialogFormularAdd` / `DialogFormularEdit`
kasperbirch1 Mar 25, 2024
7e09799
Update to latest openAPI spec from DPL-CMS
kasperbirch1 Mar 25, 2024
5e56748
Use date objects in helper functions
kasperbirch1 Mar 26, 2024
fd6cc81
Fix comment casing in Dialog component
kasperbirch1 Mar 26, 2024
921442c
Move `Dialog` to components folder for shared use
kasperbirch1 Mar 26, 2024
bbfe79b
Move 'Remove event' button inside `DialogFormularEdit`
kasperbirch1 Mar 26, 2024
8a3105f
Set `allDay: false` for Event addition
kasperbirch1 Mar 26, 2024
0c988ce
Disable all-day slot in the `FullCalendar`
kasperbirch1 Mar 26, 2024
ae3f072
Update to Latest OpenAPI Spec and Refactor `handleEventRemove`
kasperbirch1 Mar 26, 2024
963734c
Update wiremock for `useDplOpeningHoursListGET``
kasperbirch1 Mar 26, 2024
df3be2f
WIP: Refactor `handleEventAdd`
kasperbirch1 Mar 26, 2024
a814e73
Fix date selection Issue + Add `useEscapeKey` hook to `Dialog`
kasperbirch1 Apr 2, 2024
2e52b7c
Refactor `useOpeningHours` + Add logic for `handleEventEditing`
kasperbirch1 Mar 28, 2024
f19326b
Refactor Add/edit event logic for functionality and code clarity
kasperbirch1 Mar 31, 2024
9807ed3
Refactor `EventForm` to use CSS classes and `children` prop
kasperbirch1 Apr 2, 2024
bc52558
Rearrange code for improved readability
kasperbirch1 Apr 2, 2024
11b039e
Add `withConfig` to handle props from dpl-cms
kasperbirch1 Apr 3, 2024
309420e
Add `isSameTime` to disable button in `EventForm`
kasperbirch1 Apr 4, 2024
7a3f07c
Add CSS class and simplify`OpeningHoursEditorEventContent`
kasperbirch1 Apr 4, 2024
baccd3f
Upgrade `orval` and Execute `yarn codegen:client:dpl-cms`
kasperbirch1 Apr 4, 2024
69d878f
Rename `useOpeningHours` to `useOpeningHoursEditor`
kasperbirch1 Apr 4, 2024
687b1ef
Merge pull request #1048 from danskernesdigitalebibliotek/DDFFORM-500…
kasperbirch1 Apr 5, 2024
625b22b
Merge branch 'release/form-sprint-10' into DDFFORM-414-kalendervisnin…
kasperbirch1 Apr 5, 2024
0220c48
Fix Comments in Pull Request
kasperbirch1 Apr 5, 2024
5fc436f
Remove 'orval' from dependencies
kasperbirch1 Apr 5, 2024
f0e9bd0
Merge branch 'release/form-sprint-10' into DDFFORM-414-kalendervisnin…
kasperg Apr 7, 2024
4d9609e
Delete CMS model before generating a new one with Orval
kasperg Apr 7, 2024
640238e
Update our generated CMS client code
kasperg Apr 7, 2024
9763866
Set initial date through a prop in opening hours editor
kasperg Apr 7, 2024
a197f8c
Update opening hours deleted stub to match spec
kasperg Apr 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"id": "f52a1b96-38d2-479a-aeaf-65367637d365",
"name": "Delete event",
"request": {
"urlPathPattern": "/dpl_opening_hours/[0-9]+",
"method": "DELETE"
},
"response": {
"status": 200,
"body": "Event deletet",
kasperg marked this conversation as resolved.
Show resolved Hide resolved
"headers": {}
},
"uuid": "f52a1b96-38d2-479a-aeaf-65367637d365",
"persistent": true,
"priority": 5,
"insertionIndex": 1,
"postServeActions": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"id" : "7dfc9127-ba40-4098-9dfb-ed65799e99f0",
"name" : "Full Calendar Opening hours",
"request" : {
"url" : "/dpl_opening_hours?branch_id=12",
"method" : "GET"
},
"response" : {
"status" : 200,
"body" : "[\n {\n \"id\": 21,\n \"category\": {\n \"title\": \"Åbent\",\n \"color\": \"#0000FF\"\n },\n \"date\": \"2024-03-11\",\n \"start_time\": \"08:00\",\n \"end_time\": \"12:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 22,\n \"category\": {\n \"title\": \"Selvbetjening\",\n \"color\": \"#FF0000\"\n },\n \"date\": \"2024-03-11\",\n \"start_time\": \"13:00\",\n \"end_time\": \"17:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 23,\n \"category\": {\n \"title\": \"Med betjening\",\n \"color\": \"#008000\"\n },\n \"date\": \"2024-03-11\",\n \"start_time\": \"18:00\",\n \"end_time\": \"20:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 24,\n \"category\": {\n \"title\": \"Telefontid\",\n \"color\": \"#FFFF00\"\n },\n \"date\": \"2024-03-12\",\n \"start_time\": \"09:00\",\n \"end_time\": \"11:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 25,\n \"category\": {\n \"title\": \"Borgerservice\",\n \"color\": \"#0000FF\"\n },\n \"date\": \"2024-03-12\",\n \"start_time\": \"12:00\",\n \"end_time\": \"14:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 26,\n \"category\": {\n \"title\": \"Børneetagen\",\n \"color\": \"#FF0000\"\n },\n \"date\": \"2024-03-12\",\n \"start_time\": \"15:00\",\n \"end_time\": \"18:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 27,\n \"category\": {\n \"title\": \"Makerlab\",\n \"color\": \"#008000\"\n },\n \"date\": \"2024-03-13\",\n \"start_time\": \"08:00\",\n \"end_time\": \"11:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 28,\n \"category\": {\n \"title\": \"Åbent\",\n \"color\": \"#FFFF00\"\n },\n \"date\": \"2024-03-13\",\n \"start_time\": \"12:00\",\n \"end_time\": \"16:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 29,\n \"category\": {\n \"title\": \"Selvbetjening\",\n \"color\": \"#0000FF\"\n },\n \"date\": \"2024-03-13\",\n \"start_time\": \"17:00\",\n \"end_time\": \"20:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 30,\n \"category\": {\n \"title\": \"Med betjening\",\n \"color\": \"#FF0000\"\n },\n \"date\": \"2024-03-14\",\n \"start_time\": \"09:00\",\n \"end_time\": \"13:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 31,\n \"category\": {\n \"title\": \"Telefontid\",\n \"color\": \"#008000\"\n },\n \"date\": \"2024-03-14\",\n \"start_time\": \"14:00\",\n \"end_time\": \"17:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 32,\n \"category\": {\n \"title\": \"Borgerservice\",\n \"color\": \"#FFFF00\"\n },\n \"date\": \"2024-03-14\",\n \"start_time\": \"18:00\",\n \"end_time\": \"20:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 33,\n \"category\": {\n \"title\": \"Børneetagen\",\n \"color\": \"#0000FF\"\n },\n \"date\": \"2024-03-15\",\n \"start_time\": \"08:00\",\n \"end_time\": \"12:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 34,\n \"category\": {\n \"title\": \"Makerlab\",\n \"color\": \"#FF0000\"\n },\n \"date\": \"2024-03-15\",\n \"start_time\": \"13:00\",\n \"end_time\": \"16:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 35,\n \"category\": {\n \"title\": \"Åbent\",\n \"color\": \"#008000\"\n },\n \"date\": \"2024-03-15\",\n \"start_time\": \"17:00\",\n \"end_time\": \"19:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 36,\n \"category\": {\n \"title\": \"Selvbetjening\",\n \"color\": \"#FFFF00\"\n },\n \"date\": \"2024-03-16\",\n \"start_time\": \"09:00\",\n \"end_time\": \"12:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 37,\n \"category\": {\n \"title\": \"Med betjening\",\n \"color\": \"#0000FF\"\n },\n \"date\": \"2024-03-16\",\n \"start_time\": \"12:30\",\n \"end_time\": \"15:30\",\n \"branch_id\": 12\n },\n {\n \"id\": 38,\n \"category\": {\n \"title\": \"Telefontid\",\n \"color\": \"#FF0000\"\n },\n \"date\": \"2024-03-16\",\n \"start_time\": \"16:00\",\n \"end_time\": \"18:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 39,\n \"category\": {\n \"title\": \"Borgerservice\",\n \"color\": \"#008000\"\n },\n \"date\": \"2024-03-17\",\n \"start_time\": \"10:00\",\n \"end_time\": \"13:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 40,\n \"category\": {\n \"title\": \"Børneetagen\",\n \"color\": \"#FFFF00\"\n },\n \"date\": \"2024-03-17\",\n \"start_time\": \"14:00\",\n \"end_time\": \"17:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 41,\n \"category\": {\n \"title\": \"Makerlab\",\n \"color\": \"#0000FF\"\n },\n \"date\": \"2024-03-17\",\n \"start_time\": \"18:00\",\n \"end_time\": \"20:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 0,\n \"category\": {\n \"title\": \"Åbent\",\n \"color\": \"#0000FF\"\n },\n \"date\": \"2024-03-18\",\n \"start_time\": \"09:00\",\n \"end_time\": \"12:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 1,\n \"category\": {\n \"title\": \"Selvbetjening\",\n \"color\": \"#FF0000\"\n },\n \"date\": \"2024-03-18\",\n \"start_time\": \"13:00\",\n \"end_time\": \"16:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 2,\n \"category\": {\n \"title\": \"Med betjening\",\n \"color\": \"#008000\"\n },\n \"date\": \"2024-03-18\",\n \"start_time\": \"17:00\",\n \"end_time\": \"19:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 3,\n \"category\": {\n \"title\": \"Telefontid\",\n \"color\": \"#FFFF00\"\n },\n \"date\": \"2024-03-19\",\n \"start_time\": \"08:00\",\n \"end_time\": \"10:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 4,\n \"category\": {\n \"title\": \"Borgerservice\",\n \"color\": \"#0000FF\"\n },\n \"date\": \"2024-03-19\",\n \"start_time\": \"11:00\",\n \"end_time\": \"13:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 5,\n \"category\": {\n \"title\": \"Børneetagen\",\n \"color\": \"#FF0000\"\n },\n \"date\": \"2024-03-19\",\n \"start_time\": \"14:00\",\n \"end_time\": \"17:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 6,\n \"category\": {\n \"title\": \"Makerlab\",\n \"color\": \"#0000FF\"\n },\n \"date\": \"2024-03-20\",\n \"start_time\": \"09:00\",\n \"end_time\": \"12:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 7,\n \"category\": {\n \"title\": \"Åbent\",\n \"color\": \"#008000\"\n },\n \"date\": \"2024-03-20\",\n \"start_time\": \"13:00\",\n \"end_time\": \"15:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 8,\n \"category\": {\n \"title\": \"Selvbetjening\",\n \"color\": \"#FFFF00\"\n },\n \"date\": \"2024-03-20\",\n \"start_time\": \"16:00\",\n \"end_time\": \"19:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 9,\n \"category\": {\n \"title\": \"Med betjening\",\n \"color\": \"#0000FF\"\n },\n \"date\": \"2024-03-21\",\n \"start_time\": \"09:00\",\n \"end_time\": \"11:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 10,\n \"category\": {\n \"title\": \"Telefontid\",\n \"color\": \"#FF0000\"\n },\n \"date\": \"2024-03-21\",\n \"start_time\": \"12:00\",\n \"end_time\": \"14:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 11,\n \"category\": {\n \"title\": \"Borgerservice\",\n \"color\": \"#008000\"\n },\n \"date\": \"2024-03-21\",\n \"start_time\": \"15:00\",\n \"end_time\": \"18:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 12,\n \"category\": {\n \"title\": \"Børneetagen\",\n \"color\": \"#0000FF\"\n },\n \"date\": \"2024-03-22\",\n \"start_time\": \"10:00\",\n \"end_time\": \"13:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 13,\n \"category\": {\n \"title\": \"Makerlab\",\n \"color\": \"#FF0000\"\n },\n \"date\": \"2024-03-22\",\n \"start_time\": \"14:00\",\n \"end_time\": \"17:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 14,\n \"category\": {\n \"title\": \"Åbent\",\n \"color\": \"#008000\"\n },\n \"date\": \"2024-03-22\",\n \"start_time\": \"18:00\",\n \"end_time\": \"20:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 15,\n \"category\": {\n \"title\": \"Selvbetjening\",\n \"color\": \"#FFFF00\"\n },\n \"date\": \"2024-03-23\",\n \"start_time\": \"09:00\",\n \"end_time\": \"11:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 16,\n \"category\": {\n \"title\": \"Med betjening\",\n \"color\": \"#0000FF\"\n },\n \"date\": \"2024-03-23\",\n \"start_time\": \"12:00\",\n \"end_time\": \"16:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 17,\n \"category\": {\n \"title\": \"Telefontid\",\n \"color\": \"#FF0000\"\n },\n \"date\": \"2024-03-23\",\n \"start_time\": \"17:00\",\n \"end_time\": \"19:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 18,\n \"category\": {\n \"title\": \"Borgerservice\",\n \"color\": \"#008000\"\n },\n \"date\": \"2024-03-24\",\n \"start_time\": \"10:00\",\n \"end_time\": \"13:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 19,\n \"category\": {\n \"title\": \"Børneetagen\",\n \"color\": \"#FFFF00\"\n },\n \"date\": \"2024-03-24\",\n \"start_time\": \"14:00\",\n \"end_time\": \"18:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 20,\n \"category\": {\n \"title\": \"Makerlab\",\n \"color\": \"#0000FF\"\n },\n \"date\": \"2024-03-24\",\n \"start_time\": \"19:00\",\n \"end_time\": \"21:00\",\n \"branch_id\": 12\n },\n\n {\n \"id\": 42,\n \"category\": {\n \"title\": \"Åbent\",\n \"color\": \"#0000FF\"\n },\n \"date\": \"2024-03-25\",\n \"start_time\": \"08:00\",\n \"end_time\": \"12:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 43,\n \"category\": {\n \"title\": \"Selvbetjening\",\n \"color\": \"#FF0000\"\n },\n \"date\": \"2024-03-25\",\n \"start_time\": \"13:00\",\n \"end_time\": \"17:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 44,\n \"category\": {\n \"title\": \"Med betjening\",\n \"color\": \"#008000\"\n },\n \"date\": \"2024-03-25\",\n \"start_time\": \"18:00\",\n \"end_time\": \"20:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 45,\n \"category\": {\n \"title\": \"Telefontid\",\n \"color\": \"#FFFF00\"\n },\n \"date\": \"2024-03-26\",\n \"start_time\": \"09:00\",\n \"end_time\": \"11:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 46,\n \"category\": {\n \"title\": \"Borgerservice\",\n \"color\": \"#0000FF\"\n },\n \"date\": \"2024-03-26\",\n \"start_time\": \"12:00\",\n \"end_time\": \"14:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 47,\n \"category\": {\n \"title\": \"Børneetagen\",\n \"color\": \"#FF0000\"\n },\n \"date\": \"2024-03-26\",\n \"start_time\": \"15:00\",\n \"end_time\": \"18:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 48,\n \"category\": {\n \"title\": \"Makerlab\",\n \"color\": \"#008000\"\n },\n \"date\": \"2024-03-27\",\n \"start_time\": \"08:00\",\n \"end_time\": \"11:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 49,\n \"category\": {\n \"title\": \"Åbent\",\n \"color\": \"#FFFF00\"\n },\n \"date\": \"2024-03-27\",\n \"start_time\": \"12:00\",\n \"end_time\": \"16:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 50,\n \"category\": {\n \"title\": \"Selvbetjening\",\n \"color\": \"#0000FF\"\n },\n \"date\": \"2024-03-27\",\n \"start_time\": \"17:00\",\n \"end_time\": \"20:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 51,\n \"category\": {\n \"title\": \"Med betjening\",\n \"color\": \"#FF0000\"\n },\n \"date\": \"2024-03-28\",\n \"start_time\": \"09:00\",\n \"end_time\": \"13:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 52,\n \"category\": {\n \"title\": \"Telefontid\",\n \"color\": \"#008000\"\n },\n \"date\": \"2024-03-28\",\n \"start_time\": \"14:00\",\n \"end_time\": \"17:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 53,\n \"category\": {\n \"title\": \"Borgerservice\",\n \"color\": \"#FFFF00\"\n },\n \"date\": \"2024-03-28\",\n \"start_time\": \"18:00\",\n \"end_time\": \"20:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 54,\n \"category\": {\n \"title\": \"Børneetagen\",\n \"color\": \"#0000FF\"\n },\n \"date\": \"2024-03-29\",\n \"start_time\": \"08:00\",\n \"end_time\": \"12:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 55,\n \"category\": {\n \"title\": \"Makerlab\",\n \"color\": \"#FF0000\"\n },\n \"date\": \"2024-03-29\",\n \"start_time\": \"13:00\",\n \"end_time\": \"16:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 56,\n \"category\": {\n \"title\": \"Åbent\",\n \"color\": \"#008000\"\n },\n \"date\": \"2024-03-29\",\n \"start_time\": \"17:00\",\n \"end_time\": \"19:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 57,\n \"category\": {\n \"title\": \"Selvbetjening\",\n \"color\": \"#FFFF00\"\n },\n \"date\": \"2024-03-30\",\n \"start_time\": \"09:00\",\n \"end_time\": \"12:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 58,\n \"category\": {\n \"title\": \"Med betjening\",\n \"color\": \"#0000FF\"\n },\n \"date\": \"2024-03-30\",\n \"start_time\": \"12:30\",\n \"end_time\": \"15:30\",\n \"branch_id\": 12\n },\n {\n \"id\": 59,\n \"category\": {\n \"title\": \"Telefontid\",\n \"color\": \"#FF0000\"\n },\n \"date\": \"2024-03-30\",\n \"start_time\": \"16:00\",\n \"end_time\": \"18:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 60,\n \"category\": {\n \"title\": \"Borgerservice\",\n \"color\": \"#008000\"\n },\n \"date\": \"2024-03-31\",\n \"start_time\": \"10:00\",\n \"end_time\": \"13:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 61,\n \"category\": {\n \"title\": \"Børneetagen\",\n \"color\": \"#FFFF00\"\n },\n \"date\": \"2024-03-31\",\n \"start_time\": \"14:00\",\n \"end_time\": \"17:00\",\n \"branch_id\": 12\n },\n {\n \"id\": 62,\n \"category\": {\n \"title\": \"Makerlab\",\n \"color\": \"#0000FF\"\n },\n \"date\": \"2024-03-31\",\n \"start_time\": \"18:00\",\n \"end_time\": \"20:00\",\n \"branch_id\": 12\n }\n]\n",
"headers" : { }
},
"uuid" : "7dfc9127-ba40-4098-9dfb-ed65799e99f0",
"persistent" : true,
"priority" : 5,
"insertionIndex" : 1,
"postServeActions" : [ ]
}
5 changes: 5 additions & 0 deletions .docker/wiremock/services.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,10 @@
"name" : "publizon",
"port" : 8110,
"rootDir" : "publizon"
}, {
"id" : "9d646",
"name" : "cms",
"port" : 8120,
"rootDir" : "cms"
} ]
}
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ STORYBOOK_CLIENT_ID=bdc1d425-9117-4867-acb9-c7307ddc2e0f
STORYBOOK_LIBRARY_TOKEN=e26e4ca8934475e6a9aytefb028b2e9fa846b5b8
PUBLIZON_BASEURL=http://publizon-mock.docker
FBS_BASEURL=http://fbs-mock.docker
CMS_BASEURL=http://cms-mock.docker
20 changes: 19 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3.7'
version: "3.7"

services:
wiremock:
Expand All @@ -9,6 +9,8 @@ services:
- "8100"
# Publizon
- "8110"
# CMS
- "8120"
volumes:
- wiremock_data:/home/wiremock
environment:
Expand Down Expand Up @@ -37,6 +39,17 @@ services:
VIRTUAL_HOST: publizon-mock.docker
VIRTUAL_PORT: 8080

wiremock-cms:
image: wiremock/wiremock:2.32.0
command: "--enable-stub-cors --global-response-templating" # Enable automatic sending of cross-origin (CORS) response headers.
ports:
- "8080"
volumes:
- wiremock_cms_data:/home/wiremock
environment:
VIRTUAL_HOST: cms-mock.docker
VIRTUAL_PORT: 8080

volumes:
root:
driver_opts:
Expand All @@ -58,3 +71,8 @@ volumes:
type: none
device: $PWD/.docker/wiremock/publizon
o: bind
wiremock_cms_data:
driver_opts:
type: none
device: $PWD/.docker/wiremock/cms
o: bind
5 changes: 4 additions & 1 deletion docs/campaigns.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ look something like this:
if (campaignFacets) {
mutate(
{
data: campaignFacets as CampaignMatchPOSTBodyItem[]
data: campaignFacets as CampaignMatchPOSTBodyItem[],
params: {
_format: "json"
}
},
{
onSuccess: (campaign) => {
Expand Down
2 changes: 1 addition & 1 deletion orval.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export default defineConfig({
},
input: {
target:
"https://raw.githubusercontent.com/danskernesdigitalebibliotek/dpl-cms/develop/openapi.json",
"https://raw.githubusercontent.com/danskernesdigitalebibliotek/dpl-cms/opening-hours-api/openapi.json",
converterOptions: {
indent: 2
}
Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@
},
"dependencies": {
"@danskernesdigitalebibliotek/dpl-design-system": "^0.0.0-b807dae9a38d9b7811b36f4b3f3063eec78f4f1f",
"@fullcalendar/core": "^6.1.11",
"@fullcalendar/daygrid": "^6.1.11",
"@fullcalendar/interaction": "^6.1.11",
"@fullcalendar/react": "^6.1.11",
"@fullcalendar/timegrid": "^6.1.11",
"@reach/alert": "^0.17.0",
"@reach/dialog": "^0.18.0",
"@reduxjs/toolkit": "^1.9.7",
Expand All @@ -156,7 +161,7 @@
"graphql": "^16.8.1",
"graphql-tag": "^2.12.6",
"lodash": "^4.17.21",
"orval": "^6.8.1",
"orval": "^6.26.0",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-device-detect": "^2.2.3",
Expand Down
Loading
Loading