@pelcro/react-pelcro-js 3.0.0-beta.4 → 3.0.0-beta.5
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.cjs.js +14 -12
- package/dist/index.esm.js +14 -12
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -9106,22 +9106,24 @@ const showInvoiceDetailsFromUrl = () => {
|
|
|
9106
9106
|
const {
|
|
9107
9107
|
isAuthenticated,
|
|
9108
9108
|
setInvoice,
|
|
9109
|
+
whenSiteReady,
|
|
9109
9110
|
switchView
|
|
9110
9111
|
} = usePelcro.getStore();
|
|
9112
|
+
whenSiteReady(() => {
|
|
9113
|
+
if (!isAuthenticated()) {
|
|
9114
|
+
return switchView("login");
|
|
9115
|
+
}
|
|
9111
9116
|
|
|
9112
|
-
|
|
9113
|
-
|
|
9114
|
-
}
|
|
9115
|
-
|
|
9116
|
-
const invoiceId = window.Pelcro.helpers.getURLParameter("id");
|
|
9117
|
-
const wasSetSuccessfully = setInvoice(invoiceId);
|
|
9117
|
+
const invoiceId = window.Pelcro.helpers.getURLParameter("id");
|
|
9118
|
+
const wasSetSuccessfully = setInvoice(invoiceId);
|
|
9118
9119
|
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
|
|
9123
|
-
|
|
9124
|
-
|
|
9120
|
+
if (!wasSetSuccessfully) {
|
|
9121
|
+
const translations = i18next.t("messages", {
|
|
9122
|
+
returnObjects: true
|
|
9123
|
+
});
|
|
9124
|
+
notify.error(translations.invalidInvoice);
|
|
9125
|
+
}
|
|
9126
|
+
});
|
|
9125
9127
|
};
|
|
9126
9128
|
|
|
9127
9129
|
const defaultOptions = {
|
package/dist/index.esm.js
CHANGED
|
@@ -9076,22 +9076,24 @@ const showInvoiceDetailsFromUrl = () => {
|
|
|
9076
9076
|
const {
|
|
9077
9077
|
isAuthenticated,
|
|
9078
9078
|
setInvoice,
|
|
9079
|
+
whenSiteReady,
|
|
9079
9080
|
switchView
|
|
9080
9081
|
} = usePelcro.getStore();
|
|
9082
|
+
whenSiteReady(() => {
|
|
9083
|
+
if (!isAuthenticated()) {
|
|
9084
|
+
return switchView("login");
|
|
9085
|
+
}
|
|
9081
9086
|
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
}
|
|
9085
|
-
|
|
9086
|
-
const invoiceId = window.Pelcro.helpers.getURLParameter("id");
|
|
9087
|
-
const wasSetSuccessfully = setInvoice(invoiceId);
|
|
9087
|
+
const invoiceId = window.Pelcro.helpers.getURLParameter("id");
|
|
9088
|
+
const wasSetSuccessfully = setInvoice(invoiceId);
|
|
9088
9089
|
|
|
9089
|
-
|
|
9090
|
-
|
|
9091
|
-
|
|
9092
|
-
|
|
9093
|
-
|
|
9094
|
-
|
|
9090
|
+
if (!wasSetSuccessfully) {
|
|
9091
|
+
const translations = i18next.t("messages", {
|
|
9092
|
+
returnObjects: true
|
|
9093
|
+
});
|
|
9094
|
+
notify.error(translations.invalidInvoice);
|
|
9095
|
+
}
|
|
9096
|
+
});
|
|
9095
9097
|
};
|
|
9096
9098
|
|
|
9097
9099
|
const defaultOptions = {
|