@vtex/faststore-plugin-buyer-portal 1.1.111 → 1.1.113
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/package.json
CHANGED
|
@@ -13,11 +13,12 @@ export const orderFieldsCriteriaOptions = [
|
|
|
13
13
|
{
|
|
14
14
|
label: "If the order contains an exceeded budget",
|
|
15
15
|
criteria:
|
|
16
|
-
"$exists(budgetData.
|
|
16
|
+
"$exists(budgetData.budgets.**.allocations[balance.remaining < 0])",
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
label: "If the order contains an expired budget Pending confirmation",
|
|
20
|
-
criteria:
|
|
20
|
+
criteria:
|
|
21
|
+
"$exists(budgetData.budgets.**.cycleConfiguration[$toMillis(endDate) < $millis()])",
|
|
21
22
|
},
|
|
22
23
|
{
|
|
23
24
|
label: "If the order contains a PO number",
|
|
@@ -31,13 +31,10 @@ export const withAuth = <T extends Record<string, unknown>>(
|
|
|
31
31
|
}
|
|
32
32
|
}, [props?.loading, hasCookie, router]);
|
|
33
33
|
|
|
34
|
-
// If loading (cookie not yet available), show skeleton
|
|
35
|
-
if (props?.loading) {
|
|
36
|
-
return <PageLoader />;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// If not authorized and not loading, render nothing
|
|
40
34
|
if (!props?.authorized) {
|
|
35
|
+
if (props?.loading) {
|
|
36
|
+
return <PageLoader />;
|
|
37
|
+
}
|
|
41
38
|
return null;
|
|
42
39
|
}
|
|
43
40
|
|
|
@@ -34,17 +34,13 @@ export const withAuthProvider = <T,>(
|
|
|
34
34
|
}
|
|
35
35
|
}, [props?.loading, hasCookie, router]);
|
|
36
36
|
|
|
37
|
-
// Se está carregando (cookie ainda não disponível), mostra skeleton
|
|
38
|
-
if (props?.loading) {
|
|
39
|
-
return <PageLoader />;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// Se não está autorizado e não está carregando, não renderiza nada
|
|
43
37
|
if (!props?.authorized) {
|
|
38
|
+
if (props?.loading) {
|
|
39
|
+
return <PageLoader />;
|
|
40
|
+
}
|
|
44
41
|
return null;
|
|
45
42
|
}
|
|
46
43
|
|
|
47
|
-
// Se autorizado, renderiza o componente envolvido no provider
|
|
48
44
|
return (
|
|
49
45
|
<BuyerPortalProvider clientContext={props?.clientContext}>
|
|
50
46
|
<Component {...props.data} clientContext={props?.clientContext} />
|