Skip to content

Commit

Permalink
fix(bff): harmonize missionId type #181
Browse files Browse the repository at this point in the history
  • Loading branch information
lwih committed Jun 5, 2024
1 parent f99a0d5 commit fe27d90
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 27 deletions.
38 changes: 19 additions & 19 deletions backend/src/main/resources/graphql/action.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type Action {

input ActionStatusInput {
id: String
missionId: Int!
missionId: ID!
startDateTimeUtc: String
status: ActionStatusType!
reason: ActionStatusReason
Expand All @@ -51,7 +51,7 @@ input ActionStatusInput {

input ActionControlInput {
id: String
missionId: Int!
missionId: ID!
startDateTimeUtc: String
endDateTimeUtc: String
controlMethod: ControlMethod!
Expand All @@ -66,14 +66,14 @@ input ActionControlInput {

input ActionFreeNoteInput {
id: String
missionId: Int!
missionId: ID!
startDateTimeUtc: String!
observations: String
}

input ActionRescueInput {
id: String
missionId: Int!
missionId: ID!
startDateTimeUtc: String!
endDateTimeUtc: String
longitude: Float
Expand All @@ -95,23 +95,23 @@ input ActionRescueInput {

input ActionNauticalEventInput {
id: String
missionId: Int!
missionId: ID!
startDateTimeUtc: String!
endDateTimeUtc: String
observations: String
}

input ActionVigimerInput {
id: String
missionId: Int!
missionId: ID!
startDateTimeUtc: String!
endDateTimeUtc: String
observations: String
}

input ActionAntiPollutionInput {
id: String
missionId: Int!
missionId: ID!
startDateTimeUtc: String!
endDateTimeUtc: String
observations: String
Expand All @@ -124,31 +124,31 @@ input ActionAntiPollutionInput {

input ActionBAAEMPermanenceInput {
id: String
missionId: Int!
missionId: ID!
startDateTimeUtc: String!
endDateTimeUtc: String
observations: String
}

input ActionPublicOrderInput {
id: String
missionId: Int!
missionId: ID!
startDateTimeUtc: String!
endDateTimeUtc: String
observations: String
}

input ActionRepresentationInput {
id: String
missionId: Int!
missionId: ID!
startDateTimeUtc: String!
endDateTimeUtc: String
observations: String
}

input ActionIllegalImmigrationInput {
id: String
missionId: Int!
missionId: ID!
startDateTimeUtc: String!
endDateTimeUtc: String
observations: String
Expand Down Expand Up @@ -198,7 +198,7 @@ type NavActionFreeNote {

type NavActionRescue {
id: String!
missionId: String
missionId: ID
startDateTimeUtc: String!
endDateTimeUtc: String
longitude: Float
Expand All @@ -221,23 +221,23 @@ type NavActionRescue {

type NavActionNauticalEvent {
id: String!
missionId: String!
missionId: ID!
startDateTimeUtc: String!
endDateTimeUtc: String
observations: String
}

type NavActionVigimer {
id: String!
missionId: String!
missionId: ID!
startDateTimeUtc: String!
endDateTimeUtc: String
observations: String
}

type NavActionAntiPollution {
id: String!
missionId: String!
missionId: ID!
startDateTimeUtc: String!
endDateTimeUtc: String
observations: String
Expand All @@ -250,31 +250,31 @@ type NavActionAntiPollution {

type NavActionBAAEMPermanence {
id: String!
missionId: String!
missionId: ID!
startDateTimeUtc: String!
endDateTimeUtc: String
observations: String
}

type NavActionPublicOrder {
id: String!
missionId: String!
missionId: ID!
startDateTimeUtc: String!
endDateTimeUtc: String
observations: String
}

type NavActionRepresentation {
id: String!
missionId: String!
missionId: ID!
startDateTimeUtc: String!
endDateTimeUtc: String
observations: String
}

type NavActionIllegalImmigration {
id: String!
missionId: String!
missionId: ID!
startDateTimeUtc: String!
endDateTimeUtc: String
observations: String
Expand Down
4 changes: 2 additions & 2 deletions backend/src/main/resources/graphql/controls.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ type ControlGensDeMer {

input ControlNavigationInput {
id: String
missionId: String!
missionId: ID!
actionControlId: String!
amountOfControls: Int!
unitShouldConfirm: Boolean
Expand All @@ -83,7 +83,7 @@ input ControlNavigationInput {

input ControlSecurityInput {
id: String
missionId: String!
missionId: ID!
actionControlId: String!
amountOfControls: Int!
unitShouldConfirm: Boolean
Expand Down
2 changes: 1 addition & 1 deletion backend/src/main/resources/graphql/crew.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type MissionCrew {
input MissionCrewInput {
id: ID
agent: AgentInput
missionId: Int!
missionId: ID!
comment: String
role: AgentRoleInput
}
Expand Down
4 changes: 2 additions & 2 deletions backend/src/main/resources/graphql/infraction.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ enum FishInfractionType {

input InfractionInput {
id: String
missionId: String!
missionId: ID!
actionId: String!
controlId: String
controlType: String!
Expand All @@ -71,7 +71,7 @@ input InfractionInput {

input InfractionWithNewTargetInput {
id: String
missionId: String!
missionId: ID!
actionId: String!
controlId: String
controlType: String!
Expand Down
2 changes: 1 addition & 1 deletion backend/src/main/resources/graphql/mission.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ type MissionGeneralInfo {

input MissionGeneralInfoInput {
id: String
missionId: String!
missionId: ID!
distanceInNauticalMiles: Float
consumedGOInLiters: Float
consumedFuelInLiters: Float
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pam/mission/crew/mission-crew.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const MissionCrew: React.FC<MissionCrewProps> = () => {

const handleSubmitForm = async (data: AddOrUpdateMissionCrewInput) => {
if (!missionId) return
const crew = { ...data, missionId: Number(missionId) }
const crew = { ...data, missionId: missionId }
await addOrUpdateCrew({ variables: { crew } })
setOpenCrewForm(false)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const MissionDistanceAndConsumption: React.FC<MissionDistanceAndConsumptionProps
const [mutate] = useAddOrUpdateDistanceConsumption()

const onChange = async (field: string, value?: number) => {
const updatedValue = value !== undefined && value !== null ? value?.toString() : undefined
const updatedValue = value !== undefined && value !== null ? value : undefined
setFormData({
...formData,
[field]: updatedValue
Expand Down

0 comments on commit fe27d90

Please sign in to comment.