-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from MarkMelior/feature/VEES-20-base-api-mock
VEES-20 | Сделать базу api на моках
- Loading branch information
Showing
56 changed files
with
1,274 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
BASE_API_URL=http://localhost:3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
- Vees — Тренировка | ||
- All Vees — Все тренировки | ||
- Exercise — Упражнение | ||
- Muscle — Группа мышц | ||
- Vees Template - Шаблон тренировки | ||
- Approach - Подход | ||
- Exercise Template - Шаблон упражнений (вторник, среда и т.п.) | ||
- Exercise Group - Группа упражнений (спина, бицепс и т.п.) | ||
- Approach - Подход |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import localforage from 'localforage'; | ||
|
||
import { StorageKey } from '@/shared/constants'; | ||
|
||
import type { IExerciseGroupsDto } from '@/entities/exercise-groups'; | ||
|
||
export const exerciseGroupsResponse = async () => ( | ||
await localforage.getItem<IExerciseGroupsDto[]>(StorageKey.EXERCISE_GROUP) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import localforage from 'localforage'; | ||
|
||
import { StorageKey } from '@/shared/constants'; | ||
|
||
import type { IExerciseTemplatesDto } from '@/entities/exercise-templates'; | ||
|
||
export const exerciseTemplatesResponse = async () => ( | ||
await localforage.getItem<IExerciseTemplatesDto[]>(StorageKey.EXERCISE_TEMPLATE) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
import type { IExerciseGroupsDto } from '@/entities/exercise-groups'; | ||
|
||
export const EXERCISE_GROUP: IExerciseGroupsDto[] = [ | ||
{ | ||
color: '#FAC938', | ||
exercises: [ | ||
{ | ||
id: '64f5d700-2ae9-4f53-8d9c-43fe90f63d32', | ||
name: 'Горизонтальная тяга', | ||
}, | ||
{ | ||
id: 'b8139a33-a755-4e4f-a430-8da4993c66b9', | ||
name: 'Подтягивания с доп. весом', | ||
}, | ||
{ | ||
id: 'b75a4e08-0fec-4edf-9fc4-6a966a20aa06', | ||
name: 'Тяга штанги к поясу', | ||
}, | ||
], | ||
id: '09d399a8-ecd7-46e9-a7ef-1498a579c331', | ||
name: 'Спина', | ||
}, | ||
{ | ||
color: '#FA4838', | ||
exercises: [ | ||
{ | ||
id: '147244e6-ab19-4bd2-bb2f-28e6d4145127', | ||
name: 'Разведения в кроссовере на одну руку', | ||
}, | ||
{ | ||
id: '0f9e9776-71d1-40d5-bf55-e9ec7e0dbdda', | ||
name: 'Разведение гантелей в стороны', | ||
}, | ||
], | ||
id: '4463b999-4b96-472c-8f15-823c41630631', | ||
name: 'Средние дельты', | ||
}, | ||
{ | ||
color: '#00FF80', | ||
exercises: [ | ||
{ | ||
id: '39ce3084-d7bc-471d-bdd4-c8870349dcef', | ||
name: 'Брусья с доп. весом', | ||
}, | ||
{ | ||
id: '77f6ecf4-9452-4f47-8fed-5c68881a19d4', | ||
name: 'Жим лёжа узким хватом', | ||
}, | ||
{ | ||
id: '9ae9be94-3514-487a-920f-802d2a76f804', | ||
name: 'Французский жим лёжа', | ||
}, | ||
], | ||
id: '83a54707-d2bd-4c7b-8b07-5ae0a8b1c300', | ||
name: 'Трицепс', | ||
}, | ||
{ | ||
color: '#1A80E5', | ||
exercises: [ | ||
{ | ||
id: '1638eeaa-164b-4e3c-ba1c-68087a4385a8', | ||
name: 'Жим штанги', | ||
}, | ||
{ | ||
id: 'd3dce3ed-cedf-4d1f-b907-927e24314f02', | ||
name: 'Жим гантелей в наклоне', | ||
}, | ||
{ | ||
id: '24233635-cbea-41bc-8669-6f07dbbc21a1', | ||
name: 'Жим штанги в наклоне', | ||
}, | ||
{ | ||
id: '7e040e20-61e0-4c2c-818a-192df8fc2cae', | ||
name: 'Брусья с доп. весом', | ||
}, | ||
], | ||
id: 'ebc58f8d-3191-4685-8857-8bd40c834813', | ||
name: 'Грудь', | ||
}, | ||
{ | ||
color: '#9B693B', | ||
exercises: [], | ||
id: 'bdc4677b-5cec-40b0-806a-d9d87c04f89b', | ||
name: 'Квадрицепсы', | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import type { IExerciseTemplatesDto } from '@/entities/exercise-templates'; | ||
|
||
export const EXERCISE_TEMPLATE: IExerciseTemplatesDto[] = [ | ||
{ | ||
color: '#FA4838', | ||
exercisesIds: [ | ||
'147244e6-ab19-4bd2-bb2f-28e6d4145127', // Разведения в кроссовере на одну руку | ||
'd3dce3ed-cedf-4d1f-b907-927e24314f02', // Жим гантелей в наклоне | ||
'9ae9be94-3514-487a-920f-802d2a76f804', // Французский жим лёжа | ||
'64f5d700-2ae9-4f53-8d9c-43fe90f63d32', // Горизонтальная тяга | ||
], | ||
id: 'template-tuesday', | ||
name: 'Вторник', | ||
}, | ||
{ | ||
color: '#00FF80', | ||
exercisesIds: [ | ||
'24233635-cbea-41bc-8669-6f07dbbc21a1', // Жим штанги в наклоне | ||
'9ae9be94-3514-487a-920f-802d2a76f804', // Французский жим лёжа | ||
'b8139a33-a755-4e4f-a430-8da4993c66b9', // Подтягивания с доп. весом | ||
'147244e6-ab19-4bd2-bb2f-28e6d4145127', // Разведения в кроссовере на одну руку | ||
], | ||
id: 'template-saturday', | ||
name: 'Суббота', | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import type { IVeesDto } from '@/entities/vees'; | ||
|
||
export const VEES_ACTIVE: IVeesDto = { | ||
duration: { | ||
from: '2025-01-12T10:00:00', | ||
to: '2025-01-12T11:00:00', | ||
}, | ||
exercises: [ | ||
{ | ||
comment: 'Добавить больше подходов в следующий раз', | ||
id: 'b75a4e08-0fec-4edf-9fc4-6a966a20aa06', | ||
result: [{ count: 10, weight: 20 }], | ||
}, | ||
{ | ||
comment: 'Сменить угол скамьи', | ||
id: 'd3dce3ed-cedf-4d1f-b907-927e24314f02', | ||
result: [{ count: 12, weight: 25 }], | ||
}, | ||
{ | ||
comment: 'Отлично справился', | ||
id: '9ae9be94-3514-487a-920f-802d2a76f804', | ||
result: [{ count: 15, weight: 15 }], | ||
}, | ||
], | ||
exerciseTemplateId: 'template-tuesday', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
import type { IVeesDto } from '@/entities/vees'; | ||
|
||
export const VEES_LIST: IVeesDto[] = [ | ||
{ | ||
duration: { | ||
from: '2025-01-10T10:00:00', | ||
to: '2025-01-10T11:00:00', | ||
}, | ||
exercises: [ | ||
{ | ||
id: '147244e6-ab19-4bd2-bb2f-28e6d4145127', // Разведения в кроссовере на одну руку | ||
result: [ | ||
{ count: 20, weight: 10 }, | ||
{ count: 10, weight: 20 }, | ||
], | ||
}, | ||
{ | ||
id: '9ae9be94-3514-487a-920f-802d2a76f804', // Французский жим лёжа | ||
result: [{ count: 12, weight: 10 }], | ||
}, | ||
], | ||
exerciseTemplateId: 'template-tuesday', | ||
}, | ||
{ | ||
duration: { | ||
from: '2025-01-10T15:00:00', | ||
to: '2025-01-10T16:34:00', | ||
}, | ||
exercises: [ | ||
{ | ||
id: '147244e6-ab19-4bd2-bb2f-28e6d4145127', // Разведения в кроссовере на одну руку | ||
result: [ | ||
{ count: 10, weight: 20 }, | ||
{ count: 20, weight: 10 }, | ||
], | ||
}, | ||
{ | ||
id: '9ae9be94-3514-487a-920f-802d2a76f804', // Французский жим лёжа | ||
result: [{ count: 10, weight: 10 }], | ||
}, | ||
], | ||
exerciseTemplateId: 'template-tuesday', | ||
}, | ||
{ | ||
duration: { | ||
from: '2025-01-08T10:00:00', | ||
to: '2025-01-08T11:00:00', | ||
}, | ||
exercises: [ | ||
{ | ||
id: '24233635-cbea-41bc-8669-6f07dbbc21a1', // Жим штанги в наклоне | ||
result: [{ count: 10, weight: 50 }], | ||
}, | ||
{ | ||
id: 'b8139a33-a755-4e4f-a430-8da4993c66b9', // Подтягивания с доп. весом | ||
result: [{ count: 8, weight: 10 }], | ||
}, | ||
], | ||
exerciseTemplateId: 'template-saturday', | ||
}, | ||
{ | ||
duration: { | ||
from: '2025-01-05T10:00:00', | ||
to: '2025-01-05T11:00:00', | ||
}, | ||
exercises: [ | ||
{ | ||
id: '7e040e20-61e0-4c2c-818a-192df8fc2cae', // Брусья с доп. весом | ||
result: [{ count: 12, weight: 15 }], | ||
}, | ||
{ | ||
id: '0f9e9776-71d1-40d5-bf55-e9ec7e0dbdda', // Разведение гантелей в стороны | ||
result: [{ count: 10, weight: 5 }], | ||
}, | ||
], | ||
exerciseTemplateId: 'template-saturday', | ||
}, | ||
{ | ||
duration: { | ||
from: '2025-01-03T09:00:00', | ||
to: '2025-01-03T10:00:00', | ||
}, | ||
exercises: [ | ||
{ | ||
id: '39ce3084-d7bc-471d-bdd4-c8870349dcef', // Брусья с доп. весом | ||
result: [{ count: 10, weight: 10 }], | ||
}, | ||
{ | ||
id: 'd3dce3ed-cedf-4d1f-b907-927e24314f02', // Жим гантелей в наклоне | ||
result: [{ count: 8, weight: 25 }], | ||
}, | ||
], | ||
exerciseTemplateId: 'template-tuesday', | ||
}, | ||
{ | ||
duration: { | ||
from: '2025-01-01T08:30:00', | ||
to: '2025-01-01T09:30:00', | ||
}, | ||
exercises: [ | ||
{ | ||
id: 'b75a4e08-0fec-4edf-9fc4-6a966a20aa06', // Тяга штанги к поясу | ||
result: [{ count: 10, weight: 40 }], | ||
}, | ||
{ | ||
id: '1638eeaa-164b-4e3c-ba1c-68087a4385a8', // Жим штанги | ||
result: [{ count: 12, weight: 60 }], | ||
}, | ||
], | ||
exerciseTemplateId: 'template-saturday', | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
await localforage.setItem(StorageKey.VEES_ACTIVE, VEES_ACTIVE); | ||
await localforage.setItem(StorageKey.EXERCISE_GROUP, EXERCISE_GROUP); | ||
await localforage.setItem(StorageKey.EXERCISE_TEMPLATE, EXERCISE_TEMPLATE); | ||
await localforage.setItem(StorageKey.VEES_LIST, VEES_LIST); |
Oops, something went wrong.