wt1.1.2d ProgressInfo+
This commit is contained in:
@@ -126,8 +126,8 @@ class Cache {
|
||||
_exercisesTrainee = null;
|
||||
_traineeExercisePlan = null;
|
||||
_exercises = List();
|
||||
_myExercisesPlanDetails = LinkedHashMap();
|
||||
print("Trainees is null? " + (_trainee == null).toString() );
|
||||
//firstLoad = true;
|
||||
Future<SharedPreferences> prefs = SharedPreferences.getInstance();
|
||||
await setPreferences(prefs, SharePrefsChange.logout, 0);
|
||||
}
|
||||
|
||||
+14
-1
@@ -1,4 +1,3 @@
|
||||
import 'package:aitrainer_app/util/common.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
class Exercise {
|
||||
@@ -12,6 +11,7 @@ class Exercise {
|
||||
int exercisePlanDetailId;
|
||||
|
||||
String datePart;
|
||||
double calculated;
|
||||
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ class Exercise {
|
||||
this.unitQuantity = json['unitQuantity'];
|
||||
this.dateAdd = DateTime.parse( json['dateAdd'] );
|
||||
this.datePart = DateFormat('yyyy-MM-dd').format(this.dateAdd);
|
||||
this.calculated = quantity;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() =>
|
||||
@@ -38,6 +39,18 @@ class Exercise {
|
||||
"exercisePlanDetailId": exercisePlanDetailId,
|
||||
};
|
||||
|
||||
Map<String, dynamic> toJsonDatePart() =>
|
||||
{
|
||||
"exerciseTypeId": exerciseTypeId,
|
||||
"customerId": customerId,
|
||||
"quantity": quantity,
|
||||
'calculated': calculated,
|
||||
"unit": unit,
|
||||
"unitQuantity": unitQuantity,
|
||||
"datePart": this.datePart,
|
||||
};
|
||||
|
||||
|
||||
Exercise copy() {
|
||||
Exercise newExercise = Exercise();
|
||||
newExercise.exerciseTypeId = this.exerciseTypeId;
|
||||
|
||||
Reference in New Issue
Block a user