diff --git a/src/main/java/net/gepafin/tendermanagement/constants/GepafinConstant.java b/src/main/java/net/gepafin/tendermanagement/constants/GepafinConstant.java index f2ba75af..95515759 100644 --- a/src/main/java/net/gepafin/tendermanagement/constants/GepafinConstant.java +++ b/src/main/java/net/gepafin/tendermanagement/constants/GepafinConstant.java @@ -369,6 +369,8 @@ public class GepafinConstant { public static final String HUB="hub"; public static final String NAME="name"; + public static final String USER_ACTION_FETCHED_SUCCESSFULLY = "user.action.fetched.successfully"; + public static final String ACTION_CONTEXT_LABELS_FETCHED_SUCCESSFULLY = "action.context.labels.fetched.successfully"; //action log response public static final String STATUS_CODE_STRING = "statusCode"; public static final String GET_STATUS_CODE_STRING = "status"; diff --git a/src/main/java/net/gepafin/tendermanagement/dao/UserActionDao.java b/src/main/java/net/gepafin/tendermanagement/dao/UserActionDao.java new file mode 100644 index 00000000..7cf5472f --- /dev/null +++ b/src/main/java/net/gepafin/tendermanagement/dao/UserActionDao.java @@ -0,0 +1,160 @@ +package net.gepafin.tendermanagement.dao; + +import jakarta.persistence.criteria.CriteriaBuilder; +import jakarta.persistence.criteria.Predicate; +import jakarta.servlet.http.HttpServletRequest; +import net.gepafin.tendermanagement.entities.RoleActionContextEntity; +import net.gepafin.tendermanagement.entities.UserActionEntity; +import net.gepafin.tendermanagement.entities.UserEntity; +import net.gepafin.tendermanagement.enums.TimePeriodEnum; +import net.gepafin.tendermanagement.enums.UserActionContextEnum; +import net.gepafin.tendermanagement.model.response.ActionContextLabelResponse; +import net.gepafin.tendermanagement.model.response.SummaryPageResponseBean; +import net.gepafin.tendermanagement.model.response.UserActionResponseBean; +import net.gepafin.tendermanagement.repositories.AssignedApplicationsRepository; +import net.gepafin.tendermanagement.repositories.RoleActionContextRepository; +import net.gepafin.tendermanagement.repositories.UserActionsRepository; +import net.gepafin.tendermanagement.service.UserService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.domain.Specification; +import org.springframework.stereotype.Component; + +import java.time.LocalDateTime; +import java.util.List; +import java.util.stream.Collectors; + +@Component +public class UserActionDao { + + @Autowired + private UserService userService; + + @Autowired + private UserActionsRepository userActionsRepository; + + @Autowired + private AssignedApplicationsRepository assignedApplicationsRepository; + + @Autowired + private RoleActionContextRepository roleActionContextRepository; + + public SummaryPageResponseBean getUserAction(HttpServletRequest request, UserEntity userEntity, TimePeriodEnum timeFilter, List actionContext){ + Long numberOfLoginAttempts = userActionsRepository.countUserLoginAttempts(userEntity.getId()); + Long applicationsProcessed = assignedApplicationsRepository.countAssignedApplicationsByUserId(userEntity.getId()); + + List userActions = getFilterUserActions(userEntity.getId(),timeFilter,actionContext); + + return createSummaryPageResponse(userEntity,numberOfLoginAttempts,applicationsProcessed,userActions); + } + + public SummaryPageResponseBean createSummaryPageResponse(UserEntity user, Long numberOfLoginAttempts, Long applicationsProcessed, List userActions){ + SummaryPageResponseBean response = new SummaryPageResponseBean(); + response.setRole(user.getRoleEntity().getRoleName()); + response.setLastLogin(user.getLastLogin()); + response.setRegistrationDate(user.getCreatedDate()); + response.setUsername(user.getFirstName()); + response.setEmail(user.getEmail()); + response.setNumberOfLoginAttempts(numberOfLoginAttempts); + response.setApplicationsProcessed(applicationsProcessed); + + List userAction = convertEntityToResponse(userActions); + response.setUserActions(userAction); + return response; + } + + + public List getFilterUserActions(Long userId ,TimePeriodEnum timeFilter, List actionContextList) { + LocalDateTime endDate = LocalDateTime.now(); + LocalDateTime startDate = (timeFilter != null) ? getStartTimeFromFilter(timeFilter) : null; + Pageable pageable = PageRequest.of(0, 25); + +// String actionContextLabel = (actionContext != null) ? actionContext.toString() : null; + List actionContextLabels = (actionContextList != null && !actionContextList.isEmpty()) + ? actionContextList.stream().map(Enum::toString).collect(Collectors.toList()) + : null; + + Specification spec = getUserActionsSpecification(userId, startDate, endDate, actionContextLabels); + Page pageResult = userActionsRepository.findAll(spec, pageable); + + return pageResult.getContent(); + } + + private LocalDateTime getStartTimeFromFilter(TimePeriodEnum timeFilter) { + LocalDateTime now = LocalDateTime.now(); + + if (timeFilter.equals(TimePeriodEnum.LAST_WEEK)) { + return now.minusDays(7); + } else if (timeFilter.equals(TimePeriodEnum.LAST_QUARTER)) { + return now.minusMonths(4); + } else if (timeFilter.equals(TimePeriodEnum.LAST_SEMESTER)) { + return now.minusMonths(6); + } else if (timeFilter.equals(TimePeriodEnum.LAST_YEAR)) { + return now.minusYears(1); + } else { + return null; + } + } + + public Specification getUserActionsSpecification(Long userId, LocalDateTime startDate, LocalDateTime endDate, List actionContextList) { + return (root, query, builder) -> { + Predicate predicate = builder.isFalse(root.get("isDeleted")); + + predicate = builder.and(predicate, builder.equal(root.get("userId"), userId)); + + if (startDate != null && endDate != null) { + predicate = builder.and(predicate, builder.between(root.get("createdDate"), startDate, endDate)); + } + + + if (actionContextList != null && !actionContextList.isEmpty()) { + CriteriaBuilder.In inClause = builder.in(root.get("actionContext")); + for (String actionContext : actionContextList) { + inClause.value(actionContext); + } + predicate = builder.and(predicate, inClause); + } + query.orderBy(builder.desc(root.get("createdDate"))); + + return predicate; + }; + } + + private List convertEntityToResponse(List userActions) { + return userActions.stream().map(action -> { + UserActionResponseBean responseBean = new UserActionResponseBean(); + responseBean.setId(action.getId()); + responseBean.setUserId(action.getUserId()); + responseBean.setActionType(action.getActionType()); + responseBean.setRequestBody(action.getRequestBody()); + responseBean.setLoginAttemptId(action.getLoginAttemptId()); + responseBean.setIpAddress(action.getIpAddress()); + responseBean.setActionContext(action.getActionContext()); + responseBean.setHubId(action.getHubId()); + responseBean.setUrl(action.getUrl()); + responseBean.setResponse(action.getResponse()); + responseBean.setCreatedDate(action.getCreatedDate()); + responseBean.setUpdatedDate(action.getUpdatedDate()); + return responseBean; + }).collect(Collectors.toList()); + } + + public List getActionContextLabels(HttpServletRequest request, UserEntity userEntity){ + List actionContextLabel = roleActionContextRepository.findActionContextLabel(userEntity.getRoleEntity().getId()); + return convertRoleContextEntityToResponse(actionContextLabel); + } + + private List convertRoleContextEntityToResponse(List actionContextEntities){ + return actionContextEntities.stream().map(actionContext -> { + ActionContextLabelResponse responseBean = new ActionContextLabelResponse(); + responseBean.setId(actionContext.getId()); + responseBean.setActionContext(UserActionContextEnum.valueOf(actionContext.getActionContext())); + responseBean.setRoleId(actionContext.getRoleId()); + responseBean.setDescription(actionContext.getDescription()); + responseBean.setIsViewed(actionContext.getIsViewed()); + return responseBean; + }).collect(Collectors.toList()); + } +} diff --git a/src/main/java/net/gepafin/tendermanagement/entities/RoleActionContextEntity.java b/src/main/java/net/gepafin/tendermanagement/entities/RoleActionContextEntity.java new file mode 100644 index 00000000..a3ff676f --- /dev/null +++ b/src/main/java/net/gepafin/tendermanagement/entities/RoleActionContextEntity.java @@ -0,0 +1,29 @@ +package net.gepafin.tendermanagement.entities; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Table; +import lombok.Data; + +@Entity +@Data +@Table(name ="role_action_context") +public class RoleActionContextEntity extends BaseEntity { + + @Column(name = "action_context") + private String actionContext; + + @Column(name = "role_id") + private Long roleId; + + @Column(name="is_deleted") + private Boolean isDeleted; + + @Column(name = "is_viewed") + private Boolean isViewed; + + @Column(name = "description") + private String description; + + +} diff --git a/src/main/java/net/gepafin/tendermanagement/enums/TimePeriodEnum.java b/src/main/java/net/gepafin/tendermanagement/enums/TimePeriodEnum.java new file mode 100644 index 00000000..fc342727 --- /dev/null +++ b/src/main/java/net/gepafin/tendermanagement/enums/TimePeriodEnum.java @@ -0,0 +1,22 @@ +package net.gepafin.tendermanagement.enums; + +import com.fasterxml.jackson.annotation.JsonValue; + +public enum TimePeriodEnum { + + LAST_WEEK ("LAST_WEEK"), + LAST_QUARTER("LAST_QUARTER"), + LAST_SEMESTER("LAST_SEMESTER"), + LAST_YEAR("LAST_YEAR"); + + private String value; + + TimePeriodEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } +} diff --git a/src/main/java/net/gepafin/tendermanagement/enums/UserActionContextEnum.java b/src/main/java/net/gepafin/tendermanagement/enums/UserActionContextEnum.java index 0a460b99..5cae2da0 100644 --- a/src/main/java/net/gepafin/tendermanagement/enums/UserActionContextEnum.java +++ b/src/main/java/net/gepafin/tendermanagement/enums/UserActionContextEnum.java @@ -168,9 +168,11 @@ public enum UserActionContextEnum { GET_ALL_NOTIFICATION_BY_PAGINATION("GET_ALL_NOTIFICATION_BY_PAGINATION"), GET_ALL_CALL_BY_PAGINATION("GET_ALL_CALL_BY_PAGINATION"), - GET_ALL_APPLICATION_BY_PAGINATION("GET_ALL_APPLICATION_BY_PAGINATION"); + GET_ALL_APPLICATION_BY_PAGINATION("GET_ALL_APPLICATION_BY_PAGINATION"), + GET_USER_ACTION("GET_USER_ACTION"), + GET_ACTION_CONTEXT_LABELS("GET_ACTION_CONTEXT_LABELS"); private final String value; diff --git a/src/main/java/net/gepafin/tendermanagement/model/response/ActionContextLabelResponse.java b/src/main/java/net/gepafin/tendermanagement/model/response/ActionContextLabelResponse.java new file mode 100644 index 00000000..988a8f07 --- /dev/null +++ b/src/main/java/net/gepafin/tendermanagement/model/response/ActionContextLabelResponse.java @@ -0,0 +1,12 @@ +package net.gepafin.tendermanagement.model.response; +import lombok.Data; +import net.gepafin.tendermanagement.enums.UserActionContextEnum; + +@Data +public class ActionContextLabelResponse { + private Long id; + private UserActionContextEnum actionContext; + private Long roleId; + private Boolean isViewed; + private String description; +} diff --git a/src/main/java/net/gepafin/tendermanagement/model/response/SummaryPageResponseBean.java b/src/main/java/net/gepafin/tendermanagement/model/response/SummaryPageResponseBean.java new file mode 100644 index 00000000..a15a6510 --- /dev/null +++ b/src/main/java/net/gepafin/tendermanagement/model/response/SummaryPageResponseBean.java @@ -0,0 +1,18 @@ +package net.gepafin.tendermanagement.model.response; + +import lombok.Data; + +import java.time.LocalDateTime; +import java.util.List; + +@Data +public class SummaryPageResponseBean { + private String username; + private String email; + private String role; + private LocalDateTime lastLogin; + private LocalDateTime registrationDate; + private Long numberOfLoginAttempts; + private Long applicationsProcessed; + private List userActions; +} diff --git a/src/main/java/net/gepafin/tendermanagement/model/response/UserActionResponseBean.java b/src/main/java/net/gepafin/tendermanagement/model/response/UserActionResponseBean.java new file mode 100644 index 00000000..f8b15d3f --- /dev/null +++ b/src/main/java/net/gepafin/tendermanagement/model/response/UserActionResponseBean.java @@ -0,0 +1,22 @@ +package net.gepafin.tendermanagement.model.response; + +import lombok.Data; + +import java.time.LocalDateTime; + +@Data +public class UserActionResponseBean { + private Long id; + private Long userId; + private String actionType; + private String requestBody; + private Long loginAttemptId; + private String actionContext; + private String ipAddress; + private String methodType; + private Long hubId; + private String url; + private String response; + private LocalDateTime createdDate; + private LocalDateTime updatedDate; +} diff --git a/src/main/java/net/gepafin/tendermanagement/repositories/AssignedApplicationsRepository.java b/src/main/java/net/gepafin/tendermanagement/repositories/AssignedApplicationsRepository.java index 164dcb0a..dac54c98 100644 --- a/src/main/java/net/gepafin/tendermanagement/repositories/AssignedApplicationsRepository.java +++ b/src/main/java/net/gepafin/tendermanagement/repositories/AssignedApplicationsRepository.java @@ -20,6 +20,6 @@ public interface AssignedApplicationsRepository extends JpaRepository 'CLOSE'") + Long countAssignedApplicationsByUserId(@Param("userId") Long userId); } diff --git a/src/main/java/net/gepafin/tendermanagement/repositories/RoleActionContextRepository.java b/src/main/java/net/gepafin/tendermanagement/repositories/RoleActionContextRepository.java new file mode 100644 index 00000000..218f2c10 --- /dev/null +++ b/src/main/java/net/gepafin/tendermanagement/repositories/RoleActionContextRepository.java @@ -0,0 +1,20 @@ +package net.gepafin.tendermanagement.repositories; + +import net.gepafin.tendermanagement.entities.RoleActionContextEntity; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; +import java.util.List; + +@Repository +public interface RoleActionContextRepository extends JpaRepository, JpaSpecificationExecutor { + + @Query("SELECT r FROM RoleActionContextEntity r WHERE r.roleId = :roleId AND r.isDeleted = false AND r.isViewed = true") + List findActionContextLabel(@Param("roleId") Long roleId); + + + + +} diff --git a/src/main/java/net/gepafin/tendermanagement/repositories/UserActionsRepository.java b/src/main/java/net/gepafin/tendermanagement/repositories/UserActionsRepository.java index eb93f8dd..ff6cdbc1 100644 --- a/src/main/java/net/gepafin/tendermanagement/repositories/UserActionsRepository.java +++ b/src/main/java/net/gepafin/tendermanagement/repositories/UserActionsRepository.java @@ -1,18 +1,22 @@ package net.gepafin.tendermanagement.repositories; import net.gepafin.tendermanagement.entities.UserActionEntity; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Repository; -import java.util.List; @Repository -public interface UserActionsRepository extends JpaRepository { +public interface UserActionsRepository extends JpaRepository , JpaSpecificationExecutor { UserActionEntity findUserActionById(Long id); - + + @Query("SELECT COUNT(u) FROM UserActionEntity u " + + "WHERE u.userId = :userId " + + "AND u.actionContext = 'USER_LOGIN' " + + "AND u.isDeleted = false") + Long countUserLoginAttempts(@Param("userId") Long userId); + UserActionEntity findUserActionByIdAndIsDeletedFalse(Long id); } diff --git a/src/main/java/net/gepafin/tendermanagement/service/UserActionService.java b/src/main/java/net/gepafin/tendermanagement/service/UserActionService.java new file mode 100644 index 00000000..e12bae6a --- /dev/null +++ b/src/main/java/net/gepafin/tendermanagement/service/UserActionService.java @@ -0,0 +1,15 @@ +package net.gepafin.tendermanagement.service; + +import jakarta.servlet.http.HttpServletRequest; +import net.gepafin.tendermanagement.enums.TimePeriodEnum; +import net.gepafin.tendermanagement.enums.UserActionContextEnum; +import net.gepafin.tendermanagement.model.response.ActionContextLabelResponse; +import net.gepafin.tendermanagement.model.response.SummaryPageResponseBean; + +import java.util.List; + +public interface UserActionService { + public SummaryPageResponseBean getUserAction(HttpServletRequest request, Long userId, TimePeriodEnum timeFilter, List actionContext); + + public List getActionContextLabels(HttpServletRequest request, Long userId); +} diff --git a/src/main/java/net/gepafin/tendermanagement/service/impl/UserActionServiceImpl.java b/src/main/java/net/gepafin/tendermanagement/service/impl/UserActionServiceImpl.java new file mode 100644 index 00000000..65d692dc --- /dev/null +++ b/src/main/java/net/gepafin/tendermanagement/service/impl/UserActionServiceImpl.java @@ -0,0 +1,38 @@ +package net.gepafin.tendermanagement.service.impl; + +import jakarta.servlet.http.HttpServletRequest; +import net.gepafin.tendermanagement.dao.UserActionDao; +import net.gepafin.tendermanagement.entities.UserEntity; +import net.gepafin.tendermanagement.enums.TimePeriodEnum; +import net.gepafin.tendermanagement.enums.UserActionContextEnum; +import net.gepafin.tendermanagement.model.response.ActionContextLabelResponse; +import net.gepafin.tendermanagement.model.response.SummaryPageResponseBean; +import net.gepafin.tendermanagement.service.UserActionService; +import net.gepafin.tendermanagement.util.Validator; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class UserActionServiceImpl implements UserActionService { + + @Autowired + private UserActionDao userActionDao; + + @Autowired + private Validator validator; + + + @Override + public SummaryPageResponseBean getUserAction(HttpServletRequest request, Long userId, TimePeriodEnum timeFilter, List actionContext) { + UserEntity user = validator.validateUserId(request, userId); + return userActionDao.getUserAction(request,user,timeFilter,actionContext); + } + + @Override + public List getActionContextLabels(HttpServletRequest request, Long userId) { + UserEntity user = validator.validateUserId(request, userId); + return userActionDao.getActionContextLabels(request,user); + } +} diff --git a/src/main/java/net/gepafin/tendermanagement/web/rest/api/UserActionApi.java b/src/main/java/net/gepafin/tendermanagement/web/rest/api/UserActionApi.java new file mode 100644 index 00000000..95d0f125 --- /dev/null +++ b/src/main/java/net/gepafin/tendermanagement/web/rest/api/UserActionApi.java @@ -0,0 +1,49 @@ +package net.gepafin.tendermanagement.web.rest.api; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.ExampleObject; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import jakarta.servlet.http.HttpServletRequest; +import net.gepafin.tendermanagement.enums.TimePeriodEnum; +import net.gepafin.tendermanagement.enums.UserActionContextEnum; +import net.gepafin.tendermanagement.model.response.ActionContextLabelResponse; +import net.gepafin.tendermanagement.model.response.SummaryPageResponseBean; +import net.gepafin.tendermanagement.model.util.Response; +import net.gepafin.tendermanagement.web.rest.api.errors.ErrorConstants; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestParam; + +import java.util.List; + +public interface UserActionApi { + @Operation(summary = "Api to get user action", + 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 = "/user/{userId}", produces = { "application/json" }) + ResponseEntity> getUserAction(HttpServletRequest request, @Parameter(description = "The user id", required = true) @PathVariable("userId") Long userId, + @Parameter(description = "Time Filter") @RequestParam(value = "timeFilter", required = false) TimePeriodEnum timeFilter, + @Parameter(description = "Action Context") @RequestParam(value = "actionContext", required = false) List actionContext); + + @Operation(summary = "Api to get action context label", + 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 = "/user/{userId}/action-context", produces = { "application/json" }) + ResponseEntity>> getActionContextLabels(HttpServletRequest request, @Parameter(description = "The user id", required = true) @PathVariable("userId") Long userId); +} diff --git a/src/main/java/net/gepafin/tendermanagement/web/rest/api/impl/UserActionApiController.java b/src/main/java/net/gepafin/tendermanagement/web/rest/api/impl/UserActionApiController.java new file mode 100644 index 00000000..c65fbe2f --- /dev/null +++ b/src/main/java/net/gepafin/tendermanagement/web/rest/api/impl/UserActionApiController.java @@ -0,0 +1,58 @@ +package net.gepafin.tendermanagement.web.rest.api.impl; + +import jakarta.servlet.http.HttpServletRequest; +import net.gepafin.tendermanagement.config.Translator; +import net.gepafin.tendermanagement.constants.GepafinConstant; +import net.gepafin.tendermanagement.enums.TimePeriodEnum; +import net.gepafin.tendermanagement.enums.UserActionContextEnum; +import net.gepafin.tendermanagement.enums.UserActionLogsEnum; +import net.gepafin.tendermanagement.model.request.UserActionRequest; +import net.gepafin.tendermanagement.model.response.ActionContextLabelResponse; +import net.gepafin.tendermanagement.model.response.SummaryPageResponseBean; +import net.gepafin.tendermanagement.model.util.Response; +import net.gepafin.tendermanagement.service.UserActionService; +import net.gepafin.tendermanagement.util.LoggingUtil; +import net.gepafin.tendermanagement.web.rest.api.UserActionApi; +import net.gepafin.tendermanagement.web.rest.api.errors.Status; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@RestController +@RequestMapping("${openapi.gepafin.base-path:/v1/userAction}") +public class UserActionApiController implements UserActionApi { + + @Autowired + private UserActionService userActionService; + + @Autowired + private LoggingUtil loggingUtil; + + @Override + public ResponseEntity> getUserAction(HttpServletRequest request, Long userId, TimePeriodEnum timeFilter, List actionContext) { + + /** This code is responsible for creating user action logs for the "get user action" operation. **/ + loggingUtil.logUserAction(UserActionRequest.builder().request(request).actionType(UserActionLogsEnum.VIEW) + .actionContext(UserActionContextEnum.GET_USER_ACTION).build()); + SummaryPageResponseBean userActionResponse= userActionService.getUserAction(request,userId,timeFilter,actionContext); + return ResponseEntity.status(HttpStatus.OK) + .body(new Response<>(userActionResponse, Status.SUCCESS, Translator.toLocale(GepafinConstant.USER_ACTION_FETCHED_SUCCESSFULLY))); + } + + @Override + public ResponseEntity>> getActionContextLabels(HttpServletRequest request, Long userId) { + + /** This code is responsible for creating user action logs for the "get user action context labels" operation. **/ + loggingUtil.logUserAction(UserActionRequest.builder().request(request).actionType(UserActionLogsEnum.VIEW) + .actionContext(UserActionContextEnum.GET_ACTION_CONTEXT_LABELS).build()); + + List actionContextResponse= userActionService.getActionContextLabels(request,userId); + return ResponseEntity.status(HttpStatus.OK) + .body(new Response<>(actionContextResponse, Status.SUCCESS, Translator.toLocale(GepafinConstant.ACTION_CONTEXT_LABELS_FETCHED_SUCCESSFULLY))); + } +} + diff --git a/src/main/resources/db/changelog/db.changelog-1.0.0.xml b/src/main/resources/db/changelog/db.changelog-1.0.0.xml index 25ff1bf2..d8c7dbea 100644 --- a/src/main/resources/db/changelog/db.changelog-1.0.0.xml +++ b/src/main/resources/db/changelog/db.changelog-1.0.0.xml @@ -2152,6 +2152,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/db/dump/insert_action_context_data_09_01_2025.sql b/src/main/resources/db/dump/insert_action_context_data_09_01_2025.sql new file mode 100644 index 00000000..9a159e8f --- /dev/null +++ b/src/main/resources/db/dump/insert_action_context_data_09_01_2025.sql @@ -0,0 +1,248 @@ +INSERT INTO role_action_context (action_context, role_id, is_deleted, is_viewed, description ,created_date, updated_date) VALUES +('CREATE_CALL_STEP_1', 2, false, true,'Create Call Step 1', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_CALL_STEP_1', 2, false, true, 'Update Call Step 1','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('CREATE_UPDATE_CALL_STEP_2', 2, false, true, 'Create Update Call Step 2','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('VALIDATE_CALL', 2, false, true,'Convalida Chiamata','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_CALL_STATUS', 2, false, true, 'Aggiorna Stato Chiama','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_CALL', 1, false, true, 'Ottieni Chiama','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_CALL', 2, false, true, 'Ottieni Chiama','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DOWNLOAD_CALL_DOCUMENT', 2 ,false, true, 'Scarica Documento Chiama','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DOWNLOAD_CALL_DOCUMENT', 1 ,false, true,'Scarica Documento Chiama', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DOWNLOAD_CALL_DOCUMENT', 3,false, true,'Scarica Documento Chiama', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DOWNLOAD_CALL_DOCUMENT', 5 , false, true,'Scarica Documento Chiama', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + +('CREATE_USER', 1, false, true, 'Crea Utente','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('CREATE_USER', 2, false, true, 'Crea Utente','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('USER_LOGIN', 1, false, true, 'Accesso Utente','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('USER_LOGIN', 2, false, true, 'Accesso Utente','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('USER_LOGIN', 3, false, true, 'Accesso Utente','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('USER_LOGIN', 5, false, true, 'Accesso Utente','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('LOGOUT_USER', 1, false, true,'Logout Utente', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('LOGOUT_USER', 2, false, true,'Logout Utente', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('LOGOUT_USER', 3, false, true,'Logout Utente', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('LOGOUT_USER', 5, false, true,'Logout Utente', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_USER', 2, false, true, 'Ottieni Utente','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_USER_DETAILS', 2, false, true, 'Aggiorna Dettagli Utente','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_USER_DETAILS', 1, false, true, 'Aggiorna Dettagli Utente','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_USER_DETAILS', 3, false, true, 'Aggiorna Dettagli Utente','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_USER_DETAILS', 5, false, true,'Aggiorna Dettagli Utente', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_USER', 2, false, true, 'Elimina Utente','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + +('VALIDATE_NEW_USER_WITH_SPID_TOKEN', 1, false, true, 'Valida Nuovo Utente Con Token SPID', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('VALIDATE_EXISTING_USER_WITH_SPID_TOKEN', 1, false, true, 'Valida Utente Esistente Con Token SPID', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_VALID_USER_DETAILS', 1, false, true, 'Ottieni Dettagli Utente Valido', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_VALID_USER_DETAILS', 2, false, true, 'Ottieni Dettagli Utente Valido', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_ALL_USERS_BY_ROLE', 2, false, true, 'Ottieni Tutti Gli Utenti Per Ruolo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_ALL_USERS_BY_ROLE', 5, false, true, 'Ottieni Tutti Gli Utenti Per Ruolo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + +('GET_APPLICATION', 2, false, true, 'Ottieni Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_APPLICATION', 1, false, true, 'Ottieni Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_APPLICATION', 3, false, true, 'Ottieni Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_APPLICATION', 5, false, true, 'Ottieni Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('CREATE_UPDATE_APPLICATION_FORM', 1, false, true, 'Crea/Aggiorna Form Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('CREATE_UPDATE_APPLICATION_FORM', 2, false, true, 'Crea/Aggiorna Form Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('CREATE_APPLICATION', 1, false, true, 'Crea Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('CREATE_APPLICATION', 2, false, true, 'Crea Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_APPLICATION', 1, false, true, 'Elimina Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_APPLICATION', 2, false, true, 'Elimina Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_ALL_APPLICATION', 1, false, true, 'Ottieni Tutte Le Applicazioni', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_ALL_APPLICATION', 2, false, true, 'Ottieni Tutte Le Applicazioni', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + +('UPDATE_APPLICATION_STATUS', 2, false, true, 'Aggiorna Stato Dell Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('VALIDATE_APPLICATION', 2, false, true, 'Valida Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPLOAD_SIGNED_DOCUMENT', 2, false, true, 'Carica Documento Firmato', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DOWNLOAD_PDF', 2, false, true, 'Scarica PDF', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_SIGNED_DOCUMENT', 2, false, true, 'Ottieni Documento Firmato', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_NEXT_PREVIOUS_FORM', 2, false, true, 'Ottieni Form Successivo/Precedente', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DOWNLOAD_APPLICATION_DOC_ZIP', 2, false, true, 'Scarica Documenti Dell Applicazione In ZIP', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + + +('UPDATE_APPLICATION_STATUS', 1, false, true, 'Aggiorna Stato Dell Applicazione','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('VALIDATE_APPLICATION', 1, false, true,'Valida Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPLOAD_SIGNED_DOCUMENT', 1, false, true, 'Carica Documento Firmato', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DOWNLOAD_PDF', 1, false, true, 'Scarica PDF', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_SIGNED_DOCUMENT', 1, false, true, 'Ottieni Documento Firmato', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_NEXT_PREVIOUS_FORM', 1, false, true, 'Ottieni Form Successivo/Precedente', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DOWNLOAD_APPLICATION_DOC_ZIP', 1, false, true, 'Scarica Documenti Dell Applicazione In ZIP', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + +('CREATE_FAQ', 2, false, true, 'Crea Faq', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_FAQ', 2, false, true, 'Ottieni Faq', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_FAQ_DETAILS', 2, false, true, 'Aggiorna Dettagli Faq', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_FAQ', 2, false, true, 'Elimina Faq', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + +('CREATE_FAQ', 1, false, true, 'Crea Faq', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_FAQ', 1, false, true, 'Ottieni Faq', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_FAQ_DETAILS', 1, false, true, 'Aggiorna Dettagli Faq', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_FAQ', 1, false, true, 'Elimina Faq', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + +('CREATE_COMPANY', 1, false, true, 'Crea Azienda', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_COMPANY', 1, false, true, 'Ottieni Azienda', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_COMPANY', 2, false, true, 'Ottieni Azienda', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_COMPANY', 5, false, true, 'Ottieni Azienda', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_COMPANY', 3, false, true, 'Ottieni Azienda', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_COMPANY', 1, false, true, 'Aggiorna Azienda', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_COMPANY', 2, false, true, 'Elimina Azienda', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_COMPANY', 1, false, true, 'Elimina Azienda', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPLOAD_COMPANY_DELEGATION', 1, false, true, 'Carica Delega Aziendale', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DOWNLOAD_COMPANY_DELEGATION_TEMPLATE', 1, false, true, 'Scarica Modello Delega Aziendale', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_COMPANY_DELEGATION', 1, false, true, 'Ottieni Delega Aziendale', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_COMPANY_DELEGATION', 2, false, true, 'Ottieni Delega Aziendale', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_COMPANY_DELEGATION', 3, false, true, 'Ottieni Delega Aziendale', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_COMPANY_DELEGATION', 5, false, true, 'Ottieni Delega Aziendale', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_COMPANY_DELEGATION', 1, false, true, 'Elimina Delega Aziendale', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('CHECK_COMPANY_VAT_NUMBER', 1, false, true, 'Verifica Partita Iva Aziendale', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('CHECK_COMPANY_VAT_NUMBER', 2, false, true, 'Verifica Partita Iva Aziendale', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_COMPANY_BY_USER', 2, false, true, 'Ottieni Azienda Per Utente', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_COMPANY_BY_USER', 1, false, true, 'Ottieni Azienda Per Utente', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('REMOVE_COMPANY_FROM_USER', 2, false, true, 'Rimuovi Azienda Da Utente', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + + +('CREATE_LOOKUP_DATA', 2, false, true, 'Crea Dati Di Riferimento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_LOOKUP_DATA', 2, false, true, 'Elimina Dati Di Riferimento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_LOOKUP_DATA', 2, false, true, 'Aggiorna Dati Di Riferimento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_LOOKUP_DATA', 2, false, true, 'Ottieni Dati Di Riferimento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_LOOKUP_DATA', 3, false, true, 'Ottieni Dati Di Riferimento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_LOOKUP_DATA', 5, false, true, 'Ottieni Dati Di Riferimento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_LOOKUP_DATA_BY_TYPE', 2, false, true, 'Ottieni Dati Di Riferimento Per Tipo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_LOOKUP_DATA_BY_TYPE', 3, false, true, 'Ottieni Dati Di Riferimento Per Tipo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_LOOKUP_DATA_BY_TYPE', 5, false, true, 'Ottieni Dati Di Riferimento Per Tipo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + +('CREATE_HUB', 2, false, true, 'Crea Hub', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_HUB', 2, false, true, 'Ottieni Hub', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_HUB', 2, false, true, 'Elimina Hub', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_HUB', 2, false, true, 'Aggiorna Hub', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_ALL_HUB', 2, false, true, 'Ottieni Tutti Gli Hub', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_HUB_BY_UUID', 2, false, true, 'Ottieni Hub Per UUID', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + +('CREATE_AMENDMENT', 3, false, true, 'Crea Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('CREATE_AMENDMENT', 5, false, true, 'Crea Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_AMENDMENT', 3, false, true, 'Ottieni Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_AMENDMENT', 5, false, true, 'Ottieni Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('CLOSE_AMENDMENT', 3, false, true, 'Chiudi Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('CLOSE_AMENDMENT', 5, false, true, 'Chiudi Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_AMENDMENT', 3, false, true, 'Aggiorna Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_AMENDMENT', 5, false, true, 'Aggiorna Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_AMENDMENT', 3, false, true, 'Elimina Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_AMENDMENT', 5, false, true, 'Elimina Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_AMENDMENT_STATUS', 3, false, true, 'Aggiorna Stato Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_AMENDMENT_STATUS', 5, false, true, 'Aggiorna Stato Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_ALL_AMENDMENT_BY_PREINSTRUCTOR_USER_ID', 3, false, true, 'Ottieni Tutte Le Modifiche Per ID Utente Preistruttore', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_ALL_AMENDMENT_BY_PREINSTRUCTOR_USER_ID', 5, false, true, 'Ottieni Tutte Le Modifiche Per ID Utente Preistruttore', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_ALL_AMENDMENT_BY_BENEFICIARY_USER_ID', 1, false, true, 'Ottieni Tutte Le Modifiche Per ID Utente Beneficiario', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_AMENDMENT_BY_APPLICATION_ID', 3, false, true, 'Ottieni Modifica Per ID Domanda', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_AMENDMENT_BY_APPLICATION_ID', 5, false, true, 'Ottieni Modifica Per ID Domanda', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('EXTEND_RESPONSE_DAYS_FOR_AMENDMENT', 3, false, true, 'Estendi Giorni Risposta Per Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('EXTEND_RESPONSE_DAYS_FOR_AMENDMENT', 5, false, true, 'Estendi Giorni Risposta Per Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_APPLICATION_DATA_FOR_AMENDMENT', 3, false, true, 'Ottieni Dati Domanda Per Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_APPLICATION_DATA_FOR_AMENDMENT', 5, false, true, 'Ottieni Dati Domanda Per Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + + +('CREATE_UPDATE_APPLICATION_EVALUATION', 3, false, true, 'Crea/Aggiorna Valutazione Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('CREATE_UPDATE_APPLICATION_EVALUATION', 5, false, true, 'Crea/Aggiorna Valutazione Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_APPLICATION_EVALUATION', 3, false, true, 'Ottieni Valutazione Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_APPLICATION_EVALUATION', 5, false, true, 'Ottieni Valutazione Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_APPLICATION_EVALUATION', 3, false, true, 'Elimina Valutazione Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_APPLICATION_EVALUATION', 5, false, true, 'Elimina Valutazione Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + + +('CREATE_BENEFICIARY_PREFERRED_CALL', 2, false, true, 'Crea Chiamata Preferita Beneficiario', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('CREATE_BENEFICIARY_PREFERRED_CALL', 1, false, true, 'Crea Chiamata Preferita Beneficiario', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_BENEFICIARY_PREFERRED_CALL', 2, false, true, 'Elimina Chiamata Preferita Beneficiario', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_BENEFICIARY_PREFERRED_CALL', 1, false, true, 'Elimina Chiamata Preferita Beneficiario', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_BENEFICIARY_PREFERRED_CALL', 1, false, true, 'Ottieni Chiamata Preferita Beneficiario', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_BENEFICIARY_PREFERRED_CALL', 2, false, true, 'Ottieni Chiamata Preferita Beneficiario', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_BENEFICIARY_PREFERRED_CALL', 2, false, true, 'Aggiorna Chiamata Preferita Beneficiario', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_BENEFICIARY_PREFERRED_CALL', 1, false, true, 'Aggiorna Chiamata Preferita Beneficiario', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + +('CREATE_ASSIGNED_APPLICATION', 2, false, true, 'Crea Applicazione Assegnata', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('CREATE_ASSIGNED_APPLICATION', 5, false, true, 'Crea Applicazione Assegnata', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_ASSIGNED_APPLICATION', 2, false, true, 'Elimina Applicazione Assegnata', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_ASSIGNED_APPLICATION', 5, false, true, 'Elimina Applicazione Assegnata', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_ASSIGNED_APPLICATION', 2, false, true, 'Ottieni Applicazione Assegnata', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_ASSIGNED_APPLICATION', 3, false, true, 'Ottieni Applicazione Assegnata', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_ASSIGNED_APPLICATION', 5, false, true, 'Ottieni Applicazione Assegnata', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_ASSIGNED_APPLICATION_DETAILS', 2, false, true, 'Aggiorna Dettagli Applicazione Assegnata', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_ASSIGNED_APPLICATION_DETAILS', 5, false, true, 'Aggiorna Dettagli Applicazione Assegnata', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + +('CREATE_FORM_FIELD', 2, false, true, 'Crea Campo Modulo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_FORM_FIELD', 2, false, true, 'Aggiorna Campo Modulo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_FORM_FIELD', 2, false, true, 'Ottieni Campo Modulo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_FORM_FIELD', 2, false, true, 'Elimina Campo Modulo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + +('UPLOAD_CALL_DOCUMENT', 2, false, true, 'Carica Documento Chiamata', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPLOAD_CALL_IMAGES', 2, false, true, 'Carica Immagini Chiamata', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPLOAD_APPLICATION_DOCUMENT', 1, false, true, 'Carica Documento Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPLOAD_APPLICATION_IMAGES', 1, false, true, 'Carica Immagini Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_DOCUMENT', 2, false, true, 'Elimina Documento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_DOCUMENT', 1, false, true, 'Elimina Documento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_DOCUMENT', 3, false, true, 'Elimina Documento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_DOCUMENT', 5, false, true, 'Elimina Documento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_DOCUMENT', 2, false, true, 'Aggiorna Documento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_DOCUMENT', 1, false, true, 'Aggiorna Documento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_DOCUMENT', 3, false, true, 'Aggiorna Documento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_DOCUMENT', 5, false, true, 'Aggiorna Documento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_IMAGES', 2, false, true, 'Aggiorna Immagini', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_IMAGES', 1, false, true, 'Aggiorna Immagini', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_IMAGES', 3, false, true, 'Aggiorna Immagini', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_IMAGES', 5, false, true, 'Aggiorna Immagini', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_DOCUMENT', 2, false, true, 'Ottieni Documento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_DOCUMENT', 1, false, true, 'Ottieni Documento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_DOCUMENT', 3, false, true, 'Ottieni Documento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_DOCUMENT', 5, false, true, 'Ottieni Documento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + +('UPLOAD_AMENDMENT_DOCUMENT', 3, false, true, 'Carica Documento Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPLOAD_AMENDMENT_DOCUMENT', 5, false, true, 'Carica Documento Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPLOAD_AMENDMENT_IMAGES', 3, false, true, 'Carica Immagini Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPLOAD_AMENDMENT_IMAGES', 5, false, true, 'Carica Immagini Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPLOAD_EVALUATION_DOCUMENT', 3, false, true, 'Carica Documento Valutazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPLOAD_EVALUATION_DOCUMENT', 5, false, true, 'Carica Documento Valutazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPLOAD_EVALUATION_IMAGES', 3, false, true, 'Carica Immagini Valutazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPLOAD_EVALUATION_IMAGES', 5, false, true, 'Carica Immagini Valutazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + +('CREATE_UPDATE_FLOW', 2, false, true, 'Crea/Aggiorna Flusso', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_FLOW', 2, false, true, 'Ottieni Flusso', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + +('GET_LOGIN_ATTEMPT_LIST', 2, false, true, 'Ottieni Lista Tentativi Accesso', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('ADD_LOGIN_ATTEMPT', 2, false, true, 'Aggiungi Tentativo Accesso', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + +('GET_DASHBOARD_WIDGET_FOR_SUPER_ADMIN', 2, false, true, 'Ottenere Widget Cruscotto Per Super Admin', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_DASHBOARD_WIDGET_FOR_BENEFICIARY', 1, false, true, 'Ottenere Widget Cruscotto Per Beneficiario', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + +('GET_EVALUATION_CRITERIA', 2, false, true, 'Ottenere Criteri Di Valutazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_EVALUATION_CRITERIA', 2, false, true, 'Aggiornare Criteri Di Valutazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_EVALUATION_CRITERIA', 2, false, true, 'Eliminare Criteri Di Valutazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('CREATE_EVALUATION_CRITERIA', 2, false, true, 'Creare Criteri Di Valutazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPLOAD_EVALUATION_DOC', 3, false, true, 'Carica Documento Valutazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPLOAD_EVALUATION_DOC', 5, false, true, 'Carica Documento Valutazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + +('ADD_COMMENT_TO_AMENDMENT_REQUEST', 3, false, true, 'Aggiungi Commento Alla Richiesta Di Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('ADD_COMMENT_TO_AMENDMENT_REQUEST', 5, false, true, 'Aggiungi Commento Alla Richiesta Di Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_COMMUNICATION_COMMENT', 3, false, true, 'Aggiornare Commento Comunicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_COMMUNICATION_COMMENT', 5, false, true, 'Aggiornare Commento Comunicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_AMENDMENT_COMMENT', 3, false, true, 'Ottenere Commento Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_AMENDMENT_COMMENT', 5, false, true, 'Ottenere Commento Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_COMMENT_FROM_AMENDMENT', 3, false, true, 'Eliminare Commento Dalla Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_COMMENT_FROM_AMENDMENT', 5, false, true, 'Eliminare Commento Dalla Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + +('CREATE_FORM', 2, false, true, 'Creare Modulo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPDATE_FORM', 2, false, true, 'Aggiornare Modulo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_FORM', 2, false, true, 'Ottenere Modulo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('DELETE_FORM', 2, false, true, 'Eliminare Modulo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + +('AMENDMENT_EXPIRATION_SCHEDULER', 2, false, true, 'Pianificatore Scadenza Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('EVALUATION_EXPIRATION_SCHEDULER', 2, false, true, 'Pianificatore Scadenza Valutazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + +('CHECK_OR_CREATE_NDG_CODE', 2, false, true, 'Verificare O Creare Codice NDG', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('CREATE_APPOINTMENT', 2, false, true, 'Creare Appuntamento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('UPLOAD_DOCUMENT_TO_EXTERNAL_SYSTEM', 2, false, true, 'Carica Documento Nel Sistema Esterno', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), + +('GET_USER_ACTION', 2, false, true, 'Ottenere Azione Utente', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'), +('GET_ACTION_CONTEXT_LABELS', 2, false, true, 'Ottieni Etichette Contesto Azione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'); + + + + + + + + diff --git a/src/main/resources/message_en.properties b/src/main/resources/message_en.properties index c743b3fa..a92a61ad 100644 --- a/src/main/resources/message_en.properties +++ b/src/main/resources/message_en.properties @@ -346,4 +346,7 @@ notification.sent.successfully=Notification sent successfully. notification.deleted.successfully=Notification deleted successfully. notification.updated.successfully=Notification updated successfully. user.with.company.not.found = User with company not found for user or company. + +user.action.fetched.successfully = User action details fetched successfully. +action.context.labels.fetched.successfully = Action Context Labels Fetched Successfully. amount.accepted.required=Amount accepted is required while approving the application. diff --git a/src/main/resources/message_it.properties b/src/main/resources/message_it.properties index 14a5dbb5..e7dbc010 100644 --- a/src/main/resources/message_it.properties +++ b/src/main/resources/message_it.properties @@ -338,4 +338,7 @@ notification.sent.successfully=Notifica inviata con successo. notification.deleted.successfully=Notifica eliminata con successo. notification.updated.successfully=Notifica aggiornata con successo. user.with.company.not.found = Utente con azienda non trovato per utente o azienda. -amount.accepted.required=L'importo accettato è obbligatorio durante l'approvazione della domanda. + +user.action.fetched.successfully = Dettagli sull'azione dell'utente recuperati correttamente. +action.context.labels.fetched.successfully = Etichette del contesto dell'azione recuperate correttamente. +amount.accepted.required=L'importo accettato � obbligatorio durante l'approvazione della domanda.