sajjad 3 years ago
parent 25bd83eafe
commit 12d3f7b424

@ -9,7 +9,7 @@
</template>
<script>
import Idefault from '@/assets/Spinner.svg'
import Idefault from "@/assets/Spinner.svg";
export default {
props: {
src: {
@ -29,9 +29,11 @@ export default {
.loading-container {
text-align: center;
}
.loading__title,
.loading__title {
font-family: "Team-america", sans-serif;
}
.loading__message {
font-family: "Barlow-EL", sans-serif;
font-family: "montserrat-regular", sans-serif;
}
.loading__title {
letter-spacing: 2px;

@ -11,7 +11,7 @@
subTitle="what we perpared for people"
/>
</div>
<v-form @submit.prevent="submit">
<v-form @submit.prevent="submit" ref="form">
<v-row class="mt-4">
<v-col cols="3">
<div class="h-100">
@ -38,12 +38,13 @@
v-model="form.sport_category_id"
></v-autocomplete>
</v-col>
<v-col cols="8"
<v-col cols="3"
><v-text-field
v-model="form.period"
label="program duration (day)"
class="no-error-msg pt-0 mt-0"
class="pt-0 mt-0"
dark
:rules="numericalRules"
></v-text-field
></v-col>
</v-row>
@ -164,12 +165,19 @@ export default {
programId() {
return this.$route.params.id;
},
numericalRules() {
return [
(v) => !!v || "This field is required.",
(v) => /^\d+$/.test(v) || "you should enter just digit.",
];
},
},
methods: {
...mapActions("sportCategories", ["loadSportCategories"]),
...mapActions("programs", ["addProgram", "updateProgram", "loadProgram"]),
async submit() {
try {
if (!this.$refs.form.validate()) return;
let repository = new FileRepository();
if (this.programId) {
if (

@ -9,7 +9,11 @@
link="dashboard"
icon="WMi-left-open"
:title="role === 'admin' ? 'users' : 'my trainees'"
subTitle="let us know you better, it comes handy."
:subTitle="
role === 'admin'
? 'let us know you better, it comes handy.'
: 'Who attended to your programs'
"
/>
</div>
<div>

@ -12,7 +12,7 @@
/>
</div>
<loading v-if="loading" class="loading-data" />
<v-form @submit.prevent="submit" :class="{ 'loading-form': loading }">
<v-form @submit.prevent="submit" :class="{ 'loading-form': loading }" ref="form">
<v-row class="mt-4">
<v-col cols="3">
<div class="pb-14 h-100">
@ -92,16 +92,18 @@
><v-text-field
dark
label="suggested course time?"
class="no-error-msg pt-0 mt-0"
class="pt-0 mt-0"
v-model="form.suggested_set"
:rules="numericalRules"
></v-text-field
></v-col>
<v-col cols="2"
><v-text-field
dark
label="suggested times each course?"
class="no-error-msg pt-0 mt-0"
class="pt-0 mt-0"
v-model="form.suggested_per_set"
:rules="numericalRules"
></v-text-field
></v-col>
<v-col cols="2">
@ -208,6 +210,11 @@ export default {
workoutId() {
return this.$route.params.id;
},
numericalRules() {
return [
(v) => /^\d+$/.test(v) || "you should enter just digit.",
];
},
},
watch: {
"form.name"(val) {
@ -223,6 +230,7 @@ export default {
...mapActions("sportCategories", ["loadSportCategories"]),
async submit() {
try {
if (!this.$refs.form.validate()) return;
let repository = new FileRepository();
if (this.workoutId) {
if (

@ -309,7 +309,7 @@ input::placeholder {
}
.willaToast.willaToast-color-black>.willaToast-body .willaToast-title {
font-family: "cizel" !important;
font-family: "Team-america" !important;
color: var(--color-social-yellow) !important;
}
@ -318,6 +318,10 @@ input::placeholder {
position: relative;
}
.loading-container .loading img {
width: 140px;
}
.loading-data {
position: absolute;
top: 50%;

Loading…
Cancel
Save