diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingPanelWidget.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingPanelWidget.cpp index a8bc345..b2a175e 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingPanelWidget.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingPanelWidget.cpp @@ -23,8 +23,13 @@ void UHyperTwistTrainingPanelWidget::RefreshTrainingState() CachedRunSummary = UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingRunSummary(this); CachedCoachSignals = UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachSignals(this); CachedCoachBrief = UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachBrief(this); + CachedCoachFollowUpBrief = UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachFollowUpBrief(this); CachedCoachSessionQueueSummary = UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachSessionQueueSummary(this); + CachedCoachSessionQueueState = + UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachSessionQueueState(this); + CachedCoachScheduleHorizonSummary = + UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachScheduleHorizonSummary(this); CachedCoachSchedulePolicySummary = UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachSchedulePolicySummary(this); CachedCoachQueueExecutionSummary = @@ -144,6 +149,50 @@ FHyperTwistTrainingRunState UHyperTwistTrainingPanelWidget::StartNextQueuedCoach return CachedRunState; } +bool UHyperTwistTrainingPanelWidget::DeferCoachQueueEntry( + const FString& EntryId, + const FString& DeferredUntilUtc, + const FString& DeferralReasonLabel, + const bool bManualReschedule +) +{ + const bool bSucceeded = UHyperTwistTrainingRuntimeLibrary::DeferCoachSessionQueueEntry( + this, + EntryId, + DeferredUntilUtc, + DeferralReasonLabel, + bManualReschedule + ); + RefreshTrainingState(); + return bSucceeded; +} + +bool UHyperTwistTrainingPanelWidget::DeferDisplayedCoachQueueEntry( + const FString& DeferredUntilUtc, + const FString& DeferralReasonLabel, + const bool bManualReschedule +) +{ + if (CachedCoachPanelState.ActiveQueueEntryId.IsEmpty()) + { + return false; + } + + return DeferCoachQueueEntry( + CachedCoachPanelState.ActiveQueueEntryId, + DeferredUntilUtc, + DeferralReasonLabel, + bManualReschedule + ); +} + +bool UHyperTwistTrainingPanelWidget::PromoteCoachQueueEntry(const FString& EntryId) +{ + const bool bSucceeded = UHyperTwistTrainingRuntimeLibrary::PromoteCoachSessionQueueEntry(this, EntryId); + RefreshTrainingState(); + return bSucceeded; +} + FHyperTwistTrainingRepositoryRoundTripVerification UHyperTwistTrainingPanelWidget::VerifyTrainingRepositoryRoundTrip() { diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSessionActor.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSessionActor.cpp index c282e81..072d56f 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSessionActor.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSessionActor.cpp @@ -86,8 +86,13 @@ void AHyperTwistTrainingSessionActor::RefreshCachedTrainingState() CachedRunSummary = UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingRunSummary(this); CachedCoachSignals = UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachSignals(this); CachedCoachBrief = UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachBrief(this); + CachedCoachFollowUpBrief = UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachFollowUpBrief(this); CachedCoachSessionQueueSummary = UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachSessionQueueSummary(this); + CachedCoachSessionQueueState = + UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachSessionQueueState(this); + CachedCoachScheduleHorizonSummary = + UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachScheduleHorizonSummary(this); CachedCoachSchedulePolicySummary = UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingCoachSchedulePolicySummary(this); CachedCoachQueueExecutionSummary = @@ -156,6 +161,50 @@ FHyperTwistTrainingRunState AHyperTwistTrainingSessionActor::StartNextQueuedCoac return CachedRunState; } +bool AHyperTwistTrainingSessionActor::DeferCoachQueueEntry( + const FString& EntryId, + const FString& DeferredUntilUtc, + const FString& DeferralReasonLabel, + const bool bManualReschedule +) +{ + const bool bSucceeded = UHyperTwistTrainingRuntimeLibrary::DeferCoachSessionQueueEntry( + this, + EntryId, + DeferredUntilUtc, + DeferralReasonLabel, + bManualReschedule + ); + RefreshCachedTrainingState(); + return bSucceeded; +} + +bool AHyperTwistTrainingSessionActor::DeferDisplayedCoachQueueEntry( + const FString& DeferredUntilUtc, + const FString& DeferralReasonLabel, + const bool bManualReschedule +) +{ + if (CachedCoachPanelState.ActiveQueueEntryId.IsEmpty()) + { + return false; + } + + return DeferCoachQueueEntry( + CachedCoachPanelState.ActiveQueueEntryId, + DeferredUntilUtc, + DeferralReasonLabel, + bManualReschedule + ); +} + +bool AHyperTwistTrainingSessionActor::PromoteCoachQueueEntry(const FString& EntryId) +{ + const bool bSucceeded = UHyperTwistTrainingRuntimeLibrary::PromoteCoachSessionQueueEntry(this, EntryId); + RefreshCachedTrainingState(); + return bSucceeded; +} + FHyperTwistTrainingRepositoryRoundTripVerification AHyperTwistTrainingSessionActor::VerifyRepositoryRoundTrip() { diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingPanelWidget.h b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingPanelWidget.h index 961a11f..9db96dd 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingPanelWidget.h +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingPanelWidget.h @@ -44,9 +44,18 @@ public: UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|Coach") FHyperTwistCoachBrief CachedCoachBrief; + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|Coach") + FHyperTwistCoachBrief CachedCoachFollowUpBrief; + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|Coach") FHyperTwistCoachSessionQueueSummary CachedCoachSessionQueueSummary; + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|Coach") + FHyperTwistTrainingCoachSessionQueueState CachedCoachSessionQueueState; + + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|Coach") + FHyperTwistCoachScheduleHorizonSummary CachedCoachScheduleHorizonSummary; + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|Coach") FHyperTwistCoachSchedulePolicySummary CachedCoachSchedulePolicySummary; @@ -109,6 +118,24 @@ public: UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|Coach") FHyperTwistTrainingRunState StartNextQueuedCoachRun(int32 MaxCases); + UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|Coach") + bool DeferCoachQueueEntry( + const FString& EntryId, + const FString& DeferredUntilUtc, + const FString& DeferralReasonLabel, + bool bManualReschedule + ); + + UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|Coach") + bool DeferDisplayedCoachQueueEntry( + const FString& DeferredUntilUtc, + const FString& DeferralReasonLabel, + bool bManualReschedule + ); + + UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|Coach") + bool PromoteCoachQueueEntry(const FString& EntryId); + UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training") FHyperTwistTrainingRepositoryRoundTripVerification VerifyTrainingRepositoryRoundTrip(); }; diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingSessionActor.h b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingSessionActor.h index 03fc328..63ca269 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingSessionActor.h +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingSessionActor.h @@ -46,9 +46,18 @@ public: UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|Coach") FHyperTwistCoachBrief CachedCoachBrief; + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|Coach") + FHyperTwistCoachBrief CachedCoachFollowUpBrief; + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|Coach") FHyperTwistCoachSessionQueueSummary CachedCoachSessionQueueSummary; + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|Coach") + FHyperTwistTrainingCoachSessionQueueState CachedCoachSessionQueueState; + + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|Coach") + FHyperTwistCoachScheduleHorizonSummary CachedCoachScheduleHorizonSummary; + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|Coach") FHyperTwistCoachSchedulePolicySummary CachedCoachSchedulePolicySummary; @@ -111,6 +120,24 @@ public: UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|Coach") FHyperTwistTrainingRunState StartNextQueuedCoachTrainingRun(int32 MaxCases); + UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|Coach") + bool DeferCoachQueueEntry( + const FString& EntryId, + const FString& DeferredUntilUtc, + const FString& DeferralReasonLabel, + bool bManualReschedule + ); + + UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|Coach") + bool DeferDisplayedCoachQueueEntry( + const FString& DeferredUntilUtc, + const FString& DeferralReasonLabel, + bool bManualReschedule + ); + + UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|Coach") + bool PromoteCoachQueueEntry(const FString& EntryId); + UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training") FHyperTwistTrainingRepositoryRoundTripVerification VerifyRepositoryRoundTrip(); };