-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: agent/contact availability status (#218)
* Publish/subscribe in action cable * Add availability status for user * Add user id in get user details * Add availability status colors * Add lodash filter * Add availability status in conversation list * Some style fixes * Add availability change screen * Add more redux actions * Fix conversation duplicate issue * Add notification settings api call on app start * Add translations * Add add/remove item from array helper * Add availability and preference constants * Add notification preference screen * Add preference and availability in settings screen * Move get notification settings api call to settings screen * Complete update availability status feature * Add translations for availability status types * Fix prop type warnings * Code beautification * Remove scroll view in conversation list * Update empty conversation image * Fix rendering attachemnt item in chat screen * Fix scroll to button issue * Remove last_seen from message read api * Update locale texts
- Loading branch information
Showing
31 changed files
with
864 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import React from 'react'; | ||
import { TouchableOpacity, View } from 'react-native'; | ||
import PropTypes from 'prop-types'; | ||
import { Radio, withStyles } from '@ui-kitten/components'; | ||
|
||
import CustomText from './Text'; | ||
|
||
const styles = (theme) => ({ | ||
itemView: { | ||
flexDirection: 'row', | ||
alignItems: 'center', | ||
justifyContent: 'space-between', | ||
marginBottom: 8, | ||
marginTop: 8, | ||
}, | ||
iconView: { | ||
flex: 1, | ||
}, | ||
icon: { | ||
width: 16, | ||
height: 16, | ||
}, | ||
textView: { | ||
flex: 8, | ||
}, | ||
text: { | ||
color: theme['text-hint-color'], | ||
fontWeight: theme['font-semi-bold'], | ||
fontSize: theme['font-size-small'], | ||
textAlign: 'left', | ||
textTransform: 'capitalize', | ||
}, | ||
radioView: { | ||
flex: 1, | ||
alignItems: 'flex-end', | ||
}, | ||
}); | ||
|
||
const propTypes = { | ||
eva: PropTypes.shape({ | ||
style: PropTypes.object, | ||
}).isRequired, | ||
title: PropTypes.string, | ||
item: PropTypes.string, | ||
onCheckedChange: PropTypes.func, | ||
isChecked: PropTypes.bool, | ||
}; | ||
|
||
const AvailabilityItemComponent = ({ title, item, onCheckedChange, isChecked, eva: { style } }) => ( | ||
<TouchableOpacity style={style.itemView} onPress={() => onCheckedChange({ item })}> | ||
<View style={style.textView}> | ||
<CustomText style={style.text}>{title}</CustomText> | ||
</View> | ||
|
||
<View style={style.radioView}> | ||
<Radio checked={isChecked} onChange={() => onCheckedChange({ item })} /> | ||
</View> | ||
</TouchableOpacity> | ||
); | ||
|
||
AvailabilityItemComponent.propTypes = propTypes; | ||
|
||
const AvailabilityItem = withStyles(AvailabilityItemComponent, styles); | ||
export default AvailabilityItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.