Display card image link if user has one
This commit is contained in:
parent
a849b5f887
commit
6768211a78
|
@ -170,9 +170,20 @@ export function AdminMemberCards(props) {
|
|||
return (
|
||||
<div>
|
||||
<Header size='medium'>Edit Member Cards</Header>
|
||||
|
||||
<Form onSubmit={handleSubmit}>
|
||||
<Header size='small'>Add a Card</Header>
|
||||
|
||||
{result.member.card_photo ?
|
||||
<p>
|
||||
<a href={staticUrl + '/' + result.member.card_photo} target='_blank'>
|
||||
Print card image
|
||||
</a>
|
||||
</p>
|
||||
:
|
||||
<p>No card image, member photo missing!</p>
|
||||
}
|
||||
|
||||
<Form.Group widths='equal'>
|
||||
<Form.Input
|
||||
label='Card Number'
|
||||
|
|
|
@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
|
|||
import { BrowserRouter as Router, Switch, Route, Link, useParams } from 'react-router-dom';
|
||||
import './light.css';
|
||||
import { Button, Container, Divider, Dropdown, Form, Grid, Header, Icon, Image, Menu, Message, Segment, Table } from 'semantic-ui-react';
|
||||
import { BasicTable, requester } from './utils.js';
|
||||
import { BasicTable, requester, staticUrl } from './utils.js';
|
||||
import { NotFound, PleaseLogin } from './Misc.js';
|
||||
|
||||
export function Cards(props) {
|
||||
|
@ -18,6 +18,16 @@ export function Cards(props) {
|
|||
|
||||
<Header size='medium'>Member Cards</Header>
|
||||
|
||||
{user.member.card_photo ?
|
||||
<p>
|
||||
<a href={staticUrl + '/' + user.member.card_photo} target='_blank'>
|
||||
Click here
|
||||
</a> to view your card image.
|
||||
</p>
|
||||
:
|
||||
<p>Upload a photo to generate a card image.</p>
|
||||
}
|
||||
|
||||
{user.cards.length ?
|
||||
user.cards.length > 1 ?
|
||||
<Table basic='very'>
|
||||
|
|
Loading…
Reference in New Issue
Block a user