-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring, added some data to database
- Loading branch information
Showing
15 changed files
with
105 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,26 @@ | ||
# ProgrWeb2021 | ||
# TripRecorder | ||
TripRecorder is a diary to save the places you visit during your trips. | ||
|
||
The web interface it's written with Vue.js 3 and Bootstrap | ||
|
||
The RESTful service is built with Java and runs in a servlet container (e.g. Tomcat) | ||
|
||
Data is saved inside a MySQL database | ||
|
||
## Trips view | ||
|
||
View all your trips filtering them by date in this view and click one of them to see the details | ||
|
||
<img src="https://github.com/massijay/ProgrWeb2021/blob/cfebcc3c0df6ce6de58bd7f926a329e8222d9dc4/images/trips-view.png" width="800" alt="Trips View"> | ||
|
||
## Trip Detail View | ||
|
||
View all the details of the selected trip, the trip path inside the map and all the places visited details | ||
|
||
<img src="https://github.com/massijay/ProgrWeb2021/blob/cfebcc3c0df6ce6de58bd7f926a329e8222d9dc4/images/trip-detail-view.png" width="800" alt="Trip Detail View"> | ||
|
||
## Trip Edit View | ||
|
||
Add or update a trip, insert all details of it and all the places visited clicking on the map | ||
|
||
<img src="https://github.com/massijay/ProgrWeb2021/blob/cfebcc3c0df6ce6de58bd7f926a329e8222d9dc4/images/trip-edit-view.png" width="800" alt="Trip Edit View"> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
INSERT INTO `users` (`id`, `username`, `password`, `email`, `created_at`, `updated_at`) VALUES | ||
(1, 'massimiliano', '1000:O/zy5Tlzn/QI4J4xl6STgQ==:Qnuz5fK8hy//vesYFA6Gb+C7O8pscjDO4HYb4RrsbfkEdUlIUGiemX6I6jbnF08Fli0E/V5rGC6qwIMqamhh4w==', '[email protected]', '2022-09-11 19:15:56', '2022-09-11 19:15:56'); | ||
|
||
INSERT INTO `sessions` (`token`, `user_id`, `expire_at`) VALUES | ||
('75aee90a-d2d4-4feb-8cdc-f6549a800477', 1, '2022-09-11 20:25:32'); | ||
|
||
INSERT INTO `trips` (`id`, `user_id`, `trip_name`, `trip_date`, `transport_type`, `notes`) VALUES | ||
(1, 1, 'Calabria 2022', '2022-08-03 22:00:00', 'Treno', 'Viaggio in Calabria dell\'estate 2022 facendo tappa a Venezia, Bologna e Roma'), | ||
(2, 1, 'Premantura 2022', '2022-08-14 22:00:00', 'Macchina', 'Viaggio di andata per il campeggio a Premantura a ferragosto 2022'); | ||
|
||
INSERT INTO `geopoints` (`id`, `trip_id`, `latitude`, `longitude`, `recorded_at`, `label`) VALUES | ||
(2, 1, 45.817315086704404, 13.48576681068872, '2022-08-04 05:50:00', 'Stazione Trieste Airport'), | ||
(3, 1, 45.43700838601308, 12.335684577874144, '2022-08-04 08:30:00', 'Venezia'), | ||
(4, 1, 44.50238248659188, 11.33318206479087, '2022-08-04 10:30:00', 'Bologna'), | ||
(5, 1, 41.885921309264944, 12.4985174068097, '2022-08-04 18:30:00', 'Roma'), | ||
(6, 1, 40.851215786677834, 14.195905160482196, '2022-08-04 20:00:00', ''), | ||
(7, 1, 40.67647235480396, 14.74522152756441, '2022-08-04 21:30:00', ''), | ||
(8, 1, 40.067562749450005, 15.623343180565398, '2022-08-05 00:30:00', ''), | ||
(9, 1, 39.121537775852175, 16.085553483612287, '2022-08-05 02:30:00', ''), | ||
(10, 1, 38.706946223127815, 16.136953987899915, '2022-08-05 04:20:00', ''), | ||
(11, 1, 38.09565997512077, 15.648062421196729, '2022-08-05 06:00:00', 'Reggio Calabria'), | ||
(12, 2, 45.65052839048781, 13.776364980619253, '2022-08-15 05:30:00', 'Trieste'), | ||
(13, 2, 45.54242700317452, 13.72280663306619, '2022-08-15 07:30:00', ''), | ||
(14, 2, 44.869982881657535, 13.846991389822938, '2022-08-15 09:50:00', 'Pola'), | ||
(15, 2, 44.8008396264392, 13.910162774460872, '2022-08-15 11:00:00', 'Premantura'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rder/models/ClearExpiredSessionsTask.java → ...odels/utils/ClearExpiredSessionsTask.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/main/java/com/mcris/triprecorder/models/utils/ErrorMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.mcris.triprecorder.models.utils; | ||
|
||
public class ErrorMessage { | ||
public static final int USERNAME_ALREADY_EXISTS = 1; | ||
public static final int EMAIL_ALREADY_EXISTS = 2; | ||
public static final int INVALID_EMAIL = 3; | ||
public String message; | ||
public int errorCode; | ||
|
||
public ErrorMessage(String message, int errorCode) { | ||
this.message = message; | ||
this.errorCode = errorCode; | ||
} | ||
|
||
public String getMessage() { | ||
return message; | ||
} | ||
|
||
public void setMessage(String message) { | ||
this.message = message; | ||
} | ||
|
||
public int getErrorCode() { | ||
return errorCode; | ||
} | ||
|
||
public void setErrorCode(int errorCode) { | ||
this.errorCode = errorCode; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...is/triprecorder/models/PasswordUtils.java → ...precorder/models/utils/PasswordUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...corder/models/SessionSecurityContext.java → .../models/utils/SessionSecurityContext.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../triprecorder/models/StartupListener.java → ...ecorder/models/utils/StartupListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters