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
3e3e2293
Commit
3e3e2293
authored
May 21, 2021
by
Võ Quang Thành Đạt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix isDefalut BankAccount Artist
parent
e0ae6c5c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
51 additions
and
9 deletions
+51
-9
BankAccount.ts
...components/artist-information/bank-account/BankAccount.ts
+14
-6
index.vue
src/components/artist-information/bank-account/index.vue
+9
-3
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
+14
-0
AddArtist.ts
src/pages/them-nghe-sy/AddArtist.ts
+12
-0
index.vue
src/pages/them-nghe-sy/index.vue
+1
-0
No files found.
src/components/artist-information/bank-account/BankAccount.ts
View file @
3e3e2293
...
...
@@ -12,7 +12,7 @@ export default defineComponent({
required
:
true
,
},
},
setup
(
props
)
{
setup
(
props
,
context
)
{
const
userTableColumnsBankAccount
=
[
{
name
:
'STT'
,
...
...
@@ -83,9 +83,12 @@ export default defineComponent({
const
userTableRowsBankAccount
:
Ref
<
BankAccountType
[]
>
=
ref
([]);
const
isOpenDialog
=
ref
(
false
);
const
dataBankAccount
:
Ref
<
BankAccountType
[]
>
=
ref
([]);
const
showData
=
(
info
:
BankAccountType
,
idxAcc
:
number
)
=>
{
console
.
log
(
info
,
'showData'
);
console
.
log
(
idxAcc
,
'showData'
);
const
changeIsDefault
=
(
isDefault
:
number
,
idxAcc
:
number
)
=>
{
context
.
emit
(
'confirmChangeIsDefault'
,
{
isDefault
:
isDefault
,
idxAcc
:
idxAcc
,
});
};
onMounted
(()
=>
{
console
.
log
(
props
.
bankAccounts
,
'bankAccount'
);
...
...
@@ -96,8 +99,13 @@ export default defineComponent({
userTableColumnsBankAccount
,
userTableRowsBankAccount
,
dataBankAccount
,
showData
,
changeIsDefault
,
};
},
emits
:
[
'click:addBankBtn'
,
'confirmDeleteAccBank'
,
'clickEditAccBankBtn'
],
emits
:
[
'click:addBankBtn'
,
'confirmDeleteAccBank'
,
'clickEditAccBankBtn'
,
'confirmChangeIsDefault'
,
],
});
src/components/artist-information/bank-account/index.vue
View file @
3e3e2293
...
...
@@ -40,11 +40,11 @@
<
template
v-slot:body-cell-isDefault=
"rowData"
>
<q-td>
<div
align=
"center"
>
<!-- @click="showData(rowData.row, rowData.rowIndex)" -->
<q-checkbox
v-model
=
"rowData.value"
:model-value
=
"rowData.value"
:true-value=
"1"
:false-value=
"2"
@
click=
"changeIsDefault(rowData.value, rowData.rowIndex)"
/>
</div>
</q-td>
...
...
@@ -53,7 +53,13 @@
<q-td
style=
"padding: 0; height: 100%"
>
<div
align=
"center"
>
<q-btn
@
click=
"$emit('clickEditAccBankBtn', item.row, item.rowIndex)"
@
click=
"
$emit(
'clickEditAccBankBtn',
item.row.isDefault,
item.rowIndex
)
"
flat
round
color=
"primary"
...
...
src/pages/cap-nhat-thong-tin-nghe-sy/index.vue
View file @
3e3e2293
...
...
@@ -108,6 +108,7 @@
<BankAccount
:bank-accounts=
"bankAccounts"
@
confirmDeleteAccBank=
"confirmDeleteAccBank"
@
confirmChangeIsDefault=
"confirmChangeIsDefault($event)"
@
click:addBankBtn=
"isOpenAddAccountBankDialog = true"
@
clickEditAccBankBtn=
"openDialogEditAccBank"
></BankAccount>
...
...
src/pages/cap-nhat-thong-tin-nghe-sy/updateInformationArtist.ts
View file @
3e3e2293
...
...
@@ -43,6 +43,10 @@ export type AvatarType = {
file
?:
File
;
url
?:
string
|
null
;
};
export
type
changeIsDefault
=
{
idxAcc
:
number
;
isDefault
:
number
;
};
export
default
defineComponent
({
components
:
{
PersonalInformation
,
...
...
@@ -793,6 +797,15 @@ export default defineComponent({
avatar
.
value
=
null
;
avatarFile
.
value
=
null
;
};
const
confirmChangeIsDefault
=
(
item
:
changeIsDefault
)
=>
{
// console.log(item);
if
(
item
.
isDefault
===
2
)
{
bankAccounts
.
value
.
map
((
item
)
=>
(
item
.
isDefault
=
2
));
bankAccounts
.
value
[
item
.
idxAcc
].
isDefault
=
1
;
}
else
bankAccounts
.
value
[
item
.
idxAcc
].
isDefault
=
2
;
};
onMounted
(()
=>
{
void
getInformationArtist
();
void
getFieldOptions
();
...
...
@@ -898,6 +911,7 @@ export default defineComponent({
artistLevelRules
,
errorMessEmail
,
errorMessPhoneNumber
,
confirmChangeIsDefault
,
};
},
});
src/pages/them-nghe-sy/AddArtist.ts
View file @
3e3e2293
...
...
@@ -42,6 +42,10 @@ export type AvatarType = {
file
?:
File
;
url
?:
string
|
null
;
};
export
type
changeIsDefault
=
{
idxAcc
:
number
;
isDefault
:
number
;
};
export
default
defineComponent
({
components
:
{
PersonalInformation
,
...
...
@@ -729,6 +733,13 @@ export default defineComponent({
const
deleteAvatar
=
()
=>
{
avatar
.
value
=
null
;
};
const
confirmChangeIsDefault
=
(
item
:
changeIsDefault
)
=>
{
// console.log(item);
if
(
item
.
isDefault
===
2
)
{
bankAccounts
.
value
.
map
((
item
)
=>
(
item
.
isDefault
=
2
));
bankAccounts
.
value
[
item
.
idxAcc
].
isDefault
=
1
;
}
else
bankAccounts
.
value
[
item
.
idxAcc
].
isDefault
=
2
;
};
onMounted
(()
=>
{
void
getFieldOptions
();
void
getNationalityOptions
();
...
...
@@ -831,6 +842,7 @@ export default defineComponent({
artistLevelRules
,
errorMessEmail
,
errorMessPhoneNumber
,
confirmChangeIsDefault
,
};
},
});
src/pages/them-nghe-sy/index.vue
View file @
3e3e2293
...
...
@@ -108,6 +108,7 @@
<BankAccount
:bank-accounts=
"bankAccounts"
@
confirmDeleteAccBank=
"confirmDeleteAccBank"
@
confirmChangeIsDefault=
"confirmChangeIsDefault($event)"
@
click:addBankBtn=
"isOpenAddAccountBankDialog = true"
@
clickEditAccBankBtn=
"openDialogEditAccBank"
></BankAccount>
...
...
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