test
This commit is contained in:
parent
481c602f61
commit
0bf9d4c21e
|
@ -7,6 +7,7 @@ import {
|
||||||
Image,
|
Image,
|
||||||
Label,
|
Label,
|
||||||
Button,
|
Button,
|
||||||
|
Icon,
|
||||||
} from 'semantic-ui-react';
|
} from 'semantic-ui-react';
|
||||||
import Notification from '@overflow/notification/react/Notification';
|
import Notification from '@overflow/notification/react/Notification';
|
||||||
|
|
||||||
|
@ -25,13 +26,17 @@ export class LogoBar extends React.Component<any, any> {
|
||||||
|
|
||||||
public render(): JSX.Element {
|
public render(): JSX.Element {
|
||||||
let icon =
|
let icon =
|
||||||
<Button
|
// <Button
|
||||||
color='red'
|
// color='red'
|
||||||
content='Notifications'
|
// content='Notifications'
|
||||||
icon='bell'
|
// icon='bell'
|
||||||
floated='right'
|
// floated='right'
|
||||||
label={{ basic: true, color: 'red', pointing: 'left', content: '3' }}
|
// label={{ basic: true, color: 'red', pointing: 'left', content: '3' }}
|
||||||
/>;
|
// />;
|
||||||
|
<Menu.Item position='right'>
|
||||||
|
<Icon name='bell'/>
|
||||||
|
<Label color='red'>10</Label>
|
||||||
|
</Menu.Item>;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container fluid style={{ background: '#f8f8f8', 'paddingRight': '7px' }}>
|
<Container fluid style={{ background: '#f8f8f8', 'paddingRight': '7px' }}>
|
||||||
|
@ -40,6 +45,9 @@ export class LogoBar extends React.Component<any, any> {
|
||||||
{/*<Image src='../asset/image/overFlow_CI_blue_180.png'
|
{/*<Image src='../asset/image/overFlow_CI_blue_180.png'
|
||||||
style={{width:'120px'}} onClick={this.handleLogoClick} /> */}
|
style={{width:'120px'}} onClick={this.handleLogoClick} /> */}
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Popup trigger={icon} on='click' wide >
|
<Popup trigger={icon} on='click' wide >
|
||||||
<Notification />
|
<Notification />
|
||||||
</Popup>
|
</Popup>
|
||||||
|
|
|
@ -44,8 +44,8 @@ export class NotificationList extends React.Component<Props, State> {
|
||||||
id: 1,
|
id: 1,
|
||||||
};
|
};
|
||||||
const pageParams: PageParams = {
|
const pageParams: PageParams = {
|
||||||
sortCol: 'id',
|
sortCol: this.sortCol,
|
||||||
sortDirection: 'descending',
|
sortDirection: this.sortDirection,
|
||||||
countPerPage: String(this.countPerPage),
|
countPerPage: String(this.countPerPage),
|
||||||
pageNo: String(this.pageNo),
|
pageNo: String(this.pageNo),
|
||||||
};
|
};
|
||||||
|
@ -57,10 +57,10 @@ export class NotificationList extends React.Component<Props, State> {
|
||||||
return <div>No user notifications found. </div>;
|
return <div>No user notifications found. </div>;
|
||||||
}
|
}
|
||||||
return this.props.notiPage.content.map((noti: Notification, index: number) => (
|
return this.props.notiPage.content.map((noti: Notification, index: number) => (
|
||||||
<Table.Row key={index}>
|
<Table.Row key={index} active={this.checkRead(noti)}>
|
||||||
<Table.Cell textAlign={'center'}>{noti.id}</Table.Cell>
|
<Table.Cell textAlign={'center'} collapsing>{noti.id}</Table.Cell>
|
||||||
<Table.Cell textAlign={'center'}>{noti.createDate}</Table.Cell>
|
<Table.Cell textAlign={'center'} collapsing>{noti.createDate}</Table.Cell>
|
||||||
<Table.Cell textAlign={'center'}>{noti.title}</Table.Cell>
|
<Table.Cell textAlign={'center'} collapsing>{noti.title}</Table.Cell>
|
||||||
<Table.Cell textAlign={'center'}>{noti.message}</Table.Cell>
|
<Table.Cell textAlign={'center'}>{noti.message}</Table.Cell>
|
||||||
</Table.Row>
|
</Table.Row>
|
||||||
));
|
));
|
||||||
|
@ -75,7 +75,7 @@ export class NotificationList extends React.Component<Props, State> {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container fluid>
|
<Container fluid>
|
||||||
<Table celled striped sortable>
|
<Table sortable>
|
||||||
<Table.Header>
|
<Table.Header>
|
||||||
<SortTableHeaderRow columnMap={colsmap} onHeaderColumnClick={this.handleSort} />
|
<SortTableHeaderRow columnMap={colsmap} onHeaderColumnClick={this.handleSort} />
|
||||||
</Table.Header>
|
</Table.Header>
|
||||||
|
@ -107,4 +107,10 @@ export class NotificationList extends React.Component<Props, State> {
|
||||||
this.pageNo = pageNo;
|
this.pageNo = pageNo;
|
||||||
this.getData();
|
this.getData();
|
||||||
}
|
}
|
||||||
|
private checkRead = (noti: Notification): boolean => {
|
||||||
|
if (noti.confirmDate === null) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user