Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NEW] Omnichannel visitor #2004

Merged
merged 72 commits into from
May 8, 2020
Merged
Show file tree
Hide file tree
Changes from 65 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
e8f674c
[WIP][NEW] Livechat info/actions
djorkaeffalexandre Apr 3, 2020
2e3df15
[IMPROVEMENT] RoomActionsView
djorkaeffalexandre Apr 3, 2020
82484d0
[NEW] Visitor Navigation
djorkaeffalexandre Apr 3, 2020
082c7d9
[NEW] Get Department REST
djorkaeffalexandre Apr 3, 2020
9d79569
[FIX] Borders
djorkaeffalexandre Apr 3, 2020
b720542
[IMPROVEMENT] Refactor RoomInfo View
djorkaeffalexandre Apr 3, 2020
9d62b50
[FIX] Error while navigate from mention -> roomInfo
djorkaeffalexandre Apr 3, 2020
6dcd293
[NEW] Livechat Fields
djorkaeffalexandre Apr 3, 2020
65d9e3c
Merge develop
djorkaeffalexandre Apr 7, 2020
36625b3
[NEW] Close Livechat
djorkaeffalexandre Apr 7, 2020
95439a3
[WIP] Forward livechat
djorkaeffalexandre Apr 7, 2020
5fe0d67
[NEW] Return inquiry
djorkaeffalexandre Apr 7, 2020
b720419
[WIP] Comment when close livechat
djorkaeffalexandre Apr 7, 2020
ba33a08
[WIP] Improve roomInfo
djorkaeffalexandre Apr 7, 2020
a33b750
[IMPROVEMENT] Forward room
djorkaeffalexandre Apr 7, 2020
6ba96c1
[FIX] Department picker
djorkaeffalexandre Apr 7, 2020
4691190
[FIX] Picker without results
djorkaeffalexandre Apr 7, 2020
62540f9
[FIX] Superfluous argument
djorkaeffalexandre Apr 7, 2020
c141b48
[FIX] Check permissions on RoomActionsView
djorkaeffalexandre Apr 7, 2020
7bcfd9d
[FIX] Livechat permissions
djorkaeffalexandre Apr 7, 2020
7c14da7
[WIP] Show edit to livechat
djorkaeffalexandre Apr 7, 2020
dec5397
[I18N] Add pt-br translations
djorkaeffalexandre Apr 7, 2020
f9d819c
[WIP] Livechat Info
djorkaeffalexandre Apr 7, 2020
9e5a56d
[IMPROVEMENT] Livechat info
djorkaeffalexandre Apr 7, 2020
2dc5624
[WIP] Livechat Edit
djorkaeffalexandre Apr 7, 2020
538e71b
[WIP] Livechat edit
djorkaeffalexandre Apr 8, 2020
e08a368
[WIP] Livechat Edit
djorkaeffalexandre Apr 8, 2020
a970b57
[WIP] Livechat edit scroll
djorkaeffalexandre Apr 8, 2020
244f40f
[FIX] Edit customFields
djorkaeffalexandre Apr 8, 2020
9a7d1fa
[FIX] Clean livechat customField
djorkaeffalexandre Apr 8, 2020
dd84564
[FIX] Visitor Navigation
djorkaeffalexandre Apr 8, 2020
8dfee49
[NEW] Next input logic LivechatEdit
djorkaeffalexandre Apr 8, 2020
79b3f5a
[FIX] Add livechat data to subscription
djorkaeffalexandre Apr 8, 2020
cd03e2f
[FIX] Revert change
djorkaeffalexandre Apr 8, 2020
1af0cf8
[NEW] Livechat user Status
djorkaeffalexandre Apr 8, 2020
85385bb
[WIP] Livechat tags
djorkaeffalexandre Apr 8, 2020
eb7201a
[NEW] Edit livechat tags
djorkaeffalexandre Apr 8, 2020
241cec0
[MERGE] Develop
djorkaeffalexandre Apr 9, 2020
f753658
[FIX] Prevent some crashes
djorkaeffalexandre Apr 9, 2020
0680238
[FIX] Forward
djorkaeffalexandre Apr 9, 2020
263382c
[FIX] Return Livechat error
djorkaeffalexandre Apr 9, 2020
1e4626c
[FIX] Prevent livechat info crash
djorkaeffalexandre Apr 9, 2020
743cfc5
[IMPROVEMENT] Use input style on forward chat
djorkaeffalexandre Apr 9, 2020
45392f9
OnboardingSeparator -> OrSeparator
djorkaeffalexandre Apr 9, 2020
7e76787
[FIX] Go to next input
djorkaeffalexandre Apr 9, 2020
9259f35
[NEW] Added some icons
djorkaeffalexandre Apr 9, 2020
5fcb798
Merge branch 'develop' of https://github.com/RocketChat/Rocket.Chat.R…
djorkaeffalexandre Apr 13, 2020
f9cfa0e
[NEW] Livechat close
djorkaeffalexandre Apr 13, 2020
60b36cc
[NEW] Forward Room Action
djorkaeffalexandre Apr 13, 2020
2acc6b0
[FIX] Livechat edit style
djorkaeffalexandre Apr 13, 2020
42fa508
[FIX] Change status logic
djorkaeffalexandre Apr 13, 2020
5076dad
[CHORE] Remove unnecessary logic
djorkaeffalexandre Apr 13, 2020
0a8c96e
[CHORE] Remove unnecessary code
djorkaeffalexandre Apr 13, 2020
754877e
[CHORE] Remove unecessary case
djorkaeffalexandre Apr 13, 2020
65fd910
[FIX] Superfluous argument
djorkaeffalexandre Apr 13, 2020
100535c
[IMPROVEMENT] Submit livechat edit
djorkaeffalexandre Apr 13, 2020
916f1ea
[CHORE] Remove textInput type
djorkaeffalexandre Apr 13, 2020
4478eb1
[FIX] Livechat edit
djorkaeffalexandre Apr 13, 2020
2061259
[FIX] Livechat Edit
djorkaeffalexandre Apr 13, 2020
579bb8a
[FIX] Use same effect
djorkaeffalexandre Apr 13, 2020
81598ba
[IMPROVEMENT] Tags input
djorkaeffalexandre Apr 13, 2020
2d44440
[FIX] Add empty tag
djorkaeffalexandre Apr 13, 2020
e3bc3af
Merge develop
djorkaeffalexandre May 4, 2020
200faa8
Fix minor issues
diegolmello May 4, 2020
b674b89
Fix typo
diegolmello May 4, 2020
9065d86
insert livechat room data to our room object
djorkaeffalexandre May 4, 2020
c92b9b6
review
djorkaeffalexandre May 4, 2020
b5e5b03
Merge branch 'develop' into new.livechat
djorkaeffalexandre May 4, 2020
b09141f
add method calls server version
djorkaeffalexandre May 5, 2020
971e682
Merge branch 'new.livechat' of https://github.com/RocketChat/Rocket.C…
djorkaeffalexandre May 5, 2020
17f273b
Merge branch 'develop' into new.livechat
djorkaeffalexandre May 5, 2020
440d077
Merge branch 'develop' into new.livechat
diegolmello May 8, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/actions/actionsTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const ROOMS = createRequestTypes('ROOMS', [
'OPEN_SEARCH_HEADER',
'CLOSE_SEARCH_HEADER'
]);
export const ROOM = createRequestTypes('ROOM', ['SUBSCRIBE', 'UNSUBSCRIBE', 'LEAVE', 'DELETE', 'REMOVED', 'USER_TYPING']);
export const ROOM = createRequestTypes('ROOM', ['SUBSCRIBE', 'UNSUBSCRIBE', 'LEAVE', 'DELETE', 'REMOVED', 'CLOSE', 'FORWARD', 'USER_TYPING']);
export const APP = createRequestTypes('APP', ['START', 'READY', 'INIT', 'INIT_LOCAL_SETTINGS']);
export const MESSAGES = createRequestTypes('MESSAGES', ['REPLY_BROADCAST']);
export const CREATE_CHANNEL = createRequestTypes('CREATE_CHANNEL', [...defaultTypes]);
Expand Down
15 changes: 15 additions & 0 deletions app/actions/room.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,21 @@ export function deleteRoom(rid, t) {
};
}

