1
00:00:00,270 --> 00:00:05,310
Now, before we continue, I just noticed that have actually a doozy.

2
00:00:05,820 --> 00:00:09,300
Well, you know, I'm not checking for is loading in the Ajob.

3
00:00:09,540 --> 00:00:11,250
Before we do anything, why don't we do that?

4
00:00:11,670 --> 00:00:13,320
Let me go to add jump.

5
00:00:14,370 --> 00:00:17,150
And then around here, I have my submit button and all that.

6
00:00:17,650 --> 00:00:19,110
So why don't we do this?

7
00:00:19,320 --> 00:00:23,610
Why don't we go with is the loading which we want to check from the state, actually?

8
00:00:23,820 --> 00:00:26,400
So I don't know why I'm grabbing this over here.

9
00:00:26,520 --> 00:00:28,950
I want to go first with is loading.

10
00:00:29,400 --> 00:00:32,360
And if it's the case, I want to disable again that button.

11
00:00:32,369 --> 00:00:39,720
So let's set up here disabled and I is going to be equal to you is voting, which essentially just prevents

12
00:00:39,720 --> 00:00:44,400
user from submitting the form while we're still in the middle of the request.

13
00:00:44,850 --> 00:00:49,260
And now let's set up the entire functionality where first we'll start in actions.

14
00:00:50,380 --> 00:00:54,730
And then I guess I'll copy this one so onetime copy.

15
00:00:54,850 --> 00:00:57,070
Then let's select both of them.

16
00:00:57,470 --> 00:00:58,130
Let's move.

17
00:00:58,150 --> 00:01:03,280
We're going to go with create and then a job and back then.

18
00:01:03,820 --> 00:01:08,760
And now, of course, we're going to copy and paste and set this one up as success.

19
00:01:09,220 --> 00:01:16,080
So once we're successful and also we have one for error, let's set this one up, right?

20
00:01:16,420 --> 00:01:20,190
I mean, I don't need to already tell you what we're going to do in the app context.

21
00:01:20,200 --> 00:01:22,390
Where do need to start with import?

22
00:01:23,300 --> 00:01:30,330
So let's go here would create jobs again, create job success and create jobs.

23
00:01:31,220 --> 00:01:36,170
Right away, set them up in the reducer just so I don't get some doozies along the way.

24
00:01:36,830 --> 00:01:39,650
So that's going to be over here in Paris.

25
00:01:39,840 --> 00:01:40,850
OK, awesome.

26
00:01:41,150 --> 00:01:42,740
And not in the context.

27
00:01:43,750 --> 00:01:45,550
What set up our create job again?

28
00:01:46,030 --> 00:01:48,040
We pretty much have everything in place already.

29
00:01:48,130 --> 00:01:54,040
We have the auth fetch, which probably is the most important one.

30
00:01:54,370 --> 00:02:00,610
And then we just need to remember, well, what is the path and what actually we are expecting as far

31
00:02:00,610 --> 00:02:01,870
as the back end.

32
00:02:02,110 --> 00:02:08,440
So let me go over here with Konst and I'm going to set up create job now that is equal to and a sync

33
00:02:08,440 --> 00:02:08,949
function.

34
00:02:09,340 --> 00:02:10,750
We're not going to pass anything in.

35
00:02:11,020 --> 00:02:13,720
Again, we're getting the values from the state, so it doesn't really matter.

36
00:02:15,070 --> 00:02:19,030
The dispatch is over here and we want to go with type.

37
00:02:19,480 --> 00:02:23,620
And that one will be create job and not error.

38
00:02:23,780 --> 00:02:26,470
Some reason it's not giving me suggestions that I'm actually looking for.

39
00:02:26,900 --> 00:02:32,800
That's the first thing we want to dispatch event, try and catch since we'll have our access requests

40
00:02:32,800 --> 00:02:33,370
or accounts.

41
00:02:34,350 --> 00:02:36,360
And now let's pull out $5 from the state.

42
00:02:36,810 --> 00:02:41,310
So now I'm looking for what I'm looking for, this guy over here with me grow up.

43
00:02:41,610 --> 00:02:45,390
And I know that in the state, I will have all those values.

44
00:02:45,810 --> 00:02:47,130
So that's what I want to access.

45
00:02:47,670 --> 00:02:51,240
So me navigate back and I'll sort of equal to the state.

46
00:02:51,550 --> 00:02:52,650
That's why I'm getting it from.

47
00:02:53,010 --> 00:02:55,530
And let's just look for a position in this case.

48
00:02:55,920 --> 00:03:04,410
We also want to look for a company the job, location, correct location and also job type status.

49
00:03:04,650 --> 00:03:05,400
And you know what?

50
00:03:05,490 --> 00:03:07,050
There's another doozy in my read me.

51
00:03:07,800 --> 00:03:09,300
Actually, we're not looking for a token.

52
00:03:09,570 --> 00:03:11,190
So it's probably testing something.

53
00:03:11,670 --> 00:03:13,710
And therefore, I got it from the state.

54
00:03:13,950 --> 00:03:15,030
We actually don't need it.

55
00:03:15,480 --> 00:03:17,190
So let's go back to the Arab context.

56
00:03:17,280 --> 00:03:20,040
Grab all of these things and then remember, what is the URL?

57
00:03:20,070 --> 00:03:24,960
Well, it is API version one and then forward slash jobs.

58
00:03:25,710 --> 00:03:26,730
So let me double check.

59
00:03:26,760 --> 00:03:28,650
So there are no doozies in here.

60
00:03:29,040 --> 00:03:34,050
Let's say that I'm looking for what the approach and job reports.

61
00:03:34,080 --> 00:03:36,780
OK, so that's going to be the root.

62
00:03:36,900 --> 00:03:37,230
OK.

63
00:03:37,470 --> 00:03:38,400
I create the job.

64
00:03:38,760 --> 00:03:45,270
And then if I take a look at the server, you have API version one and then the jobs down here will

65
00:03:45,270 --> 00:03:46,620
authenticate the user.

66
00:03:47,250 --> 00:03:51,810
So again, this is going to be the case where we might get Baghdad for one, and that's the case of

67
00:03:51,810 --> 00:03:54,750
and we want to kick out the user from the application.

68
00:03:55,110 --> 00:03:55,770
So let's start.

69
00:03:56,240 --> 00:03:57,480
I'm going to go with 08 again.

70
00:03:57,480 --> 00:04:03,810
We're not looking for any kind of response because we're going to display jobs with a separate request

71
00:04:03,810 --> 00:04:04,200
anyway.

72
00:04:04,650 --> 00:04:10,100
And then we want to go with off fetch since we have right away a base URL whenever we want to go with

73
00:04:10,110 --> 00:04:10,830
for its lush.

74
00:04:10,860 --> 00:04:15,360
And remember, we also have those interceptors that add that token right from the get go.

75
00:04:15,720 --> 00:04:19,350
And then what do I want to pass in all these properties like?

76
00:04:19,350 --> 00:04:22,890
So those are going to be with my request.

77
00:04:23,280 --> 00:04:25,200
So let me copy and paste.

78
00:04:25,470 --> 00:04:29,190
And then if everything is correct, we want to dispatch two things.

79
00:04:29,520 --> 00:04:31,020
We want this batch first.

80
00:04:31,530 --> 00:04:35,220
The type of create job and success.

81
00:04:35,580 --> 00:04:36,210
That's number one.

82
00:04:36,510 --> 00:04:40,170
And second, if we're successful, what are we gonna do?

83
00:04:40,410 --> 00:04:44,100
We're to clear out the values in order to have this batch for that correct.

84
00:04:44,520 --> 00:04:50,550
Now, if you want, you can set up like I show here, the function clear hours from my kitchen.

85
00:04:50,550 --> 00:04:51,630
I'm going to go with dispatch.

86
00:04:52,380 --> 00:04:53,190
Don't ask me why.

87
00:04:53,290 --> 00:04:58,530
We're just going to say here dispatch and we want to set it equal to our clear values.

88
00:04:58,530 --> 00:04:58,740
One.

89
00:04:59,100 --> 00:05:05,670
Now, when it comes to error, again, I don't want that alert hanging there for those three seconds.

90
00:05:05,910 --> 00:05:08,940
So first, let's just go with if I'm not error.

91
00:05:10,010 --> 00:05:11,690
That and our response.

92
00:05:12,730 --> 00:05:13,670
I'm status.

93
00:05:14,380 --> 00:05:19,070
Essentially, this is another way Howard can ride that if it is equal to for one, then we don't want

94
00:05:19,130 --> 00:05:22,630
this pressure that to lurk altogether or simply want to return from here.

95
00:05:22,750 --> 00:05:28,720
Now, if that is not the case, then we go with this patch and then Typekit is equal to create jobs

