ode-explorer 1.3.3-develop.202402221755 → 1.3.3-develop.202402261150
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/dist/index.js +38 -43
- package/dist/version.txt +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -62463,50 +62463,45 @@ function useHasWorkflow(workflow) {
|
|
|
62463
62463
|
}, [workflow, mock]), state;
|
|
62464
62464
|
}
|
|
62465
62465
|
const useConversation = () => {
|
|
62466
|
-
const zimbraWorkflow = useHasWorkflow("fr.openent.zimbra.controllers.ZimbraController|view"), zimbraPreauth = useHasWorkflow("fr.openent.zimbra.controllers.ZimbraController|preauth"), [messages2, setMessages] = reactExports.useState(0), [msgLink, setMsgLink] = reactExports.useState(""),
|
|
62467
|
-
|
|
62468
|
-
|
|
62469
|
-
|
|
62470
|
-
|
|
62471
|
-
|
|
62472
|
-
|
|
62473
|
-
|
|
62474
|
-
|
|
62475
|
-
|
|
62476
|
-
|
|
62477
|
-
|
|
62478
|
-
|
|
62479
|
-
|
|
62480
|
-
|
|
62481
|
-
|
|
62482
|
-
|
|
62483
|
-
|
|
62484
|
-
|
|
62485
|
-
|
|
62486
|
-
|
|
62487
|
-
|
|
62488
|
-
|
|
62489
|
-
|
|
62490
|
-
|
|
62491
|
-
|
|
62492
|
-
|
|
62493
|
-
|
|
62494
|
-
|
|
62495
|
-
|
|
62496
|
-
|
|
62497
|
-
|
|
62498
|
-
|
|
62499
|
-
|
|
62500
|
-
}, [zimbraPreauth]);
|
|
62466
|
+
const zimbraWorkflow = useHasWorkflow("fr.openent.zimbra.controllers.ZimbraController|view"), zimbraPreauth = useHasWorkflow("fr.openent.zimbra.controllers.ZimbraController|preauth"), [messages2, setMessages] = reactExports.useState(0), [msgLink, setMsgLink] = reactExports.useState(""), queryParams = {
|
|
62467
|
+
unread: true,
|
|
62468
|
+
_: (/* @__PURE__ */ new Date()).getTime()
|
|
62469
|
+
};
|
|
62470
|
+
console.log({
|
|
62471
|
+
zimbraWorkflow
|
|
62472
|
+
});
|
|
62473
|
+
const refreshMails = reactExports.useCallback(async () => {
|
|
62474
|
+
const url = zimbraWorkflow ? "/zimbra/count/INBOX" : "/conversation/count/INBOX";
|
|
62475
|
+
console.log({
|
|
62476
|
+
url
|
|
62477
|
+
});
|
|
62478
|
+
try {
|
|
62479
|
+
const {
|
|
62480
|
+
status,
|
|
62481
|
+
count: count2
|
|
62482
|
+
} = await odeServices.http().get(url, {
|
|
62483
|
+
queryParams
|
|
62484
|
+
});
|
|
62485
|
+
setMessages(status === 200 ? count2 : 0);
|
|
62486
|
+
} catch (error) {
|
|
62487
|
+
console.error(error), setMessages(0);
|
|
62488
|
+
}
|
|
62489
|
+
}, [zimbraWorkflow]), goToMessagerie = reactExports.useCallback(async () => {
|
|
62490
|
+
const defaultLink = "/zimbra/zimbra";
|
|
62491
|
+
try {
|
|
62492
|
+
const {
|
|
62493
|
+
preference
|
|
62494
|
+
} = await odeServices.http().get("/userbook/preference/zimbra"), isExpertMode = preference ? JSON.parse(preference).modeExpert : false;
|
|
62495
|
+
setMsgLink(isExpertMode && zimbraPreauth ? "/zimbra/preauth" : window.location.origin + defaultLink);
|
|
62496
|
+
} catch (error) {
|
|
62497
|
+
console.error(error), setMsgLink(window.location.origin + defaultLink);
|
|
62498
|
+
}
|
|
62499
|
+
}, []);
|
|
62501
62500
|
return reactExports.useEffect(() => {
|
|
62502
|
-
|
|
62503
|
-
|
|
62504
|
-
|
|
62505
|
-
|
|
62506
|
-
console.error(error);
|
|
62507
|
-
}
|
|
62508
|
-
})(), goToMessagerie();
|
|
62509
|
-
}, [goToMessagerie, refreshMails]), {
|
|
62501
|
+
zimbraWorkflow && refreshMails();
|
|
62502
|
+
}, [zimbraWorkflow, refreshMails]), reactExports.useEffect(() => {
|
|
62503
|
+
zimbraPreauth && goToMessagerie();
|
|
62504
|
+
}, [zimbraPreauth, goToMessagerie]), {
|
|
62510
62505
|
messages: messages2,
|
|
62511
62506
|
msgLink,
|
|
62512
62507
|
zimbraWorkflow
|
package/dist/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
ode-explorer=1.0-b2school-SNAPSHOT
|
|
1
|
+
ode-explorer=1.0-b2school-SNAPSHOT 26/02/2024 11:51:21
|
package/package.json
CHANGED