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
e0d755d3
Commit
e0d755d3
authored
May 11, 2021
by
Võ Quang Thành Đạt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update validate
parent
57de0b0b
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
323 additions
and
137 deletions
+323
-137
index.vue
src/components/artist-information/VAB-account/index.vue
+1
-1
index.vue
src/components/artist-information/bank-account/index.vue
+4
-1
index.vue
src/components/artist-information/hot-product/index.vue
+4
-1
PersonalInformation.ts
...t-information/personal-information/PersonalInformation.ts
+67
-102
index.vue
...ponents/artist-information/personal-information/index.vue
+31
-15
app.scss
src/css/app.scss
+1
-1
index.vue
src/pages/cap-nhat-thong-tin-nghe-sy/index.vue
+14
-2
updateInformationArtist.ts
...ges/cap-nhat-thong-tin-nghe-sy/updateInformationArtist.ts
+201
-14
No files found.
src/components/artist-information/VAB-account/index.vue
View file @
e0d755d3
<
template
>
<
template
>
<div
class=
"row q-col-gutter-sm"
style=
"max-height:
750px
"
>
<div
class=
"row q-col-gutter-sm"
style=
"max-height:
calc(100vh - 14rem)
"
>
<div
class=
"col-12 text-uppercase text-weight-medium"
>
Tài khoản VAB
</div>
<div
class=
"col-12 text-uppercase text-weight-medium"
>
Tài khoản VAB
</div>
<br
/>
<br
/>
<div
class=
"col-auto flex flex-center justify-start"
>
<div
class=
"col-auto flex flex-center justify-start"
>
...
...
src/components/artist-information/bank-account/index.vue
View file @
e0d755d3
<
template
>
<
template
>
<div
class=
"row q-col-gutter-sm flex-center"
>
<div
class=
"row q-col-gutter-sm flex-center"
style=
"max-height: calc(100vh - 14rem)"
>
<q-space></q-space>
<q-space></q-space>
<div
class=
"col-auto"
>
<div
class=
"col-auto"
>
<q-btn
<q-btn
...
...
src/components/artist-information/hot-product/index.vue
View file @
e0d755d3
<
template
>
<
template
>
<div
class=
"row q-col-gutter-sm flex-center"
>
<div
class=
"row q-col-gutter-sm flex-center"
style=
"max-height: calc(100vh - 14rem)"
>
<q-space></q-space>
<q-space></q-space>
<div
class=
"col-auto"
>
<div
class=
"col-auto"
>
<q-btn
<q-btn
...
...
src/components/artist-information/personal-information/PersonalInformation.ts
View file @
e0d755d3
...
@@ -32,6 +32,19 @@ export default defineComponent({
...
@@ -32,6 +32,19 @@ export default defineComponent({
professionOptions
:
{
type
:
Array
,
required
:
true
},
professionOptions
:
{
type
:
Array
,
required
:
true
},
artistLevelOptions
:
{
type
:
Array
,
required
:
true
},
artistLevelOptions
:
{
type
:
Array
,
required
:
true
},
workOptions
:
{
type
:
Array
,
required
:
true
},
workOptions
:
{
type
:
Array
,
required
:
true
},
artistCodeRules
:
{
type
:
Boolean
,
required
:
true
},
fullNameRules
:
{
type
:
Boolean
,
required
:
true
},
artistNameRules
:
{
type
:
Boolean
,
required
:
true
},
birthdayRules
:
{
type
:
Boolean
,
required
:
true
},
emailRules
:
{
type
:
Boolean
,
required
:
true
},
addressRules
:
{
type
:
Boolean
,
required
:
true
},
phoneNumberRules
:
{
type
:
Boolean
,
required
:
true
},
sexRules
:
{
type
:
Boolean
,
required
:
true
},
nationalityRules
:
{
type
:
Boolean
,
required
:
true
},
fieldRules
:
{
type
:
Boolean
,
required
:
true
},
workRules
:
{
type
:
Boolean
,
required
:
true
},
qualificationRules
:
{
type
:
Boolean
,
required
:
true
},
artistLevelRules
:
{
type
:
Boolean
,
required
:
true
},
},
},
components
:
{
components
:
{
UploadImage
,
UploadImage
,
...
@@ -46,6 +59,7 @@ export default defineComponent({
...
@@ -46,6 +59,7 @@ export default defineComponent({
url
:
URL
.
createObjectURL
(
value
[
0
]),
url
:
URL
.
createObjectURL
(
value
[
0
]),
});
});
};
};
const
upload
=
ref
(
null
);
const
upload
=
ref
(
null
);
const
uploadBanner
=
()
=>
{
const
uploadBanner
=
()
=>
{
// eslint-disable-next-line
// eslint-disable-next-line
...
@@ -53,95 +67,6 @@ export default defineComponent({
...
@@ -53,95 +67,6 @@ export default defineComponent({
// eslint-disable-next-line
// eslint-disable-next-line
upload
.
value
?.
click
();
upload
.
value
?.
click
();
};
};
const
artistCodeRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireArtistCode'
),
];
const
fullNameRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireFullName'
),
];
const
artistNameRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireArtistName'
),
];
const
birthdayRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireBirthday'
),
];
const
emailRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireEmail'
),
(
val
:
string
)
=>
isEmail
(
val
)
||
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.isEmail'
),
];
const
addressRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireAddress'
),
];
const
phoneNumberRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requirePhoneNumber'
),
(
val
:
string
)
=>
isMobilePhone
(
val
)
||
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.isPhone'
),
];
const
sexRules
=
[
(
val
?:
number
)
=>
val
!==
undefined
||
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireSex'
),
];
const
nationalityRules
=
[
(
val
?:
number
)
=>
val
!==
undefined
||
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireNationality'
),
];
const
fieldRules
=
[
(
val
?:
number
)
=>
val
!==
undefined
||
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireField'
),
];
const
workRules
=
[
(
val
?:
number
)
=>
val
!==
undefined
||
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requiredWork'
),
];
const
qualificationRules
=
[
(
val
?:
number
)
=>
val
!==
undefined
||
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireQualification'
),
];
const
artistLevelRules
=
[
(
val
?:
number
)
=>
val
!==
undefined
||
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireArtistLevel'
),
];
const
deleteAvatar
=
()
=>
{
const
deleteAvatar
=
()
=>
{
console
.
log
(
'object'
);
console
.
log
(
'object'
);
context
.
emit
(
'deleteAvatar'
);
context
.
emit
(
'deleteAvatar'
);
...
@@ -163,20 +88,47 @@ export default defineComponent({
...
@@ -163,20 +88,47 @@ export default defineComponent({
openDialog
.
value
=
false
;
openDialog
.
value
=
false
;
};
};
const
errorMessArtistCode
=
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireArtistCode'
);
const
errorMessFullName
=
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireFullName'
);
const
errorMessArtistName
=
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireArtistName'
);
const
errorMessBirthday
=
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireBirthday'
);
const
errorMessSex
=
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireSex'
);
const
errorMessNationality
=
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireNationality'
);
const
errorMessAddress
=
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireAddress'
);
const
errorMessFields
=
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireField'
);
const
errorMessWorks
=
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requiredWork'
);
const
errorMessQualification
=
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireQualification'
);
const
errorMessArtistLevel
=
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireArtistLevel'
);
const
errorMessPhoneNumber
=
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requirePhoneNumber'
);
const
errorMessEmail
=
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireEmail'
);
return
{
return
{
artistCodeRules
,
fullNameRules
,
artistNameRules
,
birthdayRules
,
emailRules
,
addressRules
,
phoneNumberRules
,
sexRules
,
nationalityRules
,
fieldRules
,
workRules
,
qualificationRules
,
artistLevelRules
,
upload
,
upload
,
uploadBanner
,
uploadBanner
,
selectedFile
,
selectedFile
,
...
@@ -187,6 +139,19 @@ export default defineComponent({
...
@@ -187,6 +139,19 @@ export default defineComponent({
openDialog
,
openDialog
,
onOKClick
,
onOKClick
,
onCancelClick
,
onCancelClick
,
errorMessArtistCode
,
errorMessFullName
,
errorMessArtistName
,
errorMessBirthday
,
errorMessSex
,
errorMessNationality
,
errorMessAddress
,
errorMessFields
,
errorMessWorks
,
errorMessQualification
,
errorMessArtistLevel
,
errorMessPhoneNumber
,
errorMessEmail
,
};
};
},
},
emits
:
[
emits
:
[
...
...
src/components/artist-information/personal-information/index.vue
View file @
e0d755d3
<
template
>
<
template
>
<div
class=
"row q-col-gutter-sm q-mt-md"
>
<div
class=
"row q-col-gutter-sm q-mt-md"
style=
"max-height: calc(100vh - 15rem)"
>
<q-space></q-space>
<q-space></q-space>
<div
class=
"col-5"
>
<div
class=
"col-5"
>
<div
class=
"row q-mt-sm flex-center"
>
<div
class=
"row q-mt-sm flex-center"
>
...
@@ -47,7 +50,8 @@
...
@@ -47,7 +50,8 @@
<q-input
<q-input
:model-value=
"artistCode"
:model-value=
"artistCode"
@
update:model-value=
"$emit('update:artistCode', $event)"
@
update:model-value=
"$emit('update:artistCode', $event)"
:rules=
"artistCodeRules"
:error=
"artistCodeRules"
:error-message=
"errorMessArtistCode"
outlined
outlined
dense
dense
hide-bottom-space
hide-bottom-space
...
@@ -62,8 +66,9 @@
...
@@ -62,8 +66,9 @@
<div
class=
"col-8"
>
<div
class=
"col-8"
>
<q-input
<q-input
:model-value=
"fullName"
:model-value=
"fullName"
:rules=
"fullNameRules"
@
update:model-value=
"$emit('update:fullName', $event)"
@
update:model-value=
"$emit('update:fullName', $event)"
:error=
"fullNameRules"
:error-message=
"errorMessFullName"
outlined
outlined
dense
dense
hide-bottom-space
hide-bottom-space
...
@@ -79,7 +84,8 @@
...
@@ -79,7 +84,8 @@
<q-input
<q-input
:model-value=
"artistName"
:model-value=
"artistName"
@
update:model-value=
"$emit('update:artistName', $event)"
@
update:model-value=
"$emit('update:artistName', $event)"
:rules=
"artistNameRules"
:error=
"artistNameRules"
:error-message=
"errorMessArtistName"
outlined
outlined
dense
dense
hide-bottom-space
hide-bottom-space
...
@@ -95,7 +101,8 @@
...
@@ -95,7 +101,8 @@
<q-input
<q-input
:model-value=
"birthday"
:model-value=
"birthday"
@
update:model-value=
"$emit('update:birthday', $event)"
@
update:model-value=
"$emit('update:birthday', $event)"
:rules=
"birthdayRules"
:error=
"birthdayRules"
:error-message=
"errorMessBirthday"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
@
click=
"openDialog = true"
@
click=
"openDialog = true"
...
@@ -135,7 +142,8 @@
...
@@ -135,7 +142,8 @@
:model-value=
"sex"
:model-value=
"sex"
@
update:model-value=
"$emit('update:sex', $event)"
@
update:model-value=
"$emit('update:sex', $event)"
:options=
"sexOptions"
:options=
"sexOptions"
:rules=
"sexRules"
:error=
"sexRules"
:error-message=
"errorMessSex"
emit-value
emit-value
map-options
map-options
option-value=
"id"
option-value=
"id"
...
@@ -159,7 +167,8 @@
...
@@ -159,7 +167,8 @@
:model-value=
"nationality"
:model-value=
"nationality"
@
update:model-value=
"$emit('update:nationality', $event)"
@
update:model-value=
"$emit('update:nationality', $event)"
:options=
"nationalityOptions"
:options=
"nationalityOptions"
:rules=
"nationalityRules"
:error=
"nationalityRules"
:error-message=
"errorMessNationality"
map-options
map-options
option-value=
"id"
option-value=
"id"
option-label=
"name"
option-label=
"name"
...
@@ -172,7 +181,7 @@
...
@@ -172,7 +181,7 @@
></q-select>
></q-select>
</div>
</div>
</div>
</div>
<div
class=
"row q-mt-xs flex-center"
>
<div
class=
"row q-mt-xs
q-mb-md
flex-center"
>
<div
class=
"col-3 text-weight-medium"
>
<div
class=
"col-3 text-weight-medium"
>
{{ $t('artist.artistInformation.titleDataField.address') }}
{{ $t('artist.artistInformation.titleDataField.address') }}
<span
style=
"color: red"
>
*
</span>
<span
style=
"color: red"
>
*
</span>
...
@@ -181,7 +190,8 @@
...
@@ -181,7 +190,8 @@
<q-input
<q-input
:model-value=
"address"
:model-value=
"address"
@
update:model-value=
"$emit('update:address', $event)"
@
update:model-value=
"$emit('update:address', $event)"
:rules=
"addressRules"
:error=
"addressRules"
:error-message=
"errorMessAddress"
outlined
outlined
hide-bottom-space
hide-bottom-space
dense
dense
...
@@ -200,7 +210,8 @@
...
@@ -200,7 +210,8 @@
<q-select
<q-select
:model-value=
"fields"
:model-value=
"fields"
@
update:model-value=
"$emit('update:fields', $event)"
@
update:model-value=
"$emit('update:fields', $event)"
:rules=
"fieldRules"
:error=
"fieldRules"
:error-message=
"errorMessFields"
:options=
"fieldOptions"
:options=
"fieldOptions"
map-options
map-options
option-value=
"id"
option-value=
"id"
...
@@ -225,8 +236,9 @@
...
@@ -225,8 +236,9 @@
<div
class=
"col-8"
>
<div
class=
"col-8"
>
<q-select
<q-select
:model-value=
"works"
:model-value=
"works"
:rules=
"workRules"
@
update:model-value=
"$emit('update:works', $event)"
@
update:model-value=
"$emit('update:works', $event)"
:error=
"workRules"
:error-message=
"errorMessWorks"
:options=
"workOptions"
:options=
"workOptions"
map-options
map-options
option-value=
"id"
option-value=
"id"
...
@@ -253,7 +265,8 @@
...
@@ -253,7 +265,8 @@
:model-value=
"qualification"
:model-value=
"qualification"
@
update:model-value=
"$emit('update:qualification', $event)"
@
update:model-value=
"$emit('update:qualification', $event)"
:options=
"professionOptions"
:options=
"professionOptions"
:rules=
"qualificationRules"
:error=
"qualificationRules"
:error-message=
"errorMessQualification"
map-options
map-options
option-value=
"id"
option-value=
"id"
option-label=
"name"
option-label=
"name"
...
@@ -275,8 +288,9 @@
...
@@ -275,8 +288,9 @@
<q-select
<q-select
:model-value=
"artistLevel"
:model-value=
"artistLevel"
@
update:model-value=
"$emit('update:artistLevel', $event)"
@
update:model-value=
"$emit('update:artistLevel', $event)"
:rules=
"artistLevelRules"
:options=
"artistLevelOptions"
:options=
"artistLevelOptions"
:error=
"artistLevelRules"
:error-message=
"errorMessArtistLevel"
map-options
map-options
option-value=
"id"
option-value=
"id"
option-label=
"name"
option-label=
"name"
...
@@ -298,7 +312,8 @@
...
@@ -298,7 +312,8 @@
<q-input
<q-input
:model-value=
"phoneNumber"
:model-value=
"phoneNumber"
@
update:model-value=
"$emit('update:phoneNumber', $event)"
@
update:model-value=
"$emit('update:phoneNumber', $event)"
:rules=
"phoneNumberRules"
:error=
"phoneNumberRules"
:error-message=
"errorMessPhoneNumber"
outlined
outlined
dense
dense
hide-bottom-space
hide-bottom-space
...
@@ -314,7 +329,8 @@
...
@@ -314,7 +329,8 @@
<q-input
<q-input
:model-value=
"email"
:model-value=
"email"
@
update:model-value=
"$emit('update:email', $event)"
@
update:model-value=
"$emit('update:email', $event)"
:rules=
"emailRules"
:error=
"emailRules"
:error-message=
"errorMessEmail"
outlined
outlined
dense
dense
hide-bottom-space
hide-bottom-space
...
...
src/css/app.scss
View file @
e0d755d3
// app global css in SCSS form
// app global css in SCSS form
.sticky-header-table
{
.sticky-header-table
{
// / height or max-height is important /
// / height or max-height is important /
max-height
:
calc
(
100vh
-
1
1
rem
);
max-height
:
calc
(
100vh
-
1
3
rem
);
.q-table__top
,
.q-table__top
,
.q-table__bottom
,
.q-table__bottom
,
...
...
src/pages/cap-nhat-thong-tin-nghe-sy/index.vue
View file @
e0d755d3
...
@@ -52,6 +52,19 @@
...
@@ -52,6 +52,19 @@
v-model:facebook-message=
"facebookMessage"
v-model:facebook-message=
"facebookMessage"
v-model:instagram=
"instagram"
v-model:instagram=
"instagram"
v-model:whatsapp=
"whatsapp"
v-model:whatsapp=
"whatsapp"
:artistCodeRules=
"artistCodeRules"
:fullNameRules=
"fullNameRules"
:artistNameRules=
"artistNameRules"
:birthdayRules=
"birthdayRules"
:emailRules=
"emailRules"
:addressRules=
"addressRules"
:phoneNumberRules=
"phoneNumberRules"
:sexRules=
"sexRules"
:nationalityRules=
"nationalityRules"
:fieldRules=
"fieldRules"
:workRules=
"workRules"
:qualificationRules=
"qualificationRules"
:artistLevelRules=
"artistLevelRules"
:sex-options=
"sexOptions"
:sex-options=
"sexOptions"
:field-options=
"fieldOptions"
:field-options=
"fieldOptions"
:nationality-options=
"nationalityOptions"
:nationality-options=
"nationalityOptions"
...
@@ -76,7 +89,6 @@
...
@@ -76,7 +89,6 @@
:social-embedded=
"socialEmbedded"
:social-embedded=
"socialEmbedded"
:banners=
"banners"
:banners=
"banners"
:stories=
"stories"
:stories=
"stories"
@
deleteImagesStories=
"deleteImagesStories($event)"
@
deleteStories=
"DeleteItemStories"
@
deleteStories=
"DeleteItemStories"
@
click:openAddStoryDialog=
"isOpenAddStory = true"
@
click:openAddStoryDialog=
"isOpenAddStory = true"
@
confirmDeleteStory=
"deleteStory"
@
confirmDeleteStory=
"deleteStory"
...
@@ -165,7 +177,7 @@
...
@@ -165,7 +177,7 @@
color=
"primary"
color=
"primary"
no-caps
no-caps
:label=
"$t('crudActions.update')"
:label=
"$t('crudActions.update')"
@
click=
"
updateInformationArtist
"
@
click=
"
checkValidate
"
></q-btn>
></q-btn>
</div>
</div>
</div>
</div>
...
...
src/pages/cap-nhat-thong-tin-nghe-sy/updateInformationArtist.ts
View file @
e0d755d3
import
{
defineComponent
,
onMounted
,
ref
,
Ref
}
from
'vue'
;
import
{
defineComponent
,
onMounted
,
ref
,
Ref
,
watch
}
from
'vue'
;
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
import
{
API_PATHS
,
config
}
from
'src/assets/configurations'
;
import
{
API_PATHS
,
config
}
from
'src/assets/configurations'
;
import
{
useRoute
}
from
'vue-router'
;
import
{
useRoute
}
from
'vue-router'
;
...
@@ -91,19 +91,19 @@ export default defineComponent({
...
@@ -91,19 +91,19 @@ export default defineComponent({
const
avatarUploaded
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
avatarUploaded
:
Ref
<
string
|
null
>
=
ref
(
null
);
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
>
=
ref
(
null
);
const
birthday
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
birthday
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
sex
:
Ref
<
number
|
undefined
>
=
ref
(
);
const
sex
:
Ref
<
number
|
null
>
=
ref
(
null
);
const
nationality
:
Ref
<
NationalityType
|
null
>
=
ref
(
null
);
const
nationality
:
Ref
<
NationalityType
|
null
>
=
ref
(
null
);
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
address
:
Ref
<
string
|
null
|
undefined
>
=
ref
(
);
const
address
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
status
:
Ref
<
number
>
=
ref
(
1
);
const
status
:
Ref
<
number
>
=
ref
(
1
);
const
fields
:
Ref
<
FieldType
[]
>
=
ref
([]);
const
fields
:
Ref
<
FieldType
[]
>
=
ref
([]);
const
works
:
Ref
<
WorkType
[]
>
=
ref
([]);
const
works
:
Ref
<
WorkType
[]
>
=
ref
([]);
const
phoneNumber
:
Ref
<
string
|
null
|
undefined
>
=
ref
(
);
const
phoneNumber
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
email
:
Ref
<
string
|
null
|
undefined
>
=
ref
(
);
const
email
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
facebook
:
Ref
<
string
|
null
|
undefined
>
=
ref
(
);
const
facebook
:
Ref
<
string
|
null
>
=
ref
(
null
);
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
();
...
@@ -121,12 +121,131 @@ export default defineComponent({
...
@@ -121,12 +121,131 @@ export default defineComponent({
const
rowBankAccIdx
:
Ref
<
number
>
=
ref
(
0
);
const
rowBankAccIdx
:
Ref
<
number
>
=
ref
(
0
);
const
rowDataAccBank
:
Ref
<
BankAccountType
|
null
>
=
ref
(
null
);
const
rowDataAccBank
:
Ref
<
BankAccountType
|
null
>
=
ref
(
null
);
//s
a
tate hot product
//state hot product
const
products
:
Ref
<
ProductType
[]
>
=
ref
([]);
const
products
:
Ref
<
ProductType
[]
>
=
ref
([]);
const
statusHotProduct
:
Ref
<
number
>
=
ref
(
2
);
const
statusHotProduct
:
Ref
<
number
>
=
ref
(
2
);
const
DataInsertHotProduct
:
Ref
<
ProductType
|
null
>
=
ref
(
null
);
const
DataInsertHotProduct
:
Ref
<
ProductType
|
null
>
=
ref
(
null
);
const
DataUpdateHotProduct
:
Ref
<
ProductType
|
null
>
=
ref
(
null
);
const
DataUpdateHotProduct
:
Ref
<
ProductType
|
null
>
=
ref
(
null
);
//sate error input thong-tin-ca-nhan
const
artistCodeRules
=
ref
(
false
);
const
fullNameRules
=
ref
(
false
);
const
artistNameRules
=
ref
(
false
);
const
birthdayRules
=
ref
(
false
);
const
emailRules
=
ref
(
false
);
const
addressRules
=
ref
(
false
);
const
phoneNumberRules
=
ref
(
false
);
const
sexRules
=
ref
(
false
);
const
nationalityRules
=
ref
(
false
);
const
fieldRules
=
ref
(
false
);
const
workRules
=
ref
(
false
);
const
qualificationRules
=
ref
(
false
);
const
artistLevelRules
=
ref
(
false
);
watch
(
()
=>
artistCode
.
value
,
(
value
)
=>
{
if
(
value
)
{
artistCodeRules
.
value
=
false
;
}
}
);
watch
(
()
=>
fullName
.
value
,
(
value
)
=>
{
if
(
value
)
{
fullNameRules
.
value
=
false
;
}
}
);
watch
(
()
=>
artistName
.
value
,
(
value
)
=>
{
if
(
value
)
{
artistNameRules
.
value
=
false
;
}
}
);
watch
(
()
=>
birthday
.
value
,
(
value
)
=>
{
if
(
value
)
{
birthdayRules
.
value
=
false
;
}
}
);
watch
(
()
=>
email
.
value
,
(
value
)
=>
{
if
(
value
)
{
emailRules
.
value
=
false
;
}
}
);
watch
(
()
=>
address
.
value
,
(
value
)
=>
{
if
(
value
)
{
addressRules
.
value
=
false
;
}
}
);
watch
(
()
=>
phoneNumber
.
value
,
(
value
)
=>
{
if
(
value
)
{
phoneNumberRules
.
value
=
false
;
}
}
);
watch
(
()
=>
sex
.
value
,
(
value
)
=>
{
if
(
value
)
{
sexRules
.
value
=
false
;
}
}
);
watch
(
()
=>
nationality
.
value
,
(
value
)
=>
{
if
(
value
)
{
nationalityRules
.
value
=
false
;
}
}
);
watch
(
()
=>
fields
.
value
,
(
value
)
=>
{
if
(
value
)
{
fieldRules
.
value
=
false
;
}
}
);
watch
(
()
=>
works
.
value
,
(
value
)
=>
{
if
(
value
)
{
workRules
.
value
=
false
;
}
}
);
watch
(
()
=>
qualification
.
value
,
(
value
)
=>
{
if
(
value
)
{
qualificationRules
.
value
=
false
;
}
}
);
watch
(
()
=>
artistLevel
.
value
,
(
value
)
=>
{
if
(
value
)
{
artistLevelRules
.
value
=
false
;
}
}
);
const
getInformationArtist
=
async
()
=>
{
const
getInformationArtist
=
async
()
=>
{
const
response
=
(
await
api
({
const
response
=
(
await
api
({
url
:
API_PATHS
.
getDetailArtist
,
url
:
API_PATHS
.
getDetailArtist
,
...
@@ -463,11 +582,69 @@ export default defineComponent({
...
@@ -463,11 +582,69 @@ export default defineComponent({
}
}
}
catch
(
error
)
{}
}
catch
(
error
)
{}
};
};
const
checkValidate
=
()
=>
{
let
hasError
=
false
;
if
(
!
artistCode
.
value
||
!
artistCode
.
value
?.
trim
().
length
)
{
hasError
=
true
;
artistCodeRules
.
value
=
true
;
}
if
(
!
fullName
.
value
||
!
fullName
.
value
?.
trim
().
length
)
{
hasError
=
true
;
fullNameRules
.
value
=
true
;
}
if
(
!
artistName
.
value
||
!
artistName
.
value
?.
trim
().
length
)
{
hasError
=
true
;
artistNameRules
.
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
;
}
if
(
sex
.
value
===
null
)
{
hasError
=
true
;
sexRules
.
value
=
true
;
}
if
(
!
phoneNumber
.
value
||
!
phoneNumber
.
value
?.
trim
().
length
)
{
hasError
=
true
;
phoneNumberRules
.
value
=
true
;
}
if
(
!
email
.
value
||
!
email
.
value
?.
trim
().
length
)
{
hasError
=
true
;
emailRules
.
value
=
true
;
}
if
(
artistLevel
.
value
===
null
)
{
hasError
=
true
;
artistLevelRules
.
value
=
true
;
}
if
(
!
fields
.
value
.
length
)
{
hasError
=
true
;
fieldRules
.
value
=
true
;
}
if
(
nationality
.
value
===
null
)
{
hasError
=
true
;
nationalityRules
.
value
=
true
;
}
if
(
qualification
.
value
===
null
)
{
hasError
=
true
;
qualificationRules
.
value
=
true
;
}
if
(
!
works
.
value
.
length
)
{
hasError
=
true
;
workRules
.
value
=
true
;
}
if
(
hasError
===
false
)
{
void
updateInformationArtist
();
}
};
const
updateInformationArtist
=
async
()
=>
{
const
updateInformationArtist
=
async
()
=>
{
try
{
try
{
if
(
avatarFile
.
value
!==
null
)
{
if
(
avatarFile
.
value
!==
null
)
{
await
callApiUploadAvatar
(
avatarFile
.
value
);
await
callApiUploadAvatar
(
avatarFile
.
value
);
}
}
else
avatarUploaded
.
value
=
avatar
.
value
;
for
(
let
index
=
0
;
index
<
banners
.
value
.
length
;
index
++
)
{
for
(
let
index
=
0
;
index
<
banners
.
value
.
length
;
index
++
)
{
const
element
=
banners
.
value
[
index
];
const
element
=
banners
.
value
[
index
];
if
(
element
.
file
!==
undefined
)
{
if
(
element
.
file
!==
undefined
)
{
...
@@ -480,6 +657,7 @@ export default defineComponent({
...
@@ -480,6 +657,7 @@ export default defineComponent({
await
callApiUploadStories
(
item
.
file
,
idx
);
await
callApiUploadStories
(
item
.
file
,
idx
);
}
}
}
}
const
response
=
(
await
api
({
const
response
=
(
await
api
({
url
:
API_PATHS
.
updateArtist
,
url
:
API_PATHS
.
updateArtist
,
method
:
'POST'
,
method
:
'POST'
,
...
@@ -524,10 +702,6 @@ export default defineComponent({
...
@@ -524,10 +702,6 @@ export default defineComponent({
}
}
}
catch
(
error
)
{}
}
catch
(
error
)
{}
};
};
const
deleteImagesStories
=
(
value
:
number
)
=>
{
console
.
log
(
value
,
'deleteImagesStories'
);
console
.
log
(
stories
.
value
);
};
const
DeleteItemStories
=
(
value
:
StoriesType
)
=>
{
const
DeleteItemStories
=
(
value
:
StoriesType
)
=>
{
for
(
let
i
=
0
;
i
<
stories
.
value
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
stories
.
value
.
length
;
i
++
)
{
if
(
stories
.
value
[
i
].
id
==
value
.
id
)
{
if
(
stories
.
value
[
i
].
id
==
value
.
id
)
{
...
@@ -623,7 +797,6 @@ export default defineComponent({
...
@@ -623,7 +797,6 @@ export default defineComponent({
avatar
,
avatar
,
setAvatar
,
setAvatar
,
deleteAvatar
,
deleteAvatar
,
deleteImagesStories
,
DeleteItemStories
,
DeleteItemStories
,
confirmDeleteSocialEmbedded
,
confirmDeleteSocialEmbedded
,
changeEmbed
,
changeEmbed
,
...
@@ -631,6 +804,20 @@ export default defineComponent({
...
@@ -631,6 +804,20 @@ export default defineComponent({
addStory
,
addStory
,
deleteStory
,
deleteStory
,
UpdateBirtday
,
UpdateBirtday
,
checkValidate
,
artistCodeRules
,
fullNameRules
,
artistNameRules
,
birthdayRules
,
emailRules
,
addressRules
,
phoneNumberRules
,
sexRules
,
nationalityRules
,
fieldRules
,
workRules
,
qualificationRules
,
artistLevelRules
,
};
};
},
},
});
});
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