Skip to content

Commit e2c341d

Browse files
committed
Fix imports
1 parent 80bcf37 commit e2c341d

File tree

21 files changed

+93
-82
lines changed

21 files changed

+93
-82
lines changed

frontend/.eslintrc.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ module.exports = {
126126
}
127127
},
128128
{
129-
files: ['src/domain/types/*.ts', 'src/domain/**/types.ts', 'src/domain/shared_slices/**/*.ts', 'src/**/slice.ts'],
129+
files: ['src/domain/schemas/*.ts', 'src/domain/**/schemas.ts', 'src/domain/shared_slices/**/*.ts', 'src/**/slice.ts'],
130130
plugins: ['no-null'],
131131
rules: {
132132
'no-param-reassign': 'off'

frontend/cypress/e2e/back_office/regulation_table/table.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ context('BackOffice > Regulation Table > Table', () => {
77
cy.wait(1000)
88
})
99

10-
it('regulatory zones are displayed by layer name and law types', () => {
10+
it('regulatory zones are displayed by layer name and law schemas', () => {
1111
cy.get('[data-cy="backoffice-search-regulation"]').type('dra')
1212
cy.get('[data-cy="Reg. NAMO"]').eq(0).click()
1313
cy.get('[data-cy="backoffice-search-regulation"]').type('{backspace}{backspace}{backspace}')

frontend/cypress/e2e/side_window/manual_prior_notification_form/form.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ context('Side Window > Manual Prior Notification Form > Form', () => {
276276
cy.contains('Créer le préavis').should('be.enabled')
277277
})
278278

279-
it('Should calculate and display manual prior notification fleet segments, risk factor & types', () => {
279+
it('Should calculate and display manual prior notification fleet segments, risk factor & schemas', () => {
280280
// -------------------------------------------------------------------------
281281
// Add
282282

@@ -402,7 +402,7 @@ context('Side Window > Manual Prior Notification Form > Form', () => {
402402
})
403403
})
404404

405-
it('Should only recalculate manual prior notification fleet segments, risk factor & types when necessary (creation)', () => {
405+
it('Should only recalculate manual prior notification fleet segments, risk factor & schemas when necessary (creation)', () => {
406406
cy.intercept('POST', '/bff/v1/prior_notifications/manual/compute').as('computePriorNotification')
407407
cy.resetCountRequestsByAlias('@computePriorNotification')
408408

@@ -446,7 +446,7 @@ context('Side Window > Manual Prior Notification Form > Form', () => {
446446
cy.countRequestsByAlias('@computePriorNotification', 1500).should('be.equal', 1)
447447
})
448448

449-
it('Should only recalculate manual prior notification fleet segments, risk factor & types when necessary (edition)', () => {
449+
it('Should only recalculate manual prior notification fleet segments, risk factor & schemas when necessary (edition)', () => {
450450
cy.intercept('POST', '/bff/v1/prior_notifications/manual/compute').as('computePriorNotification')
451451
cy.resetCountRequestsByAlias('@computePriorNotification')
452452

frontend/cypress/e2e/side_window/prior_notification_list/filter_bar.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ context('Side Window > Prior Notification List > VesselFilter Bar', () => {
227227
cy.get('.Table-SimpleTable tr').should('have.length.to.be.greaterThan', 0)
228228
})
229229

230-
it('Should filter prior notifications by types', () => {
230+
it('Should filter prior notifications by schemas', () => {
231231
openSideWindowPriorNotificationListAsSuperUser()
232232

233233
cy.intercept('GET', `${apiPathBase}*priorNotificationTypes=${encodeURI('Préavis type A,Préavis type C')}*`).as(

frontend/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/src/domain/entities/vessel/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// TODO This should be moved to `entities/vessel/mission.types.ts`
1+
// TODO This should be moved to `entities/vessel/mission.schemas.ts`
22

33
import type { VesselTrackDepth } from '../vesselTrackDepth'
44
import type { SelectableVesselTrackDepth } from '@features/Vessel/components/VesselSidebar/actions/TrackRequest/types'

frontend/src/domain/types/GeoJSON.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Typescript types for the GeoJSON RFC7946 specification. This is not fully RFC-compliant due to lack of support for
3-
* ranged number data types.
2+
* Typescript schemas for the GeoJSON RFC7946 specification. This is not fully RFC-compliant due to lack of support for
3+
* ranged number data schemas.
44
*
55
* See https://tools.ietf.org/html/rfc7946
66
*/
@@ -13,13 +13,13 @@ export declare namespace GeoJSON {
1313
export type GeometryType = Geometry['type']
1414

1515
/**
16-
* ...the term "GeoJSON types" refers to nine case-sensitive strings: "Feature", "FeatureCollection", and the
17-
* geometry types listed above.
16+
* ...the term "GeoJSON schemas" refers to nine case-sensitive strings: "Feature", "FeatureCollection", and the
17+
* geometry schemas listed above.
1818
*/
1919
export type GeoJson = Geometry | Feature | FeatureCollection
2020
export type GeoJsonType = GeoJson['type']
2121

22-
// types
22+
// schemas
2323

2424
/**
2525
* A position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and
@@ -34,7 +34,7 @@ export declare namespace GeoJSON {
3434
export type Record = { [key in string | number]: unknown }
3535

3636
/**
37-
* Properties inherit to all GeoJSON types
37+
* Properties inherit to all GeoJSON schemas
3838
*/
3939
export interface GeometryBase extends Record {
4040
/**
@@ -55,7 +55,7 @@ export declare namespace GeoJSON {
5555
*/
5656
}
5757

58-
// geometry types
58+
// geometry schemas
5959

6060
export interface Point extends GeometryBase {
6161
/**
@@ -132,7 +132,7 @@ export declare namespace GeoJSON {
132132
type: 'GeometryCollection'
133133
}
134134

135-
// GeoJSON types
135+
// GeoJSON schemas
136136

137137
export interface Feature<Properties extends Record = Record, Id = string | number> {
138138
/**

frontend/src/env.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// https://vitejs.dev/guide/env-and-mode#intellisense-for-typescript
2-
/// <reference types="vite/client" />
32

43
interface ImportMetaEnv {
54
readonly FRONTEND_GEOSERVER_LOCAL_URL: string

frontend/src/features/PriorNotification/priorNotificationApi.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type { ListFilter } from './components/PriorNotificationList/types'
1111
import type { Logbook } from '@features/Logbook/Logbook.types'
1212

1313
const COMPUTE_PRIOR_NOTIFICATION_ERROR_MESSAGE =
14-
"Nous n'avons pas pu calculer note de risque, segments ou types pour ce préavis."
14+
"Nous n'avons pas pu calculer note de risque, segments ou schemas pour ce préavis."
1515
const CREATE_PRIOR_NOTIFICATION_ERROR_MESSAGE = "Nous n'avons pas pu créé le préavis."
1616
const DELETE_PRIOR_NOTIFICATION_UPLOAD_ERROR_MESSAGE = "Nous n'avons pas pu supprimer ce document attaché."
1717
const GET_PRIOR_NOTIFICATION_UPLOADS_ERROR_MESSAGE =
@@ -21,7 +21,7 @@ const GET_PRIOR_NOTIFICATION_SENT_MESSAGES_ERROR_MESSAGE =
2121
const UPDATE_PRIOR_NOTIFICATION_ERROR_MESSAGE = "Nous n'avons pas pu modifier le préavis."
2222
const GET_PRIOR_NOTIFICATION_DETAIL_ERROR_MESSAGE = "Nous n'avons pas pu récupérer le préavis."
2323
const GET_PRIOR_NOTIFICATIONS_ERROR_MESSAGE = "Nous n'avons pas pu récupérer la liste des préavis."
24-
const GET_PRIOR_NOTIFICATION_TYPES_ERROR_MESSAGE = "Nous n'avons pas pu récupérer la liste des types de préavis."
24+
const GET_PRIOR_NOTIFICATION_TYPES_ERROR_MESSAGE = "Nous n'avons pas pu récupérer la liste des schemas de préavis."
2525
const GET_PRIOR_NOTIFICATION_PDF_ERROR_MESSAGE = "Nous n'avons pas pu récupérer le PDF du préavis."
2626
const VERIFY_AND_SEND_PRIOR_NOTIFICATION_ERROR_MESSAGE = "Nous n'avons pas pu vérifier et envoyer le préavis."
2727
const INVALIDATE_PRIOR_NOTIFICATION_ERROR_MESSAGE = "Nous n'avons pas pu invalider et envoyer le préavis."
@@ -139,7 +139,7 @@ export const priorNotificationApi = monitorfishApi.injectEndpoints({
139139

140140
getPriorNotificationTypes: builder.query<string[], void>({
141141
providesTags: () => [{ type: RtkCacheTagType.PriorNotificationTypes }],
142-
query: () => '/prior_notifications/types',
142+
query: () => '/prior_notifications/schemas',
143143
transformErrorResponse: response => new FrontendApiError(GET_PRIOR_NOTIFICATION_TYPES_ERROR_MESSAGE, response)
144144
}),
145145

frontend/src/features/Regulation/slice.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ const regulationSlice = createSlice({
392392
}
393393
},
394394

395-
// TODO Fix these types and find a cleaner way to achieve that. Proposal: pass a partial `RegulatoryZoneDraft` as param and use a "deepMerge" function.
395+
// TODO Fix these schemas and find a cleaner way to achieve that. Proposal: pass a partial `RegulatoryZoneDraft` as param and use a "deepMerge" function.
396396
updateProcessingRegulationByKeyAndSubKey(
397397
state,
398398
action: PayloadAction<{

0 commit comments

Comments
 (0)