sajjad 3 years ago
parent 69aa023e2c
commit a69a1291b7

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: none; display: block; shape-rendering: auto; animation-play-state: running; animation-delay: 0s;" width="200px" height="200px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
<g transform="rotate(0 50 50)" style="animation-play-state: running; animation-delay: 0s;">
<rect x="49" y="17" rx="1" ry="1.44" width="2" height="12" fill="#ffffff" style="animation-play-state: running; animation-delay: 0s;">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.9166666666666666s" repeatCount="indefinite" style="animation-play-state: running; animation-delay: 0s;"></animate>
</rect>
</g><g transform="rotate(30 50 50)" style="animation-play-state: running; animation-delay: 0s;">
<rect x="49" y="17" rx="1" ry="1.44" width="2" height="12" fill="#ffffff" style="animation-play-state: running; animation-delay: 0s;">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.8333333333333334s" repeatCount="indefinite" style="animation-play-state: running; animation-delay: 0s;"></animate>
</rect>
</g><g transform="rotate(60 50 50)" style="animation-play-state: running; animation-delay: 0s;">
<rect x="49" y="17" rx="1" ry="1.44" width="2" height="12" fill="#ffffff" style="animation-play-state: running; animation-delay: 0s;">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.75s" repeatCount="indefinite" style="animation-play-state: running; animation-delay: 0s;"></animate>
</rect>
</g><g transform="rotate(90 50 50)" style="animation-play-state: running; animation-delay: 0s;">
<rect x="49" y="17" rx="1" ry="1.44" width="2" height="12" fill="#ffffff" style="animation-play-state: running; animation-delay: 0s;">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.6666666666666666s" repeatCount="indefinite" style="animation-play-state: running; animation-delay: 0s;"></animate>
</rect>
</g><g transform="rotate(120 50 50)" style="animation-play-state: running; animation-delay: 0s;">
<rect x="49" y="17" rx="1" ry="1.44" width="2" height="12" fill="#ffffff" style="animation-play-state: running; animation-delay: 0s;">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.5833333333333334s" repeatCount="indefinite" style="animation-play-state: running; animation-delay: 0s;"></animate>
</rect>
</g><g transform="rotate(150 50 50)" style="animation-play-state: running; animation-delay: 0s;">
<rect x="49" y="17" rx="1" ry="1.44" width="2" height="12" fill="#ffffff" style="animation-play-state: running; animation-delay: 0s;">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.5s" repeatCount="indefinite" style="animation-play-state: running; animation-delay: 0s;"></animate>
</rect>
</g><g transform="rotate(180 50 50)" style="animation-play-state: running; animation-delay: 0s;">
<rect x="49" y="17" rx="1" ry="1.44" width="2" height="12" fill="#ffffff" style="animation-play-state: running; animation-delay: 0s;">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.4166666666666667s" repeatCount="indefinite" style="animation-play-state: running; animation-delay: 0s;"></animate>
</rect>
</g><g transform="rotate(210 50 50)" style="animation-play-state: running; animation-delay: 0s;">
<rect x="49" y="17" rx="1" ry="1.44" width="2" height="12" fill="#ffffff" style="animation-play-state: running; animation-delay: 0s;">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.3333333333333333s" repeatCount="indefinite" style="animation-play-state: running; animation-delay: 0s;"></animate>
</rect>
</g><g transform="rotate(240 50 50)" style="animation-play-state: running; animation-delay: 0s;">
<rect x="49" y="17" rx="1" ry="1.44" width="2" height="12" fill="#ffffff" style="animation-play-state: running; animation-delay: 0s;">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.25s" repeatCount="indefinite" style="animation-play-state: running; animation-delay: 0s;"></animate>
</rect>
</g><g transform="rotate(270 50 50)" style="animation-play-state: running; animation-delay: 0s;">
<rect x="49" y="17" rx="1" ry="1.44" width="2" height="12" fill="#ffffff" style="animation-play-state: running; animation-delay: 0s;">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.16666666666666666s" repeatCount="indefinite" style="animation-play-state: running; animation-delay: 0s;"></animate>
</rect>
</g><g transform="rotate(300 50 50)" style="animation-play-state: running; animation-delay: 0s;">
<rect x="49" y="17" rx="1" ry="1.44" width="2" height="12" fill="#ffffff" style="animation-play-state: running; animation-delay: 0s;">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.08333333333333333s" repeatCount="indefinite" style="animation-play-state: running; animation-delay: 0s;"></animate>
</rect>
</g><g transform="rotate(330 50 50)" style="animation-play-state: running; animation-delay: 0s;">
<rect x="49" y="17" rx="1" ry="1.44" width="2" height="12" fill="#ffffff" style="animation-play-state: running; animation-delay: 0s;">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="0s" repeatCount="indefinite" style="animation-play-state: running; animation-delay: 0s;"></animate>
</rect>
</g>
<!-- [ldio] generated by https://loading.io/ --></svg>

After

Width:  |  Height:  |  Size: 5.5 KiB

@ -10,6 +10,7 @@
:small="sm" :small="sm"
:large="lg" :large="lg"
:x-large="xl" :x-large="xl"
:loading="loading"
> >
<template v-if="text"> <template v-if="text">
<template v-if="icon" <template v-if="icon"
@ -40,6 +41,9 @@ export default {
iconRight: {}, iconRight: {},
textMode: {}, textMode: {},
width: {}, width: {},
loading: {
default: false,
},
color: { color: {
default: "white", default: "white",
}, },

@ -9,7 +9,7 @@
</template> </template>
<script> <script>
import Idefault from '@/assets/Misterious_mist.gif' import Idefault from '@/assets/Spinner.svg'
export default { export default {
props: { props: {
src: { src: {

@ -195,7 +195,7 @@
<router-link :to="{ name: 'products' }"> <router-link :to="{ name: 'products' }">
<RectangleButton <RectangleButton
text="IVE CHANGED MY MIND" text="IVE CHANGED MY MIND"
icon="WMi-cancel" icon="WMi-cancel-linear"
class="px-0" class="px-0"
height="29" height="29"
lg lg
@ -207,6 +207,7 @@
height="29" height="29"
type="submit" type="submit"
lg lg
:loading="addProductRequestLoading"
/> />
</div> </div>
</div> </div>
@ -234,6 +235,7 @@ export default {
}, },
data: () => ({ data: () => ({
loading: false, loading: false,
addProductRequestLoading: false,
random_token: RANDOM_TOKEN, random_token: RANDOM_TOKEN,
form: { form: {
batch_id: RANDOM_TOKEN, batch_id: RANDOM_TOKEN,
@ -278,6 +280,7 @@ export default {
try { try {
let valid = this.$refs.form.validate(); let valid = this.$refs.form.validate();
if (valid) { if (valid) {
this.addProductRequestLoading = true;
let repository = new FileRepository(); let repository = new FileRepository();
if (this.productId) { if (this.productId) {
if (this.fileForm.file) { if (this.fileForm.file) {
@ -295,6 +298,8 @@ export default {
} }
} catch (e) { } catch (e) {
return e; return e;
} finally {
this.addProductRequestLoading = false;
} }
}, },
async load() { async load() {

@ -148,7 +148,7 @@
<router-link :to="{ name: 'dashboard' }"> <router-link :to="{ name: 'dashboard' }">
<RectangleButton <RectangleButton
text="IVE CHANGED MY MIND" text="IVE CHANGED MY MIND"
icon="WMi-cancel" icon="WMi-cancel-linear"
class="px-0" class="px-0"
height="29" height="29"
lg lg
@ -159,6 +159,7 @@
height="29" height="29"
type="submit" type="submit"
lg lg
:loading="profileRequestLoading"
/> />
</div> </div>
</div> </div>
@ -188,6 +189,7 @@ export default {
collection: "main_image", collection: "main_image",
crop_data: {}, crop_data: {},
}, },
profileRequestLoading: false,
}), }),
computed: { computed: {
...mapGetters("profile", ["getProfile", "getProfileLoading"]), ...mapGetters("profile", ["getProfile", "getProfileLoading"]),
@ -202,12 +204,19 @@ export default {
this.form["batch_id"] = RANDOM_TOKEN; this.form["batch_id"] = RANDOM_TOKEN;
}, },
async submit() { async submit() {
try {
this.profileRequestLoading = true;
if (this.fileForm.file) { if (this.fileForm.file) {
let repository = new FileRepository(); let repository = new FileRepository();
await repository.store(this.fileForm); await repository.store(this.fileForm);
} }
await this.updateProfile(this.form); await this.updateProfile(this.form);
this.$router.push({ name: "dashboard" }); this.$router.push({ name: "dashboard" });
} catch (e) {
return e;
} finally {
this.profileRequestLoading = false;
}
}, },
}, },
async created() { async created() {

@ -133,7 +133,7 @@
<router-link :to="{ name: 'dashboard' }"> <router-link :to="{ name: 'dashboard' }">
<RectangleButton <RectangleButton
text="IVE CHANGED MY MIND" text="IVE CHANGED MY MIND"
icon="WMi-cancel" icon="WMi-cancel-linear"
class="px-0" class="px-0"
height="29" height="29"
lg lg

@ -108,15 +108,17 @@
<router-link :to="{ name: 'programs' }"> <router-link :to="{ name: 'programs' }">
<RectangleButton <RectangleButton
text="IVE CHANGED MY MIND" text="IVE CHANGED MY MIND"
icon="WMi-cancel" icon="WMi-cancel-linear"
class="px-0" class="px-0"
height="19" height="29"
lg
/> />
</router-link> </router-link>
<RectangleButton <RectangleButton
:text="(programId ? 'update' : 'add') + ' the program'" :text="(programId ? 'update' : 'add') + ' the program'"
class="custom-btn add-btn" class="custom-btn add-btn"
height="25" height="29"
lg
type="submit" type="submit"
/> />
</div> </div>

@ -46,6 +46,7 @@
class="btn__modal--confirm custom-btn wa__f__m__eb" class="btn__modal--confirm custom-btn wa__f__m__eb"
text="change" text="change"
@click.native="changeRole" @click.native="changeRole"
:loading="changeRoleRequestLoading"
/> />
</div> </div>
</template> </template>
@ -67,6 +68,7 @@ export default {
data: () => ({ data: () => ({
role_id: null, role_id: null,
currectRoleId: null, currectRoleId: null,
changeRoleRequestLoading: false,
}), }),
computed: { computed: {
form() { form() {
@ -84,6 +86,8 @@ export default {
this.form.roles_id.push(this.role_id); this.form.roles_id.push(this.role_id);
}, },
async changeRole() { async changeRole() {
try {
this.changeRoleRequestLoading = true;
if (this.form.roles_id) { if (this.form.roles_id) {
if ( if (
!this.form.roles_id.includes(this.currectRoleId) && !this.form.roles_id.includes(this.currectRoleId) &&
@ -99,6 +103,11 @@ export default {
toast.error("Change the role first", "Error"); toast.error("Change the role first", "Error");
} }
} }
} catch (e) {
return e;
} finally {
this.changeRoleRequestLoading = false;
}
}, },
}, },
}; };

@ -155,7 +155,7 @@
<router-link :to="{ name: 'workouts' }"> <router-link :to="{ name: 'workouts' }">
<RectangleButton <RectangleButton
text="IVE CHANGED MY MIND" text="IVE CHANGED MY MIND"
icon="WMi-cancel" icon="WMi-cancel-linear"
class="px-0" class="px-0"
height="29" height="29"
lg lg

@ -35,6 +35,7 @@
:text-mode="true" :text-mode="true"
text="send the code" text="send the code"
type="submit" type="submit"
:loading="forgotRequestLoading"
/> />
</v-col> </v-col>
<v-col cols="12" class="pt-0"> <v-col cols="12" class="pt-0">
@ -74,9 +75,20 @@ export default {
}, },
data: () => ({ data: () => ({
form: {}, form: {},
forgotRequestLoading: false,
}), }),
methods: { methods: {
async forgotPassword() { async forgotPassword() {
try {
this.forgotRequestLoading = true;
let repository = new AuthRepository();
await repository.forgotPassword(this.form);
this.$router.push({ name: "login" });
} catch (e) {
return e;
} finally {
this.forgotRequestLoading = false;
}
let repository = new AuthRepository(); let repository = new AuthRepository();
await repository.forgotPassword(this.form); await repository.forgotPassword(this.form);
this.$router.push({ name: "login" }); this.$router.push({ name: "login" });

@ -47,6 +47,7 @@
lg lg
:text-mode="true" :text-mode="true"
text="sign in" text="sign in"
:loading="btnLoading"
type="submit" type="submit"
/> />
</div> </div>
@ -106,14 +107,22 @@ export default {
data: () => ({ data: () => ({
showPassword: false, showPassword: false,
form: {}, form: {},
btnLoading: false,
}), }),
methods: { methods: {
...mapActions("auth", ["login"]), ...mapActions("auth", ["login"]),
async doLogin() { async doLogin() {
try {
this.btnLoading = true;
let response = await this.login(this.form); let response = await this.login(this.form);
if (response) { if (response) {
this.$router.push(this.$route.query.redirect || "/"); this.$router.push(this.$route.query.redirect || "/");
} }
} catch (e) {
return e;
} finally {
this.btnLoading = false;
}
}, },
}, },
}; };

@ -79,6 +79,7 @@
:text-mode="true" :text-mode="true"
text="do sign up" text="do sign up"
type="submit" type="submit"
:loading="signUpRequestLoading"
/> />
</div> </div>
</v-col> </v-col>
@ -136,6 +137,7 @@
type="submit" type="submit"
height="29" height="29"
lg lg
:loading="verifyCodeRequestLoading"
/> />
</v-col> </v-col>
<v-col cols="12" class="pt-0"> <v-col cols="12" class="pt-0">
@ -176,21 +178,37 @@ export default {
showPassword: false, showPassword: false,
form: {}, form: {},
verifyCodePage: false, verifyCodePage: false,
signUpRequestLoading: false,
verifyCodeRequestLoading: false,
}), }),
methods: { methods: {
...mapActions("auth", ["register", "verifyEmail"]), ...mapActions("auth", ["register", "verifyEmail"]),
async doRegister() { async doRegister() {
try {
this.signUpRequestLoading = true;
let response = await this.register(this.form); let response = await this.register(this.form);
if (response) { if (response) {
this.toggleVerifyCodePage(); this.toggleVerifyCodePage();
} }
} catch (e) {
return e;
} finally {
this.signUpRequestLoading = false;
}
}, },
toggleVerifyCodePage() { toggleVerifyCodePage() {
this.verifyCodePage = !this.verifyCodePage; this.verifyCodePage = !this.verifyCodePage;
}, },
async verifyEmailCode() { async verifyEmailCode() {
try {
this.verifyCodeRequestLoading = true;
await this.verifyEmail(this.form); await this.verifyEmail(this.form);
this.$router.push({ name: "dashboard" }); this.$router.push({ name: "dashboard" });
} catch (e) {
return e;
} finally {
this.verifyCodeRequestLoading = false;
}
}, },
}, },
}; };

Loading…
Cancel
Save