1
00:00:00,330 --> 00:00:08,820
Nice work, we have the default values for two jobs in the state, so now set up the get all jobs request

2
00:00:09,150 --> 00:00:09,930
on the front and.

3
00:00:10,880 --> 00:00:16,100
Like always, we want to start in the actions, so there's going to be to our actions, get jobs, begin

4
00:00:16,400 --> 00:00:17,810
and get job success.

5
00:00:18,230 --> 00:00:21,890
And I'll spend the next video covering, why don't we have the IRA?

6
00:00:22,100 --> 00:00:25,610
Because this is a very, very important part of the application.

7
00:00:25,960 --> 00:00:32,870
Then once we have the actions there, import, export and all that and then we want to set up get jobs

8
00:00:33,020 --> 00:00:33,470
function.

9
00:00:33,890 --> 00:00:35,540
And here you'll notice this URL.

10
00:00:36,110 --> 00:00:38,660
Now, why am I structuring it in this way?

11
00:00:38,690 --> 00:00:43,070
Well, because again, there are going to be more functionality once we set up the filtering.

12
00:00:43,550 --> 00:00:47,750
For now, we should just remember that yes, we have API version one.

13
00:00:48,080 --> 00:00:53,510
But since we have auth, which we already have the best URL and since the path to get all the jobs is

14
00:00:53,660 --> 00:00:54,620
for large jobs.

15
00:00:54,890 --> 00:00:56,390
So that's the root path.

16
00:00:56,810 --> 00:01:02,840
I'm simply going to pass the jobs, and yes, I have here purposely template strings because again,

17
00:01:03,200 --> 00:01:04,879
we'll be accessing the state voters.

18
00:01:05,630 --> 00:01:08,300
We'll be doing some calculations and all that stuff.

19
00:01:08,300 --> 00:01:09,770
But all of that is coming up.

20
00:01:10,130 --> 00:01:16,160
We have to get jobs begin, and at this point, you probably already know that we will be setting up

21
00:01:16,160 --> 00:01:17,060
the loading over there.

22
00:01:17,430 --> 00:01:22,210
Then we're looking for the data coming back from off, of course, await.

23
00:01:22,530 --> 00:01:26,690
And then we pull out jobs, total jobs, a number of projects coming from where?

24
00:01:26,960 --> 00:01:27,650
From the data.

25
00:01:28,050 --> 00:01:31,130
And if you need to double check, you can just go back to the postman.

26
00:01:31,400 --> 00:01:37,580
As far as this batch, we're going to get jobs successful and then we have jobs, total jobs and number

27
00:01:37,580 --> 00:01:38,180
of pages.

28
00:01:38,600 --> 00:01:44,570
Now I already included the log out user, so I'm kind of geared our way what we're going to do.

29
00:01:44,930 --> 00:01:50,240
But for the time being, we'll just log the error and I'm going to talk about this clear alert in next

30
00:01:50,240 --> 00:01:50,870
video as well.

31
00:01:51,110 --> 00:01:53,810
Now, how are you going to update the state of ours?

32
00:01:54,140 --> 00:02:00,050
Well, we're going to go over here with reducer and get jobs begin, which is going to have ease.

33
00:02:00,050 --> 00:02:00,890
Loading True.

34
00:02:01,220 --> 00:02:03,020
And Charlotte, in this case, false.

35
00:02:03,380 --> 00:02:10,220
And again, when I talk about the alerts in next video as well and get job success, what we set is

36
00:02:10,220 --> 00:02:11,240
loading to false.

37
00:02:11,660 --> 00:02:14,600
So we're not going to be loading because there is going to be a loading spinner.

38
00:02:14,820 --> 00:02:20,780
Now, if I go to complete application, we have that loading screen our first, second and once we're

39
00:02:20,780 --> 00:02:21,440
done loading.

40
00:02:21,560 --> 00:02:22,580
Then of course, I had it.

41
00:02:22,940 --> 00:02:25,570
And what are we getting back in the payload?

42
00:02:25,580 --> 00:02:32,360
While we have jobs, total jobs and number of pages, we set those values in state and we're good to

43
00:02:32,360 --> 00:02:32,600
go.

44
00:02:32,990 --> 00:02:40,130
So let me just navigate to the actions first, I guess, and let's create those two.

45
00:02:40,730 --> 00:02:46,900
So I think I'm going to just copy and paste this one and then let's just change these flowers around.

46
00:02:46,910 --> 00:02:49,340
We're not going to be create job.

47
00:02:49,790 --> 00:02:54,860
It's going to be getting jobs and it's not going to be an hour either, since we're not going to use

