1 00:00:00,860 --> 00:00:04,550 Now that we have fixed up a little issue or two, we're gonna start adding in some these new routes. 2 00:00:04,970 --> 00:00:08,540 The first route we're going to work on is going to give the user the ability to create a ticket. 3 00:00:08,600 --> 00:00:12,650 So it will be a very simple form where user will enter in a title and a price. 4 00:00:14,280 --> 00:00:19,380 We're going to make this as a new route accessible at tickets, slash new and to implement that route. 5 00:00:19,410 --> 00:00:22,870 Naturally, we have to create a file at ticket slash new J.S.. 6 00:00:23,310 --> 00:00:24,510 So let's create that new file. 7 00:00:24,570 --> 00:00:25,020 Right now. 8 00:00:26,120 --> 00:00:30,210 Back inside my editor, I'm going to find my pages directory inside there. 9 00:00:30,240 --> 00:00:31,850 I'll make a new folder called Tickets. 10 00:00:32,330 --> 00:00:36,020 And then inside there, I'll make a new file of new dot J.S.. 11 00:00:37,050 --> 00:00:41,820 Inside this new James file, I'm going to create a new component called New Ticket. 12 00:00:44,580 --> 00:00:46,530 At the bottom, I will immediately export it. 13 00:00:49,630 --> 00:00:52,670 And inside the compound itself right now, let's just throw in a div. 14 00:00:55,370 --> 00:00:59,600 And I'll give it maybe an each one that says create a ticket. 15 00:01:01,710 --> 00:01:02,820 Let's immediately save this. 16 00:01:02,910 --> 00:01:07,140 Go back to Richard Browser and just make sure that we can access this new route, should be able to 17 00:01:07,140 --> 00:01:13,380 access ticketing data dev flash tickets, slash new RNC, create a ticket, appear on the screen like 18 00:01:13,420 --> 00:01:15,690 so reasonable. 19 00:01:16,930 --> 00:01:17,530 Now, next up. 20 00:01:17,920 --> 00:01:21,400 Well, let's start to add in the form itself for the form. 21 00:01:21,490 --> 00:01:23,440 I'll go back over to my new ticket component. 22 00:01:25,390 --> 00:01:27,790 We're going to add in a decent amount of J.S. here. 23 00:01:28,770 --> 00:01:30,490 So I'll put in a foreign element. 24 00:01:32,010 --> 00:01:36,660 I'm gonna give it a div that has a class name of form Dasch group. 25 00:01:38,690 --> 00:01:40,880 Inside that div, I'll place a label. 26 00:01:43,810 --> 00:01:44,800 That has tax title. 27 00:01:46,300 --> 00:01:48,460 After that, I'll put in a simple input. 28 00:01:49,950 --> 00:01:51,820 I'm not going to duplicate that entire div. 29 00:01:53,190 --> 00:01:55,270 And I'll change the label over to a price. 30 00:01:55,330 --> 00:01:55,810 Instead. 31 00:01:58,060 --> 00:02:02,740 And then finally, after the second dip that we just copy paste it in, I'll place a button with the 32 00:02:02,740 --> 00:02:06,670 class name of B10 ETN primary. 33 00:02:09,970 --> 00:02:11,740 And I'll give us some text of submit. 34 00:02:13,440 --> 00:02:14,520 Get pretty simple start. 35 00:02:14,820 --> 00:02:16,290 Let's take a look at what that looks like. 36 00:02:16,990 --> 00:02:17,610 Yep, there we go. 37 00:02:20,870 --> 00:02:22,320 OK, now we've got that put together. 38 00:02:22,770 --> 00:02:26,100 We need to make sure that we also add in to these inputs. 39 00:02:26,250 --> 00:02:30,210 Just a quick class name just to fix up some of the styling on both the inputs. 40 00:02:30,840 --> 00:02:33,870 I can add a class name of form control. 41 00:02:37,050 --> 00:02:38,910 And form central. 42 00:02:40,260 --> 00:02:41,730 If I now say that and put back over. 43 00:02:41,890 --> 00:02:43,500 Well, Nancy, that stretches the entire length. 44 00:02:44,160 --> 00:02:46,830 Now, having it stretched the entire length looks just a little bit weird. 45 00:02:46,860 --> 00:02:51,240 We don't really have any gap on the left hand side or the right hand side to fix that up. 46 00:02:51,280 --> 00:02:53,250 We're going to go back over to our app component. 47 00:02:53,610 --> 00:02:57,810 We're just going to add in really quickly an additional little class that's going to give us a little 48 00:02:57,810 --> 00:02:59,400 bit of spacing on either side. 49 00:03:01,200 --> 00:03:02,280 So on the app component. 50 00:03:04,350 --> 00:03:07,090 Going to find where we create the actual components right here. 51 00:03:07,180 --> 00:03:09,370 So that's the child compound that we're trying to show to the user. 52 00:03:09,790 --> 00:03:11,230 And I got to wrap it with a div. 53 00:03:14,120 --> 00:03:16,220 That has a class name of container. 54 00:03:18,150 --> 00:03:23,550 Now, I say that I'll see that I get that nice border on both sides of the screen and you probably see 55 00:03:23,550 --> 00:03:25,470 something a little bit closer to that. 56 00:03:25,530 --> 00:03:28,890 Just again, as a reminder, as usual, I run my screen really far zoomed in. 57 00:03:28,890 --> 00:03:30,540 Just you can see everything I'm doing very easily. 58 00:03:32,030 --> 00:03:32,220 OK. 59 00:03:32,330 --> 00:03:32,960 That's a good start. 60 00:03:33,620 --> 00:03:35,440 Let's take a pause right here we come back the next video. 61 00:03:35,480 --> 00:03:40,630 We'll make sure that we add in some states to track the value so users entering and then make a request. 62 00:03:40,630 --> 00:03:43,010 We eventually create a new ticket on our back end server.