Beautiful.
And once we have the create job controller in place.
Now let's switch gears and go back to the frontline.
And the first thing that we want to set up in the app context is the initial state.
We want to add some more properties to these probably familiar position company.
And you can read the rest, but you're probably a little bit confused about is editing and edit Javadi?
Well, here's the thing.
Eventually, on our front end, not only will be able to have the job, but we'll also be able to edit
the job.
So these are all my jobs, and I can click on edit and now notice how we're back in the ad job.
But of course, in this case, we're editing the job.
Therefore, we're right away.
Add these to the the state is editing false?
Yes, by default.
This one will be false and then eventually will pass here.
The added job, Heidi and then position the company empty by default, and you notice how these ones
actually match to whatever we have already in the background.
So in this case, I have job type options, which is equal to my array and as far as default one.
I'll go with a full time one and the same one goes with a status.
And you can probably make an argument that we could set up, let's say here a utils where we set up
both of these arrays.
So essentially that way, we're not making some kind of mistake.
And yes, if there would be more functionality, I would definitely do that.
But in this case, I won't.
So I'll just make sure that I copy and paste from whatever I have in the model one.
Hopefully, that is clear and why the job location is commented out because, well, remember, we already
have that value here.
So I just want to move it and set it side by side with rest of the job properties because in my opinion,
it makes a little bit sense.
But remember, we already did set it up when we were creating the user here.
So now let's go to the app context where I have the initial state.
And let me first move this sucker down the job location right after the show sidebar.
And now let's start with that is editing.
So is editing that one will be set equal to false?
That's a Boolean.
And then eventually there's going to be a edit job.
So let's go at it and then jump an idea.
Again, that's just my preference on setting up the variable names here, and I'll set down one equal
to an empty string.
Then we want to go with position and that one will be empty string.
The same thing we want to do with company, also empty string.
And then let's go with that job location after the job location where we want to go.
Job type and options.
And this is the case where we want to set up that array.
So let me go right now to my job model.
And let me just make sure that I get the same hours.
Again, if you're want to set up some kind of constants file, you can definitely do so.
In my case, I'll just make sure that it is exactly the same.
So these are my job type options.
And as far as the value, I'm going to go with job type and I'll set it equal to full time.
It's said I want and we want to do the same thing with a status.
So let's go here with status and then options.
Eventually, that will be array.
And before we go any further, let's also set a status and I'll sit down one equal to pending.
And let me just grab again that value from the model.
So let's navigate back.
And in this case, we're looking for disarray.
That's the one that we're going to use.
Back in the app context, let's copy and paste, and I think we're pretty much done.
Yep.
We have the job location, which is either going to be equal to user location or if it doesn't exist,
then we're going to go with empty string.
Now again, the idea is that we can either use the user's location or we can provide our own value.
And once we have the initial state in place now, we can start working in the add job page.