-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
113 additions
and
64 deletions.
There are no files selected for viewing
19 changes: 4 additions & 15 deletions
19
packages/backend/src/_common/model/usager/UsagerOptions.type.ts
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
8 changes: 8 additions & 0 deletions
8
packages/backend/src/_common/model/usager/UsagerOptionsProcuration.type.ts
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,8 @@ | ||
export type UsagerOptionsProcuration = { | ||
actif: boolean; | ||
nom?: string; | ||
prenom?: string; | ||
dateFin?: Date | null; | ||
dateDebut?: Date | null; | ||
dateNaissance?: Date | string | null; | ||
}; |
7 changes: 7 additions & 0 deletions
7
packages/backend/src/_common/model/usager/UsagerOptionsTransfert.type.ts
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,7 @@ | ||
export type UsagerOptionsTransfert = { | ||
actif: boolean; | ||
nom?: string; | ||
adresse?: string; | ||
dateDebut?: Date | null; | ||
dateFin?: Date | null; | ||
}; |
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
19 changes: 4 additions & 15 deletions
19
packages/frontend/src/_common/model/usager/UsagerOptions.type.ts
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
8 changes: 8 additions & 0 deletions
8
packages/frontend/src/_common/model/usager/UsagerOptionsProcuration.type.ts
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,8 @@ | ||
export type UsagerOptionsProcuration = { | ||
actif: boolean; | ||
nom?: string; | ||
prenom?: string; | ||
dateFin?: Date | null; | ||
dateDebut?: Date | null; | ||
dateNaissance?: Date | string | null; | ||
}; |
7 changes: 7 additions & 0 deletions
7
packages/frontend/src/_common/model/usager/UsagerOptionsTransfert.type.ts
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,7 @@ | ||
export type UsagerOptionsTransfert = { | ||
actif: boolean; | ||
nom?: string; | ||
adresse?: string; | ||
dateDebut?: Date | null; | ||
dateFin?: Date | null; | ||
}; |
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 |
---|---|---|
@@ -1,17 +1,19 @@ | ||
export * from "./Usager.type"; | ||
export * from "./UsagerAyantDroit.type"; | ||
export * from "./UsagerDecision.type"; | ||
export * from "./UsagerDecisionMotif.type"; | ||
export * from "./UsagerDecisionStatut.type"; | ||
export * from "./UsagerDoc.type"; | ||
export * from "./UsagerEntretien.type"; | ||
export * from "./UsagerImport.type"; | ||
export * from "./UsagerLastInteractions.type"; | ||
export * from "./UsagerLight.type"; | ||
export * from "./UsagerOptions.type"; | ||
export * from "./UsagerOptionsHistorique.type"; | ||
export * from "./UsagerOptionsProcuration.type"; | ||
export * from "./UsagerOptionsTransfert.type"; | ||
export * from "./UsagerPreferenceContact.type"; | ||
export * from "./UsagerRaisonDemande.type"; | ||
export * from "./UsagerRdv.type"; | ||
export * from "./UsagerSexe.type"; | ||
export * from "./UsagerAyantDroit.type"; | ||
export * from "./UsagerTypeDom.type"; | ||
export * from "./UsagerDecisionMotif.type"; | ||
export * from "./UsagerImport.type"; |
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
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
22 changes: 6 additions & 16 deletions
22
packages/frontend/src/app/modules/usagers/interfaces/options.ts
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
10 changes: 5 additions & 5 deletions
10
packages/frontend/src/app/modules/usagers/services/procuration.service.ts
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
13 changes: 13 additions & 0 deletions
13
packages/frontend/src/app/modules/usagers/services/transfert.service.ts
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,13 @@ | ||
import { UsagerOptionsTransfert } from "../../../../_common/model/usager"; | ||
|
||
export function isTransfertActifMaintenant( | ||
transfert: UsagerOptionsTransfert | ||
): boolean { | ||
if (transfert.actif) { | ||
const debut = new Date(transfert.dateDebut).getTime(); | ||
const fin = new Date(transfert.dateFin).getTime(); | ||
const now = new Date().getTime(); | ||
return debut < now && fin > now; | ||
} | ||
return false; | ||
} |