Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
31
Issues
31
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
My SU
frontend
Commits
99106b36
Commit
99106b36
authored
Nov 20, 2020
by
TJHeeringa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Finanical Settings Page
parent
59070d6b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
89 additions
and
0 deletions
+89
-0
src/App/Components/PageLayout/SideBar/AssociationBoardSideBar.js
.../Components/PageLayout/SideBar/AssociationBoardSideBar.js
+6
-0
src/App/Pages/Financial/Settings.js
src/App/Pages/Financial/Settings.js
+73
-0
src/App/Routing/Authenticated/MyAssociations/BoardMember.js
src/App/Routing/Authenticated/MyAssociations/BoardMember.js
+10
-0
No files found.
src/App/Components/PageLayout/SideBar/AssociationBoardSideBar.js
View file @
99106b36
...
...
@@ -12,6 +12,7 @@ import PeopleRoundedIcon from "@material-ui/icons/PeopleRounded";
import
PersonIcon
from
"
@material-ui/icons/Person
"
;
import
PersonAddIcon
from
"
@material-ui/icons/PersonAdd
"
;
import
PersonAddDisabledIcon
from
"
@material-ui/icons/PersonAddDisabled
"
;
import
SettingsIcon
from
"
@material-ui/icons/Settings
"
;
import
ShareIcon
from
"
@material-ui/icons/Share
"
;
import
StorageIcon
from
"
@material-ui/icons/Storage
"
;
import
SubjectIcon
from
"
@material-ui/icons/Subject
"
;
...
...
@@ -127,6 +128,11 @@ const AssociationBoardDrawer = (props) => {
icon
:
<
EuroIcon
/>
,
primary
:
"
Financial
"
,
items
:
[
{
icon
:
<
SettingsIcon
/>
,
primary
:
"
Settings
"
,
to
:
url
+
"
/financial/settings
"
},
{
icon
:
<
PaymentIcon
/>
,
primary
:
"
Debt collections
"
,
...
...
src/App/Pages/Financial/Settings.js
0 → 100644
View file @
99106b36
import
Button
from
"
@material-ui/core/Button
"
;
import
Container
from
"
@material-ui/core/Container
"
;
import
Typography
from
"
@material-ui/core/Typography
"
;
import
React
,
{
useState
}
from
"
react
"
;
import
{
ValidatorForm
}
from
"
react-material-ui-form-validator
"
;
import
NumberField
from
"
../../Components/Fields/NumberField
"
;
import
Wrapper
from
"
../../Components/Fields/Wrapper
"
;
import
Block
from
"
../../Components/PageLayout/Content/Block
"
;
import
{
useAlertHandler
}
from
"
../../Contexts/AlertHandler
"
;
const
Settings
=
(
props
)
=>
{
const
alerthandler
=
useAlertHandler
();
const
[
association
,
setAssociation
]
=
useState
({
debt_collection_threshold
:
0
});
const
handleSubmit
=
()
=>
{
alerthandler
.
handleAlertHandler
(
"
info
"
,
"
Not implemented
"
);
};
const
handleAssociationChange
=
(
field
,
value
)
=>
{
setAssociation
(
prevState
=>
({
...
prevState
,
[
field
]:
value
}));
};
return
(
<
Container
>
<
Block
>
<
Typography
variant
=
{
"
h5
"
}
>
Financial
Settings
<
/Typography
>
<
hr
className
=
{
"
box-title-separator
"
}
/
>
<
ValidatorForm
onSubmit
=
{
handleSubmit
}
onError
=
{(
errors
)
=>
console
.
error
(
errors
)}
>
<
Wrapper
>
<
NumberField
name
=
{
"
Debt Collection Threshold
"
}
value
=
{
association
.
debt_collection_threshold
}
onChange
=
{(
event
)
=>
handleAssociationChange
(
"
debt_collection_threshold
"
,
event
.
target
.
value
)}
InputProps
=
{{
inputProps
:
{
step
:
0.1
,
min
:
0
}
}}
helperText
=
{
"
Debt Collection Entries below this amount will not be included in the debt collection,
"
+
"
unless its the final debt collection of a membership
"
}
/
>
<
/Wrapper
>
<
Wrapper
>
<
div
/>
<
Button
variant
=
{
"
contained
"
}
color
=
{
"
primary
"
}
type
=
{
"
submit
"
}
>
Save
<
/Button
>
<
/Wrapper
>
<
/ValidatorForm
>
<
/Block
>
<
/Container
>
);
};
Settings
.
propTypes
=
{
};
export
default
Settings
;
\ No newline at end of file
src/App/Routing/Authenticated/MyAssociations/BoardMember.js
View file @
99106b36
...
...
@@ -21,6 +21,7 @@ import PropTypes from "prop-types";
import
React
from
"
react
"
;
import
{
Route
}
from
"
react-router-dom
"
;
import
Settings
from
"
../../../Pages/Financial/Settings
"
;
const
BoardMemberRoutes
=
(
props
)
=>
{
const
{
path
,
association_membership
,
association
}
=
props
;
...
...
@@ -117,6 +118,15 @@ const BoardMemberRoutes = (props) => {
/
>
}
/
>
<
Route
path
=
{
path
+
"
/financial/settings
"
}
render
=
{()
=>
<
Settings
association
=
{
association
}
path
=
{
path
}
/
>
}
/
>
{
/*Emails*/
}
<
Route
path
=
{
path
+
"
/emails/send
"
}
...
...
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