diff --git a/webclient/src/Classes.js b/webclient/src/Classes.js index 27159c8..7bd527f 100644 --- a/webclient/src/Classes.js +++ b/webclient/src/Classes.js @@ -6,6 +6,7 @@ import moment from 'moment'; import { isAdmin, isInstructor, BasicTable, requester } from './utils.js'; import { NotFound, PleaseLogin } from './Misc.js'; import { InstructorClassDetail, InstructorClassAttendance } from './InstructorClasses.js'; +import { PayPal } from './PayPal.js'; function ClassTable(props) { const { classes } = props; @@ -190,14 +191,27 @@ export function ClassDetail(props) { (userTraining ?

Status: {userTraining.attendance_status}

- {userTraining.attendance_status === 'Withdrawn' ? - - : - +

+ {userTraining.attendance_status === 'Withdrawn' ? + + : + + } +

+ + {userTraining.attendance_status === 'Waiting for payment' && +
+

Please pay the course fee of ${clazz.cost} to confirm your attendance.

+ +
}
: diff --git a/webclient/src/PayPal.js b/webclient/src/PayPal.js new file mode 100644 index 0000000..4bd8df8 --- /dev/null +++ b/webclient/src/PayPal.js @@ -0,0 +1,26 @@ +import React, { useState, useEffect, useReducer } from 'react'; + +export function PayPal(props) { + const { amount, custom, name } = props; + + return ( +
+
+ + + + + + + + + + + + + + +
+
+ ); +}