export function closeRoom(rid) {
return {
type: types.ROOM.CLOSE,
rid
};
}

export function forwardRoom(rid, transferData) {
return {
type: types.ROOM.FORWARD,
transferData,
rid
};
}

export function removedRoom() {
return {
type: types.ROOM.REMOVED
Expand Down
3 changes: 3 additions & 0 deletions app/constants/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ export default {
LDAP_Enable: {
type: 'valueAsBoolean'
},
Livechat_request_comment_when_closing_conversation: {
type: 'valueAsBoolean'
},
Jitsi_Enabled: {
type: 'valueAsBoolean'
},
Expand Down
6 changes: 3 additions & 3 deletions app/containers/LoginServices.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import sharedStyles from '../views/Styles';
import { themes } from '../constants/colors';
import { loginRequest as loginRequestAction } from '../actions/login';
import Button from './Button';
import OnboardingSeparator from './OnboardingSeparator';
import OrSeparator from './OrSeparator';
import Touch from '../utils/touch';
import I18n from '../i18n';
import random from '../utils/random';
Expand Down Expand Up @@ -252,12 +252,12 @@ class LoginServices extends React.PureComponent {
style={styles.options}
color={themes[theme].actionTintColor}
/>
<OnboardingSeparator theme={theme} />
<OrSeparator theme={theme} />
</>
);
}
if (length > 0 && separator) {
return <OnboardingSeparator theme={theme} />;
return <OrSeparator theme={theme} />;
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const styles = StyleSheet.create({
}
});

const DateSeparator = React.memo(({ theme }) => {
const OrSeparator = React.memo(({ theme }) => {
const line = { backgroundColor: themes[theme].borderColor };
const text = { color: themes[theme].auxiliaryText };
return (
Expand All @@ -36,8 +36,8 @@ const DateSeparator = React.memo(({ theme }) => {
);
});

DateSeparator.propTypes = {
OrSeparator.propTypes = {
theme: PropTypes.string
};

export default DateSeparator;
export default OrSeparator;
7 changes: 4 additions & 3 deletions app/containers/RoomTypeIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { Image, StyleSheet } from 'react-native';
import PropTypes from 'prop-types';
import { CustomIcon } from '../lib/Icons';
import { themes } from '../constants/colors';
import { STATUS_COLORS, themes } from '../constants/colors';

const styles = StyleSheet.create({
style: {
Expand All @@ -15,7 +15,7 @@ const styles = StyleSheet.create({
});

const RoomTypeIcon = React.memo(({
type, size, isGroupChat, style, theme
type, size, isGroupChat, status, style, theme
}) => {
if (!type) {
return null;
Expand All @@ -36,7 +36,7 @@ const RoomTypeIcon = React.memo(({
}
return <CustomIcon name='at' size={13} style={[styles.style, styles.discussion, { color }]} />;
} if (type === 'l') {
return <CustomIcon name='livechat' size={13} style={[styles.style, styles.discussion, { color }]} />;
return <CustomIcon name='livechat' size={13} style={[styles.style, styles.discussion, { color: STATUS_COLORS[status] }]} />;
}
return <Image source={{ uri: 'lock' }} style={[styles.style, style, { width: size, height: size, tintColor: color }]} />;
});
Expand All @@ -45,6 +45,7 @@ RoomTypeIcon.propTypes = {
theme: PropTypes.string,
type: PropTypes.string,
isGroupChat: PropTypes.bool,
status: PropTypes.string,
size: PropTypes.number,
style: PropTypes.object
};
Expand Down
20 changes: 18 additions & 2 deletions app/containers/TextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ export default class RCTextInput extends React.PureComponent {
inputRef: PropTypes.func,
testID: PropTypes.string,
iconLeft: PropTypes.string,
iconRight: PropTypes.string,
placeholder: PropTypes.string,
left: PropTypes.element,
onIconRightPress: PropTypes.func,
theme: PropTypes.string
}

Expand All @@ -90,6 +92,19 @@ export default class RCTextInput extends React.PureComponent {
);
}

get iconRight() {
const { iconRight, onIconRightPress, theme } = this.props;
return (
<BorderlessButton onPress={onIconRightPress} style={[styles.iconContainer, styles.iconRight]}>
<CustomIcon
name={iconRight}
style={{ color: themes[theme].bodyText }}
size={20}
/>
</BorderlessButton>
);
}

get iconPassword() {
const { showPassword } = this.state;
const { testID, theme } = this.props;
Expand Down Expand Up @@ -117,7 +132,7 @@ export default class RCTextInput extends React.PureComponent {
render() {
const { showPassword } = this.state;
const {
label, left, error, loading, secureTextEntry, containerStyle, inputRef, iconLeft, inputStyle, testID, placeholder, theme, ...inputProps
label, left, error, loading, secureTextEntry, containerStyle, inputRef, iconLeft, iconRight, inputStyle, testID, placeholder, theme, ...inputProps
} = this.props;
const { dangerColor } = themes[theme];
return (
Expand All @@ -140,7 +155,7 @@ export default class RCTextInput extends React.PureComponent {
style={[
styles.input,
iconLeft && styles.inputIconLeft,
secureTextEntry && styles.inputIconRight,
(secureTextEntry || iconRight) && styles.inputIconRight,
{
backgroundColor: themes[theme].backgroundColor,
borderColor: themes[theme].separatorColor,
Expand All @@ -165,6 +180,7 @@ export default class RCTextInput extends React.PureComponent {
{...inputProps}
/>
{iconLeft ? this.iconLeft : null}
{iconRight ? this.iconRight : null}
{secureTextEntry ? this.iconPassword : null}
{loading ? this.loading : null}
{left}
Expand Down
14 changes: 10 additions & 4 deletions app/containers/UIKit/MultiSelect/Chips.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ import styles from './styles';

const keyExtractor = item => item.value.toString();

const Chip = ({ item, onSelect, theme }) => (
const Chip = ({
item, onSelect, style, theme
}) => (
<Touchable
key={item.value}
onPress={() => onSelect(item)}
style={[styles.chip, { backgroundColor: themes[theme].auxiliaryBackground }]}
style={[styles.chip, { backgroundColor: themes[theme].auxiliaryBackground }, style]}
background={Touchable.Ripple(themes[theme].bannerBackground)}
>
<>
Expand All @@ -29,17 +31,21 @@ const Chip = ({ item, onSelect, theme }) => (
Chip.propTypes = {
item: PropTypes.object,
onSelect: PropTypes.func,
style: PropTypes.object,
theme: PropTypes.string
};

const Chips = ({ items, onSelect, theme }) => (
const Chips = ({
items, onSelect, style, theme
}) => (
<View style={styles.chips}>
{items.map(item => <Chip key={keyExtractor(item)} item={item} onSelect={onSelect} theme={theme} />)}
{items.map(item => <Chip key={keyExtractor(item)} item={item} onSelect={onSelect} style={style} theme={theme} />)}
</View>
);
Chips.propTypes = {
items: PropTypes.array,
onSelect: PropTypes.func,
style: PropTypes.object,
theme: PropTypes.string
};

Expand Down
11 changes: 6 additions & 5 deletions app/containers/UIKit/MultiSelect/Input.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { View } from 'react-native';
import { View, Text } from 'react-native';
import PropTypes from 'prop-types';
import Touchable from 'react-native-platform-touchable';

Expand All @@ -9,16 +9,16 @@ import ActivityIndicator from '../../ActivityIndicator';
import styles from './styles';

const Input = ({
children, open, theme, loading, inputStyle, disabled
children, onPress, theme, loading, inputStyle, placeholder, disabled
}) => (
<Touchable
onPress={() => open(true)}
onPress={onPress}
style={[{ backgroundColor: themes[theme].backgroundColor }, inputStyle]}
background={Touchable.Ripple(themes[theme].bannerBackground)}
disabled={disabled}
>
<View style={[styles.input, { borderColor: themes[theme].separatorColor }]}>
{children}
{placeholder ? <Text style={[styles.pickerText, { color: themes[theme].auxiliaryText }]}>{placeholder}</Text> : children}
{
loading
? <ActivityIndicator style={[styles.loading, styles.icon]} />
Expand All @@ -29,10 +29,11 @@ const Input = ({
);
Input.propTypes = {
children: PropTypes.node,
open: PropTypes.func,
onPress: PropTypes.func,
theme: PropTypes.string,
inputStyle: PropTypes.object,
disabled: PropTypes.bool,
placeholder: PropTypes.string,
loading: PropTypes.bool
};

Expand Down
4 changes: 2 additions & 2 deletions app/containers/UIKit/MultiSelect/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export const MultiSelect = React.memo(({
/>
) : (
<Input
open={onShow}
onPress={onShow}
theme={theme}
loading={loading}
disabled={disabled}
Expand All @@ -150,7 +150,7 @@ export const MultiSelect = React.memo(({
const items = options.filter(option => selected.includes(option.value));
button = (
<Input
open={onShow}
onPress={onShow}
theme={theme}
loading={loading}
disabled={disabled}
Expand Down
Loading