Merge pull request #117 from Dmitra/master
please, have a look at commits
This commit is contained in:
commit
306860bf51
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
.idea/
|
|
@ -5,7 +5,7 @@ Babel==2.9.1
|
||||||
backcall==0.2.0
|
backcall==0.2.0
|
||||||
bleach==3.3.0
|
bleach==3.3.0
|
||||||
certifi==2019.11.28
|
certifi==2019.11.28
|
||||||
cffi==1.13.2
|
cffi==1.15.1
|
||||||
chardet==3.0.4
|
chardet==3.0.4
|
||||||
commonmark==0.9.1
|
commonmark==0.9.1
|
||||||
decorator==5.1.1
|
decorator==5.1.1
|
||||||
|
@ -39,7 +39,7 @@ packaging==20.0
|
||||||
parso==0.8.3
|
parso==0.8.3
|
||||||
pexpect==4.8.0
|
pexpect==4.8.0
|
||||||
pickleshare==0.7.5
|
pickleshare==0.7.5
|
||||||
Pillow==8.3.2
|
Pillow==9.5.0
|
||||||
prompt-toolkit==3.0.29
|
prompt-toolkit==3.0.29
|
||||||
ptyprocess==0.7.0
|
ptyprocess==0.7.0
|
||||||
pycparser==2.19
|
pycparser==2.19
|
||||||
|
@ -53,7 +53,7 @@ python3-openid==3.1.0
|
||||||
pytz==2019.3
|
pytz==2019.3
|
||||||
PyYAML==6.0
|
PyYAML==6.0
|
||||||
recommonmark==0.7.1
|
recommonmark==0.7.1
|
||||||
reportlab==3.5.55
|
reportlab==4.0.4
|
||||||
requests==2.22.0
|
requests==2.22.0
|
||||||
requests-oauthlib==1.3.0
|
requests-oauthlib==1.3.0
|
||||||
six==1.13.0
|
six==1.13.0
|
||||||
|
|
|
@ -171,7 +171,7 @@ export function AdminHistory(props) {
|
||||||
<React.Fragment key={x.id}>
|
<React.Fragment key={x.id}>
|
||||||
<Table.Row>
|
<Table.Row>
|
||||||
<Table.Cell>
|
<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')}
|
{moment.utc(x.history_date).tz('America/Edmonton').format('YYYY-MM-DD')}
|
||||||
</a>
|
</a>
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
|
|
|
@ -330,7 +330,7 @@ export function AdminMemberPause(props) {
|
||||||
<div>
|
<div>
|
||||||
<Header size='medium'>Pause / Unpause Membership</Header>
|
<Header size='medium'>Pause / Unpause Membership</Header>
|
||||||
|
|
||||||
<p>
|
<div>
|
||||||
{result.member.paused_date ?
|
{result.member.paused_date ?
|
||||||
result.member.vetted_date && moment().diff(moment(result.member.paused_date), 'days') > 370 ?
|
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
|
{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>.
|
<a href='https://wiki.protospace.ca/Approved_policies/Membership' target='_blank' rel='noopener noreferrer'> policy</a>.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<div>
|
||||||
<Form.Checkbox
|
<Form.Checkbox
|
||||||
name='told1'
|
name='told1'
|
||||||
value={told1}
|
checked={told1}
|
||||||
label='Told member to get re-vetted'
|
label='Told member to get re-vetted'
|
||||||
required
|
required
|
||||||
onChange={(e, v) => setTold1(v.checked)}
|
onChange={(e, v) => setTold1(v.checked)}
|
||||||
/>
|
/>
|
||||||
</p>
|
</div>
|
||||||
<p>
|
<div>
|
||||||
<Form.Checkbox
|
<Form.Checkbox
|
||||||
name='told2'
|
name='told2'
|
||||||
value={told2}
|
value={told2}
|
||||||
|
@ -355,36 +355,36 @@ export function AdminMemberPause(props) {
|
||||||
required
|
required
|
||||||
onChange={(e, v) => setTold2(v.checked)}
|
onChange={(e, v) => setTold2(v.checked)}
|
||||||
/>
|
/>
|
||||||
</p>
|
</div>
|
||||||
|
|
||||||
<Button onClick={handleUnpause} loading={loading} disabled={!told1 || !told2}>
|
<Button onClick={handleUnpause} loading={loading} disabled={!told1 || !told2}>
|
||||||
Unpause
|
Unpause
|
||||||
</Button>
|
</Button>
|
||||||
</>
|
</>
|
||||||
:
|
:
|
||||||
result.member.status == 'Expired Member' ?
|
result.member.status === 'Expired Member' ?
|
||||||
<>
|
<>
|
||||||
<p>
|
<p>
|
||||||
{result.member.preferred_name} has expired due to lapse of payment.
|
{result.member.preferred_name} has expired due to lapse of payment.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<div>
|
||||||
<Form.Checkbox
|
<Form.Checkbox
|
||||||
name='told1'
|
name='told1'
|
||||||
value={told1}
|
checked={told1}
|
||||||
label='Member has paid any back-dues owed'
|
label='Member has paid any back-dues owed'
|
||||||
required
|
required
|
||||||
onChange={(e, v) => setTold1(v.checked)}
|
onChange={(e, v) => setTold1(v.checked)}
|
||||||
/>
|
/>
|
||||||
</p>
|
</div>
|
||||||
<p>
|
<div>
|
||||||
<Form.Checkbox
|
<Form.Checkbox
|
||||||
name='told2'
|
name='told2'
|
||||||
value={told2}
|
checked={told2}
|
||||||
label='Recorded payment transaction on portal'
|
label='Recorded payment transaction on portal'
|
||||||
required
|
required
|
||||||
onChange={(e, v) => setTold2(v.checked)}
|
onChange={(e, v) => setTold2(v.checked)}
|
||||||
/>
|
/>
|
||||||
</p>
|
</div>
|
||||||
|
|
||||||
<Button onClick={handleUnpause} loading={loading} disabled={!told1 || !told2}>
|
<Button onClick={handleUnpause} loading={loading} disabled={!told1 || !told2}>
|
||||||
Unpause
|
Unpause
|
||||||
|
@ -398,31 +398,31 @@ export function AdminMemberPause(props) {
|
||||||
<>
|
<>
|
||||||
<p>Pause members who are inactive, former, or on vacation.</p>
|
<p>Pause members who are inactive, former, or on vacation.</p>
|
||||||
|
|
||||||
<p>
|
<div>
|
||||||
<Form.Checkbox
|
<Form.Checkbox
|
||||||
name='told1'
|
name='told1'
|
||||||
value={told1}
|
checked={told1}
|
||||||
label='Told member to stop any PayPal subscriptions'
|
label='Told member to stop any PayPal subscriptions'
|
||||||
required
|
required
|
||||||
onChange={(e, v) => setTold1(v.checked)}
|
onChange={(e, v) => setTold1(v.checked)}
|
||||||
/>
|
/>
|
||||||
</p>
|
</div>
|
||||||
<p>
|
<div>
|
||||||
<Form.Checkbox
|
<Form.Checkbox
|
||||||
name='told2'
|
name='told2'
|
||||||
value={told2}
|
checked={told2}
|
||||||
label='Told member to clear any shelves'
|
label='Told member to clear any shelves'
|
||||||
required
|
required
|
||||||
onChange={(e, v) => setTold2(v.checked)}
|
onChange={(e, v) => setTold2(v.checked)}
|
||||||
/>
|
/>
|
||||||
</p>
|
</div>
|
||||||
|
|
||||||
<Button onClick={handlePause} loading={loading} disabled={!told1 || !told2}>
|
<Button onClick={handlePause} loading={loading} disabled={!told1 || !told2}>
|
||||||
Pause
|
Pause
|
||||||
</Button>
|
</Button>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
</p>
|
</div>
|
||||||
|
|
||||||
{success && <div>Success!</div>}
|
{success && <div>Success!</div>}
|
||||||
{error && <p>Error, something went wrong.</p>}
|
{error && <p>Error, something went wrong.</p>}
|
||||||
|
|
|
@ -354,7 +354,7 @@ export function Classes(props) {
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
|
||||||
<p>
|
<div>
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setSortByCourse(true);
|
setSortByCourse(true);
|
||||||
|
@ -389,7 +389,7 @@ export function Classes(props) {
|
||||||
onClick={() => setSearch('')}
|
onClick={() => setSearch('')}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
</p>
|
</div>
|
||||||
|
|
||||||
<p>Filter by tag:</p>
|
<p>Filter by tag:</p>
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ export const tags = {
|
||||||
Crafts: 'yellow',
|
Crafts: 'yellow',
|
||||||
//name: 'olive',
|
//name: 'olive',
|
||||||
Electronics: 'green',
|
Electronics: 'green',
|
||||||
Computers: 'teal',
|
Software: 'teal',
|
||||||
Metal: 'blue',
|
Metal: 'blue',
|
||||||
//name: 'violet',
|
//name: 'violet',
|
||||||
Event: 'purple',
|
Event: 'purple',
|
||||||
|
|
|
@ -63,7 +63,7 @@ function MemberInfo(props) {
|
||||||
<Table.Cell>Shelf:</Table.Cell>
|
<Table.Cell>Shelf:</Table.Cell>
|
||||||
<Table.Cell>
|
<Table.Cell>
|
||||||
{user.storage.length ?
|
{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} />
|
<StorageButton storage={x} />
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
|
|
|
@ -201,7 +201,7 @@ export function Members(props) {
|
||||||
Sort by{' '}
|
Sort by{' '}
|
||||||
{Object.entries(memberSorts).map((x, i) =>
|
{Object.entries(memberSorts).map((x, i) =>
|
||||||
<React.Fragment key={x[0]}>
|
<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 && ', '}
|
{i < Object.keys(memberSorts).length - 1 && ', '}
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
)}.
|
)}.
|
||||||
|
@ -243,7 +243,7 @@ export function Members(props) {
|
||||||
<>
|
<>
|
||||||
<Item.Description>
|
<Item.Description>
|
||||||
Shelf: {x.member.storage.length ?
|
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} />
|
<StorageButton storage={x} />
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
|
@ -253,7 +253,6 @@ export function Members(props) {
|
||||||
<Item.Description>Joined: {x.member.application_date || 'Unknown'}</Item.Description>
|
<Item.Description>Joined: {x.member.application_date || 'Unknown'}</Item.Description>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
<Item.Description>ID: {x.member.id}</Item.Description>
|
|
||||||
</Item.Content>
|
</Item.Content>
|
||||||
</Item>
|
</Item>
|
||||||
)
|
)
|
||||||
|
|
|
@ -114,7 +114,6 @@ export function SendProtocoin(props) {
|
||||||
|
|
||||||
export function Paymaster(props) {
|
export function Paymaster(props) {
|
||||||
const { token, user, refreshUser } = props;
|
const { token, user, refreshUser } = props;
|
||||||
const [pop, setPop] = useState('20.00');
|
|
||||||
const [locker, setLocker] = useState('5.00');
|
const [locker, setLocker] = useState('5.00');
|
||||||
const [consumables, setConsumables] = useState('');
|
const [consumables, setConsumables] = useState('');
|
||||||
const [buyProtocoin, setBuyProtocoin] = useState('10.00');
|
const [buyProtocoin, setBuyProtocoin] = useState('10.00');
|
||||||
|
@ -214,14 +213,14 @@ export function Paymaster(props) {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>
|
<div>
|
||||||
Please explain what you bought:<br/>
|
Please explain what you bought:<br/>
|
||||||
<Input
|
<Input
|
||||||
value={consumablesMemo}
|
value={consumablesMemo}
|
||||||
maxLength={50}
|
maxLength={50}
|
||||||
onChange={(e, v) => setConsumablesMemo(v.value)}
|
onChange={(e, v) => setConsumablesMemo(v.value)}
|
||||||
/>
|
/>
|
||||||
</p>
|
</div>
|
||||||
|
|
||||||
<PayPalPayNow
|
<PayPalPayNow
|
||||||
amount={consumables}
|
amount={consumables}
|
||||||
|
@ -229,8 +228,6 @@ export function Paymaster(props) {
|
||||||
custom={JSON.stringify({ category: 'Consumables', member: user.member.id, memo: consumablesMemo })}
|
custom={JSON.stringify({ category: 'Consumables', member: user.member.id, memo: consumablesMemo })}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<p/>
|
|
||||||
|
|
||||||
<PayWithProtocoin
|
<PayWithProtocoin
|
||||||
token={token} user={user} refreshUser={refreshUser}
|
token={token} user={user} refreshUser={refreshUser}
|
||||||
amount={consumables}
|
amount={consumables}
|
||||||
|
@ -255,14 +252,14 @@ export function Paymaster(props) {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>
|
<div>
|
||||||
Optional memo:<br/>
|
Optional memo:<br/>
|
||||||
<Input
|
<Input
|
||||||
value={memo}
|
value={memo}
|
||||||
maxLength={50}
|
maxLength={50}
|
||||||
onChange={(e, v) => setMemo(v.value)}
|
onChange={(e, v) => setMemo(v.value)}
|
||||||
/>
|
/>
|
||||||
</p>
|
</div>
|
||||||
|
|
||||||
<PayPalPayNow
|
<PayPalPayNow
|
||||||
amount={donate}
|
amount={donate}
|
||||||
|
|
|
@ -17,6 +17,10 @@ body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
.hero {
|
.hero {
|
||||||
padding-top: 1.5rem;
|
padding-top: 1.5rem;
|
||||||
margin-bottom: 1.5rem;
|
margin-bottom: 1.5rem;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user