-
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.
Add technical documentation and update dependencies
Introduced new technical documentation, including mail templates and examples of entity classes. Updated highlight.js and its styles to the latest version, enhancing syntax highlighting security and performance.
- Loading branch information
Showing
12 changed files
with
280 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package gr.netmechanics.carrental.entity; | ||
|
||
import java.util.Map; | ||
|
||
public class ContactFormDto { | ||
|
||
private String lastname; | ||
|
||
private String firstname; | ||
|
||
private String email; | ||
|
||
private String telephone; | ||
|
||
private String message; | ||
|
||
private Map<String, String> extraFields; | ||
|
||
// getters & setters | ||
} |
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,43 @@ | ||
package gr.netmechanics.carrental.entity.booking; | ||
|
||
import java.time.LocalDate; | ||
|
||
public class Customer { | ||
private String lastname; | ||
|
||
private String firstname; | ||
|
||
private String email; | ||
|
||
private String gender; | ||
|
||
private LocalDate birthDate; | ||
|
||
private String telephone; | ||
|
||
private String street; | ||
|
||
private String city; | ||
|
||
private String region; | ||
|
||
private String country; | ||
|
||
private String countryCode; | ||
|
||
private String postalCode; | ||
|
||
private String idNumber; | ||
|
||
private String drivingLicenseNumber; | ||
|
||
// getters & setters | ||
|
||
public String getFullName() { | ||
// lastname firstname | ||
} | ||
|
||
public String getAddressLocation() { | ||
// city, region, country, postalCode | ||
} | ||
} |
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,19 @@ | ||
package gr.netmechanics.carrental.entity.booking; | ||
|
||
import java.math.BigDecimal; | ||
import java.time.LocalDateTime; | ||
|
||
public class PickDropDetail { | ||
|
||
private LocalDateTime date; | ||
|
||
private Long locationId; | ||
|
||
private String locationTitle; | ||
|
||
private BigDecimal locationCost; | ||
|
||
private BigDecimal nightHourCost; | ||
|
||
// getters & setters | ||
} |
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,20 @@ | ||
package gr.netmechanics.carrental.entity; | ||
|
||
import java.util.Map; | ||
|
||
public class QuoteFormDto { | ||
|
||
private String vehicleName; | ||
|
||
private String vehicleGroup; | ||
|
||
private Long vehicleGroupId; | ||
|
||
private String email; | ||
|
||
private String telephone; | ||
|
||
private Map<String, String> extraFields; | ||
|
||
// getters & setters | ||
} |
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,71 @@ | ||
package gr.netmechanics.carrental.entity.booking; | ||
|
||
import java.math.BigDecimal; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class Rental { | ||
private String code; | ||
|
||
private String paymentTrxId; | ||
|
||
private Customer customer; | ||
|
||
private String status; | ||
|
||
private Integer passengers; | ||
|
||
private String flightNumber; | ||
|
||
private String hotelName; | ||
|
||
private PickDropDetail pickup; | ||
|
||
private PickDropDetail dropOff; | ||
|
||
private Long vehicleId; | ||
|
||
private Long vehicleItemId; | ||
|
||
private String vehicleName; | ||
|
||
private String vehicleGroupName; | ||
|
||
private BigDecimal vehicleCost; | ||
|
||
private Long insuranceId; | ||
|
||
private String insuranceTitle; | ||
|
||
private BigDecimal insuranceCost; | ||
|
||
private String insuranceCostType; | ||
|
||
private List<RentalExtra> extras = new ArrayList<>(); | ||
|
||
private BigDecimal extrasCost; | ||
|
||
private String couponCode; | ||
|
||
private BigDecimal couponDiscount; | ||
|
||
private Long paymentMethodId; | ||
|
||
private String paymentMethodCode; | ||
|
||
private String paymentMethodTitle; | ||
|
||
private BigDecimal paymentMethodCost; | ||
|
||
private BigDecimal totalPrice; | ||
|
||
private BigDecimal paidInAdvance; | ||
|
||
private Double advancePercent; | ||
|
||
private BigDecimal toBePaid; | ||
|
||
private String comments; | ||
|
||
// getters & setters | ||
} |
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,20 @@ | ||
package gr.netmechanics.carrental.entity.booking; | ||
|
||
import java.math.BigDecimal; | ||
|
||
public class RentalExtra { | ||
|
||
private String extraTitle; | ||
|
||
private BigDecimal dailyCost; | ||
|
||
private BigDecimal cost; | ||
|
||
private BigDecimal unitCost; | ||
|
||
private String costType; | ||
|
||
private Integer quantity; | ||
|
||
// getters & setters | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
= Τεχνικές σημειώσεις | ||
|
||
* Jmix | ||
* Jmix addons |
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,69 @@ | ||
= Πρότυπα Mail | ||
|
||
Το σύστημα στέλνει τριών ειδών mails: | ||
|
||
* Από τη φόρμα επικοινωνίας (contact). | ||
* Από τη φόρμα προσφοράς (quote). | ||
* Για μια ενοικίαση (rental). | ||
Χρησιμοποιείται το πρόσθετο https://www.jmix.io/marketplace/reports/[Reports/Αναφορές] του Jmix, για τη δημιουργία των κειμένων των mails, καθώς και της επισυναπτόμενης απόδειξης για το mail της ενοικίασης. | ||
|
||
Τα πρότυπα (templates) που χρησιμοποιούνται είναι γραμμένα σε https://freemarker.apache.org/[Apache FreeMarker] μόνο για την Αγγλική γλώσσα (en). Για κάθε γλώσσα που θέλουμε να υποστηρίζει το site πρέπει να δημιουργηθούν τα αντίστοιχα πρότυπα της γλώσσας. | ||
|
||
Κάθε πρότυπο έχει κωδικό με επίθεμα τον κωδικό της γλώσσας, για παράδειγμα _mail_en_. Για κάθε νέα γλώσσα θα πρέπει να δημιουργείται το πρότυπο για τη γλώσσα και στον κωδικό θα χρησιμοποιούμε το επίθεμα της γλώσσας, για παράδειγμα _mail_es_ αν η νέα γλώσσα είναι τα Ισπανικά. | ||
|
||
NOTE: Οι υποστηριζόμενες γλώσσες ορίζονται στη σχετική xref:settings-system.adoc#locales[ρύθμιση συστήματος]. | ||
|
||
== Mail επικοινωνίας | ||
|
||
Το mail επικοινωνίας χρησιμοποιεί την αναφορά `Contact Form` και έχει ένα πρότυπο με κωδικό `contact_mail_en`. | ||
|
||
Το πρότυπο χρησιμοποιείται για τη δημιουργία του κειμένου του mail και δέχεται μία παράμετρο με όνομα `form` και είναι τύπου `ContactFormDto`. | ||
|
||
.ContactFormDto.java | ||
[,java] | ||
---- | ||
include::example$ContactFormDto.java[] | ||
---- | ||
|
||
== Mail προσφοράς | ||
|
||
Το mail προσφοράς χρησιμοποιεί την αναφορά `Quote Form` και έχει ένα πρότυπο με κωδικό `quote_mail_en`. | ||
|
||
Το πρότυπο χρησιμοποιείται για τη δημιουργία του κειμένου του mail και δέχεται μία παράμετρο με όνομα `form` και είναι τύπου `QuoteFormDto`. | ||
|
||
.QuoteFormDto.java | ||
[,java] | ||
---- | ||
include::example$QuoteFormDto.java[] | ||
---- | ||
|
||
== Mail ενοικίασης | ||
|
||
Το mail ενοικίασης χρησιμοποιεί την αναφορά `Rental` και έχει δύο πρότυπα. Το πρότυπο με κωδικό `rental_mail_en` που χρησιμοποιείται για τη δημιουργία του κειμένου του mail και το πρότυπο με κωδικό `rental_attach_en` που χρησιμοποιείται για τη δημιουργία της επισυναπτόμενης απόδειξης. | ||
|
||
Τα πρότυπα δέχονται μια παράμετρο με όνομα `form` και είναι τύπου `Rental`. | ||
|
||
.Rental.java | ||
[,java] | ||
---- | ||
include::example$Rental.java[] | ||
---- | ||
|
||
.Customer.java | ||
[,java] | ||
---- | ||
include::example$Customer.java[] | ||
---- | ||
|
||
.PickDropDetail.java | ||
[,java] | ||
---- | ||
include::example$PickDropDetail.java[] | ||
---- | ||
|
||
.RentalExtra.java | ||
[,java] | ||
---- | ||
include::example$RentalExtra.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
<link rel="stylesheet" href="{{{uiRootPath}}}/css/fonts.css"> | ||
<link rel="stylesheet" href="{{{uiRootPath}}}/css/site.css"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" /> | ||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/styles/default.min.css"> | ||
|
||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css"/> | ||
|
||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/styles/intellij-light.min.css" | ||
integrity="sha512-rxoFrVtnfvSuel468Qr3r4djCRmFKs4DiJXUnOeaA/+uac9DkEOTEhfkcwUNiGTiA4jr6pBvXk6leEhweuGaVg==" | ||
crossorigin="anonymous" referrerpolicy="no-referrer" /> |