Skip to content

Commit fae70ab

Browse files
authored
Merge pull request #13 from dddsw/sg/update-seed-data
Update seed data to include breaks and make UI show local time
2 parents f944a8b + b24544b commit fae70ab

3 files changed

Lines changed: 24 additions & 10 deletions

File tree

PocketDDD.BlazorClient/PocketDDD.BlazorClient/Features/Home/Store/EventDataMapper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ public static IImmutableList<TimeSlot> ToHomeStateModel(this EventDataResponseDT
99
eventData.TimeSlots.Select(ts => new TimeSlot
1010
{
1111
Id = ts.Id,
12-
From = ts.From,
13-
To = ts.To,
12+
From = ts.From.LocalDateTime,
13+
To = ts.To.LocalDateTime,
1414
Info = ts.Info,
1515
Sessions = eventData.Sessions
1616
.Where(s => s.TimeSlotId == ts.Id)

PocketDDD.BlazorClient/PocketDDD.BlazorClient/Features/Session/Store/SessionReducer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ state with
1515
Detail = action.Session.FullDescription,
1616
SpeakerName = action.Session.Speaker,
1717

18-
From = action.TimeSlot.From,
19-
To = action.TimeSlot.To,
18+
From = action.TimeSlot.From.LocalDateTime,
19+
To = action.TimeSlot.To.LocalDateTime,
2020

2121
TrackName = action.Track.Name,
2222
RoomName = action.Track.RoomName,
Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
-- Before running this script, ensure that FullDBScript.sql has been run to create the tables
2+
3+
-- Remove all the data
14
delete [UserSessionFeedback]
25
delete [UserEventFeedback]
36
delete [Sessions]
@@ -8,18 +11,29 @@ delete EventDetail
811

912
GO
1013

11-
DBCC CHECKIDENT ('[EventDetail]', RESEED, 1);
14+
-- Reset the identity columns
1215
DBCC CHECKIDENT ('[Tracks]', RESEED, 0);
1316
DBCC CHECKIDENT ('[TimeSlots]', RESEED, 0);
1417
DBCC CHECKIDENT ('[Sessions]', RESEED, 0);
1518

19+
-- There is hardcoding to EventDetail ID 1 so we reset to 1 not 0
20+
DBCC CHECKIDENT ('[EventDetail]', RESEED, 1); -- Use if this is a brand new table that has never been used before
21+
--DBCC CHECKIDENT ('[EventDetail]', RESEED, 0); -- Use if this is an empty table that used to have rows
22+
1623
GO
1724

25+
-- Add 2024 Sessionize ID
1826
Insert into EventDetail values (1, 'kn91wz1x')
1927

20-
Insert into Tracks values (1, 'Track 1','The Junction 🚉', 0)
21-
Insert into Tracks values (1, 'Track 2','Brunel''s Boardroom 🎩🛹', 1)
22-
Insert into Tracks values (1, 'Track 3','Brunel''s Breakout room 🎩☕', 2)
23-
Insert into Tracks values (1, 'Track 4','Clock tower room ⏲', 3)
28+
GO
2429

25-
GO
30+
-- Add breaks (these don't get imported from Sessionize)
31+
Insert into TimeSlots values (1,'2024-04-27 08:30:00.0000000 +01:00','2024-04-27 09:00:00.0000000 +01:00', 'Registration & Breakfast | Sponsored by Elastic Mint')
32+
Insert into TimeSlots values (1,'2024-04-27 09:00:00.0000000 +01:00','2024-04-27 09:30:00.0000000 +01:00', 'Welcome briefing')
33+
Insert into TimeSlots values (1,'2024-04-27 10:30:00.0000000 +01:00','2024-04-27 10:45:00.0000000 +01:00', 'Tea & Coffee')
34+
Insert into TimeSlots values (1,'2024-04-27 11:45:00.0000000 +01:00','2024-04-27 12:00:00.0000000 +01:00', 'Tea & Coffee')
35+
Insert into TimeSlots values (1,'2024-04-27 13:00:00.0000000 +01:00','2024-04-27 14:15:00.0000000 +01:00', 'Lunch | Sponsored by Just Eat Takeaway.com')
36+
Insert into TimeSlots values (1,'2024-04-27 15:15:00.0000000 +01:00','2024-04-27 15:45:00.0000000 +01:00', 'Afternoon Tea | Sponsored by dxw')
37+
Insert into TimeSlots values (1,'2024-04-27 16:45:00.0000000 +01:00','2024-04-27 17:15:00.0000000 +01:00', 'Closing & Prize draw')
38+
39+
GO

0 commit comments

Comments
 (0)