-
- {{ seriesWorkout.title }}
+
+ {{ addWorkout ? addWorkout.title : seriesWorkout.title }}
- {{ seriesWorkout.description }}
+ {{
+ addWorkout ? addWorkout.description : seriesWorkout.description
+ }}
-
+
- {{ seriesWorkout.time }}
+ {{
+ seriesWorkout.suggested_time
+ }}
{{ seriesWorkout.sets }}x{{ seriesWorkout.workouts }}{{ seriesWorkout.set }}x{{ seriesWorkout.per_set }}
-
-
+
+
@@ -43,28 +70,54 @@
\ No newline at end of file
diff --git a/src/router/path.js b/src/router/path.js
index 93adde3..09ba4bb 100644
--- a/src/router/path.js
+++ b/src/router/path.js
@@ -60,12 +60,12 @@ export default [
name: 'programs'
},
{
- path: '/program-series',
+ path: '/program-series/:id',
view: 'ProgramSeries',
name: 'programSeries'
},
{
- path: '/workouts-series',
+ path: '/program-series/:programId/workouts-series/:serieId',
view: 'WorkoutsSeries',
name: 'workoutsSeries'
},
@@ -80,7 +80,7 @@ export default [
name: 'products'
},
{
- path: '/add-product',
+ path: '/add-product/:id?',
view: 'AddProduct',
name: 'addProduct'
},
diff --git a/src/router/url.js b/src/router/url.js
index cc96bd1..413ffc9 100644
--- a/src/router/url.js
+++ b/src/router/url.js
@@ -19,11 +19,36 @@ const urls = {
// workout categories
indexWorkoutCategories: "admin/workout-categories",
// workouts
+ indexClientWorkout: "workouts",
+ showClientWorkout: "workouts/:workout",
indexWorkout: "admin/workouts",
showWorkout: "admin/workouts/:workout",
storeWorkout: "admin/workouts",
updateWorkout: "admin/workouts/:workout",
destroyWorkout: "admin/workouts/:workout",
+ // join workout to serie
+ joinWorkoutToSerie: "trainer/series/:serie/workout/:workout",
+ destroyWorkoutFromSerie: "trainer/series/:serie/workout/:workout",
+ // serie
+ storeSerie: "trainer/course/:course/series",
+ destroySerie: "trainer/series/:serie",
+ // product
+ indexProduct: "admin/products",
+ showProduct: "admin/products/:product",
+ storeProduct: "admin/products",
+ // product category
+ indexProductCategories: "admin/product-categories",
+ // users
+ indexUsers: "admin/users",
+ destroyUser: "admin/users/:user",
+ // countries
+ indexCountries: "countries",
+ // profile
+ updateProfile: "user",
+ showProfile: "user",
+ // bookmarks
+ indexCoursesBookmarks: "bookmarks/course",
+ indexWorkoutsBookmarks: "bookmarks/workout",
// file
storeFile: 'media'
};
diff --git a/src/store/modules/auth/actions.js b/src/store/modules/auth/actions.js
index af2a0a8..5cf565d 100644
--- a/src/store/modules/auth/actions.js
+++ b/src/store/modules/auth/actions.js
@@ -28,7 +28,6 @@ export default {
async register({ commit }, data) {
let repository = new AuthRepository();
const response = await repository.register(data);
- console.log('response', response);
if (response) {
setTokenHeader(commit, response);
return response;
diff --git a/src/store/modules/auth/mutations.js b/src/store/modules/auth/mutations.js
index cbcf3cb..e0597c9 100644
--- a/src/store/modules/auth/mutations.js
+++ b/src/store/modules/auth/mutations.js
@@ -1,6 +1,6 @@
import Vue from "vue";
export default {
- SET_AUTH_USER(state, data) {
- Vue.set(state, "user", data);
+ SET_AUTH_USER(state, payload) {
+ Vue.set(state, "user", payload);
},
};
diff --git a/src/store/modules/bookmarks/actions.js b/src/store/modules/bookmarks/actions.js
new file mode 100644
index 0000000..144bf13
--- /dev/null
+++ b/src/store/modules/bookmarks/actions.js
@@ -0,0 +1,15 @@
+import BookmarksRepository from "@/abstraction/repository/bookmarksRepository";
+export default {
+ async loadBookmarksPrograms({ commit }) {
+ let repository = new BookmarksRepository();
+ const resource = await repository.indexCourses();
+ commit("SET_BOOKMARKS_PROGRAMS", resource.data);
+ // commit("SET_PAGINATION", resource.pagination);
+ },
+ async loadBookmarksWorkouts({ commit }) {
+ let repository = new BookmarksRepository();
+ const resource = await repository.indexWorkouts();
+ commit("SET_BOOKMARKS_WORKOUTS", resource.data);
+ // commit("SET_PAGINATION", resource.pagination);
+ },
+};
diff --git a/src/store/modules/bookmarks/getters.js b/src/store/modules/bookmarks/getters.js
new file mode 100644
index 0000000..3cbdfbe
--- /dev/null
+++ b/src/store/modules/bookmarks/getters.js
@@ -0,0 +1,4 @@
+export default {
+ getBookmarksPrograms: state => state.programs,
+ getBookmarksWorkouts: state => state.workouts,
+}
\ No newline at end of file
diff --git a/src/store/modules/bookmarks/mutations.js b/src/store/modules/bookmarks/mutations.js
new file mode 100644
index 0000000..e967a11
--- /dev/null
+++ b/src/store/modules/bookmarks/mutations.js
@@ -0,0 +1,9 @@
+import Vue from "vue";
+export default {
+ SET_BOOKMARKS_PROGRAMS(state, payload) {
+ Vue.set(state, "programs", payload)
+ },
+ SET_BOOKMARKS_WORKOUTS(state, payload) {
+ Vue.set(state, "workouts", payload)
+ },
+};
\ No newline at end of file
diff --git a/src/store/modules/bookmarks/state.js b/src/store/modules/bookmarks/state.js
new file mode 100644
index 0000000..f9b2824
--- /dev/null
+++ b/src/store/modules/bookmarks/state.js
@@ -0,0 +1,7 @@
+export default {
+ programs: [],
+ workouts: [],
+ pagination: {
+ itemsPerPage: 12
+ },
+};
diff --git a/src/store/modules/countries/actions.js b/src/store/modules/countries/actions.js
new file mode 100644
index 0000000..3e88658
--- /dev/null
+++ b/src/store/modules/countries/actions.js
@@ -0,0 +1,8 @@
+import CountriesRepository from "@/abstraction/repository/countriesRepository"
+export default {
+ async loadCountries({ commit }) {
+ let repository = new CountriesRepository();
+ let resource = await repository.index();
+ commit('SET_COUNTRIES', resource.data)
+ },
+}
\ No newline at end of file
diff --git a/src/store/modules/countries/getters.js b/src/store/modules/countries/getters.js
new file mode 100644
index 0000000..5bfe747
--- /dev/null
+++ b/src/store/modules/countries/getters.js
@@ -0,0 +1,3 @@
+export default {
+ getCountries: state => state.countries
+}
\ No newline at end of file
diff --git a/src/store/modules/countries/mutations.js b/src/store/modules/countries/mutations.js
new file mode 100644
index 0000000..45583a6
--- /dev/null
+++ b/src/store/modules/countries/mutations.js
@@ -0,0 +1,6 @@
+import Vue from 'vue';
+export default {
+ SET_COUNTRIES(state, payload) {
+ Vue.set(state, 'countries', payload)
+ },
+}
\ No newline at end of file
diff --git a/src/store/modules/countries/state.js b/src/store/modules/countries/state.js
new file mode 100644
index 0000000..1c5e2bf
--- /dev/null
+++ b/src/store/modules/countries/state.js
@@ -0,0 +1,3 @@
+export default {
+ countries: []
+}
\ No newline at end of file
diff --git a/src/store/modules/productCategories/actions.js b/src/store/modules/productCategories/actions.js
new file mode 100644
index 0000000..29e9e68
--- /dev/null
+++ b/src/store/modules/productCategories/actions.js
@@ -0,0 +1,8 @@
+import ProductCategoriesRepository from "@/abstraction/repository/productCategoriesRepository";
+export default {
+ async loadProductCategories({ commit }) {
+ let repository = new ProductCategoriesRepository();
+ const resource = await repository.index();
+ commit("SET_PRODUCT_CATEGORIES", resource.data);
+ },
+};
diff --git a/src/store/modules/productCategories/getters.js b/src/store/modules/productCategories/getters.js
new file mode 100644
index 0000000..417e7e9
--- /dev/null
+++ b/src/store/modules/productCategories/getters.js
@@ -0,0 +1,3 @@
+export default {
+ getProductCategories: state => state.productCategories,
+}
\ No newline at end of file
diff --git a/src/store/modules/productCategories/mutations.js b/src/store/modules/productCategories/mutations.js
new file mode 100644
index 0000000..6a27bfd
--- /dev/null
+++ b/src/store/modules/productCategories/mutations.js
@@ -0,0 +1,6 @@
+import Vue from "vue";
+export default {
+ SET_PRODUCT_CATEGORIES(state, payload) {
+ Vue.set(state, "productCategories", payload);
+ },
+};
diff --git a/src/store/modules/productCategories/state.js b/src/store/modules/productCategories/state.js
new file mode 100644
index 0000000..2cbd1d5
--- /dev/null
+++ b/src/store/modules/productCategories/state.js
@@ -0,0 +1,3 @@
+export default {
+ productCategories: [],
+};
diff --git a/src/store/modules/products/actions.js b/src/store/modules/products/actions.js
new file mode 100644
index 0000000..c9c0769
--- /dev/null
+++ b/src/store/modules/products/actions.js
@@ -0,0 +1,29 @@
+import ProductRepository from "@/abstraction/repository/productRepository";
+export default {
+ async loadProducts({ state, commit }) {
+ let data = { pagination: state.pagination };
+ let repository = new ProductRepository();
+ const resource = await repository.index(data);
+ console.log('dfsa');
+ console.log('resource', resource);
+ commit("SET_PRODUCTS", resource.data);
+ commit("SET_PAGINATION", resource.pagination);
+
+
+ },
+ async loadProduct({ commit }, productId) {
+ let repository = new ProductRepository();
+ const resource = await repository.show(productId);
+ commit("SET_PRODUCT", resource);
+ },
+ async addProduct({ commit }, data) {
+ let repository = new ProductRepository();
+ const resource = await repository.store(data);
+ commit("ADD_PRODUCT", resource.data);
+ },
+ async updateProduct({ commit }, data) {
+ let repository = new ProductRepository();
+ const resource = await repository.update(data.id, data);
+ commit("UPDATE_PRODUCT", resource);
+ }
+};
diff --git a/src/store/modules/products/getters.js b/src/store/modules/products/getters.js
new file mode 100644
index 0000000..6979501
--- /dev/null
+++ b/src/store/modules/products/getters.js
@@ -0,0 +1,5 @@
+export default {
+ getProducts: state => state.products,
+ getProduct: state => state.product,
+ getPaginationProduct: state => state.pagination
+}
\ No newline at end of file
diff --git a/src/store/modules/products/mutations.js b/src/store/modules/products/mutations.js
new file mode 100644
index 0000000..fde6265
--- /dev/null
+++ b/src/store/modules/products/mutations.js
@@ -0,0 +1,21 @@
+import Vue from "vue";
+export default {
+ SET_PRODUCTS(state, payload) {
+ console.log('payload', payload);
+ Vue.set(state, "products", payload)
+ },
+ SET_PAGINATION(state, pagination) {
+ pagination = { ...state.pagination, ...pagination };
+ Vue.set(state, "pagination", pagination);
+ },
+ SET_PRODUCT(state, payload) {
+ Vue.set(state, "product", payload);
+ },
+ ADD_PRODUCT(state, payload) {
+ state.products.push(payload);
+ },
+ UPDATE_PROGRAM(state, payload) {
+ const index = state.products.findIndex((x) => x.id === payload.id);
+ Vue.set(state.products, index, payload);
+ },
+};
\ No newline at end of file
diff --git a/src/store/modules/products/state.js b/src/store/modules/products/state.js
new file mode 100644
index 0000000..300dcf2
--- /dev/null
+++ b/src/store/modules/products/state.js
@@ -0,0 +1,7 @@
+export default {
+ products: [],
+ product: {},
+ pagination: {
+ itemsPerPage: 12
+ },
+};
diff --git a/src/store/modules/profile/actions.js b/src/store/modules/profile/actions.js
new file mode 100644
index 0000000..23b03e7
--- /dev/null
+++ b/src/store/modules/profile/actions.js
@@ -0,0 +1,13 @@
+import ProfileRepository from "@/abstraction/repository/profileRepository"
+export default {
+ async loadProfile({ commit },) {
+ let repository = new ProfileRepository();
+ let resource = await repository.show();
+ commit('SET_PROFILE', resource)
+ },
+ async updateProfile({ commit }, data) {
+ let repository = new ProfileRepository();
+ let resource = await repository.update(data);
+ commit("UPDATE_PROFILE", resource);
+ }
+}
\ No newline at end of file
diff --git a/src/store/modules/profile/getters.js b/src/store/modules/profile/getters.js
new file mode 100644
index 0000000..a116476
--- /dev/null
+++ b/src/store/modules/profile/getters.js
@@ -0,0 +1,3 @@
+export default {
+ getProfile: state => state.profile
+}
\ No newline at end of file
diff --git a/src/store/modules/profile/mutations.js b/src/store/modules/profile/mutations.js
new file mode 100644
index 0000000..d318838
--- /dev/null
+++ b/src/store/modules/profile/mutations.js
@@ -0,0 +1,9 @@
+import Vue from 'vue';
+export default {
+ SET_PROFILE(state, payload) {
+ Vue.set(state, 'profile', payload)
+ },
+ UPDATE_PROFILE(state, payload) {
+ Vue.set(state, 'profile', payload)
+ }
+}
\ No newline at end of file
diff --git a/src/store/modules/profile/state.js b/src/store/modules/profile/state.js
new file mode 100644
index 0000000..8bb0ede
--- /dev/null
+++ b/src/store/modules/profile/state.js
@@ -0,0 +1,3 @@
+export default {
+ profile: {}
+}
\ No newline at end of file
diff --git a/src/store/modules/programSerie/actions.js b/src/store/modules/programSerie/actions.js
new file mode 100644
index 0000000..297e30c
--- /dev/null
+++ b/src/store/modules/programSerie/actions.js
@@ -0,0 +1,21 @@
+import ProgramSerieRepository from "@/abstraction/repository/programSerieRepository";
+export default {
+ async loadProgramSerie({ commit }, courseId) {
+ let repository = new ProgramSerieRepository();
+ const resource = await repository.show(courseId);
+ commit("SET_PROGRAM_SERIE", resource);
+ },
+ async addSerieToProgram({ commit }, data) {
+ let repository = new ProgramSerieRepository();
+ const resource = await repository.store(data.data, data.courseId);
+ if (resource) {
+ commit("ADD_SERIE_TO_PROGRAM", resource.data);
+ return resource
+ }
+ },
+ async deleteSerieFromProgram({ commit }, serieId) {
+ let repository = new ProgramSerieRepository();
+ await repository.delete(serieId);
+ commit('DELETE_SERIE_FROM_PROGRAM', serieId);
+ },
+};
diff --git a/src/store/modules/programSerie/getters.js b/src/store/modules/programSerie/getters.js
new file mode 100644
index 0000000..96f624f
--- /dev/null
+++ b/src/store/modules/programSerie/getters.js
@@ -0,0 +1,4 @@
+export default {
+ getProgramSerie: state => state.programSerie,
+ getCurrentSerieId: state => state.currentSerieId
+};
diff --git a/src/store/modules/programSerie/mutations.js b/src/store/modules/programSerie/mutations.js
new file mode 100644
index 0000000..2b91374
--- /dev/null
+++ b/src/store/modules/programSerie/mutations.js
@@ -0,0 +1,16 @@
+import Vue from "vue";
+export default {
+ SET_PROGRAM_SERIE(state, payload) {
+ Vue.set(state, "programSerie", payload);
+ },
+ SET_CURRENT_SERIE_ID(state, payload) {
+ Vue.set(state, "currentSerieId", payload);
+ },
+ ADD_SERIE_TO_PROGRAM(state, payload) {
+ state.programSerie.series.push(payload);
+ },
+ DELETE_SERIE_FROM_PROGRAM(state, payload) {
+ const index = state.programSerie.series.findIndex((x) => x.id === payload);
+ Vue.delete(state.programSerie.series, index)
+ }
+};
diff --git a/src/store/modules/programSerie/state.js b/src/store/modules/programSerie/state.js
new file mode 100644
index 0000000..1335b28
--- /dev/null
+++ b/src/store/modules/programSerie/state.js
@@ -0,0 +1,4 @@
+export default {
+ programSerie: {},
+ currentSerieId: null,
+};
diff --git a/src/store/modules/programs/actions.js b/src/store/modules/programs/actions.js
index d0dbd64..330343a 100644
--- a/src/store/modules/programs/actions.js
+++ b/src/store/modules/programs/actions.js
@@ -33,7 +33,6 @@ export default {
commit('DELETE_PROGRAM', courseId);
},
async verifyProgram({ commit }, courseId) {
- console.log('s');
let repository = new ProgramRepository();
await repository.verify(courseId);
commit("VERIFY_PROGRAM", courseId);
diff --git a/src/store/modules/programs/mutations.js b/src/store/modules/programs/mutations.js
index 58de9b3..3324fd3 100644
--- a/src/store/modules/programs/mutations.js
+++ b/src/store/modules/programs/mutations.js
@@ -1,29 +1,28 @@
import Vue from "vue";
export default {
- SET_PROGRAMS(state, data) {
- Vue.set(state, "programs", data);
+ SET_PROGRAMS(state, payload) {
+ Vue.set(state, "programs", payload);
},
- SET_PROGRAM(state, data) {
- Vue.set(state, "program", data);
+ SET_PROGRAM(state, payload) {
+ Vue.set(state, "program", payload);
},
SET_PAGINATION(state, pagination) {
pagination = { ...state.pagination, ...pagination };
Vue.set(state, "pagination", pagination);
},
- ADD_PROGRAM(state, data) {
- state.programs.push(data);
+ ADD_PROGRAM(state, payload) {
+ state.programs.push(payload);
},
- UPDATE_PROGRAM(state, data) {
- const index = state.programs.findIndex((x) => x.id === data.id);
- Vue.set(state.programs, index, data);
+ UPDATE_PROGRAM(state, payload) {
+ const index = state.programs.findIndex((x) => x.id === payload.id);
+ Vue.set(state.programs, index, payload);
},
DELETE_PROGRAM(state, courseId) {
const index = state.programs.findIndex((x) => x.id === courseId);
- state.programs.splice(index, 1);
+ Vue.delete(state.programs, index)
},
VERIFY_PROGRAM(state, courseId) {
const index = state.programs.find(x => x.id === courseId);
- console.log('index', index);
index.verified = !index.verified;
}
};
diff --git a/src/store/modules/sportCategories/mutations.js b/src/store/modules/sportCategories/mutations.js
index 3574da7..4dff62a 100644
--- a/src/store/modules/sportCategories/mutations.js
+++ b/src/store/modules/sportCategories/mutations.js
@@ -1,9 +1,9 @@
import Vue from "vue";
export default {
- SET_SPORT_CATEGORIES(state, data) {
- Vue.set(state, "sportCategories", data);
+ SET_SPORT_CATEGORIES(state, payload) {
+ Vue.set(state, "sportCategories", payload);
},
- SET_SPORT_CATEGORY(state, data) {
- Vue.set(state, "sportCategory", data);
+ SET_SPORT_CATEGORY(state, payload) {
+ Vue.set(state, "sportCategory", payload);
},
};
diff --git a/src/store/modules/users/actions.js b/src/store/modules/users/actions.js
new file mode 100644
index 0000000..305a84b
--- /dev/null
+++ b/src/store/modules/users/actions.js
@@ -0,0 +1,15 @@
+import UsersRepository from "@/abstraction/repository/usersRepository";
+export default {
+ async loadUsers({ state, commit }) {
+ let data = { pagination: state.pagination }
+ let repository = new UsersRepository();
+ const resource = await repository.index(data);
+ commit("SET_USERS", resource.data);
+ commit("SET_PAGINATION", resource.pagination);
+ },
+ async deleteUser({ commit }, userId) {
+ let repository = new UsersRepository();
+ await repository.delete(userId);
+ commit('DELETE_USER', userId);
+ },
+};
diff --git a/src/store/modules/users/getters.js b/src/store/modules/users/getters.js
new file mode 100644
index 0000000..4b848a0
--- /dev/null
+++ b/src/store/modules/users/getters.js
@@ -0,0 +1,4 @@
+export default {
+ getUsers: state => state.users,
+ getPaginationUser: state => state.pagination
+};
diff --git a/src/store/modules/users/mutations.js b/src/store/modules/users/mutations.js
new file mode 100644
index 0000000..7a4c818
--- /dev/null
+++ b/src/store/modules/users/mutations.js
@@ -0,0 +1,15 @@
+import Vue from "vue";
+export default {
+ SET_USERS(state, payload) {
+ Vue.set(state, "users", payload);
+ },
+ SET_PAGINATION(state, pagination) {
+ pagination = { ...state.pagination, ...pagination };
+ Vue.set(state, "pagination", pagination);
+ },
+ DELETE_USER(state, userId) {
+ const index = state.users.findIndex((x) => x.id === userId);
+ // state.users.splice(index, 1);
+ Vue.delete(state.users, index)
+ },
+};
diff --git a/src/store/modules/users/state.js b/src/store/modules/users/state.js
new file mode 100644
index 0000000..40ab3ec
--- /dev/null
+++ b/src/store/modules/users/state.js
@@ -0,0 +1,6 @@
+export default {
+ users: [],
+ pagination: {
+ itemsPerPage: 12
+ }
+};
diff --git a/src/store/modules/workoutCategories.js/mutations.js b/src/store/modules/workoutCategories.js/mutations.js
index 5ce564b..b1de13e 100644
--- a/src/store/modules/workoutCategories.js/mutations.js
+++ b/src/store/modules/workoutCategories.js/mutations.js
@@ -1,7 +1,7 @@
import Vue from "vue";
export default {
- SET_WORKOUT_CATEGORIES(state, data) {
- Vue.set(state, "workoutCategories", data);
+ SET_WORKOUT_CATEGORIES(state, payload) {
+ Vue.set(state, "workoutCategories", payload);
},
};
\ No newline at end of file
diff --git a/src/store/modules/workoutToSerie/actions.js b/src/store/modules/workoutToSerie/actions.js
new file mode 100644
index 0000000..fce0951
--- /dev/null
+++ b/src/store/modules/workoutToSerie/actions.js
@@ -0,0 +1,31 @@
+import WorkoutToSerieRepository from "../../../abstraction/repository/workoutToSerieRepository";
+export default {
+ async loadWorkoutsToSerie({ state, commit }) {
+ try {
+ let data = { filters: state.filters };
+ let repository = new WorkoutToSerieRepository();
+ const resource = await repository.index(data);
+ commit("SET_WORKOUTS_TO_SERIE", resource.data);
+ } catch (e) {
+ return e;
+ }
+ },
+ async loadWorkoutToSerie({ commit }, workoutId) {
+ let repository = new WorkoutToSerieRepository();
+ const resource = await repository.show(workoutId);
+ commit("SET_WORKOUT_TO_SERIE", resource);
+ },
+ async addWorkoutToSerie({ commit }, data) {
+ let repository = new WorkoutToSerieRepository();
+ const resource = await repository.store(data.data, data.serieId, data.workoutId);
+ if (resource) {
+ commit("ADD_WORKOUT_TO_SERIE", resource.data);
+ return resource.data
+ }
+ },
+ async deleteWorkoutFromSerie({ commit }, data) {
+ let repository = new WorkoutToSerieRepository();
+ await repository.delete(data);
+ commit('DELETE_WORKOUT_FROM_SERIE', data.workoutId);
+ },
+};
diff --git a/src/store/modules/workoutToSerie/getters.js b/src/store/modules/workoutToSerie/getters.js
new file mode 100644
index 0000000..e0a54d0
--- /dev/null
+++ b/src/store/modules/workoutToSerie/getters.js
@@ -0,0 +1,5 @@
+export default {
+ getWorkoutsToSerie: state => state.workoutsToSerie,
+ getWorkoutToSerie: state => state.workoutToSerie,
+
+}
\ No newline at end of file
diff --git a/src/store/modules/workoutToSerie/mutations.js b/src/store/modules/workoutToSerie/mutations.js
new file mode 100644
index 0000000..0ab1587
--- /dev/null
+++ b/src/store/modules/workoutToSerie/mutations.js
@@ -0,0 +1,19 @@
+import Vue from "vue";
+export default {
+ SET_WORKOUTS_TO_SERIE(state, payload) {
+ Vue.set(state, "workoutsToSerie", payload);
+ },
+ SET_WORKOUT_TO_SERIE(state, payload) {
+ Vue.set(state, "workoutToSerie", payload);
+ },
+ SET_FILTER_WORKOUTS_TO_SERIE(state, payload) {
+ Vue.set(state, "filters", payload);
+ },
+ ADD_WORKOUT_TO_SERIE(state, payload) {
+ state.workoutsToSerie.push(payload);
+ },
+ DELETE_WORKOUT_FROM_SERIE(state, workoutId) {
+ const index = state.workoutsToSerie.findIndex((x) => x.id === workoutId);
+ Vue.delete(state.workoutsToSerie, index)
+ },
+};
diff --git a/src/store/modules/workoutToSerie/state.js b/src/store/modules/workoutToSerie/state.js
new file mode 100644
index 0000000..1f96ef6
--- /dev/null
+++ b/src/store/modules/workoutToSerie/state.js
@@ -0,0 +1,5 @@
+export default {
+ workoutsToSerie: [],
+ workoutToSerie: {},
+ filters: {}
+};
diff --git a/src/store/modules/workouts/mutations.js b/src/store/modules/workouts/mutations.js
index 6432157..dd1808f 100644
--- a/src/store/modules/workouts/mutations.js
+++ b/src/store/modules/workouts/mutations.js
@@ -1,24 +1,24 @@
import Vue from "vue";
export default {
- SET_WORKOUTS(state, data) {
- Vue.set(state, "workouts", data);
+ SET_WORKOUTS(state, payload) {
+ Vue.set(state, "workouts", payload);
},
- SET_WORKOUT(state, data) {
- Vue.set(state, "workout", data);
+ SET_WORKOUT(state, payload) {
+ Vue.set(state, "workout", payload);
},
SET_PAGINATION(state, pagination) {
pagination = { ...state.pagination, ...pagination };
Vue.set(state, "pagination", pagination);
},
- ADD_WORKOUT(state, data) {
- state.workouts.push(data);
+ ADD_WORKOUT(state, payload) {
+ state.workouts.push(payload);
},
- UPDATE_WORKOUT(state, data) {
- const index = state.workouts.findIndex((x) => x.id === data.id);
- Vue.set(state.workouts, index, data);
+ UPDATE_WORKOUT(state, payload) {
+ const index = state.workouts.findIndex((x) => x.id === payload.id);
+ Vue.set(state.workouts, index, payload);
},
DELETE_WORKOUT(state, workoutId) {
const index = state.workouts.findIndex((x) => x.id === workoutId);
- state.workouts.splice(index, 1);
+ Vue.delete(state.workouts, index)
},
};
diff --git a/src/styles/vuetify/_modify.scss b/src/styles/vuetify/_modify.scss
index ca4d5eb..daa71c4 100644
--- a/src/styles/vuetify/_modify.scss
+++ b/src/styles/vuetify/_modify.scss
@@ -54,8 +54,7 @@ textarea {
}
.v-list-item__content,
.v-select__slot input {
- font-family: "montserrat";
- text-transform: uppercase;
+ font-family: "Montserrat-light";
}
.v-label--active {
top: 13px !important;
@@ -250,6 +249,13 @@ input::placeholder {
}
/* -------------------- button on modal ------------------------------*/
+/* -------------------- button on modal ------------------------------*/
+.close__modal {
+ position: absolute;
+ top: 0;
+ right: 0;
+ cursor: pointer;
+}
.btn__modal--cancel {
font-family: "montserrat-medium" !important;
font-size: 14px !important;
diff --git a/vue.config.js b/vue.config.js
index 943d0e0..9d54290 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -3,4 +3,13 @@ module.exports = {
transpileDependencies: [
'vuetify'
],
-}
+ configureWebpack: {
+ resolve: {
+ alias: {
+ '@Assets': path.resolve(__dirname, 'src/assets'),
+ '@Styles': path.resolve(__dirname, 'src/styles'),
+ '@': path.resolve(__dirname, 'src/')
+ },
+ },
+ }
+}
\ No newline at end of file