1
00:00:00,180 --> 00:00:00,610
Beautiful.

2
00:00:00,870 --> 00:00:05,460
And once we have the create job controller in place.

3
00:00:05,760 --> 00:00:09,120
Now let's switch gears and go back to the frontline.

4
00:00:10,050 --> 00:00:14,880
And the first thing that we want to set up in the app context is the initial state.

5
00:00:15,550 --> 00:00:21,240
We want to add some more properties to these probably familiar position company.

6
00:00:21,570 --> 00:00:28,280
And you can read the rest, but you're probably a little bit confused about is editing and edit Javadi?

7
00:00:28,740 --> 00:00:29,850
Well, here's the thing.

8
00:00:30,420 --> 00:00:36,810
Eventually, on our front end, not only will be able to have the job, but we'll also be able to edit

9
00:00:36,810 --> 00:00:37,170
the job.

10
00:00:37,620 --> 00:00:44,130
So these are all my jobs, and I can click on edit and now notice how we're back in the ad job.

11
00:00:44,670 --> 00:00:47,220
But of course, in this case, we're editing the job.

12
00:00:47,520 --> 00:00:48,860
Therefore, we're right away.

13
00:00:48,870 --> 00:00:52,050
Add these to the the state is editing false?

14
00:00:52,290 --> 00:00:53,190
Yes, by default.

15
00:00:53,430 --> 00:00:56,550
This one will be false and then eventually will pass here.

16
00:00:56,580 --> 00:01:04,170
The added job, Heidi and then position the company empty by default, and you notice how these ones

17
00:01:04,170 --> 00:01:07,080
actually match to whatever we have already in the background.

18
00:01:07,530 --> 00:01:14,140
So in this case, I have job type options, which is equal to my array and as far as default one.

19
00:01:14,160 --> 00:01:18,900
I'll go with a full time one and the same one goes with a status.

20
00:01:19,380 --> 00:01:27,060
And you can probably make an argument that we could set up, let's say here a utils where we set up

21
00:01:27,060 --> 00:01:28,170
both of these arrays.

22
00:01:28,770 --> 00:01:32,610
So essentially that way, we're not making some kind of mistake.

23
00:01:32,720 --> 00:01:37,380
And yes, if there would be more functionality, I would definitely do that.

24
00:01:37,710 --> 00:01:39,450
But in this case, I won't.

25
00:01:39,720 --> 00:01:44,400
So I'll just make sure that I copy and paste from whatever I have in the model one.

26
00:01:44,640 --> 00:01:51,330
Hopefully, that is clear and why the job location is commented out because, well, remember, we already

27
00:01:51,330 --> 00:01:52,350
have that value here.

28
00:01:53,100 --> 00:01:59,640
So I just want to move it and set it side by side with rest of the job properties because in my opinion,

29
00:01:59,940 --> 00:02:01,140
it makes a little bit sense.

30
00:02:01,560 --> 00:02:06,540
But remember, we already did set it up when we were creating the user here.

31
00:02:07,020 --> 00:02:11,100
So now let's go to the app context where I have the initial state.

32
00:02:11,550 --> 00:02:17,580
And let me first move this sucker down the job location right after the show sidebar.

33
00:02:17,850 --> 00:02:20,010
And now let's start with that is editing.

34
00:02:20,370 --> 00:02:24,390
So is editing that one will be set equal to false?

35
00:02:24,810 --> 00:02:25,620
That's a Boolean.

36
00:02:25,620 --> 00:02:28,910
And then eventually there's going to be a edit job.

37
00:02:29,280 --> 00:02:32,370
So let's go at it and then jump an idea.

38
00:02:32,860 --> 00:02:39,150
Again, that's just my preference on setting up the variable names here, and I'll set down one equal

39
00:02:39,150 --> 00:02:40,440
to an empty string.

40
00:02:40,900 --> 00:02:44,850
Then we want to go with position and that one will be empty string.

41
00:02:45,180 --> 00:02:49,020
The same thing we want to do with company, also empty string.

42
00:02:49,410 --> 00:02:54,110
And then let's go with that job location after the job location where we want to go.

43
00:02:54,240 --> 00:02:57,360
Job type and options.

44
00:02:57,700 --> 00:02:59,910
And this is the case where we want to set up that array.

45
00:03:00,390 --> 00:03:04,590
So let me go right now to my job model.

46
00:03:05,340 --> 00:03:08,960
And let me just make sure that I get the same hours.

47
00:03:08,990 --> 00:03:13,170
Again, if you're want to set up some kind of constants file, you can definitely do so.

48
00:03:13,560 --> 00:03:17,340
In my case, I'll just make sure that it is exactly the same.

49
00:03:17,640 --> 00:03:20,250
So these are my job type options.

50
00:03:20,490 --> 00:03:25,940
And as far as the value, I'm going to go with job type and I'll set it equal to full time.

51
00:03:26,380 --> 00:03:30,900
It's said I want and we want to do the same thing with a status.

52
00:03:31,380 --> 00:03:35,100
So let's go here with status and then options.

53
00:03:35,340 --> 00:03:36,660
Eventually, that will be array.

54
00:03:37,140 --> 00:03:43,840
And before we go any further, let's also set a status and I'll sit down one equal to pending.

55
00:03:44,310 --> 00:03:48,810
And let me just grab again that value from the model.

56
00:03:49,260 --> 00:03:50,550
So let's navigate back.

57
00:03:50,970 --> 00:03:52,830
And in this case, we're looking for disarray.

58
00:03:53,400 --> 00:03:54,810
That's the one that we're going to use.

59
00:03:55,230 --> 00:04:01,230
Back in the app context, let's copy and paste, and I think we're pretty much done.

60
00:04:01,590 --> 00:04:01,750
Yep.

61
00:04:02,190 --> 00:04:10,140
We have the job location, which is either going to be equal to user location or if it doesn't exist,

62
00:04:10,140 --> 00:04:11,640
then we're going to go with empty string.

63
00:04:11,970 --> 00:04:18,720
Now again, the idea is that we can either use the user's location or we can provide our own value.

64
00:04:19,050 --> 00:04:25,320
And once we have the initial state in place now, we can start working in the add job page.

