create delete , update artist

parent 4140d720
...@@ -41,4 +41,5 @@ export enum API_PATHS { ...@@ -41,4 +41,5 @@ export enum API_PATHS {
getWorkOptions = '/work', getWorkOptions = '/work',
getDetailArtist = '/artist/detail', getDetailArtist = '/artist/detail',
deleteManagingUnits = '/artistOwner/delete', deleteManagingUnits = '/artistOwner/delete',
deleteArtist = '/artist/delete',
} }
...@@ -30,6 +30,7 @@ export type UserObject = { ...@@ -30,6 +30,7 @@ export type UserObject = {
export type ArtistInfoType = { export type ArtistInfoType = {
id: number; id: number;
account: string;
artistCode: string; artistCode: string;
fullName: string; fullName: string;
artistName: string | null; artistName: string | null;
...@@ -48,6 +49,7 @@ export type ArtistInfoType = { ...@@ -48,6 +49,7 @@ export type ArtistInfoType = {
works: WorkType[]; works: WorkType[];
qualification: QualificationType; qualification: QualificationType;
artistLevel: ArtistLevelType; artistLevel: ArtistLevelType;
socialEmbedded: string | null;
bankAccounts: BankAccountType[]; bankAccounts: BankAccountType[];
banners: BannerType[]; banners: BannerType[];
products: ProductType[]; products: ProductType[];
......
import { defineComponent, ref } from 'vue'; import { defineComponent, PropType, ref } from 'vue';
import { i18n } from 'src/boot/i18n';
import { BannerType, StoriesType } from 'src/assets/type';
export default defineComponent({ export default defineComponent({
props: {
account: { type: String, required: true },
banners: { type: Array as PropType<BannerType[]>, required: true },
shortDescription: { type: Array, required: true },
socialEmbedded: { type: Array, required: true },
stories: { type: Array as PropType<StoriesType[]>, required: true },
},
setup() { setup() {
const slide = ref(1); const slide = ref(1);
const editor = ref('Customize it.'); const editor = ref('Customize it.');
const accountRules = [
return { slide, editor }; (val?: string) =>
(val && val.trim().length) ||
i18n.global.t(
'artist.artistInformation.validateMessages.requireFullName'
),
];
return { slide, editor, accountRules };
}, },
emits: ['update:account', 'update:shortDescription'],
}); });
...@@ -6,7 +6,14 @@ ...@@ -6,7 +6,14 @@
<div>Tên đăng nhập</div> <div>Tên đăng nhập</div>
</div> </div>
<div class="col-2 flex flex-center"> <div class="col-2 flex flex-center">
<q-input dense outlined></q-input> <q-input
:model-value="account"
@update:model-value="$emit('update:account', $event)"
:rules="accountRules"
dense
hide-bottom-space
outlined
></q-input>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<q-btn color="primary" no-caps label="Reset Pass"></q-btn> <q-btn color="primary" no-caps label="Reset Pass"></q-btn>
...@@ -26,31 +33,17 @@ ...@@ -26,31 +33,17 @@
style="height: 300px" style="height: 300px"
> >
<q-carousel-slide <q-carousel-slide
:name="1" v-for="(bannerInfo, bannerIdx) in banners"
img-src="https://kenh14cdn.com/203336854389633024/2021/4/27/photo-1-1619529782008967751238.jpg" :key="bannerIdx"
style="width: 100%; height: 300px; object-fit: contain" :name="bannerInfo.id"
/>
<q-carousel-slide
:name="2"
img-src="https://image.thanhnien.vn/1024/uploaded/caotung/2021_04_25/1_bbrb.jpg"
style="width: 100%; height: 300px; object-fit: contain"
/>
<q-carousel-slide
:name="3"
img-src="https://i.pinimg.com/originals/c2/9a/7d/c29a7d29348b1a3f502803ab9d8355cc.png"
style="width: 100%; height: 300px; object-fit: contain"
/>
<q-carousel-slide
:name="4"
img-src="https://kenh14cdn.com/203336854389633024/2020/12/31/photo-1-16094117624341764656274.jpg" img-src="https://kenh14cdn.com/203336854389633024/2020/12/31/photo-1-16094117624341764656274.jpg"
style="width: 100%; height: 300px; object-fit: contain"
/> />
</q-carousel> </q-carousel>
</div> </div>
<div class="col-8"> <div class="col-8">
<q-editor <q-editor
v-model="editor" :model-value="shortDescription"
@update:model-value="$emit('update:shortDescription', $event)"
ref="editorRef" ref="editorRef"
toolbar-text-color="white" toolbar-text-color="white"
toolbar-toggle-color="yellow-8" toolbar-toggle-color="yellow-8"
...@@ -73,6 +66,34 @@ ...@@ -73,6 +66,34 @@
</div> </div>
</div> </div>
<div class="col-12 q-mt-md"> <div class="col-12 q-mt-md">
<div class="row" align="center" justify="center">
<div class="col-3">
<div class="text-h6 text-weight-regular">Nổi bật(Embed)</div>
<q-card class="my-card q-mt-sm" style="height: 300px">
<img style="height: 100%" :src="socialEmbedded" />
</q-card>
</div>
<q-space></q-space>
<div class="col-3">
<div class="text-h6 text-weight-regular">Story</div>
<q-card class="my-card q-mt-sm" style="height: 300px">
<img
v-if="stories[0].imageUrl !== null"
style="height: 70%"
:src="stories[0].imageUrl"
/>
<div class="text-subtitle2">{{ stories[0].content }}</div>
</q-card>
</div>
<q-space></q-space>
<div class="col-3 q-mr-md">
<div class="text-h6 text-weight-regular">Lịch</div>
<q-date class="q-mt-sm" event-color="orange" />
</div>
</div>
</div>
<!-- <div class="col-12 q-mt-md">
<div class="row"> <div class="row">
<q-space></q-space> <q-space></q-space>
<div class="col-auto"> <div class="col-auto">
...@@ -91,7 +112,7 @@ ...@@ -91,7 +112,7 @@
></q-btn> ></q-btn>
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
</template> </template>
......
...@@ -7,6 +7,9 @@ export default defineComponent({ ...@@ -7,6 +7,9 @@ export default defineComponent({
Pagination, Pagination,
AddNewBankAccountDialog, AddNewBankAccountDialog,
}, },
props: {
bankAccounts: { type: Array, required: true },
},
setup() { setup() {
const userTableColumnsBankAccount = [ const userTableColumnsBankAccount = [
{ {
...@@ -16,16 +19,16 @@ export default defineComponent({ ...@@ -16,16 +19,16 @@ export default defineComponent({
sortable: false, sortable: false,
}, },
{ {
name: 'idCard', name: 'accountNumber',
field: 'idCard', field: 'accountNumber',
required: true, required: true,
label: i18n.global.t('artist.bankAccount.tableColumnsBank.idCard'), label: i18n.global.t('artist.bankAccount.tableColumnsBank.idCard'),
align: 'center', align: 'center',
sortable: false, sortable: false,
}, },
{ {
name: 'numberCard', name: 'cardNumber',
field: 'numberCard', field: 'cardNumber',
required: true, required: true,
label: i18n.global.t('artist.bankAccount.tableColumnsBank.numberCard'), label: i18n.global.t('artist.bankAccount.tableColumnsBank.numberCard'),
align: 'center', align: 'center',
...@@ -48,8 +51,8 @@ export default defineComponent({ ...@@ -48,8 +51,8 @@ export default defineComponent({
sortable: false, sortable: false,
}, },
{ {
name: 'default', name: 'isDefault',
field: 'default', field: 'isDefault',
required: true, required: true,
label: i18n.global.t('artist.bankAccount.tableColumnsBank.default'), label: i18n.global.t('artist.bankAccount.tableColumnsBank.default'),
align: 'center', align: 'center',
...@@ -68,7 +71,7 @@ export default defineComponent({ ...@@ -68,7 +71,7 @@ export default defineComponent({
const pageIndex = ref(1); const pageIndex = ref(1);
const pageSize = ref(20); const pageSize = ref(20);
const totalPage = ref(10); const totalPage = ref(10);
const isOpenDialog: Ref<boolean> = ref(false); const isOpenDialog = ref(false);
const getListBankAccount = () => { const getListBankAccount = () => {
// const response = (await api({ // const response = (await api({
// url: API_PATHS.getListArtist, // url: API_PATHS.getListArtist,
......
...@@ -13,14 +13,14 @@ ...@@ -13,14 +13,14 @@
</div> </div>
<div class="col-12 q-mt-sm"> <div class="col-12 q-mt-sm">
<q-table <q-table
:rows="userTableRowsBankAccount" :rows="bankAccounts"
:columns="userTableColumnsBankAccount" :columns="userTableColumnsBankAccount"
:no-data-label="$t('emptyData')" :no-data-label="$t('emptyData')"
row-key="name" row-key="name"
separator="cell" separator="cell"
hide-pagination hide-pagination
> >
<template v-slot:body-cell-default="rowData"> <template v-slot:body-cell-isDefault="rowData">
<q-td> <q-td>
<div align="center"> <div align="center">
<q-checkbox v-model="rowData.value" /> <q-checkbox v-model="rowData.value" />
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</q-td> </q-td>
</template> </template>
</q-table> </q-table>
<div class="col-12 q-mt-sm"> <!-- <div class="col-12 q-mt-sm">
<Pagination <Pagination
v-model:currentPage="pageIndex" v-model:currentPage="pageIndex"
v-model:pageSize="pageSize" v-model:pageSize="pageSize"
...@@ -55,8 +55,8 @@ ...@@ -55,8 +55,8 @@
@update:pageSize="changePageSize" @update:pageSize="changePageSize"
@update:currentPage="getListBankAccount" @update:currentPage="getListBankAccount"
/> />
</div> </div> -->
<div class="col-12 q-mt-md"> <!-- <div class="col-12 q-mt-md">
<div class="row"> <div class="row">
<q-space></q-space> <q-space></q-space>
<div class="col-auto"> <div class="col-auto">
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
></q-btn> ></q-btn>
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
<AddNewBankAccountDialog <AddNewBankAccountDialog
v-model:is-open-dialog="isOpenDialog" v-model:is-open-dialog="isOpenDialog"
......
...@@ -5,6 +5,9 @@ export default defineComponent({ ...@@ -5,6 +5,9 @@ export default defineComponent({
components: { components: {
Pagination, Pagination,
}, },
props: {
products: { type: Array, required: true },
},
setup() { setup() {
const userTableColumnsHotProduct = [ const userTableColumnsHotProduct = [
{ {
...@@ -14,8 +17,8 @@ export default defineComponent({ ...@@ -14,8 +17,8 @@ export default defineComponent({
sortable: false, sortable: false,
}, },
{ {
name: 'productCode', name: 'code',
field: 'productCode', field: 'code',
required: true, required: true,
label: i18n.global.t( label: i18n.global.t(
'artist.hotProduct.tableColumnsProduct.productCode' 'artist.hotProduct.tableColumnsProduct.productCode'
...@@ -24,16 +27,16 @@ export default defineComponent({ ...@@ -24,16 +27,16 @@ export default defineComponent({
sortable: false, sortable: false,
}, },
{ {
name: 'urlEmbed', name: 'embeddedUrl',
field: 'urlEmbed', field: 'embeddedUrl',
required: true, required: true,
label: i18n.global.t('artist.hotProduct.tableColumnsProduct.urlEmbed'), label: i18n.global.t('artist.hotProduct.tableColumnsProduct.urlEmbed'),
align: 'center', align: 'center',
sortable: false, sortable: false,
}, },
{ {
name: 'productImage', name: 'imageUrl',
field: 'productImage', field: 'imageUrl',
required: true, required: true,
label: i18n.global.t( label: i18n.global.t(
'artist.hotProduct.tableColumnsProduct.productImage' 'artist.hotProduct.tableColumnsProduct.productImage'
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</div> </div>
<div class="col-12 q-mt-sm"> <div class="col-12 q-mt-sm">
<q-table <q-table
:rows="userTableRowsHotProduct" :rows="products"
:columns="userTableColumnsHotProduct" :columns="userTableColumnsHotProduct"
:no-data-label="$t('emptyData')" :no-data-label="$t('emptyData')"
row-key="name" row-key="name"
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</q-td> </q-td>
</template> </template>
</q-table> </q-table>
<div class="col-12 q-mt-sm"> <!-- <div class="col-12 q-mt-sm">
<Pagination <Pagination
v-model:currentPage="pageIndex" v-model:currentPage="pageIndex"
v-model:pageSize="pageSize" v-model:pageSize="pageSize"
...@@ -54,8 +54,8 @@ ...@@ -54,8 +54,8 @@
@update:pageSize="changePageSize" @update:pageSize="changePageSize"
@update:currentPage="getListHotProduct" @update:currentPage="getListHotProduct"
/> />
</div> </div> -->
<div class="col-12 q-mt-md"> <!-- <div class="col-12 q-mt-md">
<div class="row"> <div class="row">
<q-space></q-space> <q-space></q-space>
<div class="col-auto"> <div class="col-auto">
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
></q-btn> ></q-btn>
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
</div> </div>
</template> </template>
......
...@@ -329,7 +329,7 @@ ...@@ -329,7 +329,7 @@
</div> </div>
</div> </div>
</div> </div>
<q-space></q-space> <!-- <q-space></q-space>
<div class="col-12 q-mt-md"> <div class="col-12 q-mt-md">
<div class="row"> <div class="row">
<q-space></q-space> <q-space></q-space>
...@@ -350,7 +350,7 @@ ...@@ -350,7 +350,7 @@
</div> </div>
<div class="col-1"></div> <div class="col-1"></div>
</div> </div>
</div> </div> -->
</div> </div>
</template> </template>
......
...@@ -171,7 +171,7 @@ export default { ...@@ -171,7 +171,7 @@ export default {
toolTipMessage: { toolTipMessage: {
updateInfo: 'Cập nhật', updateInfo: 'Cập nhật',
information: 'Thông tin', information: 'Thông tin',
delete: 'Xóa' delete: 'Xóa',
}, },
crudActions: { crudActions: {
save: 'Lưu', save: 'Lưu',
...@@ -191,12 +191,14 @@ export default { ...@@ -191,12 +191,14 @@ export default {
confirmActionsTitle: { confirmActionsTitle: {
confirmDeleteManagingUnitsTitle: 'Xác nhận', confirmDeleteManagingUnitsTitle: 'Xác nhận',
confirmDeleteManagingUnitsCancelBtnLabel: 'Huỷ', confirmDeleteManagingUnitsCancelBtnLabel: 'Huỷ',
confirmDeleteManagingUnitsContent: 'Bạn có chắc muốn xoá Đơn vị chủ quản này?', confirmDeleteManagingUnitsContent:
'Bạn có chắc muốn xoá Đơn vị chủ quản này?',
}, },
actionMessages: { actionMessages: {
addNewManagingUnitsAccess: 'Thêm Đơn vị chủ quản thành công', addNewManagingUnitsAccess: 'Thêm Đơn vị chủ quản thành công',
deleteManagingUnitsAccess: 'Xoá Đơn vị chủ quản thành công', deleteManagingUnitsAccess: 'Xoá Đơn vị chủ quản thành công',
updateManagingUnitsAccess: 'Cập nhật thông tin Đơn vị chủ quản thành công', updateManagingUnitsAccess:
'Cập nhật thông tin Đơn vị chủ quản thành công',
}, },
}, },
...@@ -358,6 +360,14 @@ export default { ...@@ -358,6 +360,14 @@ export default {
updateArtist: 'Cập nhật nghệ sỹ', updateArtist: 'Cập nhật nghệ sỹ',
}, },
}, },
confirmActionsTitle: {
confirmDeleteArtistTitle: 'Xác nhận',
confirmDeleteArtistContent: 'Bạn có chắc muốn xoá nghệ sỹ này không?',
confirmDeleteArtistBtnLabel: 'Huỷ',
},
actionMessages: {
deleteArtistAccess: 'Xoá nghệ sỹ thành công',
},
artistInformation: { artistInformation: {
tabLabel: { tabLabel: {
personalInformation: 'Thông tin cá nhân', personalInformation: 'Thông tin cá nhân',
...@@ -365,6 +375,7 @@ export default { ...@@ -365,6 +375,7 @@ export default {
bankAcount: 'Tài khoản ngân hàng thụ hưởng', bankAcount: 'Tài khoản ngân hàng thụ hưởng',
hotProduct: 'Sản phẩm nổi bật', hotProduct: 'Sản phẩm nổi bật',
}, },
titleDataField: { titleDataField: {
id: 'ID', id: 'ID',
artistCode: 'Mã nghệ sỹ', artistCode: 'Mã nghệ sỹ',
......
...@@ -62,17 +62,43 @@ ...@@ -62,17 +62,43 @@
></PersonalInformation> ></PersonalInformation>
</q-tab-panel> </q-tab-panel>
<q-tab-panel name="vabAccount"> <q-tab-panel name="vabAccount">
<VabAccount></VabAccount> <VabAccount
v-model:account="account"
v-model:short-description="shortDescription"
:social-embedded="socialEmbedded"
:banners="banners"
:stories="stories"
></VabAccount>
</q-tab-panel> </q-tab-panel>
<q-tab-panel name="bankAccount"> <q-tab-panel name="bankAccount">
<BankAccount></BankAccount> <BankAccount :bank-accounts="bankAccounts"></BankAccount>
</q-tab-panel> </q-tab-panel>
<q-tab-panel name="hotProduct"> <q-tab-panel name="hotProduct">
<HotProduct></HotProduct> <HotProduct :products="products"></HotProduct>
</q-tab-panel> </q-tab-panel>
</q-tab-panels> </q-tab-panels>
</q-card> </q-card>
</div> </div>
<div class="col-12 q-mt-md">
<div class="row">
<q-space></q-space>
<div class="col-auto">
<q-btn
to="/nghe-sy"
color="grey"
no-caps
:label="$t('crudActions.back')"
></q-btn>
</div>
<div class="col-auto q-mx-md">
<q-btn
color="primary"
no-caps
:label="$t('crudActions.update')"
></q-btn>
</div>
</div>
</div>
</div> </div>
</template> </template>
......
...@@ -14,6 +14,10 @@ import { ...@@ -14,6 +14,10 @@ import {
ArtistLevelType, ArtistLevelType,
QualificationType, QualificationType,
WorkType, WorkType,
BankAccountType,
ProductType,
BannerType,
StoriesType,
} from 'src/assets/type'; } from 'src/assets/type';
export default defineComponent({ export default defineComponent({
...@@ -48,8 +52,8 @@ export default defineComponent({ ...@@ -48,8 +52,8 @@ export default defineComponent({
{ id: 1, name: 'Nam' }, { id: 1, name: 'Nam' },
{ id: 2, name: 'Nữ' }, { id: 2, name: 'Nữ' },
]); ]);
const id: Ref<number> = ref(0); const id: Ref<number> = ref(0);
const account: Ref<string> = ref('');
const artistCode: Ref<string> = ref(''); const artistCode: Ref<string> = ref('');
const fullName: Ref<string> = ref(''); const fullName: Ref<string> = ref('');
const artistName: Ref<string | null | undefined> = ref(); const artistName: Ref<string | null | undefined> = ref();
...@@ -84,8 +88,14 @@ export default defineComponent({ ...@@ -84,8 +88,14 @@ export default defineComponent({
const facebookMessage: Ref<string | null | undefined> = ref(); const facebookMessage: Ref<string | null | undefined> = ref();
const instagram: Ref<string | null | undefined> = ref(); const instagram: Ref<string | null | undefined> = ref();
const whatsapp: Ref<string | null | undefined> = ref(); const whatsapp: Ref<string | null | undefined> = ref();
const bankAccounts: Ref<BankAccountType[]> = ref([]);
const products: Ref<ProductType[]> = ref([]);
const banners: Ref<BannerType[]> = ref([]);
const shortDescription: Ref<string | null> = ref('');
const socialEmbedded: Ref<string | null> = ref('');
const stories: Ref<StoriesType[]> = ref([]);
const route = useRoute(); const route = useRoute();
const getInformationArtist = async () => { const getInformationArtist = async () => {
const response = (await api({ const response = (await api({
url: API_PATHS.getDetailArtist, url: API_PATHS.getDetailArtist,
...@@ -95,10 +105,11 @@ export default defineComponent({ ...@@ -95,10 +105,11 @@ export default defineComponent({
console.log(response, 'Artist Detail Info'); console.log(response, 'Artist Detail Info');
const ArtistInformation = response.data.data; const ArtistInformation = response.data.data;
id.value = ArtistInformation.id; id.value = ArtistInformation.id;
account.value = ArtistInformation.account;
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 = ArtistInformation.birthday; birthday.value = ArtistInformation.birthday;
address.value = ArtistInformation.address; address.value = ArtistInformation.address;
status.value = ArtistInformation.status; status.value = ArtistInformation.status;
phoneNumber.value = ArtistInformation.phoneNumber; phoneNumber.value = ArtistInformation.phoneNumber;
...@@ -113,6 +124,11 @@ export default defineComponent({ ...@@ -113,6 +124,11 @@ export default defineComponent({
artistLevel.value = ArtistInformation.artistLevel; artistLevel.value = ArtistInformation.artistLevel;
sex.value = ArtistInformation.sex; sex.value = ArtistInformation.sex;
fields.value = ArtistInformation.fields; fields.value = ArtistInformation.fields;
bankAccounts.value = ArtistInformation.bankAccounts;
products.value = ArtistInformation.products;
banners.value = ArtistInformation.banners;
socialEmbedded.value = ArtistInformation.socialEmbedded;
stories.value = ArtistInformation.stories;
}; };
const getFieldOptions = async () => { const getFieldOptions = async () => {
...@@ -198,6 +214,7 @@ export default defineComponent({ ...@@ -198,6 +214,7 @@ export default defineComponent({
facebookMessage, facebookMessage,
instagram, instagram,
whatsapp, whatsapp,
socialEmbedded,
sexOptions, sexOptions,
fieldOptions, fieldOptions,
nationalityOptions, nationalityOptions,
...@@ -209,6 +226,12 @@ export default defineComponent({ ...@@ -209,6 +226,12 @@ export default defineComponent({
getArtistLevelOptions, getArtistLevelOptions,
getQualificationOptions, getQualificationOptions,
getWorkOptions, getWorkOptions,
bankAccounts,
products,
account,
banners,
shortDescription,
stories,
}; };
}, },
}); });
import { i18n } from 'src/boot/i18n'; import { i18n } from 'src/boot/i18n';
import { defineComponent, onMounted, ref, Ref } from 'vue'; import { defineComponent, onMounted, ref, Ref } from 'vue';
import { Dialog, Notify } from 'quasar';
import { import {
PaginationResponse, PaginationResponse,
ArtistInfoType, ArtistInfoType,
...@@ -193,7 +194,6 @@ export default defineComponent({ ...@@ -193,7 +194,6 @@ export default defineComponent({
fieldOptions.value = response.data.data; fieldOptions.value = response.data.data;
} }
}; };
const getNationalityOptions = async () => { const getNationalityOptions = async () => {
const response = (await api({ const response = (await api({
url: API_PATHS.getNationalityOptions, url: API_PATHS.getNationalityOptions,
...@@ -234,6 +234,42 @@ export default defineComponent({ ...@@ -234,6 +234,42 @@ export default defineComponent({
workOptions.value = response.data.data; workOptions.value = response.data.data;
} }
}; };
const confirmDeleteArtist = (id: number) => {
Dialog.create({
title: i18n.global.t(
'artist.confirmActionsTitle.confirmDeleteArtistTitle'
),
message: i18n.global.t(
'artist.confirmActionsTitle.confirmDeleteArtistContent'
),
cancel: i18n.global.t(
'artist.confirmActionsTitle.confirmDeleteArtistBtnLabel'
),
color: 'negative',
}).onOk(() => {
void deleteArtist(id);
});
};
const deleteArtist = async (id: number) => {
try {
const deleteResult = (await api({
url: API_PATHS.deleteArtist,
method: 'GET',
params: {
artistId: id,
},
})) as AxiosResponse<BaseResponseBody<unknown>>;
if (deleteResult.data.error.code === config.API_RES_CODE.OK.code) {
Notify.create({
type: 'positive',
message: i18n.global.t('artist.actionMessages.deleteArtistAccess'),
});
void getListArtists();
}
} catch (error) {}
};
onMounted(() => { onMounted(() => {
void getListArtists(); void getListArtists();
void getFieldOptions(); void getFieldOptions();
...@@ -286,6 +322,8 @@ export default defineComponent({ ...@@ -286,6 +322,8 @@ export default defineComponent({
getArtistLevelOptions, getArtistLevelOptions,
getQualificationOptions, getQualificationOptions,
getWorkOptions, getWorkOptions,
confirmDeleteArtist,
deleteArtist,
}; };
}, },
}); });
...@@ -71,11 +71,6 @@ ...@@ -71,11 +71,6 @@
> >
<template v-slot:body-cell-action="item"> <template v-slot:body-cell-action="item">
<q-td style="padding: 0" class="flex flex-center"> <q-td style="padding: 0" class="flex flex-center">
<q-btn flat round color="primary" icon="mdi-information-outline">
<q-tooltip :offset="[20, 10]">{{
$t('userPage.toolTipMessage.informationUser')
}}</q-tooltip>
</q-btn>
<q-btn <q-btn
flat flat
round round
...@@ -87,6 +82,17 @@ ...@@ -87,6 +82,17 @@
$t('userPage.toolTipMessage.updateUserInfo') $t('userPage.toolTipMessage.updateUserInfo')
}}</q-tooltip> }}</q-tooltip>
</q-btn> </q-btn>
<q-btn
flat
round
color="primary"
icon="mdi-delete"
@click="confirmDeleteArtist(item.row.id)"
>
<q-tooltip :offset="[20, 10]">{{
$t('managingUnit.toolTipMessage.delete')
}}</q-tooltip>
</q-btn>
</q-td> </q-td>
</template> </template>
</q-table> </q-table>
......
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