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
db2b67de
Commit
db2b67de
authored
May 08, 2021
by
Võ Quang Thành Đạt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
d11844ea
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
111 additions
and
48 deletions
+111
-48
configurations.example.ts
src/assets/configurations.example.ts
+1
-0
VabAccount.ts
src/components/artist-information/VAB-account/VabAccount.ts
+12
-10
index.vue
src/components/artist-information/VAB-account/index.vue
+13
-1
UploadEmbedDialog.ts
...tist-information/upload-embed-dialog/UploadEmbedDialog.ts
+16
-1
index.vue
...mponents/artist-information/upload-embed-dialog/index.vue
+9
-12
index.ts
src/i18n/vi/index.ts
+1
-0
index.vue
src/pages/cap-nhat-thong-tin-nghe-sy/index.vue
+3
-2
updateInformationArtist.ts
...ges/cap-nhat-thong-tin-nghe-sy/updateInformationArtist.ts
+56
-22
No files found.
src/assets/configurations.example.ts
View file @
db2b67de
...
@@ -47,4 +47,5 @@ export enum API_PATHS {
...
@@ -47,4 +47,5 @@ export enum API_PATHS {
updateArtist
=
'artist/update'
,
updateArtist
=
'artist/update'
,
bankOptions
=
'bank'
,
bankOptions
=
'bank'
,
cardTypeOptions
=
'cardType'
,
cardTypeOptions
=
'cardType'
,
uploadImage
=
'file/upload'
,
}
}
src/components/artist-information/VAB-account/VabAccount.ts
View file @
db2b67de
import
{
defineComponent
,
PropType
,
ref
,
watch
}
from
'vue'
;
import
{
defineComponent
,
PropType
,
ref
,
Ref
,
watch
}
from
'vue'
;
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
BannerType
,
StoriesType
}
from
'src/assets/type'
;
import
{
BannerType
,
StoriesType
}
from
'src/assets/type'
;
import
UploadImage
from
'components/upload-image/index.vue'
;
import
UploadImage
from
'components/upload-image/index.vue'
;
...
@@ -15,6 +15,7 @@ export default defineComponent({
...
@@ -15,6 +15,7 @@ export default defineComponent({
stories
:
{
type
:
Array
as
PropType
<
StoriesType
[]
>
,
required
:
true
},
stories
:
{
type
:
Array
as
PropType
<
StoriesType
[]
>
,
required
:
true
},
formatSchedules
:
{
type
:
Array
as
PropType
<
string
[]
>
,
required
:
true
},
formatSchedules
:
{
type
:
Array
as
PropType
<
string
[]
>
,
required
:
true
},
},
},
setup
(
props
,
context
)
{
setup
(
props
,
context
)
{
watch
(
watch
(
()
=>
props
.
banners
.
length
,
()
=>
props
.
banners
.
length
,
...
@@ -54,15 +55,15 @@ export default defineComponent({
...
@@ -54,15 +55,15 @@ export default defineComponent({
context
.
emit
(
'deleteBanner'
,
index
);
context
.
emit
(
'deleteBanner'
,
index
);
});
});
};
};
const
deleteImagesStoriess
=
(
story
:
StoriesType
,
storyIdx
:
number
)
=>
{
const
deleteImagesStoriess
=
(
story
:
StoriesType
,
storyIdx
:
number
)
=>
{
if
(
story
.
content
==
''
)
{
if
(
story
.
content
==
''
){
context
.
emit
(
'deleteStories'
,
story
);
context
.
emit
(
'deleteStories'
,
story
)
}
else
{
}
else
{
// story.imageUrl =''
// story.imageUrl =''
context
.
emit
(
'deleteImagesStories'
,
story
)
context
.
emit
(
'deleteImagesStories'
,
story
);
}
}
}
};
return
{
return
{
slide
,
slide
,
slideStory
,
slideStory
,
...
@@ -70,7 +71,7 @@ export default defineComponent({
...
@@ -70,7 +71,7 @@ export default defineComponent({
accountRules
,
accountRules
,
uploadBanner
,
uploadBanner
,
deleteImage
,
deleteImage
,
deleteImagesStoriess
deleteImagesStoriess
,
};
};
},
},
emits
:
[
emits
:
[
...
@@ -82,6 +83,7 @@ export default defineComponent({
...
@@ -82,6 +83,7 @@ export default defineComponent({
'deleteBanner'
,
'deleteBanner'
,
'openDialogUploadEmbed'
,
'openDialogUploadEmbed'
,
'deleteImagesStories'
,
'deleteImagesStories'
,
'deleteStories'
'deleteStories'
,
'confirmDeleteSocialEmbedded'
,
],
],
});
});
src/components/artist-information/VAB-account/index.vue
View file @
db2b67de
...
@@ -100,7 +100,19 @@
...
@@ -100,7 +100,19 @@
round
round
color=
"primary"
color=
"primary"
icon=
"mdi-pencil-circle-outline"
icon=
"mdi-pencil-circle-outline"
></q-btn>
>
<q-tooltip
:offset=
"[20, 10]"
>
Chỉnh sửa
</q-tooltip></q-btn
>
<q-btn
v-if=
"socialEmbedded !== null"
flat
round
color=
"primary"
icon=
"mdi-trash-can-outline"
@
click=
"$emit('confirmDeleteSocialEmbedded')"
>
<q-tooltip
:offset=
"[20, 10]"
>
Xoá
</q-tooltip></q-btn
>
</div>
</div>
<q-card
<q-card
class=
"my-card q-mt-sm flex flex-center"
class=
"my-card q-mt-sm flex flex-center"
...
...
src/components/artist-information/upload-embed-dialog/UploadEmbedDialog.ts
View file @
db2b67de
import
{
defineComponent
}
from
'vue'
;
import
{
defineComponent
,
Ref
,
ref
,
watch
}
from
'vue'
;
export
default
defineComponent
({
export
default
defineComponent
({
// name: 'ComponentName'
// name: 'ComponentName'
props
:
{
props
:
{
...
@@ -8,6 +8,21 @@ export default defineComponent({
...
@@ -8,6 +8,21 @@ export default defineComponent({
},
},
socialEmbedded
:
{
type
:
String
,
required
:
true
},
socialEmbedded
:
{
type
:
String
,
required
:
true
},
},
},
setup
(
props
,
context
)
{
watch
(
()
=>
props
.
isOpenDialogEmbed
,
(
value
)
=>
{
if
(
value
)
{
newSocialEmbed
.
value
=
props
.
socialEmbedded
;
}
}
);
const
newSocialEmbed
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
confirmEditEmbed
=
()
=>
{
context
.
emit
(
'uploadEmbed'
,
newSocialEmbed
.
value
);
};
return
{
newSocialEmbed
,
confirmEditEmbed
};
},
emits
:
[
emits
:
[
'update:isOpenDialogEmbed'
,
'update:isOpenDialogEmbed'
,
'click:CloseBtn'
,
'click:CloseBtn'
,
...
...
src/components/artist-information/upload-embed-dialog/index.vue
View file @
db2b67de
...
@@ -4,10 +4,10 @@
...
@@ -4,10 +4,10 @@
:model-value=
"isOpenDialogEmbed"
:model-value=
"isOpenDialogEmbed"
@
update:model-value=
"$emit('update:isOpenDialogEmbed', $event)"
@
update:model-value=
"$emit('update:isOpenDialogEmbed', $event)"
>
>
<q-card
bordered
>
<q-card
style=
"width: 400px"
bordered
>
<q-card-section>
<q-card-section
style=
"padding-top: 0; padding-bottom: 0"
>
<q-item>
<q-item>
<q-item-section>
<q-item-section
align=
"center"
>
<q-item-label
class=
"text-h6 text-weight-regular"
>
{{
<q-item-label
class=
"text-h6 text-weight-regular"
>
{{
$t
(
'uploadImage.titleEmbedDialog'
)
$t
(
'uploadImage.titleEmbedDialog'
)
}}
</q-item-label>
}}
</q-item-label>
...
@@ -17,25 +17,21 @@
...
@@ -17,25 +17,21 @@
<q-separator
/>
<q-separator
/>
<q-card-section>
<q-card-section>
<div
class=
"row q-col-gutter-sm"
>
<div
class=
"row q-col-gutter-sm
flex-center
"
>
<div
class=
"col-3"
>
Link Embed
</div>
<div
class=
"col-3"
>
Link Embed
</div>
<div
class=
"col-9"
>
<div
class=
"col-9"
>
<q-input
<q-input
v-model=
"newSocialEmbed"
outlined
dense
></q-input>
:model-value=
"socialEmbedded"
@
update:model-value=
"$emit('update:socialEmbedded', $event)"
outlined
dense
></q-input>
</div>
</div>
</div>
</div>
</q-card-section>
</q-card-section>
<q-card-actions
align=
"right"
>
<q-card-actions
align=
"right"
class=
"q-mt-xs"
>
<q-btn
<q-btn
color=
"grey"
color=
"grey"
no-caps
no-caps
style=
"width: 90px"
style=
"width: 90px"
:label=
"$t('customer.crudActions.cancel')"
:label=
"$t('customer.crudActions.cancel')"
@
click=
"$emit('click:CloseBtn')"
@
click=
"$emit('click:CloseBtn')"
dense
/>
/>
<q-btn
<q-btn
type=
"submit"
type=
"submit"
...
@@ -43,7 +39,8 @@
...
@@ -43,7 +39,8 @@
no-caps
no-caps
style=
"width: 90px"
style=
"width: 90px"
:label=
"$t('customer.crudActions.save')"
:label=
"$t('customer.crudActions.save')"
@
click=
"$emit('uploadEmbed')"
@
click=
"confirmEditEmbed"
dense
/>
/>
</q-card-actions>
</q-card-actions>
</q-card>
</q-card>
...
...
src/i18n/vi/index.ts
View file @
db2b67de
...
@@ -379,6 +379,7 @@ export default {
...
@@ -379,6 +379,7 @@ export default {
confirmActionsTitle
:
{
confirmActionsTitle
:
{
confirmDeleteArtistTitle
:
'Xác nhận'
,
confirmDeleteArtistTitle
:
'Xác nhận'
,
confirmDeleteArtistContent
:
'Bạn có chắc muốn xoá nghệ sỹ này không?'
,
confirmDeleteArtistContent
:
'Bạn có chắc muốn xoá nghệ sỹ này không?'
,
confirmDeleteEmbedContent
:
'Bạn có chắc muốn xoá Embed này không?'
,
confirmDeleteArtistBtnLabel
:
'Huỷ'
,
confirmDeleteArtistBtnLabel
:
'Huỷ'
,
},
},
actionMessages
:
{
actionMessages
:
{
...
...
src/pages/cap-nhat-thong-tin-nghe-sy/index.vue
View file @
db2b67de
...
@@ -67,6 +67,7 @@
...
@@ -67,6 +67,7 @@
v-model:account=
"account"
v-model:account=
"account"
v-model:short-description=
"shortDescription"
v-model:short-description=
"shortDescription"
v-model:format-schedules=
"formatSchedules"
v-model:format-schedules=
"formatSchedules"
@
confirmDeleteSocialEmbedded=
"confirmDeleteSocialEmbedded"
@
selectedFile=
"selectedFile"
@
selectedFile=
"selectedFile"
@
deleteBanner=
"banners.splice($event, 1)"
@
deleteBanner=
"banners.splice($event, 1)"
@
openDialogUploadEmbed=
"isOpenDialogEmbed = true"
@
openDialogUploadEmbed=
"isOpenDialogEmbed = true"
...
@@ -121,8 +122,8 @@
...
@@ -121,8 +122,8 @@
<UploadEmbedDialog
<UploadEmbedDialog
v-model:is-open-dialog-embed=
"isOpenDialogEmbed"
v-model:is-open-dialog-embed=
"isOpenDialogEmbed"
v-model
:social-embedded=
"socialEmbedded"
:social-embedded=
"socialEmbedded"
@
uploadEmbed=
"
isOpenDialogEmbed = false
"
@
uploadEmbed=
"
changeEmbed
"
@
click:CloseBtn=
"isOpenDialogEmbed = false"
@
click:CloseBtn=
"isOpenDialogEmbed = false"
></UploadEmbedDialog>
></UploadEmbedDialog>
...
...
src/pages/cap-nhat-thong-tin-nghe-sy/updateInformationArtist.ts
View file @
db2b67de
...
@@ -56,8 +56,6 @@ export default defineComponent({
...
@@ -56,8 +56,6 @@ export default defineComponent({
},
},
setup
(
_
,
context
)
{
setup
(
_
,
context
)
{
const
route
=
useRoute
();
const
route
=
useRoute
();
const
tab
=
ref
(
'information'
);
const
tab
=
ref
(
'information'
);
...
@@ -85,6 +83,7 @@ export default defineComponent({
...
@@ -85,6 +83,7 @@ export default defineComponent({
const
id
:
Ref
<
number
>
=
ref
(
0
);
const
id
:
Ref
<
number
>
=
ref
(
0
);
const
account
:
Ref
<
string
>
=
ref
(
''
);
const
account
:
Ref
<
string
>
=
ref
(
''
);
const
avatar
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
avatar
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
avatarFile
:
Ref
<
File
|
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
|
undefined
>
=
ref
();
...
@@ -107,7 +106,7 @@ export default defineComponent({
...
@@ -107,7 +106,7 @@ export default defineComponent({
// state sử dụng trong tab vab account
// state sử dụng trong tab vab account
const
banners
:
Ref
<
BannerType
[]
>
=
ref
([]);
const
banners
:
Ref
<
BannerType
[]
>
=
ref
([]);
const
shortDescription
:
Ref
<
string
|
null
>
=
ref
(
''
);
const
shortDescription
:
Ref
<
string
|
null
>
=
ref
(
''
);
const
socialEmbedded
:
Ref
<
string
|
null
>
=
ref
(
''
);
const
socialEmbedded
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
stories
:
Ref
<
StoriesType
[]
>
=
ref
([]);
const
stories
:
Ref
<
StoriesType
[]
>
=
ref
([]);
const
schedules
:
Ref
<
SchedulesType
[]
>
=
ref
([]);
const
schedules
:
Ref
<
SchedulesType
[]
>
=
ref
([]);
const
formatSchedules
:
Ref
<
string
[]
>
=
ref
([]);
const
formatSchedules
:
Ref
<
string
[]
>
=
ref
([]);
...
@@ -172,10 +171,6 @@ export default defineComponent({
...
@@ -172,10 +171,6 @@ export default defineComponent({
}
}
};
};
const
setAvatar
=
(
value
:
BannerType
)
=>
{
console
.
log
(
value
);
avatar
.
value
=
value
.
url
as
string
;
};
const
getFieldOptions
=
async
()
=>
{
const
getFieldOptions
=
async
()
=>
{
const
response
=
(
await
api
({
const
response
=
(
await
api
({
url
:
API_PATHS
.
getFieldOptions
,
url
:
API_PATHS
.
getFieldOptions
,
...
@@ -330,6 +325,44 @@ export default defineComponent({
...
@@ -330,6 +325,44 @@ export default defineComponent({
const
SetProduct
=
(
value
:
ProductType
)
=>
{
const
SetProduct
=
(
value
:
ProductType
)
=>
{
DataUpdateHotProduct
.
value
=
value
;
DataUpdateHotProduct
.
value
=
value
;
};
};
const
setAvatar
=
(
value
:
BannerType
)
=>
{
console
.
log
(
value
);
avatarFile
.
value
=
value
.
file
as
File
;
avatar
.
value
=
value
.
url
as
string
;
};
const
confirmDeleteSocialEmbedded
=
()
=>
{
Dialog
.
create
({
title
:
i18n
.
global
.
t
(
'artist.bankAccount.confirmActionsTitle.confirmDeleteAccBankTitle'
),
message
:
i18n
.
global
.
t
(
'artist.confirmActionsTitle.confirmDeleteEmbedContent'
),
cancel
:
i18n
.
global
.
t
(
'artist.bankAccount.confirmActionsTitle.confirmDeleteAccBankBtnLabel'
),
color
:
'negative'
,
}).
onOk
(()
=>
{
socialEmbedded
.
value
=
null
;
});
};
const
changeEmbed
=
(
newEmbed
:
string
|
null
)
=>
{
socialEmbedded
.
value
=
newEmbed
;
console
.
log
(
newEmbed
,
'newEmbed'
);
isOpenDialogEmbed
.
value
=
false
;
};
// const callApiUploadImage = async (file: File) => {
// try {
// const response = await api({
// url: API_PATHS.uploadImage,
// method: 'GET',
// params: {},
// });
// } catch (error) {}
// };
const
updateInformationArtist
=
async
()
=>
{
const
updateInformationArtist
=
async
()
=>
{
try
{
try
{
...
@@ -376,24 +409,23 @@ export default defineComponent({
...
@@ -376,24 +409,23 @@ export default defineComponent({
}
}
}
catch
(
error
)
{}
}
catch
(
error
)
{}
};
};
const
deleteAvatar
=
()
=>
{
const
deleteImagesStories
=
(
value
:
number
)
=>
{
avatar
.
value
=
null
console
.
log
(
value
,
'deleteImagesStories'
);
};
const
deleteImagesStories
=
(
value
:
number
)
=>
{
console
.
log
(
value
,
'deleteImagesStories'
);
console
.
log
(
stories
.
value
);
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
)
{
console
.
log
(
1
);
console
.
log
(
1
);
stories
.
value
.
splice
(
Number
(
stories
.
value
[
i
]),
1
)
stories
.
value
.
splice
(
Number
(
stories
.
value
[
i
]),
1
);
}
}
}
}
console
.
log
(
stories
.
value
);
console
.
log
(
stories
.
value
);
};
};
const
deleteAvatar
=
()
=>
{
avatar
.
value
=
null
;
};
onMounted
(()
=>
{
onMounted
(()
=>
{
void
getInformationArtist
();
void
getInformationArtist
();
void
getFieldOptions
();
void
getFieldOptions
();
...
@@ -477,7 +509,9 @@ export default defineComponent({
...
@@ -477,7 +509,9 @@ export default defineComponent({
setAvatar
,
setAvatar
,
deleteAvatar
,
deleteAvatar
,
deleteImagesStories
,
deleteImagesStories
,
DeleteItemStories
DeleteItemStories
,
confirmDeleteSocialEmbedded
,
changeEmbed
,
};
};
},
},
});
});
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