1
00:00:00,270 --> 00:00:05,040
And once we can add the drum, now, let's work on all jobs page.

2
00:00:05,910 --> 00:00:11,010
And essentially, it's going to look something like this where we'll have to search for him.

3
00:00:11,370 --> 00:00:17,130
But I want to die honestly instead of at the very, very end since there's quite a bit of functionality.

4
00:00:17,490 --> 00:00:24,800
And I really just want to display the jobs first and then work on edit and the lead and then showcase

5
00:00:24,810 --> 00:00:31,080
that and then come back to this one because the quite a bit of work in the Get All Jobs controller.

6
00:00:31,440 --> 00:00:33,150
And I really don't want to do that right now.

7
00:00:33,880 --> 00:00:35,970
Now, as far as the page.

8
00:00:36,440 --> 00:00:36,780
Yes.

9
00:00:37,050 --> 00:00:41,340
And how the search form, but also will display all of our jobs.

10
00:00:41,730 --> 00:00:43,740
And there's going to be pagination as well.

11
00:00:44,310 --> 00:00:48,810
So all around the bottom, all of the buttons for the pagination.

12
00:00:49,860 --> 00:00:52,620
And as far as the job, it's going to look something like this.

13
00:00:53,100 --> 00:01:00,330
One of the icon have some info, whether it's part time when it's located, when we created and what

14
00:01:00,330 --> 00:01:01,080
is the status.

15
00:01:01,470 --> 00:01:04,950
And like I said, I have had it and the lead functionalities.

16
00:01:05,340 --> 00:01:11,070
So if we want to remove the job, obviously we just click here and then if we want to edit, navigate

17
00:01:11,070 --> 00:01:19,080
again through the add job page and now we're editing the job and we'll start our journey in the server

18
00:01:19,650 --> 00:01:20,670
more effectively.

19
00:01:20,910 --> 00:01:24,330
We want to go to get all jobs controller.

20
00:01:24,900 --> 00:01:32,850
We want to use the find method and we want to get all the jobs created by specific user and where the

21
00:01:32,850 --> 00:01:33,720
user is located.

22
00:01:34,050 --> 00:01:35,850
Well, remember we have the middleware.

23
00:01:36,420 --> 00:01:41,430
So since our requests are going through the middleware, there's going to be a user if there is a valve

24
00:01:41,430 --> 00:01:41,790
token.

25
00:01:42,240 --> 00:01:48,390
And remember that the property name was created by sonorities go created by an Iraqi user.

26
00:01:48,390 --> 00:01:52,110
User ready rabbit gets me all the jobs that user created.

27
00:01:52,440 --> 00:01:59,010
And then as far as the response, we're going to go with status codes, OK, and then will provide jobs,

28
00:01:59,610 --> 00:02:01,920
total jobs, which is going to be a jobs length.

29
00:02:02,310 --> 00:02:04,680
Essentially, this is going to be this number over here.

30
00:02:05,010 --> 00:02:07,950
So this gives me a total of all the jobs.

31
00:02:08,340 --> 00:02:15,960
And then I'll also have number of pages, which at the moment is one now effectively were hard coding.

32
00:02:15,960 --> 00:02:23,160
Right now, that number of pages, of course, as are jobs length changes, meaning as we're adding

33
00:02:23,160 --> 00:02:26,070
more and more jobs, there's going to be more pages.

34
00:02:26,700 --> 00:02:33,810
And like I said, the functionality for pagination sorting and filtering in general, we will set up

35
00:02:33,810 --> 00:02:34,230
later.

36
00:02:34,500 --> 00:02:36,240
I really don't want to do this right now.

37
00:02:36,930 --> 00:02:42,540
And the reason why I'm adding right now is hardcoded value, because since I will be setting up everything

38
00:02:42,540 --> 00:02:46,710
step by step in the front in any way, meaning as far as get all jobs is concerned.

39
00:02:47,010 --> 00:02:51,870
So, for example, state hires, I might as well tackle that right now because I really don't think

40
00:02:51,870 --> 00:02:58,320
that it's going to make much sense if, let's say, later, I'm just going to run around my entire project

41
00:02:58,560 --> 00:03:00,030
and add this one property.

42
00:03:00,420 --> 00:03:02,220
So yes, at the moment it's hard coded.