48
00:02:54,890 --> 00:02:55,100
that.

49
00:02:55,700 --> 00:02:59,600
So with me right now, select all four of them.

50
00:02:59,610 --> 00:03:07,190
Remove and let's just go here with get on the score jobs and then back then.

51
00:03:08,000 --> 00:03:12,410
And yes, I probably should have left those customers, but it is what it is.

52
00:03:12,630 --> 00:03:13,970
So make up in post.

53
00:03:14,510 --> 00:03:19,970
I think I've been patient over here as well and now set up Matthew cursors, and we're just going to

54
00:03:19,970 --> 00:03:23,600
be dealing with success once I have these two actions.

55
00:03:24,140 --> 00:03:29,330
Then we want to go to have context as well as the reducer.

56
00:03:29,630 --> 00:03:37,250
So yeah, let's go, get jobs begin, get jump success and the same deal in the reducer.

57
00:03:38,460 --> 00:03:39,330
Let's not forget there.

58
00:03:39,870 --> 00:03:43,110
We're looking for the imports coming from the actions.

59
00:03:43,500 --> 00:03:45,390
And let's just add those two suckers.

60
00:03:45,900 --> 00:03:54,090
Then let's keep on scrolling and some more at the end, I guess right after the final change or not

61
00:03:54,510 --> 00:03:55,620
the great job, I guess.

62
00:03:56,070 --> 00:03:58,950
Now I want to set up my functionality to get on the job.

63
00:03:58,950 --> 00:04:01,500
So he's no, it can't get jobs.

64
00:04:01,840 --> 00:04:07,940
Now that is equal to and I think when we have the function and here, like I said, we're going to go

65
00:04:07,950 --> 00:04:12,240
with llut and non-euro because we will modify this value.

66
00:04:12,480 --> 00:04:16,890
Essentially, we'll be adding the query, string parameters and all that stuff.

67
00:04:17,130 --> 00:04:25,470
So it just go here with jobs and then onto this project first, the big in one go type and then get

68
00:04:25,470 --> 00:04:26,160
jobs.

69
00:04:26,160 --> 00:04:27,780
And we're not looking for success.

70
00:04:28,170 --> 00:04:29,490
We want to go with again.

71
00:04:29,960 --> 00:04:35,220
Then let's go with try and catch an inside of the try catch block.

72
00:04:35,580 --> 00:04:37,140
Let's pull out the data right away.

73
00:04:37,170 --> 00:04:38,610
We already know where is it sitting?

74
00:04:39,120 --> 00:04:45,780
Then let's go with a weight of an offset to remember the base URL API version one, and then we'll pass

75
00:04:45,780 --> 00:04:46,770
in the URL.

76
00:04:47,460 --> 00:04:54,990
So since we're not passing any data here and simply provide the URL, then we're going to go with Konst

77
00:04:55,680 --> 00:04:57,600
Jobs, total jobs and number of pages.

78
00:04:57,960 --> 00:05:00,180
And as a sign out by default, it is get.

79
00:05:00,630 --> 00:05:06,150
So if you want, you can write this word as well, but I'm just going to go with Orthotouch just as

80
00:05:06,150 --> 00:05:06,630
a sign up.

81
00:05:07,200 --> 00:05:09,180
That's pretty much a ActionScript.

82
00:05:09,420 --> 00:05:13,860
So cost and then jobs, how much total jobs?

83
00:05:14,250 --> 00:05:17,010
And I also want to go with a number of pages.

84
00:05:17,430 --> 00:05:21,570
All of that is sitting where you're just sitting in the data, and now we want to dispatch that.

85
00:05:21,780 --> 00:05:22,930
We're going to go with this.

86
00:05:23,640 --> 00:05:31,170
And then here we're going to go to type, get an underscore jobs and we're looking for success one.

87
00:05:31,470 --> 00:05:32,190
That's number one.

88
00:05:32,580 --> 00:05:34,780
And then also, we want to go to payload.

89
00:05:35,430 --> 00:05:37,980
And here we're going to go with jobs.

90
00:05:38,850 --> 00:05:44,970
Total jobs and all certain number of pages like so let's say that one.

91
00:05:45,690 --> 00:05:51,810
And then inside of the courtroom, like I said for time being one, just go and log and we're going

92
00:05:51,810 --> 00:05:54,690
to be looking for counsel or I'm sorry.

93
00:05:55,230 --> 00:05:57,990
We're going to go with our human response.

94
00:05:58,320 --> 00:06:02,940
Let's say that let's just add that clear alert, which we're going to discuss in next video.

95
00:06:03,040 --> 00:06:06,330
Now let's go to a producer and actually handle that.

