1.1.22+3 corrections
This commit is contained in:
@@ -71,7 +71,11 @@ enum ActivityDone {
|
||||
tutorialBasicLegPress,
|
||||
tutorialDevelopment,
|
||||
isExerciseLogSeen,
|
||||
isMuscleDevelopmentSeen
|
||||
isMuscleDevelopmentSeen,
|
||||
isBodyTypeSeen,
|
||||
exerciseSaveTestTip,
|
||||
exerciseSaveTrainingTip,
|
||||
exerciseSaveTestsetTip
|
||||
}
|
||||
|
||||
extension ActivityDoneExt on ActivityDone {
|
||||
@@ -641,8 +645,8 @@ class Cache with Logging {
|
||||
}
|
||||
if (this._exercises == null || this._exercises!.isEmpty) {
|
||||
setBadge("home", true);
|
||||
setBadge("Muscle Build / Shape Toning", true);
|
||||
setBadge("Cardio", true);
|
||||
setBadge("Custom Tests", true);
|
||||
setBadge("Start Training", true);
|
||||
}
|
||||
if (customerRepository.getHeight() == 0) {
|
||||
setBadge("BMI", true);
|
||||
@@ -726,6 +730,8 @@ class Cache with Logging {
|
||||
sharedPreferences.setBool(activity.toStr(), true);
|
||||
}
|
||||
|
||||
bool isActivityDone(ActivityDone activity) => activitiesDone[activity.toStr()] == true;
|
||||
|
||||
List<Evaluation>? get evaluations => this._evaluations;
|
||||
set evaluations(List<Evaluation>? value) => this._evaluations = value;
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ class Customer {
|
||||
DateTime? dateChange;
|
||||
int? emailSubscription;
|
||||
int? sportId;
|
||||
DateTime? syncedDate;
|
||||
DateTime? trialDate;
|
||||
|
||||
LinkedHashMap<String, CustomerProperty> properties = LinkedHashMap();
|
||||
@@ -71,6 +72,7 @@ class Customer {
|
||||
this.dataPolicyAllowed = json['dataPolicyAllowed'];
|
||||
this.emailSubscription = json['emailSubscription'];
|
||||
this.sportId = json['sportId'];
|
||||
this.syncedDate = json['syncedDate'] == null ? null : DateTime.parse(json['syncedDate']);
|
||||
this.trialDate = json['trialDate'] == null ? null : DateTime.parse(json['trialDate']);
|
||||
|
||||
this.dateAdd = json['dateAdd'] == null ? DateTime.parse("0000-00-00") : DateTime.parse(json['dateAdd']);
|
||||
@@ -96,9 +98,13 @@ class Customer {
|
||||
"dateChange": DateFormat('yyyy-MM-dd HH:mm:ss').format(this.dateChange!),
|
||||
"emailSubscription": this.emailSubscription,
|
||||
"sportId": this.sportId,
|
||||
"trialDate": DateFormat('yyyy-MM-dd HH:mm:ss').format(this.trialDate!),
|
||||
"syncedDate": this.syncedDate == null ? null : DateFormat('yyyy-MM-dd HH:mm:ss').format(this.syncedDate!),
|
||||
"trialDate": this.trialDate == null ? null : DateFormat('yyyy-MM-dd HH:mm:ss').format(this.trialDate!),
|
||||
};
|
||||
|
||||
@override
|
||||
String toString() => this.toJson().toString();
|
||||
|
||||
double getProperty(String propertyName) {
|
||||
if (this.properties[propertyName] == null) {
|
||||
return 0;
|
||||
|
||||
@@ -59,7 +59,7 @@ class CustomerTrainingPlanDetails {
|
||||
this.exerciseTypeId = json['exerciseTypeId'];
|
||||
this.set = json['set'];
|
||||
this.repeats = json['repeats'] == "null" ? -1 : json['repeats'];
|
||||
this.weight = json['weight'];
|
||||
this.weight = json['weight'] == "null" ? 0 : json['weight'];
|
||||
this.restingTime = json['restingTime'];
|
||||
this.parallel = json['parallel'] == "false"
|
||||
? false
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import 'dart:collection';
|
||||
|
||||
import 'package:aitrainer_app/util/app_language.dart';
|
||||
|
||||
class Faq {
|
||||
late int faqId;
|
||||
late String name;
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
class Mautic {
|
||||
late int formId;
|
||||
String? firstname;
|
||||
String? lastname;
|
||||
String? email;
|
||||
String? fitnessLevel;
|
||||
String? goal;
|
||||
int? databaseId;
|
||||
String? subscriptionDate;
|
||||
String? language;
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"formId": this.formId,
|
||||
"firstname": this.firstname,
|
||||
"lastname": this.lastname,
|
||||
"email": this.email,
|
||||
"fitnessLevel": this.fitnessLevel,
|
||||
"goal": this.goal,
|
||||
"databaseId": this.databaseId,
|
||||
"subscriptionDate": this.subscriptionDate,
|
||||
"language": this.language
|
||||
};
|
||||
|
||||
String toForm() {
|
||||
String form = "mauticform[formId]=${this.formId}";
|
||||
form += this.email == null ? "" : "&mauticform[email]=${this.email}";
|
||||
form += this.lastname == null ? "" : "&mauticform[f_name]=${this.lastname}";
|
||||
form += this.firstname == null ? "" : "&mauticform[firstname]=${this.firstname}";
|
||||
form += this.fitnessLevel == null ? "" : "&mauticform[fitness_level]=${this.fitnessLevel}";
|
||||
form += this.goal == null ? "" : "&mauticform[goal]=${this.goal}";
|
||||
form += this.subscriptionDate == null ? "" : "&mauticform[subscribed]=${this.subscriptionDate}";
|
||||
form += this.databaseId == null ? "" : "&mauticform[database_id]=${this.databaseId}";
|
||||
form += this.language == null ? "" : "&mauticform[language]=${this.language}";
|
||||
|
||||
return form;
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() => this.toJson().toString();
|
||||
}
|
||||
+11
-3
@@ -1,13 +1,21 @@
|
||||
import 'dart:collection';
|
||||
|
||||
class Sport {
|
||||
late int sportId;
|
||||
late String name;
|
||||
late String sportNameTranslation;
|
||||
|
||||
HashMap<String, String> nameTranslations = HashMap();
|
||||
|
||||
Sport.fromJson(Map json) {
|
||||
this.sportId = json['sportId'];
|
||||
this.name = json['name'];
|
||||
this.sportNameTranslation =
|
||||
json['translations'] != null && (json['translations']).length > 0 ? json['translations'][0]['sportName'] : this.name;
|
||||
|
||||
nameTranslations['en'] = name;
|
||||
if (json['translations'] != null && json['translations'].length > 0) {
|
||||
json['translations'].forEach((translation) {
|
||||
nameTranslations[translation['languageCode']] = translation['sportName'];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
|
||||
@@ -10,6 +10,7 @@ class TrainingPlanDetail {
|
||||
bool? parallel;
|
||||
int? dayId;
|
||||
String? day;
|
||||
String? summary;
|
||||
|
||||
TrainingPlanDetail.fromJson(Map<String, dynamic> json) {
|
||||
this.trainingPlanDetailId = json['trainingPlanDetailId'];
|
||||
@@ -35,6 +36,7 @@ class TrainingPlanDetail {
|
||||
"parallel": this.parallel,
|
||||
"dayId": this.dayId,
|
||||
"day": this.day,
|
||||
"summary": this.summary
|
||||
};
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user