update

parent 97f2f68f
......@@ -67,7 +67,7 @@ export type ArtistInfoType = {
banners: BannerType[];
products: ProductType[];
schedules: SchedulesType[];
musicTypeDto:MusicType[];
musicTypeDto: MusicType[];
provinceDto: ProvinceType[];
stories: StoriesType[];
mnName: string | null;
......@@ -79,21 +79,24 @@ export type ArtistInfoType = {
mnIns: string | null;
mnWhatsapp: string | null;
favoriteScore: number;
};
export type ProvinceType = {
name: string,
fullname: string,
code: string,
level: string,
artistOwner: {
name: string;
};
};
export type ProvinceType = {
name: string;
fullname: string;
code: string;
level: string;
};
export type MusicType = {
id:number,
name: string,
status: number,
code: string,
numIndex: number,
};
export type MusicType = {
id: number;
name: string;
status: number;
code: string;
numIndex: number;
};
export type FieldType = {
id: number;
name: string;
......@@ -102,16 +105,14 @@ export type FieldType = {
numIndex: number;
};
export type ClassificationOptions = {
id: number;
name: string;
status:number | null;
status: number | null;
description: string | null;
numIndex: number;
};
export type NationalityType = {
id: number;
name: string;
......@@ -268,11 +269,9 @@ export type DetailUnit = {
password: string;
fields: Array<FieldType>;
contracts: Array<Contract>;
classification: Array<ClassificationOptions>
classification: Array<ClassificationOptions>;
};
export type CustomerType = {
id: number;
code: string | null;
......@@ -463,11 +462,9 @@ export type ListArrayArtist = {
artistName: string;
};
export type ListDeposit = {
artistBookingDepositDtos: []
artistBookingDepositDtos: [];
};
export type ListArrayCust = {
id: number;
fullName: string;
......@@ -621,17 +618,17 @@ export type ListBannerConfig = {
};
export type ListHomeConfig = {
artistId: number,
artistId: number;
artistName: {
artistName: string,
id: number
},
code: string,
embeddedUrl: string,
id: number,
imageUrl: string,
name: string
}
artistName: string;
id: number;
};
code: string;
embeddedUrl: string;
id: number;
imageUrl: string;
name: string;
};
export type DetailBannerConfig = {
id: number;
......@@ -675,8 +672,8 @@ export type AddBannerConfig = {
};
export type listTypeFormalityDeposit = {
id: number;
name:string
}
name: string;
};
export type ListConfigPartner = {
id: number;
name: string;
......
......@@ -165,8 +165,7 @@
<!-- nghệ sỹ -->
<div class="row">
<div class="col-auto text-h6 text-weight-regular flex q-ml-md">
{{ $t('managingUnitAdd.titleAdd')
}}
{{ $t('managingUnitAdd.titleAdd') }}
</div>
<q-space></q-space>
<div class="col-auto">
......@@ -836,8 +835,8 @@ export default defineComponent({
const newArtistList = [...props.artistList];
if (selectedContract.value) {
newArtistList[selectedContract.value.index] = {
contractFrom: contractTimeFrom.value,
contractTo: contractTimeTo.value,
contractFrom: `${contractTimeFrom.value} 00:00:00`,
contractTo: `${contractTimeTo.value} 00:00:00`,
timeAdd: `${contractTimeFrom.value} - ${contractTimeTo.value}`,
status: artistStatus.value,
artistId: artistName.value?.id,
......
......@@ -126,7 +126,7 @@
@update:model-value="$emit('update:birthday', $event)"
:label="$t('userPage.dialogLabel.fieldLabels.birthday')"
outlined
readonly
hide-bottom-space
>
<template v-slot:append>
......
......@@ -75,7 +75,6 @@
type="text"
class="q-my-sm"
outlined
hide-bottom-space
></q-input>
......@@ -98,7 +97,7 @@
@update:model-value="$emit('update:birthday', $event)"
:label="$t('userPage.dialogLabel.fieldLabels.birthday')"
outlined
readonly
hide-bottom-space
>
<template v-slot:append>
......
......@@ -65,6 +65,7 @@
v-model:mn-whatsapp="mnWhatsapp"
v-model:favorite-score="favoriteScore"
v-model:check_infoBooking="check_infoBooking"
v-model:unitName="unitName"
:accountRules="accountRules"
:errorMessmnBookingPhone="errorMessmnBookingPhone"
:errorMessmnBookingEmail="errorMessmnBookingEmail"
......
......@@ -103,6 +103,7 @@ export default defineComponent({
const artistName: Ref<string | null> = ref(null);
const birthday: Ref<string | null> = ref(null);
const sex: Ref<number | null> = ref(null);
const unitName: Ref<string | null> = ref(null);
const nationality: Ref<NationalityType> = ref({
id: 1,
name: 'Việt Nam',
......@@ -377,6 +378,7 @@ export default defineComponent({
email.value = ArtistInformation.email;
facebook.value = ArtistInformation.facebook;
facebookMessage.value = ArtistInformation.facebookMessage;
unitName.value = ArtistInformation.artistOwner?.name
instagram.value = ArtistInformation.instagram;
whatsapp.value = ArtistInformation.whatsapp;
mnName.value = ArtistInformation.mnName;
......@@ -995,7 +997,7 @@ export default defineComponent({
sex,
nationality,
address,
unitName,
status,
fields,
works,
......
......@@ -458,7 +458,7 @@ export default defineComponent({
email: unitEmail.value,
phoneNumber: unitPhoneNumber.value,
status: unitStatus.value,
classification: unitField.value,
classification: unitField.value === null ? null : unitField.value,
userName: unitUserName.value,
password: unitPassword.value,
contracts: unitArtistList.value,
......
......@@ -367,6 +367,8 @@ export default defineComponent({
pageIndex: pageIndex.value,
pageSize: pageSize.value,
customerLevel: levelSelected.value?.id,
companyName: companyNameSelected.value,
taxCode: taxCodeSelected.value,
},
})) as AxiosResponse<
BaseResponseBody<PaginationResponse<CustomerType>>
......
<template>
<div class="row q-col-gutter-sm flex-center q-mt-sm">
<q-space></q-space>
<div class="col-2">
<q-input
v-model="fullNameKeyword"
dense
outlined
:label="$t('artist.tableColumnsArtist.artistName')"
label="Tên nghệ sỹ/nghệ danh"
clearable
></q-input>
</div>
......@@ -57,6 +58,16 @@
>
</q-btn>
</div>
<div class="col-auto">
<q-btn
@click="openDialogFilter = true"
square
color="primary"
icon="mdi-plus"
>
<q-tooltip :offset="[20, 10]">Bộ lọc nâng cao</q-tooltip>
</q-btn>
</div>
<div class="col-auto">
<q-btn
class="q-mr-md"
......@@ -130,6 +141,108 @@
</template>
</q-table>
</div>
<q-dialog v-model="openDialogFilter" persistent>
<q-card style="min-width: 550px">
<q-card-section style="border-bottom: 1px solid #5d319e">
<div style="font-size: 20px">Bộ lọc nâng cao</div>
</q-card-section>
<!-- <div class="row">
<div class="col-6 px-4" >
<q-input
v-model="fullNameKeyword"
dense
outlined
label="Chi phí từ"
clearable
></q-input>
</div>
<div class="col-6">
<q-input
v-model="fullNameKeyword"
dense
outlined
label="Chi phí đến"
clearable
></q-input>
</div>
<div class="col-6">
<q-input
v-model="fullNameKeyword"
dense
outlined
label="Cấp độ"
clearable
></q-input>
</div>
<div class="col-6"></div>
<div class="col-6"></div>
<div class="col-6"></div>
<div class="col-12"></div>
</div> -->
<q-card-section
class="overflow-auto"
style="max-height: calc(100vh - 15rem)"
>
<div class="row q-col-gutter-sm">
<div class="col-6" style="padding: 12px">
<q-input
v-model="costFrom"
dense
outlined
label="Chi phí từ"
clearable
></q-input>
</div>
<div class="col-6" style="padding: 12px">
<q-input
v-model="costTo"
dense
outlined
label="Chi phí đến"
clearable
></q-input>
</div>
<!-- <div class="col-6" style="padding: 12px">
<q-input
v-model="level"
dense
outlined
label="Cấp độ"
clearable
></q-input>
</div> -->
<div class="col-12" style="padding: 8px 12px 8px 12px">
<q-select
v-model="musics"
:options="musicOptions"
option-value="id"
option-label="name"
label="Thể loại"
outlined
hide-bottom-space
clearable
dense
map-options
use-input
use-chips
type="text"
></q-select>
</div>
</div>
</q-card-section>
<q-card-actions align="right">
<q-btn flat color="primary" v-close-popup>Đóng</q-btn>
<q-btn flat color="primary" v-close-popup @click="filter">Lưu</q-btn>
</q-card-actions>
</q-card>
</q-dialog>
<div class="col-12 q-mt-sm">
<Pagination
v-model:currentPage="pageIndex"
......@@ -172,7 +285,6 @@
:nationality-options="nationalityOptions"
:profession-options="professionOptions"
:artist-level-options="artistLevelOptions"
:work-options="workOptions"
@click:CloseBtn="isOpenNewArtistDialog = false"
></AddNewArtistDialog>
......@@ -192,8 +304,7 @@ import {
QualificationType,
WorkType,
ProvinceType,
MusicType
MusicType,
} from 'src/assets/type';
import Pagination from 'components/pagination/index.vue';
import { api, BaseResponseBody } from 'src/boot/axios';
......@@ -315,6 +426,7 @@ export default defineComponent({
},
];
const openDialogFilter = ref(false);
const userTableRowsArtist: Ref<unknown[]> = ref([]);
const pageIndex = ref(1);
const pageSize = ref(20);
......@@ -326,6 +438,8 @@ export default defineComponent({
{ id: 3, name: 'Khác' },
]);
const configImg = config;
const musics: Ref<MusicType | null> = ref(null);
const fieldOptions: Ref<FieldType[]> = ref([]);
const nationalityOptions: Ref<NationalityType[]> = ref([]);
const professionOptions: Ref<QualificationType[]> = ref([]);
......@@ -365,7 +479,14 @@ export default defineComponent({
const mnFbmess: Ref<string | null> = ref(null);
const mnIns: Ref<string | null> = ref(null);
const mnWhatsapp: Ref<string | null> = ref(null);
const costFrom = ref(0);
const costTo = ref(100000000);
// const level: Ref<string | null> = ref(null);
const filter = () => {
void getListArtists();
};
const getListArtists = async () => {
try {
......@@ -378,7 +499,10 @@ export default defineComponent({
name: fullNameKeyword.value,
field: fieldSelected.value?.id,
qualification: professionSelected.value?.id,
address: provinceSelected.value?.name
address: provinceSelected.value?.name,
musicTypeDto: musics.value?.id,
fromMoney: costFrom.value,
toMoney: costTo.value,
},
})) as AxiosResponse<
BaseResponseBody<PaginationResponse<ArtistInfoType>>
......@@ -429,30 +553,26 @@ export default defineComponent({
// thể loại
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 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 getQualificationOptions = async () => {
const response = (await api({
......@@ -520,9 +640,9 @@ export default defineComponent({
void getWorkOptions();
void getProvinceOptions();
void getMusicTypeOptions();
});
return {
openDialogFilter,
configImg,
userTableColumnsArtist,
userTableRowsArtist,
......@@ -546,6 +666,7 @@ export default defineComponent({
phoneNumber,
email,
facebook,
musics,
facebookMessage,
instagram,
whatsapp,
......@@ -569,6 +690,9 @@ export default defineComponent({
provinceSelected,
artistLevelOptions,
provinceOptions,
costFrom,
costTo,
// level,
getProvinceOptions,
getMusicTypeOptions,
getFieldOptions,
......@@ -581,6 +705,7 @@ export default defineComponent({
getWorkOptions,
confirmDeleteArtist,
deleteArtist,
filter,
};
},
});
......
......@@ -89,7 +89,7 @@ export default defineComponent({
},
];
const userTableRows: Ref<UserObject[]> = ref([]);
const keyword = ref('');
const keyword:Ref<string | null> = ref(null);
const showDialog = ref(false);
const showDialogUpdate = ref(false);
......@@ -116,6 +116,10 @@ export default defineComponent({
const listScheduleAccess = ref(['Chưa có lịch truy cập']);
const $store = useStore();
const searchItem = () =>{
void getListUsers()
}
const getListUsers = async () => {
try {
const response = (await api({
......@@ -124,7 +128,7 @@ export default defineComponent({
params: {
pageIndex: pageIndex.value,
pageSize: pageSize.value,
name: keyword.value.trim(),
name: keyword.value?.trim(),
},
})) as AxiosResponse<BaseResponseBody<PaginationResponse<UserObject>>>;
if (response.data.error.code === config.API_RES_CODE.OK.code) {
......@@ -424,6 +428,7 @@ export default defineComponent({
openAddUserDialog,
getListUsers,
changePageSize,
searchItem
};
},
});
......@@ -12,15 +12,16 @@
outlined
:label="$t('userPage.tableColumns.keywordSearch')"
clearable
></q-input>
</div>
<div class="col-auto">
<q-btn
color="primary"
no-caps
:label="$t('crudActions.search')"
style="width: 100px"
@click="getListUsers"
@click="searchItem"
>
</q-btn>
</div>
......
......@@ -810,7 +810,7 @@ export default defineComponent({
url: API_PATHS.addArtist,
method: 'POST',
data: {
musicTypeDto:musics.value ,
musicTypeDto: musics.value,
id: route.params.id,
avatar: avatarUploaded.value,
artistCode: artistCode.value,
......
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