mozrest-sdk-react-dev 0.2.32 → 0.2.34
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/mozrest-sdk.es.js +9 -9
- package/package.json +1 -1
package/mozrest-sdk.es.js
CHANGED
|
@@ -38377,7 +38377,7 @@ const ReplyForm = ({
|
|
|
38377
38377
|
const { t: t2 } = useTranslation();
|
|
38378
38378
|
const { execute, isExecuting } = useService(AddReviewReply);
|
|
38379
38379
|
useContext(ContextTemplate);
|
|
38380
|
-
|
|
38380
|
+
useContext(ContextUserRole);
|
|
38381
38381
|
const ref = useRef(null);
|
|
38382
38382
|
const [showTranslation, setShowTranslation] = useState(false);
|
|
38383
38383
|
const handleExecute = async (data2) => {
|
|
@@ -38422,7 +38422,7 @@ const ReplyForm = ({
|
|
|
38422
38422
|
children: t2("REPLYTEMPLATES")
|
|
38423
38423
|
}), /* @__PURE__ */ React__default.createElement("div", {
|
|
38424
38424
|
style: { display: "flex", gap: 5 }
|
|
38425
|
-
}, !isMobile2 &&
|
|
38425
|
+
}, !isMobile2 && /* @__PURE__ */ React__default.createElement(Button$3, {
|
|
38426
38426
|
isLoading: isExecuting || isSuggesting,
|
|
38427
38427
|
size: "small",
|
|
38428
38428
|
icon: "robot",
|
|
@@ -43892,8 +43892,6 @@ const DetailMobile = ({
|
|
|
43892
43892
|
isSuggesting
|
|
43893
43893
|
}) => {
|
|
43894
43894
|
const { t: t2 } = useTranslation();
|
|
43895
|
-
useContext(ContextTemplate);
|
|
43896
|
-
const [roles] = useContext(ContextUserRole);
|
|
43897
43895
|
const [showTemplates, setShowTemplates] = useState(false);
|
|
43898
43896
|
const [showTranslation, setShowTranslation] = useState(false);
|
|
43899
43897
|
const openModal = () => setShowTemplates(true);
|
|
@@ -43957,7 +43955,7 @@ const DetailMobile = ({
|
|
|
43957
43955
|
open: showTemplates,
|
|
43958
43956
|
rating,
|
|
43959
43957
|
onClose: closeModal
|
|
43960
|
-
}), !reply2 && platform2 !== "tripadvisor" ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null,
|
|
43958
|
+
}), !reply2 && platform2 !== "tripadvisor" ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Button$3, {
|
|
43961
43959
|
isLoading: isSuggesting,
|
|
43962
43960
|
onClick: () => onSuggestTemplate(),
|
|
43963
43961
|
style: { marginBottom: 10 },
|
|
@@ -85440,6 +85438,8 @@ const TripadvisorButton = ({
|
|
|
85440
85438
|
className: styles$$.connectedText
|
|
85441
85439
|
}, t2("CONNECT")));
|
|
85442
85440
|
};
|
|
85441
|
+
const sessionData = sessionStorage.getItem("sdk_user");
|
|
85442
|
+
const userData = sessionData ? JSON.parse(sessionData) : {};
|
|
85443
85443
|
const FormToolBar = ({
|
|
85444
85444
|
venueId,
|
|
85445
85445
|
singleVenue: singleVenue2,
|
|
@@ -85456,8 +85456,10 @@ const FormToolBar = ({
|
|
|
85456
85456
|
googlePublishing,
|
|
85457
85457
|
facebookPublishing
|
|
85458
85458
|
}) => {
|
|
85459
|
+
var _a2;
|
|
85459
85460
|
const { t: t2 } = useTranslation();
|
|
85460
85461
|
const navigate = useNavigate();
|
|
85462
|
+
const roles = (_a2 = userData == null ? void 0 : userData.roles) != null ? _a2 : [];
|
|
85461
85463
|
const { FacebookConnected, GoogleConnected, BingConnected, AppleConnected, TripadvisorConnected, reload, isLoading: loadingConnections } = useConnect({
|
|
85462
85464
|
venueId
|
|
85463
85465
|
});
|
|
@@ -85467,6 +85469,7 @@ const FormToolBar = ({
|
|
|
85467
85469
|
const handleChangeVenue = (value2) => {
|
|
85468
85470
|
navigate(`/venues/${value2 == null ? void 0 : value2.id}`);
|
|
85469
85471
|
};
|
|
85472
|
+
console.log(roles, "ROLES");
|
|
85470
85473
|
useEffect(() => {
|
|
85471
85474
|
if (!loadingConnections && !GoogleConnected && !FacebookConnected && !BingConnected && !AppleConnected) {
|
|
85472
85475
|
setTimeout(() => {
|
|
@@ -85492,7 +85495,7 @@ const FormToolBar = ({
|
|
|
85492
85495
|
venueId,
|
|
85493
85496
|
onDisconnect,
|
|
85494
85497
|
isDisconnecting: facebookPublishing === "in_progress"
|
|
85495
|
-
}), /* @__PURE__ */ React__default.createElement(TripadvisorButton, {
|
|
85498
|
+
}), roles && roles.length > 0 && roles.some((str) => str.includes("BOT")) && /* @__PURE__ */ React__default.createElement(TripadvisorButton, {
|
|
85496
85499
|
venueId,
|
|
85497
85500
|
isConnected: TripadvisorConnected,
|
|
85498
85501
|
reload: reloadConnect,
|
|
@@ -101531,8 +101534,6 @@ const CommercialFeeTypes = {
|
|
|
101531
101534
|
subscription: "month",
|
|
101532
101535
|
na: "Free"
|
|
101533
101536
|
};
|
|
101534
|
-
const sessionData = sessionStorage.getItem("sdk_user");
|
|
101535
|
-
const userData = sessionData ? JSON.parse(sessionData) : {};
|
|
101536
101537
|
const conditionsContainer$2 = "_conditionsContainer_1yf4e_1";
|
|
101537
101538
|
const conditionsCardContainer$2 = "_conditionsCardContainer_1yf4e_7";
|
|
101538
101539
|
var styles$a = {
|
|
@@ -102403,7 +102404,6 @@ const ExportDataModal = ({ open, onClose: onClose2, filters: filters2, isExportL
|
|
|
102403
102404
|
}));
|
|
102404
102405
|
};
|
|
102405
102406
|
const ToolBar = ({ filters: filters2, setFilters, setTotalDays, userEmail, userFullName }) => {
|
|
102406
|
-
useTranslation();
|
|
102407
102407
|
const [openExportDataModal, setOpenExportDataModal] = useState(false);
|
|
102408
102408
|
const onOpenExportDataModal = () => setOpenExportDataModal(true);
|
|
102409
102409
|
const onCloseExportDataModal = () => setOpenExportDataModal(false);
|