@controleonline/ui-crm 1.0.71 → 1.0.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.release/rc-manifest.json +5 -6
- package/package.json +1 -1
- package/src/react/components/conversation/requestApi.js +1 -1
- package/src/react/pages/mcp/McpPage.js +5 -1
- package/src/react/pages/mcp/useRequests.js +4 -2
- package/src/react/pages/settings/sections/TicketSettingsSection.js +4 -10
- package/src/react/pages/tickets/TicketWorkspace.js +4 -3
- package/src/react/router/routes.js +2 -2
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.
|
|
2
|
+
"version": "1.0.75",
|
|
3
3
|
"rc": 1,
|
|
4
|
-
"branch": "rc/1.0.
|
|
5
|
-
"baseMaster": "
|
|
4
|
+
"branch": "rc/1.0.75-rc.1",
|
|
5
|
+
"baseMaster": "fd914b7908a506526f94b71bf5e6d29a209f5bb9",
|
|
6
6
|
"tasks": [
|
|
7
|
-
71
|
|
8
|
-
76
|
|
7
|
+
71
|
|
9
8
|
],
|
|
10
9
|
"frozen": true,
|
|
11
10
|
"repositories": {
|
|
12
|
-
"ControleOnline/ui-crm": "
|
|
11
|
+
"ControleOnline/ui-crm": "42709ef109b99026f250942062969af69798fe62"
|
|
13
12
|
}
|
|
14
13
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @agents API of requests (relationship/support) shared by the customer screen (/
|
|
2
|
+
* @agents API of requests (relationship/support) shared by the customer screen (/support), the analyst screen (/ai) and CRM.
|
|
3
3
|
*/
|
|
4
4
|
import {api} from '@controleonline/ui-common/src/api';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @agents Requests screen (/
|
|
2
|
+
* @agents Requests screen (/support) of the customer companies' teams (app-community#1592–#1595, #1597):
|
|
3
3
|
* left, the user's requests with a status filter (default "open"); "Novo" asks Suporte or Comercial and
|
|
4
4
|
* the first message opens the request (born without a responsible person). Right, the WhatsApp-like
|
|
5
5
|
* conversation with text, attachments and voice notes. No direct AI chat here; information is read-only.
|
|
@@ -37,6 +37,10 @@ export default function McpPage() {
|
|
|
37
37
|
);
|
|
38
38
|
|
|
39
39
|
const statusOptions = [{value: '', label: 'Todos'}, ...r.statuses.map(s => ({value: s.status, label: s.status}))];
|
|
40
|
+
// The current filter (default "open") is always shown, even before the statuses load.
|
|
41
|
+
if (r.statusFilter && !statusOptions.some(o => o.value === r.statusFilter)) {
|
|
42
|
+
statusOptions.push({value: r.statusFilter, label: r.statusFilter});
|
|
43
|
+
}
|
|
40
44
|
|
|
41
45
|
const list = (
|
|
42
46
|
<View style={{width: narrow ? '100%' : 320, borderRightWidth: narrow ? 0 : 1, borderRightColor: palette.border, backgroundColor: palette.panel, flex: narrow ? 1 : undefined}}>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @agents State of the requests screen (/
|
|
2
|
+
* @agents State of the requests screen (/support, app-community#1592–#1595): the user's relationship/support
|
|
3
3
|
* requests filtered by status (default "open"), the selected one with its conversation, and the
|
|
4
4
|
* draft type of a new request. Live through websocket events (useRealtimeReload).
|
|
5
5
|
*/
|
|
@@ -27,9 +27,11 @@ export default function useRequests({onError}) {
|
|
|
27
27
|
const [messages, setMessages] = useState([]);
|
|
28
28
|
const [loadingChat, setLoadingChat] = useState(false);
|
|
29
29
|
|
|
30
|
+
// Loaded once the session is ready (a first call before login returned nothing and never retried).
|
|
30
31
|
useEffect(() => {
|
|
32
|
+
if (!meId) return;
|
|
31
33
|
fetchRequestStatuses().then(setStatuses).catch(() => setStatuses([]));
|
|
32
|
-
}, []);
|
|
34
|
+
}, [meId, companyId]);
|
|
33
35
|
|
|
34
36
|
const loadList = useCallback(async () => {
|
|
35
37
|
if (!meId) return;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @agents General settings → Atendimento (app-community#1596/#1600): how requests are distributed and
|
|
3
3
|
* who answers them. Support: rule (random / fewest open) + the people who answer support (the only
|
|
4
|
-
* ones listed as responsible in /
|
|
4
|
+
* ones listed as responsible in the analyst screen /ai). Commercial requests follow the CRM's own client
|
|
5
|
+
* distribution (each client's salesman): no second setting here, by design.
|
|
5
6
|
* Saved per company through GET|PUT /tickets/settings.
|
|
6
7
|
*/
|
|
7
8
|
import React, {useCallback, useEffect, useState} from 'react';
|
|
@@ -108,15 +109,8 @@ export default function TicketSettingsSection() {
|
|
|
108
109
|
|
|
109
110
|
<GeneralSettingsSection
|
|
110
111
|
title="Comercial (CRM)"
|
|
111
|
-
description="
|
|
112
|
-
<Text style={styles.
|
|
113
|
-
{STRATEGIES.map(s => (
|
|
114
|
-
<Choice key={s.value} palette={palette} active={settings.crm_strategy === s.value} label={s.label} onPress={() => save({crm_strategy: s.value})} />
|
|
115
|
-
))}
|
|
116
|
-
<Text style={[styles.sectionTitle, {marginTop: 12}]}>Assistentes de vendas</Text>
|
|
117
|
-
{employees.map(p => (
|
|
118
|
-
<Choice key={p.id} multi palette={palette} active={settings.crm_assistants.includes(p.id)} label={p.alias || p.name} onPress={() => toggle('crm_assistants', p.id)} />
|
|
119
|
-
))}
|
|
112
|
+
description="Solicitações comerciais seguem a distribuição de clientes do CRM: cada cliente é atendido pelo seu vendedor; clientes sem vendedor recebem um pela estratégia configurada na aba CRM.">
|
|
113
|
+
<Text style={styles.helperText}>Nada a configurar aqui.</Text>
|
|
120
114
|
</GeneralSettingsSection>
|
|
121
115
|
{saving ? <ActivityIndicator style={{marginTop: 8}} /> : null}
|
|
122
116
|
</View>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @agents Analyst workspace of one request (
|
|
2
|
+
* @agents Analyst workspace of one request (/ai analyst screen and CRM), app-community#1599/#1600:
|
|
3
3
|
* WhatsApp-like conversation + actions: status, category, responsible (only the context's responders:
|
|
4
4
|
* CRM = salesmen/assistants, Support = Manager list), context relationship <-> support, due date,
|
|
5
5
|
* reply to the customer or internal note, and call the company's AI (only when one is connected).
|
|
@@ -59,7 +59,8 @@ export default function TicketWorkspace({taskId, extra = null}) {
|
|
|
59
59
|
|
|
60
60
|
const load = useCallback(
|
|
61
61
|
async ({quiet = false} = {}) => {
|
|
62
|
-
|
|
62
|
+
// On a reload (F5 / deep link) the session is restored asynchronously: wait for the user.
|
|
63
|
+
if (!taskId || !meId) return;
|
|
63
64
|
if (!quiet) setLoading(true);
|
|
64
65
|
try {
|
|
65
66
|
const [t, m] = await Promise.all([fetchTask(taskId), fetchMessages(taskId)]);
|
|
@@ -71,7 +72,7 @@ export default function TicketWorkspace({taskId, extra = null}) {
|
|
|
71
72
|
setLoading(false);
|
|
72
73
|
}
|
|
73
74
|
},
|
|
74
|
-
[taskId, onError],
|
|
75
|
+
[taskId, meId, onError],
|
|
75
76
|
);
|
|
76
77
|
|
|
77
78
|
useEffect(() => {
|
|
@@ -126,7 +126,7 @@ const crmRoutes = [
|
|
|
126
126
|
{
|
|
127
127
|
name: 'McpPage',
|
|
128
128
|
component: McpPage,
|
|
129
|
-
path: '
|
|
129
|
+
path: 'support',
|
|
130
130
|
options: {
|
|
131
131
|
showCompanyFilter: true,
|
|
132
132
|
showBottomToolBar: true,
|
|
@@ -164,7 +164,7 @@ const crmRoutes = [
|
|
|
164
164
|
// Support tickets funnel (clone of the CRM funnel for type=support).
|
|
165
165
|
name: 'SupportFunnel',
|
|
166
166
|
component: SupportFunnelPage,
|
|
167
|
-
path: '
|
|
167
|
+
path: 'ai',
|
|
168
168
|
options: {
|
|
169
169
|
showCompanyFilter: true,
|
|
170
170
|
showBottomToolBar: true,
|