Commit 3d27d11d authored by Passam KASSEM's avatar Passam KASSEM Committed by Ro3034
Browse files

[VAS] 8331 : Retours PR

parent 8b3c0feb
......@@ -106,7 +106,7 @@ public class AccessionRegisterDetailInternalService {
//Fetching data from vitam
AccessionRegisterDetailResponseDto results = fetchingAllPaginatedDataFromVitam(vitamContext, query);
LOGGER.info("Fetched accession register data : {} ", results);
LOGGER.debug("Fetched accession register data : {} ", results);
//Fetch agencies to complete return Dto 'originatingAgencyLabel' property
Map<String, String> agenciesMap = findAgencies(vitamContext, results);
......@@ -131,15 +131,17 @@ public class AccessionRegisterDetailInternalService {
JsonNode query;
try {
Map<String, Object> vitamCriteria = new HashMap<>();
LOGGER.info("List of Accession Registers EvIdAppSession : {} ", vitamContext.getApplicationSessionId());
LOGGER.debug("List of Accession Registers EvIdAppSession : {} ", vitamContext.getApplicationSessionId());
if (criteria.isPresent()) {
vitamCriteria = objectMapper.readValue(criteria.get(), new TypeReference<HashMap<String, Object>>() {});
}
query = VitamQueryHelper.createQueryDSL(vitamCriteria, pageNumber, size, orderBy, direction);
LOGGER.info("jsonQuery: {}", query);
LOGGER.debug("jsonQuery: {}", query);
} catch (InvalidParseOperationException | InvalidCreateOperationException ioe) {
LOGGER.error("Can't create dsl query to get paginated accession registers : {}", ioe);
throw new InternalServerException("Can't create dsl query to get paginated accession registers", ioe);
} catch (IOException e) {
LOGGER.error("Can't read value from criteria entries : {}", e);
throw new InternalServerException("Can't read value from criteria entries", e);
}
return query;
......@@ -151,8 +153,10 @@ public class AccessionRegisterDetailInternalService {
RequestResponse<AccessionRegisterDetailModel> accessionRegisterDetails = adminExternalClient.findAccessionRegisterDetails(vitamContext, query);
results = objectMapper.treeToValue(accessionRegisterDetails.toJsonNode(), AccessionRegisterDetailResponseDto.class);
} catch (VitamClientException e) {
LOGGER.error("Can't fetch data from VITAM : {}", e);
throw new InternalServerException("Can't fetch data from VITAM", e);
} catch (JsonProcessingException e) {
LOGGER.error("Can't process Json Parsing : {}", e);
throw new InternalServerException("Can't process Json Parsing", e);
}
return results;
......@@ -167,10 +171,13 @@ public class AccessionRegisterDetailInternalService {
RequestResponse<AgenciesModel> requestResponse = agencyService.findAgencies(vitamContext, originatingAgencyQuery);
agencies = objectMapper.treeToValue(requestResponse.toJsonNode(), AgencyResponseDto.class).getResults();
} catch (JsonProcessingException e) {
LOGGER.error("Error parsing query : {}", e);
throw new InternalServerException("Error parsing query", e);
} catch (VitamClientException e) {
LOGGER.error("Error fetching agencies from vitam : {}", e);
throw new InternalServerException("Error fetching agencies from vitam", e);
} catch (InvalidCreateOperationException e) {
LOGGER.error("Invalid Select vitam query : {}", e);
throw new InternalServerException("Invalid Select vitam query", e);
}
......
......@@ -123,12 +123,13 @@ public class AccessionRegisterSummaryInternalService {
public List<AccessionRegisterSummaryDto> getAll(VitamContext context) {
RequestResponse<AccessionRegisterSummaryModel> requestResponse;
try {
LOGGER.info("List of Accession Register EvIdAppSession : {} " , context.getApplicationSessionId());
LOGGER.debug("List of Accession Register EvIdAppSession : {} " , context.getApplicationSessionId());
requestResponse = accessionRegisterService.findAccessionRegisterSummary(context);
final AccessionRegisterSummaryResponseDto accessionRegisterSymbolicResponseDto = objectMapper
.treeToValue(requestResponse.toJsonNode(), AccessionRegisterSummaryResponseDto.class);
return AccessionRegisterSummaryConverter.convertVitamsToDtos(accessionRegisterSymbolicResponseDto.getResults());
} catch (JsonProcessingException | VitamClientException e) {
LOGGER.error("Error when getting Accession Register summaries : {} " , e);
throw new InternalServerException("Unable to find accessionRegisterSymbolic", e);
}
}
......@@ -139,7 +140,8 @@ public class AccessionRegisterSummaryInternalService {
getCustomAccessionRegisterSummaries(vitamContext, detailsSearchDto);
if(customAccessionRegisterSummaries == null) {
throw new InternalServerException("Unable to find accessionRegister Summaries");
LOGGER.debug("Unable to find accessionRegister Summaries stats");
throw new InternalServerException("Unable to find accessionRegister Summaries stats");
}
long totalUnits = customAccessionRegisterSummaries.stream().parallel()
......@@ -192,6 +194,7 @@ public class AccessionRegisterSummaryInternalService {
return AccessionRegisterSummaryConverter.convertVitamsToDtos(accessionRegisterSummaryResponseDto.getResults());
} catch (JsonProcessingException | VitamClientException | InvalidCreateOperationException | ParseException e) {
LOGGER.error("Unable to find accessionRegister Summaries : {} " , e);
throw new InternalServerException("Unable to find accessionRegister Summaries", e);
}
}
......@@ -301,7 +304,7 @@ public class AccessionRegisterSummaryInternalService {
try {
select.setProjection(JsonHandler.toJsonNode(queryProjection));
} catch (InvalidParseOperationException e) {
LOGGER.info("Error constructing vitam query");
LOGGER.error("Error constructing vitam query");
throw new InvalidCreateOperationException("Error constructing vitam query", e);
}
return select.getFinalSelect();
......
......@@ -51,7 +51,6 @@ import { ConfirmDialogModule } from './components/confirm-dialog/confirm-dialog.
import { CustomerSelectContentModule } from './components/customer-select-content/customer-select-content.module';
import { DownloadSnackBarModule } from './components/download-snack-bar/download-snack-bar.module';
import { EditableFieldModule } from './components/editable-field/editable-field.module';
// import { LevelInputModule } from './components/editable-field/level-input/level-input.module';
import { FooterModule } from './components/footer/footer.module';
import { HeaderModule } from './components/header/header.module';
import { SelectLanguageModule } from './components/header/select-language/select-language.module';
......@@ -145,7 +144,6 @@ export function startupServiceFactory(startupService: StartupService) {
DragAndDropModule,
EditableFieldModule,
InfiniteScrollModule,
// LevelInputModule,
LogbookModule,
LoggerModule,
NavbarModule,
......@@ -202,7 +200,6 @@ export function startupServiceFactory(startupService: StartupService) {
DragAndDropModule,
EditableFieldModule,
InfiniteScrollModule,
// LevelInputModule,
LogbookModule,
LoggerModule,
NavbarModule,
......
......@@ -773,6 +773,9 @@ i.vitamui-icon {
.vitamui-icon-support-keys:before {
content: "\e91c";
}
.vitamui-icon-bin:before {
content: "\e9ac";
}
.vitamui-icon-cross:before {
content: "\ea0f";
}
......
......@@ -102,7 +102,6 @@ export class AccessionRegisterListComponent extends InfiniteScrollTable<Accessio
this.advancedSearchSub?.unsubscribe();
}
// Gestion de la recherche
searchRequest() {
const dateInterval: { endDateMin: string; endDateMax: string } = this.accessionRegistersService.getDateIntervalChanges().getValue();
const avancedSearchData: any = this.accessionRegistersService.getAdvancedSearchData().getValue();
......@@ -169,13 +168,11 @@ export class AccessionRegisterListComponent extends InfiniteScrollTable<Accessio
}
}
// Gestion du tri
emitOrderChange(event: string) {
this.orderChange.next(event);
this.accessionRegistersService.notifyOrderChange();
}
// Gestion des filtres
onFilterChange(key: string, values: any[]) {
this.filterMap[key] = values;
this.filterChange.next(this.filterMap);
......
......@@ -102,7 +102,7 @@
"ADVANCED_SEARCH_FILTERS_ACTIVATED": "Some advanced search filters are activated",
"LIST": {
"NB_ENTRIES": "{{nb}} entries",
"DATE": "Date",
"DATE": "Pick-up date",
"OPERATION_IDENTIFIER": "Operation identifier",
"ORIGINATING_AGENCY": "Originating Agency",
"ARCHIVAL_AGREEMENT": "Archival Agreement",
......
......@@ -102,7 +102,7 @@
"ADVANCED_SEARCH_FILTERS_ACTIVATED": "Des filtres de recherche avancée sont activées",
"LIST": {
"NB_ENTRIES": "{{nb}} entrées",
"DATE": "Date",
"DATE": "Date de prise en charge",
"OPERATION_IDENTIFIER": "Identifiant de l'entrée",
"ORIGINATING_AGENCY": "Service producteur",
"ARCHIVAL_AGREEMENT": "Contrat d'entrée",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment