update

parent e686e7b7
...@@ -156,39 +156,39 @@ export default defineComponent({ ...@@ -156,39 +156,39 @@ 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 qualificationRules = ref(false); // const qualificationRules = ref(false);
const artistLevelRules = ref(false); // const artistLevelRules = ref(false);
const musicRules = ref(false); // const musicRules = 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 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) => {
...@@ -205,14 +205,14 @@ export default defineComponent({ ...@@ -205,14 +205,14 @@ export default defineComponent({
} }
} }
); );
watch( // watch(
() => musics.value, // () => musics.value,
(value) => { // (value) => {
if(value) { // if(value) {
musicRules.value = false; // musicRules.value = false;
} // }
} // }
); // );
watch( watch(
() => artistCode.value, () => artistCode.value,
(value) => { (value) => {
...@@ -229,38 +229,38 @@ export default defineComponent({ ...@@ -229,38 +229,38 @@ 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(
() => account.value, () => account.value,
(value) => { (value) => {
...@@ -269,54 +269,54 @@ export default defineComponent({ ...@@ -269,54 +269,54 @@ export default defineComponent({
} }
} }
); );
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) => {
...@@ -325,22 +325,22 @@ export default defineComponent({ ...@@ -325,22 +325,22 @@ export default defineComponent({
// } // }
// } // }
// ); // );
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) => {
if (value) { // if (value) {
artistLevelRules.value = false; // artistLevelRules.value = false;
} // }
} // }
); // );
const getInformationArtist = async () => { const getInformationArtist = async () => {
const response = (await api({ const response = (await api({
...@@ -362,7 +362,7 @@ export default defineComponent({ ...@@ -362,7 +362,7 @@ export default defineComponent({
artistCode.value = ArtistInformation.artistCode; artistCode.value = ArtistInformation.artistCode;
fullName.value = ArtistInformation.fullName; fullName.value = ArtistInformation.fullName;
artistName.value = ArtistInformation.artistName; artistName.value = ArtistInformation.artistName;
birthday.value = moment( birthday.value = birthday.value === null ? null : moment(
ArtistInformation.birthday, ArtistInformation.birthday,
'DD/MM/YYYY HH:mm:ss' 'DD/MM/YYYY HH:mm:ss'
).format('DD/MM/YYYY'); ).format('DD/MM/YYYY');
...@@ -743,10 +743,10 @@ export default defineComponent({ ...@@ -743,10 +743,10 @@ export default defineComponent({
const checkValidate = () => { const checkValidate = () => {
let hasError = false; let hasError = false;
if (!avatar.value && !avatarFile.value) { // if (!avatar.value && !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;
...@@ -755,78 +755,78 @@ export default defineComponent({ ...@@ -755,78 +755,78 @@ 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 (!address.value || !address.value.trim().length) { // if (!address.value || !address.value.trim().length) {
// hasError = true; // hasError = true;
// addressRules.value = true; // addressRules.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 (!account.value === null) { if (!account.value === null) {
hasError = true; hasError = true;
accountRules.value = true; accountRules.value = true;
} }
if(!address.value === null){ // if(!address.value === null){
hasError = true; // hasError = true;
addressRules.value = true // addressRules.value = true
} // }
if (!fields.value) { // if (!fields.value) {
hasError = true; // hasError = true;
fieldRules.value = true; // fieldRules.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;
...@@ -899,7 +899,7 @@ export default defineComponent({ ...@@ -899,7 +899,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 ? null : birthday.value + ' 00:00:00',
sex: sex.value, sex: sex.value,
provinceDto: address.value, provinceDto: address.value,
address: null, address: null,
...@@ -1068,30 +1068,30 @@ export default defineComponent({ ...@@ -1068,30 +1068,30 @@ 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,
qualificationRules, // qualificationRules,
artistLevelRules, // artistLevelRules,
accountRules, // accountRules,
errorMessEmail, // errorMessEmail,
errorMessPhoneNumber, // errorMessPhoneNumber,
confirmChangeIsDefault, confirmChangeIsDefault,
mnBookingPhone, mnBookingPhone,
mnBookingEmail, mnBookingEmail,
mnFbmess, mnFbmess,
mnIns, mnIns,
mnWhatsapp, mnWhatsapp,
mnBookingPhoneRules, // mnBookingPhoneRules,
errorMessmnBookingPhone, // errorMessmnBookingPhone,
mnBookingEmailRules, // mnBookingEmailRules,
errorMessmnBookingEmail, // errorMessmnBookingEmail,
favoriteScore, favoriteScore,
provinceOptions, provinceOptions,
check_infoBooking, check_infoBooking,
......
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