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
e5d98702
Commit
e5d98702
authored
May 07, 2021
by
Võ Quang Thành Đạt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
11820750
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
640 additions
and
17 deletions
+640
-17
configurations.example.ts
src/assets/configurations.example.ts
+1
-0
HotProduct.ts
src/components/artist-information/hot-product/HotProduct.ts
+4
-4
index.ts
src/i18n/vi/index.ts
+1
-0
index.vue
src/pages/cap-nhat-thong-tin-nghe-sy/index.vue
+1
-0
updateInformationArtist.ts
...ges/cap-nhat-thong-tin-nghe-sy/updateInformationArtist.ts
+55
-12
index.vue
src/pages/nghe-sy/index.vue
+1
-1
AddArtist.ts
src/pages/them-nghe-sy/AddArtist.ts
+418
-0
index.vue
src/pages/them-nghe-sy/index.vue
+153
-0
routes.ts
src/router/routes.ts
+6
-0
No files found.
src/assets/configurations.example.ts
View file @
e5d98702
...
...
@@ -44,4 +44,5 @@ export enum API_PATHS {
deleteArtist
=
'/artist/delete'
,
getArtistDicitionaryOptions
=
'artist/dictionary'
,
artistOwnerAdd
=
'artistOwner/add'
,
updateArtist
=
'artist/update'
,
}
src/components/artist-information/hot-product/HotProduct.ts
View file @
e5d98702
...
...
@@ -94,10 +94,10 @@ export default defineComponent({
const
clickAdd
=
()
=>
{
context
.
emit
(
'click:addHotProduct'
);
}
}
;
const
deleteRow
=
(
index
:
number
)
=>
{
context
.
emit
(
'deleteRow'
,
index
)
}
context
.
emit
(
'deleteRow'
,
index
)
;
}
;
onMounted
(()
=>
{
void
getListHotProduct
();
});
...
...
@@ -113,5 +113,5 @@ export default defineComponent({
clickAdd
,
};
},
emits
:
[
'click:addHotProduct'
,
'reset'
,
'deleteRow'
]
emits
:
[
'click:addHotProduct'
,
'reset'
,
'deleteRow'
]
,
});
src/i18n/vi/index.ts
View file @
e5d98702
...
...
@@ -387,6 +387,7 @@ export default {
},
actionMessages
:
{
deleteArtistAccess
:
'Xoá nghệ sỹ thành công'
,
editNewUserAccess
:
'Cập nhật thông tin nghệ sỹ thành công'
,
},
artistInformation
:
{
tabLabel
:
{
...
...
src/pages/cap-nhat-thong-tin-nghe-sy/index.vue
View file @
e5d98702
...
...
@@ -147,6 +147,7 @@
color=
"primary"
no-caps
:label=
"$t('crudActions.update')"
@
click=
"updateInformationArtist"
></q-btn>
</div>
</div>
...
...
src/pages/cap-nhat-thong-tin-nghe-sy/updateInformationArtist.ts
View file @
e5d98702
import
{
defineComponent
,
onMounted
,
ref
,
Ref
,
}
from
'vue'
;
import
{
defineComponent
,
onMounted
,
ref
,
Ref
}
from
'vue'
;
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'
;
...
...
@@ -154,9 +154,8 @@ export default defineComponent({
const
rowBankAccIdx
:
Ref
<
number
>
=
ref
(
0
);
//satate hot product
const
statusHotProduct
:
Ref
<
number
>
=
ref
(
2
)
const
DataInsertHotProduct
:
Ref
<
ProductType
|
null
>
=
ref
(
null
)
const
statusHotProduct
:
Ref
<
number
>
=
ref
(
2
);
const
DataInsertHotProduct
:
Ref
<
ProductType
|
null
>
=
ref
(
null
);
const
getInformationArtist
=
async
()
=>
{
const
response
=
(
await
api
({
...
...
@@ -346,13 +345,12 @@ export default defineComponent({
};
const
pushData
=
(
value
:
ProductType
)
=>
{
products
.
value
.
push
(
value
)
}
products
.
value
.
push
(
value
)
;
}
;
const
reset
=
ref
(
null
);
const
resetOldData
=
()
=>
{
document
.
getElementById
(
'reset'
)?.
click
()
}
document
.
getElementById
(
'reset'
)?.
click
();
};
const
confirmDeleteRow
=
(
value
:
number
)
=>
{
Dialog
.
create
({
title
:
i18n
.
global
.
t
(
...
...
@@ -370,8 +368,52 @@ export default defineComponent({
});
};
const
deleteRowItem
=
(
index
:
number
)
=>
{
products
.
value
.
splice
(
index
,
1
)
}
products
.
value
.
splice
(
index
,
1
);
};
const
updateInformationArtist
=
async
()
=>
{
try
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
updateArtist
,
method
:
'POST'
,
data
:
{
id
:
route
.
params
.
id
,
artistCode
:
artistCode
.
value
,
artistName
:
artistName
.
value
,
birthday
:
birthday
.
value
,
sex
:
sex
.
value
,
address
:
address
.
value
,
phoneNumber
:
phoneNumber
.
value
,
email
:
email
.
value
,
facebook
:
facebook
.
value
,
facebookMessage
:
facebookMessage
.
value
,
instagram
:
instagram
.
value
,
whatsapp
:
whatsapp
.
value
,
fullName
:
fullName
.
value
,
// "workStatus": 1,
shortDescription
:
null
,
account
:
null
,
socialEmbedded
:
socialEmbedded
.
value
,
artistLevel
:
artistLevel
.
value
,
fields
:
fields
.
value
,
nationality
:
nationality
.
value
,
qualification
:
qualification
.
value
,
works
:
works
.
value
,
banners
:
banners
.
value
,
bankAccounts
:
bankAccounts
.
value
,
schedules
:
schedules
.
value
,
stories
:
stories
.
value
,
products
:
products
.
value
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
unknown
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
Notify
.
create
({
type
:
'positive'
,
message
:
i18n
.
global
.
t
(
'artist.actionMessages.editNewUserAccess'
),
});
}
}
catch
(
error
)
{}
};
onMounted
(()
=>
{
void
getInformationArtist
();
void
getFieldOptions
();
...
...
@@ -452,7 +494,8 @@ export default defineComponent({
resetOldData
,
reset
,
deleteRowItem
,
confirmDeleteRow
confirmDeleteRow
,
updateInformationArtist
,
};
},
});
src/pages/nghe-sy/index.vue
View file @
e5d98702
...
...
@@ -56,7 +56,7 @@
color=
"primary"
no-caps
:label=
"$t('crudActions.add')"
@
click=
"isOpenNewArtistDialog = true
"
to=
"/nghe-sy/them-nghe-sy
"
></q-btn>
</div>
...
...
src/pages/them-nghe-sy/AddArtist.ts
0 → 100644
View file @
e5d98702
This diff is collapsed.
Click to expand it.
src/pages/them-nghe-sy/index.vue
0 → 100644
View file @
e5d98702
<
template
>
<div
class=
"q-mt-sm row q-col-gutter-sm"
>
<div
class=
"col-12"
width=
"100%"
>
<q-card>
<q-tabs
v-model=
"tab"
dense
class=
"text-grey"
active-color=
"primary"
indicator-color=
"primary"
align=
"justify"
narrow-indicator
>
<q-tab
name=
"information"
:label=
"$t('artist.artistInformation.tabLabel.personalInformation')"
/>
<q-tab
name=
"vabAccount"
:label=
"$t('artist.artistInformation.tabLabel.vabAccout')"
/>
<q-tab
name=
"bankAccount"
:label=
"$t('artist.artistInformation.tabLabel.bankAcount')"
/>
<q-tab
name=
"hotProduct"
:label=
"$t('artist.artistInformation.tabLabel.hotProduct')"
/>
</q-tabs>
<q-separator
/>
<q-tab-panels
v-model=
"tab"
animated
>
<q-tab-panel
name=
"information"
>
<PersonalInformation
:id=
"id"
v-model:artist-code=
"artistCode"
v-model:full-name=
"fullName"
v-model:artist-name=
"artistName"
v-model:birthday=
"birthday"
v-model:sex=
"sex"
v-model:nationality=
"nationality"
v-model:status=
"status"
v-model:address=
"address"
v-model:fields=
"fields"
v-model:works=
"works"
v-model:qualification=
"qualification"
v-model:artist-level=
"artistLevel"
v-model:phone-number=
"phoneNumber"
v-model:email=
"email"
v-model:facebook=
"facebook"
v-model:facebook-message=
"facebookMessage"
v-model:instagram=
"instagram"
v-model:whatsapp=
"whatsapp"
:sex-options=
"sexOptions"
:field-options=
"fieldOptions"
:nationality-options=
"nationalityOptions"
:profession-options=
"professionOptions"
:artist-level-options=
"artistLevelOptions"
:work-options=
"workOptions"
></PersonalInformation>
</q-tab-panel>
<q-tab-panel
name=
"vabAccount"
>
<VabAccount
v-model:account=
"account"
v-model:short-description=
"shortDescription"
v-model:content=
"stories[0].content"
v-model:format-schedules=
"formatSchedules"
@
selectedFile=
"selectedFile"
@
deleteBanner=
"banners.splice($event, 1)"
@
openDialogUploadEmbed=
"isOpenDialogEmbed = true"
:social-embedded=
"socialEmbedded"
:banners=
"banners"
:stories=
"stories"
></VabAccount>
</q-tab-panel>
<q-tab-panel
name=
"bankAccount"
>
<BankAccount
:bank-accounts=
"bankAccounts"
@
confirmDeleteAccBank=
"confirmDeleteAccBank"
@
click:addBankBtn=
"openDialogAddAccBank"
@
clickEditAccBankBtn=
"openDialogEditAccBank"
></BankAccount>
</q-tab-panel>
<q-tab-panel
name=
"hotProduct"
>
<HotProduct
@
click:addHotProduct=
"openAddHotProduct = true"
:products=
"products"
></HotProduct>
</q-tab-panel>
</q-tab-panels>
</q-card>
</div>
<AddNewBankAccountDialog
v-model:is-open-add-account-bank-dialog=
"isOpenAddAccountBankDialog"
v-model:account-number=
"accountNumber"
v-model:card-number=
"cardNumber"
v-model:bank-name=
"bankName"
v-model:card-type=
"cardType"
v-model:is-default=
"isDefault"
:bank-accounts=
"bankAccounts"
@
addNewBankAccount=
"addAccBank"
@
click:CloseBtn=
"isOpenAddAccountBankDialog = false"
></AddNewBankAccountDialog>
<EditBankAccountDialog
v-model:is-open-edit-account-bank-dialog=
"isOpenEditAccountBankDialog"
v-model:account-number=
"accountNumber"
v-model:card-number=
"cardNumber"
v-model:bank-name=
"bankName"
v-model:card-type=
"cardType"
v-model:is-default=
"isDefault"
:row-bank-acc-idx=
"rowBankAccIdx"
:bank-accounts=
"bankAccounts"
@
editBankAccount=
"editAccBank"
@
click:CloseBtn=
"isOpenEditAccountBankDialog = false"
></EditBankAccountDialog>
<UploadEmbedDialog
v-model:is-open-dialog-embed=
"isOpenDialogEmbed"
v-model:social-embedded=
"socialEmbedded"
@
uploadEmbed=
"isOpenDialogEmbed = false"
@
click:CloseBtn=
"isOpenDialogEmbed = false"
></UploadEmbedDialog>
<AddHotProductDialog
v-model:status=
"status"
v-model:open-add-hot-product=
"openAddHotProduct"
@
click:CloseBtnAddHotProduct=
"openAddHotProduct = false"
></AddHotProductDialog>
<div
class=
"col-12 q-mt-md"
>
<div
class=
"row"
>
<q-space></q-space>
<div
class=
"col-auto"
>
<q-btn
to=
"/nghe-sy"
color=
"grey"
no-caps
:label=
"$t('crudActions.back')"
></q-btn>
</div>
<div
class=
"col-auto q-mx-md"
>
<q-btn
color=
"primary"
no-caps
:label=
"$t('crudActions.update')"
></q-btn>
</div>
</div>
</div>
</div>
</
template
>
<
script
lang=
"ts"
src=
"./AddArtist.ts"
></
script
>
src/router/routes.ts
View file @
e5d98702
...
...
@@ -9,6 +9,7 @@ export enum Pages {
artist
=
'nghe-sy'
,
informationArtist
=
'cap-nhat-thong-tin-nghe-sy'
,
customer
=
'khach-hang'
,
addArtist
=
'them-nghe-sy'
,
}
const
routes
:
RouteRecordRaw
[]
=
[
...
...
@@ -51,6 +52,11 @@ const routes: RouteRecordRaw[] = [
component
:
()
=>
import
(
'pages/cap-nhat-thong-tin-nghe-sy/index.vue'
),
name
:
Pages
.
informationArtist
,
},
{
path
:
'/nghe-sy/them-nghe-sy'
,
component
:
()
=>
import
(
'pages/them-nghe-sy/index.vue'
),
name
:
Pages
.
addArtist
,
},
{
path
:
'/khach-hang'
,
component
:
()
=>
import
(
'pages/khach-hang/index.vue'
),
...
...
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