Resolved conflicts
This commit is contained in:
@@ -24,12 +24,12 @@ import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
|||||||
import org.springframework.web.filter.CorsFilter;
|
import org.springframework.web.filter.CorsFilter;
|
||||||
import org.springframework.web.servlet.handler.HandlerMappingIntrospector;
|
import org.springframework.web.servlet.handler.HandlerMappingIntrospector;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.models.Components;
|
import io.swagger.v3.oas.models.Components;
|
||||||
import io.swagger.v3.oas.models.OpenAPI;
|
import io.swagger.v3.oas.models.OpenAPI;
|
||||||
import io.swagger.v3.oas.models.security.SecurityRequirement;
|
import io.swagger.v3.oas.models.security.SecurityRequirement;
|
||||||
import io.swagger.v3.oas.models.security.SecurityScheme;
|
import io.swagger.v3.oas.models.security.SecurityScheme;
|
||||||
import io.swagger.v3.oas.models.servers.Server;
|
import io.swagger.v3.oas.models.servers.Server;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import net.gepafin.tendermanagement.config.jwt.JWTFilter;
|
import net.gepafin.tendermanagement.config.jwt.JWTFilter;
|
||||||
import net.gepafin.tendermanagement.config.jwt.TokenProvider;
|
import net.gepafin.tendermanagement.config.jwt.TokenProvider;
|
||||||
|
|
||||||
@@ -107,7 +107,13 @@ public class SecurityConfig {
|
|||||||
.requestMatchers("/swagger-ui/**").permitAll() // Swagger docs
|
.requestMatchers("/swagger-ui/**").permitAll() // Swagger docs
|
||||||
.requestMatchers("/v1/api-docs/**").permitAll() // API docs
|
.requestMatchers("/v1/api-docs/**").permitAll() // API docs
|
||||||
.anyRequest().authenticated())
|
.anyRequest().authenticated())
|
||||||
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
|
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.IF_REQUIRED))
|
||||||
|
.exceptionHandling(exceptionHandling -> exceptionHandling
|
||||||
|
.authenticationEntryPoint((request, response, authException) -> {
|
||||||
|
// Send 403 Forbidden when there is no JWT token provided
|
||||||
|
response.sendError(HttpServletResponse.SC_FORBIDDEN, "Forbidden: Authentication token is missing or invalid");
|
||||||
|
})
|
||||||
|
)
|
||||||
.addFilterBefore(corsFilter(), UsernamePasswordAuthenticationFilter.class)
|
.addFilterBefore(corsFilter(), UsernamePasswordAuthenticationFilter.class)
|
||||||
.addFilterBefore(new JWTFilter(tokenProvider), UsernamePasswordAuthenticationFilter.class)
|
.addFilterBefore(new JWTFilter(tokenProvider), UsernamePasswordAuthenticationFilter.class)
|
||||||
// Add SAML2 login configuration (for BENEFICIARI)
|
// Add SAML2 login configuration (for BENEFICIARI)
|
||||||
|
|||||||
@@ -199,6 +199,14 @@ public class GepafinConstant {
|
|||||||
public static final String DELEGATION_NOT_FOUND = "delegation.not.found";
|
public static final String DELEGATION_NOT_FOUND = "delegation.not.found";
|
||||||
public static final String USER_COMPANY_RELATION_NOT_FOUND = "user.company.relation.not.found";
|
public static final String USER_COMPANY_RELATION_NOT_FOUND = "user.company.relation.not.found";
|
||||||
public static final String DELEGATION_DELETE_SUCCESS = "delegation.delete.success";
|
public static final String DELEGATION_DELETE_SUCCESS = "delegation.delete.success";
|
||||||
|
public static final String USER_NOT_AUTHORIZED_TO_CREATE_APPLICATION = "user.not.authorized.create.application";
|
||||||
|
public static final String APPLICATION_SUBMITTED_CANNOT_CHANGE = "application.submitted.cannot.change";
|
||||||
|
public static final String CALL_DOCUMENTS_FETCH_SUCCESS_MSG = "call.documents.fetch.success";
|
||||||
|
public static final String CALL_DOCUMENTS_NOT_FOUND_MSG = "call.documents.not.found";
|
||||||
|
public static final String PERMISSION_DENIED = "permission.denied";
|
||||||
|
public static final String SIGNED_DOCUMENT_FILE_UPLOAD_SUCCESS = "signed.document.file.upload.success";
|
||||||
|
public static final String GET_SIGNED_DOCUMENT_FILE_SUCCESS = "get.signed.document.file.success";
|
||||||
|
public static final String APPLICATION_SIGNED_DOCUMENT_NOT_FOUND = "application.signed.document.not.found";
|
||||||
|
public static final String DELETE_SIGNED_DOCUMENT_FILE_SUCCESS = "delete.signed.document.file.success";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,15 +3,19 @@ package net.gepafin.tendermanagement.dao;
|
|||||||
import net.gepafin.tendermanagement.config.Translator;
|
import net.gepafin.tendermanagement.config.Translator;
|
||||||
import net.gepafin.tendermanagement.constants.GepafinConstant;
|
import net.gepafin.tendermanagement.constants.GepafinConstant;
|
||||||
import net.gepafin.tendermanagement.entities.*;
|
import net.gepafin.tendermanagement.entities.*;
|
||||||
|
import net.gepafin.tendermanagement.enums.ApplicationSignedDocumentStatusEnum;
|
||||||
import net.gepafin.tendermanagement.enums.ApplicationStatusTypeEnum;
|
import net.gepafin.tendermanagement.enums.ApplicationStatusTypeEnum;
|
||||||
import net.gepafin.tendermanagement.enums.DocumentSourceTypeEnum;
|
import net.gepafin.tendermanagement.enums.DocumentSourceTypeEnum;
|
||||||
import net.gepafin.tendermanagement.enums.RoleStatusEnum;
|
import net.gepafin.tendermanagement.enums.RoleStatusEnum;
|
||||||
|
import net.gepafin.tendermanagement.enums.UserCompanyDelegationStatusEnum;
|
||||||
import net.gepafin.tendermanagement.model.request.ApplicationFormFieldRequestBean;
|
import net.gepafin.tendermanagement.model.request.ApplicationFormFieldRequestBean;
|
||||||
import net.gepafin.tendermanagement.model.request.ApplicationRequest;
|
import net.gepafin.tendermanagement.model.request.ApplicationRequest;
|
||||||
import net.gepafin.tendermanagement.model.request.ApplicationRequestBean;
|
import net.gepafin.tendermanagement.model.request.ApplicationRequestBean;
|
||||||
import net.gepafin.tendermanagement.model.response.*;
|
import net.gepafin.tendermanagement.model.response.*;
|
||||||
import net.gepafin.tendermanagement.repositories.*;
|
import net.gepafin.tendermanagement.repositories.*;
|
||||||
|
import net.gepafin.tendermanagement.service.AmazonS3Service;
|
||||||
import net.gepafin.tendermanagement.service.CallService;
|
import net.gepafin.tendermanagement.service.CallService;
|
||||||
|
import net.gepafin.tendermanagement.service.CompanyService;
|
||||||
import net.gepafin.tendermanagement.service.DocumentService;
|
import net.gepafin.tendermanagement.service.DocumentService;
|
||||||
import net.gepafin.tendermanagement.service.FormService;
|
import net.gepafin.tendermanagement.service.FormService;
|
||||||
import net.gepafin.tendermanagement.util.DateTimeUtil;
|
import net.gepafin.tendermanagement.util.DateTimeUtil;
|
||||||
@@ -24,10 +28,13 @@ import net.gepafin.tendermanagement.web.rest.api.errors.Status;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.data.jpa.domain.Specification;
|
import org.springframework.data.jpa.domain.Specification;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import jakarta.persistence.criteria.Predicate;
|
import jakarta.persistence.criteria.Predicate;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@@ -70,11 +77,26 @@ public class ApplicationDao {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private FlowDataRepository flowDataRepository;
|
private FlowDataRepository flowDataRepository;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UserCompanyDelegationRepository userCompanyDelegationRepository;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private Validator validator;
|
private Validator validator;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CompanyService companyService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ProtocolRepository protocolRepository;
|
private ProtocolRepository protocolRepository;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AmazonS3Service amazonS3Service;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ApplicationSignedDocumentRepository applicationSignedDocumentRepository;
|
||||||
|
|
||||||
|
@Value("${aws.s3.url.folder.signed.document}")
|
||||||
|
private String signedDocumentS3Folder;
|
||||||
|
|
||||||
|
|
||||||
public ApplicationResponseBean createApplication(ApplicationRequestBean applicationRequestBean, UserEntity userEntity, Long formId, Long applicationId) {
|
public ApplicationResponseBean createApplication(ApplicationRequestBean applicationRequestBean, UserEntity userEntity, Long formId, Long applicationId) {
|
||||||
@@ -90,6 +112,19 @@ public class ApplicationDao {
|
|||||||
createOrUpdateMultipleFormFields(applicationRequestBean.getFormFields(), applicationFormEntity,formEntity);
|
createOrUpdateMultipleFormFields(applicationRequestBean.getFormFields(), applicationFormEntity,formEntity);
|
||||||
return getApplicationById(applicationEntity.getId(),formEntity.getId());
|
return getApplicationById(applicationEntity.getId(),formEntity.getId());
|
||||||
}
|
}
|
||||||
|
public void validateDelegation(UserEntity user, CompanyEntity company) {
|
||||||
|
UserWithCompanyEntity userWithCompany = companyService.getUserWithCompanyEntity(user.getId(), company.getId());
|
||||||
|
|
||||||
|
UserCompanyDelegationEntity userCompanyDelegationEntity = userCompanyDelegationRepository
|
||||||
|
.findByUserIdAndCompanyIdAndStatus(user.getId(), company.getId(),
|
||||||
|
UserCompanyDelegationStatusEnum.ACTIVE.getValue());
|
||||||
|
|
||||||
|
if (!userWithCompany.getIsLegalRepresentant() && userCompanyDelegationEntity == null) {
|
||||||
|
throw new CustomValidationException(Status.BAD_REQUEST,
|
||||||
|
Translator.toLocale(GepafinConstant.USER_NOT_AUTHORIZED_TO_CREATE_APPLICATION));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public ApplicationFormEntity saveApplicationFormEntity(ApplicationFormEntity applicationFormEntity) {
|
public ApplicationFormEntity saveApplicationFormEntity(ApplicationFormEntity applicationFormEntity) {
|
||||||
ApplicationFormEntity applicationFormEntity1 = applicationFormRepository.save(applicationFormEntity);
|
ApplicationFormEntity applicationFormEntity1 = applicationFormRepository.save(applicationFormEntity);
|
||||||
@@ -105,6 +140,7 @@ public class ApplicationDao {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ApplicationEntity createApplicationEntity(UserEntity user, CallEntity call, CompanyEntity companyEntity) {
|
public ApplicationEntity createApplicationEntity(UserEntity user, CallEntity call, CompanyEntity companyEntity) {
|
||||||
|
validateDelegation(user,companyEntity);
|
||||||
ApplicationEntity entity = new ApplicationEntity();
|
ApplicationEntity entity = new ApplicationEntity();
|
||||||
entity.setUserId(user.getId());
|
entity.setUserId(user.getId());
|
||||||
entity.setCompany(companyEntity);
|
entity.setCompany(companyEntity);
|
||||||
@@ -518,6 +554,9 @@ public class ApplicationDao {
|
|||||||
|
|
||||||
public ApplicationResponse updateApplicationStatus(Long applicationId, ApplicationStatusTypeEnum status) {
|
public ApplicationResponse updateApplicationStatus(Long applicationId, ApplicationStatusTypeEnum status) {
|
||||||
ApplicationEntity applicationEntity = validateApplication(applicationId);
|
ApplicationEntity applicationEntity = validateApplication(applicationId);
|
||||||
|
if (ApplicationStatusTypeEnum.SUBMIT.getValue().equals(applicationEntity.getStatus())) {
|
||||||
|
throw new CustomValidationException(Status.BAD_REQUEST, Translator.toLocale(GepafinConstant.APPLICATION_SUBMITTED_CANNOT_CHANGE));
|
||||||
|
}
|
||||||
|
|
||||||
if(Boolean.TRUE.equals(applicationEntity.getStatus().equals(status.getValue()))){
|
if(Boolean.TRUE.equals(applicationEntity.getStatus().equals(status.getValue()))){
|
||||||
throw new CustomValidationException(Status.BAD_REQUEST,Translator.toLocale(GepafinConstant.APPLICATION_ALREADY_IN_PREVIOUS_STATUS));
|
throw new CustomValidationException(Status.BAD_REQUEST,Translator.toLocale(GepafinConstant.APPLICATION_ALREADY_IN_PREVIOUS_STATUS));
|
||||||
@@ -639,4 +678,80 @@ public class ApplicationDao {
|
|||||||
protocolRepository.save(protocolEntity);
|
protocolRepository.save(protocolEntity);
|
||||||
return protocolEntity;
|
return protocolEntity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ApplicationSignedDocumentResponse uploadSignedDocument(HttpServletRequest request, Long applicationId,
|
||||||
|
MultipartFile file) {
|
||||||
|
ApplicationEntity applicationEntity = validateApplication(applicationId);
|
||||||
|
validator.validateUserWithCompany(request, applicationEntity.getCompany().getId());
|
||||||
|
validateFileType(file);
|
||||||
|
ApplicationSignedDocumentEntity applicationSignedDocument = applicationSignedDocumentRepository
|
||||||
|
.findByApplicationIdAndStatus(applicationId, ApplicationSignedDocumentStatusEnum.ACTIVE.getValue());
|
||||||
|
if (applicationSignedDocument != null) {
|
||||||
|
applicationSignedDocument.setStatus(ApplicationSignedDocumentStatusEnum.INACTIVE.getValue());
|
||||||
|
applicationSignedDocumentRepository.save(applicationSignedDocument);
|
||||||
|
}
|
||||||
|
UploadFileOnAmazonS3Response uploadFileOnAmazonS3 = amazonS3Service.uploadFileOnAmazonS3(signedDocumentS3Folder,
|
||||||
|
file);
|
||||||
|
applicationSignedDocument = new ApplicationSignedDocumentEntity();
|
||||||
|
applicationSignedDocument.setApplication(applicationEntity);
|
||||||
|
applicationSignedDocument.setFileName(uploadFileOnAmazonS3.getFileName());
|
||||||
|
applicationSignedDocument.setFilePath(uploadFileOnAmazonS3.getFilePath());
|
||||||
|
applicationSignedDocument.setStatus(ApplicationSignedDocumentStatusEnum.ACTIVE.getValue());
|
||||||
|
applicationSignedDocumentRepository.save(applicationSignedDocument);
|
||||||
|
return convertApplicationSignedDocumentToApplicationSignedDocumentResponse(applicationSignedDocument);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ApplicationSignedDocumentResponse convertApplicationSignedDocumentToApplicationSignedDocumentResponse(
|
||||||
|
ApplicationSignedDocumentEntity applicationSignedDocument) {
|
||||||
|
ApplicationSignedDocumentResponse applicationSignedDocumentResponse = new ApplicationSignedDocumentResponse();
|
||||||
|
applicationSignedDocumentResponse.setId(applicationSignedDocument.getId());
|
||||||
|
applicationSignedDocumentResponse.setApplicationId(applicationSignedDocument.getApplication().getId());
|
||||||
|
applicationSignedDocumentResponse.setFileName(applicationSignedDocument.getFileName());
|
||||||
|
applicationSignedDocumentResponse.setFilePath(applicationSignedDocument.getFilePath());
|
||||||
|
applicationSignedDocumentResponse
|
||||||
|
.setStatus(ApplicationSignedDocumentStatusEnum.valueOf(applicationSignedDocument.getStatus()));
|
||||||
|
applicationSignedDocumentResponse.setCreatedDate(applicationSignedDocument.getCreatedDate());
|
||||||
|
applicationSignedDocumentResponse.setUpdatedDate(applicationSignedDocument.getUpdatedDate());
|
||||||
|
return applicationSignedDocumentResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validateFileType(MultipartFile file) {
|
||||||
|
if (file.isEmpty()) {
|
||||||
|
throw new CustomValidationException(Status.VALIDATION_ERROR,
|
||||||
|
Translator.toLocale(GepafinConstant.VALIDATION_ERROR_FILE_EMPTY));
|
||||||
|
}
|
||||||
|
String filename = file.getOriginalFilename();
|
||||||
|
if (filename == null || !filename.endsWith(".p7m")) {
|
||||||
|
throw new CustomValidationException(Status.VALIDATION_ERROR,
|
||||||
|
Translator.toLocale(GepafinConstant.VALIDATION_ERROR_FILE_INVALIDTYPE));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApplicationSignedDocumentResponse getSignedDocument(HttpServletRequest request, Long applicationId) {
|
||||||
|
|
||||||
|
ApplicationEntity applicationEntity = validateApplication(applicationId);
|
||||||
|
validator.validateUserWithCompany(request, applicationEntity.getCompany().getId());
|
||||||
|
|
||||||
|
ApplicationSignedDocumentEntity applicationSignedDocument = applicationSignedDocumentRepository
|
||||||
|
.findByApplicationIdAndStatus(applicationId, ApplicationSignedDocumentStatusEnum.ACTIVE.getValue());
|
||||||
|
if(applicationSignedDocument == null) {
|
||||||
|
throw new ResourceNotFoundException(Status.NOT_FOUND,
|
||||||
|
Translator.toLocale(GepafinConstant.APPLICATION_SIGNED_DOCUMENT_NOT_FOUND));
|
||||||
|
}
|
||||||
|
return convertApplicationSignedDocumentToApplicationSignedDocumentResponse(applicationSignedDocument);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteSignedDocument(HttpServletRequest request, Long applicationId) {
|
||||||
|
ApplicationEntity applicationEntity = validateApplication(applicationId);
|
||||||
|
validator.validateUserWithCompany(request, applicationEntity.getCompany().getId());
|
||||||
|
|
||||||
|
ApplicationSignedDocumentEntity applicationSignedDocument = applicationSignedDocumentRepository
|
||||||
|
.findByApplicationIdAndStatus(applicationId, ApplicationSignedDocumentStatusEnum.ACTIVE.getValue());
|
||||||
|
if(applicationSignedDocument == null) {
|
||||||
|
throw new ResourceNotFoundException(Status.NOT_FOUND,
|
||||||
|
Translator.toLocale(GepafinConstant.APPLICATION_SIGNED_DOCUMENT_NOT_FOUND));
|
||||||
|
}
|
||||||
|
applicationSignedDocument.setStatus(ApplicationSignedDocumentStatusEnum.INACTIVE.getValue());
|
||||||
|
applicationSignedDocumentRepository.save(applicationSignedDocument);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
package net.gepafin.tendermanagement.dao;
|
package net.gepafin.tendermanagement.dao;
|
||||||
|
|
||||||
|
import java.io.ByteArrayInputStream;
|
||||||
|
import java.io.ByteArrayOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@@ -8,13 +12,21 @@ import java.util.ArrayList;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.zip.ZipEntry;
|
||||||
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
import net.gepafin.tendermanagement.enums.DocumentSourceTypeEnum;
|
import net.gepafin.tendermanagement.enums.DocumentSourceTypeEnum;
|
||||||
import net.gepafin.tendermanagement.model.response.*;
|
import net.gepafin.tendermanagement.model.response.*;
|
||||||
import net.gepafin.tendermanagement.service.*;
|
import net.gepafin.tendermanagement.service.*;
|
||||||
import net.gepafin.tendermanagement.util.DateTimeUtil;
|
import net.gepafin.tendermanagement.util.DateTimeUtil;
|
||||||
import net.gepafin.tendermanagement.util.Utils;
|
import net.gepafin.tendermanagement.util.Utils;
|
||||||
|
import org.h2.util.IOUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.http.HttpHeaders;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
@@ -85,6 +97,10 @@ public class CallDao {
|
|||||||
private FlowDao flowDao;
|
private FlowDao flowDao;
|
||||||
@Autowired
|
@Autowired
|
||||||
private FormDao formDao;
|
private FormDao formDao;
|
||||||
|
@Value("${aws.s3.url.folder}")
|
||||||
|
private String s3Folder;
|
||||||
|
@Autowired
|
||||||
|
private AmazonS3Service amazonS3Service;
|
||||||
|
|
||||||
public CallResponse createCallStep1(CreateCallRequestStep1 createCallRequest, Long userId) {
|
public CallResponse createCallStep1(CreateCallRequestStep1 createCallRequest, Long userId) {
|
||||||
UserEntity userEntity = userService.validateUser(userId);
|
UserEntity userEntity = userService.validateUser(userId);
|
||||||
@@ -101,6 +117,35 @@ public class CallDao {
|
|||||||
return createCallResponseBean;
|
return createCallResponseBean;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
public byte[] downloadCallDocumentsAsZip(Long callId) {
|
||||||
|
List<DocumentEntity> documents = documentRepository.findBySourceIdAndSourceAndTypeAndIsDeletedFalse(callId, DocumentSourceTypeEnum.CALL.getValue(),DocumentTypeEnum.DOCUMENT.getValue());
|
||||||
|
if (documents.isEmpty()) {
|
||||||
|
throw new ResourceNotFoundException(Status.NOT_FOUND, Translator.toLocale(GepafinConstant.DOCUMENT_NOT_FOUND));
|
||||||
|
}
|
||||||
|
|
||||||
|
try (ByteArrayOutputStream zipOutputStream = new ByteArrayOutputStream();
|
||||||
|
ZipOutputStream zos = new ZipOutputStream(zipOutputStream)) {
|
||||||
|
|
||||||
|
for (DocumentEntity document : documents) {
|
||||||
|
try (InputStream fileInputStream = amazonS3Service.getFile(s3Folder, document.getFileName())) {
|
||||||
|
ZipEntry zipEntry = new ZipEntry(document.getFileName());
|
||||||
|
zos.putNextEntry(zipEntry);
|
||||||
|
IOUtils.copy(fileInputStream, zos);
|
||||||
|
zos.closeEntry();
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException("Error downloading or adding document to ZIP: " + document.getFileName(), e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
zos.finish();
|
||||||
|
return zipOutputStream.toByteArray();
|
||||||
|
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException("Error while creating ZIP file", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public CallEntity convertToCallEntity(CreateCallRequestStep1 createCallRequest) {
|
public CallEntity convertToCallEntity(CreateCallRequestStep1 createCallRequest) {
|
||||||
CallEntity callEntity = new CallEntity();
|
CallEntity callEntity = new CallEntity();
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import net.gepafin.tendermanagement.repositories.UserWithCompanyRepository;
|
|||||||
import net.gepafin.tendermanagement.service.UserService;
|
import net.gepafin.tendermanagement.service.UserService;
|
||||||
import net.gepafin.tendermanagement.util.Utils;
|
import net.gepafin.tendermanagement.util.Utils;
|
||||||
import net.gepafin.tendermanagement.web.rest.api.errors.CustomValidationException;
|
import net.gepafin.tendermanagement.web.rest.api.errors.CustomValidationException;
|
||||||
|
import net.gepafin.tendermanagement.web.rest.api.errors.ForbiddenAccessException;
|
||||||
import net.gepafin.tendermanagement.web.rest.api.errors.ResourceNotFoundException;
|
import net.gepafin.tendermanagement.web.rest.api.errors.ResourceNotFoundException;
|
||||||
import net.gepafin.tendermanagement.web.rest.api.errors.Status;
|
import net.gepafin.tendermanagement.web.rest.api.errors.Status;
|
||||||
|
|
||||||
@@ -190,8 +191,8 @@ public class CompanyDao {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public UserWithCompanyEntity validateUserWithCompny(Long userId, Long companyId) {
|
public UserWithCompanyEntity validateUserWithCompny(Long userId, Long companyId) {
|
||||||
return userWithCompanyRepository.findByUserIdAndCompanyId(userId, companyId).orElseThrow(() -> new CustomValidationException(Status.UNAUTHORIZED,
|
return userWithCompanyRepository.findByUserIdAndCompanyId(userId, companyId).orElseThrow(() -> new ForbiddenAccessException(Status.FORBIDDEN,
|
||||||
Translator.toLocale(GepafinConstant.UNAUTHORIZED)));
|
Translator.toLocale(GepafinConstant.PERMISSION_DENIED)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserWithCompanyEntity getUserWithCompany(Long userId, Long compnayId) {
|
public UserWithCompanyEntity getUserWithCompany(Long userId, Long compnayId) {
|
||||||
|
|||||||
@@ -127,15 +127,15 @@ public class DelegationDao {
|
|||||||
placeholders.put("{{company_last_name}}", "");
|
placeholders.put("{{company_last_name}}", "");
|
||||||
placeholders.put("{{company_codice_fiscale}}", "");
|
placeholders.put("{{company_codice_fiscale}}", "");
|
||||||
placeholders.put("{{company_name}}", "");
|
placeholders.put("{{company_name}}", "");
|
||||||
placeholders.put("{{company_city}}", DEFAULT_PLACEHOLDER);
|
placeholders.put("{{company_city}}", "");
|
||||||
placeholders.put("{{company_address}}", DEFAULT_PLACEHOLDER);
|
placeholders.put("{{company_address}}", "");
|
||||||
placeholders.put("{{company_province}}", DEFAULT_PLACEHOLDER);
|
placeholders.put("{{company_province}}", "");
|
||||||
placeholders.put("{{company_cap}}", DEFAULT_PLACEHOLDER);
|
placeholders.put("{{company_cap}}", "");
|
||||||
placeholders.put("{{company_vat_number}}", "");
|
placeholders.put("{{company_vat_number}}", "");
|
||||||
|
|
||||||
placeholders.put("{{user_first_name}}", "");
|
placeholders.put("{{user_first_name}}", "");
|
||||||
placeholders.put("{{user_last_name}}", "");
|
placeholders.put("{{user_last_name}}", "");
|
||||||
placeholders.put("{{user_date_of_birth}}", DEFAULT_PLACEHOLDER);
|
placeholders.put("{{user_date_of_birth}}", "");
|
||||||
placeholders.put("{{user_codice_fiscale}}", "");
|
placeholders.put("{{user_codice_fiscale}}", "");
|
||||||
return placeholders;
|
return placeholders;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package net.gepafin.tendermanagement.entities;
|
||||||
|
|
||||||
|
import jakarta.persistence.Column;
|
||||||
|
import jakarta.persistence.Entity;
|
||||||
|
import jakarta.persistence.JoinColumn;
|
||||||
|
import jakarta.persistence.ManyToOne;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Entity
|
||||||
|
@Table(name = "application_signed_document")
|
||||||
|
public class ApplicationSignedDocumentEntity extends BaseEntity {
|
||||||
|
|
||||||
|
@ManyToOne
|
||||||
|
@JoinColumn(name = "APPLICATION_ID")
|
||||||
|
private ApplicationEntity application;
|
||||||
|
|
||||||
|
@Column(name = "FILE_NAME")
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
@Column(name = "FILE_PATH")
|
||||||
|
private String filePath;
|
||||||
|
|
||||||
|
@Column(name="STATUS")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package net.gepafin.tendermanagement.enums;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
public enum ApplicationSignedDocumentStatusEnum {
|
||||||
|
ACTIVE("ACTIVE"), INACTIVE("INACTIVE");
|
||||||
|
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
ApplicationSignedDocumentStatusEnum(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonValue
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package net.gepafin.tendermanagement.model.response;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import net.gepafin.tendermanagement.enums.ApplicationSignedDocumentStatusEnum;
|
||||||
|
import net.gepafin.tendermanagement.model.BaseBean;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ApplicationSignedDocumentResponse extends BaseBean{
|
||||||
|
|
||||||
|
private Long applicationId;
|
||||||
|
private String fileName;
|
||||||
|
private String filePath;
|
||||||
|
private ApplicationSignedDocumentStatusEnum status;
|
||||||
|
}
|
||||||
@@ -3,9 +3,10 @@ package net.gepafin.tendermanagement.model.response;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import net.gepafin.tendermanagement.entities.BaseEntity;
|
import net.gepafin.tendermanagement.entities.BaseEntity;
|
||||||
import net.gepafin.tendermanagement.enums.UserCompanyDelegationStatusEnum;
|
import net.gepafin.tendermanagement.enums.UserCompanyDelegationStatusEnum;
|
||||||
|
import net.gepafin.tendermanagement.model.BaseBean;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class CompanyDelegationResponse extends BaseEntity{
|
public class CompanyDelegationResponse extends BaseBean{
|
||||||
private Long userId;
|
private Long userId;
|
||||||
private Long companyId;
|
private Long companyId;
|
||||||
private Long beneficiaryId;
|
private Long beneficiaryId;
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package net.gepafin.tendermanagement.model.response;
|
||||||
|
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
public class UploadFileOnAmazonS3Response {
|
||||||
|
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
private String filePath;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package net.gepafin.tendermanagement.repositories;
|
||||||
|
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import net.gepafin.tendermanagement.entities.ApplicationSignedDocumentEntity;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface ApplicationSignedDocumentRepository extends JpaRepository<ApplicationSignedDocumentEntity, Long> {
|
||||||
|
|
||||||
|
ApplicationSignedDocumentEntity findByApplicationIdAndStatus(Long applicationId, String status);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -20,6 +20,7 @@ public interface DocumentRepository extends JpaRepository<DocumentEntity, Long>
|
|||||||
Optional<DocumentEntity> findByIdAndSourceIdAndIsDeletedFalse(Long id, Long sourceId);
|
Optional<DocumentEntity> findByIdAndSourceIdAndIsDeletedFalse(Long id, Long sourceId);
|
||||||
|
|
||||||
List<DocumentEntity> findBySource(String source);
|
List<DocumentEntity> findBySource(String source);
|
||||||
|
List<DocumentEntity> findBySourceIdAndSourceAndTypeAndIsDeletedFalse(Long sourceId, String source, String type);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package net.gepafin.tendermanagement.service;
|
|||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import net.gepafin.tendermanagement.model.response.UploadFileOnAmazonS3Response;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
@@ -14,4 +16,6 @@ public interface AmazonS3Service {
|
|||||||
public Boolean delete(String s3Folder, String fileName);
|
public Boolean delete(String s3Folder, String fileName);
|
||||||
|
|
||||||
InputStream getFile(String s3Folder, String filePath) throws IOException;
|
InputStream getFile(String s3Folder, String filePath) throws IOException;
|
||||||
|
|
||||||
|
public UploadFileOnAmazonS3Response uploadFileOnAmazonS3(String s3Folder, MultipartFile file);
|
||||||
}
|
}
|
||||||
@@ -9,10 +9,13 @@ import net.gepafin.tendermanagement.model.request.ApplicationRequestBean;
|
|||||||
import net.gepafin.tendermanagement.model.response.ApplicationGetResponseBean;
|
import net.gepafin.tendermanagement.model.response.ApplicationGetResponseBean;
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationResponse;
|
import net.gepafin.tendermanagement.model.response.ApplicationResponse;
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationResponseBean;
|
import net.gepafin.tendermanagement.model.response.ApplicationResponseBean;
|
||||||
|
import net.gepafin.tendermanagement.model.response.ApplicationSignedDocumentResponse;
|
||||||
import net.gepafin.tendermanagement.model.response.NextOrPreviousFormResponse;
|
import net.gepafin.tendermanagement.model.response.NextOrPreviousFormResponse;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
public interface ApplicationService {
|
public interface ApplicationService {
|
||||||
|
|
||||||
public ApplicationResponseBean createApplication(HttpServletRequest request, ApplicationRequestBean applicationRequestBean,Long applicationId, Long formId);
|
public ApplicationResponseBean createApplication(HttpServletRequest request, ApplicationRequestBean applicationRequestBean,Long applicationId, Long formId);
|
||||||
@@ -31,4 +34,10 @@ public interface ApplicationService {
|
|||||||
|
|
||||||
public ApplicationResponse updateApplicationStatus(HttpServletRequest request, Long applicationId, ApplicationStatusTypeEnum status);
|
public ApplicationResponse updateApplicationStatus(HttpServletRequest request, Long applicationId, ApplicationStatusTypeEnum status);
|
||||||
|
|
||||||
|
public ApplicationSignedDocumentResponse uploadSignedDocument(HttpServletRequest request, Long applicationId, MultipartFile file);
|
||||||
|
|
||||||
|
public ApplicationSignedDocumentResponse getSignedDocument(HttpServletRequest request, Long applicationId);
|
||||||
|
|
||||||
|
public void deleteSignedDocument(HttpServletRequest request, Long applicationId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ public interface CallService {
|
|||||||
CallEntity validateCall(Long callId);
|
CallEntity validateCall(Long callId);
|
||||||
|
|
||||||
CallEntity validatePublishedCall(Long callId);
|
CallEntity validatePublishedCall(Long callId);
|
||||||
|
byte[] downloadCallDocumentsAsZip(Long callId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,5 +39,7 @@ public interface CompanyService {
|
|||||||
CompanyDelegationResponse getCompanyDelegation(HttpServletRequest request, Long companyId);
|
CompanyDelegationResponse getCompanyDelegation(HttpServletRequest request, Long companyId);
|
||||||
|
|
||||||
void deleteCompanyDelegation(HttpServletRequest request, Long companyId);
|
void deleteCompanyDelegation(HttpServletRequest request, Long companyId);
|
||||||
|
UserWithCompanyEntity getUserWithCompanyEntity(Long userId,Long companyId);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,16 @@ package net.gepafin.tendermanagement.service.impl;
|
|||||||
|
|
||||||
import com.amazonaws.services.s3.AmazonS3;
|
import com.amazonaws.services.s3.AmazonS3;
|
||||||
import com.amazonaws.services.s3.model.*;
|
import com.amazonaws.services.s3.model.*;
|
||||||
|
|
||||||
|
import net.gepafin.tendermanagement.config.Translator;
|
||||||
|
import net.gepafin.tendermanagement.constants.GepafinConstant;
|
||||||
|
import net.gepafin.tendermanagement.model.response.UploadFileOnAmazonS3Response;
|
||||||
import net.gepafin.tendermanagement.service.AmazonS3Service;
|
import net.gepafin.tendermanagement.service.AmazonS3Service;
|
||||||
|
import net.gepafin.tendermanagement.util.Utils;
|
||||||
|
import net.gepafin.tendermanagement.web.rest.api.errors.CustomValidationException;
|
||||||
|
import net.gepafin.tendermanagement.web.rest.api.errors.Status;
|
||||||
|
|
||||||
|
import org.apache.commons.io.FilenameUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.core.env.Environment;
|
import org.springframework.core.env.Environment;
|
||||||
@@ -86,4 +95,20 @@ public class AmazonS3ServiceImpl implements AmazonS3Service {
|
|||||||
throw new IOException("Error getting file from Amazon S3", e);
|
throw new IOException("Error getting file from Amazon S3", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UploadFileOnAmazonS3Response uploadFileOnAmazonS3(String s3Folder, MultipartFile file) {
|
||||||
|
String extension = FilenameUtils.getExtension(file.getOriginalFilename());
|
||||||
|
String fileName = org.springframework.util.StringUtils.cleanPath(file.getOriginalFilename());
|
||||||
|
String firstNameContain = fileName.substring(0, fileName.lastIndexOf('.'));
|
||||||
|
firstNameContain+=Utils.randomKey(5);
|
||||||
|
fileName = (firstNameContain + "." + extension);
|
||||||
|
try {
|
||||||
|
String filepath = upload(fileName, s3Folder, file);
|
||||||
|
return UploadFileOnAmazonS3Response.builder().fileName(fileName).filePath(filepath).build();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new CustomValidationException(Status.VALIDATION_ERROR,
|
||||||
|
Translator.toLocale(GepafinConstant.UPLOAD_ERROR_S3));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -13,12 +13,14 @@ import net.gepafin.tendermanagement.model.request.ApplicationRequestBean;
|
|||||||
import net.gepafin.tendermanagement.model.response.ApplicationGetResponseBean;
|
import net.gepafin.tendermanagement.model.response.ApplicationGetResponseBean;
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationResponse;
|
import net.gepafin.tendermanagement.model.response.ApplicationResponse;
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationResponseBean;
|
import net.gepafin.tendermanagement.model.response.ApplicationResponseBean;
|
||||||
|
import net.gepafin.tendermanagement.model.response.ApplicationSignedDocumentResponse;
|
||||||
import net.gepafin.tendermanagement.model.response.NextOrPreviousFormResponse;
|
import net.gepafin.tendermanagement.model.response.NextOrPreviousFormResponse;
|
||||||
import net.gepafin.tendermanagement.service.ApplicationService;
|
import net.gepafin.tendermanagement.service.ApplicationService;
|
||||||
import net.gepafin.tendermanagement.util.Validator;
|
import net.gepafin.tendermanagement.util.Validator;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -64,7 +66,7 @@ public class ApplicationServiceImpl implements ApplicationService {
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public ApplicationResponse createApplication(HttpServletRequest request, Long companyId, ApplicationRequest applicationRequest, Long callId) {
|
public ApplicationResponse createApplication(HttpServletRequest request, Long companyId, ApplicationRequest applicationRequest, Long callId) {
|
||||||
UserEntity userEntity = validator.validateUser(request);
|
UserEntity userEntity = validator.validateUser(request);
|
||||||
CompanyEntity companyEntity = validator.validateUSerWithCompany(request, companyId);
|
CompanyEntity companyEntity = validator.validateUserWithCompany(request, companyId);
|
||||||
return applicationDao.createApplicationByCallId(companyEntity, applicationRequest, callId, userEntity);
|
return applicationDao.createApplicationByCallId(companyEntity, applicationRequest, callId, userEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,8 +89,26 @@ public class ApplicationServiceImpl implements ApplicationService {
|
|||||||
public List<ApplicationResponse> getAllApplications(HttpServletRequest request, Long callId, Long companyId) {
|
public List<ApplicationResponse> getAllApplications(HttpServletRequest request, Long callId, Long companyId) {
|
||||||
UserEntity userEntity = validator.validateUser(request);
|
UserEntity userEntity = validator.validateUser(request);
|
||||||
if (companyId != null) {
|
if (companyId != null) {
|
||||||
validator.validateUSerWithCompany(request, companyId);
|
validator.validateUserWithCompany(request, companyId);
|
||||||
}
|
}
|
||||||
return applicationDao.getAllApplications(userEntity, callId, companyId);
|
return applicationDao.getAllApplications(userEntity, callId, companyId);
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public ApplicationSignedDocumentResponse uploadSignedDocument(HttpServletRequest request, Long applicationId, MultipartFile file) {
|
||||||
|
return applicationDao.uploadSignedDocument(request, applicationId, file);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(readOnly = true)
|
||||||
|
public ApplicationSignedDocumentResponse getSignedDocument(HttpServletRequest request, Long applicationId) {
|
||||||
|
return applicationDao.getSignedDocument(request, applicationId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void deleteSignedDocument(HttpServletRequest request, Long applicationId) {
|
||||||
|
applicationDao.deleteSignedDocument(request, applicationId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,4 +92,9 @@ public class CallServiceImpl implements CallService {
|
|||||||
public CallEntity validatePublishedCall(Long callId) {
|
public CallEntity validatePublishedCall(Long callId) {
|
||||||
return callDao.validatePublishedCall(callId);
|
return callDao.validatePublishedCall(callId);
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
@Transactional(readOnly = true)
|
||||||
|
public byte[] downloadCallDocumentsAsZip(Long callId) {
|
||||||
|
return callDao.downloadCallDocumentsAsZip(callId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,7 +98,8 @@ public class CompanyServiceImpl implements CompanyService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public CompanyDelegationResponse uploadCompanyDelegation(HttpServletRequest request, Long companyId, MultipartFile file) {
|
public CompanyDelegationResponse uploadCompanyDelegation(HttpServletRequest request, Long companyId, MultipartFile file) {
|
||||||
UserEntity userEntity =validator.validateUser(request);
|
UserEntity userEntity = validator.validateUser(request);
|
||||||
|
validator.validateUserWithCompany(request, companyId);
|
||||||
return delegationDao.uploadCompanyDelegation(userEntity, companyId, file);
|
return delegationDao.uploadCompanyDelegation(userEntity, companyId, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,4 +115,7 @@ public class CompanyServiceImpl implements CompanyService {
|
|||||||
UserEntity userEntity =validator.validateUser(request);
|
UserEntity userEntity =validator.validateUser(request);
|
||||||
delegationDao.deleteCompanyDelegation(userEntity, companyId);
|
delegationDao.deleteCompanyDelegation(userEntity, companyId);
|
||||||
}
|
}
|
||||||
|
public UserWithCompanyEntity getUserWithCompanyEntity(Long userId,Long companyId){
|
||||||
|
return companyDao.getUserWithCompany(userId,companyId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import net.gepafin.tendermanagement.entities.UserEntity;
|
|||||||
import net.gepafin.tendermanagement.enums.RoleStatusEnum;
|
import net.gepafin.tendermanagement.enums.RoleStatusEnum;
|
||||||
import net.gepafin.tendermanagement.service.CompanyService;
|
import net.gepafin.tendermanagement.service.CompanyService;
|
||||||
import net.gepafin.tendermanagement.service.UserService;
|
import net.gepafin.tendermanagement.service.UserService;
|
||||||
|
import net.gepafin.tendermanagement.web.rest.api.errors.ForbiddenAccessException;
|
||||||
import net.gepafin.tendermanagement.web.rest.api.errors.Status;
|
import net.gepafin.tendermanagement.web.rest.api.errors.Status;
|
||||||
import net.gepafin.tendermanagement.web.rest.api.errors.UnauthorizedAccessException;
|
import net.gepafin.tendermanagement.web.rest.api.errors.UnauthorizedAccessException;
|
||||||
|
|
||||||
@@ -60,7 +61,7 @@ public class Validator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public CompanyEntity validateUSerWithCompany(HttpServletRequest request, Long companyId) {
|
public CompanyEntity validateUserWithCompany(HttpServletRequest request, Long companyId) {
|
||||||
if (checkIsSuperAdmin()) {
|
if (checkIsSuperAdmin()) {
|
||||||
return companyService.validateCompany(companyId);
|
return companyService.validateCompany(companyId);
|
||||||
}
|
}
|
||||||
@@ -89,7 +90,7 @@ public class Validator {
|
|||||||
public UserEntity validateUserId(HttpServletRequest request, Long userId) {
|
public UserEntity validateUserId(HttpServletRequest request, Long userId) {
|
||||||
UserEntity user = validateUser(request);
|
UserEntity user = validateUser(request);
|
||||||
if(user.getRoleEntity().getRoleType().equals(RoleStatusEnum.ROLE_BENEFICIARY.getValue()) && Boolean.FALSE.equals(user.getId().equals(userId))) {
|
if(user.getRoleEntity().getRoleType().equals(RoleStatusEnum.ROLE_BENEFICIARY.getValue()) && Boolean.FALSE.equals(user.getId().equals(userId))) {
|
||||||
throw new UnauthorizedAccessException(Status.UNAUTHORIZED, Translator.toLocale(GepafinConstant.INVALID_REQUEST));
|
throw new ForbiddenAccessException(Status.FORBIDDEN, Translator.toLocale(GepafinConstant.PERMISSION_DENIED));
|
||||||
}
|
}
|
||||||
return userService.validateUser(userId);
|
return userService.validateUser(userId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import org.springframework.http.MediaType;
|
|||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
@@ -21,6 +22,8 @@ import net.gepafin.tendermanagement.model.request.ApplicationRequestBean;
|
|||||||
import net.gepafin.tendermanagement.model.response.ApplicationGetResponseBean;
|
import net.gepafin.tendermanagement.model.response.ApplicationGetResponseBean;
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationResponse;
|
import net.gepafin.tendermanagement.model.response.ApplicationResponse;
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationResponseBean;
|
import net.gepafin.tendermanagement.model.response.ApplicationResponseBean;
|
||||||
|
import net.gepafin.tendermanagement.model.response.ApplicationSignedDocumentResponse;
|
||||||
|
import net.gepafin.tendermanagement.model.response.CompanyDelegationResponse;
|
||||||
import net.gepafin.tendermanagement.model.response.NextOrPreviousFormResponse;
|
import net.gepafin.tendermanagement.model.response.NextOrPreviousFormResponse;
|
||||||
import net.gepafin.tendermanagement.model.util.Response;
|
import net.gepafin.tendermanagement.model.util.Response;
|
||||||
import net.gepafin.tendermanagement.web.rest.api.errors.ErrorConstants;
|
import net.gepafin.tendermanagement.web.rest.api.errors.ErrorConstants;
|
||||||
@@ -148,5 +151,41 @@ public interface ApplicationApi {
|
|||||||
@Parameter(description = "The application id", required = true)
|
@Parameter(description = "The application id", required = true)
|
||||||
@PathVariable(value = "applicationId", required = true) Long applicationId);
|
@PathVariable(value = "applicationId", required = true) Long applicationId);
|
||||||
|
|
||||||
|
@Operation(summary = "Api to upload signed document (only p7m file format is supported)", responses = { @ApiResponse(responseCode = "200", description = "OK"),
|
||||||
|
@ApiResponse(responseCode = "404", description = "Not Found", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||||
|
@ExampleObject(value = ErrorConstants.NOTFOUND_ERROR_EXAMPLE) })),
|
||||||
|
@ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||||
|
@ExampleObject(value = ErrorConstants.UNAUTHORIZED_ERROR_EXAMPLE) })),
|
||||||
|
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||||
|
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) })
|
||||||
|
@PostMapping(value = "{applicationId}/signedDocument/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||||
|
ResponseEntity<Response<ApplicationSignedDocumentResponse>> uploadSignedDocument(HttpServletRequest request,
|
||||||
|
@Parameter(description = "The applicationId id", required = true) @PathVariable("applicationId") Long applicationId,
|
||||||
|
@Parameter(description = "The signed document", required = true) @RequestParam("file") MultipartFile file);
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(summary = "Api to get signed document", responses = { @ApiResponse(responseCode = "200", description = "OK"),
|
||||||
|
@ApiResponse(responseCode = "404", description = "Not Found", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||||
|
@ExampleObject(value = ErrorConstants.NOTFOUND_ERROR_EXAMPLE) })),
|
||||||
|
@ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||||
|
@ExampleObject(value = ErrorConstants.UNAUTHORIZED_ERROR_EXAMPLE) })),
|
||||||
|
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||||
|
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) })
|
||||||
|
@GetMapping(value = "{applicationId}/signedDocument", produces = "application/json")
|
||||||
|
ResponseEntity<Response<ApplicationSignedDocumentResponse>> getSignedDocument(HttpServletRequest request,
|
||||||
|
@Parameter(description = "The applicationId id", required = true) @PathVariable("applicationId") Long applicationId);
|
||||||
|
|
||||||
|
@Operation(summary = "Api to delete signed document", responses = { @ApiResponse(responseCode = "200", description = "OK"),
|
||||||
|
@ApiResponse(responseCode = "404", description = "Not Found", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||||
|
@ExampleObject(value = ErrorConstants.NOTFOUND_ERROR_EXAMPLE) })),
|
||||||
|
@ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||||
|
@ExampleObject(value = ErrorConstants.UNAUTHORIZED_ERROR_EXAMPLE) })),
|
||||||
|
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||||
|
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) })
|
||||||
|
@DeleteMapping(value = "{applicationId}/signedDocument", produces = "application/json")
|
||||||
|
ResponseEntity<Response<Void>> deleteSignedDocument(HttpServletRequest request,
|
||||||
|
@Parameter(description = "The applicationId id", required = true) @PathVariable("applicationId") Long applicationId);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -134,4 +134,19 @@ public interface CallApi {
|
|||||||
public ResponseEntity<Response<CallResponse>> updateCallStatus(HttpServletRequest request,
|
public ResponseEntity<Response<CallResponse>> updateCallStatus(HttpServletRequest request,
|
||||||
@Parameter(description = "The call id", required = true) @PathVariable("callId") Long callId,
|
@Parameter(description = "The call id", required = true) @PathVariable("callId") Long callId,
|
||||||
@Parameter(description = "status", required = true)@RequestParam(value = "status", required = true) CallStatusEnum status);
|
@Parameter(description = "status", required = true)@RequestParam(value = "status", required = true) CallStatusEnum status);
|
||||||
|
|
||||||
|
@Operation(summary = "Api to download call documents as a ZIP file",
|
||||||
|
responses = {
|
||||||
|
@ApiResponse(responseCode = "200", description = "OK"),
|
||||||
|
@ApiResponse(responseCode = "404", description = "Not Found", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||||
|
@ExampleObject(value = ErrorConstants.NOTFOUND_ERROR_EXAMPLE)})),
|
||||||
|
@ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||||
|
@ExampleObject(value = ErrorConstants.UNAUTHORIZED_ERROR_EXAMPLE)})),
|
||||||
|
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||||
|
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE)}))
|
||||||
|
})
|
||||||
|
@GetMapping(value = "/{callId}/documents/zip")
|
||||||
|
ResponseEntity<byte[]> downloadCallDocumentsAsZip(HttpServletRequest httpServletRequest,
|
||||||
|
@Parameter(description = "The call ID", required = true) @PathVariable("callId") Long callId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -218,6 +218,12 @@ public interface UserApi {
|
|||||||
produces = { "application/json" })
|
produces = { "application/json" })
|
||||||
ResponseEntity<Response<UserSamlResponse>> validateNewUserToken(HttpServletRequest request,
|
ResponseEntity<Response<UserSamlResponse>> validateNewUserToken(HttpServletRequest request,
|
||||||
@Parameter(description = "The spid token", required = true) @PathVariable("token") String token);
|
@Parameter(description = "The spid token", required = true) @PathVariable("token") String token);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping("favicon.ico")
|
||||||
|
@ResponseBody
|
||||||
|
void returnNoFavicon();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ import net.gepafin.tendermanagement.model.request.ApplicationRequestBean;
|
|||||||
import net.gepafin.tendermanagement.model.response.ApplicationGetResponseBean;
|
import net.gepafin.tendermanagement.model.response.ApplicationGetResponseBean;
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationResponse;
|
import net.gepafin.tendermanagement.model.response.ApplicationResponse;
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationResponseBean;
|
import net.gepafin.tendermanagement.model.response.ApplicationResponseBean;
|
||||||
|
import net.gepafin.tendermanagement.model.response.ApplicationSignedDocumentResponse;
|
||||||
|
import net.gepafin.tendermanagement.model.response.CompanyDelegationResponse;
|
||||||
import net.gepafin.tendermanagement.model.response.NextOrPreviousFormResponse;
|
import net.gepafin.tendermanagement.model.response.NextOrPreviousFormResponse;
|
||||||
import net.gepafin.tendermanagement.model.util.Response;
|
import net.gepafin.tendermanagement.model.util.Response;
|
||||||
import net.gepafin.tendermanagement.service.ApplicationService;
|
import net.gepafin.tendermanagement.service.ApplicationService;
|
||||||
@@ -24,6 +26,7 @@ import org.springframework.http.MediaType;
|
|||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -112,4 +115,33 @@ public class ApplicationApiController implements ApplicationApi {
|
|||||||
.contentType(MediaType.APPLICATION_PDF)
|
.contentType(MediaType.APPLICATION_PDF)
|
||||||
.body(pdfBytes);
|
.body(pdfBytes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResponseEntity<Response<ApplicationSignedDocumentResponse>> uploadSignedDocument(HttpServletRequest request,
|
||||||
|
Long applicationId, MultipartFile file) {
|
||||||
|
log.info("upload signed document applicationId: {}", applicationId);
|
||||||
|
ApplicationSignedDocumentResponse response = applicationService.uploadSignedDocument(request, applicationId, file);
|
||||||
|
return ResponseEntity.status(HttpStatus.OK)
|
||||||
|
.body(new Response<>(response, Status.SUCCESS, Translator.toLocale(GepafinConstant.SIGNED_DOCUMENT_FILE_UPLOAD_SUCCESS)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResponseEntity<Response<ApplicationSignedDocumentResponse>> getSignedDocument(HttpServletRequest request,
|
||||||
|
Long applicationId) {
|
||||||
|
ApplicationSignedDocumentResponse response = applicationService.getSignedDocument(request, applicationId);
|
||||||
|
log.info("get signed document applicationId: {}", applicationId);
|
||||||
|
return ResponseEntity.status(HttpStatus.OK)
|
||||||
|
.body(new Response<>(response, Status.SUCCESS, Translator.toLocale(GepafinConstant.GET_SIGNED_DOCUMENT_FILE_SUCCESS)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResponseEntity<Response<Void>> deleteSignedDocument(HttpServletRequest request,
|
||||||
|
Long applicationId) {
|
||||||
|
applicationService.deleteSignedDocument(request, applicationId);
|
||||||
|
log.info("delete signed document applicationId: {}", applicationId);
|
||||||
|
return ResponseEntity.status(HttpStatus.OK)
|
||||||
|
.body(new Response<>(null, Status.SUCCESS, Translator.toLocale(GepafinConstant.DELETE_SIGNED_DOCUMENT_FILE_SUCCESS)));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,7 +4,9 @@ import java.util.List;
|
|||||||
|
|
||||||
import net.gepafin.tendermanagement.enums.CallStatusEnum;
|
import net.gepafin.tendermanagement.enums.CallStatusEnum;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
@@ -84,4 +86,22 @@ public class CallApiController implements CallApi {
|
|||||||
CallResponse updateCall = callService.updateCallStatus(request, callId, status);
|
CallResponse updateCall = callService.updateCallStatus(request, callId, status);
|
||||||
return ResponseEntity.ok(new Response<>(updateCall, Status.SUCCESS, Translator.toLocale(GepafinConstant.UPDATE_CALL_STATUS_SUCCESS_MSG)));
|
return ResponseEntity.ok(new Response<>(updateCall, Status.SUCCESS, Translator.toLocale(GepafinConstant.UPDATE_CALL_STATUS_SUCCESS_MSG)));
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public ResponseEntity<byte[]> downloadCallDocumentsAsZip(HttpServletRequest request, Long callId) {
|
||||||
|
byte[] zipFile = callService.downloadCallDocumentsAsZip(callId);
|
||||||
|
|
||||||
|
HttpHeaders headers = new HttpHeaders();
|
||||||
|
headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
|
||||||
|
headers.setContentDispositionFormData("attachment", "documents.zip");
|
||||||
|
|
||||||
|
if (zipFile == null || zipFile.length == 0) {
|
||||||
|
String notFoundMessage = Translator.toLocale(GepafinConstant.CALL_DOCUMENTS_NOT_FOUND_MSG);
|
||||||
|
return ResponseEntity.status(HttpStatus.NOT_FOUND)
|
||||||
|
.body(notFoundMessage.getBytes());
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ResponseEntity<>(zipFile, headers, HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -140,4 +140,10 @@ public class UserApiController implements UserApi {
|
|||||||
return ResponseEntity.ok(new Response<>(data, Status.SUCCESS, Translator.toLocale(GepafinConstant.TOKEN_VALIDATE_SUCCESS_MSE)));
|
return ResponseEntity.ok(new Response<>(data, Status.SUCCESS, Translator.toLocale(GepafinConstant.TOKEN_VALIDATE_SUCCESS_MSE)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void returnNoFavicon() {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -32,6 +32,7 @@ aws.s3.bucket.name=mementoresources
|
|||||||
aws.s3.url = https://mementoresources.s3.eu-west-1.amazonaws.com/
|
aws.s3.url = https://mementoresources.s3.eu-west-1.amazonaws.com/
|
||||||
aws.s3.url.folder=gepafin
|
aws.s3.url.folder=gepafin
|
||||||
aws.s3.url.folder.delegation=gepafin/delegation
|
aws.s3.url.folder.delegation=gepafin/delegation
|
||||||
|
aws.s3.url.folder.signed.document=gepafin/signed-document
|
||||||
# JWT configuration
|
# JWT configuration
|
||||||
# Ensure these values match your expectations
|
# Ensure these values match your expectations
|
||||||
security.authentication.jwt.secret=my-secret-token-to-change-in-prod-environment-your-super-secure-randomly-generated-key
|
security.authentication.jwt.secret=my-secret-token-to-change-in-prod-environment-your-super-secure-randomly-generated-key
|
||||||
|
|||||||
@@ -973,4 +973,29 @@
|
|||||||
</addColumn>
|
</addColumn>
|
||||||
</changeSet>
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="12-10-2024_1" author="Rajesh Khore">
|
||||||
|
|
||||||
|
<createTable tableName="application_signed_document">
|
||||||
|
<column name="id" type="INTEGER" autoIncrement="true">
|
||||||
|
<constraints primaryKey="true" primaryKeyName="application_signed_document_pkey" nullable="false"/>
|
||||||
|
</column>
|
||||||
|
<column name="APPLICATION_ID" type="INTEGER">
|
||||||
|
<constraints nullable="false"/>
|
||||||
|
</column>
|
||||||
|
<column name="FILE_NAME" type="VARCHAR(255)"/>
|
||||||
|
<column name="FILE_PATH" type="VARCHAR(255)"/>
|
||||||
|
<column name="STATUS" type="VARCHAR(64)"/>
|
||||||
|
<column name="created_date" type="TIMESTAMP WITHOUT TIME ZONE"/>
|
||||||
|
<column name="updated_date" type="TIMESTAMP WITHOUT TIME ZONE"/>
|
||||||
|
</createTable>
|
||||||
|
|
||||||
|
<addForeignKeyConstraint baseTableName="application_signed_document"
|
||||||
|
baseColumnNames="APPLICATION_ID"
|
||||||
|
referencedTableName="application"
|
||||||
|
referencedColumnNames="ID"
|
||||||
|
constraintName="fk_application_signed_document_application"/>
|
||||||
|
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
|
||||||
</databaseChangeLog>
|
</databaseChangeLog>
|
||||||
|
|||||||
@@ -224,5 +224,15 @@ application.already.in.provided.status=Application is already in provided status
|
|||||||
delegation.not.found=Delegation not found.
|
delegation.not.found=Delegation not found.
|
||||||
user.company.relation.not.found=User with the specified company relation not found.
|
user.company.relation.not.found=User with the specified company relation not found.
|
||||||
delegation.delete.success=Delegation deleted successfully.
|
delegation.delete.success=Delegation deleted successfully.
|
||||||
|
user.not.authorized.create.application=User must be a legal representative or have delegation.
|
||||||
|
application.submitted.cannot.change=The submitted application cannot be changed.
|
||||||
|
# Call Document Messages
|
||||||
|
call.documents.fetch.success=Documents fetched successfully.
|
||||||
|
call.documents.not.found=No documents found for the specified call.
|
||||||
|
permission.denied=You are not authorized to access this data.
|
||||||
|
signed.document.file.upload.success=Signed document file uploaded successfully.
|
||||||
|
get.signed.document.file.success=Signed document file retrieved successfully.
|
||||||
|
application.signed.document.not.found=Signed document for the application not found.
|
||||||
|
delete.signed.document.file.success=Signed document deleted successfully.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -219,5 +219,16 @@ application.already.in.provided.status=L'applicazione <20> gi<67> nello stato forn
|
|||||||
delegation.not.found=Delega non trovata.
|
delegation.not.found=Delega non trovata.
|
||||||
user.company.relation.not.found=Relazione utente con l'azienda specificata non trovata.
|
user.company.relation.not.found=Relazione utente con l'azienda specificata non trovata.
|
||||||
delegation.delete.success=Delega eliminata con successo.
|
delegation.delete.success=Delega eliminata con successo.
|
||||||
|
user.not.authorized.create.application=L'utente deve essere un rappresentante legale o avere una delega.
|
||||||
|
application.submitted.cannot.change=La domanda inviata non può essere modificata.
|
||||||
|
|
||||||
|
# Call Document Messages
|
||||||
|
call.documents.fetch.success=Documenti recuperati con successo.
|
||||||
|
call.documents.not.found=Nessun documento trovato per la chiamata specificata.
|
||||||
|
permission.denied=Non sei autorizzato ad accedere a questi dati.
|
||||||
|
signed.document.file.upload.success=File del documento firmato caricato con successo.
|
||||||
|
get.signed.document.file.success=File del documento firmato recuperato con successo.
|
||||||
|
application.signed.document.not.found=Documento firmato per l'applicazione non trovato.
|
||||||
|
delete.signed.document.file.success=Documento firmato eliminato con successo.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user