update

parent 719efc76
export const config = { export const config = {
API_ENDPOINT: 'http://cms.vab.xteldev.com/api/', API_ENDPOINT: 'https://cms.vab.xteldev.com/api/',
API_IMAGE_ENDPOINT: 'http://cms.vab.xteldev.com/file/upload/', API_IMAGE_ENDPOINT: 'https://cms.vab.xteldev.com/file/upload/',
API_RES_CODE: { API_RES_CODE: {
OK: { OK: {
code: 0, code: 0,
......
...@@ -191,6 +191,7 @@ ...@@ -191,6 +191,7 @@
toolbar-toggle-color="yellow-8" toolbar-toggle-color="yellow-8"
toolbar-bg="primary" toolbar-bg="primary"
style="height: 100%" style="height: 100%"
:toolbar="[ :toolbar="[
[ [
{ {
...@@ -266,6 +267,8 @@ ...@@ -266,6 +267,8 @@
['undo', 'redo'], ['undo', 'redo'],
['viewsource'], ['viewsource'],
['upload']
]" ]"
:fonts="{ :fonts="{
arial: 'Arial', arial: 'Arial',
...@@ -277,7 +280,13 @@ ...@@ -277,7 +280,13 @@
times_new_roman: 'Times New Roman', times_new_roman: 'Times New Roman',
verdana: 'Verdana', verdana: 'Verdana',
}" }"
/> >
<template #upload>
<q-btn @click="uploadFile" flat class="text-white" dense size="sm" icon="cloud_upload">
</q-btn>
</template>
</q-editor>
</q-tab-panel> </q-tab-panel>
</q-tab-panels> </q-tab-panels>
</div> </div>
...@@ -340,7 +349,25 @@ export default defineComponent({ ...@@ -340,7 +349,25 @@ export default defineComponent({
required: true, required: true,
}, },
}, },
setup(_, context) { setup(_, context) {
const uploadImage = ref(null);
const uploadFile = () => {
// eslint-disable-next-line
// @ts-ignore
// eslint-disable-next-line
uploadImage.value?.click();
};
const selectedFile = (value: FileList) => { const selectedFile = (value: FileList) => {
context.emit('SetAvatar', { context.emit('SetAvatar', {
file: value[0], file: value[0],
...@@ -380,11 +407,13 @@ export default defineComponent({ ...@@ -380,11 +407,13 @@ export default defineComponent({
imageRules, imageRules,
selectedFile, selectedFile,
categoryRules, categoryRules,
uploadImage,
upload, upload,
uploadAvatar, uploadAvatar,
deleteAvatar, deleteAvatar,
tab, tab,
tabContent, tabContent,
uploadFile
}; };
}, },
emits: [ emits: [
......
...@@ -55,28 +55,28 @@ export default defineComponent({ ...@@ -55,28 +55,28 @@ export default defineComponent({
favoriteScore: { type: Number, required: true }, favoriteScore: { type: Number, required: true },
artistCodeRules: { type: Boolean, required: true }, artistCodeRules: { type: Boolean, required: true },
fullNameRules: { type: Boolean, required: true }, fullNameRules: { type: Boolean, required: true },
artistNameRules: { type: Boolean, required: true }, // artistNameRules: { type: Boolean, required: true },
birthdayRules: { type: Boolean, required: true }, // birthdayRules: { type: Boolean, required: true },
emailRules: { type: Boolean, required: true }, // emailRules: { type: Boolean, required: true },
emailAdministerRules: { type: Boolean, required: true }, emailAdministerRules: { type: Boolean, required: true },
phoneNumberAdministerRules: { type: Boolean, required: true }, phoneNumberAdministerRules: { type: Boolean, required: true },
addressRules: { type: Boolean, required: true }, // addressRules: { type: Boolean, required: true },
account: { type: String, required: true }, account: { type: String, required: true },
accountRules:{type:Boolean, required: true}, accountRules:{type:Boolean, required: true},
phoneNumberRules: { type: Boolean, required: true }, // phoneNumberRules: { type: Boolean, required: true },
sexRules: { type: Boolean, required: true }, // sexRules: { type: Boolean, required: true },
nationalityRules: { type: Boolean, required: true }, // nationalityRules: { type: Boolean, required: true },
fieldRules: { type: Boolean, required: true }, // fieldRules: { type: Boolean, required: true },
musicsRules: { type: Boolean, required: true }, // musicsRules: { type: Boolean, required: true },
// workRules: { type: Boolean, required: true }, // workRules: { type: Boolean, required: true },
qualificationRules: { type: Boolean, required: true }, // qualificationRules: { type: Boolean, required: true },
artistLevelRules: { type: Boolean, required: true }, artistLevelRules: { type: Boolean, required: true },
errorMessPhoneNumber: { type: String, required: true }, // errorMessPhoneNumber: { type: String, required: true },
errorMessEmail: { type: String, required: true }, // errorMessEmail: { type: String, required: true },
errorMessmnBookingPhone: { type: String, required: true }, // errorMessmnBookingPhone: { type: String, required: true },
errorMessmnBookingEmail: { type: String, required: true }, // errorMessmnBookingEmail: { type: String, required: true },
mnBookingEmailRules: { type: Boolean, required: true }, // mnBookingEmailRules: { type: Boolean, required: true },
mnBookingPhoneRules: { type: Boolean, required: true }, // mnBookingPhoneRules: { type: Boolean, required: true },
options: { type: String, required: true }, options: { type: String, required: true },
provinceOptions: {type: Array, required: true}, provinceOptions: {type: Array, required: true},
......
...@@ -64,9 +64,9 @@ ...@@ -64,9 +64,9 @@
@change="selectedFile($event.target.files)" @change="selectedFile($event.target.files)"
/> />
</div> </div>
<div v-if="hidden_img" style="color: #c10015; font-size: 12px"> <!-- <div v-if="hidden_img" style="color: #c10015; font-size: 12px">
Vui lòng chọn ảnh Vui lòng chọn ảnh
</div> </div> -->
</div> </div>
</div> </div>
</div> </div>
...@@ -144,14 +144,16 @@ ...@@ -144,14 +144,16 @@
<div class="row flex-center"> <div class="row flex-center">
<div class="col-3 text-weight-medium"> <div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.artistName') }} {{ $t('artist.artistInformation.titleDataField.artistName') }}
<span style="color: red">*</span> <!-- <span style="color: red">*</span> -->
</div> </div>
<div class="col-8"> <div class="col-8">
<!-- :error-message="errorMessArtistName" -->
<!-- :error="artistNameRules" -->
<q-input <q-input
:model-value="artistName" :model-value="artistName"
@update:model-value="$emit('update:artistName', $event)" @update:model-value="$emit('update:artistName', $event)"
:error="artistNameRules"
:error-message="errorMessArtistName"
class="q-my-sm" class="q-my-sm"
outlined outlined
dense dense
...@@ -162,14 +164,15 @@ ...@@ -162,14 +164,15 @@
<div class="row flex-center"> <div class="row flex-center">
<div class="col-3 text-weight-medium"> <div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.birthday') }} {{ $t('artist.artistInformation.titleDataField.birthday') }}
<span style="color: red">*</span> <!-- <span style="color: red">*</span> -->
</div> </div>
<div class="col-8"> <div class="col-8">
<!-- :error="birthdayRules" -->
<!-- :error-message="errorMessBirthday" -->
<q-input <q-input
:model-value="birthday" :model-value="birthday"
@update:model-value="$emit('update:birthday', $event)" @update:model-value="$emit('update:birthday', $event)"
:error="birthdayRules"
:error-message="errorMessBirthday"
class="q-my-sm" class="q-my-sm"
outlined outlined
@click="openDialog = true" @click="openDialog = true"
...@@ -202,15 +205,16 @@ ...@@ -202,15 +205,16 @@
<div class="row flex-center"> <div class="row flex-center">
<div class="col-3 text-weight-medium"> <div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.sex') }} {{ $t('artist.artistInformation.titleDataField.sex') }}
<span style="color: red">*</span> <!-- <span style="color: red">*</span> -->
</div> </div>
<div class="col-8"> <div class="col-8">
<!-- :error="sexRules"
:error-message="errorMessSex" -->
<q-select <q-select
:model-value="sex" :model-value="sex"
@update:model-value="$emit('update:sex', $event)" @update:model-value="$emit('update:sex', $event)"
:options="sexOptions" :options="sexOptions"
:error="sexRules"
:error-message="errorMessSex"
emit-value emit-value
map-options map-options
option-value="id" option-value="id"
...@@ -227,15 +231,17 @@ ...@@ -227,15 +231,17 @@
<div class="row flex-center"> <div class="row flex-center">
<div class="col-3 text-weight-medium"> <div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.nationality') }} {{ $t('artist.artistInformation.titleDataField.nationality') }}
<span style="color: red">*</span> <!-- <span style="color: red">*</span> -->
</div> </div>
<div class="col-8"> <div class="col-8">
<!-- :error="nationalityRules"
:error-message="errorMessNationality" -->
<q-select <q-select
:model-value="nationality" :model-value="nationality"
@update:model-value="$emit('update:nationality', $event)" @update:model-value="$emit('update:nationality', $event)"
:options="nationalityOptions" :options="nationalityOptions"
:error="nationalityRules"
:error-message="errorMessNationality"
map-options map-options
option-value="id" option-value="id"
option-label="name" option-label="name"
...@@ -251,16 +257,17 @@ ...@@ -251,16 +257,17 @@
<div class="row flex-center"> <div class="row flex-center">
<div class="col-3 text-weight-medium"> <div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.address') }} {{ $t('artist.artistInformation.titleDataField.address') }}
<span style="color: red">*</span> <!-- <span style="color: red">*</span> -->
</div> </div>
<div class="col-8"> <div class="col-8">
<!-- {{address}} --> <!-- {{address}} -->
<!-- :error="addressRules"
:error-message="errorMessAddress" -->
<q-select <q-select
:model-value="address" :model-value="address"
@update:model-value="$emit('update:address', $event)" @update:model-value="$emit('update:address', $event)"
:error="addressRules"
:error-message="errorMessAddress"
:options="provinceOptions1" :options="provinceOptions1"
option-value="fullName" option-value="fullName"
option-label="fullName" option-label="fullName"
...@@ -291,15 +298,16 @@ ...@@ -291,15 +298,16 @@
<div class="row flex-center"> <div class="row flex-center">
<div class="col-3 text-weight-medium"> <div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.field') }} {{ $t('artist.artistInformation.titleDataField.field') }}
<span style="color: red">*</span> <!-- <span style="color: red">*</span> -->
</div> </div>
<div class="col-8"> <div class="col-8">
<!-- :error="fieldRules"
:error-message="errorMessFields" -->
<q-select <q-select
:model-value="fields" :model-value="fields"
@update:model-value="$emit('update:fields', $event)" @update:model-value="$emit('update:fields', $event)"
:error="fieldRules"
:error-message="errorMessFields"
:options="fieldOptions" :options="fieldOptions"
multiple multiple
map-options map-options
...@@ -378,15 +386,16 @@ ...@@ -378,15 +386,16 @@
<div class="row flex-center"> <div class="row flex-center">
<div class="col-3 text-weight-medium"> <div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.qualification') }} {{ $t('artist.artistInformation.titleDataField.qualification') }}
<span style="color: red">*</span> <!-- <span style="color: red">*</span> -->
</div> </div>
<div class="col-8"> <div class="col-8">
<!-- :error="qualificationRules"
:error-message="errorMessQualification" -->
<q-select <q-select
:model-value="qualification" :model-value="qualification"
@update:model-value="$emit('update:qualification', $event)" @update:model-value="$emit('update:qualification', $event)"
:options="professionOptions" :options="professionOptions"
:error="qualificationRules"
:error-message="errorMessQualification"
map-options map-options
option-value="id" option-value="id"
option-label="name" option-label="name"
...@@ -443,14 +452,15 @@ ...@@ -443,14 +452,15 @@
<div class="row flex-center"> <div class="row flex-center">
<div class="col-3 text-weight-medium"> <div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.phoneNumber') }} {{ $t('artist.artistInformation.titleDataField.phoneNumber') }}
<span style="color: red">*</span> <!-- <span style="color: red">*</span> -->
</div> </div>
<div class="col-8"> <div class="col-8">
<!-- :error="phoneNumberRules"
:error-message="errorMessPhoneNumber" -->
<q-input <q-input
:model-value="phoneNumber" :model-value="phoneNumber"
@update:model-value="$emit('update:phoneNumber', $event)" @update:model-value="$emit('update:phoneNumber', $event)"
:error="phoneNumberRules"
:error-message="errorMessPhoneNumber"
mask="##########" mask="##########"
class="q-my-sm" class="q-my-sm"
outlined outlined
...@@ -462,14 +472,15 @@ ...@@ -462,14 +472,15 @@
<div class="row flex-center"> <div class="row flex-center">
<div class="col-3 text-weight-medium"> <div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.email') }} {{ $t('artist.artistInformation.titleDataField.email') }}
<span style="color: red">*</span> <!-- <span style="color: red">*</span> -->
</div> </div>
<div class="col-8"> <div class="col-8">
<!-- :error="emailRules"
:error-message="errorMessEmail" -->
<q-input <q-input
:model-value="email" :model-value="email"
@update:model-value="$emit('update:email', $event)" @update:model-value="$emit('update:email', $event)"
:error="emailRules"
:error-message="errorMessEmail"
outlined outlined
class="q-my-sm" class="q-my-sm"
dense dense
...@@ -596,16 +607,17 @@ ...@@ -596,16 +607,17 @@
<div class="row flex-center" v-if="check_infoBooking"> <div class="row flex-center" v-if="check_infoBooking">
<div class="col-3 text-weight-medium"> <div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.phoneNumberBooking') }} {{ $t('artist.artistInformation.titleDataField.phoneNumberBooking') }}
<span style="color: red">*</span> <!-- <span style="color: red">*</span> -->
</div> </div>
<div class="col-8"> <div class="col-8">
<!-- :error="mnBookingPhoneRules"
:error-message="errorMessmnBookingPhone" -->
<q-input <q-input
:model-value="mnBookingPhone" :model-value="mnBookingPhone"
@update:model-value="$emit('update:mnBookingPhone', $event)" @update:model-value="$emit('update:mnBookingPhone', $event)"
mask="##########" mask="##########"
class="q-my-sm" class="q-my-sm"
:error="mnBookingPhoneRules"
:error-message="errorMessmnBookingPhone"
outlined outlined
dense dense
hide-bottom-space hide-bottom-space
...@@ -615,14 +627,15 @@ ...@@ -615,14 +627,15 @@
<div class="row flex-center" v-if="check_infoBooking"> <div class="row flex-center" v-if="check_infoBooking">
<div class="col-3 text-weight-medium"> <div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.emailBooking') }} {{ $t('artist.artistInformation.titleDataField.emailBooking') }}
<span style="color: red">*</span> <!-- <span style="color: red">*</span> -->
</div> </div>
<div class="col-8"> <div class="col-8">
<!-- :error="mnBookingEmailRules"
:error-message="errorMessmnBookingEmail" -->
<q-input <q-input
:model-value="mnBookingEmail" :model-value="mnBookingEmail"
@update:model-value="$emit('update:mnBookingEmail', $event)" @update:model-value="$emit('update:mnBookingEmail', $event)"
:error="mnBookingEmailRules"
:error-message="errorMessmnBookingEmail"
outlined outlined
class="q-my-sm" class="q-my-sm"
dense dense
...@@ -735,28 +748,28 @@ export default defineComponent({ ...@@ -735,28 +748,28 @@ export default defineComponent({
favoriteScore: { type: Number, required: true }, favoriteScore: { type: Number, required: true },
artistCodeRules: { type: Boolean, required: true }, artistCodeRules: { type: Boolean, required: true },
fullNameRules: { type: Boolean, required: true }, fullNameRules: { type: Boolean, required: true },
artistNameRules: { type: Boolean, required: true }, // artistNameRules: { type: Boolean, required: true },
birthdayRules: { type: Boolean, required: true }, // birthdayRules: { type: Boolean, required: true },
emailRules: { type: Boolean, required: true }, // emailRules: { type: Boolean, required: true },
emailAdministerRules: { type: Boolean, required: true }, emailAdministerRules: { type: Boolean, required: true },
phoneNumberAdministerRules: { type: Boolean, required: true }, phoneNumberAdministerRules: { type: Boolean, required: true },
addressRules: { type: Boolean, required: true }, // addressRules: { type: Boolean, required: true },
account: { type: String, required: true }, account: { type: String, required: true },
accountRules:{type:Boolean, required: true}, accountRules:{type:Boolean, required: true},
phoneNumberRules: { type: Boolean, required: true }, // phoneNumberRules: { type: Boolean, required: true },
sexRules: { type: Boolean, required: true }, // sexRules: { type: Boolean, required: true },
nationalityRules: { type: Boolean, required: true }, // nationalityRules: { type: Boolean, required: true },
fieldRules: { type: Boolean, required: true }, // fieldRules: { type: Boolean, required: true },
musicsRules: { type: Boolean, required: true }, // musicsRules: { type: Boolean, required: true },
// workRules: { type: Boolean, required: true }, // workRules: { type: Boolean, required: true },
qualificationRules: { type: Boolean, required: true }, // qualificationRules: { type: Boolean, required: true },
artistLevelRules: { type: Boolean, required: true }, artistLevelRules: { type: Boolean, required: true },
errorMessPhoneNumber: { type: String, required: true }, // errorMessPhoneNumber: { type: String, required: true },
errorMessEmail: { type: String, required: true }, // errorMessEmail: { type: String, required: true },
errorMessmnBookingPhone: { type: String, required: true }, // errorMessmnBookingPhone: { type: String, required: true },
errorMessmnBookingEmail: { type: String, required: true }, // errorMessmnBookingEmail: { type: String, required: true },
mnBookingEmailRules: { type: Boolean, required: true }, // mnBookingEmailRules: { type: Boolean, required: true },
mnBookingPhoneRules: { type: Boolean, required: true }, // mnBookingPhoneRules: { type: Boolean, required: true },
// options: { type: String, required: true }, // options: { type: String, required: true },
provinceOptions: {type: Array, provinceOptions: {type: Array,
...@@ -851,31 +864,31 @@ export default defineComponent({ ...@@ -851,31 +864,31 @@ export default defineComponent({
const errorMessFullName = i18n.global.t( const errorMessFullName = i18n.global.t(
'artist.artistInformation.validateMessages.requireFullName' 'artist.artistInformation.validateMessages.requireFullName'
); );
const errorMessArtistName = i18n.global.t( // const errorMessArtistName = i18n.global.t(
'artist.artistInformation.validateMessages.requireArtistName' // 'artist.artistInformation.validateMessages.requireArtistName'
); // );
const errorMessBirthday = i18n.global.t( // const errorMessBirthday = i18n.global.t(
'artist.artistInformation.validateMessages.requireBirthday' // 'artist.artistInformation.validateMessages.requireBirthday'
); // );
const errorMessSex = i18n.global.t( // const errorMessSex = i18n.global.t(
'artist.artistInformation.validateMessages.requireSex' // 'artist.artistInformation.validateMessages.requireSex'
); // );
const errorMessNationality = i18n.global.t( // const errorMessNationality = i18n.global.t(
'artist.artistInformation.validateMessages.requireNationality' // 'artist.artistInformation.validateMessages.requireNationality'
); // );
const errorMessAddress = i18n.global.t( // const errorMessAddress = i18n.global.t(
'artist.artistInformation.validateMessages.requireAddress' // 'artist.artistInformation.validateMessages.requireAddress'
); // );
const errorMessFields = i18n.global.t( // const errorMessFields = i18n.global.t(
'artist.artistInformation.validateMessages.requireField' // 'artist.artistInformation.validateMessages.requireField'
); // );
const errorMessWorks = i18n.global.t( const errorMessWorks = i18n.global.t(
'artist.artistInformation.validateMessages.requiredWork' 'artist.artistInformation.validateMessages.requiredWork'
); );
const errorMessQualification = i18n.global.t( // const errorMessQualification = i18n.global.t(
'artist.artistInformation.validateMessages.requireQualification' // 'artist.artistInformation.validateMessages.requireQualification'
); // );
const errorMessArtistLevel = i18n.global.t( const errorMessArtistLevel = i18n.global.t(
'artist.artistInformation.validateMessages.requireArtistLevel' 'artist.artistInformation.validateMessages.requireArtistLevel'
); );
...@@ -898,15 +911,15 @@ export default defineComponent({ ...@@ -898,15 +911,15 @@ export default defineComponent({
errorMessArtistCode, errorMessArtistCode,
errorMessFullName, errorMessFullName,
errorMessAccount, errorMessAccount,
errorMessArtistName, // errorMessArtistName,
errorMessBirthday, // errorMessBirthday,
errorMessSex, // errorMessSex,
errorMessNationality, // errorMessNationality,
errorMessAddress, // errorMessAddress,
errorMessFields, // errorMessFields,
errorMessWorks, errorMessWorks,
errorMessQualification, // errorMessQualification,
errorMessArtistLevel, errorMessArtistLevel,
provinceOptions1, provinceOptions1,
options, options,
......
...@@ -461,7 +461,7 @@ export default defineComponent({ ...@@ -461,7 +461,7 @@ export default defineComponent({
bodyFormData.append('file', file); bodyFormData.append('file', file);
const response = (await api({ const response = (await api({
headers: { 'Content-Type': 'multipart/form-data' }, headers: { 'Content-Type': 'multipart/form-data' },
url: 'http://cms.vab.xteldev.com/file/upload/', url: 'https://cms.vab.xteldev.com/file/upload/',
method: 'POST', method: 'POST',
data: bodyFormData, data: bodyFormData,
})) as AxiosResponse<BaseResponseBody<FileUploadType>>; })) as AxiosResponse<BaseResponseBody<FileUploadType>>;
......
...@@ -400,7 +400,7 @@ export default defineComponent({ ...@@ -400,7 +400,7 @@ export default defineComponent({
bodyFormData.append('file', file); bodyFormData.append('file', file);
const response = (await api({ const response = (await api({
headers: { 'Content-Type': 'multipart/form-data' }, headers: { 'Content-Type': 'multipart/form-data' },
url: 'http://cms.vab.xteldev.com/file/upload/', url: 'https://cms.vab.xteldev.com/file/upload/',
method: 'POST', method: 'POST',
data: bodyFormData, data: bodyFormData,
})) as AxiosResponse<BaseResponseBody<FileUploadType>>; })) as AxiosResponse<BaseResponseBody<FileUploadType>>;
......
...@@ -408,7 +408,7 @@ export default defineComponent({ ...@@ -408,7 +408,7 @@ export default defineComponent({
bodyFormData.append('file', file); bodyFormData.append('file', file);
const response = (await api({ const response = (await api({
headers: { 'Content-Type': 'multipart/form-data' }, headers: { 'Content-Type': 'multipart/form-data' },
url: 'http://cms.vab.xteldev.com/file/upload/', url: 'https://cms.vab.xteldev.com/file/upload/',
method: 'POST', method: 'POST',
data: bodyFormData, data: bodyFormData,
})) as AxiosResponse<BaseResponseBody<FileUploadType>>; })) as AxiosResponse<BaseResponseBody<FileUploadType>>;
......
...@@ -468,7 +468,7 @@ export default defineComponent({ ...@@ -468,7 +468,7 @@ export default defineComponent({
bodyFormData.append('file', file); bodyFormData.append('file', file);
const response = (await api({ const response = (await api({
headers: { 'Content-Type': 'multipart/form-data' }, headers: { 'Content-Type': 'multipart/form-data' },
url: 'http://cms.vab.xteldev.com/file/upload/', url: 'https://cms.vab.xteldev.com/file/upload/',
method: 'POST', method: 'POST',
data: bodyFormData, data: bodyFormData,
})) as AxiosResponse<BaseResponseBody<FileUploadType>>; })) as AxiosResponse<BaseResponseBody<FileUploadType>>;
......
...@@ -413,7 +413,7 @@ export default defineComponent({ ...@@ -413,7 +413,7 @@ export default defineComponent({
bodyFormData.append('file', file); bodyFormData.append('file', file);
const response = (await api({ const response = (await api({
headers: { 'Content-Type': 'multipart/form-data' }, headers: { 'Content-Type': 'multipart/form-data' },
url: 'http://cms.vab.xteldev.com/file/upload/', url: 'https://cms.vab.xteldev.com/file/upload/',
method: 'POST', method: 'POST',
data: bodyFormData, data: bodyFormData,
})) as AxiosResponse<BaseResponseBody<FileUploadType>>; })) as AxiosResponse<BaseResponseBody<FileUploadType>>;
......
...@@ -130,7 +130,7 @@ export default defineComponent({ ...@@ -130,7 +130,7 @@ export default defineComponent({
const facebookMessage: Ref<string | null | undefined> = ref(); const facebookMessage: Ref<string | null | undefined> = ref();
const instagram: Ref<string | null | undefined> = ref(); const instagram: Ref<string | null | undefined> = ref();
const whatsapp: Ref<string | null | undefined> = ref(); const whatsapp: Ref<string | null | undefined> = ref();
const hidden_img = ref(false); // const hidden_img = ref(false);
// state sử dụng trong tab vab account // state sử dụng trong tab vab account
const banners: Ref<BannerType[]> = ref([]); const banners: Ref<BannerType[]> = ref([]);
...@@ -155,46 +155,46 @@ export default defineComponent({ ...@@ -155,46 +155,46 @@ export default defineComponent({
const check_infoBooking = ref(false); const check_infoBooking = ref(false);
const artistCodeRules = ref(false); const artistCodeRules = ref(false);
const fullNameRules = ref(false); const fullNameRules = ref(false);
const artistNameRules = ref(false); // const artistNameRules = ref(false);
const birthdayRules = ref(false); // const birthdayRules = ref(false);
const emailRules = ref(false); // const emailRules = ref(false);
const addressRules = ref(false); // const addressRules = ref(false);
const phoneNumberRules = ref(false); // const phoneNumberRules = ref(false);
const mnBookingEmailRules = ref(false); // const mnBookingEmailRules = ref(false);
const mnBookingPhoneRules = ref(false); // const mnBookingPhoneRules = ref(false);
const sexRules = ref(false); // const sexRules = ref(false);
const nationalityRules = ref(false); // const nationalityRules = ref(false);
const fieldRules = ref(false); // const fieldRules = ref(false);
// const workRules = ref(false); // const workRules = ref(false);
const musicRules = ref(false); // const musicRules = ref(false);
const qualificationRules = ref(false); // const qualificationRules = ref(false);
const artistLevelRules = ref(false); // const artistLevelRules = ref(false);
const accountRules=ref(false) const accountRules=ref(false)
const errorMessEmail = ref( // const errorMessEmail = ref(
i18n.global.t('artist.artistInformation.validateMessages.requireEmail') // i18n.global.t('artist.artistInformation.validateMessages.requireEmail')
); // );
const errorMessPhoneNumber = ref( // const errorMessPhoneNumber = ref(
i18n.global.t( // i18n.global.t(
'artist.artistInformation.validateMessages.requirePhoneNumber' // 'artist.artistInformation.validateMessages.requirePhoneNumber'
) // )
); // );
const errorMessmnBookingEmail = ref( // const errorMessmnBookingEmail = ref(
i18n.global.t( // i18n.global.t(
'artist.artistInformation.validateMessages.requireEmailAdminister' // 'artist.artistInformation.validateMessages.requireEmailAdminister'
) // )
); // );
const errorMessAddress = ref(i18n.global.t('artist.artistInformation.validateMessages.requireAddress')) // const errorMessAddress = ref(i18n.global.t('artist.artistInformation.validateMessages.requireAddress'))
const errorMessAccount = ref( const errorMessAccount = ref(
i18n.global.t( i18n.global.t(
'artist.artistInformation.validateMessages.requireAccount') 'artist.artistInformation.validateMessages.requireAccount')
); );
const errorMessmnBookingPhone = ref( // const errorMessmnBookingPhone = ref(
i18n.global.t( // i18n.global.t(
'artist.artistInformation.validateMessages.requirePhoneNumberAdminister' // 'artist.artistInformation.validateMessages.requirePhoneNumberAdminister'
) // )
); // );
watch( watch(
() => fields.value, () => fields.value,
(value) => { (value) => {
...@@ -231,86 +231,86 @@ export default defineComponent({ ...@@ -231,86 +231,86 @@ export default defineComponent({
} }
} }
); );
watch( // watch(
() => artistName.value, // () => artistName.value,
(value) => { // (value) => {
if (value) { // if (value) {
artistNameRules.value = false; // artistNameRules.value = false;
} // }
} // }
); // );
watch( // watch(
() => birthday.value, // () => birthday.value,
(value) => { // (value) => {
if (value) { // if (value) {
birthdayRules.value = false; // birthdayRules.value = false;
} // }
} // }
); // );
watch( // watch(
() => email.value, // () => email.value,
(value) => { // (value) => {
if (value) { // if (value) {
emailRules.value = false; // emailRules.value = false;
} // }
} // }
); // );
watch( // watch(
() => address.value, // () => address.value,
(value) => { // (value) => {
if (value) { // if (value) {
addressRules.value = false; // addressRules.value = false;
} // }
} // }
); // );
watch( // watch(
() => phoneNumber.value, // () => phoneNumber.value,
(value) => { // (value) => {
if (value) { // if (value) {
phoneNumberRules.value = false; // phoneNumberRules.value = false;
} // }
} // }
); // );
watch( // watch(
() => mnBookingPhone.value, // () => mnBookingPhone.value,
(value) => { // (value) => {
if (value) { // if (value) {
mnBookingPhoneRules.value = false; // mnBookingPhoneRules.value = false;
} // }
} // }
); // );
watch( // watch(
() => mnBookingEmail.value, // () => mnBookingEmail.value,
(value) => { // (value) => {
if (value) { // if (value) {
mnBookingEmailRules.value = false; // mnBookingEmailRules.value = false;
} // }
} // }
); // );
watch( // watch(
() => sex.value, // () => sex.value,
(value) => { // (value) => {
if (value) { // if (value) {
sexRules.value = false; // sexRules.value = false;
} // }
} // }
); // );
watch( // watch(
() => nationality.value, // () => nationality.value,
(value) => { // (value) => {
if (value) { // if (value) {
nationalityRules.value = false; // nationalityRules.value = false;
} // }
} // }
); // );
watch( // watch(
() => fields.value, // () => fields.value,
(value) => { // (value) => {
if (value) { // if (value) {
fieldRules.value = false; // fieldRules.value = false;
} // }
} // }
); // );
// watch( // watch(
// () => works.value, // () => works.value,
// (value) => { // (value) => {
...@@ -319,22 +319,22 @@ export default defineComponent({ ...@@ -319,22 +319,22 @@ export default defineComponent({
// } // }
// } // }
// ); // );
watch( // watch(
() => musics.value, // () => musics.value,
(value) => { // (value) => {
if(value) { // if(value) {
musicRules.value = false; // musicRules.value = false;
} // }
} // }
); // );
watch( // watch(
() => qualification.value, // () => qualification.value,
(value) => { // (value) => {
if (value) { // if (value) {
qualificationRules.value = false; // qualificationRules.value = false;
} // }
} // }
); // );
// watch( // watch(
// () => artistLevel.value, // () => artistLevel.value,
// (value) => { // (value) => {
...@@ -674,10 +674,10 @@ export default defineComponent({ ...@@ -674,10 +674,10 @@ export default defineComponent({
}; };
const checkValidate = () => { const checkValidate = () => {
let hasError = false; let hasError = false;
if (!avatarFile.value) { // if (!avatarFile.value) {
hasError = true; // hasError = true;
hidden_img.value = true; // hidden_img.value = true;
} // }
if (!artistCode.value || !artistCode.value?.trim().length) { if (!artistCode.value || !artistCode.value?.trim().length) {
hasError = true; hasError = true;
artistCodeRules.value = true; artistCodeRules.value = true;
...@@ -686,76 +686,76 @@ export default defineComponent({ ...@@ -686,76 +686,76 @@ export default defineComponent({
hasError = true; hasError = true;
fullNameRules.value = true; fullNameRules.value = true;
} }
if (!artistName.value || !artistName.value?.trim().length) { // if (!artistName.value || !artistName.value?.trim().length) {
hasError = true; // hasError = true;
artistNameRules.value = true; // artistNameRules.value = true;
} // }
if (!birthday.value || !birthday.value?.trim().length) { // if (!birthday.value || !birthday.value?.trim().length) {
hasError = true; // hasError = true;
birthdayRules.value = true; // birthdayRules.value = true;
} // }
if (sex.value === null) { // if (sex.value === null) {
hasError = true; // hasError = true;
sexRules.value = true; // sexRules.value = true;
} // }
if (!phoneNumber.value || !phoneNumber.value?.trim().length) { // if (!phoneNumber.value || !phoneNumber.value?.trim().length) {
hasError = true; // hasError = true;
phoneNumberRules.value = true; // phoneNumberRules.value = true;
errorMessPhoneNumber.value = i18n.global.t( // errorMessPhoneNumber.value = i18n.global.t(
'artist.artistInformation.validateMessages.requirePhoneNumber' // 'artist.artistInformation.validateMessages.requirePhoneNumber'
); // );
} // }
if (!email.value || !email.value?.trim().length) { // if (!email.value || !email.value?.trim().length) {
hasError = true; // hasError = true;
emailRules.value = true; // emailRules.value = true;
errorMessEmail.value = i18n.global.t( // errorMessEmail.value = i18n.global.t(
'artist.artistInformation.validateMessages.requireEmail' // 'artist.artistInformation.validateMessages.requireEmail'
); // );
} // }
if ( // if (
(!mnBookingPhone.value || !mnBookingPhone.value?.trim().length) && // (!mnBookingPhone.value || !mnBookingPhone.value?.trim().length) &&
check_infoBooking.value // check_infoBooking.value
) { // ) {
hasError = true; // hasError = true;
mnBookingPhoneRules.value = true; // mnBookingPhoneRules.value = true;
errorMessmnBookingPhone.value = i18n.global.t( // errorMessmnBookingPhone.value = i18n.global.t(
'artist.artistInformation.validateMessages.requirePhoneNumberAdminister' // 'artist.artistInformation.validateMessages.requirePhoneNumberAdminister'
); // );
} // }
if ( // if (
(!mnBookingEmail.value || !mnBookingEmail.value?.trim().length) && // (!mnBookingEmail.value || !mnBookingEmail.value?.trim().length) &&
check_infoBooking.value // check_infoBooking.value
) { // ) {
hasError = true; // hasError = true;
mnBookingEmailRules.value = true; // mnBookingEmailRules.value = true;
errorMessmnBookingEmail.value = i18n.global.t( // errorMessmnBookingEmail.value = i18n.global.t(
'artist.artistInformation.validateMessages.requireEmailAdminister' // 'artist.artistInformation.validateMessages.requireEmailAdminister'
); // );
} // }
if (!fields.value) { // if (!fields.value) {
hasError = true; // hasError = true;
fieldRules.value = true; // fieldRules.value = true;
} // }
if(!account.value){ if(!account.value){
hasError = true; hasError = true;
accountRules.value = true; accountRules.value = true;
} }
if(!address.value){ // if(!address.value){
hasError = true; // hasError = true;
addressRules.value = true // addressRules.value = true
} // }
if (nationality.value === null) { // if (nationality.value === null) {
hasError = true; // hasError = true;
nationalityRules.value = true; // nationalityRules.value = true;
} // }
if (qualification.value === null) { // if (qualification.value === null) {
hasError = true; // hasError = true;
qualificationRules.value = true; // qualificationRules.value = true;
} // }
// if (!works.value.length) { // if (!works.value.length) {
// hasError = true; // hasError = true;
// workRules.value = true; // workRules.value = true;
...@@ -816,7 +816,7 @@ export default defineComponent({ ...@@ -816,7 +816,7 @@ export default defineComponent({
artistCode: artistCode.value, artistCode: artistCode.value,
artistName: artistName.value, artistName: artistName.value,
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands // eslint-disable-next-line @typescript-eslint/restrict-plus-operands
birthday: birthday.value + ' 00:00:00', birthday: birthday.value === null ? '' : birthday.value + ' 00:00:00',
sex: sex.value, sex: sex.value,
provinceDto: address.value, provinceDto: address.value,
address: null, address: null,
...@@ -896,7 +896,7 @@ export default defineComponent({ ...@@ -896,7 +896,7 @@ export default defineComponent({
}); });
return { return {
hidden_img, // hidden_img,
tab, tab,
id, id,
route, route,
...@@ -928,10 +928,10 @@ export default defineComponent({ ...@@ -928,10 +928,10 @@ export default defineComponent({
mnFbmess, mnFbmess,
mnIns, mnIns,
mnWhatsapp, mnWhatsapp,
mnBookingPhoneRules, // mnBookingPhoneRules,
errorMessmnBookingPhone, // errorMessmnBookingPhone,
mnBookingEmailRules, // mnBookingEmailRules,
errorMessmnBookingEmail, // errorMessmnBookingEmail,
socialEmbedded, socialEmbedded,
sexOptions, sexOptions,
fieldOptions, fieldOptions,
...@@ -995,24 +995,24 @@ export default defineComponent({ ...@@ -995,24 +995,24 @@ export default defineComponent({
checkValidate, checkValidate,
artistCodeRules, artistCodeRules,
fullNameRules, fullNameRules,
artistNameRules, // artistNameRules,
birthdayRules, // birthdayRules,
emailRules, // emailRules,
// addressRules, // addressRules,
phoneNumberRules, // phoneNumberRules,
sexRules, // sexRules,
nationalityRules, // nationalityRules,
fieldRules, // fieldRules,
// workRules, // workRules,
musicRules, // musicRules,
qualificationRules, // qualificationRules,
artistLevelRules, // artistLevelRules,
errorMessEmail, // errorMessEmail,
accountRules, accountRules,
addressRules, // addressRules,
errorMessPhoneNumber, // errorMessPhoneNumber,
errorMessAccount, errorMessAccount,
errorMessAddress, // errorMessAddress,
confirmChangeIsDefault, confirmChangeIsDefault,
favoriteScore, favoriteScore,
check_infoBooking, check_infoBooking,
......
...@@ -67,23 +67,20 @@ ...@@ -67,23 +67,20 @@
v-model:account="account" v-model:account="account"
:accountRules="accountRules" :accountRules="accountRules"
:addressRules="addressRules" :addressRules="addressRules"
:errorMessmnBookingPhone="errorMessmnBookingPhone"
:errorMessmnBookingEmail="errorMessmnBookingEmail" :errorMessmnBookingEmail="errorMessmnBookingEmail"
:mnBookingEmailRules="mnBookingEmailRules"
:mnBookingPhoneRules="mnBookingPhoneRules"
:errorMessPhoneNumber="errorMessPhoneNumber"
:errorMessEmail="errorMessEmail"
:artistCodeRules="artistCodeRules" :artistCodeRules="artistCodeRules"
:fullNameRules="fullNameRules" :fullNameRules="fullNameRules"
:artistNameRules="artistNameRules"
:birthdayRules="birthdayRules"
:emailRules="emailRules"
:phoneNumberRules="phoneNumberRules"
:sexRules="sexRules"
:nationalityRules="nationalityRules"
:fieldRules="fieldRules"
:qualificationRules="qualificationRules"
:artistLevelRules="artistLevelRules" :artistLevelRules="artistLevelRules"
:sex-options="sexOptions" :sex-options="sexOptions"
:field-options="fieldOptions" :field-options="fieldOptions"
...@@ -99,6 +96,20 @@ ...@@ -99,6 +96,20 @@
></PersonalInformation> ></PersonalInformation>
<!-- :addressRules="addressRules" --> <!-- :addressRules="addressRules" -->
<!-- :artistNameRules="artistNameRules" -->
<!-- :birthdayRules="birthdayRules" -->
<!-- :emailRules="emailRules" -->
<!-- :phoneNumberRules="phoneNumberRules" -->
<!-- :sexRules="sexRules" -->
<!-- :nationalityRules="nationalityRules" -->
<!-- :qualificationRules="qualificationRules" -->
<!-- :fieldRules="fieldRules" -->
<!-- :errorMessPhoneNumber="errorMessPhoneNumber" -->
<!-- :errorMessEmail="errorMessEmail" -->
<!-- :errorMessmnBookingPhone="errorMessmnBookingPhone" -->
<!-- :mnBookingEmailRules="mnBookingEmailRules" -->
<!-- :mnBookingPhoneRules="mnBookingPhoneRules" -->
</q-tab-panel> </q-tab-panel>
<q-tab-panel name="vabAccount"> <q-tab-panel name="vabAccount">
<VabAccount <VabAccount
......
...@@ -284,7 +284,7 @@ export default defineComponent({ ...@@ -284,7 +284,7 @@ export default defineComponent({
bodyFormData.append('file', file); bodyFormData.append('file', file);
const response = (await api({ const response = (await api({
headers: { 'Content-Type': 'multipart/form-data' }, headers: { 'Content-Type': 'multipart/form-data' },
url: 'http://cms.vab.xteldev.com/file/upload/', url: 'https://cms.vab.xteldev.com/file/upload/',
method: 'POST', method: 'POST',
data: bodyFormData, data: bodyFormData,
})) as AxiosResponse<BaseResponseBody<FileUploadType>>; })) as AxiosResponse<BaseResponseBody<FileUploadType>>;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment