From 5398f80e27c45e89538e9584a764a2d65f1fcd6c Mon Sep 17 00:00:00 2001
From: bossanyit <tibor.bossanyi@aitrainer.app>
Date: Sun, 6 Jun 2021 10:50:18 +0200
Subject: [PATCH] WT 1.1.18+6 fixes

---
 ios/Runner.xcodeproj/project.pbxproj           |  6 +++---
 lib/bloc/training_plan/training_plan_bloc.dart |  1 +
 lib/view/training_plan_activate_page.dart      | 17 +++++++++++++++++
 pubspec.yaml                                   |  2 +-
 4 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 9e39a62..dbfd96d 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -388,7 +388,7 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
-				CURRENT_PROJECT_VERSION = 4;
+				CURRENT_PROJECT_VERSION = 6;
 				DEVELOPMENT_TEAM = SFJJBDCU6Z;
 				ENABLE_BITCODE = NO;
 				FRAMEWORK_SEARCH_PATHS = (
@@ -531,7 +531,7 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
-				CURRENT_PROJECT_VERSION = 4;
+				CURRENT_PROJECT_VERSION = 6;
 				DEVELOPMENT_TEAM = SFJJBDCU6Z;
 				ENABLE_BITCODE = NO;
 				FRAMEWORK_SEARCH_PATHS = (
@@ -566,7 +566,7 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
-				CURRENT_PROJECT_VERSION = 4;
+				CURRENT_PROJECT_VERSION = 6;
 				DEVELOPMENT_TEAM = SFJJBDCU6Z;
 				ENABLE_BITCODE = NO;
 				FRAMEWORK_SEARCH_PATHS = (
diff --git a/lib/bloc/training_plan/training_plan_bloc.dart b/lib/bloc/training_plan/training_plan_bloc.dart
index 652112d..d6bb4cb 100644
--- a/lib/bloc/training_plan/training_plan_bloc.dart
+++ b/lib/bloc/training_plan/training_plan_bloc.dart
@@ -191,6 +191,7 @@ class TrainingPlanBloc extends Bloc<TrainingPlanEvent, TrainingPlanState> {
     }
     _myPlan!.trainingPlanId = 0;
     _myPlan!.name = "Custom";
+    _myPlan!.dateAdd = DateTime.now();
     _myPlan!.customerId = Cache().userLoggedIn == null ? Cache().userLoggedIn!.customerId : 0;
 
     _myPlan!.type = CustomerTrainingPlanType.custom;
diff --git a/lib/view/training_plan_activate_page.dart b/lib/view/training_plan_activate_page.dart
index 5c866f2..5fd2555 100644
--- a/lib/view/training_plan_activate_page.dart
+++ b/lib/view/training_plan_activate_page.dart
@@ -231,6 +231,23 @@ class TrainingPlanActivatePage extends StatelessWidget with Trans {
                 ),
               },
             ),
+            plan.details == null || plan.details!.isEmpty
+                ? Container(
+                    padding: EdgeInsets.only(bottom: 8),
+                    child: Text(
+                      "Soon! Check back later for the plan details",
+                      style: GoogleFonts.inter(
+                        color: Colors.orange[800],
+                        shadows: <Shadow>[
+                          Shadow(
+                            offset: Offset(2.0, 2.0),
+                            blurRadius: 3.0,
+                            color: Colors.black54,
+                          ),
+                        ],
+                      ),
+                    ))
+                : Offstage(),
             getPlanDetails(plan, bloc),
             ElevatedButton(
               style: ElevatedButton.styleFrom(
diff --git a/pubspec.yaml b/pubspec.yaml
index 9b3c9b3..c2731b5 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
 # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
 # Read more about iOS versioning at
 # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
-version: 1.1.18+83
+version: 1.1.18+84
 
 environment:
   sdk: ">=2.12.0 <3.0.0"