pub struct MeetingUseCases { /* private fields */ }Implementations§
Source§impl MeetingUseCases
impl MeetingUseCases
pub fn new(repository: Arc<dyn MeetingRepository>) -> Self
Sourcepub fn new_with_convocation(
repository: Arc<dyn MeetingRepository>,
convocation_use_cases: Arc<ConvocationUseCases>,
) -> Self
pub fn new_with_convocation( repository: Arc<dyn MeetingRepository>, convocation_use_cases: Arc<ConvocationUseCases>, ) -> Self
Create MeetingUseCases with ConvocationUseCases for automatic 2nd convocation scheduling
Sourcepub fn with_completion_checker(
self,
checker: Arc<dyn MeetingCompletionCheckerPort>,
) -> Self
pub fn with_completion_checker( self, checker: Arc<dyn MeetingCompletionCheckerPort>, ) -> Self
Track H Story H3 — Configure le gate assert_can_complete() sur
complete_meeting(). Builder pattern fluide pour ne pas multiplier
les constructeurs et préserver la compat backward des tests existants.
Sourcepub async fn build_completion_checklist(
&self,
meeting_id: Uuid,
) -> Result<(MeetingCompletionChecklist, Vec<Value>), String>
pub async fn build_completion_checklist( &self, meeting_id: Uuid, ) -> Result<(MeetingCompletionChecklist, Vec<Value>), String>
Track H Story H3 — Construit la checklist Art. 3.87 §3-5 CC et liste
les invariants manquants pour le FE (composant
<MissingInvariantsList> + désactivation bouton « Clôturer »).
Retourne (checklist, missing[]) où missing[] est déjà sérialisé
en serde_json::Value au format attendu par le frontend (i18n keys
= meeting.missing.<type>).
Erreurs :
"Meeting not found"→ 404."Completion checker not configured"→ 404 (état non câblé).
Sourcepub fn with_acp_resolution(
self,
building_repository: Arc<dyn BuildingRepository>,
) -> Self
pub fn with_acp_resolution( self, building_repository: Arc<dyn BuildingRepository>, ) -> Self
Câble la résolution de l’ACP depuis l’immeuble.
pub async fn create_meeting( &self, request: CreateMeetingRequest, ) -> Result<MeetingResponse, String>
pub async fn get_meeting( &self, id: Uuid, ) -> Result<Option<MeetingResponse>, String>
pub async fn list_meetings_by_building( &self, building_id: Uuid, ) -> Result<Vec<MeetingResponse>, String>
pub async fn list_meetings_paginated( &self, page_request: &PageRequest, organization_id: Option<Uuid>, ) -> Result<(Vec<MeetingResponse>, i64), String>
pub async fn update_meeting( &self, id: Uuid, request: UpdateMeetingRequest, ) -> Result<MeetingResponse, String>
pub async fn add_agenda_item( &self, id: Uuid, request: AddAgendaItemRequest, ) -> Result<MeetingResponse, String>
Sourcepub async fn complete_meeting(
&self,
id: Uuid,
request: CompleteMeetingRequest,
) -> Result<MeetingResponse, String>
pub async fn complete_meeting( &self, id: Uuid, request: CompleteMeetingRequest, ) -> Result<MeetingResponse, String>
Track H Story H3 — Clôture une AG après vérification stricte des invariants Art. 3.87 §3-5 CC :
- Charge le meeting (404 si absent).
- Charge la checklist via
completion_checker.build_checklist. meeting.assert_can_complete(&checklist)?— propage l’erreur typée viaFrom<MeetingNotCompletableError> for String(préfixeMEETING_NOT_COMPLETABLE:reconnu par le handler → 422).meeting.complete_internal()?— state machine.- Persistance.
DEPRECATED param : request.attendees_count est conservé pour
la compat backward de l’API ; la source de vérité depuis Story H3
est checklist.attended_quotas (DB agrégat present_quotas). Si le
checker n’est pas branché (completion_checker = None, cas legacy
tests / hors-prod), on retombe sur l’ancien comportement
Meeting::complete(attendees_count) pour ne pas casser la suite
existante.
pub async fn cancel_meeting(&self, id: Uuid) -> Result<MeetingResponse, String>
pub async fn reschedule_meeting( &self, id: Uuid, new_date: DateTime<Utc>, ) -> Result<MeetingResponse, String>
pub async fn delete_meeting(&self, id: Uuid) -> Result<bool, String>
Sourcepub async fn attach_minutes(
&self,
id: Uuid,
document_id: Uuid,
) -> Result<MeetingResponse, String>
pub async fn attach_minutes( &self, id: Uuid, document_id: Uuid, ) -> Result<MeetingResponse, String>
Attach minutes document to a completed meeting (Issue #313)
Sourcepub async fn validate_quorum(
&self,
meeting_id: Uuid,
present_quotas: Decimal,
total_quotas: Decimal,
) -> Result<(bool, MeetingResponse), String>
pub async fn validate_quorum( &self, meeting_id: Uuid, present_quotas: Decimal, total_quotas: Decimal, ) -> Result<(bool, MeetingResponse), String>
Valide le quorum d’une AG (Art. 3.87 §5 CC). Doit être appelé AVANT que les votes soient ouverts. Si quorum non atteint, déclenche automatiquement la création d’une 2e convocation pour le même bâtiment (si ConvocationUseCases disponible). Retourne Ok(true) si quorum atteint, Ok(false) si 2e convocation requise.
Auto Trait Implementations§
impl !RefUnwindSafe for MeetingUseCases
impl !UnwindSafe for MeetingUseCases
impl Freeze for MeetingUseCases
impl Send for MeetingUseCases
impl Sync for MeetingUseCases
impl Unpin for MeetingUseCases
impl UnsafeUnpin for MeetingUseCases
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Fake for T
impl<T> Fake for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more