Commits (22)
{
"lerna": "2.0.0",
"version": "1.52.0",
"version": "1.54.0",
"npmClient": "yarn",
"useWorkspaces": true
}
......@@ -3,6 +3,27 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="1.54.0"></a>
# [1.54.0](https://gitlab.com/4geit/react-packages/compare/v1.53.0...v1.54.0) (2017-10-05)
### Bug Fixes
* **Chatbox grid:** minor fix ([94f043d](https://gitlab.com/4geit/react-packages/commit/94f043d))
* **chatboxgrid:** minor fix ([b867903](https://gitlab.com/4geit/react-packages/commit/b867903))
* **ChatboxGrid:** minor fix ([37e52fd](https://gitlab.com/4geit/react-packages/commit/37e52fd))
* **ChatboxGrid:** minor fix ([2ef5c1a](https://gitlab.com/4geit/react-packages/commit/2ef5c1a))
* **ChatboxGrid:** minor fix ([eccb7cc](https://gitlab.com/4geit/react-packages/commit/eccb7cc))
* **ChatboxGrid:** minor fix ([39e7850](https://gitlab.com/4geit/react-packages/commit/39e7850))
### Features
* **Chatbox Grid Store & Chatbox grid component:** Added an action method in the store and trigger e ([9d15062](https://gitlab.com/4geit/react-packages/commit/9d15062))
<a name="1.52.0"></a>
# [1.52.0](https://gitlab.com/4geit/react-packages/compare/v1.51.2...v1.52.0) (2017-10-04)
......
{
"name": "@4geit/rct-chatbox-grid-component",
"version": "1.52.0",
"version": "1.54.0",
"description": "chatbox grid component",
"main": "dist/index.js",
"module": "dist/index.js",
......
......@@ -29,8 +29,9 @@ import RctReorderableGridListComponent, { ReorderableGridListTile } from '@4geit
@withStyles(theme => ({
}))
class ItemComponent extends Component {
handleClick() {
this.props.chatboxGridStore.toggleMaximize(true)
handleMaximize = () => {
const { chatboxGridStore, updateOperationId, itemId } = this.props
chatboxGridStore.toggleMaximize({ updateOperationId, itemId, maximized:true })
}
render() {
return (
......@@ -83,7 +84,7 @@ class ItemComponent extends Component {
</Grid>
<Grid item >
<Switch aria-label="checkedA"/>
<IconButton onClick={ this.handleClick.bind(this) }>
<IconButton onClick={ this.handleMaximize }>
<FullscreenIcon/>
</IconButton>
<IconButton>
......
......@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="1.54.0"></a>
# [1.54.0](https://gitlab.com/4geit/react-packages/compare/v1.53.0...v1.54.0) (2017-10-05)
### Features
* **Chatbox Grid Store & Chatbox grid component:** Added an action method in the store and trigger e ([9d15062](https://gitlab.com/4geit/react-packages/commit/9d15062))
<a name="1.52.0"></a>
# [1.52.0](https://gitlab.com/4geit/react-packages/compare/v1.51.2...v1.52.0) (2017-10-04)
......
{
"name": "@4geit/rct-chatbox-grid-store",
"version": "1.52.0",
"version": "1.54.0",
"description": "store for the chatbox-grid component",
"main": "dist/index.js",
"module": "dist/index.js",
......
......@@ -125,9 +125,6 @@ class RctChatboxGridStore {
})
}
}
@action toggleMaximize(value) {
this.data = value
}
@action async fetchMaximizedItem({ listOperationId }) {
listOperationId = listOperationId || 'userChatboxList'
this.inProgress = true
......@@ -153,6 +150,25 @@ class RctChatboxGridStore {
})
}
}
@action async toggleMaximize({ updateOperationId, itemId, maximized }) {
updateOperationId = updateOperationId || 'userChatboxUpdate'
this.inProgress = true
try {
const { client: { apis: { Account } } } = swaggerClientStore
const { body } = await Account[updateOperationId]({
id: { itemId, },
body:{ maximized, }
})
runInAction(() => {
this.inProgress = false
})
} catch (err) {
console.error(err)
runInAction(() => {
notificationStore.newMessage(err.message)
})
}
}
}
export default new RctChatboxGridStore()
......@@ -3,6 +3,24 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="1.53.0"></a>
# [1.53.0](https://gitlab.com/4geit/react-packages/compare/v1.52.1...v1.53.0) (2017-10-04)
### Bug Fixes
* **Data table:** add Logic ([7cf83fc](https://gitlab.com/4geit/react-packages/commit/7cf83fc))
* **Data Table:** minor fix ([86757fa](https://gitlab.com/4geit/react-packages/commit/86757fa))
* **DataTable:** added constant {id}=item ([530ecc2](https://gitlab.com/4geit/react-packages/commit/530ecc2))
### Features
* **Data table:** call store method remoItem ([45282b7](https://gitlab.com/4geit/react-packages/commit/45282b7))
<a name="1.52.0"></a>
# [1.52.0](https://gitlab.com/4geit/react-packages/compare/v1.51.2...v1.52.0) (2017-10-04)
......
{
"name": "@4geit/rct-data-table-component",
"version": "1.52.0",
"version": "1.53.0",
"description": "data table component for react apps",
"main": "dist/index.js",
"module": "dist/index.js",
......
......@@ -39,6 +39,7 @@ import './rct-data-table.component.css'
width: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
operationId: PropTypes.string.isRequired,
deleteOperationId: PropTypes.string.isRequired,
enabledColumns: PropTypes.array,
// TBD
})
......@@ -61,8 +62,9 @@ export default class RctDataTableComponent extends Component {
handleEditClick() {
this.props.dataTableStore.editItem(true)
}
handleRemoveClick() {
this.props.dataTableStore.removeItem(true)
handleRemoveClick = ({ id }) => () => {
const { dataTableStore, deleteOperationId } = this.props
dataTableStore.removeItem({id, deleteOperationId})
}
handleClick(event) {
this.props.dataTableStore.setOpen(true)
......@@ -139,38 +141,35 @@ export default class RctDataTableComponent extends Component {
<TableCell checkbox>
<Checkbox checked/>
</TableCell>
{ enabledColumns.map((item, index) => (
<TableCell key={ index }>{item.name}</TableCell>
)) }
{ enabledColumns.map((item, index) => (
<TableCell key={ index }>{item.name}</TableCell>
)) }
<TableCell>
<IconButton onClick={ this.handleEditClick.bind(this) }>
<EditIcon/>
</IconButton>
<IconButton onClick={ this.handleRemoveClick.bind(this) }>
<DeleteIcon/>
</IconButton>
</TableCell>
</TableRow>
</TableHead>
<TableBody>
{ data.map(item => (
<TableRow hover key={ item.id } >
<TableCell checkbox>
<Checkbox checked/>
</TableCell>
{ enabledColumns.map((column, colIndex) => (
<TableCell key={ colIndex } >{ item[column.name]}</TableCell>
)) }
<TableCell>
<IconButton onClick={ this.handleEditClick.bind(this) }>
<EditIcon/>
</IconButton>
<IconButton onClick={ this.handleRemoveClick.bind(this) }>
<DeleteIcon/>
</IconButton>
</TableCell>
</TableRow>
)) }
{ data.map(item => {
const { id } = item
return (
<TableRow hover key={ id } >
<TableCell checkbox>
<Checkbox checked/>
</TableCell>
{ enabledColumns.map((column, colIndex) => (
<TableCell key={ colIndex } >{ item[column.name]}</TableCell>
)) }
<TableCell>
<IconButton onClick={ this.handleEditClick.bind(this) }>
<EditIcon/>
</IconButton>
<IconButton onClick={ this.handleRemoveClick({ id })}>
<DeleteIcon/>
</IconButton>
</TableCell>
</TableRow>
)
})}
</TableBody>
</Table>
</Paper>
......
......@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="1.52.1"></a>
## [1.52.1](https://gitlab.com/4geit/react-packages/compare/v1.52.0...v1.52.1) (2017-10-04)
### Bug Fixes
* **notification-menu-component:** add isRead logic for notification background ([7dc67a8](https://gitlab.com/4geit/react-packages/commit/7dc67a8))
* **notification-menu-component:** fix anchorEl issue ([74dd0e1](https://gitlab.com/4geit/react-packages/commit/74dd0e1))
<a name="1.52.0"></a>
# [1.52.0](https://gitlab.com/4geit/react-packages/compare/v1.51.2...v1.52.0) (2017-10-04)
......
{
"name": "@4geit/rct-notification-menu-component",
"version": "1.52.0",
"version": "1.52.1",
"description": "notification menu component to display a notification button with item menu",
"main": "dist/index.js",
"module": "dist/index.js",
......@@ -12,7 +12,7 @@
"author": "Geraldine Starke <geraldine@starke.fr>",
"license": "MIT",
"dependencies": {
"@4geit/rct-notification-menu-store": "^1.51.1",
"@4geit/rct-notification-menu-store": "^1.52.1",
"enzyme": "^2.x",
"material-ui": "next",
"material-ui-icons": "^1.0.0-beta.14",
......
......@@ -67,7 +67,7 @@ export default class RctNotificationMenuComponent extends Component {
</IconButton>
<Menu
id='long-menu'
element={notificationMenuStore.element}
anchorEl={notificationMenuStore.element}
open={notificationMenuStore.open} onRequestClose={this.handleRequestClose.bind(this)}
>
<MenuItem style={{ background: 'white'}}>
......@@ -85,11 +85,11 @@ export default class RctNotificationMenuComponent extends Component {
</Grid>
</MenuItem>
<Divider />
{notificationMenuStore.data.map(({ avatar, title, background, link, date, user }) => (
{notificationMenuStore.data.map(({ avatar, title, isRead, link, date, user }) => (
<MenuItem
key={date}
onClick={this.handleRequestClose.bind(this)}
style={{ background: background, height: 60 }}
style={{ background: !isRead ? '#e6e6e6' : 'none' , height: 60 }}
>
<Grid container>
<Grid item>
......
......@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="1.52.1"></a>
## [1.52.1](https://gitlab.com/4geit/react-packages/compare/v1.52.0...v1.52.1) (2017-10-04)
### Bug Fixes
* **notification-menu-component:** add isRead logic for notification background ([7dc67a8](https://gitlab.com/4geit/react-packages/commit/7dc67a8))
<a name="1.51.1"></a>
## [1.51.1](https://gitlab.com/4geit/react-packages/compare/v1.51.0...v1.51.1) (2017-10-04)
......
{
"name": "@4geit/rct-notification-menu-store",
"version": "1.51.1",
"version": "1.52.1",
"description": "store class to handle notification menu observables",
"main": "dist/index.js",
"module": "dist/index.js",
......
......@@ -11,7 +11,7 @@ class RctNotificationMenuStore {
{
avatar: "date_range",
title: " booked Test Activity for October 4, 2017 at 1pm. Credit Cardn Online",
background: "#e6e6e6",
isRead: false,
link: "#",
date: "08/31/2017 at 8:55pm",
user: "Blake Pridham"
......@@ -19,6 +19,7 @@ class RctNotificationMenuStore {
{
avatar: "date_range",
title: " booked Test Activity for October 10, 2017 at 5pm. Office POS",
isRead: false,
background: "#e6e6e6",
link: "#",
date: "08/31/2017 at 8:54pm",
......@@ -27,7 +28,7 @@ class RctNotificationMenuStore {
{
avatar: "person_pin",
title: ", guide, was assigned to Test Activity on October 2, 2017 at 1pm",
background: "white",
isRead: true,
link: "#",
date: "08/31/2017 at 8:53pm",
user: "Ryan Stobie"
......@@ -35,7 +36,7 @@ class RctNotificationMenuStore {
{
avatar: "person_pin",
title: ", guide, was assigned to Test Activity on October 5, 2017 at 1pm",
background: "white",
isRead: true,
link: "#",
date: "08/31/2017 at 8:52pm",
user: "Phil Burgess"
......@@ -43,7 +44,7 @@ class RctNotificationMenuStore {
{
avatar: "date_range",
title: " booked Test Activity for October 1, 2017 at 4pm. Credit Cardn Online",
background: "#e6e6e6",
isRead: false,
link: "#",
date: "08/31/2017 at 8:51pm",
user: "Blake Pridham"
......