You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/create-booking-component.md
+32-39Lines changed: 32 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,11 @@ postnumber: 34
9
9
framework: vue
10
10
---
11
11
12
-
In this part we will create the booking component.
12
+
In this part we will create the booking component. Essentially we will create four tabs that users will be able to enter information about the booking.
13
13
14
14
First head over and create a `booking` directory and create an `Index.vue` file with the following:
15
15
16
-
```
16
+
```vue
17
17
<template>
18
18
<div>
19
19
<HeadingOne class="text-center">
@@ -25,8 +25,8 @@ First head over and create a `booking` directory and create an `Index.vue` file
25
25
v-on:goNext="next"
26
26
:personal="personal"
27
27
@event="
28
-
(newPersonal) => {
29
-
personal = newPersonal;
28
+
newPersonal => {
29
+
personal = newPersonal
30
30
}
31
31
"
32
32
/>
@@ -41,8 +41,8 @@ First head over and create a `booking` directory and create an `Index.vue` file
41
41
v-on:goNext="next"
42
42
:customers="customers"
43
43
@event="
44
-
(cus) => {
45
-
customers = cus;
44
+
cus => {
45
+
customers = cus
46
46
}
47
47
"
48
48
@inputData="showData"
@@ -72,12 +72,12 @@ First head over and create a `booking` directory and create an `Index.vue` file
72
72
</template>
73
73
74
74
<script>
75
-
import CustomersTab from "./CustomersTab";
76
-
import CustomerDetailsTab from "./CustomerDetailsTab";
77
-
import SuccessTab from "./SuccessTab";
78
-
import CheckoutTab from "./CheckoutTab";
79
-
import Typography from "../../components/typography";
80
-
const { HeadingOne } = Typography;
75
+
import CustomersTab from "./CustomersTab"
76
+
import CustomerDetailsTab from "./CustomerDetailsTab"
77
+
import SuccessTab from "./SuccessTab"
78
+
import CheckoutTab from "./CheckoutTab"
79
+
import Typography from "../../components/typography"
🐢 We have the Antd Tabs component hooked up to the `v-model` with a field called `activeKey`. This is to tell the component which tab will be active.
162
155
163
-
🐢 In the first tab we give it a key of 1 and this will be where we will create a form for the date etc. At the bottom we have the Red button and Red Outline button if you click on it will take you to the next tab while te Red outline button wil push you to the home page.
156
+
🐢 In the first tab we give it a key of 1 and this will be where we will create a form for the date etc. At the bottom we have the Red button and Red Outline button if you click on it will take you to the next tab while the Red outline button wil push you to the home page.
164
157
165
158
🐢 In the second tab we will add a form for the people the person is traveling with. It works similar to the 1st tab, in that if you click the buttons it will route you to the next or previous tab.
166
159
167
-
🐢 The third tab will enable us to charge the user for their trip
160
+
🐢 The third tab will enable us to charge the user for their booking.
168
161
169
-
🐢 The fourth tab is the confirmation one that will fire once they ahve successfully paid for the trip.
162
+
🐢 The fourth tab is the confirmation one that will fire once they have successfully paid for the trip.
170
163
171
-
Next up we will start building out the forms. So if things do not work while we build out the components do not stress
164
+
Next up we will start building out the forms. So if things do not work while we build out the components do not stress, we will be implementing them now.
0 commit comments