cart
This commit is contained in:
		@@ -26,6 +26,7 @@ import {
 | 
			
		||||
  Toolbar, ToolbarGroup, ToolbarSeparator, ToolbarTitle, Badge
 | 
			
		||||
} from 'material-ui';
 | 
			
		||||
import IconUserCircle from 'material-ui/svg-icons/action/account-circle';
 | 
			
		||||
import ShoppingCart from 'material-ui/svg-icons/action/shopping-cart';
 | 
			
		||||
import DepositDialog from './../DepositDialog';
 | 
			
		||||
import WithdrawDialog from './../WithdrawDialog';
 | 
			
		||||
import IconMenus from 'material-ui/svg-icons/navigation/menu';
 | 
			
		||||
@@ -339,41 +340,41 @@ export default class App extends React.Component {
 | 
			
		||||
          message={this.globalUI.snackbarMessage}
 | 
			
		||||
          autoHideDuration={3000}/>
 | 
			
		||||
 | 
			
		||||
        {/*<Dialog*/}
 | 
			
		||||
        {/*style={{margin: 'auto'}}*/}
 | 
			
		||||
        {/*open={this.globalUI.loadingVisibility}>*/}
 | 
			
		||||
        {/*<div style={{textAlign: 'center'}}>*/}
 | 
			
		||||
        {/*<LoadingDialog/>*/}
 | 
			
		||||
        {/*</div>*/}
 | 
			
		||||
        {/*</Dialog>*/}
 | 
			
		||||
        {/*<DepositDialog/>*/}
 | 
			
		||||
        {/*<WithdrawDialog/>*/}
 | 
			
		||||
        <Dialog
 | 
			
		||||
        style={{margin: 'auto'}}
 | 
			
		||||
        open={this.globalUI.loadingVisibility}>
 | 
			
		||||
        <div style={{textAlign: 'center'}}>
 | 
			
		||||
        <LoadingDialog/>
 | 
			
		||||
        </div>
 | 
			
		||||
        </Dialog>
 | 
			
		||||
        <DepositDialog/>
 | 
			
		||||
        <WithdrawDialog/>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        <Toolbar className="toolbarAkunTiket">
 | 
			
		||||
          <ToolbarGroup>
 | 
			
		||||
            <IconButton className="hide-on-med-and-up" onClick={() => this.toggleDrawer()}><IconMenus/></IconButton>
 | 
			
		||||
 | 
			
		||||
            {/*<ToolbarTitle className="show-on-small marketplace-toolbarTitle" style={{color: '#424770'}}*/}
 | 
			
		||||
                          {/*text={"Store Admin"}/>*/}
 | 
			
		||||
            {/* <ToolbarTitle className="show-on-small marketplace-toolbarTitle" style={{color: '#424770'}}
 | 
			
		||||
                          text={"Store Admin"}/> */}
 | 
			
		||||
 | 
			
		||||
            <img style={{width: 150, height: 50}} src={'http://btn-redemption-2.bangun-kreatif.com/dr6u0fppdi4xy.cloudfront.net/FilesDirectory/Albilad/ImgIconImage/logo-btn.png'} />
 | 
			
		||||
 | 
			
		||||
            <ToolbarSeparator className="hide-on-small-only" style={{marginLeft: 30, marginRight: 30}}/>
 | 
			
		||||
            {/*<IconButton className="hide-on-small-only" style={{marginRight: 10}} onClick={() => this.toggleDrawer()}>*/}
 | 
			
		||||
              {/*<IconMenus/>*/}
 | 
			
		||||
            {/*</IconButton>*/}
 | 
			
		||||
            {/*<Button className="toolbar-button-sysinfo hide-on-small-only" size="small" type="dashed"*/}
 | 
			
		||||
                    {/*style={{marginRight: (window.innerWidth < 600) ? 2 : 10}}*/}
 | 
			
		||||
                    {/*onClick={() => this.openNotification(null, "System Information", "This is your computer locale timezone", "clock-circle")}>*/}
 | 
			
		||||
              {/*<Icon type="clock-circle"/> <span className="hide-on-small-only">{moment().format('h:mm:ss A')}</span>*/}
 | 
			
		||||
            {/*</Button>*/}
 | 
			
		||||
            <IconButton className="hide-on-small-only" style={{marginRight: 10}} onClick={() => this.toggleDrawer()}>
 | 
			
		||||
              <IconMenus/>
 | 
			
		||||
            </IconButton>
 | 
			
		||||
            {/* <Button className="toolbar-button-sysinfo hide-on-small-only" size="small" type="dashed"
 | 
			
		||||
                    style={{marginRight: (window.innerWidth < 600) ? 2 : 10}}
 | 
			
		||||
                    onClick={() => this.openNotification(null, "System Information", "This is your computer locale timezone", "clock-circle")}>
 | 
			
		||||
              <Icon type="clock-circle"/> <span className="hide-on-small-only">{moment().format('h:mm:ss A')}</span>
 | 
			
		||||
            </Button>
 | 
			
		||||
 | 
			
		||||
            {/*<Button className="toolbar-button-sysinfo hide-on-small-only" size="small" type="dashed"*/}
 | 
			
		||||
                    {/*style={{marginRight: (window.innerWidth < 600) ? 2 : 10}}*/}
 | 
			
		||||
                    {/*onClick={() => this.openNotification(null, "System Information", "This is your computer locale timezone", "environment")}>*/}
 | 
			
		||||
              {/*<Icon type="environment"/><span className="hide-on-small-only">{this.user.userGeolocation.ip}</span>*/}
 | 
			
		||||
            {/*</Button>*/}
 | 
			
		||||
            <Button className="toolbar-button-sysinfo hide-on-small-only" size="small" type="dashed"
 | 
			
		||||
                    style={{marginRight: (window.innerWidth < 600) ? 2 : 10}}
 | 
			
		||||
                    onClick={() => this.openNotification(null, "System Information", "This is your computer locale timezone", "environment")}>
 | 
			
		||||
              <Icon type="environment"/><span className="hide-on-small-only">{this.user.userGeolocation.ip}</span>
 | 
			
		||||
            </Button> */}
 | 
			
		||||
 | 
			
		||||
            <Link onClick={this
 | 
			
		||||
              .changeRoute
 | 
			
		||||
@@ -417,132 +418,216 @@ export default class App extends React.Component {
 | 
			
		||||
              className={(this.state.selectedMenu === '/app/vouchers') ? "menuAkunItem active" : 'menuAkunItem'}><span
 | 
			
		||||
              className="menuAkun">Vouchers</span></MenuItem></Link>
 | 
			
		||||
 | 
			
		||||
            {/*<Button className="toolbar-button-sysinfo hide-on-small-only" size="small" type="dashed"*/}
 | 
			
		||||
                    {/*style={{marginRight: (window.innerWidth < 600) ? 2 : 10}}*/}
 | 
			
		||||
                    {/*onClick={() => this.openNotification(null, "System Information", "This is your computer locale timezone", "calendar")}>*/}
 | 
			
		||||
              {/*<Icon type="calendar"/><span className="hide-on-small-only">{this.user.userGeolocation.time_zone}</span>*/}
 | 
			
		||||
            {/*</Button>*/}
 | 
			
		||||
            {/* <Button className="toolbar-button-sysinfo hide-on-small-only" size="small" type="dashed"
 | 
			
		||||
                    style={{marginRight: (window.innerWidth < 600) ? 2 : 10}}
 | 
			
		||||
                    onClick={() => this.openNotification(null, "System Information", "This is your computer locale timezone", "calendar")}>
 | 
			
		||||
              <Icon type="calendar"/><span className="hide-on-small-only">{this.user.userGeolocation.time_zone}</span>
 | 
			
		||||
            </Button>
 | 
			
		||||
 | 
			
		||||
            {/*<Button className="toolbar-button-sysinfo hide-on-small-only" size="small" type="dashed"*/}
 | 
			
		||||
                    {/*style={{marginRight: (window.innerWidth < 600) ? 2 : 10}}*/}
 | 
			
		||||
                    {/*onClick={() => this.openNotification(null, "System Information", "This is your computer locale timezone", "home")}>*/}
 | 
			
		||||
              {/*<Icon type="home"/> <span*/}
 | 
			
		||||
              {/*className="hide-on-small-only">{this.user.userGeolocation.latitude}, {this.user.userGeolocation.longitude}</span>*/}
 | 
			
		||||
            {/*</Button>*/}
 | 
			
		||||
             <Button className="toolbar-button-sysinfo hide-on-small-only" size="small" type="dashed"
 | 
			
		||||
                    style={{marginRight: (window.innerWidth < 600) ? 2 : 10}}
 | 
			
		||||
                    onClick={() => this.openNotification(null, "System Information", "This is your computer locale timezone", "home")}>
 | 
			
		||||
              <Icon type="home"/> <span
 | 
			
		||||
              className="hide-on-small-only">{this.user.userGeolocation.latitude}, {this.user.userGeolocation.longitude}</span>
 | 
			
		||||
            </Button>  */}
 | 
			
		||||
 | 
			
		||||
          </ToolbarGroup>
 | 
			
		||||
          {/*<ToolbarGroup>*/}
 | 
			
		||||
            {/*<IconMenu*/}
 | 
			
		||||
              {/*anchorOrigin={{vertical: 'bottom', horizontal: 'right'}}*/}
 | 
			
		||||
              {/*targetOrigin={{vertical: 'top', horizontal: 'right'}}*/}
 | 
			
		||||
              {/*onClick={()=>this.notificationStore.readAll()}*/}
 | 
			
		||||
              {/*iconButtonElement={*/}
 | 
			
		||||
                {/*<div>*/}
 | 
			
		||||
                  {/*{userData.role === 'admin' ? (*/}
 | 
			
		||||
                    {/*<div>*/}
 | 
			
		||||
                      {/*{this.notificationStore.unread_notif === 0 ?*/}
 | 
			
		||||
                        {/*<IconButton className="menuAkunItem" tooltip="Notification center"*/}
 | 
			
		||||
                                    {/*tooltipPosition="bottom-center">*/}
 | 
			
		||||
                          {/*<img className="img-responsive" src="/assets/images/icon/toa.png" alt=""/>*/}
 | 
			
		||||
                        {/*</IconButton> :*/}
 | 
			
		||||
                        {/*<Badge*/}
 | 
			
		||||
                          {/*badgeContent={this.notificationStore.unread_notif}*/}
 | 
			
		||||
                          {/*primary={true}*/}
 | 
			
		||||
                          {/*badgeStyle={{top: 15, right: 12}}*/}
 | 
			
		||||
                        {/*>*/}
 | 
			
		||||
                          {/*<IconButton className="menuAkunItem" tooltip="Notification center"*/}
 | 
			
		||||
                                      {/*tooltipPosition="bottom-center">*/}
 | 
			
		||||
                            {/*<img className="img-responsive" src="/assets/images/icon/toa.png" alt=""/>*/}
 | 
			
		||||
                          {/*</IconButton>*/}
 | 
			
		||||
                        {/*</Badge>*/}
 | 
			
		||||
                      {/*}*/}
 | 
			
		||||
                    {/*</div>*/}
 | 
			
		||||
                  {/*) : (*/}
 | 
			
		||||
                    {/*<div>*/}
 | 
			
		||||
                      {/*{this.notificationStore.unread_notif === 0 ?*/}
 | 
			
		||||
                        {/*<IconButton className="menuAkunItem" tooltip="Notification center"*/}
 | 
			
		||||
                                    {/*tooltipPosition="bottom-center">*/}
 | 
			
		||||
                          {/*<img className="img-responsive" src="/assets/images/icon/toa.png" alt=""/>*/}
 | 
			
		||||
                        {/*</IconButton> :*/}
 | 
			
		||||
                        {/*<Badge*/}
 | 
			
		||||
                          {/*badgeContent={this.notificationStore.unread_notif}*/}
 | 
			
		||||
                          {/*primary={true}*/}
 | 
			
		||||
                          {/*badgeStyle={{top: 15, right: 12}}*/}
 | 
			
		||||
                        {/*>*/}
 | 
			
		||||
                          {/*<IconButton className="menuAkunItem" tooltip="Notification center"*/}
 | 
			
		||||
                                      {/*tooltipPosition="bottom-center">*/}
 | 
			
		||||
                            {/*<img className="img-responsive" src="/assets/images/icon/toa.png" alt=""/>*/}
 | 
			
		||||
                          {/*</IconButton>*/}
 | 
			
		||||
                        {/*</Badge>*/}
 | 
			
		||||
                      {/*}*/}
 | 
			
		||||
                    {/*</div>*/}
 | 
			
		||||
                  {/*)}*/}
 | 
			
		||||
          <ToolbarGroup>
 | 
			
		||||
          <IconMenu
 | 
			
		||||
              anchorOrigin={{vertical: 'bottom', horizontal: 'right'}}
 | 
			
		||||
              targetOrigin={{vertical: 'top', horizontal: 'right'}}
 | 
			
		||||
              onClick={()=>this.notificationStore.readAll()}
 | 
			
		||||
              iconButtonElement={
 | 
			
		||||
                <div>
 | 
			
		||||
                  {userData.role === 'admin' ? (
 | 
			
		||||
                    <div>
 | 
			
		||||
                      {this.notificationStore.unread_notif === 0 ?
 | 
			
		||||
                        <IconButton className="menuAkunItem" tooltip="Notification center"
 | 
			
		||||
                                    tooltipPosition="bottom-center">
 | 
			
		||||
                          <ShoppingCart/>
 | 
			
		||||
                        </IconButton> :
 | 
			
		||||
                        <Badge
 | 
			
		||||
                          badgeContent={this.notificationStore.unread_notif}
 | 
			
		||||
                          primary={true}
 | 
			
		||||
                          badgeStyle={{top: 15, right: 12}}
 | 
			
		||||
                        >
 | 
			
		||||
                          <IconButton className="menuAkunItem" tooltip="Notification center"
 | 
			
		||||
                                      tooltipPosition="bottom-center">
 | 
			
		||||
                            <ShoppingCart/>
 | 
			
		||||
                          </IconButton>
 | 
			
		||||
                        </Badge>
 | 
			
		||||
                      }
 | 
			
		||||
                    </div>
 | 
			
		||||
                  ) : (
 | 
			
		||||
                    <div>
 | 
			
		||||
                      {this.notificationStore.unread_notif === 0 ?
 | 
			
		||||
                        <IconButton className="menuAkunItem" tooltip="Notification center"
 | 
			
		||||
                                    tooltipPosition="bottom-center">
 | 
			
		||||
                          <ShoppingCart/>
 | 
			
		||||
                        </IconButton> :
 | 
			
		||||
                        <Badge
 | 
			
		||||
                          badgeContent={this.notificationStore.unread_notif}
 | 
			
		||||
                          primary={true}
 | 
			
		||||
                          badgeStyle={{top: 15, right: 12}}
 | 
			
		||||
                        >
 | 
			
		||||
                          <IconButton className="menuAkunItem" tooltip="Notification center"
 | 
			
		||||
                                      tooltipPosition="bottom-center">
 | 
			
		||||
                            <ShoppingCart/>
 | 
			
		||||
                          </IconButton>
 | 
			
		||||
                        </Badge>
 | 
			
		||||
                      }
 | 
			
		||||
                    </div>
 | 
			
		||||
                  )}
 | 
			
		||||
 | 
			
		||||
                {/*</div>*/}
 | 
			
		||||
              {/*}*/}
 | 
			
		||||
            {/*>*/}
 | 
			
		||||
              {/*<List>*/}
 | 
			
		||||
                {/*{*/}
 | 
			
		||||
                {/*(this.notificationStore.list.length) ?*/}
 | 
			
		||||
                  {/*this.notificationStore.list.slice(0, 5).map((item, index) => {*/}
 | 
			
		||||
                    {/*return (*/}
 | 
			
		||||
                      {/*<Link to={onNotifRowClick(item)}>*/}
 | 
			
		||||
                        {/*<ListItem*/}
 | 
			
		||||
                          {/*// leftAvatar={<Avatar src="images/ok-128.jpg" />}*/}
 | 
			
		||||
                          {/*primaryText={item.notification.title}*/}
 | 
			
		||||
                          {/*secondaryText={*/}
 | 
			
		||||
                            {/*<div>*/}
 | 
			
		||||
                              {/*<p>*/}
 | 
			
		||||
                                {/*<span style={{color: darkBlack}}>{item.notification.description.substr(0,40)}{(item.notification.description.length > 40) ? '...' : ""}</span>*/}
 | 
			
		||||
                              {/*</p>*/}
 | 
			
		||||
                                {/*<p style={{fontSize:10,color:black}}>{moment(item.created_at).fromNow()}</p>*/}
 | 
			
		||||
                            {/*</div>*/}
 | 
			
		||||
                          {/*}*/}
 | 
			
		||||
                          {/*secondaryTextLines={2}*/}
 | 
			
		||||
                        {/*/>*/}
 | 
			
		||||
                      {/*</Link>*/}
 | 
			
		||||
                    {/*);*/}
 | 
			
		||||
                  {/*}) :  <EmptyComponent width="" image="default4" type="empty" header="" content="No notification yet! "/>*/}
 | 
			
		||||
              {/*}*/}
 | 
			
		||||
                {/*<Link to={`${LINKS.INBOX}/notification`}>*/}
 | 
			
		||||
                    {/*<ListItem*/}
 | 
			
		||||
                      {/*primaryText={*/}
 | 
			
		||||
                        {/*<div style={{textAlign:'center'}}>*/}
 | 
			
		||||
                          {/*<p>View All</p>*/}
 | 
			
		||||
                        {/*</div>*/}
 | 
			
		||||
                      {/*}*/}
 | 
			
		||||
                  {/*/>*/}
 | 
			
		||||
                {/*</Link>*/}
 | 
			
		||||
              {/*</List>*/}
 | 
			
		||||
            {/*</IconMenu>*/}
 | 
			
		||||
                </div>
 | 
			
		||||
              }
 | 
			
		||||
            >
 | 
			
		||||
              <List>
 | 
			
		||||
                {
 | 
			
		||||
                (this.notificationStore.list.length) ?
 | 
			
		||||
                  this.notificationStore.list.slice(0, 5).map((item, index) => {
 | 
			
		||||
                    return (
 | 
			
		||||
                      <Link to={onNotifRowClick(item)}>
 | 
			
		||||
                        <ListItem
 | 
			
		||||
                          // leftAvatar={<Avatar src="images/ok-128.jpg" />}
 | 
			
		||||
                          primaryText={item.notification.title}
 | 
			
		||||
                          secondaryText={
 | 
			
		||||
                            <div>
 | 
			
		||||
                              <p>
 | 
			
		||||
                                <span style={{color: darkBlack}}>{item.notification.description.substr(0,40)}{(item.notification.description.length > 40) ? '...' : ""}</span>
 | 
			
		||||
                              </p>
 | 
			
		||||
                                <p style={{fontSize:10,color:black}}>{moment(item.created_at).fromNow()}</p>
 | 
			
		||||
                            </div>
 | 
			
		||||
                          }
 | 
			
		||||
                          secondaryTextLines={2}
 | 
			
		||||
                        />
 | 
			
		||||
                      </Link>
 | 
			
		||||
                    );
 | 
			
		||||
                  }) :  <EmptyComponent width="" image="default4" type="empty" header="" content="No notification yet! "/>
 | 
			
		||||
              }
 | 
			
		||||
                <Link to={`${LINKS.INBOX}/notification`}>
 | 
			
		||||
                    <ListItem
 | 
			
		||||
                      primaryText={
 | 
			
		||||
                        <div style={{textAlign:'center'}}>
 | 
			
		||||
                          <p>View All</p>
 | 
			
		||||
                        </div>
 | 
			
		||||
                      }
 | 
			
		||||
                  />
 | 
			
		||||
                </Link>
 | 
			
		||||
              </List>
 | 
			
		||||
            </IconMenu>
 | 
			
		||||
 | 
			
		||||
            {/*<IconMenu*/}
 | 
			
		||||
              {/*anchorOrigin={{vertical: 'bottom', horizontal: 'right'}}*/}
 | 
			
		||||
              {/*targetOrigin={{vertical: 'top', horizontal: 'right'}}*/}
 | 
			
		||||
              {/*iconButtonElement={*/}
 | 
			
		||||
                {/*<IconButton style={{width: 'auto', height: 'auto'}} iconStyle={{width: 35, height: 'auto',borderRadius: '45%'}}>*/}
 | 
			
		||||
                  {/*{!!this.profileStore.userProfile.photo?*/}
 | 
			
		||||
                    {/*<img src={this.http.appendImagePath(this.profileStore.userProfile.photo)}/> : <IconUserCircle/>*/}
 | 
			
		||||
                  {/*}*/}
 | 
			
		||||
            <IconMenu
 | 
			
		||||
              anchorOrigin={{vertical: 'bottom', horizontal: 'right'}}
 | 
			
		||||
              targetOrigin={{vertical: 'top', horizontal: 'right'}}
 | 
			
		||||
              onClick={()=>this.notificationStore.readAll()}
 | 
			
		||||
              iconButtonElement={
 | 
			
		||||
                <div>
 | 
			
		||||
                  {userData.role === 'admin' ? (
 | 
			
		||||
                    <div>
 | 
			
		||||
                      {this.notificationStore.unread_notif === 0 ?
 | 
			
		||||
                        <IconButton className="menuAkunItem" tooltip="Notification center"
 | 
			
		||||
                                    tooltipPosition="bottom-center">
 | 
			
		||||
                          <img className="img-responsive" src="/assets/images/icon/toa.png" alt=""/>
 | 
			
		||||
                        </IconButton> :
 | 
			
		||||
                        <Badge
 | 
			
		||||
                          badgeContent={this.notificationStore.unread_notif}
 | 
			
		||||
                          primary={true}
 | 
			
		||||
                          badgeStyle={{top: 15, right: 12}}
 | 
			
		||||
                        >
 | 
			
		||||
                          <IconButton className="menuAkunItem" tooltip="Notification center"
 | 
			
		||||
                                      tooltipPosition="bottom-center">
 | 
			
		||||
                            <img className="img-responsive" src="/assets/images/icon/toa.png" alt=""/>
 | 
			
		||||
                          </IconButton>
 | 
			
		||||
                        </Badge>
 | 
			
		||||
                      }
 | 
			
		||||
                    </div>
 | 
			
		||||
                  ) : (
 | 
			
		||||
                    <div>
 | 
			
		||||
                      {this.notificationStore.unread_notif === 0 ?
 | 
			
		||||
                        <IconButton className="menuAkunItem" tooltip="Notification center"
 | 
			
		||||
                                    tooltipPosition="bottom-center">
 | 
			
		||||
                          <img className="img-responsive" src="/assets/images/icon/toa.png" alt=""/>
 | 
			
		||||
                        </IconButton> :
 | 
			
		||||
                        <Badge
 | 
			
		||||
                          badgeContent={this.notificationStore.unread_notif}
 | 
			
		||||
                          primary={true}
 | 
			
		||||
                          badgeStyle={{top: 15, right: 12}}
 | 
			
		||||
                        >
 | 
			
		||||
                          <IconButton className="menuAkunItem" tooltip="Notification center"
 | 
			
		||||
                                      tooltipPosition="bottom-center">
 | 
			
		||||
                            <img className="img-responsive" src="/assets/images/icon/toa.png" alt=""/>
 | 
			
		||||
                          </IconButton>
 | 
			
		||||
                        </Badge>
 | 
			
		||||
                      }
 | 
			
		||||
                    </div>
 | 
			
		||||
                  )}
 | 
			
		||||
 | 
			
		||||
                {/*</IconButton>*/}
 | 
			
		||||
              {/*}*/}
 | 
			
		||||
            {/*><List>*/}
 | 
			
		||||
              {/*<ListItem*/}
 | 
			
		||||
                {/*style={{padding: '0px 16px 0px', fontSize: 14}}*/}
 | 
			
		||||
                {/*disabled={true}*/}
 | 
			
		||||
                {/*primaryText={<span style={{fontWeight: 500}}>{this.authStore.userProfile.username || 'Username'}</span>}*/}
 | 
			
		||||
                {/*secondaryText={<p style={{fontWeight: 400}}>{_.capitalize(this.authStore.userProfile.role) || 'role'}</p>}*/}
 | 
			
		||||
              {/*/>*/}
 | 
			
		||||
            {/*</List>*/}
 | 
			
		||||
              {/*<Divider/>*/}
 | 
			
		||||
              {/*<Link onClick={this*/}
 | 
			
		||||
                {/*.changeRoute*/}
 | 
			
		||||
                {/*.bind(this, '/app/profile')} to={LINKS.PROFILE}> <MenuItem style={{fontSize: 14}}*/}
 | 
			
		||||
                                                                           {/*primaryText="Profile"/></Link>*/}
 | 
			
		||||
              {/*<MenuItem onClick={this.willLogout.bind(this)} style={{fontSize: 14}} primaryText="Sign out"/>*/}
 | 
			
		||||
            {/*</IconMenu>*/}
 | 
			
		||||
          {/*</ToolbarGroup>*/}
 | 
			
		||||
                </div>
 | 
			
		||||
              }
 | 
			
		||||
            >
 | 
			
		||||
              <List>
 | 
			
		||||
                {
 | 
			
		||||
                (this.notificationStore.list.length) ?
 | 
			
		||||
                  this.notificationStore.list.slice(0, 5).map((item, index) => {
 | 
			
		||||
                    return (
 | 
			
		||||
                      <Link to={onNotifRowClick(item)}>
 | 
			
		||||
                        <ListItem
 | 
			
		||||
                          // leftAvatar={<Avatar src="images/ok-128.jpg" />}
 | 
			
		||||
                          primaryText={item.notification.title}
 | 
			
		||||
                          secondaryText={
 | 
			
		||||
                            <div>
 | 
			
		||||
                              <p>
 | 
			
		||||
                                <span style={{color: darkBlack}}>{item.notification.description.substr(0,40)}{(item.notification.description.length > 40) ? '...' : ""}</span>
 | 
			
		||||
                              </p>
 | 
			
		||||
                                <p style={{fontSize:10,color:black}}>{moment(item.created_at).fromNow()}</p>
 | 
			
		||||
                            </div>
 | 
			
		||||
                          }
 | 
			
		||||
                          secondaryTextLines={2}
 | 
			
		||||
                        />
 | 
			
		||||
                      </Link>
 | 
			
		||||
                    );
 | 
			
		||||
                  }) :  <EmptyComponent width="" image="default4" type="empty" header="" content="No notification yet! "/>
 | 
			
		||||
              }
 | 
			
		||||
                <Link to={`${LINKS.INBOX}/notification`}>
 | 
			
		||||
                    <ListItem
 | 
			
		||||
                      primaryText={
 | 
			
		||||
                        <div style={{textAlign:'center'}}>
 | 
			
		||||
                          <p>View All</p>
 | 
			
		||||
                        </div>
 | 
			
		||||
                      }
 | 
			
		||||
                  />
 | 
			
		||||
                </Link>
 | 
			
		||||
              </List>
 | 
			
		||||
            </IconMenu>
 | 
			
		||||
 | 
			
		||||
            <IconMenu
 | 
			
		||||
              anchorOrigin={{vertical: 'bottom', horizontal: 'right'}}
 | 
			
		||||
              targetOrigin={{vertical: 'top', horizontal: 'right'}}
 | 
			
		||||
              iconButtonElement={
 | 
			
		||||
                <IconButton style={{width: 'auto', height: 'auto'}} iconStyle={{width: 35, height: 'auto',borderRadius: '45%'}}>
 | 
			
		||||
                  {!!this.profileStore.userProfile.photo?
 | 
			
		||||
                    <img src={this.http.appendImagePath(this.profileStore.userProfile.photo)}/> : <IconUserCircle/>
 | 
			
		||||
                  }
 | 
			
		||||
 | 
			
		||||
                </IconButton>
 | 
			
		||||
              }
 | 
			
		||||
            ><List>
 | 
			
		||||
              <ListItem
 | 
			
		||||
                style={{padding: '0px 16px 0px', fontSize: 14}}
 | 
			
		||||
                disabled={true}
 | 
			
		||||
                primaryText={<span style={{fontWeight: 500}}>{this.authStore.userProfile.username || 'Username'}</span>}
 | 
			
		||||
                secondaryText={<p style={{fontWeight: 400}}>{_.capitalize(this.authStore.userProfile.role) || 'role'}</p>}
 | 
			
		||||
              />
 | 
			
		||||
            </List>
 | 
			
		||||
              <Divider/>
 | 
			
		||||
              <Link onClick={this
 | 
			
		||||
                .changeRoute
 | 
			
		||||
                .bind(this, '/app/profile')} to={LINKS.PROFILE}> <MenuItem style={{fontSize: 14}}
 | 
			
		||||
                                                                           primaryText="Profile"/></Link>
 | 
			
		||||
              <MenuItem onClick={this.willLogout.bind(this)} style={{fontSize: 14}} primaryText="Sign out"/>
 | 
			
		||||
            </IconMenu>
 | 
			
		||||
          </ToolbarGroup>
 | 
			
		||||
        </Toolbar>
 | 
			
		||||
 | 
			
		||||
        <div className="mainContent" style={{
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user