96
00:05:28,720 --> 00:05:31,270
and God is giving me not what I'm looking for.

97
00:05:31,570 --> 00:05:32,800
I want the arrow on.

98
00:05:32,810 --> 00:05:38,060
And then as far as the payload, remember, it's always going to be anywhere in that message.

99
00:05:38,290 --> 00:05:42,300
So I'm going to set up my message properly, and that will be equal to error dot.

100
00:05:42,760 --> 00:05:48,460
Then a response dot data and dot and then the message one.

101
00:05:49,390 --> 00:05:57,880
Let's save this one, and let's go to a job one, so I'm looking for my ad job component I already have

102
00:05:58,240 --> 00:06:04,510
disabled set equal to is loading now and you're not actually been past the function.

103
00:06:04,870 --> 00:06:09,340
See how easy it is to make a mistake not to go here with create job.

104
00:06:09,850 --> 00:06:10,600
Pass it down.

105
00:06:10,990 --> 00:06:13,690
And then in the ad job, we should have ActionScript.

106
00:06:14,290 --> 00:06:17,740
So let's say here, create an job.

107
00:06:18,130 --> 00:06:25,900
Once I save it in the handle, submit not only I want to check for these rules and as an official comment

108
00:06:25,900 --> 00:06:28,120
amount, just so we can test out the errors.

109
00:06:28,450 --> 00:06:32,260
And then let's also check what is editing, which eventually we will invoke.

110
00:06:32,260 --> 00:06:37,960
So editing, which again, a nice is before a thousand times is false right now.

111
00:06:38,350 --> 00:06:40,230
And by default, it's always going to be full.

112
00:06:40,690 --> 00:06:41,260
That's the case.

113
00:06:41,280 --> 00:06:41,890
We return.

114
00:06:42,220 --> 00:06:44,330
Let me add the common just so I don't forget.

115
00:06:44,470 --> 00:06:50,290
Meaning, I mean, I'll definitely won't forget adding at a job, but just so we're all on the same

116
00:06:50,290 --> 00:06:50,560
page.

117
00:06:50,830 --> 00:06:56,200
Eventually, hopefully, I spelled it correctly and we're going to go at it job and we'll invoke it

118
00:06:56,650 --> 00:06:58,390
now where I have the log, though.

119
00:06:59,680 --> 00:07:06,610
I want a moment and we're going to go create job, so let's save this one and let's test it out where

120
00:07:07,000 --> 00:07:08,050
I want to go here.

121
00:07:08,390 --> 00:07:09,520
And you know what?

122
00:07:09,850 --> 00:07:13,100
I will start with error.

123
00:07:13,510 --> 00:07:16,810
Let's try it out, whether we're getting back proper error from the server.

124
00:07:17,080 --> 00:07:21,970
So let's go here and we right away have create a job begin.

125
00:07:22,510 --> 00:07:24,490
And apparently it is an issue.

126
00:07:25,000 --> 00:07:25,640
And you know what?

127
00:07:25,660 --> 00:07:25,960
Yeah.

128
00:07:26,290 --> 00:07:27,940
I mean, what was I thinking?

129
00:07:28,330 --> 00:07:30,010
I mean, I didn't set up the producer.

130
00:07:30,010 --> 00:07:30,400
Correct?

131
00:07:30,850 --> 00:07:31,360
Tough guy.

132
00:07:31,720 --> 00:07:36,610
OK, so let's go here to the producer and let's figure out what we're looking for.

133
00:07:36,910 --> 00:07:37,660
That's the thing.

134
00:07:37,660 --> 00:07:43,300
When you set up the read me in one way, then I mean, you also coded that way as well.

135
00:07:43,690 --> 00:07:49,540
So this is going to be the case where essentially we want to set up the loading when we begin.

136
00:07:49,820 --> 00:08:00,310
So miss, crawl over here and I'm going to go with if an action that type now I'm looking for create

137
00:08:00,310 --> 00:08:01,930
job and not error.

138
00:08:02,470 --> 00:08:03,790
Let's go with begin first.

139
00:08:04,330 --> 00:08:06,580
And here we go with return.

140
00:08:06,620 --> 00:08:08,380
That and not state.

141
00:08:08,710 --> 00:08:12,370
And now let's look for is loading and insert equal to true.

142
00:08:12,760 --> 00:08:15,010
That's when we are making that request.

143
00:08:15,550 --> 00:08:16,690
And you know what?

144
00:08:17,230 --> 00:08:22,540
Let's go where we have the, I don't know, set up user error.

145
00:08:23,050 --> 00:08:26,230
Let's take this one, and let's just change around some hours here.

146
00:08:26,560 --> 00:08:28,930
I think that's going to be a little bit better.

147
00:08:29,200 --> 00:08:33,450
So copy and paste, I'm not looking for create user and actually error as well.

148
00:08:33,460 --> 00:08:37,090
I want to go would create job and then success.

149
00:08:37,480 --> 00:08:42,100
And here we don't have much like I said, we just want to set up is loading files.

150
00:08:42,250 --> 00:08:43,260
We want to show the alert.

151
00:08:43,299 --> 00:08:47,170
It's not going to be danger, actually going to be success or here.

152
00:08:47,890 --> 00:08:54,500
And as far as the message, well, what does this play a new job creator really up to you new job and

153
00:08:54,510 --> 00:08:55,360
then create it?

154
00:08:56,250 --> 00:08:57,030
That's the message.

155
00:08:58,080 --> 00:09:00,900
Save this one and I'll take this one.

156
00:09:01,620 --> 00:09:05,270
Copy and paste, and let's set it equal to error.

157
00:09:06,320 --> 00:09:12,800
And as far as this goes, yes, gloating is still false, that still says the same solar, true?

158
00:09:12,800 --> 00:09:13,070
Yep.

159
00:09:13,700 --> 00:09:20,120
But we're going to go with danger and this is the case where we will pass in that action payload message

160
00:09:20,130 --> 00:09:23,480
through action, payload and message.

161
00:09:23,840 --> 00:09:25,410
So now let's see whether everything works.

162
00:09:25,430 --> 00:09:26,120
I mean, should.

163
00:09:26,480 --> 00:09:29,320
So now let's again tested out with an IRA.

164
00:09:29,570 --> 00:09:32,660
And yet I have 400, which is awesome.

165
00:09:32,930 --> 00:09:34,250
Have the 400 response.

166
00:09:34,490 --> 00:09:35,660
Please provide all of ours.

167
00:09:35,970 --> 00:09:36,860
OK, that's good.

168
00:09:37,130 --> 00:09:39,800
Now one thing I'm noticing, though, that it's not going away.

169
00:09:39,810 --> 00:09:41,730
And now what's the reason for that?

170
00:09:41,790 --> 00:09:48,040
Well, because in here we also need to go after trying to catch and actually clear the alert, correct.

171
00:09:48,050 --> 00:09:53,300
So we'll go here with clear and alert like, so let's invoke it.

172
00:09:53,690 --> 00:09:54,770
Now, let's try one more time.

173
00:09:54,770 --> 00:09:55,670
I'm going to submit.

174
00:09:55,670 --> 00:09:56,390
We get back.

175
00:09:56,570 --> 00:09:57,740
Please provide all of ours.

176
00:09:57,950 --> 00:10:02,780
Now this is coming from the server since we commented it out on our end.

177
00:10:03,160 --> 00:10:05,990
And then let's try to create that job.

178
00:10:06,830 --> 00:10:11,090
So I'm going to go over here with let's do the something again, something.

179
00:10:11,660 --> 00:10:13,130
And let's copy and paste.

180
00:10:13,880 --> 00:10:14,870
It's not going to be Mexico.

181
00:10:14,880 --> 00:10:16,250
I'm going to go with something.

182
00:10:16,560 --> 00:10:19,940
Let's submit we have new job created.

183
00:10:20,150 --> 00:10:22,880
And now let me go and take a look at my database.

184
00:10:23,360 --> 00:10:26,330
And once I navigate to my Atlas account, what do you know?

185
00:10:26,600 --> 00:10:30,470
Not only I have the job that we created with the postman.

186
00:10:30,710 --> 00:10:34,250
I also have the one that we just created with a frontend.

187
00:10:34,610 --> 00:10:40,190
And this concludes our job for now until we set up at a job functionality.

188
00:10:40,580 --> 00:10:47,990
But before we switch back to the server and start setting up the good jobs functionality in there,

189
00:10:48,380 --> 00:10:54,560
I actually want to go to the AJAB and just make sure that this functionality works.

190
00:10:54,570 --> 00:10:59,210
So I still want to check for these empty values here on the frontend.

191
00:10:59,660 --> 00:11:06,170
And with this in place now, I can start worrying about getting all the jobs back from the server.

