Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
add choice 'not applicable' about RGAA normes (in this case value is …
Browse files Browse the repository at this point in the history
…null)
  • Loading branch information
JeromeBu committed Jan 24, 2024
1 parent 1297a67 commit 0c9808d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/core/ports/DbApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export namespace Db {
};
isStillInObservation: boolean;
parentSoftwareWikidataId: string | undefined;
doRespectRgaa: boolean;
doRespectRgaa: boolean | null;
isFromFrenchPublicService: boolean;
isPresentInSupportContract: boolean;
similarSoftwareWikidataIds: string[];
Expand Down
2 changes: 1 addition & 1 deletion src/core/usecases/readWriteSillData/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ const softwares = createSelector(compiledData, similarSoftwarePartition, (compil
"dereferencing": o.dereferencing,
"categories": o.categories,
"prerogatives": {
"doRespectRgaa": o.doRespectRgaa ?? false,
"doRespectRgaa": o.doRespectRgaa,
"isFromFrenchPublicServices": o.isFromFrenchPublicService,
"isPresentInSupportContract": o.isPresentInSupportContract
},
Expand Down
11 changes: 8 additions & 3 deletions src/core/usecases/readWriteSillData/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export type Software = {
}
| undefined;
categories: string[];
prerogatives: Record<Prerogative, boolean>;
prerogatives: Prerogatives;
userAndReferentCountByOrganization: Record<string, { userCount: number; referentCount: number }>;
authors: {
authorName: string;
Expand Down Expand Up @@ -104,7 +104,12 @@ export namespace SoftwareType {
};
}

export type Prerogative = "isPresentInSupportContract" | "isFromFrenchPublicServices" | "doRespectRgaa";
type Prerogatives = {
isPresentInSupportContract: boolean;
isFromFrenchPublicServices: boolean;
doRespectRgaa: boolean | null;
};
export type Prerogative = keyof Prerogatives;

export type Os = "windows" | "linux" | "mac" | "android" | "ios";

Expand All @@ -121,7 +126,7 @@ export type SoftwareFormData = {
similarSoftwareWikidataIds: string[];
softwareLogoUrl: string | undefined;
softwareKeywords: string[];
doRespectRgaa: boolean;
doRespectRgaa: boolean | null;
};

export type DeclarationFormData = DeclarationFormData.User | DeclarationFormData.Referent;
Expand Down
2 changes: 1 addition & 1 deletion src/rpc/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ const zSoftwareFormData = (() => {
"similarSoftwareWikidataIds": z.array(z.string()),
"softwareLogoUrl": z.string().optional(),
"softwareKeywords": z.array(z.string()),
"doRespectRgaa": z.boolean()
"doRespectRgaa": z.boolean().or(z.null())
});

{
Expand Down

0 comments on commit 0c9808d

Please sign in to comment.