96
00:06:06,840 --> 00:06:09,900
And the first thing that we want to do is set up the loading.

97
00:06:10,860 --> 00:06:17,520
And, yes, alert equal to false, even though maybe at the moment, it doesn't make sense, so let's

98
00:06:17,520 --> 00:06:18,690
go over here with action.

99
00:06:19,150 --> 00:06:24,060
That type is equal to get and then underscore the jobs back then.

100
00:06:24,630 --> 00:06:31,110
And here we want to go with return that not and that state and then we want to start loading is true.

101
00:06:31,440 --> 00:06:34,230
So that is going to trigger a VAT spinner.

102
00:06:34,680 --> 00:06:36,690
And second will have a shoulder.

103
00:06:37,020 --> 00:06:41,160
And as a quick hint, when it comes to these shorts.

104
00:06:41,460 --> 00:06:42,990
This is pretty much a precaution.

105
00:06:43,410 --> 00:06:45,570
Technically, can actually augment that.

106
00:06:45,810 --> 00:06:48,240
And again, I will discuss that in next video.

107
00:06:48,570 --> 00:06:52,110
So action on type and now it's only this one.

108
00:06:52,560 --> 00:06:55,980
So get job and we're looking for a successful one.

109
00:06:56,340 --> 00:06:58,200
And here it's pretty straightforward.

110
00:06:58,620 --> 00:06:59,940
There's really no alert.

111
00:07:00,810 --> 00:07:02,940
So it might as well just go with a turn.

112
00:07:03,980 --> 00:07:08,140
Then we're looking for a state together, not an island state.

113
00:07:08,570 --> 00:07:11,650
And as far as the values, well, that's set up is loading.

114
00:07:11,860 --> 00:07:13,870
It goes to false heaven.

115
00:07:13,910 --> 00:07:21,240
We want to go with jobs and then no one will be equal to action that payload, that jobs.

116
00:07:21,520 --> 00:07:22,600
Let's save it for now.

117
00:07:23,160 --> 00:07:27,490
And me actually set it up in New York because I think it's going to be easier for you to follow.

118
00:07:27,980 --> 00:07:31,630
And I'm just going to jump in first and then we want to just provide different powers.

119
00:07:31,750 --> 00:07:35,230
So instead of jobs, we'll go with total jobs.

120
00:07:35,500 --> 00:07:42,280
And then here instead of jobs, we're going to go ahead and come off and graduate and once we have the

121
00:07:42,280 --> 00:07:43,660
reduced functionality in place.

122
00:07:44,020 --> 00:07:49,480
Now let's quickly swing back to the app context and actually invoke the good jobs.

123
00:07:50,460 --> 00:07:55,950
Now, why do we want to do it here, because like I said, we don't have the actual component which

124
00:07:55,950 --> 00:07:58,320
is going to trigger that federal question.

125
00:07:58,590 --> 00:08:02,310
So it might as well just start out over here where I want to go with use.

126
00:08:02,610 --> 00:08:05,620
And I'm looking for years of fact, right?

127
00:08:05,700 --> 00:08:09,090
And we want to keep on scrolling online somewhere here in the bottom.

128
00:08:09,450 --> 00:08:14,850
We're just going to go with use of fact and inside of the callback function.

129
00:08:15,300 --> 00:08:16,800
We're just going to go get jobs.

130
00:08:16,980 --> 00:08:17,820
We own rocket.

131
00:08:18,120 --> 00:08:20,340
And let's just set it up on initial render.

132
00:08:20,580 --> 00:08:21,810
Again, this is just temporary.

133
00:08:22,200 --> 00:08:25,380
Effectively, we will remove it at the end of this video.

134
00:08:26,180 --> 00:08:28,710
Once navigate back to a project we can refresh.

135
00:08:29,100 --> 00:08:36,570
And what you'll notice in the state is that instead of those default values, now we have jobs, essentially,

136
00:08:36,570 --> 00:08:41,470
which is an array of R&D model jobs, which is going to be three.

137
00:08:41,860 --> 00:08:47,730
And then you can read the rest where I have number of pages and we didn't change the breadcrumbs, so

138
00:08:48,090 --> 00:08:49,680
that one stays the same.

139
00:08:50,100 --> 00:08:55,500
And with this in place, like I said, just go back, we can see that everything works and we can remove

140
00:08:55,500 --> 00:08:56,040
this one.

141
00:08:56,850 --> 00:08:58,740
I think I'm going to get that annoying warning.

142
00:08:58,740 --> 00:09:03,170
So I'm also going to remove the import and we're good to go now.

143
00:09:03,170 --> 00:09:05,400
We can start creating our components.

