update

parent 278b25d3
...@@ -881,9 +881,9 @@ export default defineComponent({ ...@@ -881,9 +881,9 @@ 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'
// ); // );
...@@ -928,7 +928,7 @@ export default defineComponent({ ...@@ -928,7 +928,7 @@ export default defineComponent({
// errorMessArtistCode, // errorMessArtistCode,
errorMessFullName, errorMessFullName,
errorMessAccount, errorMessAccount,
// errorMessArtistName, errorMessArtistName,
// errorMessBirthday, // errorMessBirthday,
// errorMessSex, // errorMessSex,
// errorMessNationality, // errorMessNationality,
......
...@@ -55,7 +55,7 @@ export default defineComponent({ ...@@ -55,7 +55,7 @@ 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 },
......
...@@ -144,14 +144,17 @@ ...@@ -144,14 +144,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.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-message="errorMessArtistName" -->
<!-- :error="artistNameRules" --> <!-- :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-message="errorMessArtistName"
:error="artistNameRules"
class="q-my-sm" class="q-my-sm"
outlined outlined
dense dense
...@@ -260,10 +263,11 @@ ...@@ -260,10 +263,11 @@
<!-- {{address}} --> <!-- {{address}} -->
<!-- :error="addressRules" <!-- :error="addressRules"
:error-message="errorMessAddress" --> :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)"
:options="provinceOptions1" :options="filteredProvinceOptions"
option-value="fullName" option-value="fullName"
option-label="fullName" option-label="fullName"
type="text" type="text"
...@@ -764,7 +768,7 @@ export default defineComponent({ ...@@ -764,7 +768,7 @@ 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 },
...@@ -832,7 +836,9 @@ export default defineComponent({ ...@@ -832,7 +836,9 @@ export default defineComponent({
fetch(urlCrop.value) fetch(urlCrop.value)
.then((res) => res.blob()) .then((res) => res.blob())
.then((blob) => { .then((blob) => {
const file = new File([blob], 'file-1678935701090.jpg', { type: blob.type }); const file = new File([blob], 'file-1678935701090.jpg', {
type: blob.type,
});
fileCrop.value = file; fileCrop.value = file;
}); });
}; };
...@@ -846,6 +852,7 @@ export default defineComponent({ ...@@ -846,6 +852,7 @@ export default defineComponent({
}; };
const provinceOptions1: Ref<ProvinceType[]> = ref([]); const provinceOptions1: Ref<ProvinceType[]> = ref([]);
const filteredProvinceOptions: Ref<ProvinceType[]> = ref([]);
const getProvinceOptions = async () => { const getProvinceOptions = async () => {
const response = (await api({ const response = (await api({
...@@ -858,19 +865,19 @@ export default defineComponent({ ...@@ -858,19 +865,19 @@ export default defineComponent({
} }
}; };
const options = ref(provinceOptions1);
const filterFn = (val: string, update: (fn: () => void) => void) => { const filterFn = (val: string, update: (fn: () => void) => void) => {
if (!val) { if (!val) {
update(() => { update(() => {
options.value = [...provinceOptions1.value]; filteredProvinceOptions.value = provinceOptions1.value;
}); });
return; return;
} else { } else {
update(() => { update(() => {
const needle = val.toLowerCase(); const needle = val.toLowerCase();
options.value = provinceOptions1.value.filter( filteredProvinceOptions.value = provinceOptions1.value.filter(
(v: { name: string }) => v.name.toLowerCase().indexOf(needle) > 1 (option) => {
return option.name.toLowerCase().includes(needle);
}
); );
}); });
} }
...@@ -911,9 +918,9 @@ export default defineComponent({ ...@@ -911,9 +918,9 @@ 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'
// ); // );
...@@ -965,7 +972,7 @@ export default defineComponent({ ...@@ -965,7 +972,7 @@ export default defineComponent({
// errorMessArtistCode, // errorMessArtistCode,
errorMessFullName, errorMessFullName,
errorMessAccount, errorMessAccount,
// errorMessArtistName, errorMessArtistName,
// errorMessBirthday, // errorMessBirthday,
// errorMessSex, // errorMessSex,
// errorMessNationality, // errorMessNationality,
...@@ -976,7 +983,7 @@ export default defineComponent({ ...@@ -976,7 +983,7 @@ export default defineComponent({
// errorMessQualification, // errorMessQualification,
errorMessArtistLevel, errorMessArtistLevel,
provinceOptions1, provinceOptions1,
options, filteredProvinceOptions,
// filterArrayOrganizational, // filterArrayOrganizational,
getProvinceOptions, getProvinceOptions,
......
...@@ -155,7 +155,7 @@ export default defineComponent({ ...@@ -155,7 +155,7 @@ 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);
...@@ -230,14 +230,14 @@ export default defineComponent({ ...@@ -230,14 +230,14 @@ 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) => {
...@@ -682,10 +682,10 @@ export default defineComponent({ ...@@ -682,10 +682,10 @@ 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;
...@@ -985,7 +985,7 @@ export default defineComponent({ ...@@ -985,7 +985,7 @@ export default defineComponent({
checkValidate, checkValidate,
// artistCodeRules, // artistCodeRules,
fullNameRules, fullNameRules,
// artistNameRules, artistNameRules,
// birthdayRules, // birthdayRules,
// emailRules, // emailRules,
// addressRules, // addressRules,
......
...@@ -92,6 +92,7 @@ ...@@ -92,6 +92,7 @@
@SetAvatar="setAvatar($event)" @SetAvatar="setAvatar($event)"
@deleteAvatar="deleteAvatar" @deleteAvatar="deleteAvatar"
@UpdateBirtday="UpdateBirtday($event)" @UpdateBirtday="UpdateBirtday($event)"
:artistNameRules="artistNameRules"
></PersonalInformation> ></PersonalInformation>
<!-- :addressRules="addressRules" --> <!-- :addressRules="addressRules" -->
......
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