Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/modification formulaire #298

Merged
merged 41 commits into from
Apr 16, 2024
Merged

Conversation

LucasDetre
Copy link
Collaborator

@LucasDetre LucasDetre commented Mar 29, 2024

@FaXaq FaXaq marked this pull request as draft April 2, 2024 10:06
@@ -49,6 +49,13 @@ export interface DB extends Omit<DBSchema, "formationNonMaterializedView"> {
>;
};
}
export interface DB extends Omit<DBSchema, "latestDemandeView"> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je m'intérroge sur les multiples exports d'interface DB, on ne peut pas regrouper tout ça dans une seule ?

eb(
sql`unaccent(${eb.ref("discipline.libelleDiscipline")})`,
"ilike",
`%${search_word
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'est pas la première fois qu'on a besoin de normaliser un texte de recherche, ça vaudrait le coup de créer une méthode globale qu'on pourrait réutiliser

user: Pick<RequestUser, "id" | "role" | "codeRegion">;
}) => {
const demande = await deps.findOneDemande(id);
const demande = await deps.findOneDemande(numero);
if (!demande) throw Boom.notFound();

const scope = getPermissionScope(user.role, "intentions/ecriture");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cette règle de vérification pourrait potentiellement être faite coté DB avec des RLS

@LucasDetre LucasDetre marked this pull request as ready for review April 16, 2024 08:02
@@ -1,4 +1,6 @@
import * as uuid from "uuid";

export const generateId = () =>
export const generateId = () => uuid.v4().replace(/-/g, "");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utilise des ulid dans ce cas, tu pourras les ordonner de manière alphabhétique, chose qui n'est pas le cas la

Copy link

sonarcloud bot commented Apr 16, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
16.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@LucasDetre LucasDetre merged commit 578de5e into develop Apr 16, 2024
1 of 2 checks passed
@LucasDetre LucasDetre deleted the feat/modification-formulaire branch April 16, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants