@vtex/faststore-plugin-buyer-portal 1.1.101 → 1.1.102
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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isDevelopment } from "../../utils/environment";
|
|
1
|
+
// import { isDevelopment } from "../../utils/environment";
|
|
2
2
|
import { Icon } from "../Icon";
|
|
3
3
|
|
|
4
4
|
export type ErrorProps = {
|
|
@@ -17,15 +17,13 @@ export default function Error({ error, tags }: ErrorProps) {
|
|
|
17
17
|
<button data-fs-bp-error-button onClick={() => window.location.reload()}>
|
|
18
18
|
Try again
|
|
19
19
|
</button>
|
|
20
|
-
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
</div>
|
|
28
|
-
) : null}
|
|
20
|
+
<div data-fs-bp-error-details>
|
|
21
|
+
<span data-fs-bp-error-details-type>{tags?.errorType}</span>
|
|
22
|
+
<h2 data-fs-bp-error-details-title>Error Details</h2>
|
|
23
|
+
<p data-fs-bp-error-details-message>{error?.message}</p>
|
|
24
|
+
<p data-fs-bp-error-details-stack>Stack: {error?.stack}</p>
|
|
25
|
+
<p data-fs-bp-error-details-component>Component: {tags?.component}</p>
|
|
26
|
+
</div>
|
|
29
27
|
</div>
|
|
30
28
|
);
|
|
31
29
|
}
|
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
import { buyerPortalRoutes } from "./buyerPortalRoutes";
|
|
2
2
|
|
|
3
|
-
const normalizeFinanceLinks = (route: string, contracId: string) => {
|
|
4
|
-
const parts = route.split("/").filter(Boolean);
|
|
5
|
-
|
|
6
|
-
if (parts.length === 3) {
|
|
7
|
-
route += `${contracId}`;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
return route;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
3
|
export const getFinanceSettingsLinks = ({
|
|
14
4
|
orgUnitId,
|
|
15
5
|
contractId,
|
|
@@ -19,16 +9,10 @@ export const getFinanceSettingsLinks = ({
|
|
|
19
9
|
}) => [
|
|
20
10
|
{
|
|
21
11
|
name: "Budgets",
|
|
22
|
-
link:
|
|
23
|
-
buyerPortalRoutes.budgets({ orgUnitId, contractId }),
|
|
24
|
-
contractId
|
|
25
|
-
),
|
|
12
|
+
link: buyerPortalRoutes.budgets({ orgUnitId, contractId }),
|
|
26
13
|
},
|
|
27
14
|
{
|
|
28
15
|
name: "Buying Policies",
|
|
29
|
-
link:
|
|
30
|
-
buyerPortalRoutes.buyingPolicies({ orgUnitId, contractId }),
|
|
31
|
-
contractId
|
|
32
|
-
),
|
|
16
|
+
link: buyerPortalRoutes.buyingPolicies({ orgUnitId, contractId }),
|
|
33
17
|
},
|
|
34
18
|
];
|