Skip to content

Commit

Permalink
Merge pull request #576 from MTES-MCT/fix/ulam-update
Browse files Browse the repository at this point in the history
fix/ulam-update
  • Loading branch information
aleckvincent authored Mar 3, 2025
2 parents c3e3d46 + e6ce115 commit 594c7b5
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ variables:
value: "postgres:15.10-alpine"
description: "Image de la base de données"
PROJECT_VERSION:
value: "2.5.14"
value: "2.5.15"
description: "Version du projet à déployer"
SERVER_ENV_INT:
value: "int-rapportnav-appli01"
Expand Down
2 changes: 1 addition & 1 deletion backend/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.lang.System.getenv

group = "fr.gouv.dgampa"
version = "2.5.14"
version = "2.5.15"
description = "RapportNav"

val kotlinVersion by extra("1.9.24")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ object MissionByIdStubs {
startDateTimeUtc = ZonedDateTime.now(),
endDateTimeUtc = null,
openBy = "local-mock",
observationsCacem = "Je suis une fake observation wiremock"
observationsCacem = "Je suis une fake observation wiremock",
observationsByUnit = "Je suis une fake observation by units wiremock"
)

objectMapper.registerModule(JavaTimeModule())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ object MissionsStubs {
startDateTimeUtc = ZonedDateTime.now(),
endDateTimeUtc = null,
openBy = "local-mock",
observationsCacem = "Je suis une fake observation wiremock"
observationsCacem = "Je suis une fake observation wiremock",
observationsByUnit = "Je suis une fake observation by units wiremock"
)

val mission2 = MissionDataOutput(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ class APIEnvMissionRepositoryV2(

override fun update(mission: MissionEnvEntity): MissionEnvEntity? {
val url = "$host/api/v1/missions/${mission.id}";
logger.info("Sending PUT request for Env mission update URL: $url")
logger.info("Sending POST request for Env mission update URL: $url")
return try {

logger.info("Body request for Mission env update : ${gson.toJson(mission)}")

val request = HttpRequest
.newBuilder()
.uri(URI.create(url))
.method("PUT", HttpRequest.BodyPublishers.ofString(gson.toJson(mission)))
.method("POST", HttpRequest.BodyPublishers.ofString(gson.toJson(mission)))
.header("Content-Type", "application/json")
.build();

Expand All @@ -85,7 +85,7 @@ class APIEnvMissionRepositoryV2(
val body = response.body()
logger.info("Response received, Content: $body")

if (response.statusCode() == 400 || response.statusCode() == 500) {
if (response.statusCode() == 400 || response.statusCode() == 500 || response.statusCode() == 405) {
throw Exception("Error while updating mission from env, please check the logs")
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "frontend",
"version": "2.5.14",
"version": "2.5.15",
"private": true,
"type": "module",
"engines": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const MissionGeneralInformationInitialFormUlam: FC<MissionGeneralInformationInit
/>
<Stack.Item style={{ width: '100%', marginBottom: '1em' }}>
<FormikSelect
isLight
isLight={isCreation}
isRequired={true}
disabled={!isCreation}
name="missionReportType"
Expand All @@ -68,7 +68,7 @@ const MissionGeneralInformationInitialFormUlam: FC<MissionGeneralInformationInit
{values.missionReportType === MissionReportTypeEnum.EXTERNAL_REINFORCEMENT_TIME_REPORT && (
<Stack.Item style={{ width: '100%', marginBottom: '1em' }}>
<FormikSelect
isLight
isLight={isCreation}
label="Nature du renfort"
name="reinforcementType"
options={reinforcementTypeOptions}
Expand Down

0 comments on commit 594c7b5

Please sign in to comment.