Commit 38f4dc40 authored by Tình Trương's avatar Tình Trương

update

parent fd8fdb8f
......@@ -507,3 +507,9 @@ export type AddConfigSystem = {
content: string;
url: string;
};
export type EmbelType = {
id: number;
linkEmbed: string;
status: number;
};
......@@ -3,7 +3,7 @@ import { i18n } from 'src/boot/i18n';
import { useRouter } from 'vue-router';
import { BannerType, StoriesType } from 'src/assets/type';
import UploadImage from 'components/upload-image/index.vue';
import { Dialog } from 'quasar';
import { Dialog, Notify } from 'quasar';
import { config } from 'src/assets/configurations';
export default defineComponent({
......@@ -46,6 +46,11 @@ export default defineComponent({
];
const uploadBanner = (value: FileList) => {
context.emit('selectedFile', encodeImageFileAsURL(value[0]));
Notify.create({
type: 'positive',
message: i18n.global.t('artist.actionMessages.bannerAddAccess'),
actions: [{ icon: 'close', color: 'white' }],
});
};
const encodeImageFileAsURL = (file: File) => {
return { url: URL.createObjectURL(file), file: file };
......@@ -64,6 +69,11 @@ export default defineComponent({
color: 'negative',
}).onOk(() => {
context.emit('deleteBanner', index);
Notify.create({
type: 'positive',
message: i18n.global.t('artist.actionMessages.bannerDeleteAccess'),
actions: [{ icon: 'close', color: 'white' }],
});
});
};
const deleteStory = (storyIdx: number) => {
......
......@@ -455,6 +455,12 @@ export default {
deleteArtistAccess: 'Xoá nghệ sỹ thành công',
editArtistAccess: 'Cập nhật thông tin nghệ sỹ thành công',
addNewArtistAccess: 'Thêm nghệ sỹ thành công',
EmbedAddSuccess: 'Thêm link Embed thành công',
EmbedUpdateSuccess: 'Cập nhập link Embed thành công',
EmbedDeleteSuccess: 'Xóa link Embed thành công',
StoryAddSuccess: 'Thêm Story thành công',
bannerDeleteAccess: 'Xóa banner thành công',
bannerAddAccess: 'Thêm banner thành công',
},
artistInformation: {
tabLabel: {
......
......@@ -8,7 +8,6 @@ import { i18n } from 'src/boot/i18n';
import { Dialog, Notify } from 'quasar';
import { Router } from 'src/router';
import { Pages } from 'src/router/routes';
import PersonalInformation from 'components/artist-information/personal-information/index.vue';
import VabAccount from 'components/artist-information/VAB-account/index.vue';
import BankAccount from 'components/artist-information/bank-account/index.vue';
......@@ -311,15 +310,6 @@ export default defineComponent({
}
);
watch(
() => formatSchedules.value,
(value) => {
if (value) {
console.log(value, 'aaa');
}
}
);
const getInformationArtist = async () => {
const response = (await api({
url: API_PATHS.getDetailArtist,
......@@ -558,16 +548,31 @@ export default defineComponent({
color: 'negative',
}).onOk(() => {
socialEmbedded.value = null;
Notify.create({
type: 'positive',
message: i18n.global.t('artist.actionMessages.EmbedDeleteSuccess'),
actions: [{ icon: 'close', color: 'white' }],
});
});
};
const changeEmbed = (newEmbed: string | null) => {
socialEmbedded.value = newEmbed;
isOpenDialogEmbed.value = false;
Notify.create({
type: 'positive',
message: i18n.global.t('artist.actionMessages.EmbedUpdateSuccess'),
actions: [{ icon: 'close', color: 'white' }],
});
};
const addStory = (value: StoriesType) => {
stories.value.push(value);
Notify.create({
type: 'positive',
message: i18n.global.t('artist.actionMessages.StoryAddSuccess'),
actions: [{ icon: 'close', color: 'white' }],
});
};
const deleteStory = (idx: number) => {
......
......@@ -489,6 +489,11 @@ export default defineComponent({
color: 'negative',
}).onOk(() => {
socialEmbedded.value = null;
Notify.create({
type: 'positive',
message: i18n.global.t('artist.actionMessages.EmbedDeleteSuccess'),
actions: [{ icon: 'close', color: 'white' }],
});
});
};
......
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