Gitlab@Informatics
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
65160394
Project
Commits
19b861c6
Commit
19b861c6
authored
2 months ago
by
65160394
Browse files
Options
Downloads
Patches
Plain Diff
Project Round 8
parent
e223d6a9
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
public/booking.css
+74
-0
74 additions, 0 deletions
public/booking.css
routes/tourRoutes.js
+1
-1
1 addition, 1 deletion
routes/tourRoutes.js
views/booking.ejs
+42
-0
42 additions, 0 deletions
views/booking.ejs
views/my-bookings.ejs
+0
-0
0 additions, 0 deletions
views/my-bookings.ejs
with
117 additions
and
1 deletion
public/booking.css
0 → 100644
+
74
−
0
View file @
19b861c6
/* styles.css */
body
{
font-family
:
Arial
,
sans-serif
;
background-color
:
#f4f4f4
;
margin
:
0
;
padding
:
0
;
}
.container
{
width
:
80%
;
margin
:
0
auto
;
padding-top
:
30px
;
}
h1
{
text-align
:
center
;
}
.tour-list
{
background-color
:
#fff
;
padding
:
20px
;
margin-bottom
:
20px
;
border-radius
:
5px
;
box-shadow
:
0
2px
4px
rgba
(
0
,
0
,
0
,
0.1
);
}
.tour-list
ul
{
list-style
:
none
;
padding
:
0
;
}
.tour-list
li
{
margin
:
10px
0
;
padding
:
10px
;
background-color
:
#f9f9f9
;
border-radius
:
5px
;
border
:
1px
solid
#ddd
;
}
.booking-form
{
background-color
:
#fff
;
padding
:
20px
;
border-radius
:
5px
;
box-shadow
:
0
2px
4px
rgba
(
0
,
0
,
0
,
0.1
);
}
.booking-form
form
{
display
:
flex
;
flex-direction
:
column
;
}
.booking-form
label
{
margin-bottom
:
5px
;
}
.booking-form
input
{
padding
:
8px
;
margin-bottom
:
15px
;
border
:
1px
solid
#ccc
;
border-radius
:
5px
;
}
.booking-form
button
{
background-color
:
#4CAF50
;
color
:
white
;
border
:
none
;
padding
:
10px
;
cursor
:
pointer
;
border-radius
:
5px
;
}
.booking-form
button
:hover
{
background-color
:
#45a049
;
}
This diff is collapsed.
Click to expand it.
routes/tourRoutes.js
+
1
−
1
View file @
19b861c6
...
@@ -34,7 +34,7 @@ router.post('/edit-profile', tourController.updateProfile);// อัปเดต
...
@@ -34,7 +34,7 @@ router.post('/edit-profile', tourController.updateProfile);// อัปเดต
//จองทัวร์
//จองทัวร์
router
.
get
(
'
/my-bookings
'
,
tourController
.
getUserBookings
);
router
.
get
(
'
/my-bookings
'
,
tourController
.
getUserBookings
);
router
.
post
(
'
/create
'
,
tourController
.
createBooking
);
router
.
post
(
'
/create
booking
'
,
tourController
.
createBooking
);
router
.
post
(
'
/cancel/:id
'
,
tourController
.
cancelBooking
);
router
.
post
(
'
/cancel/:id
'
,
tourController
.
cancelBooking
);
module
.
exports
=
router
;
module
.
exports
=
router
;
This diff is collapsed.
Click to expand it.
views/booking.ejs
0 → 100644
+
42
−
0
View file @
19b861c6
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
Book a Tour
</title>
<link
rel=
"stylesheet"
href=
"/css/booking.css"
>
</head>
<body>
<div
class=
"container"
>
<h1>
Tour Booking
</h1>
<!-- แสดงรายการทัวร์ -->
<div
class=
"tour-list"
>
<h2>
Available Tours
</h2>
<ul>
<
%
tours.forEach
(
function
(
tour
)
{
%
>
<li>
<strong><
%=
tour.name
%
></strong><br>
<
%=
tour.description
%
><br>
Price:
<
%=
tour.price
%
>
USD
<br>
Duration:
<
%=
tour.duration
%
>
days
<br>
<a
href=
"/book/<%= tour.id %>"
>
Book this Tour
</a>
</li>
<
%
});
%
>
</ul>
</div>
<!-- ช่องกรอกข้อมูลจอง -->
<div
class=
"booking-form"
>
<h2>
Book a Tour
</h2>
<form
action=
"/api/create-booking"
method=
"POST"
>
<label
for=
"tour-id"
>
Tour ID
</label>
<input
type=
"number"
id=
"tour-id"
name=
"tour-id"
required
>
<button
type=
"submit"
>
Book Now
</button>
</form>
</div>
</div>
</body>
</html>
This diff is collapsed.
Click to expand it.
views/my
B
ookings.ejs
→
views/my
-b
ookings.ejs
+
0
−
0
View file @
19b861c6
File moved
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment