update

parent 2aad3d47
...@@ -115,8 +115,8 @@ export default defineComponent({ ...@@ -115,8 +115,8 @@ export default defineComponent({
const qualification: Ref<QualificationType | null> = ref(null); const qualification: Ref<QualificationType | null> = ref(null);
const artistLevel: Ref<ArtistLevelType | null> = ref(null); const artistLevel: Ref<ArtistLevelType | null> = ref(null);
const status: Ref<number> = ref(1); const status: Ref<number> = ref(1);
const fields: Ref<FieldType | null> = ref(null); const fields: Ref<FieldType[]> = ref([]);
const fieldsPrivate: Ref<FieldType | null> = ref(null); const fieldsPrivate: Ref<FieldType[]> = ref([]);
const works: Ref<WorkType[]> = ref([]); const works: Ref<WorkType[]> = ref([]);
const phoneNumber: Ref<string | null> = ref(null); const phoneNumber: Ref<string | null> = ref(null);
const email: Ref<string | null> = ref(null); const email: Ref<string | null> = ref(null);
...@@ -195,9 +195,9 @@ export default defineComponent({ ...@@ -195,9 +195,9 @@ export default defineComponent({
(value) => { (value) => {
if (value !== null) { if (value !== null) {
if (value === fieldsPrivate.value) { if (value === fieldsPrivate.value) {
void getWorkOptions(); // void getWorkOptions();
} else { } else {
void getWorkOptions(); // void getWorkOptions();
works.value = []; works.value = [];
} }
} else { } else {
...@@ -393,9 +393,9 @@ export default defineComponent({ ...@@ -393,9 +393,9 @@ export default defineComponent({
works.value = ArtistInformation.works; works.value = ArtistInformation.works;
artistLevel.value = ArtistInformation.artistLevel; artistLevel.value = ArtistInformation.artistLevel;
sex.value = ArtistInformation.sex; sex.value = ArtistInformation.sex;
fields.value = ArtistInformation.fields[0]; fields.value = ArtistInformation.fields;
fieldsPrivate.value = ArtistInformation.fields[0]; fieldsPrivate.value = ArtistInformation.fields;
bankAccounts.value = ArtistInformation.bankAccounts; bankAccounts.value = ArtistInformation.bankAccounts;
products.value = ArtistInformation.products; products.value = ArtistInformation.products;
...@@ -448,18 +448,18 @@ export default defineComponent({ ...@@ -448,18 +448,18 @@ export default defineComponent({
professionOptions.value = response.data.data; professionOptions.value = response.data.data;
} }
}; };
const getWorkOptions = async () => { // const getWorkOptions = async () => {
const response = (await api({ // const response = (await api({
url: API_PATHS.getWorkOptions, // url: API_PATHS.getWorkOptions,
method: 'GET', // method: 'GET',
params: { // params: {
fieldId: fields.value?.id, // fieldId: fields.value?.id,
}, // },
})) as AxiosResponse<BaseResponseBody<WorkType[]>>; // })) as AxiosResponse<BaseResponseBody<WorkType[]>>;
if (response.data.error.code === config.API_RES_CODE.OK.code) { // if (response.data.error.code === config.API_RES_CODE.OK.code) {
workOptions.value = response.data.data; // workOptions.value = response.data.data;
} // }
}; // };
const getProvinceOptions = async () => { const getProvinceOptions = async () => {
const response = (await api({ const response = (await api({
...@@ -917,7 +917,7 @@ export default defineComponent({ ...@@ -917,7 +917,7 @@ export default defineComponent({
artistLevel: artistLevel.value, artistLevel: artistLevel.value,
// fields: fields.value === null ? [] : [fields.value], // fields: fields.value === null ? [] : [fields.value],
// fields: fields.value === null ? [] : [fields.value], // fields: fields.value === null ? [] : [fields.value],
fields: [], fields: fields.value,
nationality: nationality.value, nationality: nationality.value,
qualification: qualification.value, qualification: qualification.value,
works: works.value, works: works.value,
...@@ -1020,7 +1020,7 @@ export default defineComponent({ ...@@ -1020,7 +1020,7 @@ export default defineComponent({
getNationalityOptions, getNationalityOptions,
getArtistLevelOptions, getArtistLevelOptions,
getQualificationOptions, getQualificationOptions,
getWorkOptions, // getWorkOptions,
getMusicTypeOptions, getMusicTypeOptions,
bankAccounts, bankAccounts,
products, products,
......
...@@ -151,40 +151,44 @@ export default defineComponent({ ...@@ -151,40 +151,44 @@ export default defineComponent({
} catch (error) {} } catch (error) {}
}; };
// const confirmDelete = (id: number) => { const confirmDelete = (id: number) => {
// Dialog.create({ Dialog.create({
// title: i18n.global.t( title: i18n.global.t(
// 'artist.bankAccount.confirmActionsTitle.confirmDeleteAccBankTitle' 'artist.bankAccount.confirmActionsTitle.confirmDeleteAccBankTitle'
// ), ),
// message: i18n.global.t( message: i18n.global.t(
// 'postCategory.confirmActionsTitle.confirmDeletePostCategory' 'postCategory.confirmActionsTitle.confirmDeletePostCategory'
// ), ),
// cancel: i18n.global.t( cancel: i18n.global.t(
// 'artist.bankAccount.confirmActionsTitle.confirmDeleteAccBankBtnLabel' 'artist.bankAccount.confirmActionsTitle.confirmDeleteAccBankBtnLabel'
// ), ),
// color: 'negative', color: 'negative',
// }).onOk(async () => { }).onOk(() => {
// try { void deletePost(id);
// const response = (await api({ });
// url: API_PATHS.deleteCategoryPost, };
// method: 'GET', const deletePost = async (id: number) => {
// params: { try {
// id: id, const response = (await api({
// }, url: API_PATHS.deleteCategoryPost,
// })) as AxiosResponse<BaseResponseBody<unknown>>; method: 'GET',
// if (response.data.error.code === config.API_RES_CODE.OK.code) { params: {
// Notify.create({ id: id,
// type: 'positive', },
// message: i18n.global.t( })) as AxiosResponse<BaseResponseBody<unknown>>;
// 'postCategory.actionMessages.deletePostCategoryAccess' if (response.data.error.code === config.API_RES_CODE.OK.code) {
// ), Notify.create({
// actions: [{ icon: 'close', color: 'white' }], type: 'positive',
// }); message: i18n.global.t(
// void getListCategoryPost(); 'postCategory.actionMessages.deletePostCategoryAccess'
// } ),
// } catch (error) {} actions: [{ icon: 'close', color: 'white' }],
// }); });
// }; void getListCategoryPost();
}
} catch (error) {}
};
const openUpdateDialog = async (id: number) => { const openUpdateDialog = async (id: number) => {
await getDetailCategoryPost(id); await getDetailCategoryPost(id);
isOpenUpdateDialog.value = true; isOpenUpdateDialog.value = true;
...@@ -247,7 +251,7 @@ export default defineComponent({ ...@@ -247,7 +251,7 @@ export default defineComponent({
getLanguages, getLanguages,
languages, languages,
addPostCategory, addPostCategory,
// confirmDelete, confirmDelete,
openUpdateDialog, openUpdateDialog,
detailPostCategory, detailPostCategory,
updatePostCategory, updatePostCategory,
......
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