mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-03 17:02:40 +00:00
Stub notification deletion function
This commit is contained in:
@@ -32,6 +32,16 @@ const NotificationLookup = createClass({
|
|||||||
.finally(()=>this.setState({ searching: false }));
|
.finally(()=>this.setState({ searching: false }));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
deleteNotification : function(){
|
||||||
|
console.log('DELETE');
|
||||||
|
if(!confirm(`Really delete notification ${this.state.foundNotification.dismissKey} : ${this.state.foundNotification.title}?`)) {
|
||||||
|
console.log('CANCELLED');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
console.log('CONFIRMED');
|
||||||
|
return;
|
||||||
|
},
|
||||||
|
|
||||||
renderFoundNotification(){
|
renderFoundNotification(){
|
||||||
const notification = this.state.foundNotification;
|
const notification = this.state.foundNotification;
|
||||||
return <div className='foundNotification'>
|
return <div className='foundNotification'>
|
||||||
@@ -46,14 +56,15 @@ const NotificationLookup = createClass({
|
|||||||
<dd>{notification.text || 'No Text'}</dd>
|
<dd>{notification.text || 'No Text'}</dd>
|
||||||
|
|
||||||
<dt>Created</dt>
|
<dt>Created</dt>
|
||||||
<dd>{Moment(notification.createdAt).fromNow()}</dd>
|
<dd>{Moment(notification.createdAt).toLocaleString()}</dd>
|
||||||
|
|
||||||
<dt>Start</dt>
|
<dt>Start</dt>
|
||||||
<dd>{Moment(notification.startAt).fromNow() || 'No Start Time'}</dd>
|
<dd>{Moment(notification.startAt).toLocaleString() || 'No Start Time'}</dd>
|
||||||
|
|
||||||
<dt>Created</dt>
|
<dt>Stop</dt>
|
||||||
<dd>{Moment(notification.stopAt).fromNow() || 'No End Time'}</dd>
|
<dd>{Moment(notification.stopAt).toLocaleString() || 'No End Time'}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
<button onClick={this.deleteNotification}>DELETE</button>
|
||||||
</div>;
|
</div>;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user