Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
cicer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
meskio
cicer
Commits
f6a009eb
There was an error fetching the commit references. Please try again later.
Unverified
Commit
f6a009eb
authored
1 year ago
by
meskio
Browse files
Options
Downloads
Patches
Plain Diff
Accept unexisting members in dues list
* Closes:
#32
parent
0937b027
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/dues/DuesReport.js
+2
-2
2 additions, 2 deletions
src/dues/DuesReport.js
src/util.js
+9
-0
9 additions, 0 deletions
src/util.js
with
11 additions
and
2 deletions
src/dues/DuesReport.js
+
2
−
2
View file @
f6a009eb
import
React
,
{
useState
}
from
"
react
"
;
import
{
Table
}
from
"
react-bootstrap
"
;
import
Fetcher
from
"
../Fetcher
"
;
import
{
printDate
,
printMoney
}
from
"
../util
"
;
import
{
printDate
,
printMoney
,
printMember
}
from
"
../util
"
;
function
DuesReport
()
{
const
[
dues
,
setDues
]
=
useState
([]);
...
...
@@ -18,7 +18,7 @@ function DuesReport() {
const
entries
=
dues
.
map
((
d
)
=>
(
<
tr
key
=
{
d
.
ID
}
>
<
td
>
{
printDate
(
d
.
date
)}
<
/td
>
<
td
>
{
d
.
member
.
name
+
"
(
"
+
d
.
member
.
num
+
"
)
"
}
<
/td
>
<
td
>
{
printMember
(
d
.
member
)
}
<
/td
>
<
td
>
{
printMoney
(
-
d
.
total
)}
<
/td
>
<
/tr
>
));
...
...
This diff is collapsed.
Click to expand it.
src/util.js
+
9
−
0
View file @
f6a009eb
...
...
@@ -38,6 +38,14 @@ function printID(pre, item) {
return
pre
+
"
-
"
+
item
.
ID
.
toString
().
padStart
(
5
,
"
0
"
);
}
function
printMember
(
member
)
{
if
(
member
)
{
return
member
.
name
+
"
(
"
+
member
.
num
+
"
)
"
;
}
else
{
return
"
-
"
;
}
}
function
url
(
path
)
{
let
api
=
process
.
env
.
REACT_APP_API
;
if
(
!
api
)
{
...
...
@@ -75,6 +83,7 @@ export {
printMoney
,
printDate
,
printRole
,
printMember
,
url
,
date2string
,
time2string
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment