Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🖐 Delivered Bookbix Frontend ver1.0 #49

Open
wants to merge 356 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
356 commits
Select commit Hold shift + click to select a range
1454494
Navbar position fixed => sticky
CharnkijCU Feb 15, 2023
6eb40e8
Merge remote-tracking branch 'origin/dev' into feature/profile-manage…
CharnkijCU Feb 15, 2023
8d2a497
🛠Fixed Error from App.tsx
Nick-solich Feb 15, 2023
5abb490
🎒Applied ManageProfile.tsx
Nick-solich Feb 15, 2023
0d4d21c
LirstName -> Lastname
CharnkijCU Feb 15, 2023
478ba99
Merge pull request #13 from 2110336-2565-2/feature/profile-management…
CharnkijCU Feb 15, 2023
2d21ae4
Merge branch 'feature/production-tools' into dev
S1xZ Feb 15, 2023
f45a34e
Update mongoscript
S1xZ Feb 15, 2023
8322388
🛠Fixed Style
Nick-solich Feb 15, 2023
94e8862
➕ Add credential when i fetch the POST API to save cookie in the client
chatreeck7 Feb 23, 2023
c64f20b
➕ Pre-Add userInterface for getUserInfo function
chatreeck7 Feb 23, 2023
d9f4220
Help me search page
CharnkijCU Feb 24, 2023
5b3d109
🛠 Fix the useEffect to only once render at initial and Adjust meaning…
chatreeck7 Feb 24, 2023
44cc066
👩‍💻Update .prettierrc.json printWidth to 120
Nick-solich Feb 24, 2023
4a5e2b2
Add error type
CharnkijCU Feb 25, 2023
340bc67
Merge remote-tracking branch 'origin/dev' into feature/search-page
CharnkijCU Feb 25, 2023
280dbd3
Merge pull request #16 from 2110336-2565-2/bugfix/authen-sys
chatreeck7 Feb 25, 2023
de295c4
🏗 Build scss file to preserve a style for booking-summary page
chatreeck7 Feb 25, 2023
8030af9
🏗 Build the structure (interface, design patterns, method) for bookin…
chatreeck7 Feb 25, 2023
1ecef56
Merge branch 'dev' into feature/change-password-page
Nick-solich Feb 26, 2023
7197460
✔Merge pull request #14 from 2110336-2565-2/feature/change-password-page
Nick-solich Feb 26, 2023
93124d6
➕ Add more style such as color, font-weight for booking summary page
chatreeck7 Feb 26, 2023
166a7da
🚚 Update layout and information each booking of booking-summary-panel
chatreeck7 Feb 26, 2023
f045dc9
🛠Manage Import File
Nick-solich Feb 27, 2023
5a973f5
🎒History V.1
Nick-solich Feb 27, 2023
c581d5f
🌹Add style
Nick-solich Feb 27, 2023
64ee179
🎒Implement LoggedInHistory with appearance
Nick-solich Feb 27, 2023
eb7d043
🚚 Update the style such as font, colors, screenSize and booking compo…
Feb 28, 2023
0f08479
🏗️ Build bookingsSummary page and multiple booking component for resp…
Feb 28, 2023
1d59c58
➕ Add the calculateDays function to calc days to show in small screen…
Feb 28, 2023
04447c7
➕ Add fonts and import to styles.scss
Mar 3, 2023
a9a4e1d
✅ Merge pull request #17 from 2110336-2565-2/improve/refactor
chatreeck7 Mar 3, 2023
0f8021a
🎒 Update Key to component and fix style
Nick-solich Mar 3, 2023
dfbf791
✅ Merge branch 'dev' into feature/logged-in-history
Nick-solich Mar 3, 2023
f1236a4
✅ Merge branch 'dev' into feature/booking-summary
Mar 5, 2023
12d47d9
🎒Update Responsive for web
Nick-solich Mar 10, 2023
8a0d15a
➕ Add fontAwesome to use font
Mar 11, 2023
9f2aca8
🚚🧼 Update&Clean the bookingSummary page with layout & S.O.L.I.D.
Mar 11, 2023
84f5965
🚚 Update by Adding <Link> to route to another page
Mar 11, 2023
89ec02b
Add location cards
CharnkijCU Mar 11, 2023
ccf5b3d
🐱‍👤Finish implement logginHistory
Nick-solich Mar 11, 2023
22b9c5f
Merge remote-tracking branch 'origin/dev' into feature/search-page
CharnkijCU Mar 11, 2023
5464656
🚚 Improve navBar into better version and Add dynamic for role user
chatreeck7 Mar 11, 2023
1e58fc8
🚚 Update API endpoint to test correctly
chatreeck7 Mar 11, 2023
d72a913
🏗️ Build a customized provider to share context across files
chatreeck7 Mar 12, 2023
c9c513f
🛠️ Fix the problem about a sharing context
chatreeck7 Mar 12, 2023
b014ebc
🚚 Update a little style for a better user experience
chatreeck7 Mar 12, 2023
4e068ff
Fis scss
CharnkijCU Mar 12, 2023
d7159b9
Merge remote-tracking branch 'origin/feature/navigation-bar' into fea…
CharnkijCU Mar 12, 2023
4acd543
🧼 Clean unnecessary css
chatreeck7 Mar 12, 2023
d15a5d6
➕ Add useful comment for better readability
chatreeck7 Mar 12, 2023
8b4efb2
🌹Fixed Some old redundant code and make more readable
Nick-solich Mar 12, 2023
d5ec2d9
Improve responsive
CharnkijCU Mar 12, 2023
436a84f
🌹Fixed Old Styles
Nick-solich Mar 12, 2023
cc93075
🎒Fixed ReviewButton
Nick-solich Mar 12, 2023
2d0e09e
🐱‍👤Add CustomButton and CustomModal to ReviewButton
Nick-solich Mar 12, 2023
e190a3c
🛠️ Fix the layout of location-booking
chatreeck7 Mar 12, 2023
1e120ee
🧼🚚 Clean code & Update the API of location-booking page.
chatreeck7 Mar 12, 2023
19c19e6
Add docker compose to run frontend only
S1xZ Mar 12, 2023
121acee
Merge branch 'feature/run-front-only' into dev
S1xZ Mar 12, 2023
385e53d
Merge branch 'dev' into feature/register-page
Nick-solich Mar 12, 2023
7743695
🐱‍👤Update Register path
Nick-solich Mar 12, 2023
9f7ad5e
Merge branch 'feature/logged-in-history' into dev
Nick-solich Mar 12, 2023
211d2b5
📥Merge pull request #23 from 2110336-2565-2/feature/register-page
Nick-solich Mar 12, 2023
74fb901
🌹Update Color add Improve ReviewModal
Nick-solich Mar 12, 2023
60f38c7
📥 Merge branch 'dev' into feature/rating-location
Nick-solich Mar 12, 2023
9f0ed0d
🛠 Update Import and fix scss color
Nick-solich Mar 12, 2023
b6390dc
✅ Merge branch 'dev'
chatreeck7 Mar 13, 2023
46da727
✅ Merge branch 'dev' into feature/booking-summary
chatreeck7 Mar 13, 2023
ffde1a4
🧼🛠️ Clean delete btn and Fix the layout to fully responsive
chatreeck7 Mar 13, 2023
0a2b157
✅ Merge pull request #18 from 2110336-2565-2/feature/booking-summary
chatreeck7 Mar 13, 2023
646cd7b
✅ Merge branch 'dev' into feature/navigation-bar
chatreeck7 Mar 13, 2023
178aa2d
✅🛠️ Fix conflict and clean some unnecessary
chatreeck7 Mar 13, 2023
77ee15d
✅ Merge pull request #20 from 2110336-2565-2/feature/navigation-bar
chatreeck7 Mar 13, 2023
98c977f
🛠️ Fix bug z-index
chatreeck7 Mar 13, 2023
b35685e
Merge pull request #24 from 2110336-2565-2/fix-bug/navBar-z-index
CharnkijCU Mar 13, 2023
9595543
🛠️ Fix one line bug about the API type of response data
chatreeck7 Mar 13, 2023
c5087dc
📥 Merge branch 'dev' into feature/rating-location
Nick-solich Mar 13, 2023
93d3d7f
🛠 Fixed some bugs in duplicate import
Nick-solich Mar 13, 2023
f909a32
🛠️ Fix a little bug about Alert in login page
chatreeck7 Mar 13, 2023
58f0200
improve for jew's comments, change searchPage to homePage & comment o…
CharnkijCU Mar 13, 2023
76e865d
mock make payment
SorawitThanitthapongsa Mar 13, 2023
a4e0571
Merge branch 'dev' into feature/search-page
Nick-solich Mar 13, 2023
2864621
🛠 Fixed SearchPage path to index
Nick-solich Mar 13, 2023
8e8d5a9
🐱‍👤 Add jwt-decode package
Nick-solich Mar 13, 2023
14813ac
🎒 Build Review according to Figma
Nick-solich Mar 13, 2023
f6a1aa7
change router of resetpassword to match backend
clickCA Mar 13, 2023
4d7866f
🐱‍👤Add react-cookie package
Nick-solich Mar 13, 2023
dd7271f
🐱‍👓Finished Review v.1
Nick-solich Mar 13, 2023
92f7230
📥 Merge pull request #26 from 2110336-2565-2/improve/reset-password
Nick-solich Mar 13, 2023
06c3582
Merge pull request #21 from 2110336-2565-2/feature/search-page
CharnkijCU Mar 13, 2023
2b8286f
Merge pull request #25 from 2110336-2565-2/feature/payment
clickCA Mar 13, 2023
76595b9
Merge branch 'dev' into feature/rating-location
Nick-solich Mar 13, 2023
34d5343
📥 Merge pull request #27 from 2110336-2565-2/feature/rating-location
Nick-solich Mar 13, 2023
d9aeafe
🛠 Fix route path
Nick-solich Mar 13, 2023
a4acdc8
add logged-in history to navbar
CharnkijCU Mar 13, 2023
903da07
✅ Merge branch 'dev' into fix-bug/location-style-api
chatreeck7 Mar 13, 2023
967d77c
Merge remote-tracking branch 'origin/dev' into dev
CharnkijCU Mar 13, 2023
1571cab
✅ Merge pull request #28 from 2110336-2565-2/fix-bug/location-style-api
chatreeck7 Mar 13, 2023
3e9c8fb
Fix 🪲
CharnkijCU Mar 13, 2023
f2beaab
🐱‍👤 Change WebInform --> IconContainer
Nick-solich Mar 15, 2023
a690d2d
🐱‍👤 Change Registration --> RegisterContainer
Nick-solich Mar 15, 2023
28da47a
🐱‍👤change LoginForm --> LoginContainer
Nick-solich Mar 15, 2023
b735275
🐱‍👤 Change import scss style
Nick-solich Mar 15, 2023
ba032a2
🐱‍👤 Change name of LoginRegister to Authenticate
Nick-solich Mar 15, 2023
653b344
🐱‍👤 Imporve Import and CustomHook
Nick-solich Mar 18, 2023
545bf64
🛠 Fixed Corrective ness of Login and Register
Nick-solich Mar 18, 2023
bb4f930
🛠 Improve Interface LoggedIn History
Nick-solich Mar 18, 2023
164008a
🛠 delete error by insert key prop
Nick-solich Mar 18, 2023
5566b39
🛠 Fixed Error In login NavBar
Nick-solich Mar 18, 2023
5f9e044
change reset password path
Nick-solich Mar 18, 2023
ea3e299
🛠 Type fixing and password constraint
Nick-solich Mar 20, 2023
01b8b4f
🛠 Fix RoutePath, NavBar error
Nick-solich Mar 20, 2023
8d437cf
🛠 Fix import UserType
Nick-solich Mar 20, 2023
b1f29b7
🛠 Delete Unused console.log
Nick-solich Mar 20, 2023
96b0c48
🛠Fix BookingSummary Error
Nick-solich Mar 20, 2023
ece7e00
✅ Merge pull request #29 from 2110336-2565-2/bugfix/authen-sys-02
Nick-solich Mar 21, 2023
b521a0f
🐱‍👓Not Found Page
Nick-solich Mar 21, 2023
798205a
🐱‍👓To the moon!!!
Nick-solich Mar 21, 2023
9612166
🌹 Change BG Color
Nick-solich Mar 21, 2023
b04d6ac
✅ Merge pull request #30 from 2110336-2565-2/improve/404-notfound
Nick-solich Mar 28, 2023
8904681
🚚 Adjust filePath reference and deal with Optional Things
chatreeck7 Mar 28, 2023
5dbb9f4
🛠️🧼 Fix and Clean the code to integrate with Backend side correctly V…
chatreeck7 Mar 28, 2023
db4290c
🚚 Change the way to route to paymentPage
chatreeck7 Mar 30, 2023
15916c8
🚚 Adjust the bookings detail to integrate with back side
chatreeck7 Mar 30, 2023
cf46285
🚚 Adjust the attribute to route with the payment button
chatreeck7 Mar 30, 2023
7a6dc53
🛠️ Fix the payment button to route correctly with confirmation modal
chatreeck7 Mar 30, 2023
2ff49bb
🚚 Update the time count logic of booking in one day. (hrs.)
chatreeck7 Mar 30, 2023
5fbd8e9
🐱‍👓 Init All file
Nick-solich Mar 30, 2023
3343c4f
pass variable between SearchPage's components
CharnkijCU Mar 30, 2023
39ad8d9
create page from manage location page
SorawitThanitthapongsa Mar 30, 2023
a0772a8
➕🛠️ Add the confirmation modal and Fix a little bugs
chatreeck7 Mar 30, 2023
97cda59
🧼🛠️ Clean unnecessary code and Fix the logic time of booking
chatreeck7 Mar 30, 2023
995d282
make real search
CharnkijCU Mar 30, 2023
2d10b72
add createPromotion.scss
SorawitThanitthapongsa Mar 31, 2023
45f879c
try to commit
SorawitThanitthapongsa Mar 31, 2023
2113299
second try
SorawitThanitthapongsa Mar 31, 2023
2a4ea14
fix margin
SorawitThanitthapongsa Mar 31, 2023
ed34355
adjust discount form from discount type
SorawitThanitthapongsa Mar 31, 2023
1d35b7e
🎒 Update name from review interface
Nick-solich Mar 31, 2023
47fab9e
🎒 Create Fundamental Interface
Nick-solich Mar 31, 2023
7c95bbc
🛠 Init File
Nick-solich Mar 31, 2023
2244da4
🎒 Change File Name LocationManage
Nick-solich Mar 31, 2023
064a891
🎒 Change Font Import
Nick-solich Mar 31, 2023
8a5b1db
🎒🌹 Implement first version with mock data
Nick-solich Apr 1, 2023
757aca7
📥 Install React-icons
Nick-solich Apr 1, 2023
d92439a
🎒 Add navbar height
Nick-solich Apr 1, 2023
6017e2f
Fix docker image remove command no longer working
S1xZ Apr 1, 2023
d434d86
📚Temp
Nick-solich Apr 1, 2023
6272081
📥 Merge branch 'hotfix/docker-reference-error' into feature/manage-lo…
Nick-solich Apr 1, 2023
790e07f
Merge front&back in manage profile page
CharnkijCU Apr 1, 2023
b9bda7b
Deleted Email box, user can't change email
CharnkijCU Apr 1, 2023
57cfd1d
🎒 Fix responsive and add navbar height
Nick-solich Apr 1, 2023
bb219db
🎒 Change my locations path
Nick-solich Apr 1, 2023
12abd27
🐱‍👤 Integrate Login Data with API
Nick-solich Apr 1, 2023
7e883d7
✨Connect manage single location page to backend but now can't PUT to …
CharnkijCU Apr 1, 2023
4363370
🛠️ Fig bug about style of Swiper
chatreeck7 Apr 2, 2023
f7f59c7
🚚 Adjust name of review's attributes
chatreeck7 Apr 2, 2023
eec1199
⛮ Handle the error that can be happened while using the application
chatreeck7 Apr 2, 2023
9ee0175
🐱‍👤Finish implement LocationCard Create button
Nick-solich Apr 2, 2023
f7592ed
🛠️ Fix a little for the same convention of interface name
chatreeck7 Apr 2, 2023
c961306
🛠️ Fix API to send body w/ user_id to /bookings for fetching booking
chatreeck7 Apr 2, 2023
5ce2f0c
🚚 Adjust the currency label from THB to BAHT for consistency with oth…
chatreeck7 Apr 2, 2023
15e1f0e
Merge pull request #31 from 2110336-2565-2/improve/management-page
Charnkij Apr 2, 2023
8665fb6
✅ Merge pull request #33 from 2110336-2565-2/improve/login-history
Nick-solich Apr 2, 2023
0f0a3ee
🐱‍👤 Create Location page
Nick-solich Apr 2, 2023
06a1f45
🐱‍👤Prepare To connect get locations by provider id
Nick-solich Apr 2, 2023
196290f
🐱‍👤 Finish Implement Delete Location
Nick-solich Apr 2, 2023
fcb72f6
🚀Completed manage single location page
CharnkijCU Apr 3, 2023
c288e1d
Merge remote-tracking branch 'origin/feature/manage-location' into fe…
CharnkijCU Apr 3, 2023
e4c1464
fix style
SorawitThanitthapongsa Apr 3, 2023
f756dec
🌹 Design CSS Create Location Page
Nick-solich Apr 3, 2023
bc632aa
edit fill percentage
SorawitThanitthapongsa Apr 3, 2023
2760d0e
🐱‍👤 Implement Create Location via API
Nick-solich Apr 3, 2023
f87feb5
Merge remote-tracking branch 'origin/feature/manage-location' into fe…
Nick-solich Apr 3, 2023
5c89099
🐱‍👤Fix Problem
Nick-solich Apr 3, 2023
6363a7a
🐱‍👓 Finish version.1
Nick-solich Apr 3, 2023
d2bc88d
➕ Add NotificationInterface
chatreeck7 Apr 3, 2023
2561cfa
➕ Add Notification settings add the navigation bar
chatreeck7 Apr 3, 2023
bedbeea
➕ Add Notification settings in the navigation bar
chatreeck7 Apr 3, 2023
059375b
edit type input fix location input to list
SorawitThanitthapongsa Apr 3, 2023
a3d6d17
Merge remote-tracking branch 'origin/feature/subscription-noti' into …
chatreeck7 Apr 3, 2023
88eaf18
➕ Add checked attribute to pre-checked if customer used to turn it on
chatreeck7 Apr 3, 2023
aa18f11
🛠 Fixed For Individual Customers
Nick-solich Apr 3, 2023
4675a9f
Merge remote-tracking branch 'refs/remotes/origin/feature/manage-loca…
CharnkijCU Apr 3, 2023
8d54780
🛠 Fuxed Path and testing user path
Nick-solich Apr 3, 2023
f6eb16f
🛠 Delete unused
Nick-solich Apr 3, 2023
c189343
✅ Merge pull request #37 from 2110336-2565-2/improve/login-history
Nick-solich Apr 3, 2023
6a27d9f
🛠 Fixed min-height
Nick-solich Apr 3, 2023
a843d6c
💩Change image path
CharnkijCU Apr 3, 2023
72c3b33
🛠️ Fix the weird style of location-booking page
chatreeck7 Apr 3, 2023
ee10bfa
Merge branch 'dev' into integrate/location-booking
chatreeck7 Apr 3, 2023
2b720ca
📥 Merge branch 'dev' into feature/manage-location
Nick-solich Apr 3, 2023
a5b497c
✅ Merge pull request #38 from 2110336-2565-2/feature/manage-location
Nick-solich Apr 3, 2023
6973382
✅ Merge branch 'dev' into integrate/location-booking
chatreeck7 Apr 3, 2023
835bcbd
🛠️ Fix location interface's name for consistency name
chatreeck7 Apr 3, 2023
d0035a2
✅ Merge pull request #34 from 2110336-2565-2/integrate/location-booking
chatreeck7 Apr 3, 2023
32d194a
🫦Verify provider
CharnkijCU Apr 3, 2023
e1f991c
Merge pull request #39 from 2110336-2565-2/feature/verify-provider
CharnkijCU Apr 3, 2023
82a2f2e
🛠️ Fix the location-bookings create-booking API and LocationInterface
chatreeck7 Apr 3, 2023
5640b0e
✅ Merge branch 'dev' into integrate/bookings-summary
chatreeck7 Apr 3, 2023
877eb86
✅ Merge pull request #35 from 2110336-2565-2/integrate/bookings-summary
chatreeck7 Apr 3, 2023
9555a74
✅ Merge branch 'dev' into feature/subscription-noti
chatreeck7 Apr 3, 2023
d4cff3a
✅ Merge pull request #36 from 2110336-2565-2/feature/subscription-noti
chatreeck7 Apr 3, 2023
7d7de04
edit api
SorawitThanitthapongsa Apr 3, 2023
0437a2b
🛠️ Fix bug of location.time and Interface
chatreeck7 Apr 3, 2023
98519aa
🛠️ Fix style of Review component
chatreeck7 Apr 3, 2023
015dd0e
🛠️ Fix typo
chatreeck7 Apr 3, 2023
3401f96
🛠️ Fix minor problem about bad user experience
chatreeck7 Apr 3, 2023
8b34509
🛠️ Fix the interface of booking to use with payment page
chatreeck7 Apr 3, 2023
6ebdcc3
🚚 Adjust what ?
chatreeck7 Apr 3, 2023
88018da
🧼 Clean all file
chatreeck7 Apr 3, 2023
01d16a6
Merge pull request #41 from 2110336-2565-2/feature/create-promotion
SorawitThanitthapongsa Apr 4, 2023
b384b6e
🛠 Test commit
Nick-solich Apr 11, 2023
7e4b50e
🔧 Init robotframework Template
Nick-solich Apr 16, 2023
c73f51f
📚 Add readme for register test
Nick-solich Apr 16, 2023
84a10f5
🔧 Edit environment
Nick-solich Apr 16, 2023
5c6a362
🐱‍👤 Add respond when success register for 1s
Nick-solich Apr 16, 2023
7ec2c81
Merge branch 'improve/registration' into test/register
Nick-solich Apr 16, 2023
489940e
🎒 Update Acceptance Criteria for register
Nick-solich Apr 16, 2023
8a6b076
🛠 Fix radio value
Nick-solich Apr 16, 2023
5bb8d4f
👩‍💻 Finished Robotframwork test
Nick-solich Apr 16, 2023
0961954
✅ Merge branch 'dev' into hotfix/location-booking
chatreeck7 Apr 24, 2023
6375560
✅ Merge pull request #40 from 2110336-2565-2/hotfix/location-booking
chatreeck7 Apr 24, 2023
34d532e
✅ Merge pull request #42 from 2110336-2565-2/improve/registration
chatreeck7 Apr 24, 2023
429930c
✅ Merge pull request #43 from 2110336-2565-2/test/register
chatreeck7 Apr 24, 2023
5f5ffef
➕Add react-toastify
chatreeck7 Apr 25, 2023
05f2676
🚚 Adjust the bookLocation to handle error condition
chatreeck7 Apr 25, 2023
2d694cc
🔥Hot fix search page with function & type
CharnkijCU Apr 25, 2023
8d8c9e9
Merge pull request #45 from 2110336-2565-2/hotfix/search-page
Charnkij Apr 25, 2023
729426b
🛠️ Fix bugs of Typescript type
chatreeck7 Apr 26, 2023
58db3d8
Merge branch 'dev' into hotfix/error-handle
chatreeck7 Apr 26, 2023
924b6ad
🛠️ Fix a bug that cause from type of exampleLocations Data
chatreeck7 Apr 26, 2023
0f47e40
✅ Merge pull request #44 from 2110336-2565-2/hotfix/error-handle
chatreeck7 Apr 26, 2023
7cfe222
➕ Add the booking_id to paymentAPI
chatreeck7 Apr 26, 2023
1c4e71f
✅ Merge pull request #46 from 2110336-2565-2/hotfix/payment-body
chatreeck7 Apr 26, 2023
03c9e35
FIX FETCH LOCATION
SorawitThanitthapongsa Apr 26, 2023
6db6df1
🛠️ Fig bugs and confirm the booking cannot be repeat
chatreeck7 Apr 26, 2023
21be448
✅ Merge
SorawitThanitthapongsa Apr 26, 2023
fbdfa04
🤷🏻 ?? WTF Mystery bug
chatreeck7 Apr 26, 2023
40ebbe5
✅ Complete create-promotion and solve mystery bug
SorawitThanitthapongsa Apr 26, 2023
04a3327
Merge remote-tracking branch 'origin/dev' into feature/create-promotion
SorawitThanitthapongsa Apr 26, 2023
2416fbd
🛠 Fix for both provider and customer history
Nick-solich Apr 26, 2023
a330dd9
🛠 Correct path
Nick-solich Apr 26, 2023
ef136ba
Merge pull request #47 from 2110336-2565-2/hotfix/loggin-provider
Nick-solich Apr 26, 2023
9f5ae03
🛠️ Fix toast.promise() message
chatreeck7 Apr 26, 2023
0c3357f
🛠 Fix location review
Nick-solich Apr 26, 2023
0ad7bf6
🚚 Adjust the payment button in bookingSummary
chatreeck7 Apr 26, 2023
fe9469a
✅ Merge pull request #48 from 2110336-2565-2/hotfix/custom-location
Nick-solich Apr 26, 2023
3c5d53c
change URL to env variable
CharnkijCU Apr 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Web Application Environment Variables
NODE_ENV = development
CLIENT_PORT = 3000
SERVER_PORT = 3000
BACKEND_SERVER_PORT = 3001
VITE_API_URL = "http://localhost:3001"

