updated code
This commit is contained in:
@@ -9,6 +9,6 @@ public class ApplicationFormFieldRequestBean {
|
||||
|
||||
private String fieldId;
|
||||
|
||||
private String fieldValue;
|
||||
private Object fieldValue;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package net.gepafin.tendermanagement.model.request;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class BeneficiaryPreferredCallReq {
|
||||
|
||||
private Long companyId;
|
||||
private Long callId;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package net.gepafin.tendermanagement.model.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CompanyDelegationRequest {
|
||||
|
||||
private String firstName;
|
||||
|
||||
private String lastName;
|
||||
|
||||
private String codiceFiscale;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package net.gepafin.tendermanagement.model.request;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CompanyRequest {
|
||||
|
||||
private String companyName;
|
||||
private String vatNumber;
|
||||
private String codiceFiscale;
|
||||
private String address;
|
||||
private String phoneNumber;
|
||||
private String city;
|
||||
private String province;
|
||||
private String cap;
|
||||
private String country;
|
||||
private String pec;
|
||||
private String email;
|
||||
private String numberOfEmployees;
|
||||
private BigDecimal annualRevenue;
|
||||
private Boolean isLegalRepresentant;
|
||||
private String contactName;
|
||||
private String contactEmail;
|
||||
}
|
||||
@@ -2,7 +2,9 @@ package net.gepafin.tendermanagement.model.request;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@@ -26,6 +28,16 @@ public class CreateCallRequestStep1 {
|
||||
|
||||
private String documentationRequested;
|
||||
|
||||
private BigDecimal amountMin;
|
||||
|
||||
private String email;
|
||||
|
||||
private String phoneNumber;
|
||||
|
||||
private String startTime;
|
||||
|
||||
private String endTime;
|
||||
|
||||
private Boolean confidi;
|
||||
|
||||
private List<FaqReq> faq;
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
package net.gepafin.tendermanagement.model.request;
|
||||
|
||||
import com.itextpdf.text.*;
|
||||
import com.itextpdf.text.pdf.ColumnText;
|
||||
import com.itextpdf.text.pdf.PdfContentByte;
|
||||
import com.itextpdf.text.pdf.PdfPageEventHelper;
|
||||
import com.itextpdf.text.pdf.PdfWriter;
|
||||
|
||||
public class CustomPageEvent extends PdfPageEventHelper {
|
||||
private String title;
|
||||
private int totalPages;
|
||||
|
||||
public CustomPageEvent(String title, int totalPages) {
|
||||
this.title = title;
|
||||
this.totalPages = totalPages;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEndPage(PdfWriter writer, Document document) {
|
||||
PdfContentByte canvas = writer.getDirectContent();
|
||||
|
||||
// Header - Add a title to each page at the top
|
||||
if (writer.getPageNumber() > 1) {
|
||||
Font headerFont = new Font(Font.FontFamily.HELVETICA, 6, Font.BOLD, new BaseColor(113, 121, 126)); // Gray color for header
|
||||
ColumnText.showTextAligned(
|
||||
canvas,
|
||||
Element.ALIGN_LEFT,
|
||||
new Phrase(title, headerFont),
|
||||
document.leftMargin(), // Use left margin to align fully to the left
|
||||
document.getPageSize().getHeight() - 30, // Positioning header near top
|
||||
0 // No rotation
|
||||
);
|
||||
}
|
||||
|
||||
// Footer - Add page number at the bottom
|
||||
String footerText = String.format("Page %d of %d", writer.getPageNumber(), totalPages);
|
||||
|
||||
// Set font for the footer
|
||||
Font footerFont = new Font(Font.FontFamily.HELVETICA, 10, Font.NORMAL, BaseColor.BLACK);
|
||||
|
||||
// Positioning footer near bottom
|
||||
ColumnText.showTextAligned(writer.getDirectContent(),
|
||||
Element.ALIGN_LEFT,
|
||||
new Phrase(footerText, footerFont),
|
||||
(document.right() + document.left()) / 2,
|
||||
document.bottomMargin() - 10, // Positioning footer near bottom
|
||||
0);
|
||||
|
||||
// Draw a yellow line below header
|
||||
if (writer.getPageNumber() > 1) {
|
||||
canvas.setLineWidth(1.5f);
|
||||
canvas.setColorStroke(new BaseColor(255, 219, 88)); // Yellow color
|
||||
float yPos = document.getPageSize().getHeight() - 50f; // Position for the line below header
|
||||
canvas.moveTo(0, yPos);
|
||||
canvas.lineTo(document.getPageSize().getWidth(), yPos);
|
||||
canvas.stroke();
|
||||
}
|
||||
|
||||
// Draw another line 50 points above the bottom of the document
|
||||
canvas.setLineWidth(1.5f);
|
||||
canvas.setColorStroke(new BaseColor(255, 219, 88)); // Yellow color
|
||||
float lineYPos = document.bottomMargin() + 25f; // Position for the line above the bottom margin
|
||||
canvas.moveTo(0, lineYPos);
|
||||
canvas.lineTo(document.getPageSize().getWidth(), lineYPos);
|
||||
canvas.stroke();
|
||||
}
|
||||
|
||||
public void setTotalPages(int totalPages) {
|
||||
this.totalPages = totalPages;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package net.gepafin.tendermanagement.model.request;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class FieldLabelValuePairRequest {
|
||||
|
||||
private String label;
|
||||
private Object value;
|
||||
}
|
||||
|
||||
@@ -5,4 +5,5 @@ import lombok.Data;
|
||||
@Data
|
||||
public class InitiatePasswordResetReq {
|
||||
private String email;
|
||||
private String hubUuid;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package net.gepafin.tendermanagement.model.request;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class LoginAttemptReq {
|
||||
|
||||
private String userName;
|
||||
|
||||
@NotNull
|
||||
private Long userId;
|
||||
}
|
||||
|
||||
@@ -14,5 +14,6 @@ public class LoginReq {
|
||||
private String email;
|
||||
@NotEmpty
|
||||
private String password;
|
||||
private String hubUuid;
|
||||
private Boolean rememberMe;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,6 @@ public class ResetPasswordReq {
|
||||
private String token;
|
||||
private String newPassword;
|
||||
private String confirmPassword;
|
||||
|
||||
private String hubUuid;
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package net.gepafin.tendermanagement.model.request;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
@@ -25,6 +26,16 @@ public class UpdateCallRequestStep1 {
|
||||
|
||||
private String documentationRequested;
|
||||
|
||||
private BigDecimal amountMin;
|
||||
|
||||
private String email;
|
||||
|
||||
private String phoneNumber;
|
||||
|
||||
private String startTime;
|
||||
|
||||
private String endTime;
|
||||
|
||||
private Boolean confidi;
|
||||
|
||||
private List<FaqReq> faq;
|
||||
|
||||
@@ -4,6 +4,8 @@ import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import net.gepafin.tendermanagement.enums.UserStatusEnum;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class UpdateUserReq {
|
||||
@@ -17,4 +19,11 @@ public class UpdateUserReq {
|
||||
private String city;
|
||||
private UserStatusEnum status;
|
||||
private String country;
|
||||
private String codiceFiscale;
|
||||
private LocalDateTime dateOfBirth;
|
||||
private Boolean marketing;
|
||||
private Boolean offers;
|
||||
private Boolean thirdParty;
|
||||
|
||||
private String emailPec;
|
||||
}
|
||||
|
||||
@@ -1,20 +1,15 @@
|
||||
package net.gepafin.tendermanagement.model.request;
|
||||
|
||||
import jakarta.validation.constraints.Email;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UserReq {
|
||||
|
||||
@NotBlank
|
||||
@Email
|
||||
private String email;
|
||||
@NotEmpty
|
||||
|
||||
private String password;
|
||||
@NotEmpty
|
||||
|
||||
private String confPassword;
|
||||
|
||||
private String firstName;
|
||||
@@ -22,7 +17,7 @@ public class UserReq {
|
||||
private String lastName;
|
||||
|
||||
private String phoneNumber;
|
||||
@NotNull
|
||||
|
||||
private Long roleId;
|
||||
|
||||
private String organization;
|
||||
@@ -32,5 +27,20 @@ public class UserReq {
|
||||
private String city;
|
||||
|
||||
private String country;
|
||||
|
||||
private String codiceFiscale;
|
||||
|
||||
private LocalDateTime dateOfBirth;
|
||||
private Boolean privacy;
|
||||
private Boolean terms;
|
||||
|
||||
private Boolean marketing;
|
||||
private Boolean offers;
|
||||
private Boolean thirdParty;
|
||||
|
||||
private String emailPec;
|
||||
|
||||
private String hubUuid;
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user