Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quasar-web-base
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nguyễn Hải Sơn
quasar-web-base
Commits
21d181b6
Commit
21d181b6
authored
Dec 12, 2022
by
Nguyễn Đức Thắng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
2aad3d47
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
55 deletions
+59
-55
updateInformationArtist.ts
...ges/cap-nhat-thong-tin-nghe-sy/updateInformationArtist.ts
+20
-20
CategoryPost.ts
src/pages/danh-muc-bai-viet/CategoryPost.ts
+39
-35
No files found.
src/pages/cap-nhat-thong-tin-nghe-sy/updateInformationArtist.ts
View file @
21d181b6
...
...
@@ -115,8 +115,8 @@ export default defineComponent({
const
qualification
:
Ref
<
QualificationType
|
null
>
=
ref
(
null
);
const
artistLevel
:
Ref
<
ArtistLevelType
|
null
>
=
ref
(
null
);
const
status
:
Ref
<
number
>
=
ref
(
1
);
const
fields
:
Ref
<
FieldType
|
null
>
=
ref
(
null
);
const
fieldsPrivate
:
Ref
<
FieldType
|
null
>
=
ref
(
null
);
const
fields
:
Ref
<
FieldType
[]
>
=
ref
([]
);
const
fieldsPrivate
:
Ref
<
FieldType
[]
>
=
ref
([]
);
const
works
:
Ref
<
WorkType
[]
>
=
ref
([]);
const
phoneNumber
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
email
:
Ref
<
string
|
null
>
=
ref
(
null
);
...
...
@@ -195,9 +195,9 @@ export default defineComponent({
(
value
)
=>
{
if
(
value
!==
null
)
{
if
(
value
===
fieldsPrivate
.
value
)
{
void
getWorkOptions
();
//
void getWorkOptions();
}
else
{
void
getWorkOptions
();
//
void getWorkOptions();
works
.
value
=
[];
}
}
else
{
...
...
@@ -393,9 +393,9 @@ export default defineComponent({
works
.
value
=
ArtistInformation
.
works
;
artistLevel
.
value
=
ArtistInformation
.
artistLevel
;
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
;
products
.
value
=
ArtistInformation
.
products
;
...
...
@@ -448,18 +448,18 @@ export default defineComponent({
professionOptions
.
value
=
response
.
data
.
data
;
}
};
const
getWorkOptions
=
async
()
=>
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
getWorkOptions
,
method
:
'GET'
,
params
:
{
fieldId
:
fields
.
value
?.
id
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
WorkType
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
workOptions
.
value
=
response
.
data
.
data
;
}
};
//
const getWorkOptions = async () => {
//
const response = (await api({
//
url: API_PATHS.getWorkOptions,
//
method: 'GET',
//
params: {
//
fieldId: fields.value?.id,
//
},
//
})) as AxiosResponse<BaseResponseBody<WorkType[]>>;
//
if (response.data.error.code === config.API_RES_CODE.OK.code) {
//
workOptions.value = response.data.data;
//
}
//
};
const
getProvinceOptions
=
async
()
=>
{
const
response
=
(
await
api
({
...
...
@@ -917,7 +917,7 @@ export default defineComponent({
artistLevel
:
artistLevel
.
value
,
// fields: fields.value === null ? [] : [fields.value],
// fields: fields.value === null ? [] : [fields.value],
fields
:
[]
,
fields
:
fields
.
value
,
nationality
:
nationality
.
value
,
qualification
:
qualification
.
value
,
works
:
works
.
value
,
...
...
@@ -1020,7 +1020,7 @@ export default defineComponent({
getNationalityOptions
,
getArtistLevelOptions
,
getQualificationOptions
,
getWorkOptions
,
//
getWorkOptions,
getMusicTypeOptions
,
bankAccounts
,
products
,
...
...
src/pages/danh-muc-bai-viet/CategoryPost.ts
View file @
21d181b6
...
...
@@ -151,40 +151,44 @@ export default defineComponent({
}
catch
(
error
)
{}
};
// const confirmDelete = (id: number) => {
// Dialog.create({
// title: i18n.global.t(
// 'artist.bankAccount.confirmActionsTitle.confirmDeleteAccBankTitle'
// ),
// message: i18n.global.t(
// 'postCategory.confirmActionsTitle.confirmDeletePostCategory'
// ),
// cancel: i18n.global.t(
// 'artist.bankAccount.confirmActionsTitle.confirmDeleteAccBankBtnLabel'
// ),
// color: 'negative',
// }).onOk(async () => {
// try {
// const response = (await api({
// url: API_PATHS.deleteCategoryPost,
// method: 'GET',
// params: {
// id: id,
// },
// })) as AxiosResponse<BaseResponseBody<unknown>>;
// if (response.data.error.code === config.API_RES_CODE.OK.code) {
// Notify.create({
// type: 'positive',
// message: i18n.global.t(
// 'postCategory.actionMessages.deletePostCategoryAccess'
// ),
// actions: [{ icon: 'close', color: 'white' }],
// });
// void getListCategoryPost();
// }
// } catch (error) {}
// });
// };
const
confirmDelete
=
(
id
:
number
)
=>
{
Dialog
.
create
({
title
:
i18n
.
global
.
t
(
'artist.bankAccount.confirmActionsTitle.confirmDeleteAccBankTitle'
),
message
:
i18n
.
global
.
t
(
'postCategory.confirmActionsTitle.confirmDeletePostCategory'
),
cancel
:
i18n
.
global
.
t
(
'artist.bankAccount.confirmActionsTitle.confirmDeleteAccBankBtnLabel'
),
color
:
'negative'
,
}).
onOk
(()
=>
{
void
deletePost
(
id
);
});
};
const
deletePost
=
async
(
id
:
number
)
=>
{
try
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
deleteCategoryPost
,
method
:
'GET'
,
params
:
{
id
:
id
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
unknown
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
Notify
.
create
({
type
:
'positive'
,
message
:
i18n
.
global
.
t
(
'postCategory.actionMessages.deletePostCategoryAccess'
),
actions
:
[{
icon
:
'close'
,
color
:
'white'
}],
});
void
getListCategoryPost
();
}
}
catch
(
error
)
{}
};
const
openUpdateDialog
=
async
(
id
:
number
)
=>
{
await
getDetailCategoryPost
(
id
);
isOpenUpdateDialog
.
value
=
true
;
...
...
@@ -247,7 +251,7 @@ export default defineComponent({
getLanguages
,
languages
,
addPostCategory
,
//
confirmDelete,
confirmDelete
,
openUpdateDialog
,
detailPostCategory
,
updatePostCategory
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment