Merge pull request #117 from Dmitra/master

please, have a look at commits
This commit is contained in:
Tanner 2023-07-31 21:41:23 +00:00 committed by GitHub
commit 306860bf51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 40 additions and 39 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.idea/

View File

@ -5,7 +5,7 @@ Babel==2.9.1
backcall==0.2.0
bleach==3.3.0
certifi==2019.11.28
cffi==1.13.2
cffi==1.15.1
chardet==3.0.4
commonmark==0.9.1
decorator==5.1.1
@ -39,7 +39,7 @@ packaging==20.0
parso==0.8.3
pexpect==4.8.0
pickleshare==0.7.5
Pillow==8.3.2
Pillow==9.5.0
prompt-toolkit==3.0.29
ptyprocess==0.7.0
pycparser==2.19
@ -53,7 +53,7 @@ python3-openid==3.1.0
pytz==2019.3
PyYAML==6.0
recommonmark==0.7.1
reportlab==3.5.55
reportlab==4.0.4
requests==2.22.0
requests-oauthlib==1.3.0
six==1.13.0

View File

@ -171,7 +171,7 @@ export function AdminHistory(props) {
<React.Fragment key={x.id}>
<Table.Row>
<Table.Cell>
<a href='javascript:;' onClick={() => setFocus(x.id)}>
<a onClick={() => setFocus(x.id)}>
{moment.utc(x.history_date).tz('America/Edmonton').format('YYYY-MM-DD')}
</a>
</Table.Cell>

View File

@ -330,7 +330,7 @@ export function AdminMemberPause(props) {
<div>
<Header size='medium'>Pause / Unpause Membership</Header>
<p>
<div>
{result.member.paused_date ?
result.member.vetted_date && moment().diff(moment(result.member.paused_date), 'days') > 370 ?
<>
@ -338,16 +338,16 @@ export function AdminMemberPause(props) {
{result.member.preferred_name} has been away for more than a year and will need to be re-vetted according to our
<a href='https://wiki.protospace.ca/Approved_policies/Membership' target='_blank' rel='noopener noreferrer'> policy</a>.
</p>
<p>
<div>
<Form.Checkbox
name='told1'
value={told1}
checked={told1}
label='Told member to get re-vetted'
required
onChange={(e, v) => setTold1(v.checked)}
/>
</p>
<p>
</div>
<div>
<Form.Checkbox
name='told2'
value={told2}
@ -355,36 +355,36 @@ export function AdminMemberPause(props) {
required
onChange={(e, v) => setTold2(v.checked)}
/>
</p>
</div>
<Button onClick={handleUnpause} loading={loading} disabled={!told1 || !told2}>
Unpause
</Button>
</>
:
result.member.status == 'Expired Member' ?
result.member.status === 'Expired Member' ?
<>
<p>
{result.member.preferred_name} has expired due to lapse of payment.
</p>
<p>
<div>
<Form.Checkbox
name='told1'
value={told1}
checked={told1}
label='Member has paid any back-dues owed'
required
onChange={(e, v) => setTold1(v.checked)}
/>
</p>
<p>
</div>
<div>
<Form.Checkbox
name='told2'
value={told2}
checked={told2}
label='Recorded payment transaction on portal'
required
onChange={(e, v) => setTold2(v.checked)}
/>
</p>
</div>
<Button onClick={handleUnpause} loading={loading} disabled={!told1 || !told2}>
Unpause
@ -398,31 +398,31 @@ export function AdminMemberPause(props) {
<>
<p>Pause members who are inactive, former, or on vacation.</p>
<p>
<div>
<Form.Checkbox
name='told1'
value={told1}
checked={told1}
label='Told member to stop any PayPal subscriptions'
required
onChange={(e, v) => setTold1(v.checked)}
/>
</p>
<p>
</div>
<div>
<Form.Checkbox
name='told2'
value={told2}
checked={told2}
label='Told member to clear any shelves'
required
onChange={(e, v) => setTold2(v.checked)}
/>
</p>
</div>
<Button onClick={handlePause} loading={loading} disabled={!told1 || !told2}>
Pause
</Button>
</>
}
</p>
</div>
{success && <div>Success!</div>}
{error && <p>Error, something went wrong.</p>}

View File

@ -354,7 +354,7 @@ export function Classes(props) {
</>
}
<p>
<div>
<Button
onClick={() => {
setSortByCourse(true);
@ -389,7 +389,7 @@ export function Classes(props) {
onClick={() => setSearch('')}
/>
}
</p>
</div>
<p>Filter by tag:</p>

View File

@ -16,7 +16,7 @@ export const tags = {
Crafts: 'yellow',
//name: 'olive',
Electronics: 'green',
Computers: 'teal',
Software: 'teal',
Metal: 'blue',
//name: 'violet',
Event: 'purple',

View File

@ -63,7 +63,7 @@ function MemberInfo(props) {
<Table.Cell>Shelf:</Table.Cell>
<Table.Cell>
{user.storage.length ?
user.storage.sort((a, b) => a.location == 'member_shelves' ? -1 : 1).map((x, i) =>
user.storage.sort((a, b) => a.location === 'member_shelves' ? -1 : 1).map((x, i) =>
<StorageButton storage={x} />
)
:

View File

@ -201,7 +201,7 @@ export function Members(props) {
Sort by{' '}
{Object.entries(memberSorts).map((x, i) =>
<React.Fragment key={x[0]}>
<a href='javascript:void(0)' onClick={() => doSort(x[0])}>{x[1]}</a>
<a onClick={() => doSort(x[0])}>{x[1]}</a>
{i < Object.keys(memberSorts).length - 1 && ', '}
</React.Fragment>
)}.
@ -243,7 +243,7 @@ export function Members(props) {
<>
<Item.Description>
Shelf: {x.member.storage.length ?
x.member.storage.sort((a, b) => a.location == 'member_shelves' ? -1 : 1).map((x, i) =>
x.member.storage.sort((a, b) => a.location === 'member_shelves' ? -1 : 1).map((x, i) =>
<StorageButton storage={x} />
)
:
@ -253,7 +253,6 @@ export function Members(props) {
<Item.Description>Joined: {x.member.application_date || 'Unknown'}</Item.Description>
</>
}
<Item.Description>ID: {x.member.id}</Item.Description>
</Item.Content>
</Item>
)

View File

@ -114,7 +114,6 @@ export function SendProtocoin(props) {
export function Paymaster(props) {
const { token, user, refreshUser } = props;
const [pop, setPop] = useState('20.00');
const [locker, setLocker] = useState('5.00');
const [consumables, setConsumables] = useState('');
const [buyProtocoin, setBuyProtocoin] = useState('10.00');
@ -214,14 +213,14 @@ export function Paymaster(props) {
/>
</div>
<p>
<div>
Please explain what you bought:<br/>
<Input
value={consumablesMemo}
maxLength={50}
onChange={(e, v) => setConsumablesMemo(v.value)}
/>
</p>
</div>
<PayPalPayNow
amount={consumables}
@ -229,8 +228,6 @@ export function Paymaster(props) {
custom={JSON.stringify({ category: 'Consumables', member: user.member.id, memo: consumablesMemo })}
/>
<p/>
<PayWithProtocoin
token={token} user={user} refreshUser={refreshUser}
amount={consumables}
@ -255,14 +252,14 @@ export function Paymaster(props) {
/>
</div>
<p>
<div>
Optional memo:<br/>
<Input
value={memo}
maxLength={50}
onChange={(e, v) => setMemo(v.value)}
/>
</p>
</div>
<PayPalPayNow
amount={donate}

View File

@ -17,6 +17,10 @@ body {
margin: 0;
}
a {
cursor: pointer;
}
.hero {
padding-top: 1.5rem;
margin-bottom: 1.5rem;