@controleonline/ui-crm 1.0.74 → 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.
|
@@ -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
7
|
71
|
|
8
8
|
],
|
|
9
9
|
"frozen": true,
|
|
10
10
|
"repositories": {
|
|
11
|
-
"ControleOnline/ui-crm": "
|
|
12
|
-
}
|
|
13
|
-
"note": "Restores master to 1.0.70 content + /ai<->/support swap; 1.0.72 RC wrongly carried dev history."
|
|
11
|
+
"ControleOnline/ui-crm": "42709ef109b99026f250942062969af69798fe62"
|
|
12
|
+
}
|
|
14
13
|
}
|
package/package.json
CHANGED
|
@@ -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}}>
|
|
@@ -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 the analyst screen /ai).
|
|
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>
|
|
@@ -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(() => {
|