-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 687-améliorer-la-saisie-erreurs-et-recommand…
…ations
- Loading branch information
Showing
40 changed files
with
1,110 additions
and
540 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Documentation | ||
|
||
Ce fichier détaille les règles métiers utilisées au sein du projet. | ||
|
||
## Calcul du nombre de critères | ||
|
||
Le statut final d’un critère est déterminé en calculant le résultat de l’ensemble des statuts sur chaque page et sur les éléments transverses pour ce critère. | ||
|
||
### Critères applicables | ||
|
||
Un critère est applicable si : | ||
|
||
- il est conforme ou non-conforme sur au moins une page ou sur les éléments transverses. | ||
|
||
### Critères non-applicables | ||
|
||
Un critère est non-applicable si : | ||
|
||
- il est non-applicable sur l’ensemble des pages et sur les éléments transverses testés. | ||
|
||
### Critères conformes | ||
|
||
Un critère est conforme si : | ||
|
||
- il est conforme ou non-applicable sur l’ensemble des pages et sur les éléments transverses testés. | ||
- il est conforme sur au moins une page ou sur les éléments transverses testés. | ||
|
||
### Critères non-conformes | ||
|
||
Un critère est non-conforme si : | ||
|
||
- il est non-conforme sur au moins une page ou sur les éléments transverses. | ||
|
||
## Taux de conformité d’un audit | ||
|
||
Le taux de conformité d’un audit se fait selon le calcul suivant : | ||
|
||
``` | ||
Taux de conformité = (Nombre de critères conformes / Nombre de critères applicables) * 100 | ||
``` | ||
|
||
Exemple avec 89 critères applicables et 27 critères conformes : | ||
|
||
``` | ||
Taux de conformité = (27 / 89) * 100 = 30,34% | ||
``` |
25 changes: 25 additions & 0 deletions
25
...ture-rest-api/prisma/migrations/20240911153613_add_transverse_elements_page/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
-- AlterTable | ||
ALTER TABLE "Audit" ADD COLUMN "transverseElementsPageId" INTEGER; | ||
|
||
-- Create one transverse elements page for each existing audit and link it | ||
DO $$ | ||
DECLARE temprow RECORD; | ||
DECLARE transversePageId "AuditedPage"."id"%TYPE; | ||
BEGIN FOR temprow IN | ||
SELECT * FROM "Audit" WHERE "transverseElementsPageId" IS NULL | ||
LOOP | ||
-- Crée la page élément transverse | ||
INSERT INTO "AuditedPage"("name", "url", "order") VALUES ('Éléments transverses (optionnel)', '', -1) RETURNING "id" INTO transversePageId; | ||
-- Lie la page à l'audit | ||
UPDATE "Audit" SET "transverseElementsPageId" = transversePageId WHERE "id" = "temprow"."id"; | ||
END LOOP; | ||
END $$; | ||
|
||
-- Make transverseElementsPageId not nullable | ||
ALTER TABLE "Audit" ALTER COLUMN "transverseElementsPageId" SET NOT NULL; | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "Audit_transverseElementsPageId_key" ON "Audit"("transverseElementsPageId"); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Audit" ADD CONSTRAINT "Audit_transverseElementsPageId_fkey" FOREIGN KEY ("transverseElementsPageId") REFERENCES "AuditedPage"("id") ON DELETE RESTRICT ON UPDATE CASCADE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.