This commit is contained in:
Trey t
2023-06-15 21:35:42 -05:00
parent bf58ca5167
commit c2ea70305c
16 changed files with 54630 additions and 78 deletions

View File

@@ -23,6 +23,15 @@
1CF65A502A3A1EA90042FFBD /* BridgeModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CF65A4F2A3A1EA90042FFBD /* BridgeModule.swift */; };
1CF65A522A3A90A00042FFBD /* PreviewWorkout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CF65A512A3A90A00042FFBD /* PreviewWorkout.swift */; };
1CF65A542A3A9AF30042FFBD /* Straight_Leg_Sit_Up.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 1CF65A532A3A9A990042FFBD /* Straight_Leg_Sit_Up.mp4 */; };
1CF65A572A3BF3830042FFBD /* AllMuscles.json in Resources */ = {isa = PBXBuildFile; fileRef = 1CF65A562A3BF3830042FFBD /* AllMuscles.json */; };
1CF65A592A3BF4B60042FFBD /* Muscle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CF65A582A3BF4B60042FFBD /* Muscle.swift */; };
1CF65A5B2A3BF4BE0042FFBD /* Equipment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CF65A5A2A3BF4BE0042FFBD /* Equipment.swift */; };
1CF65A5F2A3BF5A60042FFBD /* Equipment.json in Resources */ = {isa = PBXBuildFile; fileRef = 1CF65A5E2A3BF5A60042FFBD /* Equipment.json */; };
1CF65A612A3BF6020042FFBD /* CreateWorkoutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CF65A602A3BF6020042FFBD /* CreateWorkoutView.swift */; };
1CF65A632A3BF6A30042FFBD /* AllWorkoutsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CF65A622A3BF6A30042FFBD /* AllWorkoutsView.swift */; };
1CF65A652A3BF6BE0042FFBD /* AllWorkouts.json in Resources */ = {isa = PBXBuildFile; fileRef = 1CF65A642A3BF6BE0042FFBD /* AllWorkouts.json */; };
1CF65A672A3BFF840042FFBD /* Exercises.json in Resources */ = {isa = PBXBuildFile; fileRef = 1CF65A662A3BFF840042FFBD /* Exercises.json */; };
1CF65A692A3C018F0042FFBD /* AccountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CF65A682A3C018F0042FFBD /* AccountView.swift */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -45,6 +54,15 @@
1CF65A512A3A90A00042FFBD /* PreviewWorkout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreviewWorkout.swift; sourceTree = "<group>"; };
1CF65A532A3A9A990042FFBD /* Straight_Leg_Sit_Up.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = Straight_Leg_Sit_Up.mp4; sourceTree = "<group>"; };
1CF65A552A3AA6800042FFBD /* Werkout-ios-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "Werkout-ios-Info.plist"; sourceTree = SOURCE_ROOT; };
1CF65A562A3BF3830042FFBD /* AllMuscles.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = AllMuscles.json; sourceTree = "<group>"; };
1CF65A582A3BF4B60042FFBD /* Muscle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Muscle.swift; sourceTree = "<group>"; };
1CF65A5A2A3BF4BE0042FFBD /* Equipment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Equipment.swift; sourceTree = "<group>"; };
1CF65A5E2A3BF5A60042FFBD /* Equipment.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = Equipment.json; sourceTree = "<group>"; };
1CF65A602A3BF6020042FFBD /* CreateWorkoutView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateWorkoutView.swift; sourceTree = "<group>"; };
1CF65A622A3BF6A30042FFBD /* AllWorkoutsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllWorkoutsView.swift; sourceTree = "<group>"; };
1CF65A642A3BF6BE0042FFBD /* AllWorkouts.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = AllWorkouts.json; sourceTree = "<group>"; };
1CF65A662A3BFF840042FFBD /* Exercises.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = Exercises.json; sourceTree = "<group>"; };
1CF65A682A3C018F0042FFBD /* AccountView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountView.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -116,6 +134,8 @@
1CF65A422A39FB410042FFBD /* Workout.swift */,
1CF65A442A39FB550042FFBD /* Exercise.swift */,
1CF65A462A39FB6C0042FFBD /* RegisteredUser.swift */,
1CF65A582A3BF4B60042FFBD /* Muscle.swift */,
1CF65A5A2A3BF4BE0042FFBD /* Equipment.swift */,
);
path = Models;
sourceTree = "<group>";
@@ -123,10 +143,13 @@
1CF65A3F2A3973840042FFBD /* Views */ = {
isa = PBXGroup;
children = (
1CF65A622A3BF6A30042FFBD /* AllWorkoutsView.swift */,
1CF65A602A3BF6020042FFBD /* CreateWorkoutView.swift */,
1CF65A2C2A3972840042FFBD /* MainView.swift */,
1CF65A4B2A39FDA20042FFBD /* WorkoutDetailView.swift */,
1CF65A4D2A39FF200042FFBD /* WorkoutDetailViewModel.swift */,
1CF65A3B2A3972CE0042FFBD /* ExternalWorkoutDetailView.swift */,
1CF65A682A3C018F0042FFBD /* AccountView.swift */,
);
path = Views;
sourceTree = "<group>";
@@ -134,7 +157,11 @@
1CF65A482A39FB910042FFBD /* JSON */ = {
isa = PBXGroup;
children = (
1CF65A642A3BF6BE0042FFBD /* AllWorkouts.json */,
1CF65A492A39FBB10042FFBD /* WorkoutOne.json */,
1CF65A562A3BF3830042FFBD /* AllMuscles.json */,
1CF65A5E2A3BF5A60042FFBD /* Equipment.json */,
1CF65A662A3BFF840042FFBD /* Exercises.json */,
);
path = JSON;
sourceTree = "<group>";
@@ -197,8 +224,12 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1CF65A5F2A3BF5A60042FFBD /* Equipment.json in Resources */,
1CF65A4A2A39FBB10042FFBD /* WorkoutOne.json in Resources */,
1CF65A652A3BF6BE0042FFBD /* AllWorkouts.json in Resources */,
1CF65A332A3972850042FFBD /* Preview Assets.xcassets in Resources */,
1CF65A672A3BFF840042FFBD /* Exercises.json in Resources */,
1CF65A572A3BF3830042FFBD /* AllMuscles.json in Resources */,
1CF65A542A3A9AF30042FFBD /* Straight_Leg_Sit_Up.mp4 in Resources */,
1CF65A2F2A3972850042FFBD /* Assets.xcassets in Resources */,
);
@@ -213,16 +244,21 @@
files = (
1CF65A262A3972840042FFBD /* Werkout_iosApp.swift in Sources */,
1CF65A3C2A3972CE0042FFBD /* ExternalWorkoutDetailView.swift in Sources */,
1CF65A632A3BF6A30042FFBD /* AllWorkoutsView.swift in Sources */,
1CF65A692A3C018F0042FFBD /* AccountView.swift in Sources */,
1CF65A4E2A39FF200042FFBD /* WorkoutDetailViewModel.swift in Sources */,
1CF65A472A39FB6C0042FFBD /* RegisteredUser.swift in Sources */,
1CF65A522A3A90A00042FFBD /* PreviewWorkout.swift in Sources */,
1CF65A4C2A39FDA20042FFBD /* WorkoutDetailView.swift in Sources */,
1CF65A432A39FB410042FFBD /* Workout.swift in Sources */,
1CF65A502A3A1EA90042FFBD /* BridgeModule.swift in Sources */,
1CF65A592A3BF4B60042FFBD /* Muscle.swift in Sources */,
1CF65A2B2A3972840042FFBD /* Werkout_ios.xcdatamodeld in Sources */,
1CF65A2D2A3972840042FFBD /* MainView.swift in Sources */,
1CF65A282A3972840042FFBD /* Persistence.swift in Sources */,
1CF65A5B2A3BF4BE0042FFBD /* Equipment.swift in Sources */,
1CF65A452A39FB550042FFBD /* Exercise.swift in Sources */,
1CF65A612A3BF6020042FFBD /* CreateWorkoutView.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@@ -0,0 +1,230 @@
[
{
"id": 1,
"created_at": "2023-06-13T01:58:13.212264Z",
"updated_at": "2023-06-13T01:58:13.212311Z",
"name": "deltoids"
},
{
"id": 2,
"created_at": "2023-06-13T01:58:13.214487Z",
"updated_at": "2023-06-13T01:58:13.214520Z",
"name": "core"
},
{
"id": 3,
"created_at": "2023-06-13T01:58:13.215255Z",
"updated_at": "2023-06-13T01:58:13.215277Z",
"name": "obliques"
},
{
"id": 4,
"created_at": "2023-06-13T01:58:13.216495Z",
"updated_at": "2023-06-13T01:58:13.216522Z",
"name": "glutes"
},
{
"id": 5,
"created_at": "2023-06-13T01:58:13.217347Z",
"updated_at": "2023-06-13T01:58:13.217371Z",
"name": "quads"
},
{
"id": 6,
"created_at": "2023-06-13T01:58:13.218407Z",
"updated_at": "2023-06-13T01:58:13.218434Z",
"name": "hamstrings"
},
{
"id": 7,
"created_at": "2023-06-13T01:58:13.219494Z",
"updated_at": "2023-06-13T01:58:13.219521Z",
"name": "hip abductors"
},
{
"id": 8,
"created_at": "2023-06-13T01:58:13.220702Z",
"updated_at": "2023-06-13T01:58:13.220737Z",
"name": "triceps"
},
{
"id": 9,
"created_at": "2023-06-13T01:58:13.221543Z",
"updated_at": "2023-06-13T01:58:13.221564Z",
"name": "upper back"
},
{
"id": 10,
"created_at": "2023-06-13T01:58:13.222148Z",
"updated_at": "2023-06-13T01:58:13.222166Z",
"name": "lats"
},
{
"id": 11,
"created_at": "2023-06-13T01:58:13.222710Z",
"updated_at": "2023-06-13T01:58:13.222729Z",
"name": ""
},
{
"id": 12,
"created_at": "2023-06-13T01:58:13.223248Z",
"updated_at": "2023-06-13T01:58:13.223267Z",
"name": "Abs"
},
{
"id": 13,
"created_at": "2023-06-13T01:58:13.223787Z",
"updated_at": "2023-06-13T01:58:13.223805Z",
"name": "middle back"
},
{
"id": 14,
"created_at": "2023-06-13T01:58:13.224313Z",
"updated_at": "2023-06-13T01:58:13.224330Z",
"name": "biceps"
},
{
"id": 15,
"created_at": "2023-06-13T01:58:13.224843Z",
"updated_at": "2023-06-13T01:58:13.224860Z",
"name": "rotator cuff"
},
{
"id": 16,
"created_at": "2023-06-13T01:58:13.225377Z",
"updated_at": "2023-06-13T01:58:13.225394Z",
"name": "hip flexor"
},
{
"id": 17,
"created_at": "2023-06-13T01:58:13.226340Z",
"updated_at": "2023-06-13T01:58:13.226370Z",
"name": "Quads"
},
{
"id": 18,
"created_at": "2023-06-13T01:58:13.227071Z",
"updated_at": "2023-06-13T01:58:13.227094Z",
"name": "Glutes"
},
{
"id": 19,
"created_at": "2023-06-13T01:58:13.227668Z",
"updated_at": "2023-06-13T01:58:13.227687Z",
"name": "lower back"
},
{
"id": 20,
"created_at": "2023-06-13T01:58:13.228176Z",
"updated_at": "2023-06-13T01:58:13.228193Z",
"name": "chest"
},
{
"id": 21,
"created_at": "2023-06-13T01:58:13.228647Z",
"updated_at": "2023-06-13T01:58:13.228663Z",
"name": "Shoulders"
},
{
"id": 22,
"created_at": "2023-06-13T01:58:13.229110Z",
"updated_at": "2023-06-13T01:58:13.229126Z",
"name": "calves"
},
{
"id": 23,
"created_at": "2023-06-13T01:58:13.229566Z",
"updated_at": "2023-06-13T01:58:13.229581Z",
"name": "Obliques"
},
{
"id": 24,
"created_at": "2023-06-13T01:58:13.230014Z",
"updated_at": "2023-06-13T01:58:13.230031Z",
"name": "Hip Flexor"
},
{
"id": 25,
"created_at": "2023-06-13T01:58:13.230457Z",
"updated_at": "2023-06-13T01:58:13.230472Z",
"name": "Middle Back"
},
{
"id": 26,
"created_at": "2023-06-13T01:58:13.230905Z",
"updated_at": "2023-06-13T01:58:13.230919Z",
"name": "Lats"
},
{
"id": 27,
"created_at": "2023-06-13T01:58:13.231350Z",
"updated_at": "2023-06-13T01:58:13.231364Z",
"name": "hip adductors"
},
{
"id": 28,
"created_at": "2023-06-13T01:58:13.231849Z",
"updated_at": "2023-06-13T01:58:13.231864Z",
"name": "traps"
},
{
"id": 29,
"created_at": "2023-06-13T01:58:13.232295Z",
"updated_at": "2023-06-13T01:58:13.232310Z",
"name": "forearms"
},
{
"id": 30,
"created_at": "2023-06-13T01:58:13.232733Z",
"updated_at": "2023-06-13T01:58:13.232748Z",
"name": "abs"
},
{
"id": 31,
"created_at": "2023-06-13T01:58:13.233175Z",
"updated_at": "2023-06-13T01:58:13.233192Z",
"name": "Biceps"
},
{
"id": 32,
"created_at": "2023-06-13T01:58:13.233616Z",
"updated_at": "2023-06-13T01:58:13.233631Z",
"name": "Triceps"
},
{
"id": 33,
"created_at": "2023-06-13T01:58:13.234054Z",
"updated_at": "2023-06-13T01:58:13.234068Z",
"name": "Core"
},
{
"id": 34,
"created_at": "2023-06-13T01:58:13.234489Z",
"updated_at": "2023-06-13T01:58:13.234503Z",
"name": "intercostals"
},
{
"id": 35,
"created_at": "2023-06-13T01:58:13.234927Z",
"updated_at": "2023-06-13T01:58:13.234941Z",
"name": "Chest"
},
{
"id": 36,
"created_at": "2023-06-13T01:58:13.235368Z",
"updated_at": "2023-06-13T01:58:13.235383Z",
"name": "feet"
},
{
"id": 37,
"created_at": "2023-06-13T01:58:13.236126Z",
"updated_at": "2023-06-13T01:58:13.236153Z",
"name": "arms"
},
{
"id": 38,
"created_at": "2023-06-13T01:58:13.236718Z",
"updated_at": "2023-06-13T01:58:13.236734Z",
"name": "it band"
}
]

View File

@@ -0,0 +1,36 @@
[
{
"id": 4,
"created_at": "2023-06-12T02:11:42.917529Z",
"updated_at": "2023-06-16T01:48:17.565038Z",
"name": "Sample Workou 1",
"description": "thot workout",
"registered_user": {
"id": 1,
"created_at": "2023-06-11T22:09:52.419314Z",
"updated_at": "2023-06-11T22:09:52.419342Z",
"first_name": "test1_fist",
"last_name": "test1_last",
"image": "",
"nick_name": null,
"user": 2
}
},
{
"id": 5,
"created_at": "2023-06-13T02:01:33.290254Z",
"updated_at": "2023-06-16T01:48:08.680277Z",
"name": "test",
"description": "workout for upper body",
"registered_user": {
"id": 2,
"created_at": "2023-06-13T02:00:52.161674Z",
"updated_at": "2023-06-13T02:00:52.161733Z",
"first_name": "test2_first",
"last_name": "test2_last",
"image": "",
"nick_name": null,
"user": 3
}
}
]

View File

@@ -0,0 +1,418 @@
[
{
"id": 1088,
"created_at": "2023-06-11T23:00:16.734003Z",
"updated_at": "2023-06-11T23:00:16.734088Z",
"is_weight": true,
"category": "Weights",
"name": "Kettlebell"
},
{
"id": 1089,
"created_at": "2023-06-11T23:00:16.736417Z",
"updated_at": "2023-06-11T23:00:16.736445Z",
"is_weight": false,
"category": "Surfaces",
"name": "Yoga Mat"
},
{
"id": 1090,
"created_at": "2023-06-11T23:00:16.737296Z",
"updated_at": "2023-06-11T23:00:16.737319Z",
"is_weight": false,
"category": "Other",
"name": "Suspension Trainer"
},
{
"id": 1091,
"created_at": "2023-06-11T23:00:16.738300Z",
"updated_at": "2023-06-11T23:00:16.738326Z",
"is_weight": true,
"category": "Weights",
"name": "Dumbbell"
},
{
"id": 1092,
"created_at": "2023-06-11T23:00:16.739434Z",
"updated_at": "2023-06-11T23:00:16.739463Z",
"is_weight": false,
"category": "Surfaces",
"name": "Box"
},
{
"id": 1093,
"created_at": "2023-06-11T23:00:16.743650Z",
"updated_at": "2023-06-11T23:00:16.743687Z",
"is_weight": false,
"category": "Mobility",
"name": "Lacrosse Ball"
},
{
"id": 1094,
"created_at": "2023-06-11T23:00:16.744876Z",
"updated_at": "2023-06-11T23:00:16.744905Z",
"is_weight": false,
"category": "Surfaces",
"name": "Bench"
},
{
"id": 1095,
"created_at": "2023-06-11T23:00:16.746362Z",
"updated_at": "2023-06-11T23:00:16.746391Z",
"is_weight": true,
"category": "Weights",
"name": "Barbell"
},
{
"id": 1096,
"created_at": "2023-06-11T23:00:16.747581Z",
"updated_at": "2023-06-11T23:00:16.747618Z",
"is_weight": false,
"category": "Other",
"name": "Pull-Up Bar"
},
{
"id": 1097,
"created_at": "2023-06-11T23:00:16.748547Z",
"updated_at": "2023-06-11T23:00:16.748572Z",
"is_weight": true,
"category": "",
"name": "Plate"
},
{
"id": 1098,
"created_at": "2023-06-11T23:00:16.749551Z",
"updated_at": "2023-06-11T23:00:16.749584Z",
"is_weight": true,
"category": "Bands",
"name": "Resistance Band"
},
{
"id": 1099,
"created_at": "2023-06-11T23:00:16.750466Z",
"updated_at": "2023-06-11T23:00:16.750493Z",
"is_weight": true,
"category": "Weights",
"name": "Medicine Ball"
},
{
"id": 1100,
"created_at": "2023-06-11T23:00:16.751132Z",
"updated_at": "2023-06-11T23:00:16.751148Z",
"is_weight": true,
"category": "Machine",
"name": "Horizontal Leg Press Machine"
},
{
"id": 1101,
"created_at": "2023-06-11T23:00:16.751708Z",
"updated_at": "2023-06-11T23:00:16.751725Z",
"is_weight": false,
"category": "Other",
"name": "Battle Ropes"
},
{
"id": 1102,
"created_at": "2023-06-11T23:00:16.752239Z",
"updated_at": "2023-06-11T23:00:16.752254Z",
"is_weight": true,
"category": "Machine",
"name": "Leg Press Machine"
},
{
"id": 1103,
"created_at": "2023-06-11T23:00:16.752770Z",
"updated_at": "2023-06-11T23:00:16.752785Z",
"is_weight": true,
"category": "Other",
"name": "Cable Resistance Machine"
},
{
"id": 1104,
"created_at": "2023-06-11T23:00:16.753276Z",
"updated_at": "2023-06-11T23:00:16.753291Z",
"is_weight": false,
"category": "Other",
"name": "Partner"
},
{
"id": 1105,
"created_at": "2023-06-11T23:00:16.753777Z",
"updated_at": "2023-06-11T23:00:16.753791Z",
"is_weight": true,
"category": "Machine",
"name": "Leg Extension Machine"
},
{
"id": 1106,
"created_at": "2023-06-11T23:00:16.754288Z",
"updated_at": "2023-06-11T23:00:16.754302Z",
"is_weight": false,
"category": "Surfaces",
"name": "Wall"
},
{
"id": 1107,
"created_at": "2023-06-11T23:00:16.754782Z",
"updated_at": "2023-06-11T23:00:16.754797Z",
"is_weight": true,
"category": "Weights",
"name": "Plates"
},
{
"id": 1108,
"created_at": "2023-06-11T23:00:16.755276Z",
"updated_at": "2023-06-11T23:00:16.755291Z",
"is_weight": true,
"category": "Bands",
"name": "Miniband"
},
{
"id": 1109,
"created_at": "2023-06-11T23:00:16.755769Z",
"updated_at": "2023-06-11T23:00:16.755784Z",
"is_weight": false,
"category": "Other",
"name": "Agility Ladder"
},
{
"id": 1110,
"created_at": "2023-06-11T23:00:16.756257Z",
"updated_at": "2023-06-11T23:00:16.756272Z",
"is_weight": true,
"category": "Machine",
"name": "Pec Deck / Reverse Fly Machine"
},
{
"id": 1111,
"created_at": "2023-06-11T23:00:16.756790Z",
"updated_at": "2023-06-11T23:00:16.756807Z",
"is_weight": true,
"category": "Machine",
"name": "Chest Supported Row Machine"
},
{
"id": 1112,
"created_at": "2023-06-11T23:00:16.757376Z",
"updated_at": "2023-06-11T23:00:16.757393Z",
"is_weight": true,
"category": "Machine",
"name": "Lat Pull Down Machine"
},
{
"id": 1113,
"created_at": "2023-06-11T23:00:16.757953Z",
"updated_at": "2023-06-11T23:00:16.757969Z",
"is_weight": true,
"category": "Weights",
"name": "EZ Bar"
},
{
"id": 1114,
"created_at": "2023-06-11T23:00:16.758520Z",
"updated_at": "2023-06-11T23:00:16.758536Z",
"is_weight": false,
"category": "Surfaces",
"name": "Stability Ball"
},
{
"id": 1115,
"created_at": "2023-06-11T23:00:16.759018Z",
"updated_at": "2023-06-11T23:00:16.759033Z",
"is_weight": false,
"category": "Mobility",
"name": "Dowel"
},
{
"id": 1116,
"created_at": "2023-06-11T23:00:16.760471Z",
"updated_at": "2023-06-11T23:00:16.760489Z",
"is_weight": false,
"category": "Mobility",
"name": "PVC Pipe"
},
{
"id": 1117,
"created_at": "2023-06-11T23:00:16.761033Z",
"updated_at": "2023-06-11T23:00:16.761047Z",
"is_weight": false,
"category": "Mobility",
"name": "Foam Roll"
},
{
"id": 1118,
"created_at": "2023-06-11T23:00:16.761537Z",
"updated_at": "2023-06-11T23:00:16.761552Z",
"is_weight": true,
"category": "Machine",
"name": "Seated Chest Press Machine"
},
{
"id": 1119,
"created_at": "2023-06-11T23:00:16.762040Z",
"updated_at": "2023-06-11T23:00:16.762055Z",
"is_weight": false,
"category": "Other",
"name": "Tricep Rope"
},
{
"id": 1120,
"created_at": "2023-06-11T23:00:16.762531Z",
"updated_at": "2023-06-11T23:00:16.762544Z",
"is_weight": false,
"category": "Surfaces",
"name": "Chair"
},
{
"id": 1121,
"created_at": "2023-06-11T23:00:16.763016Z",
"updated_at": "2023-06-11T23:00:16.763031Z",
"is_weight": true,
"category": "Machine",
"name": "Seated Shoulder Press Machine"
},
{
"id": 1122,
"created_at": "2023-06-11T23:00:16.763508Z",
"updated_at": "2023-06-11T23:00:16.763522Z",
"is_weight": true,
"category": "Machine",
"name": "Leg Curl Seated Machine"
},
{
"id": 1123,
"created_at": "2023-06-11T23:00:16.763995Z",
"updated_at": "2023-06-11T23:00:16.764010Z",
"is_weight": true,
"category": "Machine",
"name": "Seated Calf Raise Machine"
},
{
"id": 1124,
"created_at": "2023-06-11T23:00:16.764475Z",
"updated_at": "2023-06-11T23:00:16.764488Z",
"is_weight": true,
"category": "Weights",
"name": "Trap Bar"
},
{
"id": 1125,
"created_at": "2023-06-11T23:00:16.764897Z",
"updated_at": "2023-06-11T23:00:16.764910Z",
"is_weight": false,
"category": "Other",
"name": "Ab Wheel"
},
{
"id": 1126,
"created_at": "2023-06-11T23:00:16.765319Z",
"updated_at": "2023-06-11T23:00:16.765332Z",
"is_weight": true,
"category": "Machine",
"name": "Leg Curl Prone Machine"
},
{
"id": 1127,
"created_at": "2023-06-11T23:00:16.765741Z",
"updated_at": "2023-06-11T23:00:16.765753Z",
"is_weight": true,
"category": "Weights",
"name": "Weighted Vest"
},
{
"id": 1128,
"created_at": "2023-06-11T23:00:16.766161Z",
"updated_at": "2023-06-11T23:00:16.766173Z",
"is_weight": false,
"category": "Other",
"name": "Slider"
},
{
"id": 1129,
"created_at": "2023-06-11T23:00:16.766577Z",
"updated_at": "2023-06-11T23:00:16.766590Z",
"is_weight": false,
"category": "Cardio",
"name": "Treadmill"
},
{
"id": 1130,
"created_at": "2023-06-11T23:00:16.766998Z",
"updated_at": "2023-06-11T23:00:16.767010Z",
"is_weight": false,
"category": "Other",
"name": "Machine"
},
{
"id": 1131,
"created_at": "2023-06-11T23:00:16.767415Z",
"updated_at": "2023-06-11T23:00:16.767428Z",
"is_weight": false,
"category": "Cardio",
"name": "Stair Climber"
},
{
"id": 1132,
"created_at": "2023-06-11T23:00:16.767834Z",
"updated_at": "2023-06-11T23:00:16.767845Z",
"is_weight": true,
"category": "Machine",
"name": "Assisted Chin up / Dips Machine"
},
{
"id": 1133,
"created_at": "2023-06-11T23:00:16.768250Z",
"updated_at": "2023-06-11T23:00:16.768261Z",
"is_weight": true,
"category": "Machine",
"name": "Bicep Preacher Curl Machine"
},
{
"id": 1134,
"created_at": "2023-06-11T23:00:16.768666Z",
"updated_at": "2023-06-11T23:00:16.768678Z",
"is_weight": true,
"category": "Machine",
"name": "Hack Squat Machine"
},
{
"id": 1135,
"created_at": "2023-06-11T23:00:16.769086Z",
"updated_at": "2023-06-11T23:00:16.769098Z",
"is_weight": false,
"category": "Cardio",
"name": "Jump Rope"
},
{
"id": 1136,
"created_at": "2023-06-11T23:00:16.769515Z",
"updated_at": "2023-06-11T23:00:16.769527Z",
"is_weight": true,
"category": "Machine",
"name": "Hack Squat 45 Degree Machine"
},
{
"id": 1137,
"created_at": "2023-06-11T23:00:16.770084Z",
"updated_at": "2023-06-11T23:00:16.770096Z",
"is_weight": false,
"category": "Cardio",
"name": "Bike"
},
{
"id": 1138,
"created_at": "2023-06-11T23:00:16.770500Z",
"updated_at": "2023-06-11T23:00:16.770512Z",
"is_weight": false,
"category": "Cardio",
"name": "Rower"
},
{
"id": 1139,
"created_at": "2023-06-11T23:00:16.770915Z",
"updated_at": "2023-06-11T23:00:16.770928Z",
"is_weight": false,
"category": "Cardio",
"name": "Elliptical"
}
]

File diff suppressed because it is too large Load Diff

View File

@@ -1,17 +1,35 @@
{
"name": "Sample Workou 1",
"description": null,
"description": "thot workout",
"exercises": [
{
"workout": 4,
"exercise": {
"id": 790,
"muscles": [
"obliques",
"core"
{
"id": 9368,
"created_at": "2023-06-14T17:05:42.321949Z",
"updated_at": "2023-06-14T17:05:42.322466Z",
"exercise": 790,
"muscle": 3
},
{
"id": 9369,
"created_at": "2023-06-14T17:05:42.323207Z",
"updated_at": "2023-06-14T17:05:42.323633Z",
"exercise": 790,
"muscle": 2
}
],
"equipment": [
"Yoga Mat"
{
"id": 1856,
"created_at": "2023-06-13T02:28:05.326753Z",
"updated_at": "2023-06-13T02:28:05.327125Z",
"category": null,
"name": null
}
],
"audio_url": "/media/exercise_audio/Sprinter_Crunch.m4a",
"video_url": "/media/exercise_videos/Sprinter_Crunch.mp4",
@@ -78,10 +96,22 @@
"exercise": {
"id": 603,
"muscles": [
"core"
{
"id": 8193,
"created_at": "2023-06-14T17:05:40.908270Z",
"updated_at": "2023-06-14T17:05:40.908685Z",
"exercise": 603,
"muscle": 2
}
],
"equipment": [
"Yoga Mat"
{
"id": 1362,
"created_at": "2023-06-13T02:28:04.775223Z",
"updated_at": "2023-06-13T02:28:04.775809Z",
"category": null,
"name": null
}
],
"audio_url": "/media/exercise_audio/High_Plank.m4a",
"video_url": "/media/exercise_videos/High_Plank.mp4",
@@ -148,12 +178,36 @@
"exercise": {
"id": 142,
"muscles": [
"obliques",
"core",
"forearms"
{
"id": 9137,
"created_at": "2023-06-14T17:05:42.053373Z",
"updated_at": "2023-06-14T17:05:42.053816Z",
"exercise": 142,
"muscle": 3
},
{
"id": 9138,
"created_at": "2023-06-14T17:05:42.054554Z",
"updated_at": "2023-06-14T17:05:42.055041Z",
"exercise": 142,
"muscle": 2
},
{
"id": 9139,
"created_at": "2023-06-14T17:05:42.055750Z",
"updated_at": "2023-06-14T17:05:42.056176Z",
"exercise": 142,
"muscle": 29
}
],
"equipment": [
"Dumbbell"
{
"id": 1760,
"created_at": "2023-06-13T02:28:05.211760Z",
"updated_at": "2023-06-13T02:28:05.212193Z",
"category": null,
"name": null
}
],
"audio_url": "/media/exercise_audio/Single-Arm_Dumbbell_Suitcase_Carry.m4a",
"video_url": "/media/exercise_videos/Single-Arm_Dumbbell_Suitcase_Carry.mp4",
@@ -187,12 +241,36 @@
"exercise": {
"id": 370,
"muscles": [
"glutes",
"hamstrings",
"obliques"
{
"id": 9146,
"created_at": "2023-06-14T17:05:42.064613Z",
"updated_at": "2023-06-14T17:05:42.064979Z",
"exercise": 370,
"muscle": 4
},
{
"id": 9147,
"created_at": "2023-06-14T17:05:42.065611Z",
"updated_at": "2023-06-14T17:05:42.066018Z",
"exercise": 370,
"muscle": 6
},
{
"id": 9148,
"created_at": "2023-06-14T17:05:42.066724Z",
"updated_at": "2023-06-14T17:05:42.067255Z",
"exercise": 370,
"muscle": 3
}
],
"equipment": [
"Dumbbell"
{
"id": 1763,
"created_at": "2023-06-13T02:28:05.215315Z",
"updated_at": "2023-06-13T02:28:05.215849Z",
"category": null,
"name": null
}
],
"audio_url": "/media/exercise_audio/Single-Arm_Dumbbell_Suitcase_Deadlift.m4a",
"video_url": "/media/exercise_videos/Single-Arm_Dumbbell_Suitcase_Deadlift.mp4",
@@ -226,11 +304,29 @@
"exercise": {
"id": 1012,
"muscles": [
"core",
"hip adductors"
{
"id": 8968,
"created_at": "2023-06-14T17:05:41.850461Z",
"updated_at": "2023-06-14T17:05:41.850890Z",
"exercise": 1012,
"muscle": 2
},
{
"id": 8969,
"created_at": "2023-06-14T17:05:41.851562Z",
"updated_at": "2023-06-14T17:05:41.851932Z",
"exercise": 1012,
"muscle": 27
}
],
"equipment": [
"Yoga Mat"
{
"id": 1675,
"created_at": "2023-06-13T02:28:05.120220Z",
"updated_at": "2023-06-13T02:28:05.120555Z",
"category": null,
"name": null
}
],
"audio_url": "/media/exercise_audio/Scissors.m4a",
"video_url": "/media/exercise_videos/Scissors.mp4",
@@ -297,11 +393,29 @@
"exercise": {
"id": 495,
"muscles": [
"glutes",
"quads"
{
"id": 7696,
"created_at": "2023-06-14T17:05:40.301365Z",
"updated_at": "2023-06-14T17:05:40.301765Z",
"exercise": 495,
"muscle": 4
},
{
"id": 7697,
"created_at": "2023-06-14T17:05:40.302477Z",
"updated_at": "2023-06-14T17:05:40.302855Z",
"exercise": 495,
"muscle": 5
}
],
"equipment": [
"Yoga Mat"
{
"id": 1139,
"created_at": "2023-06-13T02:28:04.524659Z",
"updated_at": "2023-06-13T02:28:04.525069Z",
"category": null,
"name": null
}
],
"audio_url": "/media/exercise_audio/Chair_Pose.m4a",
"video_url": "/media/exercise_videos/Chair_Pose.mp4",
@@ -368,11 +482,29 @@
"exercise": {
"id": 448,
"muscles": [
"upper back",
"rotator cuff"
{
"id": 9651,
"created_at": "2023-06-14T17:05:42.656915Z",
"updated_at": "2023-06-14T17:05:42.657363Z",
"exercise": 448,
"muscle": 9
},
{
"id": 9652,
"created_at": "2023-06-14T17:05:42.658005Z",
"updated_at": "2023-06-14T17:05:42.658465Z",
"exercise": 448,
"muscle": 15
}
],
"equipment": [
"Wall"
{
"id": 1971,
"created_at": "2023-06-13T02:28:05.459371Z",
"updated_at": "2023-06-13T02:28:05.459787Z",
"category": null,
"name": null
}
],
"audio_url": "/media/exercise_audio/Wall_Slide_with_Lift_Off.m4a",
"video_url": "/media/exercise_videos/Wall_Slide_with_Lift_Off.mp4",
@@ -439,12 +571,36 @@
"exercise": {
"id": 1045,
"muscles": [
"glutes",
"quads",
"hip flexor"
{
"id": 7741,
"created_at": "2023-06-14T17:05:40.358740Z",
"updated_at": "2023-06-14T17:05:40.359220Z",
"exercise": 1045,
"muscle": 4
},
{
"id": 7742,
"created_at": "2023-06-14T17:05:40.360107Z",
"updated_at": "2023-06-14T17:05:40.360946Z",
"exercise": 1045,
"muscle": 5
},
{
"id": 7743,
"created_at": "2023-06-14T17:05:40.362207Z",
"updated_at": "2023-06-14T17:05:40.363132Z",
"exercise": 1045,
"muscle": 16
}
],
"equipment": [
"Yoga Mat"
{
"id": 1149,
"created_at": "2023-06-13T02:28:04.535504Z",
"updated_at": "2023-06-13T02:28:04.535969Z",
"category": null,
"name": null
}
],
"audio_url": "/media/exercise_audio/Crescent_Lunge.m4a",
"video_url": "/media/exercise_videos/Crescent_Lunge.mp4",
@@ -478,12 +634,36 @@
"exercise": {
"id": 1047,
"muscles": [
"glutes",
"quads",
"hip flexor"
{
"id": 7744,
"created_at": "2023-06-14T17:05:40.364417Z",
"updated_at": "2023-06-14T17:05:40.364979Z",
"exercise": 1047,
"muscle": 4
},
{
"id": 7745,
"created_at": "2023-06-14T17:05:40.365773Z",
"updated_at": "2023-06-14T17:05:40.366233Z",
"exercise": 1047,
"muscle": 5
},
{
"id": 7746,
"created_at": "2023-06-14T17:05:40.366905Z",
"updated_at": "2023-06-14T17:05:40.367271Z",
"exercise": 1047,
"muscle": 16
}
],
"equipment": [
"Yoga Mat"
{
"id": 1150,
"created_at": "2023-06-13T02:28:04.536605Z",
"updated_at": "2023-06-13T02:28:04.537010Z",
"category": null,
"name": null
}
],
"audio_url": "/media/exercise_audio/Crescent_Lunge.m4a",
"video_url": "/media/exercise_videos/Crescent_Lunge.mp4",
@@ -546,13 +726,11 @@
"created_at": "2023-06-14T13:28:52.948713Z"
}
],
"registered_user": [
{
"id": 1,
"first_name": "test1_fist",
"last_name": "test1_last",
"image": "",
"nick_name": null
}
]
"registered_user": {
"id": 1,
"first_name": "test1_fist",
"last_name": "test1_last",
"image": "",
"nick_name": null
}
}

View File

@@ -0,0 +1,21 @@
//
// Equipment.swift
// Werkout_ios
//
// Created by Trey Tartt on 6/15/23.
//
import Foundation
struct Equipment: Codable {
let id: Int
let createdAt, updatedAt: String
let category, name: String?
enum CodingKeys: String, CodingKey {
case id
case createdAt = "created_at"
case updatedAt = "updated_at"
case category, name
}
}

View File

@@ -13,9 +13,9 @@ struct ExerciseElement: Codable {
let weight: Int?
let reps: Int?
let duration: Int?
let durationAudio: String?
let durationAudio: String
let weightAudio: String?
let createdAt: String?
let createdAt: String
enum CodingKeys: String, CodingKey {
case workout, exercise, weight, reps, duration
@@ -34,18 +34,19 @@ struct ExerciseElement: Codable {
struct ExerciseExercise: Codable {
let id: Int
let muscles, equipment: [String]?
let videoURL, audioURL, createdAt, updatedAt, name: String?
let description, side: String?
let isTwoDumbbells, isTrackableDistance, isAlternating, isWeight: Bool?
let isDistance, isDuration, isReps: Bool?
let jointsUsed, movementPatterns, equipmentRequired, muscleGroups: String?
let muscles: [ExerciseMuscle]
let equipment: [Equipment]
let audioURL, videoURL, createdAt, updatedAt: String
let name, description, side: String
let isTwoDumbbells, isTrackableDistance, isAlternating, isWeight: Bool
let isDistance, isDuration, isReps: Bool
let jointsUsed, movementPatterns, equipmentRequired, muscleGroups: String
let synonyms: String?
enum CodingKeys: String, CodingKey {
case id, muscles, equipment
case videoURL = "video_url"
case audioURL = "audio_url"
case videoURL = "video_url"
case createdAt = "created_at"
case updatedAt = "updated_at"
case name, description, side

View File

@@ -0,0 +1,26 @@
//
// Muscle.swift
// Werkout_ios
//
// Created by Trey Tartt on 6/15/23.
//
import Foundation
struct Muscle: Codable {
let id: Int
let name: String
}
struct ExerciseMuscle: Codable {
let id: Int
let createdAt, updatedAt: String
let exercise, muscle: Int
enum CodingKeys: String, CodingKey {
case id
case createdAt = "created_at"
case updatedAt = "updated_at"
case exercise, muscle
}
}

View File

@@ -11,13 +11,26 @@ struct Workout: Codable {
let name: String
let description: String?
let exercises: [ExerciseElement]
let registeredUser: [RegisteredUser]
let registeredUser: RegisteredUser
enum CodingKeys: String, CodingKey {
case name, description, exercises
case registeredUser = "registered_user"
}
init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
if let exercises = try container.decodeIfPresent([ExerciseElement].self, forKey: .exercises) {
self.exercises = exercises
} else {
self.exercises = [ExerciseElement]()
}
self.name = try container.decode(String.self, forKey: .name)
self.description = try container.decodeIfPresent(String.self, forKey: .description)
self.registeredUser = try container.decode(RegisteredUser.self, forKey: .registeredUser)
}
var exercisesSortedByCreated_at: [ExerciseElement] {
return self.exercises.sorted(by: {
$0.createdAtDate < $1.createdAtDate

View File

@@ -0,0 +1,15 @@
//
// AccountView.swift
// Werkout_ios
//
// Created by Trey Tartt on 6/15/23.
//
import Foundation
import SwiftUI
struct AccountView: View {
var body: some View {
Text("account view")
}
}

View File

@@ -0,0 +1,68 @@
//
// AllWorkoutsView.swift
// Werkout_ios
//
// Created by Trey Tartt on 6/15/23.
//
import Foundation
import SwiftUI
struct AllWorkoutsView: View {
@State var workouts: [Workout]?
@EnvironmentObject var bridgeModule: BridgeModule
@State private var showWorkoutDetail = false
@State private var selectedWorkout: Workout? {
didSet {
showWorkoutDetail = true
bridgeModule.currentWorkout = self.selectedWorkout
}
}
var body: some View {
ZStack {
if let workouts = workouts {
List {
ForEach(workouts, id:\.name) { workout in
VStack {
Text(workout.name)
Text(workout.description ?? "")
}
.onTapGesture {
selectedItem(workout: workout)
}
}
}
} else {
Text("no workouts")
}
}.onAppear{
testParse()
}
.sheet(isPresented: $showWorkoutDetail) {
if let selectedWorkout = selectedWorkout {
let viewModel = WorkoutDetailViewModel(workout: selectedWorkout)
WorkoutDetailView(viewModel: viewModel)
}
}
}
func selectedItem(workout: Workout) {
selectedWorkout = PreviewWorkout.workout()
}
func testParse() {
if let filepath = Bundle.main.path(forResource: "AllWorkouts", ofType: "json") {
do {
let data = try Data(NSData(contentsOfFile: filepath))
let workout = try JSONDecoder().decode([Workout].self, from: data)
self.workouts = workout
} catch {
print(error)
fatalError()
}
} else {
fatalError()
}
}
}

View File

@@ -0,0 +1,75 @@
//
// CreateWorkout.swift
// Werkout_ios
//
// Created by Trey Tartt on 6/15/23.
//
import Foundation
import SwiftUI
struct CreateWorkoutView: View {
@State var exercises: [ExerciseExercise]?
@State var equipment: [Equipment]?
@State var muscles: [Muscle]?
@EnvironmentObject var bridgeModule: BridgeModule
var body: some View {
VStack {
Text("exercises count: \(exercises?.count ?? -1)")
Text("equipment count: \(equipment?.count ?? -1)")
Text("muscles count: \(muscles?.count ?? -1)")
}
.onAppear{
parseMuscle()
parseEquipment()
parseExercises()
}
}
func parseExercises() {
if let filepath = Bundle.main.path(forResource: "Exercises", ofType: "json") {
do {
let data = try Data(NSData(contentsOfFile: filepath))
let workout = try JSONDecoder().decode([ExerciseExercise].self, from: data)
self.exercises = workout
} catch {
print(error)
fatalError()
}
} else {
fatalError()
}
}
func parseEquipment() {
if let filepath = Bundle.main.path(forResource: "Equipment", ofType: "json") {
do {
let data = try Data(NSData(contentsOfFile: filepath))
let workout = try JSONDecoder().decode([Equipment].self, from: data)
self.equipment = workout
} catch {
print(error)
fatalError()
}
} else {
fatalError()
}
}
func parseMuscle() {
if let filepath = Bundle.main.path(forResource: "AllMuscles", ofType: "json") {
do {
let data = try Data(NSData(contentsOfFile: filepath))
let workout = try JSONDecoder().decode([Muscle].self, from: data)
self.muscles = workout
} catch {
print(error)
fatalError()
}
} else {
fatalError()
}
}
}

View File

@@ -20,24 +20,6 @@ struct MainView: View {
} else {
Text("no workout selected")
}
}.onAppear{
testParse()
}
}
func testParse() {
if let filepath = Bundle.main.path(forResource: "WorkoutOne", ofType: "json") {
do {
let data = try Data(NSData(contentsOfFile: filepath))
let workout = try JSONDecoder().decode(Workout.self, from: data)
bridgeModule.currentWorkout = workout
self.workout = workout
} catch {
print(error)
fatalError()
}
} else {
fatalError()
}
}
}

View File

@@ -10,6 +10,7 @@ import SwiftUI
struct WorkoutDetailView: View {
@ObservedObject var viewModel: WorkoutDetailViewModel
@EnvironmentObject var bridgeModule: BridgeModule
@Environment(\.dismiss) var dismiss
@State var selectedIdx = -1 {
didSet {
@@ -19,6 +20,21 @@ struct WorkoutDetailView: View {
var body: some View {
VStack {
HStack {
Button("i dont want to do this", action: {
bridgeModule.currentWorkout = nil
dismiss()
})
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(.red)
Button("ohhh lets do it", action: {
runItemAt(idx: 0)
})
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(.green)
}
.frame(height: 88)
List() {
ForEach(viewModel.workout.exercisesSortedByCreated_at.indices, id: \.self) { i in
let obj = viewModel.workout.exercisesSortedByCreated_at[i]
@@ -39,6 +55,7 @@ struct WorkoutDetailView: View {
selectedIdx += 1
}
}
.interactiveDismissDisabled()
}
func runItemAt(idx: Int) {

View File

@@ -32,16 +32,30 @@ struct Werkout_iosApp: App {
var body: some Scene {
WindowGroup {
MainView()
.environmentObject(bridgeModule)
.onReceive(
screenDidConnectPublisher,
perform: screenDidConnect
)
.onReceive(
screenDidDisconnectPublisher,
perform: screenDidDisconnect
)
TabView {
AllWorkoutsView()
.environmentObject(bridgeModule)
.onReceive(
screenDidConnectPublisher,
perform: screenDidConnect
)
.onReceive(
screenDidDisconnectPublisher,
perform: screenDidDisconnect
)
.tabItem {
Label("All Workouts", systemImage: "figure.strengthtraining.traditional")
}
CreateWorkoutView()
.tabItem {
Label("Create Workout", systemImage: "plus.app.fill")
}
AccountView()
.tabItem {
Label("Accounts", systemImage: "person.fill.turn.down")
}
}
}
}