43
00:03:02,520 --> 00:03:06,240
So technically you can look at it and going to be like, Well, it doesn't make much sense.

44
00:03:06,540 --> 00:03:12,240
Trust me, once we start setting up the filter functionality, you will see why we have it over here.

45
00:03:12,630 --> 00:03:13,860
So let's start over there.

46
00:03:14,180 --> 00:03:15,540
Let's go to our server.

47
00:03:16,140 --> 00:03:20,760
So in here, I'm looking for what I'm looking forward the controllers.

48
00:03:21,360 --> 00:03:24,630
I want to go more specifically to a jobs controller.

49
00:03:24,900 --> 00:03:27,330
So at the moment, we can create the job.

50
00:03:27,720 --> 00:03:30,870
Now we want to get all the jobs by that specific user.

51
00:03:31,260 --> 00:03:32,940
So some of this dummy code here.

52
00:03:34,030 --> 00:03:39,850
Let's say, first, that jobs is going to be equal to and then await job and then find.

53
00:03:40,180 --> 00:03:42,160
So that's our scheme of the method.

54
00:03:42,160 --> 00:03:43,040
Name is fine.

55
00:03:43,390 --> 00:03:49,860
And here we want to go with created and then buy, and then that one is equal to that user and then

56
00:03:49,870 --> 00:03:56,830
user I.D. We get the values, basically all our jobs and knowledge and our response.

57
00:03:56,840 --> 00:03:58,540
So that status.

58
00:03:58,780 --> 00:04:03,430
Let's use the status codes whenever and we're going to go with, OK.

59
00:04:03,910 --> 00:04:05,410
And then let's go with Jason.

60
00:04:06,130 --> 00:04:08,560
As far as the Jason, like I said, it will pass in the jobs.

61
00:04:09,010 --> 00:04:14,350
So this is the era that we're getting back right and we want to go with karma and let's go with total

62
00:04:14,350 --> 00:04:18,490
jobs and now will be equal to a jobs and length.

63
00:04:18,940 --> 00:04:26,080
So the length of my right, I'm not and I'm off prejudice and I'm not going to repeat everything that

64
00:04:26,080 --> 00:04:26,620
I just said.

65
00:04:27,070 --> 00:04:30,490
So for the time being, we'll just hardcore value number one.

66
00:04:30,730 --> 00:04:33,970
And since I want to test that out before I go to the frontend.

67
00:04:35,070 --> 00:04:42,660
Let me go to my personal and let me log in one more time, just so I know that I have the correct token.

68
00:04:43,170 --> 00:04:47,010
So log in user John over here and get back my token.

69
00:04:47,370 --> 00:04:48,690
I will create jobs.

70
00:04:48,780 --> 00:04:50,340
So have a little bit more data.

71
00:04:50,730 --> 00:04:52,410
So maybe this is not going to be Google.

72
00:04:52,830 --> 00:04:58,020
I'm going to go with Hulu and instead of front one, I'm going to be a back end developer.

73
00:04:58,740 --> 00:05:00,590
And then let's send that on.

74
00:05:00,600 --> 00:05:02,010
Yep, we created the job.

75
00:05:02,010 --> 00:05:07,890
So now if I go with all my jobs, since I have the token, everything should be correct.

76
00:05:08,150 --> 00:05:11,010
And notice over here, I have total jobs.

77
00:05:11,100 --> 00:05:11,510
Three.

78
00:05:11,910 --> 00:05:13,050
Number of pages one.

79
00:05:13,530 --> 00:05:15,210
And this is going to be my data.

80
00:05:15,930 --> 00:05:22,620
And with this in place, we have the search functionality for get all jobs in place.

81
00:05:22,770 --> 00:05:26,610
Again, like I said, we will return to this controller.

82
00:05:26,970 --> 00:05:32,340
There's going to be way more code over here because I do way more functionality.

83
00:05:32,610 --> 00:05:36,540
For now, I just want to display the jobs that we have.

84
00:05:36,930 --> 00:05:38,880
I want to set up this nice layout.

85
00:05:39,910 --> 00:05:46,360
And then I went to work on edit and delete functionality that will work on that, and then we'll come

86
00:05:46,360 --> 00:05:47,500
back to the search form.

87
00:05:47,860 --> 00:05:50,800
Hopefully this makes sense and now I can hop over to the frontend.