# MongoDB Environment Variables

DB_CLIENT_PORT = 27017
MONGO_ROOT_USER = admin
MONGO_ROOT_PASSWORD = admin
MONGO_INITDB_DATABASE = bookbix
MONGO_INITDB_USER = user
MONGO_INITDB_PWD = password

19 changes: 19 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends" : [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
]
}
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text=auto

# Never modify line endings of our mongo scripts
*.sh text eol=lf
mongoscripts/* text eol=lf
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,19 @@ pnpm-debug.log*
lerna-debug.log*

node_modules
# Build files
dist
/dist/*
dist-ssr
*.local

# Environment variables
.env

# Database files and Mongoscripts
/data/*
mongoscripts/*

# Editor directories and files
.vscode/*
!.vscode/extensions.json
Expand All @@ -21,4 +30,4 @@ dist-ssr
*.ntvs*
*.njsproj
*.sln
*.sw?
*.sw?
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": false,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 120
}
65 changes: 64 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,64 @@
# sec33_Group4_BookBix_Frontend
# BookBix_Frontend

### Development Setups

##### Docker up

```bash
docker-compose up -d --build && docker rmi $(docker images -f “dangling=true” -q)
```

##### Docker down

```bash
docker-compose down -v
```

##### Extension on VSCode
```
Dev Containers
```

### First approach to the project
1. ##### open you docker desktop
2. ##### run the shell script
```
sh docker.sh # this command will docker-compose down then docker-compose up automatically
```
3. ##### re-check that your docker container ready in docker deaktop
4. ##### install node_module
```
npm install # for your local development
```
> noted: if you desire to put additional package from node_modules, you can do it! but remind yourself to run sh docker.sh again because you should ensure that devEnv in contaner should up to date with your desire !

5. ##### try to make some runable changes on your code !
6. ##### test on localhost
```
http://localhost:[PORT] # in this project PORT = 3000
```

#### Current tech list

- front end
<img align="left" alt="Typescript" width="40px" src="https://cdn.cdnlogo.com/logos/t/96/typescript.svg"/>
<img align="left" alt="React" width="40px" style="padding-right:10px;" src="https://cdn.cdnlogo.com/logos/r/63/react.svg" />
<img align="left" alt="Vite" width="50px" style="padding-right:10px;" src="https://user-images.githubusercontent.com/89622162/216382527-be11e41a-1ed5-4b52-9da5-d6fdf5c19d11.png" />
<br/>

#

- back end
<img align="left" alt="Typescript" width="40px" src="https://cdn.cdnlogo.com/logos/t/96/typescript.svg"/>
<img align="left" alt="mongoDB" width="40px" style="padding-right:10px;" src="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/mongodb/mongodb-original-wordmark.svg" />
<img align="left" alt="NestJS" width="100px" style="padding-right:10px;" src="https://www.vectorlogo.zone/logos/nestjs/nestjs-ar21.svg" />
<br/>

#

- Devops
<img align="left" alt="Docker" width="40px" style="padding-right:10px;" src="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/docker/docker-original.svg" />
<br/>


## !! DO NOT TOUCH DOCKER FILE !!
18 changes: 18 additions & 0 deletions docker-compose.front.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: '3.7'
services:
vite-app:
container_name: vite-app
build:
context: .
dockerfile: Dockerfile
image: s1xz/bookbix-frontend
restart: unless-stopped
ports:
- '${CLIENT_PORT}:${SERVER_PORT}'
volumes:
- .:/app
- /app/node_modules
environment:
PORT: ${SERVER_PORT}
NODE_ENV: ${NODE_ENV}
working_dir: /app
44 changes: 40 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,49 @@ services:
build:
context: .
dockerfile: Dockerfile
image: s1xz/bookbix-frontend
restart: unless-stopped
ports:
- 3000:3000
- '${CLIENT_PORT}:${SERVER_PORT}'
volumes:
- .:/app
- /app/node_modules
command: npm run dev
environment:
PORT: ${SERVER_PORT}
NODE_ENV: ${NODE_ENV}
working_dir: /app
depends_on:
- backend-app
networks:
- backbone
backend-app:
image: s1xz/bookbix-backend:latest
ports:
- '${BACKEND_SERVER_PORT}:3000'
restart: unless-stopped
environment:
MONGODB_DBURL: mongodb://${MONGO_INITDB_USER}:${MONGO_INITDB_PWD}@db:27017/${MONGO_INITDB_DATABASE}?authSource=${MONGO_INITDB_DATABASE}
MONGODB_DBNAME: ${MONGO_INITDB_DATABASE}
PORT: 3000
NODE_ENV: development
working_dir: /app
depends_on:
- db
networks:
- backbone
db:
image: mongo:4.0.2
restart: unless-stopped
ports:
- '${DB_CLIENT_PORT}:27017'
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_ROOT_USER}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_ROOT_PASSWORD}
MONGO_INITDB_DATABASE: ${MONGO_INITDB_DATABASE}
MONGO_INITDB_USERNAME: ${MONGO_INITDB_USER}
MONGO_INITDB_PASSWORD: ${MONGO_INITDB_PWD}
volumes:
- ./mongoscripts:/docker-entrypoint-initdb.d:ro
networks:
- backbone
networks:
backbone:
driver: bridge
4 changes: 4 additions & 0 deletions docker.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Remove-Item -Force -Recurse ./data
docker-compose down -v
docker-compose up -d --build
docker image prune -af
4 changes: 4 additions & 0 deletions docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
rm -rf ./data
docker-compose down -v
docker-compose up -d --build
docker image prune -af
3 changes: 3 additions & 0 deletions dockerfront.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
docker-compose down -v
docker-compose -f docker-compose.front.yml up -d --build
docker image prune -af
3 changes: 3 additions & 0 deletions dockerfront.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
docker-compose down -v
docker-compose -f docker-compose.front.yml up -d --build
docker image prune -af
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/svg+xml" href="/books.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
<title>BookBix</title>
</head>
<body>
<div id="root"></div>
Expand Down
16 changes: 16 additions & 0 deletions mongoscripts/00-init-mongo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#FOR WHOM TO USE/EDIT THIS SCRIPT
#THE END OF LINE MUST BE LF, NOT CRLF
echo '################ MONGO ENTRYPOINT START ################';
echo 'CREATING USER:'$MONGO_INITDB_USERNAME;
mongo -- <<EOF
use admin;
db.auth('$MONGO_INITDB_ROOT_USERNAME', '$MONGO_INITDB_ROOT_PASSWORD');
use $MONGO_INITDB_DATABASE;

db.createUser({
user: '$MONGO_INITDB_USERNAME',
pwd: '$MONGO_INITDB_PASSWORD',
roles: ["readWrite"]
});
EOF
echo '################ MONGO ENTRYPOINT END ################';
62 changes: 62 additions & 0 deletions mongoscripts/01-customers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
db.customers.insertMany([
{
_id: ObjectId('000000000001000000000001'),
firstname: 'John',
lastname: 'Doe',
sex: 'Male',
birthdate: '1985-03-15',
username: 'johndoe85',
password: '$2a$12$rCMpOnOuZMulEy.SrzMH7.mx3gzWgwVh96EgIuKuvYXI7A.9SBJJK', //test123
email: 'johndoe85@gmail.com',
date_created: new Date('2022-12-01T10:00:00.000Z'), //Stored in ISO format
latest_device: 'WINDOWS - CHROME',
},
{
_id: ObjectId('000000000001000000000002'),
firstname: 'Jane',
lastname: 'Smith',
sex: 'Female',
birthdate: '1990-07-20',
username: 'janesmith90',
password: '$2a$12$rCMpOnOuZMulEy.SrzMH7.mx3gzWgwVh96EgIuKuvYXI7A.9SBJJK', //test123
email: 'janesmith90@gmail.com',
date_created: new Date('2022-11-15T11:30:00.000Z'),
latest_device: 'WINDOWS - CHROME',
},
{
_id: ObjectId('000000000001000000000003'),
firstname: 'Michael',
lastname: 'Johnson',
sex: 'Male',
birthdate: '1995-01-10',
username: 'michaelj95',
password: '$2a$12$rCMpOnOuZMulEy.SrzMH7.mx3gzWgwVh96EgIuKuvYXI7A.9SBJJK', //test123
email: 'michaelj95@gmail.com',
date_created: new Date('2022-10-20T09:00:00.000Z'),
latest_device: 'WINDOWS - CHROME',
},
{
_id: ObjectId('000000000001000000000004'),
firstname: 'Emily',
lastname: 'Brown',
sex: 'Female',
birthdate: '1992-06-05',
username: 'emilybrown92',
password: '$2a$12$rCMpOnOuZMulEy.SrzMH7.mx3gzWgwVh96EgIuKuvYXI7A.9SBJJK', //test123
email: 'emilybrown92@gmail.com',
date_created: new Date('2022-09-10T14:00:00.000Z'),
latest_device: 'WINDOWS - CHROME',
},
{
_id: ObjectId('000000000001000000000005'),
firstname: 'David',
lastname: 'Williams',
sex: 'Male',
birthdate: '1987-12-25',
username: 'davidw87',
password: '$2a$12$rCMpOnOuZMulEy.SrzMH7.mx3gzWgwVh96EgIuKuvYXI7A.9SBJJK', //test123
email: 'davidw87@gmail.com',
date_created: new Date('2022-10-20T09:00:00.000Z'),
latest_device: 'WINDOWS - CHROME',
},
]);
32 changes: 32 additions & 0 deletions mongoscripts/02-providers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
db.providers.insertMany([
{
_id: ObjectId('000000000002000000000001'),
username: 'provider1',
password: '$2a$12$rCMpOnOuZMulEy.SrzMH7.mx3gzWgwVh96EgIuKuvYXI7A.9SBJJK', //test123
email: 'provider1@example.com',
date_created: new Date('2023-02-04T12:34:56.789Z'),
organization_name: 'Provider Inc.',
locations: [
ObjectId('000000000004000000000001'),
ObjectId('000000000004000000000002'),
],
},
{
_id: ObjectId('000000000002000000000002'),
username: 'provider2',
password: '$2a$12$rCMpOnOuZMulEy.SrzMH7.mx3gzWgwVh96EgIuKuvYXI7A.9SBJJK', //test123
email: 'provider2@example.com',
date_created: new Date('2023-02-04T14:12:43.456Z'),
organization_name: 'Provider Co.',
locations: [ObjectId('000000000004000000000003')],
},
{
_id: ObjectId('000000000002000000000003'),
username: 'provider3',
password: '$2a$12$rCMpOnOuZMulEy.SrzMH7.mx3gzWgwVh96EgIuKuvYXI7A.9SBJJK', //test123
email: 'provider3@example.com',
date_created: new Date('2023-02-04T09:23:11.111Z'),
organization_name: 'Provider LLC',
locations: [ObjectId('000000000004000000000004')],
},
]);
9 changes: 9 additions & 0 deletions mongoscripts/03-admins.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
db.admins.insertMany([
{
_id: ObjectId('000000000003000000000001'),
username: 'admin1',
password: '$2a$12$rCMpOnOuZMulEy.SrzMH7.mx3gzWgwVh96EgIuKuvYXI7A.9SBJJK', //test123
email: 'admin1@example.com',
date_created: new Date('2023-02-04T15:06:22.333Z'),
},
]);
Loading