update

parent e686e7b7
......@@ -156,39 +156,39 @@ export default defineComponent({
const check_infoBooking = ref(false);
const artistCodeRules = ref(false);
const fullNameRules = ref(false);
const artistNameRules = ref(false);
const birthdayRules = ref(false);
const emailRules = ref(false);
const addressRules = ref(false);
const phoneNumberRules = ref(false);
const mnBookingEmailRules = ref(false);
const mnBookingPhoneRules = ref(false);
const sexRules = ref(false);
const nationalityRules = ref(false);
const fieldRules = ref(false);
const workRules = ref(false);
const qualificationRules = ref(false);
const artistLevelRules = ref(false);
const musicRules = ref(false);
// const artistNameRules = ref(false);
// const birthdayRules = ref(false);
// const emailRules = ref(false);
// const addressRules = ref(false);
// const phoneNumberRules = ref(false);
// const mnBookingEmailRules = ref(false);
// const mnBookingPhoneRules = ref(false);
// const sexRules = ref(false);
// const nationalityRules = ref(false);
// const fieldRules = ref(false);
// const workRules = ref(false);
// const qualificationRules = ref(false);
// const artistLevelRules = ref(false);
// const musicRules = ref(false);
const accountRules = ref(false);
const errorMessEmail = ref(
i18n.global.t('artist.artistInformation.validateMessages.requireEmail')
);
const errorMessPhoneNumber = ref(
i18n.global.t(
'artist.artistInformation.validateMessages.requirePhoneNumber'
)
);
const errorMessmnBookingEmail = ref(
i18n.global.t(
'artist.artistInformation.validateMessages.requireEmailAdminister'
)
);
const errorMessmnBookingPhone = ref(
i18n.global.t(
'artist.artistInformation.validateMessages.requirePhoneNumberAdminister'
)
);
// const errorMessEmail = ref(
// i18n.global.t('artist.artistInformation.validateMessages.requireEmail')
// );
// const errorMessPhoneNumber = ref(
// i18n.global.t(
// 'artist.artistInformation.validateMessages.requirePhoneNumber'
// )
// );
// const errorMessmnBookingEmail = ref(
// i18n.global.t(
// 'artist.artistInformation.validateMessages.requireEmailAdminister'
// )
// );
// const errorMessmnBookingPhone = ref(
// i18n.global.t(
// 'artist.artistInformation.validateMessages.requirePhoneNumberAdminister'
// )
// );
watch(
() => fields.value,
(value) => {
......@@ -205,14 +205,14 @@ export default defineComponent({
}
}
);
watch(
() => musics.value,
(value) => {
if(value) {
musicRules.value = false;
}
}
);
// watch(
// () => musics.value,
// (value) => {
// if(value) {
// musicRules.value = false;
// }
// }
// );
watch(
() => artistCode.value,
(value) => {
......@@ -229,38 +229,38 @@ export default defineComponent({
}
}
);
watch(
() => artistName.value,
(value) => {
if (value) {
artistNameRules.value = false;
}
}
);
watch(
() => birthday.value,
(value) => {
if (value) {
birthdayRules.value = false;
}
}
);
watch(
() => email.value,
(value) => {
if (value) {
emailRules.value = false;
}
}
);
watch(
() => address.value,
(value) => {
if (value) {
addressRules.value = false;
}
}
);
// watch(
// () => artistName.value,
// (value) => {
// if (value) {
// artistNameRules.value = false;
// }
// }
// );
// watch(
// () => birthday.value,
// (value) => {
// if (value) {
// birthdayRules.value = false;
// }
// }
// );
// watch(
// () => email.value,
// (value) => {
// if (value) {
// emailRules.value = false;
// }
// }
// );
// watch(
// () => address.value,
// (value) => {
// if (value) {
// addressRules.value = false;
// }
// }
// );
watch(
() => account.value,
(value) => {
......@@ -269,54 +269,54 @@ export default defineComponent({
}
}
);
watch(
() => phoneNumber.value,
(value) => {
if (value) {
phoneNumberRules.value = false;
}
}
);
watch(
() => mnBookingPhone.value,
(value) => {
if (value) {
mnBookingPhoneRules.value = false;
}
}
);
watch(
() => mnBookingEmail.value,
(value) => {
if (value) {
mnBookingEmailRules.value = false;
}
}
);
watch(
() => sex.value,
(value) => {
if (value) {
sexRules.value = false;
}
}
);
watch(
() => nationality.value,
(value) => {
if (value) {
nationalityRules.value = false;
}
}
);
watch(
() => fields.value,
(value) => {
if (value) {
fieldRules.value = false;
}
}
);
// watch(
// () => phoneNumber.value,
// (value) => {
// if (value) {
// phoneNumberRules.value = false;
// }
// }
// );
// watch(
// () => mnBookingPhone.value,
// (value) => {
// if (value) {
// mnBookingPhoneRules.value = false;
// }
// }
// );
// watch(
// () => mnBookingEmail.value,
// (value) => {
// if (value) {
// mnBookingEmailRules.value = false;
// }
// }
// );
// watch(
// () => sex.value,
// (value) => {
// if (value) {
// sexRules.value = false;
// }
// }
// );
// watch(
// () => nationality.value,
// (value) => {
// if (value) {
// nationalityRules.value = false;
// }
// }
// );
// watch(
// () => fields.value,
// (value) => {
// if (value) {
// fieldRules.value = false;
// }
// }
// );
// watch(
// () => works.value,
// (value) => {
......@@ -325,22 +325,22 @@ export default defineComponent({
// }
// }
// );
watch(
() => qualification.value,
(value) => {
if (value) {
qualificationRules.value = false;
}
}
);
watch(
() => artistLevel.value,
(value) => {
if (value) {
artistLevelRules.value = false;
}
}
);
// watch(
// () => qualification.value,
// (value) => {
// if (value) {
// qualificationRules.value = false;
// }
// }
// );
// watch(
// () => artistLevel.value,
// (value) => {
// if (value) {
// artistLevelRules.value = false;
// }
// }
// );
const getInformationArtist = async () => {
const response = (await api({
......@@ -362,7 +362,7 @@ export default defineComponent({
artistCode.value = ArtistInformation.artistCode;
fullName.value = ArtistInformation.fullName;
artistName.value = ArtistInformation.artistName;
birthday.value = moment(
birthday.value = birthday.value === null ? null : moment(
ArtistInformation.birthday,
'DD/MM/YYYY HH:mm:ss'
).format('DD/MM/YYYY');
......@@ -743,10 +743,10 @@ export default defineComponent({
const checkValidate = () => {
let hasError = false;
if (!avatar.value && !avatarFile.value) {
hasError = true;
hidden_img.value = true;
}
// if (!avatar.value && !avatarFile.value) {
// hasError = true;
// hidden_img.value = true;
// }
if (!artistCode.value || !artistCode.value?.trim().length) {
hasError = true;
artistCodeRules.value = true;
......@@ -755,78 +755,78 @@ export default defineComponent({
hasError = true;
fullNameRules.value = true;
}
if (!artistName.value || !artistName.value?.trim().length) {
hasError = true;
artistNameRules.value = true;
}
// if (!artistName.value || !artistName.value?.trim().length) {
// hasError = true;
// artistNameRules.value = true;
// }
// if (!address.value || !address.value.trim().length) {
// hasError = true;
// addressRules.value = true;
// }
if (!birthday.value || !birthday.value?.trim().length) {
hasError = true;
birthdayRules.value = true;
}
if (sex.value === null) {
hasError = true;
sexRules.value = true;
}
if (!phoneNumber.value || !phoneNumber.value?.trim().length) {
hasError = true;
phoneNumberRules.value = true;
errorMessPhoneNumber.value = i18n.global.t(
'artist.artistInformation.validateMessages.requirePhoneNumber'
);
}
if (!email.value || !email.value?.trim().length) {
hasError = true;
emailRules.value = true;
errorMessEmail.value = i18n.global.t(
'artist.artistInformation.validateMessages.requireEmail'
);
}
// if (!birthday.value || !birthday.value?.trim().length) {
// hasError = true;
// birthdayRules.value = true;
// }
// if (sex.value === null) {
// hasError = true;
// sexRules.value = true;
// }
// if (!phoneNumber.value || !phoneNumber.value?.trim().length) {
// hasError = true;
// phoneNumberRules.value = true;
// errorMessPhoneNumber.value = i18n.global.t(
// 'artist.artistInformation.validateMessages.requirePhoneNumber'
// );
// }
// if (!email.value || !email.value?.trim().length) {
// hasError = true;
// emailRules.value = true;
// errorMessEmail.value = i18n.global.t(
// 'artist.artistInformation.validateMessages.requireEmail'
// );
// }
if (
(!mnBookingPhone.value || !mnBookingPhone.value?.trim().length) &&
check_infoBooking.value
) {
hasError = true;
mnBookingPhoneRules.value = true;
errorMessmnBookingPhone.value = i18n.global.t(
'artist.artistInformation.validateMessages.requirePhoneNumberAdminister'
);
}
if (
(!mnBookingEmail.value || !mnBookingEmail.value?.trim().length) &&
check_infoBooking.value
) {
hasError = true;
mnBookingEmailRules.value = true;
errorMessmnBookingEmail.value = i18n.global.t(
'artist.artistInformation.validateMessages.requireEmailAdminister'
);
}
// if (
// (!mnBookingPhone.value || !mnBookingPhone.value?.trim().length) &&
// check_infoBooking.value
// ) {
// hasError = true;
// mnBookingPhoneRules.value = true;
// errorMessmnBookingPhone.value = i18n.global.t(
// 'artist.artistInformation.validateMessages.requirePhoneNumberAdminister'
// );
// }
// if (
// (!mnBookingEmail.value || !mnBookingEmail.value?.trim().length) &&
// check_infoBooking.value
// ) {
// hasError = true;
// mnBookingEmailRules.value = true;
// errorMessmnBookingEmail.value = i18n.global.t(
// 'artist.artistInformation.validateMessages.requireEmailAdminister'
// );
// }
if (!account.value === null) {
hasError = true;
accountRules.value = true;
}
if(!address.value === null){
hasError = true;
addressRules.value = true
}
if (!fields.value) {
hasError = true;
fieldRules.value = true;
}
if (nationality.value === null) {
hasError = true;
nationalityRules.value = true;
}
if (qualification.value === null) {
hasError = true;
qualificationRules.value = true;
}
// if(!address.value === null){
// hasError = true;
// addressRules.value = true
// }
// if (!fields.value) {
// hasError = true;
// fieldRules.value = true;
// }
// if (nationality.value === null) {
// hasError = true;
// nationalityRules.value = true;
// }
// if (qualification.value === null) {
// hasError = true;
// qualificationRules.value = true;
// }
// if (!works.value.length) {
// hasError = true;
// workRules.value = true;
......@@ -899,7 +899,7 @@ export default defineComponent({
artistCode: artistCode.value,
artistName: artistName.value,
// 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,
provinceDto: address.value,
address: null,
......@@ -1068,30 +1068,30 @@ export default defineComponent({
checkValidate,
artistCodeRules,
fullNameRules,
artistNameRules,
birthdayRules,
emailRules,
addressRules,
phoneNumberRules,
sexRules,
nationalityRules,
fieldRules,
// artistNameRules,
// birthdayRules,
// emailRules,
// addressRules,
// phoneNumberRules,
// sexRules,
// nationalityRules,
// fieldRules,
// workRules,
qualificationRules,
artistLevelRules,
accountRules,
errorMessEmail,
errorMessPhoneNumber,
// qualificationRules,
// artistLevelRules,
// accountRules,
// errorMessEmail,
// errorMessPhoneNumber,
confirmChangeIsDefault,
mnBookingPhone,
mnBookingEmail,
mnFbmess,
mnIns,
mnWhatsapp,
mnBookingPhoneRules,
errorMessmnBookingPhone,
mnBookingEmailRules,
errorMessmnBookingEmail,
// mnBookingPhoneRules,
// errorMessmnBookingPhone,
// mnBookingEmailRules,
// errorMessmnBookingEmail,
favoriteScore,
provinceOptions,
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