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
04c9d6e0
Commit
04c9d6e0
authored
May 05, 2022
by
Nguyễn Đức Thắng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
24053998
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
102 additions
and
47 deletions
+102
-47
type.ts
src/assets/type.ts
+2
-0
index.vue
...ponents/artist-information/personal-information/index.vue
+1
-1
index.vue
src/pages/cap-nhat-thong-tin-nghe-sy/index.vue
+3
-0
updateInformationArtist.ts
...ges/cap-nhat-thong-tin-nghe-sy/updateInformationArtist.ts
+80
-32
AddArtist.ts
src/pages/them-nghe-sy/AddArtist.ts
+16
-14
No files found.
src/assets/type.ts
View file @
04c9d6e0
...
...
@@ -66,6 +66,8 @@ export type ArtistInfoType = {
banners
:
BannerType
[];
products
:
ProductType
[];
schedules
:
SchedulesType
[];
musicTypeDto
:
MusicType
[];
provinceDto
:
ProvinceType
[];
stories
:
StoriesType
[];
mnName
:
string
|
null
;
mnPhone
:
string
|
null
;
...
...
src/components/artist-information/personal-information/index.vue
View file @
04c9d6e0
...
...
@@ -227,7 +227,7 @@
@
update:model-value=
"$emit('update:address', $event)"
:options=
"provinceOptions"
option-value=
"
n
ame"
option-value=
"
fullN
ame"
option-label=
"fullName"
type=
"text"
class=
"q-my-sm"
...
...
src/pages/cap-nhat-thong-tin-nghe-sy/index.vue
View file @
04c9d6e0
...
...
@@ -32,6 +32,7 @@
<q-tab-panels
v-model=
"tab"
animated
>
<q-tab-panel
name=
"information"
>
<PersonalInformation
v-model:musics=
"musics"
:id=
"id"
v-model:artist-code=
"artistCode"
:avatar=
"avatar"
...
...
@@ -88,6 +89,8 @@
:profession-options=
"professionOptions"
:artist-level-options=
"artistLevelOptions"
:work-options=
"workOptions"
:province-options=
"provinceOptions"
:music-options=
"musicOptions"
@
SetAvatar=
"setAvatar($event)"
@
deleteAvatar=
"deleteAvatar"
@
UpdateBirtday=
"UpdateBirtday($event)"
...
...
src/pages/cap-nhat-thong-tin-nghe-sy/updateInformationArtist.ts
View file @
04c9d6e0
...
...
@@ -35,6 +35,8 @@ import {
CardBankType
,
TypeCardType
,
FileUploadType
,
MusicType
,
ProvinceType
,
}
from
'src/assets/type'
;
export
type
AvatarType
=
{
file
?:
File
;
...
...
@@ -79,6 +81,7 @@ export default defineComponent({
const
cardBankOptions
:
Ref
<
CardBankType
[]
>
=
ref
([]);
const
typeBankOptions
:
Ref
<
TypeCardType
[]
>
=
ref
([]);
const
workOptions
:
Ref
<
WorkType
[]
>
=
ref
([]);
const
musicOptions
:
Ref
<
MusicType
[]
>
=
ref
([]);
const
sexOptions
=
ref
([
{
id
:
1
,
name
:
'Nam'
},
{
id
:
2
,
name
:
'Nữ'
},
...
...
@@ -109,7 +112,6 @@ export default defineComponent({
const
mnEmail
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
qualification
:
Ref
<
QualificationType
|
null
>
=
ref
(
null
);
const
artistLevel
:
Ref
<
ArtistLevelType
|
null
>
=
ref
(
null
);
const
address
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
status
:
Ref
<
number
>
=
ref
(
1
);
const
fields
:
Ref
<
FieldType
|
null
>
=
ref
(
null
);
const
fieldsPrivate
:
Ref
<
FieldType
|
null
>
=
ref
(
null
);
...
...
@@ -143,9 +145,13 @@ export default defineComponent({
//state hot product
const
products
:
Ref
<
ProductType
[]
>
=
ref
([]);
const
statusHotProduct
:
Ref
<
number
>
=
ref
(
2
);
const
address
:
Ref
<
ProvinceType
[]
>
=
ref
([])
const
DataInsertHotProduct
:
Ref
<
ProductType
|
null
>
=
ref
(
null
);
const
DataUpdateHotProduct
:
Ref
<
ProductType
|
null
>
=
ref
(
null
);
const
musics
:
Ref
<
MusicType
[]
>
=
ref
([]);
const
provinceOptions
:
Ref
<
ProvinceType
[]
>
=
ref
([]);
//sate error input thong-tin-ca-nhan
const
check_infoBooking
=
ref
(
false
);
const
artistCodeRules
=
ref
(
false
);
...
...
@@ -163,6 +169,7 @@ export default defineComponent({
const
workRules
=
ref
(
false
);
const
qualificationRules
=
ref
(
false
);
const
artistLevelRules
=
ref
(
false
);
const
musicRules
=
ref
(
false
);
const
errorMessEmail
=
ref
(
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireEmail'
)
);
...
...
@@ -197,6 +204,14 @@ export default defineComponent({
}
}
);
watch
(
()
=>
musics
.
value
,
(
value
)
=>
{
if
(
value
)
{
musicRules
.
value
=
false
;
}
}
);
watch
(
()
=>
artistCode
.
value
,
(
value
)
=>
{
...
...
@@ -237,14 +252,14 @@ export default defineComponent({
}
}
);
watch
(
()
=>
address
.
value
,
(
value
)
=>
{
if
(
value
)
{
addressRules
.
value
=
false
;
}
}
);
//
watch(
//
() => address.value,
//
(value) => {
//
if (value) {
//
addressRules.value = false;
//
}
//
}
//
);
watch
(
()
=>
phoneNumber
.
value
,
(
value
)
=>
{
...
...
@@ -325,6 +340,7 @@ export default defineComponent({
params
:
{
artistId
:
route
.
params
.
id
},
}))
as
AxiosResponse
<
BaseResponseBody
<
ArtistInfoType
>>
;
const
ArtistInformation
=
response
.
data
.
data
;
id
.
value
=
ArtistInformation
.
id
;
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
...
...
@@ -337,11 +353,12 @@ export default defineComponent({
artistCode
.
value
=
ArtistInformation
.
artistCode
;
fullName
.
value
=
ArtistInformation
.
fullName
;
artistName
.
value
=
ArtistInformation
.
artistName
;
// birthday.value = moment(
// ArtistInformation.birthday,
// 'DD/MM/YYYY HH:mm:ss'
// ).format('DD/MM/YYYY');
address
.
value
=
ArtistInformation
.
address
;
birthday
.
value
=
moment
(
ArtistInformation
.
birthday
,
'DD/MM/YYYY HH:mm:ss'
).
format
(
'DD/MM/YYYY'
);
// chooseAddress.value = ArtistInformation.address
status
.
value
=
ArtistInformation
.
status
;
phoneNumber
.
value
=
ArtistInformation
.
phoneNumber
;
email
.
value
=
ArtistInformation
.
email
;
...
...
@@ -371,14 +388,11 @@ export default defineComponent({
socialEmbedded
.
value
=
ArtistInformation
.
socialEmbedded
;
stories
.
value
=
ArtistInformation
.
stories
;
schedules
.
value
=
ArtistInformation
.
schedules
;
for
(
let
index
=
0
;
index
<
schedules
.
value
.
length
;
index
++
)
{
const
element
=
schedules
.
value
[
index
];
formatSchedules
.
value
.
push
(
moment
(
element
.
scheduleTime
,
'DD/MM/YYYY HH:mm:ss'
).
format
(
'YYYY/MM/DD'
)
);
}
musics
.
value
=
ArtistInformation
.
musicTypeDto
;
address
.
value
=
ArtistInformation
.
provinceDto
;
// console.log(provinceOptions.value,'12312312');
};
const
getFieldOptions
=
async
()
=>
{
...
...
@@ -435,6 +449,30 @@ export default defineComponent({
}
};
const
getProvinceOptions
=
async
()
=>
{
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
}
}
const
getMusicTypeOptions
=
async
()
=>
{
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
}
};
const
getBankOptions
=
async
()
=>
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
bankOptions
,
...
...
@@ -712,10 +750,10 @@ export default defineComponent({
hasError
=
true
;
artistNameRules
.
value
=
true
;
}
if
(
!
address
.
value
||
!
address
.
value
.
trim
().
length
)
{
hasError
=
true
;
addressRules
.
value
=
true
;
}
//
if (!address.value || !address.value.trim().length) {
//
hasError = true;
//
addressRules.value = true;
//
}
if
(
!
birthday
.
value
||
!
birthday
.
value
?.
trim
().
length
)
{
hasError
=
true
;
birthdayRules
.
value
=
true
;
...
...
@@ -760,10 +798,10 @@ export default defineComponent({
);
}
if
(
artistLevel
.
value
===
null
)
{
hasError
=
true
;
artistLevelRules
.
value
=
true
;
}
//
if (artistLevel.value === null) {
//
hasError = true;
//
artistLevelRules.value = true;
//
}
if
(
!
fields
.
value
)
{
hasError
=
true
;
fieldRules
.
value
=
true
;
...
...
@@ -843,13 +881,14 @@ export default defineComponent({
method
:
'POST'
,
data
:
{
id
:
route
.
params
.
id
,
musicTypeDto
:
musics
.
value
,
avatar
:
avatarUploaded
.
value
,
artistCode
:
artistCode
.
value
,
artistName
:
artistName
.
value
,
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
birthday
:
birthday
.
value
+
' 00:00:00'
,
sex
:
sex
.
value
,
address
:
address
.
value
,
address
:
address
.
value
,
phoneNumber
:
phoneNumber
.
value
,
email
:
email
.
value
,
facebook
:
facebook
.
value
,
...
...
@@ -912,6 +951,7 @@ export default defineComponent({
};
onMounted
(()
=>
{
void
getProvinceOptions
();
void
getInformationArtist
();
void
getFieldOptions
();
void
getNationalityOptions
();
...
...
@@ -919,6 +959,7 @@ export default defineComponent({
void
getQualificationOptions
();
void
getBankOptions
();
void
getTypeCardOptions
();
void
getMusicTypeOptions
();
});
return
{
hidden_img
,
...
...
@@ -933,6 +974,7 @@ export default defineComponent({
sex
,
nationality
,
address
,
status
,
fields
,
works
,
...
...
@@ -954,11 +996,15 @@ export default defineComponent({
professionOptions
,
artistLevelOptions
,
workOptions
,
musicOptions
,
musics
,
getFieldOptions
,
getNationalityOptions
,
getArtistLevelOptions
,
getQualificationOptions
,
getWorkOptions
,
getMusicTypeOptions
,
bankAccounts
,
products
,
account
,
...
...
@@ -1032,7 +1078,9 @@ export default defineComponent({
mnBookingEmailRules
,
errorMessmnBookingEmail
,
favoriteScore
,
provinceOptions
,
check_infoBooking
,
getProvinceOptions
,
};
},
});
src/pages/them-nghe-sy/AddArtist.ts
View file @
04c9d6e0
...
...
@@ -320,14 +320,14 @@ export default defineComponent({
}
}
);
watch
(
()
=>
artistLevel
.
value
,
(
value
)
=>
{
if
(
value
)
{
artistLevelRules
.
value
=
false
;
}
}
);
//
watch(
//
() => artistLevel.value,
//
(value) => {
//
if (value) {
//
artistLevelRules.value = false;
//
}
//
}
//
);
const
getFieldOptions
=
async
()
=>
{
const
response
=
(
await
api
({
...
...
@@ -737,10 +737,7 @@ export default defineComponent({
hasError
=
true
;
workRules
.
value
=
true
;
}
// if(!address.value === null){
// hasError = true;
// addressRules.value = true;
// }
if
(
hasError
===
false
)
{
void
addArtist
();
}
...
...
@@ -797,7 +794,8 @@ export default defineComponent({
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
birthday
:
birthday
.
value
+
' 00:00:00'
,
sex
:
sex
.
value
,
address
:
address
.
value
?.
name
,
provinceDto
:
address
.
value
,
address
:
null
,
phoneNumber
:
phoneNumber
.
value
,
email
:
email
.
value
,
facebook
:
facebook
.
value
,
...
...
@@ -837,8 +835,12 @@ export default defineComponent({
message
:
i18n
.
global
.
t
(
'artist.actionMessages.addNewArtistAccess'
),
actions
:
[{
icon
:
'close'
,
color
:
'white'
}],
});
}
else
{
console
.
log
(
response
.
data
.
error
.
code
);
}
}
catch
(
error
)
{}
}
catch
(
error
)
{
}
};
const
DeleteItemStories
=
(
value
:
StoriesType
)
=>
{
for
(
let
i
=
0
;
i
<
stories
.
value
.
length
;
i
++
)
{
...
...
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