Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Manuel
kresus
Commits
a97f81a9
Commit
a97f81a9
authored
Oct 30, 2020
by
Benjamin Bouvier
Browse files
Review comments;
parent
45056e63
Pipeline
#357596
passed with stage
in 4 minutes and 14 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
client/components/accesses/accesses-list.js
View file @
a97f81a9
...
...
@@ -14,13 +14,9 @@ import AccountSelector from '../ui/account-select';
export
default
connect
(
state
=>
{
let
accessIds
=
get
.
accessIds
(
state
);
let
accesses
=
accessIds
.
map
(
id
=>
get
.
accessById
(
state
,
id
));
return
{
accessIds
,
accessIds
:
get
.
accessIds
(
state
)
,
isDemoMode
:
get
.
isDemoMode
(
state
),
accesses
,
};
},
dispatch
=>
{
...
...
@@ -30,16 +26,12 @@ export default connect(
}
)(
props
=>
{
const
accesses
=
props
.
accessIds
.
map
(
id
=>
<
BankAccessItem
key
=
{
id
}
accessId
=
{
id
}
/>
)
;
function
handleChangeAccount
(
accountId
)
{
props
.
setDefault
(
accountId
);
}
return
(
<
div
className
=
"
bank-accesses-section
"
>
<
FormRow
label
=
{
$t
(
'
client.accesses.default_account
'
)}
inputId
=
"
default-account-selector
"
input
=
{
<
AccountSelector
onChange
=
{
handleChangeAccoun
t
}
/>
}
input
=
{
<
AccountSelector
onChange
=
{
props
.
setDefaul
t
}
/>
}
help
=
{
$t
(
'
client.accesses.default_account_helper
'
)}
/
>
<
DisplayIf
condition
=
{
!
props
.
isDemoMode
}
>
...
...
client/components/accesses/account.js
View file @
a97f81a9
...
...
@@ -89,7 +89,6 @@ const formatIBAN = iban => {
export
default
connect
(
(
state
,
props
)
=>
{
return
{
isDefaultAccount
:
get
.
defaultAccountId
(
state
)
===
props
.
accountId
,
account
:
get
.
accountById
(
state
,
props
.
accountId
),
isDemoEnabled
:
get
.
isDemoMode
(
state
),
};
...
...
@@ -100,9 +99,6 @@ export default connect(
handleDeleteAccount
:
()
=>
{
actions
.
deleteAccount
(
dispatch
,
props
.
accountId
);
},
handleSetDefault
:
()
=>
{
actions
.
setDefaultAccountId
(
dispatch
,
props
.
accountId
);
},
updateAccount
(
update
,
previousAttributes
)
{
actions
.
updateAccount
(
dispatch
,
props
.
accountId
,
update
,
previousAttributes
);
},
...
...
@@ -110,7 +106,7 @@ export default connect(
},
(
stateToProps
,
dispatchToProps
,
props
)
=>
{
let
currentE
xcludeFromBalance
=
stateToProps
.
account
.
excludeFromBalance
;
let
e
xcludeFromBalance
=
stateToProps
.
account
.
excludeFromBalance
;
return
{
...
stateToProps
,
...
props
,
...
...
@@ -119,10 +115,10 @@ export default connect(
handleExcludeFromBalance
()
{
dispatchToProps
.
updateAccount
(
{
excludeFromBalance
:
!
currentE
xcludeFromBalance
,
excludeFromBalance
:
!
e
xcludeFromBalance
,
},
{
excludeFromBalance
:
currentExcludeFromBalance
,
excludeFromBalance
,
}
);
},
...
...
shared/locales/en.json
View file @
a97f81a9
...
...
@@ -96,8 +96,8 @@
"accesses"
:
{
"back_to_access_list"
:
"Go back to the accesses list"
,
"new_bank_form_title"
:
"Configure a new access"
,
"default_account"
:
"
Choose a d
efault
bank
account"
,
"default_account_helper"
:
"The chosen bank account will be displayed at
Kresus
startup."
"default_account"
:
"
D
efault account"
,
"default_account_helper"
:
"The chosen bank account will be displayed at startup."
},
"editaccessmodal"
:
{
"not_empty"
:
"Please fill the password field"
,
...
...
shared/locales/fr.json
View file @
a97f81a9
...
...
@@ -96,7 +96,7 @@
"accesses"
:
{
"back_to_access_list"
:
"Retourner à la liste des accès"
,
"new_bank_form_title"
:
"Configurer un nouvel accès"
,
"default_account"
:
"C
hoisissez un compte bancair
e par défaut"
,
"default_account"
:
"C
ompt
e par défaut"
,
"default_account_helper"
:
"Le compte bancaire choisi sera affiché au démarrage de Kresus."
},
"editaccessmodal"
:
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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