|
|
@ -13,117 +13,132 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<v-form @submit.prevent="submit">
|
|
|
|
<v-form @submit.prevent="submit">
|
|
|
|
<v-row class="mt-4">
|
|
|
|
<v-row class="mt-4">
|
|
|
|
<v-col class="12" sm="3">
|
|
|
|
|
|
|
|
<v-text-field
|
|
|
|
|
|
|
|
label="your email address"
|
|
|
|
|
|
|
|
class="no-error-msg pt-0"
|
|
|
|
|
|
|
|
dark
|
|
|
|
|
|
|
|
v-model="form.email"
|
|
|
|
|
|
|
|
></v-text-field>
|
|
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
|
|
<v-col class="12" sm="3">
|
|
|
|
|
|
|
|
<v-text-field
|
|
|
|
|
|
|
|
label="your name"
|
|
|
|
|
|
|
|
class="no-error-msg pt-0"
|
|
|
|
|
|
|
|
dark
|
|
|
|
|
|
|
|
v-model="form.first_name"
|
|
|
|
|
|
|
|
></v-text-field>
|
|
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
|
|
<v-col class="12" sm="3">
|
|
|
|
|
|
|
|
<v-text-field
|
|
|
|
|
|
|
|
label="your family name"
|
|
|
|
|
|
|
|
class="no-error-msg pt-0"
|
|
|
|
|
|
|
|
dark
|
|
|
|
|
|
|
|
v-model="form.last_name"
|
|
|
|
|
|
|
|
></v-text-field>
|
|
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
|
|
<v-col class="12" sm="3">
|
|
|
|
|
|
|
|
<v-text-field
|
|
|
|
|
|
|
|
label="your cell number"
|
|
|
|
|
|
|
|
class="no-error-msg pt-0"
|
|
|
|
|
|
|
|
dark
|
|
|
|
|
|
|
|
v-model="form.cell_number"
|
|
|
|
|
|
|
|
></v-text-field>
|
|
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
|
|
</v-row>
|
|
|
|
|
|
|
|
<v-row>
|
|
|
|
|
|
|
|
<v-col cols="3">
|
|
|
|
<v-col cols="3">
|
|
|
|
<v-autocomplete
|
|
|
|
<div class="pb-14 h-100">
|
|
|
|
label="your country"
|
|
|
|
<div class="w-100 h-100">
|
|
|
|
class="no-error-msg pt-0"
|
|
|
|
<ImageCropper
|
|
|
|
dark
|
|
|
|
label="manager image"
|
|
|
|
item-value="id"
|
|
|
|
:url.sync="form.profile"
|
|
|
|
item-text="name"
|
|
|
|
v-model="fileForm"
|
|
|
|
:items="getCountries"
|
|
|
|
/>
|
|
|
|
v-model="form.country_id"
|
|
|
|
</div>
|
|
|
|
></v-autocomplete>
|
|
|
|
</div>
|
|
|
|
</v-col>
|
|
|
|
</v-col>
|
|
|
|
<v-col cols="3">
|
|
|
|
<v-col cols="9">
|
|
|
|
<v-text-field
|
|
|
|
<v-row class="mt-4">
|
|
|
|
label="address"
|
|
|
|
<v-col class="12" sm="3">
|
|
|
|
class="no-error-msg pt-0"
|
|
|
|
<v-text-field
|
|
|
|
dark
|
|
|
|
label="your email address"
|
|
|
|
v-model="form.address"
|
|
|
|
class="no-error-msg pt-0"
|
|
|
|
></v-text-field>
|
|
|
|
dark
|
|
|
|
</v-col>
|
|
|
|
v-model="form.email"
|
|
|
|
<v-col cols="3"
|
|
|
|
></v-text-field>
|
|
|
|
><DateInput
|
|
|
|
</v-col>
|
|
|
|
class="no-error-msg"
|
|
|
|
<v-col class="12" sm="3">
|
|
|
|
label="Birthday"
|
|
|
|
<v-text-field
|
|
|
|
dark
|
|
|
|
label="your name"
|
|
|
|
:max="new Date().toISOString().slice(0, 10)"
|
|
|
|
class="no-error-msg pt-0"
|
|
|
|
v-model="form.birthday"
|
|
|
|
dark
|
|
|
|
/></v-col>
|
|
|
|
v-model="form.first_name"
|
|
|
|
<v-col cols="3"></v-col>
|
|
|
|
></v-text-field>
|
|
|
|
</v-row>
|
|
|
|
</v-col>
|
|
|
|
<v-divider dark></v-divider>
|
|
|
|
<v-col class="12" sm="3">
|
|
|
|
<v-row class="w-75">
|
|
|
|
<v-text-field
|
|
|
|
<v-col cols="3"
|
|
|
|
label="your family name"
|
|
|
|
><v-text-field
|
|
|
|
class="no-error-msg pt-0"
|
|
|
|
label="weight"
|
|
|
|
dark
|
|
|
|
class="no-error-msg pt-0"
|
|
|
|
v-model="form.last_name"
|
|
|
|
suffix="kg"
|
|
|
|
></v-text-field>
|
|
|
|
dark
|
|
|
|
</v-col>
|
|
|
|
v-model="form.weight"
|
|
|
|
<v-col class="12" sm="3">
|
|
|
|
></v-text-field
|
|
|
|
<v-text-field
|
|
|
|
></v-col>
|
|
|
|
label="your cell number"
|
|
|
|
<v-col cols="3"
|
|
|
|
class="no-error-msg pt-0"
|
|
|
|
><v-text-field
|
|
|
|
dark
|
|
|
|
label="height"
|
|
|
|
v-model="form.cell_number"
|
|
|
|
class="no-error-msg pt-0"
|
|
|
|
></v-text-field>
|
|
|
|
suffix="cm"
|
|
|
|
</v-col>
|
|
|
|
dark
|
|
|
|
</v-row>
|
|
|
|
v-model="form.height"
|
|
|
|
<v-row>
|
|
|
|
></v-text-field
|
|
|
|
<v-col cols="3">
|
|
|
|
></v-col>
|
|
|
|
<v-autocomplete
|
|
|
|
<v-col cols="3"
|
|
|
|
label="your country"
|
|
|
|
><v-text-field
|
|
|
|
class="no-error-msg pt-0"
|
|
|
|
label="arm diameter"
|
|
|
|
dark
|
|
|
|
class="no-error-msg pt-0"
|
|
|
|
item-value="id"
|
|
|
|
suffix="cm"
|
|
|
|
item-text="name"
|
|
|
|
dark
|
|
|
|
:items="getCountries"
|
|
|
|
v-model="form.arm_diameter"
|
|
|
|
v-model="form.country_id"
|
|
|
|
></v-text-field
|
|
|
|
></v-autocomplete>
|
|
|
|
></v-col>
|
|
|
|
</v-col>
|
|
|
|
<v-col cols="3"
|
|
|
|
<v-col cols="3">
|
|
|
|
><v-text-field
|
|
|
|
<v-text-field
|
|
|
|
label="lge diameter"
|
|
|
|
label="address"
|
|
|
|
class="no-error-msg pt-0"
|
|
|
|
class="no-error-msg pt-0"
|
|
|
|
suffix="cm"
|
|
|
|
dark
|
|
|
|
dark
|
|
|
|
v-model="form.address"
|
|
|
|
v-model="form.leg_diameter"
|
|
|
|
></v-text-field>
|
|
|
|
></v-text-field
|
|
|
|
</v-col>
|
|
|
|
></v-col>
|
|
|
|
<v-col cols="3"
|
|
|
|
</v-row>
|
|
|
|
><DateInput
|
|
|
|
<v-row class="mb-16">
|
|
|
|
class="no-error-msg"
|
|
|
|
<v-col cols="12">
|
|
|
|
label="Birthday"
|
|
|
|
<v-textarea
|
|
|
|
dark
|
|
|
|
label="about you"
|
|
|
|
:max="new Date().toISOString().slice(0, 10)"
|
|
|
|
class="no-error-msg"
|
|
|
|
v-model="form.birthday"
|
|
|
|
rows="4"
|
|
|
|
/></v-col>
|
|
|
|
dark
|
|
|
|
<v-col cols="3"></v-col>
|
|
|
|
v-model="form.details"
|
|
|
|
</v-row>
|
|
|
|
></v-textarea>
|
|
|
|
<v-divider dark></v-divider>
|
|
|
|
|
|
|
|
<v-row class="w-100">
|
|
|
|
|
|
|
|
<v-col cols="3"
|
|
|
|
|
|
|
|
><v-text-field
|
|
|
|
|
|
|
|
label="weight"
|
|
|
|
|
|
|
|
class="no-error-msg pt-0"
|
|
|
|
|
|
|
|
suffix="kg"
|
|
|
|
|
|
|
|
dark
|
|
|
|
|
|
|
|
v-model="form.weight"
|
|
|
|
|
|
|
|
></v-text-field
|
|
|
|
|
|
|
|
></v-col>
|
|
|
|
|
|
|
|
<v-col cols="3"
|
|
|
|
|
|
|
|
><v-text-field
|
|
|
|
|
|
|
|
label="height"
|
|
|
|
|
|
|
|
class="no-error-msg pt-0"
|
|
|
|
|
|
|
|
suffix="cm"
|
|
|
|
|
|
|
|
dark
|
|
|
|
|
|
|
|
v-model="form.height"
|
|
|
|
|
|
|
|
></v-text-field
|
|
|
|
|
|
|
|
></v-col>
|
|
|
|
|
|
|
|
<v-col cols="3"
|
|
|
|
|
|
|
|
><v-text-field
|
|
|
|
|
|
|
|
label="arm diameter"
|
|
|
|
|
|
|
|
class="no-error-msg pt-0"
|
|
|
|
|
|
|
|
suffix="cm"
|
|
|
|
|
|
|
|
dark
|
|
|
|
|
|
|
|
v-model="form.arm_diameter"
|
|
|
|
|
|
|
|
></v-text-field
|
|
|
|
|
|
|
|
></v-col>
|
|
|
|
|
|
|
|
<v-col cols="3"
|
|
|
|
|
|
|
|
><v-text-field
|
|
|
|
|
|
|
|
label="lge diameter"
|
|
|
|
|
|
|
|
class="no-error-msg pt-0"
|
|
|
|
|
|
|
|
suffix="cm"
|
|
|
|
|
|
|
|
dark
|
|
|
|
|
|
|
|
v-model="form.leg_diameter"
|
|
|
|
|
|
|
|
></v-text-field
|
|
|
|
|
|
|
|
></v-col>
|
|
|
|
|
|
|
|
</v-row>
|
|
|
|
|
|
|
|
<v-row class="mb-16">
|
|
|
|
|
|
|
|
<v-col cols="12">
|
|
|
|
|
|
|
|
<v-textarea
|
|
|
|
|
|
|
|
label="about you"
|
|
|
|
|
|
|
|
class="no-error-msg"
|
|
|
|
|
|
|
|
rows="4"
|
|
|
|
|
|
|
|
dark
|
|
|
|
|
|
|
|
v-model="form.details"
|
|
|
|
|
|
|
|
></v-textarea>
|
|
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
|
|
</v-row>
|
|
|
|
</v-col>
|
|
|
|
</v-col>
|
|
|
|
</v-row>
|
|
|
|
</v-row>
|
|
|
|
<div class="mt-16">
|
|
|
|
<div class="mt-16">
|
|
|
@ -152,12 +167,24 @@
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { mapActions, mapGetters } from "vuex";
|
|
|
|
import { mapActions, mapGetters } from "vuex";
|
|
|
|
import SectionTitle from "../Global/Section/SectionTitle.vue";
|
|
|
|
import SectionTitle from "../Global/Section/SectionTitle.vue";
|
|
|
|
|
|
|
|
import ImageCropper from "../Global/Input/ImageCropper.vue";
|
|
|
|
|
|
|
|
import FileRepository from "../../abstraction/repository/fileRepository";
|
|
|
|
|
|
|
|
import { makeid } from "@/utils/math";
|
|
|
|
|
|
|
|
const RANDOM_TOKEN = makeid(50);
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
components: {
|
|
|
|
SectionTitle,
|
|
|
|
SectionTitle,
|
|
|
|
|
|
|
|
ImageCropper,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data: () => ({
|
|
|
|
data: () => ({
|
|
|
|
form: {},
|
|
|
|
form: {
|
|
|
|
|
|
|
|
batch_id: RANDOM_TOKEN,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
fileForm: {
|
|
|
|
|
|
|
|
batch_id: RANDOM_TOKEN,
|
|
|
|
|
|
|
|
collection: "main_image",
|
|
|
|
|
|
|
|
crop_data: {},
|
|
|
|
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
computed: {
|
|
|
|
computed: {
|
|
|
|
...mapGetters("profile", ["getProfile"]),
|
|
|
|
...mapGetters("profile", ["getProfile"]),
|
|
|
@ -169,8 +196,13 @@ export default {
|
|
|
|
async setProfile() {
|
|
|
|
async setProfile() {
|
|
|
|
await this.loadProfile();
|
|
|
|
await this.loadProfile();
|
|
|
|
this.form = this.getProfile;
|
|
|
|
this.form = this.getProfile;
|
|
|
|
|
|
|
|
this.form["batch_id"] = RANDOM_TOKEN;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
async submit() {
|
|
|
|
async submit() {
|
|
|
|
|
|
|
|
if (this.fileForm.file) {
|
|
|
|
|
|
|
|
let repository = new FileRepository();
|
|
|
|
|
|
|
|
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" });
|
|
|
|
},
|
|
|
|
},
|
|
|
|