1
00:00:01,440 --> 00:00:06,370
So now we have to database functions that allow us to check for availability forums.

2
00:00:06,390 --> 00:00:12,870
We have one that allows us to search for all rooms, and we have one that allows us to search for rooms

3
00:00:12,870 --> 00:00:14,880
by I.D., which is right up here.

4
00:00:15,660 --> 00:00:17,760
So let's think about what we want to do.

5
00:00:17,760 --> 00:00:19,800
First of all, let's make sure our application is running.

6
00:00:20,130 --> 00:00:23,240
And I do that by bringing in my terminal.

7
00:00:23,250 --> 00:00:23,760
It's not.

8
00:00:23,760 --> 00:00:28,620
So let's run it and then we fire up our favorite Web browser, whatever that may be.

9
00:00:28,650 --> 00:00:29,730
I'll use edged this time.

10
00:00:29,730 --> 00:00:37,890
I haven't used any edge in a while and I will go to localhost Eighty-eight.

11
00:00:40,860 --> 00:00:46,440
And here we are, so there are two places where we can check for availability, and the first one is

12
00:00:46,440 --> 00:00:48,470
at the bottom of this screen, make reservation.

13
00:00:48,480 --> 00:00:52,500
Now, that takes us to this search screen search for availability.

14
00:00:52,500 --> 00:00:59,880
And here I choose a start and an end or an arrival and a departure, and that's at the universal search

15
00:00:59,880 --> 00:01:00,980
dash availability.

16
00:01:00,990 --> 00:01:04,020
So let's go back to our code and see if we have a route set up for that.

17
00:01:04,830 --> 00:01:06,390
And it looks like we do.

18
00:01:06,510 --> 00:01:08,360
We have post availability.

19
00:01:08,400 --> 00:01:11,140
So let's look at that right now.

20
00:01:11,190 --> 00:01:17,130
All this does is grab the start from the forum post and grab the end from the forum post and store them

21
00:01:17,130 --> 00:01:17,480
here.

22
00:01:17,490 --> 00:01:19,320
And those, of course, are string's.

23
00:01:19,590 --> 00:01:24,450
Anything you grab from a forum post will be in the form of a string and then it just writes it to the

24
00:01:24,450 --> 00:01:25,100
browser window.

25
00:01:25,110 --> 00:01:26,290
That's not terribly helpful.

26
00:01:26,790 --> 00:01:32,940
What I want to do is I want to call the database function that searches for availability for all rooms.

27
00:01:33,120 --> 00:01:38,660
And if you look at that, that requires start and end in the form of time dot time.

28
00:01:39,090 --> 00:01:46,890
So I need to take these two variables, start an end and convert them from strings to time dot time.

29
00:01:47,010 --> 00:01:48,160
Well, we did that once already.

30
00:01:48,210 --> 00:01:50,670
Let's just look for the word layout, because I know that's part of it.

31
00:01:50,670 --> 00:01:51,060
Yes.

32
00:01:51,060 --> 00:01:51,620
Right here.

33
00:01:52,110 --> 00:01:56,190
This will actually take two strings.

34
00:01:56,760 --> 00:02:02,820
I only need these these ones actually, this will take our strings of dates are dates that are in the

35
00:02:02,820 --> 00:02:06,890
form of string and convert them into times.

36
00:02:07,110 --> 00:02:13,410
OK, so let's go back and find our post availability again, wherever that is post availability.

37
00:02:13,440 --> 00:02:13,980
Here it is.

38
00:02:14,390 --> 00:02:15,780
Now, let's just paste that code in there.

39
00:02:16,230 --> 00:02:22,500
And I needed to make one change because I'm not calling it SD and I'm calling it start and I'm calling

40
00:02:22,500 --> 00:02:23,550
it end.

41
00:02:24,550 --> 00:02:28,760
OK, so now I have my two dates in time.

42
00:02:29,050 --> 00:02:34,990
Time format so I can actually call my function that allows me to search for availability for all rooms.

43
00:02:35,020 --> 00:02:36,130
Let's see what that returns.

44
00:02:36,520 --> 00:02:39,970
So it takes a start, a time to start in and as time, time.

45
00:02:39,970 --> 00:02:43,980
And it returns a slice of model's room and potentially an error.

46
00:02:44,140 --> 00:02:46,080
OK, so let's get that.

47
00:02:46,540 --> 00:02:47,520
We'll call our variable.

48
00:02:47,530 --> 00:02:52,210
We're going to store the slice in Rum's, which makes sense because it's a slice of rooms and er will

