From 121d0d1f90cb7f4a82945c49e7414bbede7e6e6d Mon Sep 17 00:00:00 2001 From: sajjad Date: Sat, 19 Mar 2022 15:36:58 +0330 Subject: [PATCH] fix --- src/abstraction/repository/authRepository.js | 1 - .../repository/programRepository.js | 1 - src/components/Products/Add.vue | 15 ++++-- src/components/Products/Items.vue | 48 +++++++++++-------- src/components/Profile/Profile.vue | 18 +------ .../Programs/Modals/FiltersModal.vue | 4 +- src/components/Users/Items.vue | 16 +++++-- src/components/Users/Modals/FiltersModal.vue | 8 ++-- src/components/Workouts/Add.vue | 18 ++++--- src/components/Workouts/Items.vue | 43 ++++++++--------- .../Workouts/Modals/FiltersModal.vue | 4 +- .../WorkoutsSeries/Modals/AddWorkoutModal.vue | 1 - src/store/modules/products/actions.js | 21 ++++---- src/store/modules/products/getters.js | 4 +- src/store/modules/products/mutations.js | 7 +++ src/store/modules/products/state.js | 2 + src/store/modules/programs/actions.js | 2 +- src/store/modules/programs/mutations.js | 3 ++ src/store/modules/users/mutations.js | 4 ++ src/store/modules/workouts/actions.js | 3 ++ src/store/modules/workouts/getters.js | 4 +- src/store/modules/workouts/mutations.js | 7 +++ src/store/modules/workouts/state.js | 4 +- src/styles/vuetify/_modify.scss | 17 +++++++ src/views/Register.vue | 1 - 25 files changed, 160 insertions(+), 96 deletions(-) diff --git a/src/abstraction/repository/authRepository.js b/src/abstraction/repository/authRepository.js index 76b48d9..005ffb5 100644 --- a/src/abstraction/repository/authRepository.js +++ b/src/abstraction/repository/authRepository.js @@ -38,7 +38,6 @@ export default class AuthRepository { async verifyCode(data) { let json = setData(data); let response = await axios.post(url("verifyCode"), json); - console.log(response.data); return getJson(response.data) } } diff --git a/src/abstraction/repository/programRepository.js b/src/abstraction/repository/programRepository.js index 864ee6d..a98bff6 100644 --- a/src/abstraction/repository/programRepository.js +++ b/src/abstraction/repository/programRepository.js @@ -23,7 +23,6 @@ export default class ProgramRepository { } } async indexMyPrograms(data) { - console.log('repository'); let params = setQuery(data); let response = await axios.get(url("indexMyProgram"), { params diff --git a/src/components/Products/Add.vue b/src/components/Products/Add.vue index cf683b0..82f0fa7 100644 --- a/src/components/Products/Add.vue +++ b/src/components/Products/Add.vue @@ -11,7 +11,13 @@ subTitle="what we perpared for people" /> - + +
@@ -191,14 +197,16 @@ text="I’VE CHANGED MY MIND" icon="WMi-cancel" class="px-0" - height="19" + height="29" + lg />
@@ -225,6 +233,7 @@ export default { Dropzone, }, data: () => ({ + loading: false, random_token: RANDOM_TOKEN, form: { batch_id: RANDOM_TOKEN, diff --git a/src/components/Products/Items.vue b/src/components/Products/Items.vue index 1732bcb..788301f 100644 --- a/src/components/Products/Items.vue +++ b/src/components/Products/Items.vue @@ -13,10 +13,7 @@ />
- +
- - - - -
- + :pagination="getPaginationProduct" + class="row pb-10 mt-5" + > + + + +
@@ -57,7 +58,12 @@ export default { }, data: () => ({}), computed: { - ...mapGetters("products", ["getProducts", "getPaginationProduct"]), + ...mapGetters("products", [ + "getProducts", + "getPaginationProduct", + "isFilteredProduct", + "getProductsLoading", + ]), }, methods: { ...mapActions("products", ["loadProducts"]), @@ -73,4 +79,4 @@ export default { await this.loadProducts(); }, }; - \ No newline at end of file + diff --git a/src/components/Profile/Profile.vue b/src/components/Profile/Profile.vue index 98855af..05e5c9f 100644 --- a/src/components/Profile/Profile.vue +++ b/src/components/Profile/Profile.vue @@ -150,7 +150,7 @@ text="I’VE CHANGED MY MIND" icon="WMi-cancel" class="px-0" - height="19" + height="29" lg /> diff --git a/src/components/Programs/Modals/FiltersModal.vue b/src/components/Programs/Modals/FiltersModal.vue index c486388..5e810b9 100644 --- a/src/components/Programs/Modals/FiltersModal.vue +++ b/src/components/Programs/Modals/FiltersModal.vue @@ -138,14 +138,16 @@ export default { ...mapGetters("programs", ["getFilters"]), }, methods: { - ...mapMutations("programs", ["SET_FILTER_PROGRAMS"]), + ...mapMutations("programs", ["SET_FILTER_PROGRAMS", "SET_IS_FILTERED_PROGRAM"]), filterPrograms() { + this.SET_IS_FILTERED_PROGRAM(true); this.SET_FILTER_PROGRAMS(this.filter); this.$emit("filter"); this.$emit("filterCount", this.filter); this.$_closeModal(); }, clearFilter() { + this.SET_IS_FILTERED_PROGRAM(false); this.filter = cloneDeep(defaultFilter); this.SET_FILTER_PROGRAMS(this.filter); this.$emit("filter"); diff --git a/src/components/Users/Items.vue b/src/components/Users/Items.vue index b6a0967..eccce27 100644 --- a/src/components/Users/Items.vue +++ b/src/components/Users/Items.vue @@ -91,12 +91,19 @@ export default { "getUsersLoading", ]), ...mapGetters("modal", ["isModal"]), - ...mapState("users", ["filters"]), + filter() { + return { + role_name: { + type: "in", + val: this.$route.query.role_name, + }, + }; + }, }, methods: { ...mapActions("users", ["loadUsers", "loadTrainerTrainee", "laodRoles"]), - ...mapMutations("users", ["SET_PAGINATION"]), + ...mapMutations("users", ["SET_PAGINATION", "SET_FILTER_USER"]), changePagination(page) { if (this.getPaginationUser.page !== page) { this.SET_PAGINATION(page); @@ -111,9 +118,10 @@ export default { }, }, async created() { - if (!this.$route.query.role_name) { - this.load(); + if (this.$route.query.role_name) { + this.SET_FILTER_USER(this.filter); } + this.load(); this.role === "admin" ? await this.laodRoles() : false; this.getRoles.push({ id: 0, name: "trainee" }); }, diff --git a/src/components/Users/Modals/FiltersModal.vue b/src/components/Users/Modals/FiltersModal.vue index 3127ef4..a3c20ed 100644 --- a/src/components/Users/Modals/FiltersModal.vue +++ b/src/components/Users/Modals/FiltersModal.vue @@ -2,7 +2,7 @@