update

parent b675a6f4
......@@ -219,6 +219,7 @@ export type ProductType = {
name: string;
numIndex: number;
status: number;
isFeaturedOnHomepage: number;
url?: string;
file?: File;
};
......
......@@ -22,6 +22,8 @@ export default defineComponent({
const embeddedUrl: Ref<string> = ref('');
const urlFileLocal: Ref<string> = ref('');
const status: Ref<number> = ref(2);
const isFeaturedOnHomepage: Ref<number> = ref(0);
const statusOptions = ref([
{ id: 1, name: 'Sản phẩm khác' },
{ id: 2, name: 'Sản phẩm nổi bật' },
......@@ -45,6 +47,7 @@ export default defineComponent({
embeddedUrl.value = '';
urlFileLocal.value = '';
status.value = 2;
isFeaturedOnHomepage.value = 0;
};
const SubmitData = () => {
context.emit('click:CloseBtnAddHotProduct');
......@@ -55,6 +58,7 @@ export default defineComponent({
status: status.value,
embeddedUrl: embeddedUrl.value,
imageUrl: urlFileLocal.value,
isFeaturedOnHomepage: isFeaturedOnHomepage.value,
});
Notify.create({
type: 'positive',
......
......@@ -29,6 +29,7 @@ export default defineComponent({
const urlFileLocal: Ref<string> = ref('');
const imageAPI: Ref<string | null> = ref(null);
const status: Ref<number> = ref(2);
const isFeaturedOnHomepage: Ref<number> = ref(0);
// const homeStatus: Ref<number> = ref(0);
const statusOptions = ref([
{ id: 1, name: 'Sản phẩm khác' },
......@@ -49,12 +50,14 @@ export default defineComponent({
() => props.openUpdateHotProduct,
(value) => {
if (value) {
console.log(props.dataUpdate, 'props.dataUpdate');
id.value = props.dataUpdate?.id as number;
name.value = props.dataUpdate?.name as string;
code.value = props.dataUpdate?.code as string;
embeddedUrl.value = props.dataUpdate?.embeddedUrl as string;
status.value = props.dataUpdate?.status as number;
// homeStatus.value = props.dataUpdate?.status as number
isFeaturedOnHomepage.value = props.dataUpdate
?.isFeaturedOnHomepage as number;
urlFileLocal.value = props.dataUpdate?.imageUrl as string;
if (props.dataUpdate?.file) {
imageAPI.value = null;
......@@ -73,7 +76,7 @@ export default defineComponent({
embeddedUrl.value = '';
urlFileLocal.value = '';
status.value = 2;
// homeStatus.value = 0
isFeaturedOnHomepage.value = 0;
};
const SubbmitDataUpdate = () => {
context.emit('click:CloseBtnUpdateHotProduct');
......@@ -82,7 +85,7 @@ export default defineComponent({
name: name.value,
code: code.value,
status: status.value,
// isFeaturedOnHomepage: homeStatus.value,
isFeaturedOnHomepage: isFeaturedOnHomepage.value,
embeddedUrl: embeddedUrl.value,
imageUrl: urlFileLocal.value,
id: id.value,
......@@ -139,6 +142,7 @@ export default defineComponent({
url_embed,
statusRules,
statusOptions,
isFeaturedOnHomepage,
// statusHomeOptions,
// homeStatus,
id,
......
......@@ -119,7 +119,7 @@
<q-btn color="primary" no-caps label="Reset Pass"></q-btn>
</div> -->
<div class="row flex-center">
<!-- <div class="row flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.artistCode') }}
<span style="color: red">*</span>
......@@ -137,7 +137,7 @@
hide-bottom-space
></q-input>
</div>
</div>
</div> -->
<div class="row flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.fullName') }}
......@@ -731,7 +731,7 @@ export default defineComponent({
mnEmail: { type: String, required: true },
hidden_img: { type: Boolean, required: true },
id: { type: Number, required: true },
artistCode: { type: String, required: true },
// artistCode: { type: String, required: true },
avatar: { type: String, required: true },
fullName: { type: String, required: true },
artistName: { type: String, required: true },
......@@ -762,7 +762,7 @@ export default defineComponent({
workOptions: { type: Array, required: true },
musicOptions: { type: Array, required: true },
favoriteScore: { type: Number, required: true },
artistCodeRules: { type: Boolean, required: true },
// artistCodeRules: { type: Boolean, required: true },
fullNameRules: { type: Boolean, required: true },
// artistNameRules: { type: Boolean, required: true },
// birthdayRules: { type: Boolean, required: true },
......@@ -873,9 +873,9 @@ export default defineComponent({
const errorMessAccount = i18n.global.t(
'artist.artistInformation.validateMessages.requireAccount'
);
const errorMessArtistCode = i18n.global.t(
'artist.artistInformation.validateMessages.requireArtistCode'
);
// const errorMessArtistCode = i18n.global.t(
// 'artist.artistInformation.validateMessages.requireArtistCode'
// );
const errorMessFullName = i18n.global.t(
'artist.artistInformation.validateMessages.requireFullName'
);
......@@ -923,7 +923,7 @@ export default defineComponent({
openDialog,
onOKClick,
onCancelClick,
errorMessArtistCode,
// errorMessArtistCode,
errorMessFullName,
errorMessAccount,
// errorMessArtistName,
......@@ -946,7 +946,7 @@ export default defineComponent({
emits: [
'update:emailAdminister',
'update:phoneNumberAdminister',
'update:artistCode',
// 'update:artistCode',
'update:fullName',
'update:avatar',
'update:artistName',
......
......@@ -100,6 +100,7 @@ export default defineComponent({
name: item.row.name,
status: item.row.status,
file: item.row.file,
isFeaturedOnHomepage: item.row.isFeaturedOnHomepage,
});
context.emit('click:openUpdateHotProduct');
......
......@@ -102,7 +102,7 @@
<q-btn color="primary" no-caps label="Reset Pass"></q-btn>
</div> -->
<div class="row flex-center">
<!-- <div class="row flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.artistCode') }}
<span style="color: red">*</span>
......@@ -120,7 +120,7 @@
hide-bottom-space
></q-input>
</div>
</div>
</div> -->
<div class="row flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.fullName') }}
......@@ -711,7 +711,7 @@ export default defineComponent({
mnEmail: { type: String, required: true },
hidden_img: { type: Boolean, required: true },
id: { type: Number, required: true },
artistCode: { type: String, required: true },
// artistCode: { type: String, required: true },
avatar: { type: String, required: true },
fullName: { type: String, required: true },
artistName: { type: String, required: true },
......@@ -742,7 +742,7 @@ export default defineComponent({
workOptions: { type: Array, required: true },
musicOptions: { type: Array, required: true },
favoriteScore: { type: Number, required: true },
artistCodeRules: { type: Boolean, required: true },
// artistCodeRules: { type: Boolean, required: true },
fullNameRules: { type: Boolean, required: true },
// artistNameRules: { type: Boolean, required: true },
// birthdayRules: { type: Boolean, required: true },
......@@ -846,9 +846,9 @@ export default defineComponent({
const errorMessAccount = i18n.global.t(
'artist.artistInformation.validateMessages.requireAccount'
);
const errorMessArtistCode = i18n.global.t(
'artist.artistInformation.validateMessages.requireArtistCode'
);
// const errorMessArtistCode = i18n.global.t(
// 'artist.artistInformation.validateMessages.requireArtistCode'
// );
const errorMessFullName = i18n.global.t(
'artist.artistInformation.validateMessages.requireFullName'
);
......@@ -896,7 +896,7 @@ export default defineComponent({
openDialog,
onOKClick,
onCancelClick,
errorMessArtistCode,
// errorMessArtistCode,
errorMessFullName,
errorMessAccount,
// errorMessArtistName,
......@@ -920,7 +920,7 @@ export default defineComponent({
emits: [
'update:emailAdminister',
'update:phoneNumberAdminister',
'update:artistCode',
// 'update:artistCode',
'update:fullName',
'update:avatar',
'update:artistName',
......
......@@ -45,7 +45,7 @@ export default defineComponent({
const confirmAddCustomer = () => {
context.emit('addNewCustomer', {
code: code.value,
// code: code.value,
userName: userName.value,
fullName: fullName.value,
companyName: companyName.value,
......@@ -62,7 +62,7 @@ export default defineComponent({
});
};
const resetData = () => {
code.value = null;
// code.value = null;
userName.value = null;
fullName.value = null;
companyName.value = null;
......@@ -95,14 +95,14 @@ export default defineComponent({
(val && val.trim().length >= 8) ||
i18n.global.t('customer.validateMessages.lengthPassword'),
];
const codeRules = [
(val?: string) =>
(val && val.trim().length) ||
i18n.global.t('customer.validateMessages.requireCode'),
(val?: string) =>
(val && val.trim().length <= 50) ||
i18n.global.t('customer.validateMessages.lengthCode'),
];
// const codeRules = [
// (val?: string) =>
// (val && val.trim().length) ||
// i18n.global.t('customer.validateMessages.requireCode'),
// (val?: string) =>
// (val && val.trim().length <= 50) ||
// i18n.global.t('customer.validateMessages.lengthCode'),
// ];
const customerNameRules = [
(val?: string) =>
(val && val.trim().length) ||
......@@ -171,7 +171,7 @@ export default defineComponent({
customerNameRules,
// businessNameRules,
passwordRules,
codeRules,
// codeRules,
// taxCodeRules,
emailRules,
// levelRules,
......
......@@ -47,7 +47,7 @@
/>
</template>
</q-input>
<q-input
<!-- <q-input
v-model="code"
:label="$t('customer.dialogLabel.fieldLabels.code')"
:rules="codeRules"
......@@ -55,7 +55,7 @@
type="text"
class="q-my-sm"
outlined
></q-input>
></q-input> -->
<q-input
v-model="fullName"
:label="$t('customer.dialogLabel.fieldLabels.customerName')"
......
......@@ -26,7 +26,7 @@ export default defineComponent({
}
);
const id: Ref<number | null> = ref(null);
const code: Ref<string | null> = ref(null);
// const code: Ref<string | null> = ref(null);
const userName: Ref<string | null> = ref(null);
const fullName: Ref<string | null> = ref(null);
const companyName: Ref<string | null> = ref(null);
......@@ -44,7 +44,7 @@ export default defineComponent({
const confirmEditCustomer = () => {
context.emit('editCustomer', {
id: id.value,
code: code.value,
// code: code.value,
userName: userName.value,
fullName: fullName.value,
companyName: companyName.value,
......@@ -62,7 +62,7 @@ export default defineComponent({
};
const getData = () => {
id.value = props.customerInfo.id;
code.value = props.customerInfo.code;
// code.value = props.customerInfo.code;
userName.value = props.customerInfo.userName;
fullName.value = props.customerInfo.fullName;
companyName.value = props.customerInfo.companyName;
......@@ -87,14 +87,14 @@ export default defineComponent({
// (val && val.trim().length) ||
// i18n.global.t('customer.validateMessages.requirePassword'),
// ];
const codeRules = [
(val?: string) =>
(val && val.trim().length) ||
i18n.global.t('customer.validateMessages.requireCode'),
(val?: string) =>
(val && val.trim().length <= 50) ||
i18n.global.t('customer.validateMessages.lengthCode'),
];
// const codeRules = [
// (val?: string) =>
// (val && val.trim().length) ||
// i18n.global.t('customer.validateMessages.requireCode'),
// (val?: string) =>
// (val && val.trim().length <= 50) ||
// i18n.global.t('customer.validateMessages.lengthCode'),
// ];
const customerNameRules = [
......@@ -163,7 +163,7 @@ export default defineComponent({
customerNameRules,
// businessNameRules,
// passwordRules,
codeRules,
// codeRules,
// taxCodeRules,
emailRules,
// levelRules,
......@@ -185,7 +185,7 @@ export default defineComponent({
representative,
position,
level,
code,
// code,
confirmEditCustomer,
id,
};
......
......@@ -47,7 +47,7 @@
@click="isPwd = !isPwd"
/> </template
></q-input>
<q-input
<!-- <q-input
v-model="code"
:label="$t('customer.dialogLabel.fieldLabels.code')"
:rules="codeRules"
......@@ -56,7 +56,7 @@
class="q-my-sm"
outlined
readonly
></q-input>
></q-input> -->
<q-input
v-model="fullName"
:label="$t('customer.dialogLabel.fieldLabels.customerName')"
......
import { defineComponent, PropType, ref } from 'vue';
import { defineComponent, PropType, ref, Ref } from 'vue';
import { i18n } from 'src/boot/i18n';
import { isEmail } from '../../../boot/functions';
import { isMobilePhone } from '../../../boot/functions';
......@@ -26,6 +26,7 @@ export default defineComponent({
scheduleAccess: { type: String, required: true },
listScheduleAccess: { type: Array, required: true },
status: { type: Boolean, required: true },
passwordNew: { type: String, required: true },
},
setup() {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
......@@ -35,11 +36,17 @@ export default defineComponent({
(val && val.trim().length) ||
i18n.global.t('userPage.validateMessages.requireUserName'),
];
const passwordRules = [
(val?: string) =>
(val && val.trim().length) ||
i18n.global.t('userPage.validateMessages.requirePassword'),
];
const passwordNewRules = [
(val?: string) => (val && val.trim().length) || 'Vui lòng nhập mật khẩu',
];
const fullNameRules = [
(val?: string) =>
(val && val.trim().length) ||
......@@ -82,15 +89,17 @@ export default defineComponent({
];
return {
isPwd: ref(true),
isPwdNew: ref(true),
today,
userNameRules,
passwordRules,
fullNameRules,
emailRules,
mobileNumberRules,
addressRules,
unitRules,
passwordNewRules,
groupRules,
birthdayRules,
};
......@@ -111,6 +120,7 @@ export default defineComponent({
'update:group',
'update:scheduleAccess',
'update:status',
'update:passwordNew',
'addNewUser',
],
});
......@@ -32,8 +32,8 @@
></q-input>
<q-input
:model-value="password"
:rules="passwordRules"
@update:model-value="$emit('update:password', $event)"
:rules="passwordRules"
:label="$t('userPage.dialogLabel.fieldLabels.password')"
outlined
:type="isPwd ? 'password' : 'text'"
......@@ -49,6 +49,27 @@
/>
</template>
</q-input>
<q-input
:model-value="passwordNew"
@update:model-value="$emit('update:passwordNew', $event)"
:rules="passwordNewRules"
label="Nhập lại mật khẩu *"
outlined
:type="isPwdNew ? 'password' : 'text'"
class="q-my-sm"
autocomplete="new-password"
hide-bottom-space
>
<template v-slot:append>
<q-icon
:name="isPwdNew ? 'visibility_off' : 'visibility'"
class="cursor-pointer"
@click="isPwdNew = !isPwdNew"
/>
</template>
</q-input>
<q-input
:model-value="fullName"
@update:model-value="$emit('update:fullName', $event)"
......@@ -104,7 +125,6 @@
type="text"
class="q-my-sm"
outlined
hide-bottom-space
></q-input>
......
......@@ -81,8 +81,6 @@ export default defineComponent({
const cardBankOptions: Ref<CardBankType[]> = ref([]);
const typeBankOptions: Ref<TypeCardType[]> = ref([]);
const workOptions: Ref<WorkType[]> = ref([]);
const musicOptions: Ref<MusicType[]> = ref([]);
const sexOptions = ref([
......@@ -98,7 +96,7 @@ export default defineComponent({
const avatarFile: Ref<File | null> = ref(null);
const avatarUploaded: Ref<string | null> = ref(null);
const avatarNoChange: Ref<string | null> = ref(null);
const artistCode: Ref<string> = ref('');
// const artistCode: Ref<string> = ref('');
const fullName: Ref<string> = ref('');
const artistName: Ref<string | null> = ref(null);
const birthday: Ref<string | null> = ref(null);
......@@ -149,16 +147,15 @@ export default defineComponent({
//state hot product
const products: Ref<ProductType[]> = ref([]);
const statusHotProduct: Ref<number> = ref(2);
const address: Ref<ProvinceType[]> =ref([])
const address: Ref<ProvinceType[]> = ref([]);
const DataInsertHotProduct: Ref<ProductType | null> = ref(null);
const DataUpdateHotProduct: Ref<ProductType | null> = ref(null);
const musics: Ref<MusicType[]> = ref([]);
const provinceOptions:Ref<ProvinceType[]> = ref([]);
const provinceOptions: Ref<ProvinceType[]> = ref([]);
//sate error input thong-tin-ca-nhan
const check_infoBooking = ref(false);
const artistCodeRules = ref(false);
// const artistCodeRules = ref(false);
const fullNameRules = ref(false);
// const artistNameRules = ref(false);
// const birthdayRules = ref(false);
......@@ -175,9 +172,9 @@ export default defineComponent({
// const artistLevelRules = ref(false);
// const musicRules = ref(false);
const accountRules = ref(false);
// const errorMessEmail = ref(
// i18n.global.t('artist.artistInformation.validateMessages.requireEmail')
// );
// const errorMessEmail = ref(
// i18n.global.t('artist.artistInformation.validateMessages.requireEmail')
// );
// const errorMessPhoneNumber = ref(
// i18n.global.t(
// 'artist.artistInformation.validateMessages.requirePhoneNumber'
......@@ -217,14 +214,14 @@ export default defineComponent({
// }
// }
// );
watch(
() => artistCode.value,
(value) => {
if (value) {
artistCodeRules.value = false;
}
}
);
// watch(
// () => artistCode.value,
// (value) => {
// if (value) {
// artistCodeRules.value = false;
// }
// }
// );
watch(
() => fullName.value,
(value) => {
......@@ -268,8 +265,8 @@ export default defineComponent({
watch(
() => account.value,
(value) => {
if(value){
accountRules.value = false
if (value) {
accountRules.value = false;
}
}
);
......@@ -346,7 +343,6 @@ export default defineComponent({
// }
// );
const getInformationArtist = async () => {
const response = (await api({
url: API_PATHS.getDetailArtist,
......@@ -354,7 +350,7 @@ export default defineComponent({
params: { artistId: route.params.id },
})) as AxiosResponse<BaseResponseBody<ArtistInfoType>>;
const ArtistInformation = response.data.data;
id.value = ArtistInformation.id;
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
......@@ -364,21 +360,23 @@ export default defineComponent({
: null;
avatarNoChange.value = ArtistInformation.avatar;
account.value = ArtistInformation.account;
artistCode.value = ArtistInformation.artistCode;
// artistCode.value = ArtistInformation.artistCode;
fullName.value = ArtistInformation.fullName;
artistName.value = ArtistInformation.artistName;
birthday.value = birthday.value === null ? null : moment(
ArtistInformation.birthday,
'DD/MM/YYYY HH:mm:ss'
).format('DD/MM/YYYY');
// chooseAddress.value = ArtistInformation.address
birthday.value =
birthday.value === null
? null
: moment(ArtistInformation.birthday, 'DD/MM/YYYY HH:mm:ss').format(
'DD/MM/YYYY'
);
// chooseAddress.value = ArtistInformation.address
status.value = ArtistInformation.status;
phoneNumber.value = ArtistInformation.phoneNumber;
email.value = ArtistInformation.email;
facebook.value = ArtistInformation.facebook;
facebookMessage.value = ArtistInformation.facebookMessage;
unitName.value = ArtistInformation.artistOwner?.name
unitName.value = ArtistInformation.artistOwner?.name;
instagram.value = ArtistInformation.instagram;
whatsapp.value = ArtistInformation.whatsapp;
mnName.value = ArtistInformation.mnName;
......@@ -395,20 +393,18 @@ export default defineComponent({
works.value = ArtistInformation.works;
artistLevel.value = ArtistInformation.artistLevel;
sex.value = ArtistInformation.sex;
fields.value = ArtistInformation.fields[0] ;
fields.value = ArtistInformation.fields[0];
fieldsPrivate.value = ArtistInformation.fields[0];
bankAccounts.value = ArtistInformation.bankAccounts;
products.value = ArtistInformation.products;
banners.value = ArtistInformation.banners || [];
socialEmbedded.value = ArtistInformation.socialEmbedded;
stories.value = ArtistInformation.stories;
schedules.value = ArtistInformation.schedules;
musics.value= ArtistInformation.musicTypeDto;
musics.value = ArtistInformation.musicTypeDto;
address.value = ArtistInformation.provinceDto;
// console.log(provinceOptions.value,'12312312');
};
const getFieldOptions = async () => {
......@@ -465,30 +461,27 @@ export default defineComponent({
}
};
const getProvinceOptions = async () => {
const response = (await api ({
url : API_PATHS.getProvinceOptions,
const response = (await api({
url: API_PATHS.getProvinceOptions,
method: 'GET',
params: {},
})) as AxiosResponse<BaseResponseBody<ProvinceType[]>>;
if(response.data.error.code === config.API_RES_CODE.OK.code){
provinceOptions.value = response.data.data
if (response.data.error.code === config.API_RES_CODE.OK.code) {
provinceOptions.value = response.data.data;
}
}
};
const getMusicTypeOptions = async () => {
const response = (await api ({
const response = (await api({
url: API_PATHS.getMusicTypeOptions,
method: 'GET',
params: {},
})) as AxiosResponse<BaseResponseBody<MusicType[]>>;
if(response.data.error.code === config.API_RES_CODE.OK.code) {
musicOptions.value = response.data.data
if (response.data.error.code === config.API_RES_CODE.OK.code) {
musicOptions.value = response.data.data;
}
};
};
const getBankOptions = async () => {
const response = (await api({
url: API_PATHS.bankOptions,
......@@ -754,10 +747,10 @@ export default defineComponent({
// hasError = true;
// hidden_img.value = true;
// }
if (!artistCode.value || !artistCode.value?.trim().length) {
hasError = true;
artistCodeRules.value = true;
}
// if (!artistCode.value || !artistCode.value?.trim().length) {
// hasError = true;
// artistCodeRules.value = true;
// }
if (!fullName.value || !fullName.value?.trim().length) {
hasError = true;
fullNameRules.value = true;
......@@ -901,12 +894,13 @@ export default defineComponent({
method: 'POST',
data: {
id: route.params.id,
musicTypeDto:musics.value,
musicTypeDto: musics.value,
avatar: avatarUploaded.value,
artistCode: artistCode.value,
// artistCode: artistCode.value,
artistName: artistName.value,
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
birthday: birthday.value === null ? null : birthday.value + ' 00:00:00',
birthday:
birthday.value === null ? null : birthday.value + ' 00:00:00',
sex: sex.value,
provinceDto: address.value,
address: null,
......@@ -922,8 +916,8 @@ export default defineComponent({
socialEmbedded: socialEmbedded.value,
artistLevel: artistLevel.value,
// fields: fields.value === null ? [] : [fields.value],
// fields: fields.value === null ? [] : [fields.value],
fields: [],
// fields: fields.value === null ? [] : [fields.value],
fields: [],
nationality: nationality.value,
qualification: qualification.value,
works: works.value,
......@@ -990,7 +984,7 @@ export default defineComponent({
getInformationArtist,
id,
route,
artistCode,
// artistCode,
fullName,
artistName,
birthday,
......@@ -1021,7 +1015,7 @@ export default defineComponent({
workOptions,
musicOptions,
musics,
getFieldOptions,
getNationalityOptions,
getArtistLevelOptions,
......@@ -1057,7 +1051,7 @@ export default defineComponent({
confirmDeleteRow,
updateInformationArtist,
openUpdateHotProduct,
SetProduct,
DataUpdateHotProduct,
UpdateData,
......@@ -1076,7 +1070,7 @@ export default defineComponent({
deleteStory,
UpdateBirtday,
checkValidate,
artistCodeRules,
// artistCodeRules,
fullNameRules,
// artistNameRules,
// birthdayRules,
......
......@@ -342,7 +342,7 @@ export default defineComponent({
const levelSelected: Ref<CustomerLevelType | null> = ref(null);
const id: Ref<number | undefined> = ref(undefined);
const code: Ref<string | null> = ref(null);
// const code: Ref<string | null> = ref(null);
const userName: Ref<string | null> = ref(null);
const fullName: Ref<string | null> = ref(null);
const companyName: Ref<string | null> = ref(null);
......@@ -477,7 +477,7 @@ export default defineComponent({
url: API_PATHS.addCustomer,
method: 'POST',
data: {
code: item.code,
// code: item.code,
userName: item.userName,
fullName: item.fullName,
companyName: item.companyName,
......@@ -552,7 +552,7 @@ export default defineComponent({
method: 'POST',
data: {
id: item.id,
code: item.code,
// code: item.code,
userName: item.userName,
fullName: item.fullName,
companyName: item.companyName,
......@@ -597,7 +597,7 @@ export default defineComponent({
fullName,
companyName,
taxCode,
code,
// code,
password,
type,
email,
......
......@@ -11,43 +11,7 @@
clearable
></q-input>
</div>
<div class="col-2" dense outlined>
<q-select
v-model="fieldSelected"
:options="fieldOptions"
option-label="name"
option-value="id"
label="Lĩnh vực"
dense
outlined
clearable
></q-select>
</div>
<div class="col-2" dense outlined>
<q-select
v-model="professionSelected"
:options="professionOptions"
option-label="name"
option-value="id"
dense
outlined
label="Độ chuyên"
clearable
></q-select>
</div>
<div class="col-2" dense outlined>
<q-select
v-model="provinceSelected"
:options="provinceOptions"
option-label="fullName"
option-value="name"
dense
outlined
label="Địa chỉ"
clearable
></q-select>
</div>
<div class="col-auto">
<q-btn
color="primary"
......@@ -142,7 +106,7 @@
</q-table>
</div>
<q-dialog v-model="openDialogFilter" persistent>
<q-card style="min-width: 550px">
<q-card style="min-width: 700px">
<q-card-section style="border-bottom: 1px solid #5d319e">
<div style="font-size: 20px">Bộ lọc nâng cao</div>
</q-card-section>
......@@ -185,7 +149,7 @@
style="max-height: calc(100vh - 15rem)"
>
<div class="row q-col-gutter-sm">
<div class="col-6" style="padding: 12px">
<div class="col-6" dense outlined>
<q-input
v-model="costFrom"
dense
......@@ -195,7 +159,7 @@
></q-input>
</div>
<div class="col-6" style="padding: 12px">
<div class="col-6" dense outlined>
<q-input
v-model="costTo"
dense
......@@ -215,11 +179,10 @@
></q-input>
</div> -->
<div class="col-12" style="padding: 8px 12px 8px 12px">
<div class="col-6" dense outlined>
<q-select
v-model="musics"
:options="musicOptions"
option-value="id"
option-label="name"
label="Thể loại"
......@@ -230,7 +193,44 @@
map-options
use-input
use-chips
type="text"
type="text"
></q-select>
</div>
<div class="col-6" dense outlined>
<q-select
v-model="fieldSelected"
:options="fieldOptions"
option-label="name"
option-value="id"
label="Lĩnh vực"
dense
outlined
clearable
></q-select>
</div>
<div class="col-6" dense outlined>
<q-select
v-model="professionSelected"
:options="professionOptions"
option-label="name"
option-value="id"
dense
outlined
label="Độ chuyên"
clearable
></q-select>
</div>
<div class="col-6" dense outlined>
<q-select
v-model="provinceSelected"
:options="provinceOptions"
option-label="fullName"
option-value="name"
dense
outlined
label="Địa chỉ"
clearable
></q-select>
</div>
</div>
......@@ -254,7 +254,7 @@
</div>
<AddNewArtistDialog
v-model:is-open-new-artist-dialog="isOpenNewArtistDialog"
v-model:artist-code="artistCode"
v-model:full-name="fullName"
v-model:artist-name="artistName"
v-model:birthday="birthday"
......@@ -453,7 +453,7 @@ export default defineComponent({
const provinceSelected: Ref<ProvinceType | null> = ref(null);
const isOpenNewArtistDialog = ref(false);
const id: Ref<number> = ref(0);
const artistCode: Ref<string> = ref('');
// const artistCode: Ref<string> = ref('');
const fullName: Ref<string> = ref('');
const artistName: Ref<string | undefined> = ref();
const birthday: Ref<string | undefined> = ref();
......@@ -484,7 +484,6 @@ export default defineComponent({
// const level: Ref<string | null> = ref(null);
const filter = () => {
void getListArtists();
};
......@@ -651,7 +650,7 @@ export default defineComponent({
pageSize,
isOpenNewArtistDialog,
id,
artistCode,
// artistCode,
fullName,
artistName,
birthday,
......
......@@ -94,6 +94,7 @@ export default defineComponent({
const showDialogUpdate = ref(false);
const id = ref(0);
const passwordNew = ref ('');
const userName = ref('');
const password = ref('');
const fullName = ref('');
......@@ -169,6 +170,7 @@ export default defineComponent({
address.value = '';
unit.value = null;
status.value = true;
passwordNew.value = '',
group.value = [];
};
......@@ -196,6 +198,7 @@ export default defineComponent({
address: address.value?.trim(),
unit: unit.value?.trim(),
status: status.value ? 1 : 0,
confirmPassword: passwordNew.value?.trim()
},
groups: groups,
pageRoles: [],
......@@ -415,6 +418,7 @@ export default defineComponent({
sexOptions,
listGroup,
listScheduleAccess,
passwordNew,
id,
addNewUser,
getListUserGroup,
......
......@@ -127,6 +127,7 @@
v-model:phone-number="phoneNumber"
v-model:unit="unit"
v-model:sex="sex"
v-model:passwordNew="passwordNew"
:sex-options="sexOptions"
v-model:birthday="birthday"
v-model:group="group"
......
......@@ -96,7 +96,7 @@ export default defineComponent({
const avatar: Ref<string | null> = ref(null);
const avatarFile: Ref<File | null> = ref(null);
const avatarUploaded: Ref<string | null> = ref(null);
const artistCode: Ref<string> = ref('');
// const artistCode: Ref<string> = ref('');
const fullName: Ref<string> = ref('');
const artistName: Ref<string | null> = ref(null);
const birthday: Ref<string | null> = ref(null);
......@@ -153,7 +153,7 @@ export default defineComponent({
//sate error input thong-tin-ca-nhan
const check_infoBooking = ref(false);
const artistCodeRules = ref(false);
// const artistCodeRules = ref(false);
const fullNameRules = ref(false);
// const artistNameRules = ref(false);
// const birthdayRules = ref(false);
......@@ -207,14 +207,14 @@ export default defineComponent({
}
}
);
watch(
() => artistCode.value,
(value) => {
if (value) {
artistCodeRules.value = false;
}
}
);
// watch(
// () => artistCode.value,
// (value) => {
// if (value) {
// artistCodeRules.value = false;
// }
// }
// );
watch(
() => account.value,
(value) => {
......@@ -678,10 +678,10 @@ export default defineComponent({
// hasError = true;
// hidden_img.value = true;
// }
if (!artistCode.value || !artistCode.value?.trim().length) {
hasError = true;
artistCodeRules.value = true;
}
// if (!artistCode.value || !artistCode.value?.trim().length) {
// hasError = true;
// artistCodeRules.value = true;
// }
if (!fullName.value || !fullName.value?.trim().length) {
hasError = true;
fullNameRules.value = true;
......@@ -813,7 +813,7 @@ export default defineComponent({
musicTypeDto: musics.value,
id: route.params.id,
avatar: avatarUploaded.value,
artistCode: artistCode.value,
// artistCode: artistCode.value,
artistName: artistName.value,
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
birthday: birthday.value === null ? null : birthday.value + ' 00:00:00',
......@@ -900,7 +900,7 @@ export default defineComponent({
tab,
id,
route,
artistCode,
// artistCode,
fullName,
artistName,
birthday,
......@@ -993,7 +993,7 @@ export default defineComponent({
deleteStory,
UpdateBirtday,
checkValidate,
artistCodeRules,
// artistCodeRules,
fullNameRules,
// artistNameRules,
// birthdayRules,
......
......@@ -33,7 +33,7 @@
<q-tab-panel name="information">
<PersonalInformation
:id="id"
v-model:artist-code="artistCode"
:avatar="avatar"
v-model:full-name="fullName"
v-model:artist-name="artistName"
......@@ -72,7 +72,6 @@
:artistCodeRules="artistCodeRules"
:fullNameRules="fullNameRules"
......
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