49
00:02:52,210 --> 00:02:54,000
be our as usual.

50
00:02:54,100 --> 00:03:04,450
That's going to be equal to m dot db m dot db dot search availability for all rooms and we'll pass at

51
00:03:04,450 --> 00:03:09,790
our start date and our end date and then we'll check for an error.

52
00:03:10,150 --> 00:03:11,230
So let's check for an error.

53
00:03:11,890 --> 00:03:20,860
If error is not equal to nil then I'll just go helper's dot server error w and the error and we'll return.

54
00:03:22,360 --> 00:03:27,100
Now let's see what's in that room's variable, so I'll just print it out to the screen for right now

55
00:03:27,100 --> 00:03:27,910
to the terminal.

56
00:03:27,910 --> 00:03:39,250
So I will say for I don't care about the index I is equal to range rooms and I'll just say app dot info

57
00:03:39,250 --> 00:03:48,010
log sorry m dot app dot info log dot print line and we'll say room.

58
00:03:49,700 --> 00:03:59,840
And I thought I'd I'd try that again, I thought I'd, I thought, remain OK and everything else just

59
00:03:59,840 --> 00:04:00,830
happened the way that it does.

60
00:04:00,860 --> 00:04:04,460
So this will see if we're actually getting useful information from our database.

61
00:04:04,970 --> 00:04:06,100
So let's stop this.

62
00:04:06,140 --> 00:04:07,130
Start this again.

63
00:04:09,710 --> 00:04:17,990
Go back to this page Reloaded, and before I do this, there's one thing I need to make sure I need

64
00:04:17,990 --> 00:04:23,600
to be able to search for dates where there is availability and let's make sure what we have in our database

65
00:04:23,600 --> 00:04:24,080
right now.

66
00:04:24,560 --> 00:04:28,610
So we go back to our database and look in post Toco and there it is, room restrictions.

67
00:04:28,610 --> 00:04:30,610
Make sure it's the most recent version.

68
00:04:30,890 --> 00:04:31,370
It is.

69
00:04:31,370 --> 00:04:37,550
So there's only one restriction for February the 1st, 2021 to February the 4th, 2021.

70
00:04:37,560 --> 00:04:41,630
So as long as I search outside of those date ranges, I'll get at least one value.

71
00:04:41,780 --> 00:04:47,600
If I search in that date range, I will get only one value so I can pretty much choose any dates I want.

72
00:04:47,630 --> 00:04:47,990
All right.

73
00:04:47,990 --> 00:04:53,870
So let's choose some dates here and here and see what that gives us is going to print the start and

74
00:04:53,870 --> 00:04:55,000
end date to the screen.

75
00:04:55,310 --> 00:04:55,770
Yes.

76
00:04:56,360 --> 00:05:02,410
And on my terminal where I started it up, it says there are two rooms available that is perfect.

77
00:05:02,840 --> 00:05:10,700
So it looks like when there is availability, the actual rooms variable will have at least one entry.

78
00:05:11,000 --> 00:05:16,400
When there is no availability, there will be nothing in that slice.

79
00:05:16,400 --> 00:05:17,420
It'll be an empty slice.

80
00:05:17,420 --> 00:05:19,580
So I can actually just check the length of the slice.

81
00:05:19,880 --> 00:05:27,130
If Len and the slices named rooms is equal to zero, then no availability.

82
00:05:28,220 --> 00:05:30,910
Otherwise there is availability.

83
00:05:30,950 --> 00:05:32,360
So it does handle this case.

84
00:05:32,360 --> 00:05:39,710
First, I'm going to go back to my database and I'm going to enter another restriction here for Remedy

85
00:05:39,710 --> 00:05:41,270
two, because I only have two rooms.

86
00:05:41,270 --> 00:05:48,800
I'd one in 92 and I'll enter it with exactly the same start and end a 20 21 02 01 to twenty twenty one

87
00:05:48,830 --> 00:05:57,020
zero two zero four to get them exactly the same room it will be to because I want both rooms to be blocked

88
00:05:57,020 --> 00:05:57,350
off.

89
00:05:57,770 --> 00:06:03,800
I'll leave the reservation id empty because there is no reservation to put here so it'll be stored as

90
00:06:03,800 --> 00:06:04,280
no.

91
00:06:04,460 --> 00:06:09,320
The restriction idea will be two which is an owner closing and I'll just put any date in here.

92
00:06:09,320 --> 00:06:15,140
Twenty, twenty, eleven, eighteen, twenty, twenty eleven eighteen.

