Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
training-seat-booking
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Manivasagam S
training-seat-booking
Commits
840f2f6f
Commit
840f2f6f
authored
Jun 11, 2025
by
Manivasagam S
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
my commit
parent
a2582eb2
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
148 additions
and
58 deletions
+148
-58
App.jsx
src/App.jsx
+2
-2
Button.module.css
src/Components/Base/Buttons/Button.module.css
+1
-1
Screen.jsx
src/Components/Base/Screen/Screen.jsx
+1
-1
Screen.module.css
src/Components/Base/Screen/Screen.module.css
+6
-1
Legend.module.css
src/Components/Top-level/Seat-legend/Legend.module.css
+22
-7
Seat.jsx
src/Components/Top-level/Seat/Seat.jsx
+1
-0
Seat.module.css
src/Components/Top-level/Seat/Seat.module.css
+22
-3
SeatLayout.jsx
src/Components/Top-level/SeatLayout/SeatLayout.jsx
+2
-2
SeatLayout.module.css
src/Components/Top-level/SeatLayout/SeatLayout.module.css
+35
-14
Selectseat.jsx
src/Components/Top-level/Seatselect/Selectseat.jsx
+1
-1
Selectseat.module.css
src/Components/Top-level/Seatselect/Selectseat.module.css
+13
-4
Typography.stories.jsx
src/Components/Typography.stories.jsx
+0
-1
Auth.stories.jsx
src/Pages/Auth/Auth.stories.jsx
+29
-12
BookingPage.jsx
src/Pages/BookingPage.jsx
+1
-1
db.json
src/db.json
+12
-8
No files found.
src/App.jsx
View file @
840f2f6f
...
...
@@ -5,7 +5,7 @@ import { Success } from '../src/Components/Top-level/Response/Success/Success.js
import
'./App.css'
;
import
{
AuthPage
}
from
'./Pages/AuthPage.jsx'
;
import
{
ProtectedRoute
}
from
'./auth/ProtectedRoute.jsx'
;
import
{
Logoutpage
}
from
'./Pages/Logoutp
age.jsx'
;
import
{
Bookingpage
}
from
'./Pages/BookingP
age.jsx'
;
export
const
App
=
()
=>
{
return
(
...
...
@@ -16,7 +16,7 @@ export const App = () => {
path=
"/select-seat"
element=
{
<
ProtectedRoute
>
<
Logout
page
/>
<
Booking
page
/>
</
ProtectedRoute
>
}
/>
...
...
src/Components/Base/Buttons/Button.module.css
View file @
840f2f6f
...
...
@@ -88,7 +88,7 @@
}
.secondary
:disabled
{
background-color
:
#
cdcaca
;
background-color
:
#
979595
;
cursor
:
not-allowed
;
}
...
...
src/Components/Base/Screen/Screen.jsx
View file @
840f2f6f
...
...
@@ -11,6 +11,6 @@ export const Screen = ({ width = 600, height = 210 }) => (
</
defs
>
<
path
d=
"M30 60 Q150 36 270 60 L285 130 L10 130 Z"
fill=
"url(#lightGradient)"
/>
<
path
d=
"M30 60 Q150 36 270 60"
stroke=
"#fff"
strokeWidth=
"2"
fill=
"none"
strokeLinecap=
"round"
/>
</
svg
>
</
svg
>
</
div
>
);
src/Components/Base/Screen/Screen.module.css
View file @
840f2f6f
...
...
@@ -6,5 +6,9 @@
min-width
:
30rem
;
position
:
relative
;
bottom
:
1rem
;
}
@media
(
min-width
:
320px
){
.shadow
{
min-width
:
15rem
;
}
}
\ No newline at end of file
src/Components/Top-level/Seat-legend/Legend.module.css
View file @
840f2f6f
.seat
{
display
:
inline-block
;
width
:
10
px
;
height
:
10
px
;
width
:
7
px
;
height
:
7
px
;
background-color
:
transparent
;
border
:
2px
solid
#ccc
;
border-radius
:
15px
;
...
...
@@ -46,19 +46,35 @@
.legendItem
{
display
:
inline-flex
;
align-items
:
center
;
gap
:
10
px
;
gap
:
3
px
;
font-size
:
14px
;
color
:
white
;
font-family
:
'Segoe UI'
;
font-weight
:
500
;
font-size
:
17px
;
font-size
:
13px
;
}
@media
(
min-width
:
425px
){
.legend
{
column-gap
:
80px
;
}
.legendItem
{
font-size
:
15px
;
}
}
@media
(
min-width
:
640px
)
{
.seat
{
width
:
10px
;
height
:
10px
;
}
.legend
{
flex-direction
:
row
;
/* column-gap: 0; */
column-gap
:
150px
;
justify-content
:
center
;
align-items
:
center
;
margin-bottom
:
2rem
;
}
}
\ No newline at end of file
.legendItem
{
gap
:
15px
;
font-size
:
20px
;
}
}
src/Components/Top-level/Seat/Seat.jsx
View file @
840f2f6f
...
...
@@ -8,6 +8,7 @@ export const Seat = ({ seatNo, status, onClick }) => {
[
styles
.
available
]:
status
===
'available'
,
[
styles
.
reserved
]:
status
===
'reserved'
,
[
styles
.
selected
]:
status
===
'selected'
,
[
styles
.
mine
]:
status
===
'mine'
,
});
return
(
...
...
src/Components/Top-level/Seat/Seat.module.css
View file @
840f2f6f
...
...
@@ -2,10 +2,10 @@
display
:
inline-block
;
background-color
:
transparent
;
border
:
0.5px
solid
rgba
(
164
,
175
,
255
,
255
);
width
:
27
px
;
height
:
27
px
;
width
:
18
px
;
height
:
18
px
;
border-radius
:
5px
;
margin
:
8
px
;
margin
:
6
px
;
cursor
:
pointer
;
transition
:
transform
0.2s
ease-in-out
;
position
:
relative
;
...
...
@@ -26,6 +26,9 @@
.reserved
{
background-color
:
#5b66cb
;
}
.mine
{
background-color
:
white
;
}
.reserved
:hover
{
transform
:
none
;
...
...
@@ -86,3 +89,19 @@
visibility
:
visible
;
opacity
:
1
;
}
@media
(
min-width
:
425px
){
.seat
{
width
:
23px
;
height
:
23px
;
margin
:
8px
;
}
}
@media
(
min-width
:
640px
){
.seat
{
width
:
27px
;
height
:
27px
;
margin
:
8px
;
}
}
src/Components/Top-level/SeatLayout/SeatLayout.jsx
View file @
840f2f6f
...
...
@@ -67,7 +67,7 @@ export const SeatLayout = ({
console
.
log
(
selectedSeats
);
return
(
<
div
className=
{
styles
.
container
}
>
<
div
>
{
renderedSeats
.
map
((
rowSeats
,
i
)
=>
(
<
div
key=
{
i
}
className=
{
styles
.
seatcontainer
}
>
{
rowSeats
.
map
((
seat
,
j
)
=>
(
...
...
@@ -75,7 +75,7 @@ export const SeatLayout = ({
))
}
</
div
>
))
}
</
div
>
</
div
>
);
};
...
...
src/Components/Top-level/SeatLayout/SeatLayout.module.css
View file @
840f2f6f
.container
{
display
:
flex
;
justify-content
:
center
;
flex-direction
:
column
;
align-items
:
center
;
margin-bottom
:
5rem
;
width
:
100%
;
overflow-x
:
auto
;
}
.seatcontainer
{
display
:
flex
;
align-items
:
center
;
margin-bottom
:
4px
;
gap
:
8
px
;
padding
:
2px
2
px
;
gap
:
1
px
;
padding
:
1px
1
px
;
}
.seatcontainer
:last-child
{
margin-left
:
8px
;
}
.seatcontainer
:first-child
{
margin-left
:
4px
;
}
/* .seats {
width: 23px;
height: 23px;
...
...
@@ -29,10 +28,33 @@
border: 2px solid #999;
} */
@media
(
max-width
:
640px
)
{
@media
(
min-width
:
425px
){
.container
{
align-items
:
center
;
}
/* .seatcontainer:last-child{
margin-left:1px;
}
.seatcontainer:first-child{
margin-left: 1px;
} */
}
@media
(
min-width
:
640px
)
{
.seatcontainer
{
gap
:
3
px
;
padding
:
1px
1
px
;
gap
:
8
px
;
padding
:
2px
2
px
;
}
}
\ No newline at end of file
.container
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
/* .seatcontainer:last-child{
margin-left:1px;
}
.seatcontainer:first-child{
margin-left: 1px;
} */
}
src/Components/Top-level/Seatselect/Selectseat.jsx
View file @
840f2f6f
...
...
@@ -129,7 +129,7 @@ export const Selectseat = ({onLogout}) => {
</
div
>
<
div
className=
{
styles
.
button
}
>
<
Button
variant=
"secondary"
label=
"Confirm"
size=
'md'
onClick=
{
confirmHandler
}
/>
<
Button
variant=
"secondary"
label=
"Confirm"
size=
'md'
onClick=
{
confirmHandler
}
disabled=
{
selectedSeats
.
length
!=
seatCount
}
/>
</
div
>
<
div
className=
{
styles
.
legend
}
>
...
...
src/Components/Top-level/Seatselect/Selectseat.module.css
View file @
840f2f6f
...
...
@@ -18,9 +18,8 @@ body {
position
:
relative
;
top
:
1rem
;
text-align
:
center
;
margin-top
:
1rem
;
color
:
white
;
font-size
:
2.3
em
;
font-size
:
2
em
;
padding
:
0
1rem
;
}
...
...
@@ -28,7 +27,7 @@ body {
display
:
flex
;
justify-content
:
center
;
position
:
relative
;
bottom
:
5
rem
;
bottom
:
4
rem
;
padding
:
0
1rem
;
}
...
...
@@ -131,7 +130,9 @@ position: relative;
top
:
2rem
;
right
:
1.5rem
;
color
:
white
;
font-size
:
2rem
;
font-size
:
1.5rem
;
z-index
:
1001
;
cursor
:
pointer
;
}
/* .legend {
...
...
@@ -140,6 +141,13 @@ font-size: 2rem;
@media
(
min-width
:
640px
){
.text
{
position
:
relative
;
top
:
1rem
;
text-align
:
center
;
font-size
:
2.3em
;
}
.logoutButton
{
font-size
:
2rem
;
}
}
\ No newline at end of file
src/Components/Typography.stories.jsx
View file @
840f2f6f
...
...
@@ -4,7 +4,6 @@ export default {
export
const
TitleAndParagraph
=
()
=>
(
<
div
className=
"container"
>
<
h1
>
Heading
</
h1
>
<
h2
>
Heading
</
h2
>
<
h3
>
Heading
</
h3
>
...
...
src/Pages/Auth/Auth.stories.jsx
View file @
840f2f6f
import
{
AuthPage
}
from
"../AuthPage"
export
default
{
title
:
'Auth/Auth'
,
component
:
AuthPage
,
argTypes
:
{
onClick
:
{
action
:
"clicked"
,
},
},
}
export
const
Default
=
(
args
)
=>
<
AuthPage
{
...
args
}
/>
\ No newline at end of file
// Auth.stories.jsx
import
{
Auth
}
from
"../Auth/Auth.jsx"
;
import
{
Login
}
from
'../../Components/Form/Login/Login.jsx'
import
{
SignUp
}
from
"../../Components/Form/SignUp/SignUp.jsx"
;
export
default
{
title
:
"Auth/Auth"
,
component
:
Auth
,
};
const
DummyLogin
=
({
onLogin
})
=>
(
<
div
>
<
Login
/>
</
div
>
);
const
DummySignUp
=
({
onSubmit
})
=>
(
<
div
>
<
SignUp
/>
</
div
>
);
export
const
Default
=
()
=>
(
<
Auth
LoginComponent=
{
DummyLogin
}
SignUpComponent=
{
DummySignUp
}
onLoginSubmit=
{
(
data
)
=>
console
.
log
(
"Login Submit:"
,
data
)
}
onSignUpSubmit=
{
()
=>
console
.
log
(
"SignUp Submit"
)
}
/>
);
src/Pages/
Logoutp
age.jsx
→
src/Pages/
BookingP
age.jsx
View file @
840f2f6f
import
{
Selectseat
}
from
"../Components/Top-level/Seatselect/Selectseat"
;
import
{
logout
}
from
"../auth/authService"
;
export
const
Logout
page
=
()
=>
{
export
const
Booking
page
=
()
=>
{
const
onLogout
=
()
=>
{
logout
();
...
...
src/db.json
View file @
840f2f6f
...
...
@@ -8,7 +8,9 @@
"G3"
,
"F3"
,
"F4"
,
"G2"
"G2"
,
"C2"
,
"C8"
]
},
{
...
...
@@ -16,14 +18,15 @@
"phoneNumber"
:
"9361775481"
,
"name"
:
"mani"
,
"reservedSeats"
:
[
"B8"
,
"B7"
,
"B6"
,
"D5"
,
"B4"
,
"B3"
,
"E7"
"C4"
]
},
{
"id"
:
"cbc2"
,
"name"
:
"mani"
,
"email"
:
"mani@gmail.com"
,
"phoneNumber"
:
"9934782103"
,
"reservedSeats"
:
[]
}
]
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment