diff --git a/packages/api/src/api/rest/administrations.queries.ts b/packages/api/src/api/rest/administrations.queries.ts index 1e7fcc4f881008e17af6960af7d74b15fcd2d2d5..1f1fa7a75a94fd93167dc462c920194cb4f3ca03 100644 --- a/packages/api/src/api/rest/administrations.queries.ts +++ b/packages/api/src/api/rest/administrations.queries.ts @@ -17,11 +17,10 @@ import { z } from 'zod' import { CaminoError } from 'camino-common/src/zod-tools' import { Effect, pipe } from 'effect' -export const getUtilisateursByAdministrationId = async (pool: Pool, administrationId: AdministrationId): Promise<AdminUserNotNull[]> => { - const result = await dbQueryAndValidate(getUtilisateursByAdministrationIdDb, { administrationId }, pool, getUtilisateursByAdministrationIdDbValidator) - - return result.map(a => ({ ...a, administrationId })) -} +export const getUtilisateursByAdministrationId = (pool: Pool, administrationId: AdministrationId): Effect.Effect<AdminUserNotNull[], CaminoError<EffectDbQueryAndValidateErrors>> => + effectDbQueryAndValidate(getUtilisateursByAdministrationIdDb, { administrationId }, pool, getUtilisateursByAdministrationIdDbValidator).pipe( + Effect.map(result => result.map(a => ({ ...a, administrationId }))) + ) const getUtilisateursByAdministrationIdDbValidator = adminUserNotNullValidator.omit({ administrationId: true }) @@ -43,9 +42,11 @@ where and keycloak_id is not null ` -export const getActiviteTypeEmailsByAdministrationId = async (pool: Pool, administrationId: AdministrationId): Promise<AdministrationActiviteTypeEmail[]> => { - return dbQueryAndValidate(getActiviteTypeEmailsByAdministrationIdDb, { administrationId }, pool, administrationActiviteTypeEmailValidator) -} +export const getActiviteTypeEmailsByAdministrationId = ( + pool: Pool, + administrationId: AdministrationId +): Effect.Effect<AdministrationActiviteTypeEmail[], CaminoError<EffectDbQueryAndValidateErrors>> => + effectDbQueryAndValidate(getActiviteTypeEmailsByAdministrationIdDb, { administrationId }, pool, administrationActiviteTypeEmailValidator) const getActiviteTypeEmailsByAdministrationIdDb = sql<Redefine<IGetActiviteTypeEmailsByAdministrationIdDbQuery, { administrationId: AdministrationId }, AdministrationActiviteTypeEmail>>` select diff --git a/packages/api/src/api/rest/administrations.test.integration.ts b/packages/api/src/api/rest/administrations.test.integration.ts index 7921d18ee1f5afd6fdb1454e4f96e5f9c2cc31f0..355f7675f3a9511c75b37526b1ddc72c3ad041a9 100644 --- a/packages/api/src/api/rest/administrations.test.integration.ts +++ b/packages/api/src/api/rest/administrations.test.integration.ts @@ -1,4 +1,4 @@ -import { restCall, restNewPostCall, userGenerate } from '../../../tests/_utils/index' +import { restNewCall, restNewPostCall, userGenerate } from '../../../tests/_utils/index' import { dbManager } from '../../../tests/db-manager' import { expect, test, describe, afterAll, beforeAll, vi } from 'vitest' import type { Pool } from 'pg' @@ -50,7 +50,7 @@ describe('getAdministrationUtilisateurs', () => { await userGenerate(dbPool, { role: 'admin', administrationId: 'dea-guyane-01' }) await userGenerate(dbPool, { role: 'admin', administrationId: 'dea-reunion-01' }) - const tested = await restCall(dbPool, '/rest/administrations/:administrationId/utilisateurs', { administrationId: 'dea-guyane-01' }, user) + const tested = await restNewCall(dbPool, '/rest/administrations/:administrationId/utilisateurs', { administrationId: 'dea-guyane-01' }, user) if (lecture) { expect(tested.statusCode).toBe(HTTP_STATUS.OK) @@ -87,7 +87,7 @@ describe('administrationActiviteTypeEmails', () => { [{ role: 'defaut' }, false], [undefined, false], ])('utilisateur %s peur gérer les emails associés à un type d’activité: %s', async (user, canEdit) => { - let tested = await restCall(dbPool, '/rest/administrations/:administrationId/activiteTypeEmails', { administrationId: 'dea-guyane-01' }, user) + let tested = await restNewCall(dbPool, '/rest/administrations/:administrationId/activiteTypeEmails', { administrationId: 'dea-guyane-01' }, user) if (canEdit) { expect(tested.statusCode).toBe(HTTP_STATUS.OK) @@ -96,12 +96,12 @@ describe('administrationActiviteTypeEmails', () => { const newActiviteTypeEmail: AdministrationActiviteTypeEmail = { activite_type_id: 'gra', email: 'toto@toto.com' } await restNewPostCall(dbPool, '/rest/administrations/:administrationId/activiteTypeEmails', { administrationId: 'dea-guyane-01' }, user, newActiviteTypeEmail) - tested = await restCall(dbPool, '/rest/administrations/:administrationId/activiteTypeEmails', { administrationId: 'dea-guyane-01' }, user) + tested = await restNewCall(dbPool, '/rest/administrations/:administrationId/activiteTypeEmails', { administrationId: 'dea-guyane-01' }, user) expect(tested.statusCode).toBe(HTTP_STATUS.OK) expect(tested.body).toEqual([newActiviteTypeEmail]) await restNewPostCall(dbPool, '/rest/administrations/:administrationId/activiteTypeEmails/delete', { administrationId: 'dea-guyane-01' }, user, newActiviteTypeEmail) - tested = await restCall(dbPool, '/rest/administrations/:administrationId/activiteTypeEmails', { administrationId: 'dea-guyane-01' }, user) + tested = await restNewCall(dbPool, '/rest/administrations/:administrationId/activiteTypeEmails', { administrationId: 'dea-guyane-01' }, user) expect(tested.statusCode).toBe(HTTP_STATUS.OK) expect(tested.body).toEqual([]) } else { diff --git a/packages/api/src/api/rest/administrations.ts b/packages/api/src/api/rest/administrations.ts index 9beff9d1b6c89c104d11e7fc54481a6a69d638eb..17139c9e60508dd075eec2a75162cb7a8ba3964a 100644 --- a/packages/api/src/api/rest/administrations.ts +++ b/packages/api/src/api/rest/administrations.ts @@ -1,71 +1,66 @@ -import { Request as JWTRequest } from 'express-jwt' import { HTTP_STATUS } from 'camino-common/src/http' -import { CustomResponse } from './express-type' -import { AdminUserNotNull, User } from 'camino-common/src/roles' -import { Pool } from 'pg' -import { administrationIdValidator } from 'camino-common/src/static/administrations' +import { AdminUserNotNull } from 'camino-common/src/roles' import { canReadAdministrations } from 'camino-common/src/permissions/administrations' import { deleteAdministrationActiviteTypeEmail, getActiviteTypeEmailsByAdministrationId, getUtilisateursByAdministrationId, insertAdministrationActiviteTypeEmail } from './administrations.queries' import { AdministrationActiviteTypeEmail } from 'camino-common/src/administrations' import { CaminoApiError } from '../../types' import { EffectDbQueryAndValidateErrors } from '../../pg-database' import { Effect, Match } from 'effect' -import { RestNewPostCall } from '../../server/rest' +import { RestNewGetCall, RestNewPostCall } from '../../server/rest' -export const getAdministrationUtilisateurs = - (pool: Pool) => - async (req: JWTRequest<User>, res: CustomResponse<AdminUserNotNull[]>): Promise<void> => { - const user = req.auth - - const parsed = administrationIdValidator.safeParse(req.params.administrationId) - - if (!parsed.success) { - console.warn(`l'administrationId est obligatoire`) - res.sendStatus(HTTP_STATUS.FORBIDDEN) - } else if (!canReadAdministrations(user)) { - res.sendStatus(HTTP_STATUS.FORBIDDEN) - } else { - try { - res.json(await getUtilisateursByAdministrationId(pool, parsed.data)) - } catch (e) { - console.error(e) - - res.sendStatus(HTTP_STATUS.INTERNAL_SERVER_ERROR) - } - } - } - -export const getAdministrationActiviteTypeEmails = - (pool: Pool) => - async (req: JWTRequest<User>, res: CustomResponse<AdministrationActiviteTypeEmail[]>): Promise<void> => { - const user = req.auth - - const parsed = administrationIdValidator.safeParse(req.params.administrationId) - - if (!parsed.success) { - console.warn(`l'administrationId est obligatoire`) - res.sendStatus(HTTP_STATUS.FORBIDDEN) - } else if (!canReadAdministrations(user)) { - res.sendStatus(HTTP_STATUS.FORBIDDEN) - } else { - try { - res.json(await getActiviteTypeEmailsByAdministrationId(pool, parsed.data)) - } catch (e) { - console.error(e) +const accessInterdit = 'Accès interdit' as const +type GetAdministrationUtilisateursErreurs = EffectDbQueryAndValidateErrors | typeof accessInterdit +export const getAdministrationUtilisateurs: RestNewGetCall<'/rest/administrations/:administrationId/utilisateurs'> = ( + rootPipe +): Effect.Effect<AdminUserNotNull[], CaminoApiError<GetAdministrationUtilisateursErreurs>> => + rootPipe.pipe( + Effect.filterOrFail( + ({ user }) => canReadAdministrations(user), + () => ({ message: accessInterdit }) + ), + Effect.flatMap(({ pool, params }) => getUtilisateursByAdministrationId(pool, params.administrationId)), + Effect.mapError(caminoError => + Match.value(caminoError.message).pipe( + Match.when('Accès interdit', () => ({ ...caminoError, status: HTTP_STATUS.FORBIDDEN })), + Match.whenOr("Impossible d'exécuter la requête dans la base de données", 'Les données en base ne correspondent pas à ce qui est attendu', () => ({ + ...caminoError, + status: HTTP_STATUS.INTERNAL_SERVER_ERROR, + })), + Match.exhaustive + ) + ) + ) - res.sendStatus(HTTP_STATUS.INTERNAL_SERVER_ERROR) - } - } - } +type GetAdministrationActiviteTypeEmailsErreurs = EffectDbQueryAndValidateErrors | typeof accessInterdit +export const getAdministrationActiviteTypeEmails: RestNewGetCall<'/rest/administrations/:administrationId/activiteTypeEmails'> = ( + rootPipe +): Effect.Effect<AdministrationActiviteTypeEmail[], CaminoApiError<GetAdministrationActiviteTypeEmailsErreurs>> => + rootPipe.pipe( + Effect.filterOrFail( + ({ user }) => canReadAdministrations(user), + () => ({ message: accessInterdit }) + ), + Effect.flatMap(({ pool, params }) => getActiviteTypeEmailsByAdministrationId(pool, params.administrationId)), + Effect.mapError(caminoError => + Match.value(caminoError.message).pipe( + Match.when('Accès interdit', () => ({ ...caminoError, status: HTTP_STATUS.FORBIDDEN })), + Match.whenOr("Impossible d'exécuter la requête dans la base de données", 'Les données en base ne correspondent pas à ce qui est attendu', () => ({ + ...caminoError, + status: HTTP_STATUS.INTERNAL_SERVER_ERROR, + })), + Match.exhaustive + ) + ) + ) export const addAdministrationActiviteTypeEmails: RestNewPostCall<'/rest/administrations/:administrationId/activiteTypeEmails'> = ( rootPipe -): Effect.Effect<boolean, CaminoApiError<'Accès interdit' | EffectDbQueryAndValidateErrors>> => { +): Effect.Effect<boolean, CaminoApiError<typeof accessInterdit | EffectDbQueryAndValidateErrors>> => { return rootPipe.pipe( Effect.filterOrFail( ({ user }) => canReadAdministrations(user), - () => ({ message: 'Accès interdit' as const }) + () => ({ message: accessInterdit }) ), Effect.flatMap(({ pool, params, body }) => insertAdministrationActiviteTypeEmail(pool, params.administrationId, body)), Effect.mapError(caminoError => @@ -83,11 +78,11 @@ export const addAdministrationActiviteTypeEmails: RestNewPostCall<'/rest/adminis export const deleteAdministrationActiviteTypeEmails: RestNewPostCall<'/rest/administrations/:administrationId/activiteTypeEmails/delete'> = ( rootPipe -): Effect.Effect<boolean, CaminoApiError<'Accès interdit' | EffectDbQueryAndValidateErrors>> => { +): Effect.Effect<boolean, CaminoApiError<typeof accessInterdit | EffectDbQueryAndValidateErrors>> => { return rootPipe.pipe( Effect.filterOrFail( ({ user }) => canReadAdministrations(user), - () => ({ message: 'Accès interdit' as const }) + () => ({ message: accessInterdit }) ), Effect.flatMap(({ pool, params, body }) => deleteAdministrationActiviteTypeEmail(pool, params.administrationId, body)), Effect.mapError(caminoError => diff --git a/packages/api/src/api/rest/entreprises.queries.ts b/packages/api/src/api/rest/entreprises.queries.ts index 119da88e8265cf1111668a40ba98d45b97e29166..64efa08e0a33287187d64d2d0441c091439bfac8 100644 --- a/packages/api/src/api/rest/entreprises.queries.ts +++ b/packages/api/src/api/rest/entreprises.queries.ts @@ -205,9 +205,8 @@ where id = $ entreprise_id ! ` -export const getEntreprises = async (pool: Pool): Promise<GetEntreprises[]> => { - return dbQueryAndValidate(getEntreprisesDb, undefined, pool, getEntreprisesValidor) -} +export const getEntreprises = (pool: Pool): Effect.Effect<GetEntreprises[], CaminoError<EffectDbQueryAndValidateErrors>> => + effectDbQueryAndValidate(getEntreprisesDb, undefined, pool, getEntreprisesValidor) const getEntreprisesDb = sql<Redefine<IGetEntreprisesDbQuery, void, GetEntreprises>>` select diff --git a/packages/api/src/api/rest/entreprises.test.integration.ts b/packages/api/src/api/rest/entreprises.test.integration.ts index bdfd34642c8bab1c6043948ed7ce6b4913e5dfdb..86b13b4155c685b32ab246c50e18b753e2d38e37 100644 --- a/packages/api/src/api/rest/entreprises.test.integration.ts +++ b/packages/api/src/api/rest/entreprises.test.integration.ts @@ -1,7 +1,7 @@ /* eslint-disable sql/no-unsafe-query */ import { entrepriseDocumentIdValidator, EntrepriseDocumentInput, newEntrepriseId, Siren, sirenValidator } from 'camino-common/src/entreprise' import { dbManager } from '../../../tests/db-manager' -import { restCall, restNewCall, restNewDeleteCall, restNewPostCall, restNewPutCall, restPostCall, userGenerate } from '../../../tests/_utils/index' +import { restCall, restNewCall, restNewDeleteCall, restNewPostCall, restNewPutCall, userGenerate } from '../../../tests/_utils/index' import { entrepriseUpsert } from '../../database/queries/entreprises' import { afterAll, beforeAll, describe, test, expect, vi, beforeEach } from 'vitest' import { userSuper } from '../../database/user-super' @@ -109,7 +109,7 @@ describe('fiscalite', () => { describe('entrepriseCreer', () => { test('ne peut pas créer une entreprise (utilisateur anonyme)', async () => { - const tested = await restPostCall(dbPool, '/rest/entreprises', {}, undefined, { siren: entreprise.siren }) + const tested = await restNewPostCall(dbPool, '/rest/entreprises', {}, undefined, { siren: entreprise.siren }) expect(tested.statusCode).toBe(403) }) @@ -118,8 +118,8 @@ describe('entrepriseCreer', () => { entrepriseFetchMock.mockResolvedValue([entreprise]) entreprisesEtablissementsFetchMock.mockResolvedValue([entrepriseAndEtablissements]) - const tested = await restPostCall(dbPool, '/rest/entreprises', {}, userSuper, { siren: entreprise.siren }) - expect(tested.statusCode).toBe(204) + const tested = await restNewPostCall(dbPool, '/rest/entreprises', {}, userSuper, { siren: entreprise.siren }) + expect(tested.statusCode).toBe(HTTP_STATUS.OK) }) test("ne peut pas créer une entreprise déjà existante (un utilisateur 'super')", async () => { @@ -127,9 +127,9 @@ describe('entrepriseCreer', () => { const siren = sirenValidator.parse('123456789') entrepriseFetchMock.mockResolvedValue([{ ...entreprise, siren }]) entreprisesEtablissementsFetchMock.mockResolvedValue([{ ...entrepriseAndEtablissements, siren }]) - let tested = await restPostCall(dbPool, '/rest/entreprises', {}, userSuper, { siren }) - expect(tested.statusCode).toBe(204) - tested = await restPostCall(dbPool, '/rest/entreprises', {}, userSuper, { siren }) + let tested = await restNewPostCall(dbPool, '/rest/entreprises', {}, userSuper, { siren }) + expect(tested.statusCode).toBe(HTTP_STATUS.OK) + tested = await restNewPostCall(dbPool, '/rest/entreprises', {}, userSuper, { siren }) expect(tested.statusCode).toBe(400) }) @@ -137,7 +137,7 @@ describe('entrepriseCreer', () => { tokenInitializeMock.mockResolvedValue('token') entrepriseFetchMock.mockResolvedValue([]) - const tested = await restPostCall(dbPool, '/rest/entreprises', {}, userSuper, { siren: 'invalide' as Siren }) + const tested = await restNewPostCall(dbPool, '/rest/entreprises', {}, userSuper, { siren: 'invalide' as Siren }) expect(tested.statusCode).toBe(400) }) }) @@ -417,7 +417,7 @@ describe('getEntreprises', () => { id: newEntrepriseId('plop'), nom: 'Mon Entreprise', }) - const tested = await restCall(dbPool, '/rest/entreprises', {}, { role: 'defaut' }) + const tested = await restNewCall(dbPool, '/rest/entreprises', {}, { role: 'defaut' }) expect(tested.statusCode).toBe(HTTP_STATUS.OK) expect(tested.body).toMatchInlineSnapshot(` diff --git a/packages/api/src/api/rest/entreprises.ts b/packages/api/src/api/rest/entreprises.ts index 645b231901eb343410500743587eb7d09d874961..06f5d576136bbf47986591288c4add008ac3ee13 100644 --- a/packages/api/src/api/rest/entreprises.ts +++ b/packages/api/src/api/rest/entreprises.ts @@ -9,18 +9,7 @@ import { entrepriseGet, entrepriseUpsert } from '../../database/queries/entrepri import { CustomResponse } from './express-type' import { isNotNullNorUndefined, isNullOrUndefined } from 'camino-common/src/typescript-tools' import { anneePrecedente, isAnnee } from 'camino-common/src/date' -import { - entrepriseIdValidator, - EntrepriseType, - sirenValidator, - EntrepriseDocument, - entrepriseDocumentIdValidator, - EntrepriseDocumentId, - newEntrepriseId, - Entreprise, - entrepriseValidator, - EntrepriseId, -} from 'camino-common/src/entreprise' +import { entrepriseIdValidator, EntrepriseType, EntrepriseDocument, entrepriseDocumentIdValidator, EntrepriseDocumentId, newEntrepriseId, EntrepriseId } from 'camino-common/src/entreprise' import { isSuper, User } from 'camino-common/src/roles' import { canCreateEntreprise, canEditEntreprise, canSeeEntrepriseDocuments } from 'camino-common/src/permissions/entreprises' import { emailCheck } from '../../tools/email-check' @@ -34,19 +23,19 @@ import { getLargeobjectIdByEntrepriseDocumentId, insertEntrepriseDocument, GetEntrepriseErrors, + GetEntreprises, } from './entreprises.queries' import { newEnterpriseDocumentId } from '../../database/models/_format/id-create' import { NewDownload } from './fichiers' import Decimal from 'decimal.js' import { createLargeObject, CreateLargeObjectError } from '../../database/largeobjects' -import { z } from 'zod' import { getEntrepriseEtablissements } from './entreprises-etablissements.queries' import { RawLineMatrice, getRawLines } from '../../business/matrices' import { RestNewDeleteCall, RestNewGetCall, RestNewPostCall, RestNewPutCall } from '../../server/rest' import { Effect, Match, Option } from 'effect' import { EffectDbQueryAndValidateErrors } from '../../pg-database' -import { CaminoApiError } from '../../types' +import { CaminoApiError, IEntreprise } from '../../types' type Reduced = { guyane: true; fiscalite: FiscaliteGuyane } | { guyane: false; fiscalite: FiscaliteFrance } // VisibleForTesting @@ -152,43 +141,73 @@ export const modifierEntreprise: RestNewPutCall<'/rest/entreprises/:entrepriseId ) ) -export const creerEntreprise = - (_pool: Pool) => - async (req: JWTRequest<User>, res: CustomResponse<void>): Promise<void> => { - const user = req.auth - const siren = sirenValidator.safeParse(req.body.siren) - if (!user) { - res.sendStatus(HTTP_STATUS.FORBIDDEN) - } else if (!siren.success) { - console.warn(`siren '${req.body.siren}' invalide`) - res.sendStatus(HTTP_STATUS.BAD_REQUEST) - } else { - if (!canCreateEntreprise(user)) { - res.sendStatus(HTTP_STATUS.FORBIDDEN) - } else { - try { - const entrepriseOld = await entrepriseGet(newEntrepriseId(`fr-${siren.data}`), { fields: { id: {} } }, user) +const creationEntrepriseImpossible = "Interdiction de créer l'entreprise" as const +const erreurLorsDeLaVerificationDExistenceDeLEntreprise = "Erreur lors de la vérification de l'existence de l'entreprise" as const +const entrepriseDejaExistante = 'Entreprise déjà existante' as const +const erreurRecuperationInsee = "Impossible de récupérer les informations de l'entreprise auprès de l'INSEE" as const +const erreurInsertionEntreprise = "Impossible d'enregistrer l'entreprise" as const +const entrepriseNonTrouvee = "Entreprise non trouvée auprès de l'INSEE" as const +type CreerEntrepriseErrors = + | typeof creationEntrepriseImpossible + | typeof erreurLorsDeLaVerificationDExistenceDeLEntreprise + | typeof entrepriseDejaExistante + | typeof erreurRecuperationInsee + | typeof erreurInsertionEntreprise + | typeof entrepriseNonTrouvee - if (entrepriseOld) { - console.warn(`l'entreprise ${entrepriseOld.nom} existe déjà dans Camino`) - res.sendStatus(HTTP_STATUS.BAD_REQUEST) - } else { - const entrepriseInsee = await apiInseeEntrepriseAndEtablissementsGet(siren.data) +export const creerEntreprise: RestNewPostCall<'/rest/entreprises'> = (rootPipe): Effect.Effect<{ id: EntrepriseId }, CaminoApiError<CreerEntrepriseErrors>> => + rootPipe.pipe( + Effect.filterOrFail( + ({ user }) => canCreateEntreprise(user), + () => ({ message: creationEntrepriseImpossible }) + ), + Effect.bind('entrepriseAlreadyExists', ({ user, body }) => + Effect.tryPromise({ + try: () => entrepriseGet(newEntrepriseId(`fr-${body.siren}`), { fields: { id: {} } }, user), + catch: e => ({ message: erreurLorsDeLaVerificationDExistenceDeLEntreprise, extra: e }), + }) + ), + Effect.filterOrFail( + ({ entrepriseAlreadyExists }) => isNullOrUndefined(entrepriseAlreadyExists), + () => ({ message: entrepriseDejaExistante }) + ), + Effect.bind('entrepriseInsee', ({ body }) => + Effect.tryPromise({ + try: () => apiInseeEntrepriseAndEtablissementsGet(body.siren), + catch: e => ({ message: erreurRecuperationInsee, extra: e }), + }).pipe( + Effect.filterOrFail( + (entrepriseInsee): entrepriseInsee is NonNullable<IEntreprise> => isNotNullNorUndefined(entrepriseInsee), + () => ({ message: entrepriseNonTrouvee }) + ) + ) + ), + + Effect.bind('insertedEntreprise', ({ entrepriseInsee }) => + Effect.tryPromise({ + try: () => entrepriseUpsert(entrepriseInsee), + catch: e => ({ message: erreurInsertionEntreprise, extra: e }), + }) + ), + Effect.map(({ insertedEntreprise }) => ({ id: insertedEntreprise.id })), + Effect.mapError(caminoError => + Match.value(caminoError.message).pipe( + Match.when("Interdiction de créer l'entreprise", () => ({ ...caminoError, status: HTTP_STATUS.FORBIDDEN })), + Match.whenOr('Entreprise déjà existante', "Entreprise non trouvée auprès de l'INSEE", () => ({ + ...caminoError, + status: HTTP_STATUS.BAD_REQUEST, + })), + Match.whenOr( + "Erreur lors de la vérification de l'existence de l'entreprise", + "Impossible de récupérer les informations de l'entreprise auprès de l'INSEE", + "Impossible d'enregistrer l'entreprise", + () => ({ ...caminoError, status: HTTP_STATUS.INTERNAL_SERVER_ERROR }) + ), + Match.exhaustive + ) + ) + ) - if (!entrepriseInsee) { - res.sendStatus(HTTP_STATUS.NOT_FOUND) - } else { - await entrepriseUpsert(entrepriseInsee) - res.sendStatus(HTTP_STATUS.NO_CONTENT) - } - } - } catch (e) { - console.error(e) - res.sendStatus(HTTP_STATUS.INTERNAL_SERVER_ERROR) - } - } - } - } type GetEntrepriseRestErrors = GetEntrepriseErrors export const getEntrepriseRest: RestNewGetCall<'/rest/entreprises/:entrepriseId'> = (rootPipe): Effect.Effect<EntrepriseType, CaminoApiError<GetEntrepriseRestErrors>> => rootPipe.pipe( @@ -402,10 +421,18 @@ export const entrepriseDocumentDownload: NewDownload = async (params, user, pool return { loid: entrepriseDocumentLargeObjectId, fileName: entrepriseDocumentId } } +type GetEntreprisesErrors = EffectDbQueryAndValidateErrors -export const getAllEntreprises = - (pool: Pool) => - async (_req: JWTRequest<User>, res: CustomResponse<Entreprise[]>): Promise<void> => { - const allEntreprises = await getEntreprises(pool) - res.json(z.array(entrepriseValidator).parse(allEntreprises)) - } +export const getAllEntreprises: RestNewGetCall<'/rest/entreprises'> = (rootPipe): Effect.Effect<GetEntreprises[], CaminoApiError<GetEntreprisesErrors>> => + rootPipe.pipe( + Effect.flatMap(({ pool }) => getEntreprises(pool)), + Effect.mapError(caminoError => + Match.value(caminoError.message).pipe( + Match.whenOr("Impossible d'exécuter la requête dans la base de données", 'Les données en base ne correspondent pas à ce qui est attendu', () => ({ + ...caminoError, + status: HTTP_STATUS.INTERNAL_SERVER_ERROR, + })), + Match.exhaustive + ) + ) + ) diff --git a/packages/api/src/api/rest/etape-modifier.test.integration.ts b/packages/api/src/api/rest/etape-modifier.test.integration.ts index 00cab83e906338d2cfb437916882b15c99f42ea0..7e61235b66f77e54dc764e5a68d494d1d754ab89 100644 --- a/packages/api/src/api/rest/etape-modifier.test.integration.ts +++ b/packages/api/src/api/rest/etape-modifier.test.integration.ts @@ -368,9 +368,9 @@ describe('etapeModifier', () => { }) test("ne peut pas supprimer un document obligatoire d'une étape qui n'est pas en brouillon (utilisateur super)", async () => { - const titreId = newTitreId('titre-id-1') - const demarcheId = newDemarcheId('demarche-id-1') - const titreEtapeId = newEtapeId('etape-id-adc') + const titreId = newTitreId('titre-id-1-document-obligatoire') + const demarcheId = newDemarcheId('demarche-id-1-document-obligatoire') + const titreEtapeId = newEtapeId('etape-id-adc-document-obligatoire') await insertTitreGraph({ id: titreId, nom: 'mon titre simple', @@ -390,6 +390,7 @@ describe('etapeModifier', () => { isBrouillon: ETAPE_IS_NOT_BROUILLON, statutId: ETAPES_STATUTS.FAIT, titreDemarcheId: demarcheId, + ordre: 0, }, { typeId: ETAPES_TYPES.enregistrementDeLaDemande, @@ -398,6 +399,7 @@ describe('etapeModifier', () => { isBrouillon: ETAPE_IS_NOT_BROUILLON, statutId: ETAPES_STATUTS.FAIT, titreDemarcheId: demarcheId, + ordre: 1, }, { typeId: ETAPES_TYPES.recevabiliteDeLaDemande, @@ -406,6 +408,7 @@ describe('etapeModifier', () => { isBrouillon: ETAPE_IS_NOT_BROUILLON, statutId: ETAPES_STATUTS.FAVORABLE, titreDemarcheId: demarcheId, + ordre: 2, }, { typeId: ETAPES_TYPES.avisDesCollectivites, @@ -414,6 +417,7 @@ describe('etapeModifier', () => { isBrouillon: ETAPE_IS_NOT_BROUILLON, statutId: ETAPES_STATUTS.FAIT, titreDemarcheId: demarcheId, + ordre: 3, }, ], }, diff --git a/packages/api/src/api/rest/etapes.queries.ts b/packages/api/src/api/rest/etapes.queries.ts index e330133c1cc0bce31f0ecdf954c056cc5ba28bab..4fd77d2654b011745a793e4fabeaa4e4e57d012e 100644 --- a/packages/api/src/api/rest/etapes.queries.ts +++ b/packages/api/src/api/rest/etapes.queries.ts @@ -30,6 +30,7 @@ import { CaminoError } from 'camino-common/src/zod-tools' import { Effect, pipe } from 'effect' import { DATE_DEBUT_PROCEDURE_SPECIFIQUE } from 'camino-common/src/machines' import { TitreId } from 'camino-common/src/validators/titres' +import { communeIdValidator } from 'camino-common/src/static/communes' const getEtapeByIdValidator = z.object({ etape_id: etapeIdValidator, @@ -38,6 +39,7 @@ const getEtapeByIdValidator = z.object({ geojson4326_perimetre: multiPolygonValidator.nullable(), sdom_zones: z.array(sdomZoneIdValidator).nullable(), demarche_id_en_concurrence: demarcheIdValidator.nullable(), + communes: z.array(z.object({ id: communeIdValidator, surface: z.number().optional() })), }) type GetEtapeByIdValidator = z.infer<typeof getEtapeByIdValidator> @@ -55,7 +57,8 @@ select titre_demarche_id as demarche_id, ST_AsGeoJSON (geojson4326_perimetre, 40)::json as geojson4326_perimetre, sdom_zones, - demarche_id_en_concurrence + demarche_id_en_concurrence, + communes from titres_etapes where (id = $ etapeId ! diff --git a/packages/api/src/api/rest/etapes.queries.types.ts b/packages/api/src/api/rest/etapes.queries.types.ts index f3dd34786970680de10a5969899e0d7501efe631..0781a5b9587c4f8f0e081fc9a1db4087dba332d8 100644 --- a/packages/api/src/api/rest/etapes.queries.types.ts +++ b/packages/api/src/api/rest/etapes.queries.types.ts @@ -8,6 +8,7 @@ export interface IGetEtapeByIdDbParams { /** 'GetEtapeByIdDb' return type */ export interface IGetEtapeByIdDbResult { + communes: Json; demarche_id: string; demarche_id_en_concurrence: string | null; etape_id: string; diff --git a/packages/api/src/api/rest/format/titres-activites.ts b/packages/api/src/api/rest/format/titres-activites.ts index f8edaebaecb157b12a14f0c0e34c7375d4a98c5d..c8cfb48a8dfde63ab8b735e84538d7c7765a6964 100644 --- a/packages/api/src/api/rest/format/titres-activites.ts +++ b/packages/api/src/api/rest/format/titres-activites.ts @@ -12,6 +12,7 @@ import { getEntreprises } from '../entreprises.queries' import { EntrepriseId } from 'camino-common/src/entreprise' import { TitreSlug } from 'camino-common/src/validators/titres' import { CaminoAnnee, toCaminoAnnee } from 'camino-common/src/date' +import { callAndExit } from '../../../tools/fp-tools' const titreActiviteContenuFormat = (contenu: IContenu, sections: Section[]) => sections.reduce((resSections: Index<IContenuValeur>, section) => { @@ -56,7 +57,7 @@ export const titresActivitesFormatTable = async (pool: Pool, activites: ITitreAc pool, activites.flatMap(({ titre }) => titre?.communes?.map(({ id }) => id) ?? []) ) - const entreprises = await getEntreprises(pool) + const entreprises = await callAndExit(getEntreprises(pool)) const entreprisesIndex = entreprises.reduce<Record<EntrepriseId, string>>((acc, entreprise) => { acc[entreprise.id] = entreprise.nom diff --git a/packages/api/src/api/rest/format/titres-demarches.ts b/packages/api/src/api/rest/format/titres-demarches.ts index 391c9e3fa4a0ad7a258d002011f55c29b30ccd50..ab89b98d148a23465a4748dd09b4e0bf67ab6b7f 100644 --- a/packages/api/src/api/rest/format/titres-demarches.ts +++ b/packages/api/src/api/rest/format/titres-demarches.ts @@ -18,6 +18,7 @@ import { EntrepriseId } from 'camino-common/src/entreprise' import { GetEntreprises, getEntreprises } from '../entreprises.queries' import { ETAPE_IS_NOT_BROUILLON } from 'camino-common/src/etape' import { TitreSlug } from 'camino-common/src/validators/titres' +import { callAndExit } from '../../../tools/fp-tools' const etapesDatesStatutsBuild = (titreDemarche: ITitreDemarche) => { if (isNullOrUndefinedOrEmpty(titreDemarche.etapes)) return null @@ -73,7 +74,7 @@ export const titresDemarchesFormatTable = async (pool: Pool, titresDemarches: IT pool, titresDemarches.flatMap(titreDemarche => titreDemarche.etapes?.flatMap(etape => etape.communes?.map(({ id }) => id) ?? []) ?? []) ) - const entreprises = await getEntreprises(pool) + const entreprises = await callAndExit(getEntreprises(pool)) const entreprisesIndex = entreprises.reduce<Record<EntrepriseId, GetEntreprises>>((acc, entreprise) => { acc[entreprise.id] = entreprise diff --git a/packages/api/src/api/rest/format/titres.ts b/packages/api/src/api/rest/format/titres.ts index 14064861df8904bb79b4f858f1126128ed87e7ef..e852d4c9180476c5b84311dafc23cd33866e6e21 100644 --- a/packages/api/src/api/rest/format/titres.ts +++ b/packages/api/src/api/rest/format/titres.ts @@ -24,6 +24,7 @@ import { DemarchesTypes } from 'camino-common/src/static/demarchesTypes' import { GetEntreprises, getEntreprises } from '../entreprises.queries' import { EntrepriseId } from 'camino-common/src/entreprise' import { slugify } from 'camino-common/src/strings' +import { callAndExit } from '../../../tools/fp-tools' const getFacadesMaritimeCell = (secteursMaritime: SecteursMaritimes[], separator: string): string => getFacadesComputed(secteursMaritime) @@ -55,7 +56,7 @@ export const titresTableFormat = async (pool: Pool, titres: ITitre[]): Promise<R pool, titres.flatMap(titre => titre.communes?.map(({ id }) => id) ?? []) ) - const entreprises = await getEntreprises(pool) + const entreprises = await callAndExit(getEntreprises(pool)) const entreprisesIndex = entreprises.reduce<RecordPartial<EntrepriseId, GetEntreprises>>((acc, entreprise) => { acc[entreprise.id] = entreprise @@ -176,7 +177,7 @@ export const titresGeojsonFormat = async (pool: Pool, titres: ITitre[]): Promise pool, titres.flatMap(titre => titre.communes?.map(({ id }) => id) ?? []) ) - const entreprises = await getEntreprises(pool) + const entreprises = await callAndExit(getEntreprises(pool)) const entreprisesIndex = entreprises.reduce<Record<EntrepriseId, GetEntreprises>>((acc, entreprise) => { acc[entreprise.id] = entreprise diff --git a/packages/api/src/api/rest/index.ts b/packages/api/src/api/rest/index.ts index a3ca10a7ff600032a0feb0722c928bf4e65d9ff2..97f94cafe03b3a4339b492fd8ade15dd56ff650d 100644 --- a/packages/api/src/api/rest/index.ts +++ b/packages/api/src/api/rest/index.ts @@ -25,6 +25,7 @@ import { FieldsTitre } from '../../database/queries/_options' import { titresValidator, demarchesValidator, activitesValidator, entreprisesValidator } from '../../business/utils/filters' import { GetEntreprises, getEntreprises } from './entreprises.queries' import { EntrepriseId } from 'camino-common/src/entreprise' +import { callAndExit } from '../../tools/fp-tools' const formatCheck = (formats: string[], format: string) => { if (!formats.includes(format)) { @@ -65,7 +66,7 @@ export const titre = const titreFormatted = titreFormat(titre) const communesIndex = await getCommunesIndex(pool, titreFormatted.communes?.map(({ id }) => id) ?? []) - const entreprises = await getEntreprises(pool) + const entreprises = await callAndExit(getEntreprises(pool)) const entreprisesIndex = entreprises.reduce<Record<EntrepriseId, GetEntreprises>>((acc, entreprise) => { acc[entreprise.id] = entreprise diff --git a/packages/api/src/api/rest/perimetre.test.integration.ts b/packages/api/src/api/rest/perimetre.test.integration.ts index d71ba8097939d71b655dd790bb91a8230c545fa1..64aaeb1d0352a91bd286f3cac921236606ae7370 100644 --- a/packages/api/src/api/rest/perimetre.test.integration.ts +++ b/packages/api/src/api/rest/perimetre.test.integration.ts @@ -1,6 +1,6 @@ import { userSuper } from '../../database/user-super' import { dbManager } from '../../../tests/db-manager' -import { restNewPostCall } from '../../../tests/_utils/index' +import { restNewCall, restNewPostCall } from '../../../tests/_utils/index' import { test, expect, vi, beforeAll, afterAll, describe } from 'vitest' import type { Pool } from 'pg' import { HTTP_STATUS } from 'camino-common/src/http' @@ -15,11 +15,15 @@ import { GeojsonImportPointsBody, } from 'camino-common/src/perimetre' import { GEO_SYSTEME_IDS } from 'camino-common/src/static/geoSystemes' -import { idGenerate } from '../../database/models/_format/id-create' +import { idGenerate, newDemarcheId, newEtapeId, newTitreId } from '../../database/models/_format/id-create' import { copyFileSync, mkdirSync, writeFileSync } from 'node:fs' import { tempDocumentNameValidator } from 'camino-common/src/document' import { titreSlugValidator } from 'camino-common/src/validators/titres' import { join } from 'node:path' +import { insertTitreGraph, ITitreInsert } from '../../../tests/integration-test-helper' +import { communeIdValidator } from 'camino-common/src/static/communes' +import { toCaminoDate } from 'camino-common/src/date' +import { ETAPE_IS_NOT_BROUILLON } from 'camino-common/src/etape' console.info = vi.fn() console.error = vi.fn() @@ -1706,3 +1710,152 @@ Piézomètre A;Point A;1051195.108314365847036;6867800.046355471946299;12.12;rej expect(tested.body).toMatchSnapshot() }) }) + +describe('getPerimetreInfosByEtape', () => { + test('test connecté et non connecté', async () => { + const communeId = communeIdValidator.parse('31200') + const etapeId = newEtapeId('titre-id-demarche-id-dpu') + const titre: ITitreInsert = { + id: newTitreId('titre-id'), + nom: 'mon titre', + typeId: 'arm', + titreStatutId: 'ind', + publicLecture: true, + propsTitreEtapesIds: { titulaires: 'titre-id-demarche-id-dpu', points: 'titre-id-demarche-id-dpu' }, + demarches: [ + { + id: newDemarcheId('titre-id-demarche-id'), + titreId: newTitreId('titre-id'), + typeId: 'oct', + statutId: 'acc', + publicLecture: true, + etapes: [ + { + id: etapeId, + typeId: 'dpu', + ordre: 0, + titreDemarcheId: newDemarcheId('titre-id-demarche-id'), + statutId: 'acc', + date: toCaminoDate('2020-02-02'), + administrationsLocales: ['dea-guyane-01'], + titulaireIds: [], + communes: [{ id: communeId }], + isBrouillon: ETAPE_IS_NOT_BROUILLON, + }, + ], + }, + ], + } + + await insertTitreGraph(titre) + let tested = await restNewCall(dbPool, '/rest/etapes/:etapeId/geojson', { etapeId: etapeId }, undefined) + expect(tested.body).toMatchInlineSnapshot(` + { + "message": "Il faut être connecté pour utiliser cette route", + "status": 403, + } + `) + + tested = await restNewCall(dbPool, '/rest/etapes/:etapeId/geojson', { etapeId: etapeId }, userSuper) + expect(tested.body).toMatchInlineSnapshot(` + { + "communes": [ + "31200", + ], + "sdomZoneIds": [], + "superposition_alertes": [], + } + `) + }) +}) + +describe('getPerimetreInfosByDemarche', () => { + test('test connecté et non connecté', async () => { + const communeId = communeIdValidator.parse('31200') + const demarcheId = newDemarcheId('titre-id-demarche-id-2') + const etapeId = newEtapeId('titre-id-demarche-id-dpu-2') + const titre: ITitreInsert = { + id: newTitreId('titre-id-2'), + nom: 'mon titre', + typeId: 'arm', + titreStatutId: 'ind', + publicLecture: true, + propsTitreEtapesIds: { titulaires: 'titre-id-demarche-id-dpu', points: 'titre-id-demarche-id-dpu' }, + demarches: [ + { + id: demarcheId, + titreId: newTitreId('titre-id'), + typeId: 'oct', + statutId: 'acc', + publicLecture: true, + etapes: [ + { + id: etapeId, + typeId: 'dpu', + ordre: 0, + titreDemarcheId: demarcheId, + statutId: 'acc', + date: toCaminoDate('2020-02-02'), + administrationsLocales: ['dea-guyane-01'], + titulaireIds: [], + communes: [{ id: communeId }], + isBrouillon: ETAPE_IS_NOT_BROUILLON, + }, + ], + }, + ], + } + + await insertTitreGraph(titre) + let tested = await restNewCall(dbPool, '/rest/demarches/:demarcheId/geojson', { demarcheId }, undefined) + expect(tested.body).toMatchInlineSnapshot(` + { + "message": "Il faut être connecté pour utiliser cette route", + "status": 403, + } + `) + + tested = await restNewCall(dbPool, '/rest/demarches/:demarcheId/geojson', { demarcheId }, userSuper) + expect(tested.body).toMatchInlineSnapshot(` + { + "communes": [ + "31200", + ], + "sdomZoneIds": [], + "superposition_alertes": [], + } + `) + }) + test('démarche sans étape', async () => { + const demarcheId = newDemarcheId('titre-id-demarche-id-3') + const titre: ITitreInsert = { + id: newTitreId('titre-id-3'), + nom: 'mon titre', + typeId: 'arm', + titreStatutId: 'ind', + publicLecture: true, + propsTitreEtapesIds: { titulaires: 'titre-id-demarche-id-dpu', points: 'titre-id-demarche-id-dpu' }, + demarches: [ + { + id: demarcheId, + titreId: newTitreId('titre-id'), + typeId: 'oct', + statutId: 'acc', + publicLecture: true, + etapes: [], + }, + ], + } + + await insertTitreGraph(titre) + + const tested = await restNewCall(dbPool, '/rest/demarches/:demarcheId/geojson', { demarcheId }, userSuper) + expect(tested.body).toMatchInlineSnapshot(` + { + "communes": [], + "sdomZoneIds": [], + "superposition_alertes": [], + } + `) + }) +}) diff --git a/packages/api/src/api/rest/perimetre.ts b/packages/api/src/api/rest/perimetre.ts index 8bff9eda434cba80c170e941a3667b181982cd4e..8015b9c44813d7fe7a049b8430d39016082e7632 100644 --- a/packages/api/src/api/rest/perimetre.ts +++ b/packages/api/src/api/rest/perimetre.ts @@ -1,5 +1,4 @@ -import { DemarcheId, demarcheIdOrSlugValidator } from 'camino-common/src/demarche' -import { CaminoRequest, CustomResponse } from './express-type' +import { DemarcheId } from 'camino-common/src/demarche' import { Pool } from 'pg' import { pipe, Effect, Match } from 'effect' import { GeoSystemes } from 'camino-common/src/static/geoSystemes' @@ -17,9 +16,8 @@ import { import { TitreTypeId } from 'camino-common/src/static/titresTypes' import { getMostRecentEtapeFondamentaleValide } from './titre-heritage' import { isAdministrationAdmin, isAdministrationEditeur, isDefault, isSuper, User } from 'camino-common/src/roles' -import { getDemarcheByIdOrSlug, getEtapesByDemarcheId } from './demarches.queries' -import { getAdministrationsLocalesByTitreId, getTitreByIdOrSlug, getTitulairesAmodiatairesByTitreId } from './titres.queries' -import { etapeIdOrSlugValidator } from 'camino-common/src/etape' +import { getDemarcheByIdOrSlug, GetDemarcheByIdOrSlugErrors, getEtapesByDemarcheId } from './demarches.queries' +import { getAdministrationsLocalesByTitreId, getTitreByIdOrSlug, GetTitreByIdOrSlugErrors, getTitulairesAmodiatairesByTitreId } from './titres.queries' import { getEtapeById } from './etapes.queries' import { FeatureCollectionPoints, @@ -50,90 +48,149 @@ import xlsx from 'xlsx' import { ZodTypeAny, z } from 'zod' import { CommuneId } from 'camino-common/src/static/communes' import { CaminoApiError } from '../../types' -import { EffectDbQueryAndValidateErrors } from '../../pg-database' -import { ZodUnparseable, callAndExit, zodParseEffect, zodParseEffectCallback } from '../../tools/fp-tools' +import { DBNotFound, EffectDbQueryAndValidateErrors } from '../../pg-database' +import { ZodUnparseable, zodParseEffect, zodParseEffectCallback } from '../../tools/fp-tools' import { CaminoError } from 'camino-common/src/zod-tools' -import { RestNewPostCall } from '../../server/rest' - -export const getPerimetreInfos = - (pool: Pool) => - async (req: CaminoRequest, res: CustomResponse<PerimetreInformations>): Promise<void> => { - const user = req.auth - - if (!user) { - res.sendStatus(HTTP_STATUS.FORBIDDEN) - } else { - const etapeIdOrSlugParsed = etapeIdOrSlugValidator.safeParse(req.params.etapeId) - const demarcheIdOrSlugParsed = demarcheIdOrSlugValidator.safeParse(req.params.demarcheId) - - if (!etapeIdOrSlugParsed.success && !demarcheIdOrSlugParsed.success) { - res.sendStatus(HTTP_STATUS.BAD_REQUEST) - } else { - try { - let etape: null | { demarche_id: DemarcheId; geojson4326_perimetre: MultiPolygon | null; sdom_zones: SDOMZoneId[]; etape_type_id: EtapeTypeId; communes: CommuneId[] } = null - if (etapeIdOrSlugParsed.success) { - const myEtape = await callAndExit(getEtapeById(pool, etapeIdOrSlugParsed.data)) - - etape = { demarche_id: myEtape.demarche_id, geojson4326_perimetre: myEtape.geojson4326_perimetre, sdom_zones: myEtape.sdom_zones ?? [], etape_type_id: myEtape.etape_type_id, communes: [] } - } else if (demarcheIdOrSlugParsed.success) { - const demarche = await callAndExit(getDemarcheByIdOrSlug(pool, demarcheIdOrSlugParsed.data)) - const etapes = await callAndExit(getEtapesByDemarcheId(pool, demarche.demarche_id)) - - const mostRecentEtapeFondamentale = getMostRecentEtapeFondamentaleValide([{ ordre: 1, etapes }]) - if (isNotNullNorUndefined(mostRecentEtapeFondamentale)) { - etape = { - demarche_id: demarche.demarche_id, - geojson4326_perimetre: mostRecentEtapeFondamentale.geojson4326_perimetre, - sdom_zones: mostRecentEtapeFondamentale.sdom_zones ?? [], - etape_type_id: mostRecentEtapeFondamentale.etape_type_id, - communes: mostRecentEtapeFondamentale.communes.map(({ id }) => id), - } - } - } else { - res.sendStatus(HTTP_STATUS.INTERNAL_SERVER_ERROR) - console.error("cas impossible où ni l'étape id ni la démarche Id n'est chargée") +import { RestNewGetCall, RestNewPostCall } from '../../server/rest' + +const userNotConnected = 'Il faut être connecté pour utiliser cette route' as const +type GetPerimetreInfosByEtapeErrors = EffectDbQueryAndValidateErrors | DBNotFound | typeof userNotConnected | GetPerimetreInfosInternalErrors +export const getPerimetreInfosByEtape: RestNewGetCall<'/rest/etapes/:etapeId/geojson'> = (rootPipe): Effect.Effect<PerimetreInformations, CaminoApiError<GetPerimetreInfosByEtapeErrors>> => + rootPipe.pipe( + Effect.filterOrFail( + ({ user }) => isNotNullNorUndefined(user), + () => ({ message: userNotConnected }) + ), + Effect.bind('etape', ({ pool, params }) => + getEtapeById(pool, params.etapeId).pipe( + Effect.map(myEtape => { + const etapeReworked: GetPerimetreInfosInternalEtape = { + demarche_id: myEtape.demarche_id, + geojson4326_perimetre: myEtape.geojson4326_perimetre, + sdom_zones: myEtape.sdom_zones ?? [], + etape_type_id: myEtape.etape_type_id, + communes: myEtape.communes.map(({ id }) => id), } + return etapeReworked + }) + ) + ), + Effect.flatMap(({ pool, user, etape }) => getPerimetreInfosInternal(pool, user, etape)), + Effect.mapError(caminoError => + Match.value(caminoError.message).pipe( + Match.whenOr('Il faut être connecté pour utiliser cette route', "Droits insuffisant pour lire l'étape", () => ({ ...caminoError, status: HTTP_STATUS.FORBIDDEN })), + Match.whenOr( + 'Élément non trouvé dans la base de données', + 'Les données en base ne correspondent pas à ce qui est attendu', + "Impossible d'exécuter la requête dans la base de données", + "La démarche n'existe pas", + 'titre non trouvé en base', + () => ({ + ...caminoError, + status: HTTP_STATUS.BAD_REQUEST, + }) + ), + Match.when("Une erreur est survenue lors de la gestion des droits de l'étape", () => ({ + ...caminoError, + status: HTTP_STATUS.INTERNAL_SERVER_ERROR, + })), + Match.exhaustive + ) + ) + ) - if (isNullOrUndefined(etape)) { - res.json({ - superposition_alertes: [], - sdomZoneIds: [], - communes: [], - }) - } else { - const demarche = await callAndExit(getDemarcheByIdOrSlug(pool, etape.demarche_id)) - const titre = await callAndExit(getTitreByIdOrSlug(pool, demarche.titre_id)) - - const administrationsLocales = memoize(() => getAdministrationsLocalesByTitreId(pool, demarche.titre_id)) - - if ( - await canReadEtape( - user, - memoize(() => Promise.resolve(titre.titre_type_id)), - administrationsLocales, - memoize(() => getTitulairesAmodiatairesByTitreId(pool, demarche.titre_id)), - etape.etape_type_id, - { ...demarche, titre_public_lecture: titre.public_lecture } - ) - ) { - const superpositionAlertes = await callAndExit(getAlertesSuperposition(etape.geojson4326_perimetre, titre.titre_type_id, titre.titre_slug, user, pool)) +type GetPerimetreInfosByDemarcheErrors = EffectDbQueryAndValidateErrors | typeof userNotConnected | GetDemarcheByIdOrSlugErrors | GetPerimetreInfosInternalErrors +export const getPerimetreInfosByDemarche: RestNewGetCall<'/rest/demarches/:demarcheId/geojson'> = (rootPipe): Effect.Effect<PerimetreInformations, CaminoApiError<GetPerimetreInfosByDemarcheErrors>> => + rootPipe.pipe( + Effect.filterOrFail( + ({ user }) => isNotNullNorUndefined(user), + () => ({ message: userNotConnected }) + ), + Effect.bind('demarche', ({ pool, params }) => getDemarcheByIdOrSlug(pool, params.demarcheId)), + Effect.bind('etapes', ({ pool, demarche }) => getEtapesByDemarcheId(pool, demarche.demarche_id)), + Effect.let('mostRecentEtapeFondamentale', ({ etapes }) => getMostRecentEtapeFondamentaleValide([{ ordre: 1, etapes }])), + Effect.let('etape', ({ mostRecentEtapeFondamentale, demarche }) => { + if (isNullOrUndefined(mostRecentEtapeFondamentale)) { + return null + } + const etapeReworked: GetPerimetreInfosInternalEtape = { + demarche_id: demarche.demarche_id, + geojson4326_perimetre: mostRecentEtapeFondamentale.geojson4326_perimetre, + sdom_zones: mostRecentEtapeFondamentale.sdom_zones ?? [], + etape_type_id: mostRecentEtapeFondamentale.etape_type_id, + communes: mostRecentEtapeFondamentale.communes.map(({ id }) => id), + } - res.json({ - superposition_alertes: superpositionAlertes, - sdomZoneIds: etape.sdom_zones, - communes: etape.communes, - }) - } else { - res.sendStatus(HTTP_STATUS.FORBIDDEN) - } + return etapeReworked + }), + Effect.flatMap(({ pool, user, etape }) => { + return Match.value(etape).pipe( + Match.when(null, () => { + const emptyResult: PerimetreInformations = { + communes: [], + sdomZoneIds: [], + superposition_alertes: [], } - } catch (e) { - res.status(HTTP_STATUS.INTERNAL_SERVER_ERROR).send(e) - console.error(e) - } + return Effect.succeed(emptyResult) + }), + Match.orElse(myEtape => getPerimetreInfosInternal(pool, user, myEtape)) + ) + }), + Effect.mapError(caminoError => + Match.value(caminoError.message).pipe( + Match.whenOr('Il faut être connecté pour utiliser cette route', "Droits insuffisant pour lire l'étape", () => ({ ...caminoError, status: HTTP_STATUS.FORBIDDEN })), + Match.whenOr('Les données en base ne correspondent pas à ce qui est attendu', "Impossible d'exécuter la requête dans la base de données", "La démarche n'existe pas", () => ({ + ...caminoError, + status: HTTP_STATUS.BAD_REQUEST, + })), + Match.whenOr("Une erreur est survenue lors de la gestion des droits de l'étape", 'titre non trouvé en base', () => ({ ...caminoError, status: HTTP_STATUS.INTERNAL_SERVER_ERROR })), + Match.exhaustive + ) + ) + ) +type GetPerimetreInfosInternalEtape = { demarche_id: DemarcheId; geojson4326_perimetre: MultiPolygon | null; sdom_zones: SDOMZoneId[]; etape_type_id: EtapeTypeId; communes: CommuneId[] } + +const erreurLorsDeLaGestionDesDroitsDeLEtape = "Une erreur est survenue lors de la gestion des droits de l'étape" as const +const cantReadEtapeError = "Droits insuffisant pour lire l'étape" as const +type GetPerimetreInfosInternalErrors = + | EffectDbQueryAndValidateErrors + | GetDemarcheByIdOrSlugErrors + | GetTitreByIdOrSlugErrors + | typeof cantReadEtapeError + | typeof erreurLorsDeLaGestionDesDroitsDeLEtape +const getPerimetreInfosInternal = (pool: Pool, user: User, etape: GetPerimetreInfosInternalEtape): Effect.Effect<PerimetreInformations, CaminoError<GetPerimetreInfosInternalErrors>> => + Effect.Do.pipe( + Effect.bind('demarche', () => getDemarcheByIdOrSlug(pool, etape.demarche_id)), + Effect.bind('titre', ({ demarche }) => getTitreByIdOrSlug(pool, demarche.titre_id)), + Effect.bind('canReadEtape', ({ demarche, titre }) => + Effect.tryPromise({ + try: () => + canReadEtape( + user, + memoize(() => Promise.resolve(titre.titre_type_id)), + memoize(() => getAdministrationsLocalesByTitreId(pool, demarche.titre_id)), + memoize(() => getTitulairesAmodiatairesByTitreId(pool, demarche.titre_id)), + etape.etape_type_id, + { ...demarche, titre_public_lecture: titre.public_lecture } + ), + + catch: e => ({ message: erreurLorsDeLaGestionDesDroitsDeLEtape, extra: e }), + }) + ), + Effect.filterOrFail( + ({ canReadEtape }) => canReadEtape, + () => ({ message: cantReadEtapeError }) + ), + Effect.bind('superpositionAlertes', ({ titre }) => getAlertesSuperposition(etape.geojson4326_perimetre, titre.titre_type_id, titre.titre_slug, user, pool)), + Effect.map(({ superpositionAlertes }) => { + const response: PerimetreInformations = { + communes: etape.communes, + sdomZoneIds: etape.sdom_zones, + superposition_alertes: superpositionAlertes, } - } - } + return response + }) + ) const shapeValidator = z.array(polygonValidator.or(multiPolygonValidator)).max(1).min(1) const geojsonValidator = featureCollectionMultipolygonValidator.or(featureCollectionPolygonValidator) diff --git a/packages/api/src/api/rest/utilisateurs.ts b/packages/api/src/api/rest/utilisateurs.ts index 736f946f588af8286727481c39211b665dbb53e0..d6a30267b6c96c90f516618969e626a89248529e 100644 --- a/packages/api/src/api/rest/utilisateurs.ts +++ b/packages/api/src/api/rest/utilisateurs.ts @@ -199,7 +199,7 @@ export const utilisateurs = const format = searchParams.format - const entreprises = await getEntreprises(pool) + const entreprises = await callAndExit(getEntreprises(pool)) const contenu = tableConvert('utilisateurs', utilisateursFormatTable(utilisateurs, entreprises), format) return contenu diff --git a/packages/api/src/scripts/matrices.ts b/packages/api/src/scripts/matrices.ts index 6d05d8b7576835b8ca9d3efe87bc2829fc75088e..ef373870323c6b2d1a4b74d39e70e7b8e6dc7421 100644 --- a/packages/api/src/scripts/matrices.ts +++ b/packages/api/src/scripts/matrices.ts @@ -314,7 +314,7 @@ const matrices = async (annee: CaminoAnnee, pool: Pool): Promise<void> => { userSuper ) - const entreprises = await getEntreprises(pool) + const entreprises = await callAndExit(getEntreprises(pool)) const communesIds = titres .flatMap(({ communes }) => communes?.map(({ id }) => id)) diff --git a/packages/api/src/server/rest.ts b/packages/api/src/server/rest.ts index 6c46c9ee09f0756b7bbcacc4ac1273446c3aeeda..23e4532552485033dae87612ffa7edaafa15383b 100644 --- a/packages/api/src/server/rest.ts +++ b/packages/api/src/server/rest.ts @@ -49,7 +49,7 @@ import { SendFileOptions } from 'express-serve-static-core' import { activiteDocumentDownload, getActivite, updateActivite, deleteActivite } from '../api/rest/activites' import { isNotNullNorUndefined, isNullOrUndefined } from 'camino-common/src/typescript-tools' import { getDemarcheByIdOrSlugApi, demarcheSupprimer, demarcheCreer, getDemarchesEnConcurrence, getResultatEnConcurrence } from '../api/rest/demarches' -import { geojsonImport, geojsonImportPoints, getPerimetreInfos, geojsonImportForages } from '../api/rest/perimetre' +import { geojsonImport, geojsonImportPoints, geojsonImportForages, getPerimetreInfosByDemarche, getPerimetreInfosByEtape } from '../api/rest/perimetre' import { getDataGouvStats } from '../api/rest/statistiques/datagouv' import { addAdministrationActiviteTypeEmails, deleteAdministrationActiviteTypeEmails, getAdministrationActiviteTypeEmails, getAdministrationUtilisateurs } from '../api/rest/administrations' import { titreDemandeCreer } from '../api/rest/titre-demande' @@ -219,10 +219,10 @@ const restRouteImplementations: Readonly<{ [key in CaminoRestRoute]: Transform<k newDeleteCall: deleteEntrepriseDocument, ...CaminoRestRoutes['/rest/entreprises/:entrepriseId/documents/:entrepriseDocumentId'], }, - '/rest/entreprises': { postCall: creerEntreprise, getCall: getAllEntreprises, ...CaminoRestRoutes['/rest/entreprises'] }, - '/rest/administrations/:administrationId/utilisateurs': { getCall: getAdministrationUtilisateurs, ...CaminoRestRoutes['/rest/administrations/:administrationId/utilisateurs'] }, + '/rest/entreprises': { newPostCall: creerEntreprise, newGetCall: getAllEntreprises, ...CaminoRestRoutes['/rest/entreprises'] }, + '/rest/administrations/:administrationId/utilisateurs': { newGetCall: getAdministrationUtilisateurs, ...CaminoRestRoutes['/rest/administrations/:administrationId/utilisateurs'] }, '/rest/administrations/:administrationId/activiteTypeEmails': { - getCall: getAdministrationActiviteTypeEmails, + newGetCall: getAdministrationActiviteTypeEmails, newPostCall: addAdministrationActiviteTypeEmails, ...CaminoRestRoutes['/rest/administrations/:administrationId/activiteTypeEmails'], }, @@ -230,8 +230,8 @@ const restRouteImplementations: Readonly<{ [key in CaminoRestRoute]: Transform<k newPostCall: deleteAdministrationActiviteTypeEmails, ...CaminoRestRoutes['/rest/administrations/:administrationId/activiteTypeEmails/delete'], }, - '/rest/demarches/:demarcheId/geojson': { getCall: getPerimetreInfos, ...CaminoRestRoutes['/rest/demarches/:demarcheId/geojson'] }, - '/rest/etapes/:etapeId/geojson': { getCall: getPerimetreInfos, ...CaminoRestRoutes['/rest/etapes/:etapeId/geojson'] }, + '/rest/demarches/:demarcheId/geojson': { newGetCall: getPerimetreInfosByDemarche, ...CaminoRestRoutes['/rest/demarches/:demarcheId/geojson'] }, + '/rest/etapes/:etapeId/geojson': { newGetCall: getPerimetreInfosByEtape, ...CaminoRestRoutes['/rest/etapes/:etapeId/geojson'] }, '/rest/etapes/:etapeIdOrSlug': { deleteCall: deleteEtape, getCall: getEtape, ...CaminoRestRoutes['/rest/etapes/:etapeIdOrSlug'] }, '/rest/etapes': { newPostCall: createEtape, newPutCall: updateEtape, ...CaminoRestRoutes['/rest/etapes'] }, '/rest/etapes/:etapeId/depot': { newPutCall: deposeEtape, ...CaminoRestRoutes['/rest/etapes/:etapeId/depot'] }, diff --git a/packages/api/src/tools/matrices/tests-creation.ts b/packages/api/src/tools/matrices/tests-creation.ts index 421069c5739a9fcea7fd0e1ab58f737f1e9ccf5b..33ae0f5d72788863905202c59342340c0cface71 100644 --- a/packages/api/src/tools/matrices/tests-creation.ts +++ b/packages/api/src/tools/matrices/tests-creation.ts @@ -17,6 +17,7 @@ import { CommuneId, communeIdValidator } from 'camino-common/src/static/communes import { idGenerate, newTitreId } from '../../database/models/_format/id-create' import { RawLineMatrice, getRawLines } from '../../business/matrices' import { isNotNullNorUndefined, RecordPartial } from 'camino-common/src/typescript-tools' +import { callAndExit } from '../fp-tools' // Le pool ne doit être qu'aux entrypoints : le daily, le monthly, et l'application. const pool = new pg.Pool({ host: config().PGHOST, @@ -100,7 +101,7 @@ export type BodyMatrice = { const writeMatricesForTest = async () => { const user = userSuper const testBody: BodyMatrice[] = [] - const entreprises = await getEntreprises(pool) + const entreprises = await callAndExit(getEntreprises(pool)) const annees = [toCaminoAnnee(2023), toCaminoAnnee(2022)] as const for (const annee of annees) { diff --git a/packages/common/src/rest.ts b/packages/common/src/rest.ts index 4b7ff3fb344973e06110dc6c6fde9a321a297c55..ddfe8a7f8795f1674fae86a06463a4ef8ce3b9c4 100644 --- a/packages/common/src/rest.ts +++ b/packages/common/src/rest.ts @@ -180,7 +180,11 @@ export const CaminoRestRoutes = { '/rest/statistiques/dgtm': { params: noParamsValidator, get: { output: statistiquesDGTMValidator } }, '/rest/entreprises/:entrepriseId/fiscalite/:annee': { params: z.object({ entrepriseId: entrepriseIdValidator, annee: caminoAnneeValidator }), get: { output: fiscaliteValidator } }, - '/rest/entreprises': { params: noParamsValidator, post: { input: z.object({ siren: sirenValidator }), output: z.void() }, get: { output: z.array(entrepriseValidator) } }, + '/rest/entreprises': { + params: noParamsValidator, + newPost: { input: z.object({ siren: sirenValidator }), output: z.object({ id: entrepriseIdValidator }) }, + newGet: { output: z.array(entrepriseValidator) }, + }, '/rest/entreprises/:entrepriseId': { params: entrepriseIdParamsValidator, newGet: { output: entrepriseTypeValidator }, @@ -195,10 +199,10 @@ export const CaminoRestRoutes = { params: z.object({ entrepriseId: entrepriseIdValidator, entrepriseDocumentId: entrepriseDocumentIdValidator }), newDelete: true, }, - '/rest/administrations/:administrationId/utilisateurs': { params: administrationIdParamsValidator, get: { output: z.array(adminUserNotNullValidator) } }, + '/rest/administrations/:administrationId/utilisateurs': { params: administrationIdParamsValidator, newGet: { output: z.array(adminUserNotNullValidator) } }, '/rest/administrations/:administrationId/activiteTypeEmails': { params: administrationIdParamsValidator, - get: { output: z.array(administrationActiviteTypeEmailValidator) }, + newGet: { output: z.array(administrationActiviteTypeEmailValidator) }, newPost: { input: administrationActiviteTypeEmailValidator, output: z.boolean() }, }, '/rest/administrations/:administrationId/activiteTypeEmails/delete': { @@ -210,10 +214,10 @@ export const CaminoRestRoutes = { params: z.object({ demarcheId: demarcheIdValidator, date: caminoDateValidator }), newGet: { output: etapeTypeEtapeStatutWithMainStepValidator, searchParams: z.object({ etapeId: etapeIdValidator.optional() }) }, }, - '/rest/demarches/:demarcheId/geojson': { params: z.object({ demarcheId: demarcheIdOrSlugValidator }), get: { output: perimetreInformationsValidator } }, + '/rest/demarches/:demarcheId/geojson': { params: z.object({ demarcheId: demarcheIdOrSlugValidator }), newGet: { output: perimetreInformationsValidator } }, '/rest/demarches/:demarcheId/miseEnConcurrence': { params: z.object({ demarcheId: demarcheIdValidator }), newGet: { output: z.array(getDemarcheMiseEnConcurrenceValidator) } }, '/rest/demarches/:demarcheId/resultatMiseEnConcurrence': { params: z.object({ demarcheId: demarcheIdValidator }), newGet: { output: getResultatMiseEnConcurrenceValidator } }, - '/rest/etapes/:etapeId/geojson': { params: z.object({ etapeId: etapeIdOrSlugValidator }), get: { output: perimetreInformationsValidator } }, + '/rest/etapes/:etapeId/geojson': { params: z.object({ etapeId: etapeIdOrSlugValidator }), newGet: { output: perimetreInformationsValidator } }, '/rest/etapes/:etapeId/etapeDocuments': { params: etapeIdParamsValidator, get: { output: getEtapeDocumentsByEtapeIdValidator } }, '/rest/etapes/:etapeId/etapeAvis': { params: etapeIdParamsValidator, get: { output: getEtapeAvisByEtapeIdValidator } }, '/rest/etapes/:etapeId/entrepriseDocuments': { params: etapeIdParamsValidator, get: { output: z.array(etapeEntrepriseDocumentValidator) } }, diff --git a/packages/ui/src/api/client-rest.ts b/packages/ui/src/api/client-rest.ts index cdcef8c9a1afc6baf10db046c5344fd712b127a5..5d327396332f46463af8ad9a1f61f5ea037eabd7 100644 --- a/packages/ui/src/api/client-rest.ts +++ b/packages/ui/src/api/client-rest.ts @@ -82,6 +82,9 @@ type GetWithJsonArgs<T extends GetRestRoutes | NewGetRestRoutes, Method extends ? [path: T, params: CaminoRestParams<T>, searchParams: (typeof CaminoRestRoutes)[T][Method]['searchParams']['_input']] : [path: T, params: CaminoRestParams<T>] +/** + * @deprecated use newGetWithJson + **/ export const getWithJson = async <T extends GetRestRoutes>(...args: GetWithJsonArgs<T, 'get'>): Promise<z.infer<(typeof CaminoRestRoutes)[T]['get']['output']>> => callFetch(args[0], args[1], 'get', args.length === 3 ? args[2] : {}) @@ -176,9 +179,15 @@ export const newDeleteWithJson = async <T extends NewDeleteRestRoutes>(path: T, } } +/** + * @deprecated use deleteWithJson + **/ export const deleteWithJson = async <T extends DeleteRestRoutes>(path: T, params: CaminoRestParams<T>, searchParams: Record<string, string | string[]> = {}): Promise<void> => callFetch(path, params, 'delete', searchParams) +/** + * @deprecated use newPostWithJson + **/ export const postWithJson = async <T extends PostRestRoutes>( path: T, params: CaminoRestParams<T>, @@ -212,7 +221,9 @@ export const newPostWithJson = async <T extends NewPostRestRoutes>( return { ...errorMessage, extra: e } } } - +/** + * @deprecated use newPutWithJson + **/ export const putWithJson = async <T extends PutRestRoutes>( path: T, params: CaminoRestParams<T>, diff --git a/packages/ui/src/components/administration.stories.tsx b/packages/ui/src/components/administration.stories.tsx index 56bd6a796db8a4d713b1ecde5249944f40da6ad9..2ea347e600832f17bb1e82d4da359571e47cb2d0 100644 --- a/packages/ui/src/components/administration.stories.tsx +++ b/packages/ui/src/components/administration.stories.tsx @@ -15,12 +15,11 @@ const meta: Meta = { export default meta const administrationActiviteTypeEmailUpdateAction = action('administrationActiviteTypeEmailUpdate') const administrationActiviteTypeEmailDeleteAction = action('administrationActiviteTypeEmailDelete') - export const Default: StoryFn = () => ( <PureAdministration administrationId={ADMINISTRATION_IDS['DGTM - GUYANE']} user={{ - role: 'super', + role: 'defaut', ...testBlankUser, }} entreprises={[]} @@ -58,3 +57,81 @@ export const Default: StoryFn = () => ( }} /> ) + +export const Administration: StoryFn = () => ( + <PureAdministration + administrationId={ADMINISTRATION_IDS['DGTM - GUYANE']} + user={{ + role: 'admin', + administrationId: ADMINISTRATION_IDS['DGTM - GUYANE'], + ...testBlankUser, + }} + entreprises={[]} + apiClient={{ + administrationActivitesTypesEmails: (_: AdministrationId) => + Promise.resolve([ + { + email: 'toto@toto.com', + activite_type_id: ACTIVITES_TYPES_IDS["rapport d'exploitation (autorisations M)"], + }, + ]), + administrationUtilisateurs: (_: AdministrationId) => + Promise.resolve([ + { + prenom: 'Jean', + nom: 'Michel', + email: 'jean.michel@gmail.com', + id: toUtilisateurId('jeanmichel'), + role: 'admin', + administrationId: ADMINISTRATION_IDS.BRGM, + telephone_fixe: null, + telephone_mobile: null, + }, + ]), + administrationActiviteTypeEmailUpdate: () => { + administrationActiviteTypeEmailUpdateAction() + + return Promise.resolve(true) + }, + administrationActiviteTypeEmailDelete: () => { + administrationActiviteTypeEmailDeleteAction() + + return Promise.resolve(true) + }, + }} + /> +) + +export const Loading: StoryFn = () => ( + <PureAdministration + administrationId={ADMINISTRATION_IDS['DGTM - GUYANE']} + user={{ + role: 'super', + ...testBlankUser, + }} + entreprises={[]} + apiClient={{ + administrationActivitesTypesEmails: (_: AdministrationId) => new Promise(() => ({})), + administrationUtilisateurs: (_: AdministrationId) => new Promise(() => ({})), + administrationActiviteTypeEmailUpdate: () => new Promise(() => ({})), + administrationActiviteTypeEmailDelete: () => new Promise(() => ({})), + }} + /> +) + +export const WithError: StoryFn = () => ( + <PureAdministration + administrationId={ADMINISTRATION_IDS['DGTM - GUYANE']} + user={{ + role: 'super', + ...testBlankUser, + }} + entreprises={[]} + apiClient={{ + administrationActivitesTypesEmails: (_: AdministrationId) => Promise.resolve({ message: 'Une erreur' }), + administrationUtilisateurs: (_: AdministrationId) => Promise.resolve({ message: 'Une erreur' }), + administrationActiviteTypeEmailUpdate: () => Promise.resolve({ message: 'Une erreur' }), + administrationActiviteTypeEmailDelete: () => Promise.resolve({ message: 'Une erreur' }), + }} + /> +) diff --git a/packages/ui/src/components/administration.stories_snapshots_Administration.html b/packages/ui/src/components/administration.stories_snapshots_Administration.html new file mode 100644 index 0000000000000000000000000000000000000000..13bb81ab88993fc5b4b304294493f8e09a08c442 --- /dev/null +++ b/packages/ui/src/components/administration.stories_snapshots_Administration.html @@ -0,0 +1,668 @@ +<div><a href="/mocked-href" title="Administrations" class="fr-link" aria-label="Administrations">Administrations</a> + <div class="fr-grid-row fr-mt-4w" style="align-items: center;"> + <h1 class="fr-m-0">Direction Générale des Territoires et de la Mer de Guyane</h1><span class="fr-h4 fr-m-0 fr-ml-2w">(DGTM - Guyane)</span> + </div> + <div class="fr-pt-8w fr-pb-4w" style="display: flex; gap: 2rem; flex-direction: column;"> + <div class="fr-grid-row"><span class="fr-col-12 fr-col-sm-3 fr-h6" style="margin: 0px;">Type</span><span class="fr-col-12 fr-col-sm">Dréal</span></div> + <div class="fr-grid-row"><span class="fr-col-12 fr-col-sm-3 fr-h6" style="margin: 0px;">Service</span><span class="fr-col-12 fr-col-sm"></span></div> + <div class="fr-grid-row"><span class="fr-col-12 fr-col-sm-3 fr-h6" style="margin: 0px;">Adresse</span><span class="fr-col-12 fr-col-sm"><p>Route du Vieux-Port +97300 Cayenne<span><br>Adresse postale +Route du Vieux-Port +CS 76003 +97306 Cayenne</span><br>97300 Cayenne</p></span></div> + <div class="fr-grid-row"><span class="fr-col-12 fr-col-sm-3 fr-h6" style="margin: 0px;">Téléphone</span><span class="fr-col-12 fr-col-sm">+594 5 94 39 80 00</span></div> + <div class="fr-grid-row"><span class="fr-col-12 fr-col-sm-3 fr-h6" style="margin: 0px;">Email</span><span class="fr-col-12 fr-col-sm"><span>–</span></span></div> + <div class="fr-grid-row"><span class="fr-col-12 fr-col-sm-3 fr-h6" style="margin: 0px;">Site</span><span class="fr-col-12 fr-col-sm"><a class="fr-link" title="https://www.guyane.gouv.fr" href="https://www.guyane.gouv.fr" target="_blank" rel="noopener noreferrer">https://www.guyane.gouv.fr</a></span></div> + <!----> + <div class="fr-grid-row"><span class="fr-col-12 fr-col-sm-3 fr-h6" style="margin: 0px;">Région</span><span class="fr-col-12 fr-col-sm">Guyane</span></div> + <!----> + </div> + <div> + <div> + <div class="fr-table fr-table--no-scroll" style="overflow: auto;"> + <div class="fr-table__wrapper" style="width: auto;"> + <div class="fr-table__container"> + <div class="fr-table__content"> + <table style="display: table; width: 100%;"> + <caption>Utilisateurs</caption> + <thead> + <tr> + <th scope="col">Nom</th> + <th scope="col">Prénom</th> + <th scope="col">Email</th> + <th scope="col">Rôle</th> + <th scope="col">Lien</th> + </tr> + </thead> + <tbody> + <tr> + <td><a class="fr-link" to="{name:utilisateur,params:{id:jeanmichel}}" type="primary"><span class="">Michel</span></a></td> + <td><span class="">Jean</span></td> + <td><span class="h6">jean.michel@gmail.com</span></td> + <td><span class="bg-neutral color-bg pill py-xs px-s small bold">admin</span></td> + <td><span class="mb--xs"><ul><li class="fr-text--xs">BRGM</li></ul></span></td> + </tr> + </tbody> + </table> + </div> + </div> + </div> + </div> + </div> + </div> + <h2>Emails</h2> + <div> + <h3>Emails à notifier lors du dépôt d’un type d’activité</h3> + <div> + <div class="h6"> + <p>Lors d’un dépôt d’une activité d’un type en particulier + <!---->, quels sont les emails à notifier ? + </p> + </div> + </div> + <hr> + <div> + <div> + <div class="fr-table fr-table--no-caption fr-table--no-scroll" style="overflow: auto;"> + <div class="fr-table__wrapper" style="width: auto;"> + <div class="fr-table__container"> + <div class="fr-table__content"> + <table style="display: table; width: 100%;"> + <caption></caption> + <thead> + <tr> + <th scope="col">Type d'activité</th> + <th scope="col">Email</th> + <th scope="col" class="fr-cell--bottom">Actions</th> + </tr> + </thead> + <tbody> + <tr> + <td> + <div class="fr-select-group"><label class="fr-label" for="activites_type">Activité (optionnel) + <!----> + </label><select class="fr-select" id="activites_type" aria-label="Activité" name="activites_type"> + <option value="gra">Rapport d'exploitation (permis et concessions M) (GRA)</option> + <option value="grp">Rapport trimestriel d'exploitation d'or en Guyane (GRP)</option> + <option value="grx">Rapport d'exploitation (autorisations M) (GRX)</option> + <option value="pma">Rapport d'intensité d'exploration (PMA)</option> + <option value="pmb">Rapport financier d'exploration (PMB)</option> + <option value="pmc">Rapport environnemental d'exploration (PMC)</option> + <option value="pmd">Rapport social et économique d'exploration (PMD)</option> + <option value="wrp">Rapport d'exploitation (permis et concessions W) (WRP)</option> + <option selected="" disabled="" hidden="" value="">Selectionnez une option</option> + </select></div> + </td> + <td> + <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="activites_email">Email (optionnel) + <!----> + <!----> + </label><input class="fr-input" name="activites_email" id="activites_email" type="email"> + <!----> + </div> + </td> + <td class="fr-cell--bottom"><button class="fr-btn fr-btn--primary fr-btn--md fr-icon-add-line" disabled="" title="Ajouter un email pour un type d'activité" aria-label="Ajouter un email pour un type d'activité" type="button"> + <!----> + </button></td> + </tr> + <tr> + <td><span class="">Rapport d'exploitation (autorisations M) (GRX)</span></td> + <td><span class="">toto@toto.com</span></td> + <td class="fr-cell--bottom"><button class="fr-btn fr-btn--secondary fr-btn--md fr-icon-delete-bin-line" title="Supprimer un email pour un type d’activité" aria-label="Supprimer un email pour un type d’activité" type="button"> + <!----> + </button></td> + </tr> + </tbody> + </table> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + <div> + <h2>Permissions</h2> + <div> + <div> + <h3>Administration gestionnaire ou associée</h3> + <div class="h6"> + <ul> + <li>Un utilisateur d'une <b>administration gestionnaire</b> peut créer et modifier les titres et leur contenu.</li> + <li>Un utilisateur d'une <b>administration associée</b> peut voir les titres non-publics. Cette administration n'apparaît pas sur les pages des titres.</li> + </ul> + </div> + <hr> + <div> + <div class="fr-table fr-table--no-caption fr-table--no-scroll" style="overflow: auto;"> + <div class="fr-table__wrapper" style="width: auto;"> + <div class="fr-table__container"> + <div class="fr-table__content"> + <table style="display: table; width: 100%;"> + <caption></caption> + <thead> + <tr> + <th scope="col">Domaine</th> + <th scope="col">Type de titre</th> + <th scope="col">Gestionnaire</th> + <th scope="col">Associée</th> + </tr> + </thead> + <tbody> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine géothermie" aria-label="Domaine géothermie" style="min-width: 2rem; background-color: var(--background-contrast-pink-tuile); color: black;">G</p> + </td> + <td><span class="">Permis d'exploitation</span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Est gestionnaire de ce type de titre"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="N’est pas associée à ce type de titre"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine géothermie" aria-label="Domaine géothermie" style="min-width: 2rem; background-color: var(--background-contrast-pink-tuile); color: black;">G</p> + </td> + <td><span class="">Autorisation de recherches</span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Est gestionnaire de ce type de titre"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="N’est pas associée à ce type de titre"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Autorisation de recherches</span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Est gestionnaire de ce type de titre"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="N’est pas associée à ce type de titre"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Autorisation d'exploitation</span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Est gestionnaire de ce type de titre"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="N’est pas associée à ce type de titre"></span></td> + </tr> + </tbody> + </table> + </div> + </div> + </div> + </div> + </div> + </div> + <div> + <h3>Restrictions de l'édition des titres, démarches et étapes</h3> + <div class="h6"> + <p class="mb-s">Par défaut :</p> + <ul class="mb-s"> + <li>Un utilisateur d'une administration gestionnaire peut modifier les titres, démarches et étapes.</li> + <li>Un utilisateur d'une administration locale peut modifier les démarches et étapes.</li> + </ul> + <p>Restreint ces droits par domaine / type de titre / statut de titre.</p> + </div> + <hr> + <div> + <div class="fr-table fr-table--no-caption fr-table--no-scroll" style="overflow: auto;"> + <div class="fr-table__wrapper" style="width: auto;"> + <div class="fr-table__container"> + <div class="fr-table__content"> + <table style="display: table; width: 100%;"> + <caption></caption> + <thead> + <tr> + <th scope="col">Domaine</th> + <th scope="col">Type de titre</th> + <th scope="col">Statut de titre</th> + <th scope="col">Titres</th> + <th scope="col">Démarches</th> + <th scope="col">Étapes</th> + </tr> + </thead> + <tbody> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td> + <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--beige-gris-galet" title="demande classée" aria-label="demande classée">demande classée</p> + </td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td> + <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--orange-terre-battue" title="demande initiale" aria-label="demande initiale">demande initiale</p> + </td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td> + <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--beige-gris-galet" title="échu" aria-label="échu">échu</p> + </td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td> + <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--beige-gris-galet" title="indéterminé" aria-label="indéterminé">indéterminé</p> + </td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td> + <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--green-bourgeon" title="valide - modification en instance" aria-label="valide - modification en instance">valide - modification en instance</p> + </td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td> + <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--green-bourgeon" title="valide - survie provisoire" aria-label="valide - survie provisoire">valide - survie provisoire</p> + </td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td> + <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--green-bourgeon" title="valide" aria-label="valide">valide</p> + </td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> + </tr> + </tbody> + </table> + </div> + </div> + </div> + </div> + </div> + </div> + <div> + <h3>Restrictions de la visibilité, édition et création des étapes</h3> + <div class="h6"> + <p class="mb-s">Par défaut, un utilisateur d'une administration gestionnaire ou locale peut voir, modifier et créer des étapes des titre.</p> + <p>Restreint ces droits par domaine / type de titre / type d'étape.</p> + </div> + <hr> + <div> + <div class="fr-table fr-table--no-caption fr-table--no-scroll" style="overflow: auto;"> + <div class="fr-table__wrapper" style="width: auto;"> + <div class="fr-table__container"> + <div class="fr-table__content"> + <table style="display: table; width: 100%;"> + <caption></caption> + <thead> + <tr> + <th scope="col">Domaine</th> + <th scope="col">Type de titre</th> + <th scope="col">Type d'étape</th> + <th scope="col">Visibilité</th> + <th scope="col">Modification</th> + <th scope="col">Création</th> + </tr> + </thead> + <tbody> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Abrogation de la décision</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Décision du juge administratif</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Avis du Conseil d'Etat</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Classement sans suite</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Désistement du demandeur</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Décision de l'autorité administrative</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Publication de décision au JORF</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Avis de demande concurrente</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Enregistrement de la demande</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Demande</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Information du préfet et des collectivités</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Consultation du public</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Rapport du Conseil d'État</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Saisine de l'autorité signataire</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Saisines et avis du conseil général de l'économie (CGE) et de l'autorité environnementale (AE)</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Saisine du Conseil d'Etat</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Saisine du préfet</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Abrogation de la décision</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Décision du juge administratif</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Publication de l'avis de décision implicite</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Classement sans suite</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Désistement du demandeur</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Décision de l'autorité administrative</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Publication de décision au JORF</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Avis de demande concurrente</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Enregistrement de la demande</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Demande</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Information du préfet et des collectivités</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Consultation du public</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Saisine de l'autorité signataire</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Saisines et avis du conseil général de l'économie (CGE) et de l'autorité environnementale (AE)</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Saisine du préfet</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + </tbody> + </table> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> +</div> \ No newline at end of file diff --git a/packages/ui/src/components/administration.stories_snapshots_Default.html b/packages/ui/src/components/administration.stories_snapshots_Default.html index a77ed5e843fe50dea2cb533a98ba605c49055545..7f5138331fe81f0db7c2d9909a0dfeb6ba184e40 100644 --- a/packages/ui/src/components/administration.stories_snapshots_Default.html +++ b/packages/ui/src/components/administration.stories_snapshots_Default.html @@ -15,654 +15,9 @@ CS 76003 <div class="fr-grid-row"><span class="fr-col-12 fr-col-sm-3 fr-h6" style="margin: 0px;">Site</span><span class="fr-col-12 fr-col-sm"><a class="fr-link" title="https://www.guyane.gouv.fr" href="https://www.guyane.gouv.fr" target="_blank" rel="noopener noreferrer">https://www.guyane.gouv.fr</a></span></div> <!----> <div class="fr-grid-row"><span class="fr-col-12 fr-col-sm-3 fr-h6" style="margin: 0px;">Région</span><span class="fr-col-12 fr-col-sm">Guyane</span></div> - <p class="fr-text--lg">Un utilisateur d'une <b>administration locale</b> peut créer et modifier le contenu des titres du territoire concerné.</p> - </div> - <div> - <div> - <div class="fr-table fr-table--no-scroll" style="overflow: auto;"> - <div class="fr-table__wrapper" style="width: auto;"> - <div class="fr-table__container"> - <div class="fr-table__content"> - <table style="display: table; width: 100%;"> - <caption>Utilisateurs</caption> - <thead> - <tr> - <th scope="col">Nom</th> - <th scope="col">Prénom</th> - <th scope="col">Email</th> - <th scope="col">Rôle</th> - <th scope="col">Lien</th> - </tr> - </thead> - <tbody> - <tr> - <td><a class="fr-link" to="{name:utilisateur,params:{id:jeanmichel}}" type="primary"><span class="">Michel</span></a></td> - <td><span class="">Jean</span></td> - <td><span class="h6">jean.michel@gmail.com</span></td> - <td><span class="bg-neutral color-bg pill py-xs px-s small bold">admin</span></td> - <td><span class="mb--xs"><ul><li class="fr-text--xs">BRGM</li></ul></span></td> - </tr> - </tbody> - </table> - </div> - </div> - </div> - </div> - </div> - </div> - <h2>Emails</h2> - <div> - <h3>Emails à notifier lors du dépôt d’un type d’activité</h3> - <div> - <div class="h6"> - <p>Lors d’un dépôt d’une activité d’un type en particulier - <!---->, quels sont les emails à notifier ? - </p> - </div> - </div> - <hr> - <div> - <div> - <div class="fr-table fr-table--no-caption fr-table--no-scroll" style="overflow: auto;"> - <div class="fr-table__wrapper" style="width: auto;"> - <div class="fr-table__container"> - <div class="fr-table__content"> - <table style="display: table; width: 100%;"> - <caption></caption> - <thead> - <tr> - <th scope="col">Type d'activité</th> - <th scope="col">Email</th> - <th scope="col" class="fr-cell--bottom">Actions</th> - </tr> - </thead> - <tbody> - <tr> - <td> - <div class="fr-select-group"><label class="fr-label" for="activites_type">Activité (optionnel) - <!----> - </label><select class="fr-select" id="activites_type" aria-label="Activité" name="activites_type"> - <option value="gra">Rapport d'exploitation (permis et concessions M) (GRA)</option> - <option value="grp">Rapport trimestriel d'exploitation d'or en Guyane (GRP)</option> - <option value="grx">Rapport d'exploitation (autorisations M) (GRX)</option> - <option value="pma">Rapport d'intensité d'exploration (PMA)</option> - <option value="pmb">Rapport financier d'exploration (PMB)</option> - <option value="pmc">Rapport environnemental d'exploration (PMC)</option> - <option value="pmd">Rapport social et économique d'exploration (PMD)</option> - <option value="wrp">Rapport d'exploitation (permis et concessions W) (WRP)</option> - <option selected="" disabled="" hidden="" value="">Selectionnez une option</option> - </select></div> - </td> - <td> - <div class="fr-input-group" style="margin-bottom: 0px;"><label class="fr-label" for="activites_email">Email (optionnel) - <!----> - <!----> - </label><input class="fr-input" name="activites_email" id="activites_email" type="email"> - <!----> - </div> - </td> - <td class="fr-cell--bottom"><button class="fr-btn fr-btn--primary fr-btn--md fr-icon-add-line" disabled="" title="Ajouter un email pour un type d'activité" aria-label="Ajouter un email pour un type d'activité" type="button"> - <!----> - </button></td> - </tr> - <tr> - <td><span class="">Rapport d'exploitation (autorisations M) (GRX)</span></td> - <td><span class="">toto@toto.com</span></td> - <td class="fr-cell--bottom"><button class="fr-btn fr-btn--secondary fr-btn--md fr-icon-delete-bin-line" title="Supprimer un email pour un type d’activité" aria-label="Supprimer un email pour un type d’activité" type="button"> - <!----> - </button></td> - </tr> - </tbody> - </table> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - <div> - <h2>Permissions</h2> - <div> - <div> - <h3>Administration gestionnaire ou associée</h3> - <div class="h6"> - <ul> - <li>Un utilisateur d'une <b>administration gestionnaire</b> peut créer et modifier les titres et leur contenu.</li> - <li>Un utilisateur d'une <b>administration associée</b> peut voir les titres non-publics. Cette administration n'apparaît pas sur les pages des titres.</li> - </ul> - </div> - <hr> - <div> - <div class="fr-table fr-table--no-caption fr-table--no-scroll" style="overflow: auto;"> - <div class="fr-table__wrapper" style="width: auto;"> - <div class="fr-table__container"> - <div class="fr-table__content"> - <table style="display: table; width: 100%;"> - <caption></caption> - <thead> - <tr> - <th scope="col">Domaine</th> - <th scope="col">Type de titre</th> - <th scope="col">Gestionnaire</th> - <th scope="col">Associée</th> - </tr> - </thead> - <tbody> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine géothermie" aria-label="Domaine géothermie" style="min-width: 2rem; background-color: var(--background-contrast-pink-tuile); color: black;">G</p> - </td> - <td><span class="">Permis d'exploitation</span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Est gestionnaire de ce type de titre"></span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="N’est pas associée à ce type de titre"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine géothermie" aria-label="Domaine géothermie" style="min-width: 2rem; background-color: var(--background-contrast-pink-tuile); color: black;">G</p> - </td> - <td><span class="">Autorisation de recherches</span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Est gestionnaire de ce type de titre"></span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="N’est pas associée à ce type de titre"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Autorisation de recherches</span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Est gestionnaire de ce type de titre"></span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="N’est pas associée à ce type de titre"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Autorisation d'exploitation</span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Est gestionnaire de ce type de titre"></span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="N’est pas associée à ce type de titre"></span></td> - </tr> - </tbody> - </table> - </div> - </div> - </div> - </div> - </div> - </div> - <div> - <h3>Restrictions de l'édition des titres, démarches et étapes</h3> - <div class="h6"> - <p class="mb-s">Par défaut :</p> - <ul class="mb-s"> - <li>Un utilisateur d'une administration gestionnaire peut modifier les titres, démarches et étapes.</li> - <li>Un utilisateur d'une administration locale peut modifier les démarches et étapes.</li> - </ul> - <p>Restreint ces droits par domaine / type de titre / statut de titre.</p> - </div> - <hr> - <div> - <div class="fr-table fr-table--no-caption fr-table--no-scroll" style="overflow: auto;"> - <div class="fr-table__wrapper" style="width: auto;"> - <div class="fr-table__container"> - <div class="fr-table__content"> - <table style="display: table; width: 100%;"> - <caption></caption> - <thead> - <tr> - <th scope="col">Domaine</th> - <th scope="col">Type de titre</th> - <th scope="col">Statut de titre</th> - <th scope="col">Titres</th> - <th scope="col">Démarches</th> - <th scope="col">Étapes</th> - </tr> - </thead> - <tbody> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Concession</span></td> - <td> - <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--beige-gris-galet" title="demande classée" aria-label="demande classée">demande classée</p> - </td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Concession</span></td> - <td> - <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--orange-terre-battue" title="demande initiale" aria-label="demande initiale">demande initiale</p> - </td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Concession</span></td> - <td> - <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--beige-gris-galet" title="échu" aria-label="échu">échu</p> - </td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Concession</span></td> - <td> - <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--beige-gris-galet" title="indéterminé" aria-label="indéterminé">indéterminé</p> - </td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Concession</span></td> - <td> - <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--green-bourgeon" title="valide - modification en instance" aria-label="valide - modification en instance">valide - modification en instance</p> - </td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Concession</span></td> - <td> - <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--green-bourgeon" title="valide - survie provisoire" aria-label="valide - survie provisoire">valide - survie provisoire</p> - </td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Concession</span></td> - <td> - <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--green-bourgeon" title="valide" aria-label="valide">valide</p> - </td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> - </tr> - </tbody> - </table> - </div> - </div> - </div> - </div> - </div> - </div> - <div> - <h3>Restrictions de la visibilité, édition et création des étapes</h3> - <div class="h6"> - <p class="mb-s">Par défaut, un utilisateur d'une administration gestionnaire ou locale peut voir, modifier et créer des étapes des titre.</p> - <p>Restreint ces droits par domaine / type de titre / type d'étape.</p> - </div> - <hr> - <div> - <div class="fr-table fr-table--no-caption fr-table--no-scroll" style="overflow: auto;"> - <div class="fr-table__wrapper" style="width: auto;"> - <div class="fr-table__container"> - <div class="fr-table__content"> - <table style="display: table; width: 100%;"> - <caption></caption> - <thead> - <tr> - <th scope="col">Domaine</th> - <th scope="col">Type de titre</th> - <th scope="col">Type d'étape</th> - <th scope="col">Visibilité</th> - <th scope="col">Modification</th> - <th scope="col">Création</th> - </tr> - </thead> - <tbody> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Concession</span></td> - <td><span class="">Abrogation de la décision</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Concession</span></td> - <td><span class="">Décision du juge administratif</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Concession</span></td> - <td><span class="">Avis du Conseil d'Etat</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Concession</span></td> - <td><span class="">Classement sans suite</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Concession</span></td> - <td><span class="">Désistement du demandeur</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Concession</span></td> - <td><span class="">Décision de l'autorité administrative</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Concession</span></td> - <td><span class="">Publication de décision au JORF</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Concession</span></td> - <td><span class="">Avis de demande concurrente</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Concession</span></td> - <td><span class="">Enregistrement de la demande</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Concession</span></td> - <td><span class="">Demande</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Concession</span></td> - <td><span class="">Information du préfet et des collectivités</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Concession</span></td> - <td><span class="">Consultation du public</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Concession</span></td> - <td><span class="">Rapport du Conseil d'État</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Concession</span></td> - <td><span class="">Saisine de l'autorité signataire</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Concession</span></td> - <td><span class="">Saisines et avis du conseil général de l'économie (CGE) et de l'autorité environnementale (AE)</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Concession</span></td> - <td><span class="">Saisine du Conseil d'Etat</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Concession</span></td> - <td><span class="">Saisine du préfet</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Permis exclusif de recherches</span></td> - <td><span class="">Abrogation de la décision</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Permis exclusif de recherches</span></td> - <td><span class="">Décision du juge administratif</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Permis exclusif de recherches</span></td> - <td><span class="">Publication de l'avis de décision implicite</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Permis exclusif de recherches</span></td> - <td><span class="">Classement sans suite</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Permis exclusif de recherches</span></td> - <td><span class="">Désistement du demandeur</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Permis exclusif de recherches</span></td> - <td><span class="">Décision de l'autorité administrative</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Permis exclusif de recherches</span></td> - <td><span class="">Publication de décision au JORF</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Permis exclusif de recherches</span></td> - <td><span class="">Avis de demande concurrente</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Permis exclusif de recherches</span></td> - <td><span class="">Enregistrement de la demande</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Permis exclusif de recherches</span></td> - <td><span class="">Demande</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Permis exclusif de recherches</span></td> - <td><span class="">Information du préfet et des collectivités</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Permis exclusif de recherches</span></td> - <td><span class="">Consultation du public</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Permis exclusif de recherches</span></td> - <td><span class="">Saisine de l'autorité signataire</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Permis exclusif de recherches</span></td> - <td><span class="">Saisines et avis du conseil général de l'économie (CGE) et de l'autorité environnementale (AE)</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - <tr> - <td> - <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> - </td> - <td><span class="">Permis exclusif de recherches</span></td> - <td><span class="">Saisine du préfet</span></td> - <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> - <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> - </tr> - </tbody> - </table> - </div> - </div> - </div> - </div> - </div> - </div> - </div> + <!----> </div> + <!----> + <!----> + <!----> </div> \ No newline at end of file diff --git a/packages/ui/src/components/administration.stories_snapshots_Loading.html b/packages/ui/src/components/administration.stories_snapshots_Loading.html new file mode 100644 index 0000000000000000000000000000000000000000..7f43992459cdc69847a814156deb9f1f3db85fc3 --- /dev/null +++ b/packages/ui/src/components/administration.stories_snapshots_Loading.html @@ -0,0 +1,574 @@ +<div><a href="/mocked-href" title="Administrations" class="fr-link" aria-label="Administrations">Administrations</a> + <div class="fr-grid-row fr-mt-4w" style="align-items: center;"> + <h1 class="fr-m-0">Direction Générale des Territoires et de la Mer de Guyane</h1><span class="fr-h4 fr-m-0 fr-ml-2w">(DGTM - Guyane)</span> + </div> + <div class="fr-pt-8w fr-pb-4w" style="display: flex; gap: 2rem; flex-direction: column;"> + <div class="fr-grid-row"><span class="fr-col-12 fr-col-sm-3 fr-h6" style="margin: 0px;">Type</span><span class="fr-col-12 fr-col-sm">Dréal</span></div> + <div class="fr-grid-row"><span class="fr-col-12 fr-col-sm-3 fr-h6" style="margin: 0px;">Service</span><span class="fr-col-12 fr-col-sm"></span></div> + <div class="fr-grid-row"><span class="fr-col-12 fr-col-sm-3 fr-h6" style="margin: 0px;">Adresse</span><span class="fr-col-12 fr-col-sm"><p>Route du Vieux-Port +97300 Cayenne<span><br>Adresse postale +Route du Vieux-Port +CS 76003 +97306 Cayenne</span><br>97300 Cayenne</p></span></div> + <div class="fr-grid-row"><span class="fr-col-12 fr-col-sm-3 fr-h6" style="margin: 0px;">Téléphone</span><span class="fr-col-12 fr-col-sm">+594 5 94 39 80 00</span></div> + <div class="fr-grid-row"><span class="fr-col-12 fr-col-sm-3 fr-h6" style="margin: 0px;">Email</span><span class="fr-col-12 fr-col-sm"><span>–</span></span></div> + <div class="fr-grid-row"><span class="fr-col-12 fr-col-sm-3 fr-h6" style="margin: 0px;">Site</span><span class="fr-col-12 fr-col-sm"><a class="fr-link" title="https://www.guyane.gouv.fr" href="https://www.guyane.gouv.fr" target="_blank" rel="noopener noreferrer">https://www.guyane.gouv.fr</a></span></div> + <!----> + <div class="fr-grid-row"><span class="fr-col-12 fr-col-sm-3 fr-h6" style="margin: 0px;">Région</span><span class="fr-col-12 fr-col-sm">Guyane</span></div> + <p class="fr-text--lg">Un utilisateur d'une <b>administration locale</b> peut créer et modifier le contenu des titres du territoire concerné.</p> + </div> + <div class="_top-level_3306d0" style="display: flex; justify-content: center;"> + <!----> + <!----> + <div class="_spinner_3306d0"></div> + </div> + <div class="_top-level_3306d0" style="display: flex; justify-content: center;"> + <!----> + <!----> + <div class="_spinner_3306d0"></div> + </div> + <div> + <h2>Permissions</h2> + <div> + <div> + <h3>Administration gestionnaire ou associée</h3> + <div class="h6"> + <ul> + <li>Un utilisateur d'une <b>administration gestionnaire</b> peut créer et modifier les titres et leur contenu.</li> + <li>Un utilisateur d'une <b>administration associée</b> peut voir les titres non-publics. Cette administration n'apparaît pas sur les pages des titres.</li> + </ul> + </div> + <hr> + <div> + <div class="fr-table fr-table--no-caption fr-table--no-scroll" style="overflow: auto;"> + <div class="fr-table__wrapper" style="width: auto;"> + <div class="fr-table__container"> + <div class="fr-table__content"> + <table style="display: table; width: 100%;"> + <caption></caption> + <thead> + <tr> + <th scope="col">Domaine</th> + <th scope="col">Type de titre</th> + <th scope="col">Gestionnaire</th> + <th scope="col">Associée</th> + </tr> + </thead> + <tbody> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine géothermie" aria-label="Domaine géothermie" style="min-width: 2rem; background-color: var(--background-contrast-pink-tuile); color: black;">G</p> + </td> + <td><span class="">Permis d'exploitation</span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Est gestionnaire de ce type de titre"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="N’est pas associée à ce type de titre"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine géothermie" aria-label="Domaine géothermie" style="min-width: 2rem; background-color: var(--background-contrast-pink-tuile); color: black;">G</p> + </td> + <td><span class="">Autorisation de recherches</span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Est gestionnaire de ce type de titre"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="N’est pas associée à ce type de titre"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Autorisation de recherches</span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Est gestionnaire de ce type de titre"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="N’est pas associée à ce type de titre"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Autorisation d'exploitation</span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Est gestionnaire de ce type de titre"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="N’est pas associée à ce type de titre"></span></td> + </tr> + </tbody> + </table> + </div> + </div> + </div> + </div> + </div> + </div> + <div> + <h3>Restrictions de l'édition des titres, démarches et étapes</h3> + <div class="h6"> + <p class="mb-s">Par défaut :</p> + <ul class="mb-s"> + <li>Un utilisateur d'une administration gestionnaire peut modifier les titres, démarches et étapes.</li> + <li>Un utilisateur d'une administration locale peut modifier les démarches et étapes.</li> + </ul> + <p>Restreint ces droits par domaine / type de titre / statut de titre.</p> + </div> + <hr> + <div> + <div class="fr-table fr-table--no-caption fr-table--no-scroll" style="overflow: auto;"> + <div class="fr-table__wrapper" style="width: auto;"> + <div class="fr-table__container"> + <div class="fr-table__content"> + <table style="display: table; width: 100%;"> + <caption></caption> + <thead> + <tr> + <th scope="col">Domaine</th> + <th scope="col">Type de titre</th> + <th scope="col">Statut de titre</th> + <th scope="col">Titres</th> + <th scope="col">Démarches</th> + <th scope="col">Étapes</th> + </tr> + </thead> + <tbody> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td> + <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--beige-gris-galet" title="demande classée" aria-label="demande classée">demande classée</p> + </td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td> + <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--orange-terre-battue" title="demande initiale" aria-label="demande initiale">demande initiale</p> + </td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td> + <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--beige-gris-galet" title="échu" aria-label="échu">échu</p> + </td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td> + <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--beige-gris-galet" title="indéterminé" aria-label="indéterminé">indéterminé</p> + </td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td> + <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--green-bourgeon" title="valide - modification en instance" aria-label="valide - modification en instance">valide - modification en instance</p> + </td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td> + <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--green-bourgeon" title="valide - survie provisoire" aria-label="valide - survie provisoire">valide - survie provisoire</p> + </td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td> + <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--green-bourgeon" title="valide" aria-label="valide">valide</p> + </td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> + </tr> + </tbody> + </table> + </div> + </div> + </div> + </div> + </div> + </div> + <div> + <h3>Restrictions de la visibilité, édition et création des étapes</h3> + <div class="h6"> + <p class="mb-s">Par défaut, un utilisateur d'une administration gestionnaire ou locale peut voir, modifier et créer des étapes des titre.</p> + <p>Restreint ces droits par domaine / type de titre / type d'étape.</p> + </div> + <hr> + <div> + <div class="fr-table fr-table--no-caption fr-table--no-scroll" style="overflow: auto;"> + <div class="fr-table__wrapper" style="width: auto;"> + <div class="fr-table__container"> + <div class="fr-table__content"> + <table style="display: table; width: 100%;"> + <caption></caption> + <thead> + <tr> + <th scope="col">Domaine</th> + <th scope="col">Type de titre</th> + <th scope="col">Type d'étape</th> + <th scope="col">Visibilité</th> + <th scope="col">Modification</th> + <th scope="col">Création</th> + </tr> + </thead> + <tbody> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Abrogation de la décision</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Décision du juge administratif</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Avis du Conseil d'Etat</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Classement sans suite</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Désistement du demandeur</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Décision de l'autorité administrative</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Publication de décision au JORF</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Avis de demande concurrente</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Enregistrement de la demande</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Demande</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Information du préfet et des collectivités</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Consultation du public</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Rapport du Conseil d'État</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Saisine de l'autorité signataire</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Saisines et avis du conseil général de l'économie (CGE) et de l'autorité environnementale (AE)</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Saisine du Conseil d'Etat</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Saisine du préfet</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Abrogation de la décision</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Décision du juge administratif</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Publication de l'avis de décision implicite</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Classement sans suite</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Désistement du demandeur</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Décision de l'autorité administrative</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Publication de décision au JORF</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Avis de demande concurrente</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Enregistrement de la demande</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Demande</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Information du préfet et des collectivités</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Consultation du public</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Saisine de l'autorité signataire</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Saisines et avis du conseil général de l'économie (CGE) et de l'autorité environnementale (AE)</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Saisine du préfet</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + </tbody> + </table> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> +</div> \ No newline at end of file diff --git a/packages/ui/src/components/administration.stories_snapshots_WithError.html b/packages/ui/src/components/administration.stories_snapshots_WithError.html new file mode 100644 index 0000000000000000000000000000000000000000..03107b9437e93ac68023c49a49184ed5329a6226 --- /dev/null +++ b/packages/ui/src/components/administration.stories_snapshots_WithError.html @@ -0,0 +1,578 @@ +<div><a href="/mocked-href" title="Administrations" class="fr-link" aria-label="Administrations">Administrations</a> + <div class="fr-grid-row fr-mt-4w" style="align-items: center;"> + <h1 class="fr-m-0">Direction Générale des Territoires et de la Mer de Guyane</h1><span class="fr-h4 fr-m-0 fr-ml-2w">(DGTM - Guyane)</span> + </div> + <div class="fr-pt-8w fr-pb-4w" style="display: flex; gap: 2rem; flex-direction: column;"> + <div class="fr-grid-row"><span class="fr-col-12 fr-col-sm-3 fr-h6" style="margin: 0px;">Type</span><span class="fr-col-12 fr-col-sm">Dréal</span></div> + <div class="fr-grid-row"><span class="fr-col-12 fr-col-sm-3 fr-h6" style="margin: 0px;">Service</span><span class="fr-col-12 fr-col-sm"></span></div> + <div class="fr-grid-row"><span class="fr-col-12 fr-col-sm-3 fr-h6" style="margin: 0px;">Adresse</span><span class="fr-col-12 fr-col-sm"><p>Route du Vieux-Port +97300 Cayenne<span><br>Adresse postale +Route du Vieux-Port +CS 76003 +97306 Cayenne</span><br>97300 Cayenne</p></span></div> + <div class="fr-grid-row"><span class="fr-col-12 fr-col-sm-3 fr-h6" style="margin: 0px;">Téléphone</span><span class="fr-col-12 fr-col-sm">+594 5 94 39 80 00</span></div> + <div class="fr-grid-row"><span class="fr-col-12 fr-col-sm-3 fr-h6" style="margin: 0px;">Email</span><span class="fr-col-12 fr-col-sm"><span>–</span></span></div> + <div class="fr-grid-row"><span class="fr-col-12 fr-col-sm-3 fr-h6" style="margin: 0px;">Site</span><span class="fr-col-12 fr-col-sm"><a class="fr-link" title="https://www.guyane.gouv.fr" href="https://www.guyane.gouv.fr" target="_blank" rel="noopener noreferrer">https://www.guyane.gouv.fr</a></span></div> + <!----> + <div class="fr-grid-row"><span class="fr-col-12 fr-col-sm-3 fr-h6" style="margin: 0px;">Région</span><span class="fr-col-12 fr-col-sm">Guyane</span></div> + <p class="fr-text--lg">Un utilisateur d'une <b>administration locale</b> peut créer et modifier le contenu des titres du territoire concerné.</p> + </div> + <div class="" style="display: flex; justify-content: center;"> + <!----> + <div class="fr-alert fr-alert--error fr-alert--sm" role="alert"> + <p>Une erreur</p> + </div> + <!----> + </div> + <div class="" style="display: flex; justify-content: center;"> + <!----> + <div class="fr-alert fr-alert--error fr-alert--sm" role="alert"> + <p>Une erreur</p> + </div> + <!----> + </div> + <div> + <h2>Permissions</h2> + <div> + <div> + <h3>Administration gestionnaire ou associée</h3> + <div class="h6"> + <ul> + <li>Un utilisateur d'une <b>administration gestionnaire</b> peut créer et modifier les titres et leur contenu.</li> + <li>Un utilisateur d'une <b>administration associée</b> peut voir les titres non-publics. Cette administration n'apparaît pas sur les pages des titres.</li> + </ul> + </div> + <hr> + <div> + <div class="fr-table fr-table--no-caption fr-table--no-scroll" style="overflow: auto;"> + <div class="fr-table__wrapper" style="width: auto;"> + <div class="fr-table__container"> + <div class="fr-table__content"> + <table style="display: table; width: 100%;"> + <caption></caption> + <thead> + <tr> + <th scope="col">Domaine</th> + <th scope="col">Type de titre</th> + <th scope="col">Gestionnaire</th> + <th scope="col">Associée</th> + </tr> + </thead> + <tbody> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine géothermie" aria-label="Domaine géothermie" style="min-width: 2rem; background-color: var(--background-contrast-pink-tuile); color: black;">G</p> + </td> + <td><span class="">Permis d'exploitation</span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Est gestionnaire de ce type de titre"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="N’est pas associée à ce type de titre"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine géothermie" aria-label="Domaine géothermie" style="min-width: 2rem; background-color: var(--background-contrast-pink-tuile); color: black;">G</p> + </td> + <td><span class="">Autorisation de recherches</span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Est gestionnaire de ce type de titre"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="N’est pas associée à ce type de titre"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Autorisation de recherches</span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Est gestionnaire de ce type de titre"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="N’est pas associée à ce type de titre"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Autorisation d'exploitation</span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Est gestionnaire de ce type de titre"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="N’est pas associée à ce type de titre"></span></td> + </tr> + </tbody> + </table> + </div> + </div> + </div> + </div> + </div> + </div> + <div> + <h3>Restrictions de l'édition des titres, démarches et étapes</h3> + <div class="h6"> + <p class="mb-s">Par défaut :</p> + <ul class="mb-s"> + <li>Un utilisateur d'une administration gestionnaire peut modifier les titres, démarches et étapes.</li> + <li>Un utilisateur d'une administration locale peut modifier les démarches et étapes.</li> + </ul> + <p>Restreint ces droits par domaine / type de titre / statut de titre.</p> + </div> + <hr> + <div> + <div class="fr-table fr-table--no-caption fr-table--no-scroll" style="overflow: auto;"> + <div class="fr-table__wrapper" style="width: auto;"> + <div class="fr-table__container"> + <div class="fr-table__content"> + <table style="display: table; width: 100%;"> + <caption></caption> + <thead> + <tr> + <th scope="col">Domaine</th> + <th scope="col">Type de titre</th> + <th scope="col">Statut de titre</th> + <th scope="col">Titres</th> + <th scope="col">Démarches</th> + <th scope="col">Étapes</th> + </tr> + </thead> + <tbody> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td> + <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--beige-gris-galet" title="demande classée" aria-label="demande classée">demande classée</p> + </td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td> + <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--orange-terre-battue" title="demande initiale" aria-label="demande initiale">demande initiale</p> + </td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td> + <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--beige-gris-galet" title="échu" aria-label="échu">échu</p> + </td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td> + <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--beige-gris-galet" title="indéterminé" aria-label="indéterminé">indéterminé</p> + </td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td> + <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--green-bourgeon" title="valide - modification en instance" aria-label="valide - modification en instance">valide - modification en instance</p> + </td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td> + <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--green-bourgeon" title="valide - survie provisoire" aria-label="valide - survie provisoire">valide - survie provisoire</p> + </td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td> + <p style="z-index: unset; margin-bottom: 0px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;" class="fr-badge fr-badge--md fr-badge--green-bourgeon" title="valide" aria-label="valide">valide</p> + </td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des titres est interdite"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="La modification des démarches est interdite"></span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="La modification des étapes est autorisée"></span></td> + </tr> + </tbody> + </table> + </div> + </div> + </div> + </div> + </div> + </div> + <div> + <h3>Restrictions de la visibilité, édition et création des étapes</h3> + <div class="h6"> + <p class="mb-s">Par défaut, un utilisateur d'une administration gestionnaire ou locale peut voir, modifier et créer des étapes des titre.</p> + <p>Restreint ces droits par domaine / type de titre / type d'étape.</p> + </div> + <hr> + <div> + <div class="fr-table fr-table--no-caption fr-table--no-scroll" style="overflow: auto;"> + <div class="fr-table__wrapper" style="width: auto;"> + <div class="fr-table__container"> + <div class="fr-table__content"> + <table style="display: table; width: 100%;"> + <caption></caption> + <thead> + <tr> + <th scope="col">Domaine</th> + <th scope="col">Type de titre</th> + <th scope="col">Type d'étape</th> + <th scope="col">Visibilité</th> + <th scope="col">Modification</th> + <th scope="col">Création</th> + </tr> + </thead> + <tbody> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Abrogation de la décision</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Décision du juge administratif</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Avis du Conseil d'Etat</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Classement sans suite</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Désistement du demandeur</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Décision de l'autorité administrative</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Publication de décision au JORF</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Avis de demande concurrente</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Enregistrement de la demande</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Demande</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Information du préfet et des collectivités</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Consultation du public</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Rapport du Conseil d'État</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Saisine de l'autorité signataire</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Saisines et avis du conseil général de l'économie (CGE) et de l'autorité environnementale (AE)</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Saisine du Conseil d'Etat</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Concession</span></td> + <td><span class="">Saisine du préfet</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Abrogation de la décision</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Décision du juge administratif</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Publication de l'avis de décision implicite</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Classement sans suite</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Désistement du demandeur</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Décision de l'autorité administrative</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Publication de décision au JORF</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Avis de demande concurrente</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Enregistrement de la demande</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Demande</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Information du préfet et des collectivités</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Consultation du public</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Saisine de l'autorité signataire</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Saisines et avis du conseil général de l'économie (CGE) et de l'autorité environnementale (AE)</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + <tr> + <td> + <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> + </td> + <td><span class="">Permis exclusif de recherches</span></td> + <td><span class="">Saisine du préfet</span></td> + <td><span class="fr-icon-close-line fr-icon--md" role="img" aria-label="Le type d’étape est visible"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Le type d’étape n’est pas modifiable"></span></td> + <td><span class="fr-icon-check-line fr-icon--md" role="img" aria-label="Ne peut créer d’étape de ce type"></span></td> + </tr> + </tbody> + </table> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> +</div> \ No newline at end of file diff --git a/packages/ui/src/components/administration.tsx b/packages/ui/src/components/administration.tsx index bb055c7df96bfe68a2fc0dd72bb82b401650123c..44b6eb0cff4aa6ba806ec6366a623898eaeb92f8 100644 --- a/packages/ui/src/components/administration.tsx +++ b/packages/ui/src/components/administration.tsx @@ -74,16 +74,14 @@ export const PureAdministration = defineComponent<Props>(props => { activitesTypesEmails.value = { status: 'LOADING', } - try { + const administrationActivites = await props.apiClient.administrationActivitesTypesEmails(props.administrationId) + + if ('message' in administrationActivites) { + activitesTypesEmails.value = { status: 'NEW_ERROR', error: administrationActivites } + } else { activitesTypesEmails.value = { status: 'LOADED', - value: await props.apiClient.administrationActivitesTypesEmails(props.administrationId), - } - } catch (e: any) { - console.error('error', e) - activitesTypesEmails.value = { - status: 'ERROR', - message: e.message ?? "Une erreur s'est produite", + value: administrationActivites, } } } @@ -91,16 +89,16 @@ export const PureAdministration = defineComponent<Props>(props => { onMounted(async () => { await loadActivitesTypesEmails() if (canReadAdministrations(props.user)) { - try { + const utilisateursAdmin = await props.apiClient.administrationUtilisateurs(props.administrationId) + if ('message' in utilisateursAdmin) { utilisateurs.value = { - status: 'LOADED', - value: await props.apiClient.administrationUtilisateurs(props.administrationId), + status: 'NEW_ERROR', + error: utilisateursAdmin, } - } catch (e: any) { - console.error('error', e) + } else { utilisateurs.value = { - status: 'ERROR', - message: e.message ?? "Une erreur s'est produite", + status: 'LOADED', + value: utilisateursAdmin, } } } diff --git a/packages/ui/src/components/administration/administration-api-client.ts b/packages/ui/src/components/administration/administration-api-client.ts index f19e04be51e5bf139e748e071ee53c1dade90da3..d4796983230386ddc4f79c74c9f9501a06ac0da7 100644 --- a/packages/ui/src/components/administration/administration-api-client.ts +++ b/packages/ui/src/components/administration/administration-api-client.ts @@ -1,21 +1,21 @@ import { AdministrationId } from 'camino-common/src/static/administrations' import { AdminUserNotNull } from 'camino-common/src/roles' import { AdministrationActiviteTypeEmail } from 'camino-common/src/administrations' -import { getWithJson, newPostWithJson } from '../../api/client-rest' +import { newGetWithJson, newPostWithJson } from '../../api/client-rest' import { CaminoError } from 'camino-common/src/zod-tools' export interface AdministrationApiClient { - administrationActivitesTypesEmails: (administrationId: AdministrationId) => Promise<AdministrationActiviteTypeEmail[]> - administrationUtilisateurs: (administrationId: AdministrationId) => Promise<AdminUserNotNull[]> + administrationActivitesTypesEmails: (administrationId: AdministrationId) => Promise<AdministrationActiviteTypeEmail[] | CaminoError<string>> + administrationUtilisateurs: (administrationId: AdministrationId) => Promise<AdminUserNotNull[] | CaminoError<string>> administrationActiviteTypeEmailUpdate: (administrationId: AdministrationId, administrationActiviteTypeEmail: AdministrationActiviteTypeEmail) => Promise<CaminoError<string> | boolean> administrationActiviteTypeEmailDelete: (administrationId: AdministrationId, administrationActiviteTypeEmail: AdministrationActiviteTypeEmail) => Promise<CaminoError<string> | boolean> } export const administrationApiClient: AdministrationApiClient = { - administrationActivitesTypesEmails: async (administrationId: AdministrationId) => getWithJson('/rest/administrations/:administrationId/activiteTypeEmails', { administrationId }), + administrationActivitesTypesEmails: async (administrationId: AdministrationId) => newGetWithJson('/rest/administrations/:administrationId/activiteTypeEmails', { administrationId }), administrationUtilisateurs: async (administrationId: AdministrationId) => { - return getWithJson('/rest/administrations/:administrationId/utilisateurs', { administrationId }) + return newGetWithJson('/rest/administrations/:administrationId/utilisateurs', { administrationId }) }, administrationActiviteTypeEmailUpdate: async (administrationId: AdministrationId, administrationActiviteTypeEmail: AdministrationActiviteTypeEmail) => { return newPostWithJson('/rest/administrations/:administrationId/activiteTypeEmails', { administrationId }, administrationActiviteTypeEmail) diff --git a/packages/ui/src/components/entreprise.stories.tsx b/packages/ui/src/components/entreprise.stories.tsx index 449cd2d8527e48a913e180f0d60031348f514e32..13750d09659e2c731f662bfd498f1264567bb08d 100644 --- a/packages/ui/src/components/entreprise.stories.tsx +++ b/packages/ui/src/components/entreprise.stories.tsx @@ -93,7 +93,7 @@ const apiClient: Pick< creerEntreprise: siren => { creerEntrepriseAction(siren) - return Promise.resolve() + return Promise.resolve({ id: entrepriseIdValidator.parse(siren) }) }, creerEntrepriseDocument: (entrepriseId, document) => { creerEntrepriseDocumentAction(entrepriseId, document) diff --git a/packages/ui/src/components/entreprise/add-popup.stories.tsx b/packages/ui/src/components/entreprise/add-popup.stories.tsx index 2aa3e2a364825a211bde52c25a5b035d2de9ff44..eb1b4c65b94374c94b43f25368176c340b447308 100644 --- a/packages/ui/src/components/entreprise/add-popup.stories.tsx +++ b/packages/ui/src/components/entreprise/add-popup.stories.tsx @@ -2,6 +2,7 @@ import { EntrepriseAddPopup } from './add-popup' import { Meta, StoryFn } from '@storybook/vue3' import { testBlankUser } from 'camino-common/src/tests-utils' import { action } from '@storybook/addon-actions' +import { entrepriseIdValidator, Siren } from 'camino-common/src/entreprise' const meta: Meta = { title: 'Components/Entreprise/Ajout', @@ -14,10 +15,10 @@ const close = action('close') const save = action('save') const apiClient = { - creerEntreprise: (...params: unknown[]) => { - save(params) + creerEntreprise: (siren: Siren) => { + save(siren) - return Promise.resolve() + return Promise.resolve({ id: entrepriseIdValidator.parse(siren) }) }, } export const Super: StoryFn = () => <EntrepriseAddPopup close={close} user={{ ...testBlankUser, role: 'super' }} apiClient={apiClient} /> diff --git a/packages/ui/src/components/entreprise/entreprise-api-client.ts b/packages/ui/src/components/entreprise/entreprise-api-client.ts index 36c25a21429f4e40a3e80e0ff4b2519b7fc375a4..112c9449f101b1ec15aaf8ed1c6b43461572ec70 100644 --- a/packages/ui/src/components/entreprise/entreprise-api-client.ts +++ b/packages/ui/src/components/entreprise/entreprise-api-client.ts @@ -1,4 +1,4 @@ -import { getWithJson, newDeleteWithJson, newGetWithJson, newPostWithJson, newPutWithJson, postWithJson } from '@/api/client-rest' +import { getWithJson, newDeleteWithJson, newGetWithJson, newPostWithJson, newPutWithJson } from '@/api/client-rest' import { CaminoAnnee } from 'camino-common/src/date' import { EntrepriseId, EntrepriseType, Siren, EtapeEntrepriseDocument, entrepriseDocumentInputValidator, EntrepriseDocumentId, EntrepriseDocument } from 'camino-common/src/entreprise' import { TempDocumentName } from 'camino-common/src/document' @@ -10,7 +10,7 @@ import { CaminoError } from 'camino-common/src/zod-tools' export interface EntrepriseApiClient { getFiscaliteEntreprise: (annee: CaminoAnnee, entrepriseId: EntrepriseId) => Promise<Fiscalite> modifierEntreprise: (entreprise: { id: EntrepriseId; telephone?: string; email?: string; url?: string; archive?: boolean }) => Promise<CaminoError<string> | { id: EntrepriseId }> - creerEntreprise: (siren: Siren) => Promise<void> + creerEntreprise: (siren: Siren) => Promise<{ id: EntrepriseId } | CaminoError<string>> getEntreprise: (id: EntrepriseId) => Promise<EntrepriseType | CaminoError<string>> getEntrepriseDocuments: (id: EntrepriseId) => Promise<EntrepriseDocument[] | CaminoError<string>> getEtapeEntrepriseDocuments: (etapeId: EtapeId) => Promise<EtapeEntrepriseDocument[]> @@ -35,8 +35,8 @@ export const entrepriseApiClient: EntrepriseApiClient = { modifierEntreprise: async (entreprise): Promise<CaminoError<string> | { id: EntrepriseId }> => { return newPutWithJson('/rest/entreprises/:entrepriseId', { entrepriseId: entreprise.id }, entreprise) }, - creerEntreprise: async (siren: Siren): Promise<void> => { - return postWithJson('/rest/entreprises', {}, { siren }) + creerEntreprise: async (siren: Siren): Promise<{ id: EntrepriseId } | CaminoError<string>> => { + return newPostWithJson('/rest/entreprises', {}, { siren }) }, getEntreprise: async (entrepriseId: EntrepriseId): Promise<EntrepriseType | CaminoError<string>> => { return newGetWithJson('/rest/entreprises/:entrepriseId', { diff --git a/packages/ui/src/components/entreprises.stories.tsx b/packages/ui/src/components/entreprises.stories.tsx index 94f7451f35ccb5064dacd509d159b46f7d1e899e..9816b8eb9aa42ad132c6121d00833a6415f68c2a 100644 --- a/packages/ui/src/components/entreprises.stories.tsx +++ b/packages/ui/src/components/entreprises.stories.tsx @@ -41,7 +41,7 @@ const apiClient: Pick<ApiClient, 'creerEntreprise' | 'titresRechercherByNom' | ' creerEntreprise: siren => { creerEntrepriseAction(siren) - return Promise.resolve() + return Promise.resolve({ id: entrepriseIdValidator.parse(siren) }) }, } diff --git a/packages/ui/src/components/entreprises.tsx b/packages/ui/src/components/entreprises.tsx index 11c6f3fcab65c218fb065c8bb2260c0c036a3ea3..9ea592f54ed862a1b39e5f44298cc7ae540a53e8 100644 --- a/packages/ui/src/components/entreprises.tsx +++ b/packages/ui/src/components/entreprises.tsx @@ -12,7 +12,7 @@ import { entreprisesDownloadFormats } from 'camino-common/src/filters' import { Column, TableRow } from './_ui/table' import { entreprisesKey, userKey } from '@/moi' import { isNotNullNorUndefined } from 'camino-common/src/typescript-tools' -import { getWithJson } from '@/api/client-rest' +import { newGetWithJson } from '@/api/client-rest' import { CaminoRouteLocation, routesDefinitions } from '@/router/routes' import { CaminoRouter } from '@/typings/vue-router' @@ -118,10 +118,17 @@ export const Entreprises = defineComponent(() => { return { ...apiClient, creerEntreprise: async (siren: Siren) => { - await entrepriseApiClient.creerEntreprise(siren) - const newEntreprises = await getWithJson('/rest/entreprises', {}) + const value = await entrepriseApiClient.creerEntreprise(siren) + if ('message' in value) { + return value + } + const newEntreprises = await newGetWithJson('/rest/entreprises', {}) + if ('message' in newEntreprises) { + return newEntreprises + } entreprises.value = newEntreprises router.push({ name: 'entreprise', params: { id: `fr-${siren}` } }) + return value }, } } diff --git a/packages/ui/src/components/etape-edition.tsx b/packages/ui/src/components/etape-edition.tsx index a5ade194cc42da00d1fdfe1dc0e6489d11eee485..1888b4dedbbd827f0890ef12217f3e271c8bde9a 100644 --- a/packages/ui/src/components/etape-edition.tsx +++ b/packages/ui/src/components/etape-edition.tsx @@ -96,7 +96,11 @@ export const PureEtapeEdition = defineComponent<Props>(props => { setAsyncData({ status: 'NEW_ERROR', error: demarche }) } else { const perimetre = await props.apiClient.getPerimetreInfosByEtapeId(etape.id) - setAsyncData({ status: 'LOADED', value: { etape, demarche, perimetre } }) + if ('message' in perimetre) { + setAsyncData({ status: 'NEW_ERROR', error: perimetre }) + } else { + setAsyncData({ status: 'LOADED', value: { etape, demarche, perimetre } }) + } } } else if (isNotNullNorUndefined(props.demarcheIdOrSlug)) { const demarche = await props.apiClient.getDemarcheByIdOrSlug(props.demarcheIdOrSlug) @@ -104,31 +108,35 @@ export const PureEtapeEdition = defineComponent<Props>(props => { setAsyncData({ status: 'NEW_ERROR', error: demarche }) } else { const perimetre = await props.apiClient.getPerimetreInfosByDemarcheId(demarche.demarche_id) - setAsyncData({ - status: 'LOADED', - value: { - etape: { - id: null, - contenu: {}, - date: null, - typeId: null, - statutId: null, - isBrouillon: ETAPE_IS_NOT_BROUILLON, - note: { valeur: '', is_avertissement: false }, - substances: { value: [], heritee: true, etapeHeritee: null }, - titulaires: { value: [], heritee: true, etapeHeritee: null }, - amodiataires: { value: [], heritee: true, etapeHeritee: null }, - perimetre: { value: null, heritee: true, etapeHeritee: null }, - duree: { value: null, heritee: true, etapeHeritee: null }, - dateDebut: { value: null, heritee: true, etapeHeritee: null }, - dateFin: { value: null, heritee: true, etapeHeritee: null }, - slug: null, - titreDemarcheId: demarche.demarche_id, + if ('message' in perimetre) { + setAsyncData({ status: 'NEW_ERROR', error: perimetre }) + } else { + setAsyncData({ + status: 'LOADED', + value: { + etape: { + id: null, + contenu: {}, + date: null, + typeId: null, + statutId: null, + isBrouillon: ETAPE_IS_NOT_BROUILLON, + note: { valeur: '', is_avertissement: false }, + substances: { value: [], heritee: true, etapeHeritee: null }, + titulaires: { value: [], heritee: true, etapeHeritee: null }, + amodiataires: { value: [], heritee: true, etapeHeritee: null }, + perimetre: { value: null, heritee: true, etapeHeritee: null }, + duree: { value: null, heritee: true, etapeHeritee: null }, + dateDebut: { value: null, heritee: true, etapeHeritee: null }, + dateFin: { value: null, heritee: true, etapeHeritee: null }, + slug: null, + titreDemarcheId: demarche.demarche_id, + }, + demarche, + perimetre, }, - demarche, - perimetre, - }, - }) + }) + } } } } catch (e: any) { diff --git a/packages/ui/src/components/titre/perimetre-api-client.ts b/packages/ui/src/components/titre/perimetre-api-client.ts index 12f0eaa38cb1ae641ec38cb6934f2dc4fc5f3d63..b3fa05d3445dc1e5a076f33edfef0803ccad3b28 100644 --- a/packages/ui/src/components/titre/perimetre-api-client.ts +++ b/packages/ui/src/components/titre/perimetre-api-client.ts @@ -8,7 +8,7 @@ import { PerimetreInformations, } from 'camino-common/src/perimetre' import { GeoSystemeId } from 'camino-common/src/static/geoSystemes' -import { getWithJson, newPostWithJson } from '../../api/client-rest' +import { newGetWithJson, newPostWithJson } from '../../api/client-rest' import { EtapeIdOrSlug } from 'camino-common/src/etape' import { DemarcheIdOrSlug } from 'camino-common/src/demarche' import { CaminoError } from 'camino-common/src/zod-tools' @@ -17,8 +17,8 @@ export interface PerimetreApiClient { geojsonImport: (body: GeojsonImportBody, geoSystemeId: GeoSystemeId) => Promise<CaminoError<string> | GeojsonInformations> geojsonPointsImport: (body: GeojsonImportPointsBody, geoSystemeId: GeoSystemeId) => Promise<GeojsonImportPointsResponse | CaminoError<string>> geojsonForagesImport: (body: GeojsonImportForagesBody, geoSystemeId: GeoSystemeId) => Promise<GeojsonImportForagesResponse | CaminoError<string>> - getPerimetreInfosByEtapeId: (etapeId: EtapeIdOrSlug) => Promise<PerimetreInformations> - getPerimetreInfosByDemarcheId: (demarcheId: DemarcheIdOrSlug) => Promise<PerimetreInformations> + getPerimetreInfosByEtapeId: (etapeId: EtapeIdOrSlug) => Promise<PerimetreInformations | CaminoError<string>> + getPerimetreInfosByDemarcheId: (demarcheId: DemarcheIdOrSlug) => Promise<PerimetreInformations | CaminoError<string>> } export const perimetreApiClient: PerimetreApiClient = { @@ -32,9 +32,9 @@ export const perimetreApiClient: PerimetreApiClient = { return newPostWithJson('/rest/geojson_forages/import/:geoSystemeId', { geoSystemeId }, body) }, getPerimetreInfosByEtapeId: (etapeId: EtapeIdOrSlug) => { - return getWithJson('/rest/etapes/:etapeId/geojson', { etapeId }) + return newGetWithJson('/rest/etapes/:etapeId/geojson', { etapeId }) }, getPerimetreInfosByDemarcheId: (demarcheId: DemarcheIdOrSlug) => { - return getWithJson('/rest/demarches/:demarcheId/geojson', { demarcheId }) + return newGetWithJson('/rest/demarches/:demarcheId/geojson', { demarcheId }) }, } diff --git a/packages/ui/src/index.ts b/packages/ui/src/index.ts index 339a137d9300e8d0f31268ccac69d75181940c16..56525726c3c0043de44a3094d7ea254b33e10df6 100644 --- a/packages/ui/src/index.ts +++ b/packages/ui/src/index.ts @@ -5,7 +5,7 @@ import { App } from './app' import router from './router' import { CaminoConfig } from 'camino-common/src/static/config' -import { getWithJson, newGetWithJson } from './api/client-rest' +import { newGetWithJson } from './api/client-rest' import { initMatomo } from './stats/matomo' import type { User } from 'camino-common/src/roles' import { userKey, entreprisesKey } from './moi' @@ -56,10 +56,10 @@ const checkEventSource = () => { checkEventSource() Promise.resolve().then(async (): Promise<void> => { - const [configFromJson, user, entreprises]: [CaminoConfig | CaminoError<string>, User | CaminoError<string>, Entreprise[]] = await Promise.all([ + const [configFromJson, user, entreprises]: [CaminoConfig | CaminoError<string>, User | CaminoError<string>, Entreprise[] | CaminoError<string>] = await Promise.all([ newGetWithJson('/config', {}), newGetWithJson('/moi', {}), - getWithJson('/rest/entreprises', {}), + newGetWithJson('/rest/entreprises', {}), ]) const app = createApp(App) // TODO 2024-09-24 mieux gérer les cas d'erreurs @@ -67,6 +67,10 @@ Promise.resolve().then(async (): Promise<void> => { console.error(user.message) throw new Error("Une erreur s'est produite lors de la récupération de l'utilisateur") } + if (isNotNullNorUndefined(entreprises) && 'message' in entreprises) { + console.error(entreprises.message) + throw new Error("Une erreur s'est produite lors de la récupération des entreprises") + } app.provide(userKey, user) app.provide(entreprisesKey, ref(entreprises)) // TODO 2024-09-17 mieux gérer ce cas d'erreur