93
00:06:15,440 --> 00:06:16,300
And save this.

94
00:06:17,540 --> 00:06:17,950
All right.

95
00:06:18,140 --> 00:06:24,590
So now there should be no availability provided I choose dates that are either equal to or inside this

96
00:06:24,590 --> 00:06:28,970
date range, and that's February the 1st to February the 4th of 2021.

97
00:06:30,410 --> 00:06:37,730
So let me go back to my browser, go back a screen, reload this to make sure it's current and I will

98
00:06:37,730 --> 00:06:40,850
choose some availability that's in that date range.

99
00:06:40,850 --> 00:06:41,930
So I will choose.

100
00:06:45,250 --> 00:06:49,950
That's odd, shouldn't be doing that autofill there, but I know it doesn't matter, I will choose.

101
00:06:50,130 --> 00:06:51,090
I need to get rid of that.

102
00:06:51,780 --> 00:06:52,620
Go there.

103
00:06:53,280 --> 00:06:56,100
I need to choose January February.

104
00:06:56,640 --> 00:07:04,280
So I'll choose February the 2nd, 2021 to February the 3rd, 2021, and search and see what I get.

105
00:07:05,250 --> 00:07:10,320
So there's my dates and down here in my terminal, if I bring that back up.

106
00:07:12,740 --> 00:07:18,260
I don't know if that's the last time or this time, let's find out, General, one major general.

107
00:07:18,560 --> 00:07:20,690
So that's 12, 22.

108
00:07:20,900 --> 00:07:21,950
I guess I didn't do it.

109
00:07:22,460 --> 00:07:23,900
OK, so.

110
00:07:30,910 --> 00:07:36,250
That's exactly right, because there is no available to be printed out, therefore there's no availability.

111
00:07:36,280 --> 00:07:44,260
Let's make sure I'll just say emerg app dot info log dot print line, no availability.

112
00:07:44,530 --> 00:07:47,860
So I'm going to start my application just because I want to make sure this is right.

113
00:07:47,860 --> 00:07:48,720
Started up again.

114
00:07:51,310 --> 00:07:52,210
Clear the screen.

115
00:07:53,590 --> 00:07:54,820
Start the application.

116
00:07:55,600 --> 00:07:58,000
All right, so there's nothing being printed in the terminal right now.

117
00:07:58,030 --> 00:08:03,520
Let's go back again and go back one screen and just resubmit this form.

118
00:08:03,790 --> 00:08:05,470
So I want to get rid of that.

119
00:08:06,520 --> 00:08:10,810
Go back to February the 2nd to February the 3rd.

120
00:08:11,300 --> 00:08:12,490
OK, search.

121
00:08:13,660 --> 00:08:16,640
And now I should have the no availability message.

122
00:08:16,660 --> 00:08:17,930
That's exactly what I wanted.

123
00:08:17,940 --> 00:08:18,740
So that's working.

124
00:08:18,850 --> 00:08:19,330
All right.

125
00:08:20,350 --> 00:08:27,880
Now, what do I want to have happen when I'm on this screen here and I search for availability and there

126
00:08:27,880 --> 00:08:28,830
is no availability?

127
00:08:28,840 --> 00:08:32,100
I certainly don't want just to start and end date printed to the browser window.

128
00:08:32,110 --> 00:08:33,280
That's not helpful at all.

129
00:08:33,670 --> 00:08:39,520
What I actually want to have happen is I want the user to be taken back to this screen with an error

130
00:08:39,520 --> 00:08:40,720
message, and we can do that.

131
00:08:41,200 --> 00:08:45,820
We already know how to do that, in fact, so I can get rid of this because it's just printing to the

132
00:08:45,820 --> 00:08:46,210
terminal.

133
00:08:46,210 --> 00:08:47,020
That's not helpful.

134
00:08:47,350 --> 00:08:48,850
And I don't want to just print that.

135
00:08:49,240 --> 00:08:56,170
Instead, I want to generate an error message, so I'll store that in the session Emden app session

136
00:08:56,620 --> 00:09:01,210
dot put and it requires the context which I can get from ARG context.

137
00:09:03,160 --> 00:09:09,730
And it requires a key, and when we want an error message to be displayed, we call that error and then

138
00:09:09,730 --> 00:09:12,100
we want the value, just the message that's displayed.

139
00:09:12,130 --> 00:09:15,900
So I'll just put no availability.

140
00:09:17,290 --> 00:09:18,500
So I saw that in the session.

