@bigbinary/neeto-approvals-frontend 1.0.0 → 1.0.1
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/app/javascript/src/translations/en.json +2 -1
- package/dist/index.cjs.js +40 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +41 -6
- package/dist/index.js.map +1 -1
- package/package.json +15 -13
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState, useEffect, useRef, createElement, useMemo } from 'react';
|
|
2
2
|
import { useMutationWithInvalidation, useDebounce, withT, useQueryParams } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
3
3
|
import Container from '@bigbinary/neeto-molecules/Container';
|
|
4
|
-
import {
|
|
4
|
+
import { useLocation, useHistory, Switch, Route, Redirect, useParams } from 'react-router-dom';
|
|
5
5
|
import i18next, { t as t$1 } from 'i18next';
|
|
6
6
|
import { DEFAULT_PAGE_INDEX, DEFAULT_PAGE_SIZE, PLURAL, SINGULAR } from '@bigbinary/neeto-commons-frontend/constants';
|
|
7
7
|
import Button from '@bigbinary/neetoui/Button';
|
|
@@ -539,7 +539,8 @@ var RequestDetailsPane = function RequestDetailsPane(_ref) {
|
|
|
539
539
|
function ownKeys$a(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
540
540
|
function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
541
541
|
var History = function History(_ref) {
|
|
542
|
-
var
|
|
542
|
+
var helpDocUrl = _ref.helpDocUrl,
|
|
543
|
+
requestUrl = _ref.requestUrl;
|
|
543
544
|
var _useState = useState(DEFAULT_FILTER_VALUES),
|
|
544
545
|
_useState2 = _slicedToArray(_useState, 2),
|
|
545
546
|
filters = _useState2[0],
|
|
@@ -607,6 +608,22 @@ var History = function History(_ref) {
|
|
|
607
608
|
}) : /*#__PURE__*/jsx("div", {
|
|
608
609
|
className: "flex h-full w-full flex-grow items-center justify-center",
|
|
609
610
|
children: /*#__PURE__*/jsx(NoData, {
|
|
611
|
+
helpText: /*#__PURE__*/jsx(Trans, {
|
|
612
|
+
i18nKey: "neetoApprovals.common.noDataHelpTextLearnMore",
|
|
613
|
+
style: "link",
|
|
614
|
+
values: {
|
|
615
|
+
entity: t("neetoApprovals.common.history")
|
|
616
|
+
},
|
|
617
|
+
components: {
|
|
618
|
+
a: /*#__PURE__*/jsx(Button, {
|
|
619
|
+
style: "link",
|
|
620
|
+
target: "_blank",
|
|
621
|
+
to: {
|
|
622
|
+
pathname: helpDocUrl
|
|
623
|
+
}
|
|
624
|
+
})
|
|
625
|
+
}
|
|
626
|
+
}),
|
|
610
627
|
title: t("neetoApprovals.common.notFound_", {
|
|
611
628
|
what: t("neetoApprovals.common.record", PLURAL)
|
|
612
629
|
})
|
|
@@ -628,7 +645,8 @@ var PENDING_TABLE_COLUMNS = removeBy({
|
|
|
628
645
|
function ownKeys$9(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
629
646
|
function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$9(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$9(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
630
647
|
var PendingRequests = function PendingRequests(_ref) {
|
|
631
|
-
var
|
|
648
|
+
var helpDocUrl = _ref.helpDocUrl,
|
|
649
|
+
requestUrl = _ref.requestUrl;
|
|
632
650
|
var _useState = useState(DEFAULT_FILTER_VALUES),
|
|
633
651
|
_useState2 = _slicedToArray(_useState, 2),
|
|
634
652
|
filters = _useState2[0],
|
|
@@ -690,6 +708,22 @@ var PendingRequests = function PendingRequests(_ref) {
|
|
|
690
708
|
}) : /*#__PURE__*/jsx("div", {
|
|
691
709
|
className: "flex h-full w-full flex-grow items-center justify-center",
|
|
692
710
|
children: /*#__PURE__*/jsx(NoData, {
|
|
711
|
+
helpText: /*#__PURE__*/jsx(Trans, {
|
|
712
|
+
i18nKey: "neetoApprovals.common.noDataHelpTextLearnMore",
|
|
713
|
+
style: "link",
|
|
714
|
+
components: {
|
|
715
|
+
a: /*#__PURE__*/jsx(Button, {
|
|
716
|
+
style: "link",
|
|
717
|
+
target: "_blank",
|
|
718
|
+
to: {
|
|
719
|
+
pathname: helpDocUrl
|
|
720
|
+
}
|
|
721
|
+
})
|
|
722
|
+
},
|
|
723
|
+
values: {
|
|
724
|
+
entity: t("neetoApprovals.common.pendingApproval", PLURAL)
|
|
725
|
+
}
|
|
726
|
+
}),
|
|
693
727
|
title: t("neetoApprovals.common.notFound_", {
|
|
694
728
|
what: t("neetoApprovals.common.pendingApproval", PLURAL)
|
|
695
729
|
})
|
|
@@ -1089,12 +1123,13 @@ var renderNoDataHelpText = function renderNoDataHelpText(_ref) {
|
|
|
1089
1123
|
url = _ref.url;
|
|
1090
1124
|
return /*#__PURE__*/jsx(Trans, {
|
|
1091
1125
|
i18nKey: "neetoApprovals.common.noDataHelpText",
|
|
1126
|
+
style: "link",
|
|
1092
1127
|
values: {
|
|
1093
|
-
entity: entity
|
|
1128
|
+
entity: entity.toLocaleLowerCase()
|
|
1094
1129
|
},
|
|
1095
1130
|
components: {
|
|
1096
|
-
a: /*#__PURE__*/jsx(
|
|
1097
|
-
|
|
1131
|
+
a: /*#__PURE__*/jsx(Button, {
|
|
1132
|
+
style: "link",
|
|
1098
1133
|
target: "_blank",
|
|
1099
1134
|
to: {
|
|
1100
1135
|
pathname: url
|