diff --git a/webclient/src/Admin.js b/webclient/src/Admin.js
index 6bd5b25..6f63577 100644
--- a/webclient/src/Admin.js
+++ b/webclient/src/Admin.js
@@ -185,8 +185,8 @@ export function AdminMemberCards(props) {
{cards.length ?
- cards.map((x, i) =>
-
+ cards.map(x =>
+
)
:
None
diff --git a/webclient/src/Cards.js b/webclient/src/Cards.js
index e29d4ef..5a3f301 100644
--- a/webclient/src/Cards.js
+++ b/webclient/src/Cards.js
@@ -28,8 +28,8 @@ export function Cards(props) {
- {user.cards.map((x, i) =>
-
+ {user.cards.map(x =>
+
{x.card_number}
{x.notes}
{x.last_seen_at}
diff --git a/webclient/src/Classes.js b/webclient/src/Classes.js
index 3cdf445..d914992 100644
--- a/webclient/src/Classes.js
+++ b/webclient/src/Classes.js
@@ -25,8 +25,8 @@ function ClassTable(props) {
{classes.length ?
- classes.map((x, i) =>
-
+ classes.map(x =>
+
{x.course_name}
@@ -182,7 +182,7 @@ export function ClassDetail(props) {
{(isAdmin(user) || clazz.instructor === user.id) &&
-
+
}
diff --git a/webclient/src/Courses.js b/webclient/src/Courses.js
index 96755b1..b09648c 100644
--- a/webclient/src/Courses.js
+++ b/webclient/src/Courses.js
@@ -40,8 +40,8 @@ export function Courses(props) {
{courses.length ?
- courses.map((x, i) =>
-
+ courses.map(x =>
+
{x.name}
@@ -115,8 +115,8 @@ export function CourseDetail(props) {
{course.sessions.length ?
- course.sessions.sort((a, b) => a.datetime < b.datetime ? 1 : -1).slice(0,10).map((x, i) =>
-
+ course.sessions.sort((a, b) => a.datetime < b.datetime ? 1 : -1).slice(0,10).map(x =>
+
{moment.utc(x.datetime).local().format('ll')}
diff --git a/webclient/src/Home.js b/webclient/src/Home.js
index ad4c07e..50013bc 100644
--- a/webclient/src/Home.js
+++ b/webclient/src/Home.js
@@ -81,8 +81,8 @@ function MemberInfo(props) {
{lastTrans.length ?
- lastTrans.map((x, i) =>
-
+ lastTrans.map(x =>
+
{x.date}
diff --git a/webclient/src/InstructorClasses.js b/webclient/src/InstructorClasses.js
index 2701a89..ea3e5ec 100644
--- a/webclient/src/InstructorClasses.js
+++ b/webclient/src/InstructorClasses.js
@@ -8,7 +8,7 @@ import { Button, Container, Checkbox, Divider, Dropdown, Form, Grid, Header, Ico
import { BasicTable, staticUrl, requester } from './utils.js';
function AttendanceRow(props) {
- const { student, token } = props;
+ const { student, token, refreshClass } = props;
const [training, setTraining] = useState(student);
const [error, setError] = useState(false);
@@ -17,6 +17,7 @@ function AttendanceRow(props) {
requester('/training/'+training.id+'/', 'PATCH', token, data)
.then(res => {
setTraining(res);
+ refreshClass();
setError(false);
})
.catch(err => {
@@ -74,8 +75,8 @@ export function InstructorClassAttendance(props) {
{clazz.students.length ?
- clazz.students.map((x, i) =>
-
+ clazz.students.map(x =>
+
)
:
No students yet.
diff --git a/webclient/src/Members.js b/webclient/src/Members.js
index d016359..a5fe1a8 100644
--- a/webclient/src/Members.js
+++ b/webclient/src/Members.js
@@ -50,8 +50,8 @@ export function Members(props) {
{response ?
{response.results.length ?
- response.results.map((x, i) =>
- -
+ response.results.map(x =>
+
-
{x.member.preferred_name} {x.member.last_name}
diff --git a/webclient/src/Training.js b/webclient/src/Training.js
index b16d7b9..47a6347 100644
--- a/webclient/src/Training.js
+++ b/webclient/src/Training.js
@@ -25,8 +25,8 @@ export function Training(props) {
- {user.training.map((x, i) =>
-
+ {user.training.map(x =>
+
{x.session.course_name}
{moment(x.session.datetime).format('MMMM Do YYYY')}
diff --git a/webclient/src/Transactions.js b/webclient/src/Transactions.js
index e730c0a..df64912 100644
--- a/webclient/src/Transactions.js
+++ b/webclient/src/Transactions.js
@@ -24,8 +24,8 @@ export function Transactions(props) {
{user.transactions.length ?
- user.transactions.slice().reverse().map((x, i) =>
-
+ user.transactions.slice().reverse().map(x =>
+
{x.date}