diff --git a/apiserver/apiserver/api/admin.py b/apiserver/apiserver/api/admin.py index 0b3adab..1d6f3b7 100644 --- a/apiserver/apiserver/api/admin.py +++ b/apiserver/apiserver/api/admin.py @@ -12,9 +12,10 @@ for model in app_models: pass try: - if hasattr(model, 'MY_FIELDS'): - MyAdmin.list_display = model.MY_FIELDS - MyAdmin.search_fields = model.MY_FIELDS + if hasattr(model, 'list_display'): + MyAdmin.list_display = model.list_display + if hasattr(model, 'search_fields'): + MyAdmin.search_fields = model.search_fields admin.site.register(model, MyAdmin) except AlreadyRegistered: diff --git a/apiserver/apiserver/api/emails/overdue.html b/apiserver/apiserver/api/emails/overdue.html new file mode 100644 index 0000000..97e6bff --- /dev/null +++ b/apiserver/apiserver/api/emails/overdue.html @@ -0,0 +1,26 @@ + + +
+Error loading summary.
+ } + + {!error ? transactions &&Found {transactions.length} transactions.
{!!transactions.length &&Error loading transactions.
diff --git a/webclient/src/App.js b/webclient/src/App.js index e6d11de..1d6d8ac 100644 --- a/webclient/src/App.js +++ b/webclient/src/App.js @@ -29,7 +29,7 @@ import { NotFound, PleaseLogin } from './Misc.js'; import { Debug } from './Debug.js'; import { Garden } from './Garden.js'; import { Footer } from './Footer.js'; -import { LCARS1Display } from './Display.js'; +import { LCARS1Display, LCARS2Display } from './Display.js'; const APP_VERSION = 5; // TODO: automate this @@ -98,7 +98,8 @@ function App() { right: '16px', buttonColorDark: '#666', buttonColorLight: '#aaa', - label: '🌙', + label: '🌓', + autoMatchOsTheme: false, } const darkmode = new Darkmode(options); darkmode.showWidget(); @@ -129,6 +130,10 @@ function App() {- Click here - to view your card image. + View your card image. +
:Upload a photo to generate a card image.
diff --git a/webclient/src/Charts.js b/webclient/src/Charts.js index 3096699..980239a 100644 --- a/webclient/src/Charts.js +++ b/webclient/src/Charts.js @@ -310,7 +310,7 @@ export function Charts(props) {Current balance: ₱ {user.member.protocoin.toFixed(2)}
+ +Trotec Usage
+LCARS1 Display
+ +LCARS2 Display
+ ); diff --git a/webclient/src/Display.js b/webclient/src/Display.js index 471cbc4..a4388f9 100644 --- a/webclient/src/Display.js +++ b/webclient/src/Display.js @@ -34,7 +34,17 @@ export function LCARS1Display(props) { } - ++ +
+ } + +- Waiting for job -
- > ++ Waiting for job +
} > ); }; + +export function DisplayScores(props) { + const { token, name } = props; + const [scores, setScores] = useState(false); + + const getScores = () => { + requester('/pinball/high_scores/', 'GET') + .then(res => { + setScores(res); + }) + .catch(err => { + console.log(err); + setScores(false); + }); + }; + + useEffect(() => { + getScores(); + const interval = setInterval(getScores, 60000); + return () => clearInterval(interval); + }, []); + + return ( + <> +{x.score.toLocaleString()}
+{x.score.toLocaleString()}
+{x.hours.toFixed(2)} hours
+@@ -97,7 +97,7 @@ export const Footer = () => {
-© 2020 Calgary Protospace Ltd.
+© 2020-{new Date().getFullYear()} Calgary Protospace Ltd.
Visit the Paymaster page or pay a Director to buy Protocoin.
+- Click here - to view your application forms. + View your application forms. +
} @@ -89,8 +94,6 @@ function MemberInfo(props) {+ ⚠️ You need to attend a New Member Orientation to use any tool larger than a screwdriver. +
} +Protospace Wiki — [register]
+ +Protospace Wiki — [register]
Forum (Spacebar) — [register]
{!!user && } {!!user && isAdmin(user) && } @@ -348,7 +363,33 @@ export function Home(props) { } trigger={[more]} /> +
+ Media computer: {getTrackStat('PROTOGRAPH1')}
+ Last use:
+ Last print:
+ {getTrackLast('PROTOGRAPH1')}
+ {getTrackAgo('PROTOGRAPH1')}
+ by {getTrackName('PROTOGRAPH1')}
+
+ {getTrackLast('LASTLARGEPRINT')}
+ {getTrackAgo('LASTLARGEPRINT')}
+ by {getTrackName('LASTLARGEPRINT')}
+
ORD2 printer: {printer3dStat('ord2')}
+ +ORD3 printer: {printer3dStat('ord3')}
+ {user &&Alarm status: {alarmStat()}{doorOpenStat()}
} + + {user &&Hosting status: {closedStat()}
}Pay for materials you use (ie. welding gas, 3D printing, blades, etc).
- -Pay for materials you use (ie. welding gas, 3D printing, etc).
+ Custom amount:Donation of any amount to Protospace.
+ Custom amount:If this transaction was made in error or there is anything incorrect about it, please report it using this form.
-A staff member will review the report as soon as possible.
-Follow up with directors@protospace.ca.
- -If there's anything wrong with this transaction or it was made in error please email the Protospace Directors:
+ +Please include a link to this transaction and any relevant details.