141
00:09:18,700 --> 00:09:25,840
Now I need to redirect them, export redirect and it requires w are you url and Chote.

142
00:09:26,920 --> 00:09:30,670
So W are the you are always search.

143
00:09:32,480 --> 00:09:42,500
Available Bill Bill T and my code has to be in the 300 range HDP status, see whether that's in the

144
00:09:42,500 --> 00:09:43,340
300 range.

145
00:09:43,790 --> 00:09:45,580
And then, of course, I want to return.

146
00:09:45,590 --> 00:09:47,900
I want everything else to stop at this point.

147
00:09:50,690 --> 00:09:54,260
So let's see if that works, so I'll stop my application.

148
00:09:55,340 --> 00:09:58,040
Clear the screen, run my application.

149
00:10:01,160 --> 00:10:09,110
It runs go back here, reload the screen to make sure it's current, and I'll choose once again February

150
00:10:09,110 --> 00:10:11,900
the 2nd to February the 3rd.

151
00:10:12,260 --> 00:10:17,540
And hopefully when I click this, it will take me back to the screen with an error message, and it

152
00:10:17,540 --> 00:10:18,860
does perfect.

153
00:10:19,400 --> 00:10:24,110
But if I choose dates that are available and it doesn't matter what they are, it should just print

154
00:10:24,110 --> 00:10:26,960
the start date an ending to the screen and it does.

155
00:10:27,050 --> 00:10:28,120
OK, so that works.

156
00:10:28,640 --> 00:10:33,950
So obviously, if there is availability, I don't want to be just displaying the screen.

157
00:10:34,220 --> 00:10:38,960
I want to take them to a page where they say where it says to them, hey, these rooms are available

158
00:10:38,960 --> 00:10:40,100
for your chosen dates.

159
00:10:41,450 --> 00:10:43,760
So to do that, I need to have another page.

160
00:10:43,790 --> 00:10:50,180
So I'll go copy the contents of the about page and I will open the templates or create a new file in

161
00:10:50,190 --> 00:10:55,160
the templates folder, which I will call Choose Room Page Template.

162
00:10:56,240 --> 00:11:01,100
And I will add that to get and I'll just paste in the about page and see what I want to do here.

163
00:11:01,200 --> 00:11:08,390
What I'm going to do is change the title to choose a room and then I want to range through whatever

164
00:11:08,390 --> 00:11:09,410
rooms are available.

165
00:11:09,410 --> 00:11:17,060
So whatever I got for this variable rooms in my handler, I want to pass that to a template and display

166
00:11:17,060 --> 00:11:17,320
those.

167
00:11:17,480 --> 00:11:20,300
So let's do the template first, then we'll pass the data there.

168
00:11:20,930 --> 00:11:27,890
So I'm going to assume I'm going to use that data a member of my template data.

169
00:11:27,950 --> 00:11:33,440
So if you look at template data, it has this data field, remember, and that can hold whatever we

170
00:11:33,440 --> 00:11:34,300
want to put into that.

171
00:11:34,340 --> 00:11:40,190
So I'm going to assume that I'm going to get a value, a variable that I'll call rooms and I will pull

172
00:11:40,190 --> 00:11:45,770
that from the index of data, which is passed to every single template, and we'll have to populate

173
00:11:45,770 --> 00:11:45,920
it.

174
00:11:46,160 --> 00:11:47,420
And I'll call it rooms.

175
00:11:48,260 --> 00:11:55,130
And then I'll just for the sake of of making sure it all works, I'll arrange through rooms and that

176
00:11:55,130 --> 00:11:59,380
requires an end and I'll just print the room name for now.

177
00:11:59,990 --> 00:12:00,650
So.

178
00:12:01,550 --> 00:12:06,410
Room name, and then I'll put a blank line or a line break after that.

179
00:12:06,890 --> 00:12:08,330
OK, so the template is ready.

180
00:12:08,520 --> 00:12:12,110
Let's go back to our handlers and how are we going to pass that data there?

181
00:12:12,140 --> 00:12:17,810
Well, I know that if this fails, if I have no availability, I'm being taken back so I can just do

182
00:12:17,810 --> 00:12:18,920
it below the if statement.

183
00:12:19,920 --> 00:12:21,440
So let's create a variable called data.

184
00:12:21,470 --> 00:12:22,730
That's going to be a map.

185
00:12:22,730 --> 00:12:25,370
Make a map of string interface.

186
00:12:26,920 --> 00:12:31,990
Which is what that data format or data variable has to be in template data, and then I'll store my

187
00:12:31,990 --> 00:12:37,690
rooms in their data rooms, plural, because that's what I'm calling it in the template is equal to

188
00:12:37,690 --> 00:12:38,020
rooms.

189
00:12:39,010 --> 00:12:41,150
And now I need to render that template and past data.

190
00:12:41,170 --> 00:12:42,390
I've done that many times.

191
00:12:42,450 --> 00:12:44,440
I'll just find one where we do it right here.

192
00:12:44,980 --> 00:12:50,760
We'll copy this and come back up to my line up here.

193
00:12:50,770 --> 00:12:54,130
Get rid of this because we're not writing to the browser window anymore.

194
00:12:54,130 --> 00:12:54,880
Just text.

195
00:12:55,010 --> 00:13:00,510
Instead, we're going to render the template we just created, which I will call, which I called Choose

196
00:13:00,520 --> 00:13:01,600
Room Page.

197
00:13:02,500 --> 00:13:06,820
Let's make sure we've got this right so we create a data variable.

198
00:13:06,820 --> 00:13:09,280
That's a map of string interface.

199
00:13:09,670 --> 00:13:15,430
We store the rooms in that map and then we passed the data to the template choose room.

200
00:13:15,430 --> 00:13:17,740
And the template is in fact called Choose Room.

201
00:13:17,770 --> 00:13:18,330
This should work.

202
00:13:19,390 --> 00:13:20,590
So start the application.

203
00:13:20,590 --> 00:13:21,640
Start the application.

204
00:13:24,610 --> 00:13:31,180
We go back to our browser, back on screen, search for availability for any two dates that are any

205
00:13:31,180 --> 00:13:33,520
dates, as long as they're not the ones that are blocked.

206
00:13:33,550 --> 00:13:35,230
This should work fine search.

207
00:13:35,800 --> 00:13:37,480
And there it lists the rooms.

208
00:13:37,660 --> 00:13:40,140
OK, we don't want to just list the rooms on this template.

209
00:13:40,510 --> 00:13:46,360
We actually want to make those you URLs so I can pick on pick my room and I might put a picture next

210
00:13:46,360 --> 00:13:47,380
to it or something like that.

211
00:13:47,380 --> 00:13:48,220
But I'm not going to.

212
00:13:48,220 --> 00:13:50,110
It's something you can do on your own if you wish.

213
00:13:50,890 --> 00:13:54,760
What I can do instead is actually just make these links.

214
00:13:54,760 --> 00:13:57,790
So I click on them and then it takes me to the reservation screen.

215
00:13:57,970 --> 00:14:01,390
But what information do I need on that reservation screen?

216
00:14:01,420 --> 00:14:02,280
Well, let's look at it.

217
00:14:02,350 --> 00:14:10,450
I'll open a new tab and go to localhost 1880 Make Dasch reservation.

218
00:14:11,320 --> 00:14:12,550
So this is a form.

219
00:14:12,550 --> 00:14:17,410
And if you recall, we gave it the start date and the end date just as temporary fields.

220
00:14:17,410 --> 00:14:18,510
And that's not helpful.

221
00:14:18,520 --> 00:14:24,640
I need to actually store or have the start date and end date not editable on the screen, because I

222
00:14:24,640 --> 00:14:30,820
don't want the the user to say, oh, I, I want a different date and just arbitrarily change it because

223
00:14:30,820 --> 00:14:31,720
of my reservation.

224
00:14:31,720 --> 00:14:34,630
When I'm making it, I don't check availability at all.

225
00:14:35,620 --> 00:14:38,650
I'm assuming that's done before I ever get to this screen.

226
00:14:39,310 --> 00:14:41,440
So I don't want these to be displayed here.

227
00:14:41,440 --> 00:14:47,230
Maybe I'll put them at the top reservation details arrival and departure and the room they're staying

228
00:14:47,230 --> 00:14:47,390
in.

229
00:14:47,590 --> 00:14:49,890
So this is going to have to change.

230
00:14:50,140 --> 00:14:58,540
More importantly, I need to store that start date and date and remedy somewhere before I actually display

231
00:14:58,540 --> 00:14:59,200
this page.

232
00:14:59,530 --> 00:15:02,400
And we can just do that quite easily by putting it in session.

233
00:15:03,070 --> 00:15:10,440
So let's go back here and let's store some information in the session before we render the template.

234
00:15:10,690 --> 00:15:16,870
So I want to put the start date and the end date, and I want to put a time dot time in there.

235
00:15:16,880 --> 00:15:20,560
So can I just store a time dot time in my session?

236
00:15:21,970 --> 00:15:23,110
Chances are I can't.

237
00:15:23,290 --> 00:15:29,680
But what I can do if I without actually declaring it, if I go back to my main function, I am in fact

238
00:15:29,680 --> 00:15:34,060
storing a reservation model type as something I can put in the session.

239
00:15:34,060 --> 00:15:40,600
So maybe it makes more sense to create an empty reservation variable, populate the start date and end

240
00:15:40,600 --> 00:15:44,990
date and remedy in that, and store that reservation model in the session.

241
00:15:45,040 --> 00:15:45,660
Let's do that.

242
00:15:46,930 --> 00:15:48,130
So back to my handlers.

243
00:15:48,160 --> 00:15:49,510
I will create a new reservation.

244
00:15:49,510 --> 00:15:54,760
I'll call it Rez and that's a sign the Value of Models Reservation.

245
00:15:56,560 --> 00:15:59,860
And I will say Phil Oldfield's, which is built into goaland.

246
00:15:59,860 --> 00:16:03,490
If not, you're going to if it's not in the one you're using, I have to do it manually.

247
00:16:04,060 --> 00:16:05,320
I don't care about the ID.

248
00:16:05,740 --> 00:16:06,820
I don't have one of those yet.

249
00:16:07,120 --> 00:16:10,870
I don't care about the first name or last name or email at all.

250
00:16:11,830 --> 00:16:14,140
I do care about these three things.

251
00:16:15,930 --> 00:16:20,610
Those are the only ones I care about, the start date, the end date and the remedy, and I already

252
00:16:20,610 --> 00:16:23,960
have all of that information stored somewhere.

253
00:16:24,210 --> 00:16:31,020
So what I can do here is store the start date and end date and then leave the room it empty and then

254
00:16:31,020 --> 00:16:33,090
populate that when they click on it.

255
00:16:33,100 --> 00:16:36,640
But I need to store the start date and end date so I can even get rid of this right now.

256
00:16:37,230 --> 00:16:40,410
This will be a start date.

257
00:16:41,280 --> 00:16:44,550
This will be the end date.

258
00:16:45,240 --> 00:16:47,850
And I'll just stick that reservation right in the session.

259
00:16:47,850 --> 00:17:02,520
So I will say m dot app dot session dot put our context and I'll call this reservation and I will put

260
00:17:02,520 --> 00:17:03,120
in the value.

261
00:17:04,710 --> 00:17:06,550
Now that is stored in the session.

262
00:17:06,570 --> 00:17:09,930
So I have that available, that information available to me.

263
00:17:10,160 --> 00:17:17,610
OK, so when I render this page then I know that I've already stored the necessary information in the

264
00:17:17,610 --> 00:17:18,030
session.

265
00:17:18,030 --> 00:17:19,160
I have to start that mandate.

266
00:17:19,170 --> 00:17:20,090
That's all I care about.

267
00:17:20,610 --> 00:17:22,380
So let's make sure everything compiles.

268
00:17:23,970 --> 00:17:24,630
Run this.

269
00:17:27,110 --> 00:17:30,390
Go back to our browser, which was EDG, I believe, yes, it was.

270
00:17:30,450 --> 00:17:32,140
OK, let's start right from the beginning.

271
00:17:33,350 --> 00:17:36,500
Search for some dates where I know I'm going to get some availability.

272
00:17:36,500 --> 00:17:41,110
So the 18th to the 19th search and there they are.

273
00:17:41,270 --> 00:17:46,100
So at this point, I now have the start date and the end date saved.

274
00:17:46,100 --> 00:17:51,350
I can use that information if I need to, and I'm going to need to because I may need to make this clickable.

275
00:17:52,250 --> 00:17:58,680
So what I want to have happen next is when I click on a link here, it pulls my my reservation with

276
00:17:58,680 --> 00:18:04,160
the start date and end date out of the session and then assigns the idea of the room that I just clicked

277
00:18:04,160 --> 00:18:10,730
on to that reservation variable, puts it back in the session, updated with the new information and

278
00:18:10,730 --> 00:18:12,530
then display the make reservation screen.

279
00:18:12,890 --> 00:18:13,280
All right.

280
00:18:13,400 --> 00:18:15,160
We'll do that in the next lecture.

281
00:18:15,200 --> 00:18:18,130
We're getting close to being able to actually book a room now.
