mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-10 17:52:47 +00:00
Add locked brews table
This commit is contained in:
@@ -35,7 +35,9 @@ const LockTools = createClass({
|
|||||||
<p>Number of brews currently locked: {this.state.reviewCount}</p>
|
<p>Number of brews currently locked: {this.state.reviewCount}</p>
|
||||||
<button onClick={this.updateReviewCount}>REFRESH</button>
|
<button onClick={this.updateReviewCount}>REFRESH</button>
|
||||||
<hr />
|
<hr />
|
||||||
<LockTable title='Brews Awaiting Review' resultName='reviewDocuments' fetchURL='/api/lock/reviews' propertyNames={['shareId', 'title']} ></LockTable>
|
<LockTable title='Locked Brews' text='Total Locked Brews' resultName='lockedDocuments' fetchURL='/api/locks' propertyNames={['shareId', 'title']} ></LockTable>
|
||||||
|
<hr />
|
||||||
|
<LockTable title='Brews Awaiting Review' text='Total Reviews Waiting' resultName='reviewDocuments' fetchURL='/api/lock/reviews' propertyNames={['shareId', 'title']} ></LockTable>
|
||||||
<hr />
|
<hr />
|
||||||
<LockBrew></LockBrew>
|
<LockBrew></LockBrew>
|
||||||
<hr />
|
<hr />
|
||||||
@@ -175,6 +177,7 @@ const LockTable = createClass({
|
|||||||
getDefaultProps : function() {
|
getDefaultProps : function() {
|
||||||
return {
|
return {
|
||||||
title : '',
|
title : '',
|
||||||
|
text : '',
|
||||||
fetchURL : '/api/locks',
|
fetchURL : '/api/locks',
|
||||||
resultName : '',
|
resultName : '',
|
||||||
propertyNames : ['shareId']
|
propertyNames : ['shareId']
|
||||||
@@ -212,7 +215,7 @@ const LockTable = createClass({
|
|||||||
</div>
|
</div>
|
||||||
{this.state.result[this.props.resultName] &&
|
{this.state.result[this.props.resultName] &&
|
||||||
<>
|
<>
|
||||||
<p>Total Reviews Waiting: {this.state.result[this.props.resultName].length}</p>
|
<p>{this.props.text}: {this.state.result[this.props.resultName].length}</p>
|
||||||
<table className='lockTable'>
|
<table className='lockTable'>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user