1
00:00:00,360 --> 00:00:09,090
And once we have the state of ours, let's finally start working in the actual job one and before you

2
00:00:09,090 --> 00:00:12,240
wonder, well, why didn't we set them up globally?

3
00:00:12,990 --> 00:00:19,260
I mean, why we couldn't just do it like we did with register where we had the values in the actual

4
00:00:19,260 --> 00:00:21,300
page and the local state values.

5
00:00:21,720 --> 00:00:23,040
And we were good to go.

6
00:00:23,820 --> 00:00:32,220
You say, because eventually we'll have all the jobs and the way I set up the functionality we'll edit

7
00:00:32,729 --> 00:00:33,630
in the ad job.

8
00:00:34,230 --> 00:00:40,260
So actually, this is a hodgepodge where instead of adding the job, we will edit.

9
00:00:41,100 --> 00:00:43,380
And effectively, this is where we will use that.

10
00:00:44,600 --> 00:00:51,800
Switch, remember, we have is editing, so set is editing will grab the idea and then we'll provide

11
00:00:51,800 --> 00:00:54,260
the values in the input.

12
00:00:54,770 --> 00:00:56,450
And that where we can combine the both.

13
00:00:56,780 --> 00:01:03,680
When I have one page where I do the adding the job and editing job functionality, and therefore it's

14
00:01:03,680 --> 00:01:10,280
easier if those powers are sitting in the global because that way I can always access them and toggle

15
00:01:10,280 --> 00:01:12,590
them and hopefully you get where I'm going with this.

16
00:01:13,020 --> 00:01:18,070
Again, just answer the question because I know that I'll get some questions and Kiran.

17
00:01:18,800 --> 00:01:23,570
And like I said, I started working in the actual job page.

18
00:01:23,810 --> 00:01:30,740
So we're half warm and therefore we'll look for form role and we'll also have to set up Form Row Select.

19
00:01:31,040 --> 00:01:38,000
We're also on a display alert if the user doesn't provide all the values, as well as when the job has

20
00:01:38,000 --> 00:01:39,110
been successfully added.

21
00:01:39,530 --> 00:01:42,410
We're also, of course, want to get used context.

22
00:01:42,830 --> 00:01:49,310
And this is the case where I'll use the same wrapper like in the profile one, because again decided

23
00:01:49,310 --> 00:01:52,970
that it's easier for me to combine both styles.

24
00:01:53,330 --> 00:02:00,320
There's no need to set up two separate ones, and here we'll grab branch of values from the state,

25
00:02:00,890 --> 00:02:03,110
starting with shoulder to display alert.

26
00:02:03,500 --> 00:02:04,910
And I'm position company.

27
00:02:05,030 --> 00:02:09,650
And of course, you're going to read the rest unless there's more functions still coming in.

28
00:02:10,039 --> 00:02:15,530
There's going to be handles, submit as well as handle job input, but I'm not going to talk about them

29
00:02:15,530 --> 00:02:15,950
right now.

30
00:02:16,280 --> 00:02:19,670
I simply want to showcase that as far as our return.

31
00:02:20,320 --> 00:02:24,020
Have the wrapper and yes, there's going to be a form class form.

32
00:02:24,350 --> 00:02:26,540
Remember, we have is running.

33
00:02:26,780 --> 00:02:27,980
That's the global one.

34
00:02:28,280 --> 00:02:30,380
And then by default, it's going to be false.

35
00:02:30,860 --> 00:02:32,040
So have our job.

36
00:02:32,040 --> 00:02:34,940
But once it's true, we'll have a job.

37
00:02:35,420 --> 00:02:40,550
And I'm fully confident that at this point, we already understand what's happening, meaning we have

38
00:02:40,550 --> 00:02:42,950
used these operators already.

39
00:02:42,960 --> 00:02:48,650
So even though technically we're not using is editing right now, hopefully it is clear that since it

40
00:02:48,650 --> 00:02:51,440
is false, will essentially display our job.

41
00:02:51,620 --> 00:02:56,200
And then once we toggle that switch, then it's going to be the added job, Charlotte.

42
00:02:56,480 --> 00:02:59,930
Just like in the previous components, if it's true, we display it.

43
00:02:59,930 --> 00:03:02,480
If not, then of course we don't display it.

44
00:03:02,840 --> 00:03:05,150
And then we have few inputs.

45
00:03:05,270 --> 00:03:08,960
We have one for position, one for company, one for location.

46
00:03:09,440 --> 00:03:16,490
And then when it comes to job and job status, we'll set this one up in the next video because I want

47
00:03:16,490 --> 00:03:21,530
to do it step by step where again, we'll create everything locally here, and then I'll showcase how

48
00:03:21,530 --> 00:03:23,900
we can move it into a separate component.

49
00:03:24,770 --> 00:03:28,250
And then at the very, very end, we'll have a button container.

50
00:03:28,640 --> 00:03:32,090
So in this case, we'll have two buttons submit and clear.

51
00:03:32,360 --> 00:03:35,210
So make sure it is a button container and insider.

52
00:03:35,450 --> 00:03:39,080
We're going to go with button, then a few classes here for styling type.

53
00:03:39,900 --> 00:03:48,230
I will invoke the handle submit or here online for all of these ones who have this handle, job input

54
00:03:48,800 --> 00:03:50,450
and both of them are going to be over here.

55
00:03:50,720 --> 00:03:56,720
So handle job input is going to look for around and we want to get the name as well as the value.

56
00:03:57,200 --> 00:04:03,590
So notice here, when I'm setting up that input, I pass in what is the name of the property and this

57
00:04:03,590 --> 00:04:07,430
goes by this position and also the value, the line.

58
00:04:07,730 --> 00:04:10,760
Every time I'll type something, I'll get both of them back.

59
00:04:11,180 --> 00:04:13,760
I'll get the name as well as the value.

60
00:04:14,030 --> 00:04:14,940
Now, why do I need that?

61
00:04:14,960 --> 00:04:19,880
Well, because eventually there's going to be functionality that sets up everything state.

62
00:04:20,060 --> 00:04:25,820
So as we're typing, not only we are just accessing those numbers, but will also change those values

63
00:04:26,150 --> 00:04:26,960
in the state.

64
00:04:27,380 --> 00:04:34,370
And as far as the submit for time being, let's just prevent a default much check for empty hours.

65
00:04:35,300 --> 00:04:37,370
In this case, again, we're checking for the state fires.

66
00:04:37,820 --> 00:04:45,410
The ones that we just imported above, and if one of them is missing, then we go display, alert and

67
00:04:45,410 --> 00:04:45,860
return.

68
00:04:46,250 --> 00:04:48,650
If not, then we go would create job.

69
00:04:49,070 --> 00:04:50,630
That's all we want to do right now.

