@bigbinary/neeto-approvals-frontend 1.2.2 → 1.2.3
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/Approvals.js +3 -3
- package/dist/Form.js +2 -2
- package/dist/Public.js +1 -1
- package/dist/RequestDetailsPane.js +2 -2
- package/dist/cjs/Approvals.js +77 -107
- package/dist/cjs/Approvals.js.map +1 -1
- package/dist/cjs/Form.js +17 -29
- package/dist/cjs/Form.js.map +1 -1
- package/dist/cjs/Public.js +17 -31
- package/dist/cjs/Public.js.map +1 -1
- package/dist/cjs/RequestDetailsPane.js +2 -2
- package/dist/cjs/index.js +3 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/{constants-0d619d8c.js → constants-C7lmQTsP.js} +2 -2
- package/dist/{constants-0d619d8c.js.map → constants-C7lmQTsP.js.map} +1 -1
- package/dist/{constants-3f7973fa.js → constants-CqvZ5vQ3.js} +4 -5
- package/dist/{constants-3f7973fa.js.map → constants-CqvZ5vQ3.js.map} +1 -1
- package/dist/{index-acf464ee.js → index-CIHYIzN1.js} +29 -45
- package/dist/{index-acf464ee.js.map → index-CIHYIzN1.js.map} +1 -1
- package/dist/{index-067434fa.js → index-D5r7D8u_.js} +2 -2
- package/dist/{index-067434fa.js.map → index-D5r7D8u_.js.map} +1 -1
- package/dist/index.js +3 -3
- package/dist/{useTemplatesApi-d609506a.js → useTemplatesApi-Bvvgsvjg.js} +8 -13
- package/dist/useTemplatesApi-Bvvgsvjg.js.map +1 -0
- package/dist/{useTemplatesApi-aa2fc810.js → useTemplatesApi-DIsX3s8p.js} +3 -3
- package/dist/{useTemplatesApi-aa2fc810.js.map → useTemplatesApi-DIsX3s8p.js.map} +1 -1
- package/package.json +11 -11
- package/dist/useTemplatesApi-d609506a.js.map +0 -1
package/dist/Approvals.js
CHANGED
|
@@ -13,15 +13,15 @@ import Table$1 from '@bigbinary/neetoui/Table';
|
|
|
13
13
|
import NoData from '@bigbinary/neetoui/NoData';
|
|
14
14
|
import { isEmpty, keys } from 'ramda';
|
|
15
15
|
import { useTranslation, Trans } from 'react-i18next';
|
|
16
|
-
import { u as useFetchRequests, a as updateApprovalDetails, R as RequestDetailsPane, g as getApprovalFilter } from './index-
|
|
16
|
+
import { u as useFetchRequests, a as updateApprovalDetails, R as RequestDetailsPane, g as getApprovalFilter } from './index-D5r7D8u_.js';
|
|
17
17
|
import DateFormat from '@bigbinary/neeto-molecules/DateFormat';
|
|
18
18
|
import Tag from '@bigbinary/neetoui/Tag';
|
|
19
|
-
import {
|
|
19
|
+
import { a as STATUS_TAG_STYLE, D as DEFAULT_FILTER_VALUES, c as SEARCH_DELAY, S as STATUSES, d as SORT_ORDER, e as DATA_CY_KEY, B as BASE_URL, Q as QUERY_KEYS } from './constants-C7lmQTsP.js';
|
|
20
20
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
21
21
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
22
22
|
import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
|
|
23
23
|
import Alert from '@bigbinary/neetoui/Alert';
|
|
24
|
-
import {
|
|
24
|
+
import { b as useCreateTemplate, c as useUpdateTemplate, u as useFetchTemplates, d as useDeleteTemplate } from './useTemplatesApi-DIsX3s8p.js';
|
|
25
25
|
import Pane from '@bigbinary/neetoui/Pane';
|
|
26
26
|
import Typography from '@bigbinary/neetoui/Typography';
|
|
27
27
|
import ActionBlock from '@bigbinary/neetoui/formik/ActionBlock';
|
package/dist/Form.js
CHANGED
|
@@ -14,8 +14,8 @@ import { isEmpty } from 'ramda';
|
|
|
14
14
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
15
15
|
import { useQuery } from '@tanstack/react-query';
|
|
16
16
|
import axios from 'axios';
|
|
17
|
-
import { B as BASE_URL, Q as QUERY_KEYS, A as APPROVAL_REQUEST_FORM_INITIAL_VALUES, R as REQUEST_FORM_VALIDATION_SCHEMA } from './constants-
|
|
18
|
-
import {
|
|
17
|
+
import { B as BASE_URL, Q as QUERY_KEYS, A as APPROVAL_REQUEST_FORM_INITIAL_VALUES, R as REQUEST_FORM_VALIDATION_SCHEMA } from './constants-C7lmQTsP.js';
|
|
18
|
+
import { u as useFetchTemplates, a as useFetchTemplate } from './useTemplatesApi-DIsX3s8p.js';
|
|
19
19
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
20
20
|
import 'i18next';
|
|
21
21
|
import '@bigbinary/neeto-editor/utils';
|
package/dist/Public.js
CHANGED
|
@@ -12,7 +12,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
12
12
|
import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
13
13
|
import { useQuery } from '@tanstack/react-query';
|
|
14
14
|
import axios from 'axios';
|
|
15
|
-
import { B as BASE_URL, Q as QUERY_KEYS,
|
|
15
|
+
import { B as BASE_URL, Q as QUERY_KEYS, S as STATUSES } from './constants-C7lmQTsP.js';
|
|
16
16
|
import { useState, useEffect } from 'react';
|
|
17
17
|
import { useParams } from 'react-router-dom';
|
|
18
18
|
import { useTranslation, Trans } from 'react-i18next';
|
|
@@ -10,8 +10,8 @@ import '@bigbinary/neetoui/Tag';
|
|
|
10
10
|
import '@bigbinary/neetoui/Textarea';
|
|
11
11
|
import '@bigbinary/neetoui/Typography';
|
|
12
12
|
import 'react-i18next';
|
|
13
|
-
export { R as default } from './index-
|
|
14
|
-
import './constants-
|
|
13
|
+
export { R as default } from './index-D5r7D8u_.js';
|
|
14
|
+
import './constants-C7lmQTsP.js';
|
|
15
15
|
import 'react/jsx-runtime';
|
|
16
16
|
import '@tanstack/react-query';
|
|
17
17
|
import '@bigbinary/neeto-commons-frontend/react-utils';
|
package/dist/cjs/Approvals.js
CHANGED
|
@@ -15,15 +15,15 @@ var Table$1 = require('@bigbinary/neetoui/Table');
|
|
|
15
15
|
var NoData = require('@bigbinary/neetoui/NoData');
|
|
16
16
|
var ramda = require('ramda');
|
|
17
17
|
var reactI18next = require('react-i18next');
|
|
18
|
-
var RequestDetailsPane = require('../index-
|
|
18
|
+
var RequestDetailsPane = require('../index-CIHYIzN1.js');
|
|
19
19
|
var DateFormat = require('@bigbinary/neeto-molecules/DateFormat');
|
|
20
20
|
var Tag = require('@bigbinary/neetoui/Tag');
|
|
21
|
-
var constants$1 = require('../constants-
|
|
21
|
+
var constants$1 = require('../constants-CqvZ5vQ3.js');
|
|
22
22
|
var jsxRuntime = require('react/jsx-runtime');
|
|
23
23
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
24
24
|
var PageLoader = require('@bigbinary/neeto-molecules/PageLoader');
|
|
25
25
|
var Alert = require('@bigbinary/neetoui/Alert');
|
|
26
|
-
var useTemplatesApi = require('../useTemplatesApi-
|
|
26
|
+
var useTemplatesApi = require('../useTemplatesApi-Bvvgsvjg.js');
|
|
27
27
|
var Pane = require('@bigbinary/neetoui/Pane');
|
|
28
28
|
var Typography = require('@bigbinary/neetoui/Typography');
|
|
29
29
|
var ActionBlock = require('@bigbinary/neetoui/formik/ActionBlock');
|
|
@@ -49,10 +49,7 @@ require('dayjs/plugin/timezone');
|
|
|
49
49
|
require('dayjs/plugin/utc');
|
|
50
50
|
require('@bigbinary/neeto-commons-frontend/initializers');
|
|
51
51
|
|
|
52
|
-
function
|
|
53
|
-
|
|
54
|
-
function _interopNamespace(e) {
|
|
55
|
-
if (e && e.__esModule) return e;
|
|
52
|
+
function _interopNamespaceDefault(e) {
|
|
56
53
|
var n = Object.create(null);
|
|
57
54
|
if (e) {
|
|
58
55
|
Object.keys(e).forEach(function (k) {
|
|
@@ -65,38 +62,11 @@ function _interopNamespace(e) {
|
|
|
65
62
|
}
|
|
66
63
|
});
|
|
67
64
|
}
|
|
68
|
-
n
|
|
65
|
+
n.default = e;
|
|
69
66
|
return Object.freeze(n);
|
|
70
67
|
}
|
|
71
68
|
|
|
72
|
-
var
|
|
73
|
-
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
74
|
-
var Container__default = /*#__PURE__*/_interopDefaultLegacy(Container);
|
|
75
|
-
var i18next__default = /*#__PURE__*/_interopDefaultLegacy(i18next);
|
|
76
|
-
var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
|
|
77
|
-
var TableWrapper__default = /*#__PURE__*/_interopDefaultLegacy(TableWrapper);
|
|
78
|
-
var Table__default = /*#__PURE__*/_interopDefaultLegacy(Table$1);
|
|
79
|
-
var NoData__default = /*#__PURE__*/_interopDefaultLegacy(NoData);
|
|
80
|
-
var DateFormat__default = /*#__PURE__*/_interopDefaultLegacy(DateFormat);
|
|
81
|
-
var Tag__default = /*#__PURE__*/_interopDefaultLegacy(Tag);
|
|
82
|
-
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
83
|
-
var PageLoader__default = /*#__PURE__*/_interopDefaultLegacy(PageLoader);
|
|
84
|
-
var Alert__default = /*#__PURE__*/_interopDefaultLegacy(Alert);
|
|
85
|
-
var Pane__default = /*#__PURE__*/_interopDefaultLegacy(Pane);
|
|
86
|
-
var Typography__default = /*#__PURE__*/_interopDefaultLegacy(Typography);
|
|
87
|
-
var ActionBlock__default = /*#__PURE__*/_interopDefaultLegacy(ActionBlock);
|
|
88
|
-
var FormikForm__default = /*#__PURE__*/_interopDefaultLegacy(FormikForm);
|
|
89
|
-
var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
|
|
90
|
-
var ToggleFeatureCard__default = /*#__PURE__*/_interopDefaultLegacy(ToggleFeatureCard);
|
|
91
|
-
var Input__default = /*#__PURE__*/_interopDefaultLegacy(Input);
|
|
92
|
-
var Textarea__default = /*#__PURE__*/_interopDefaultLegacy(Textarea);
|
|
93
|
-
var FormikEditor__default = /*#__PURE__*/_interopDefaultLegacy(FormikEditor);
|
|
94
|
-
var EditorContent__default = /*#__PURE__*/_interopDefaultLegacy(EditorContent);
|
|
95
|
-
var Label__default = /*#__PURE__*/_interopDefaultLegacy(Label);
|
|
96
|
-
var MoreDropdown__default = /*#__PURE__*/_interopDefaultLegacy(MoreDropdown);
|
|
97
|
-
var NeetoHeader__default = /*#__PURE__*/_interopDefaultLegacy(NeetoHeader);
|
|
98
|
-
var NeetoUITab__default = /*#__PURE__*/_interopDefaultLegacy(NeetoUITab);
|
|
99
|
-
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
|
69
|
+
var yup__namespace = /*#__PURE__*/_interopNamespaceDefault(yup);
|
|
100
70
|
|
|
101
71
|
var routes = {
|
|
102
72
|
home: "/",
|
|
@@ -122,7 +92,7 @@ var usePaginate = function usePaginate() {
|
|
|
122
92
|
page: constants.DEFAULT_PAGE_INDEX,
|
|
123
93
|
pageSize: constants.DEFAULT_PAGE_SIZE
|
|
124
94
|
}),
|
|
125
|
-
_useState2 =
|
|
95
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
126
96
|
pageProperties = _useState2[0],
|
|
127
97
|
setPageProperties = _useState2[1];
|
|
128
98
|
var resetPageProperties = function resetPageProperties() {
|
|
@@ -153,7 +123,7 @@ var HISTORY_TABLE_COLUMNS = [{
|
|
|
153
123
|
render: function render(approvalLabel, _ref) {
|
|
154
124
|
var requestableUrl = _ref.requestableUrl;
|
|
155
125
|
var url = new URL(requestableUrl || window.location.origin);
|
|
156
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
126
|
+
return /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
157
127
|
label: approvalLabel,
|
|
158
128
|
style: "link",
|
|
159
129
|
to: url.pathname
|
|
@@ -172,7 +142,7 @@ var HISTORY_TABLE_COLUMNS = [{
|
|
|
172
142
|
width: 200,
|
|
173
143
|
title: i18next.t("neetoApprovals.common.status"),
|
|
174
144
|
render: function render(status) {
|
|
175
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
145
|
+
return /*#__PURE__*/jsxRuntime.jsx(Tag, {
|
|
176
146
|
label: neetoCist.capitalize(status),
|
|
177
147
|
style: constants$1.STATUS_TAG_STYLE[status]
|
|
178
148
|
});
|
|
@@ -184,7 +154,7 @@ var HISTORY_TABLE_COLUMNS = [{
|
|
|
184
154
|
width: 200,
|
|
185
155
|
title: i18next.t("neetoApprovals.common.created"),
|
|
186
156
|
render: function render(createdAt) {
|
|
187
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
157
|
+
return /*#__PURE__*/jsxRuntime.jsx(DateFormat.FromNow, {
|
|
188
158
|
date: createdAt,
|
|
189
159
|
typographyProps: {
|
|
190
160
|
style: "body2"
|
|
@@ -194,12 +164,12 @@ var HISTORY_TABLE_COLUMNS = [{
|
|
|
194
164
|
}];
|
|
195
165
|
|
|
196
166
|
function ownKeys$7(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; }
|
|
197
|
-
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) {
|
|
167
|
+
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
198
168
|
var History = function History(_ref) {
|
|
199
169
|
var helpDocUrl = _ref.helpDocUrl,
|
|
200
170
|
requestUrl = _ref.requestUrl;
|
|
201
171
|
var _useState = react.useState(constants$1.DEFAULT_FILTER_VALUES),
|
|
202
|
-
_useState2 =
|
|
172
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
203
173
|
filters = _useState2[0],
|
|
204
174
|
setFilters = _useState2[1];
|
|
205
175
|
var debouncedSearchTerm = reactUtils.useDebounce(filters.searchTerm, constants$1.SEARCH_DELAY);
|
|
@@ -207,7 +177,7 @@ var History = function History(_ref) {
|
|
|
207
177
|
pageProperties = _usePaginate.pageProperties,
|
|
208
178
|
handlePageChange = _usePaginate.handlePageChange;
|
|
209
179
|
var _useState3 = react.useState({}),
|
|
210
|
-
_useState4 =
|
|
180
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
211
181
|
approvalDetails = _useState4[0],
|
|
212
182
|
setApprovalDetails = _useState4[1];
|
|
213
183
|
var _useTranslation = reactI18next.useTranslation(),
|
|
@@ -242,10 +212,10 @@ var History = function History(_ref) {
|
|
|
242
212
|
}));
|
|
243
213
|
};
|
|
244
214
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
245
|
-
children: [!ramda.isEmpty(approvalHistories) ? /*#__PURE__*/jsxRuntime.jsx(
|
|
215
|
+
children: [!ramda.isEmpty(approvalHistories) ? /*#__PURE__*/jsxRuntime.jsx(TableWrapper, {
|
|
246
216
|
className: "mt-6",
|
|
247
217
|
hasPagination: totalCount > pageProperties.pageSize,
|
|
248
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
218
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Table$1, {
|
|
249
219
|
handlePageChange: handlePageChange,
|
|
250
220
|
totalCount: totalCount,
|
|
251
221
|
allowRowClick: true,
|
|
@@ -264,7 +234,7 @@ var History = function History(_ref) {
|
|
|
264
234
|
})
|
|
265
235
|
}) : /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
266
236
|
className: "flex h-full w-full flex-grow items-center justify-center",
|
|
267
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
237
|
+
children: /*#__PURE__*/jsxRuntime.jsx(NoData, {
|
|
268
238
|
helpText: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
|
|
269
239
|
i18nKey: "neetoApprovals.common.noDataHelpTextLearnMore",
|
|
270
240
|
style: "link",
|
|
@@ -272,7 +242,7 @@ var History = function History(_ref) {
|
|
|
272
242
|
entity: t("neetoApprovals.common.history")
|
|
273
243
|
},
|
|
274
244
|
components: {
|
|
275
|
-
a: /*#__PURE__*/jsxRuntime.jsx(
|
|
245
|
+
a: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
276
246
|
style: "link",
|
|
277
247
|
target: "_blank",
|
|
278
248
|
to: {
|
|
@@ -300,16 +270,16 @@ var PENDING_TABLE_COLUMNS = neetoCist.removeBy({
|
|
|
300
270
|
}, HISTORY_TABLE_COLUMNS);
|
|
301
271
|
|
|
302
272
|
function ownKeys$6(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; }
|
|
303
|
-
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), !0).forEach(function (r) {
|
|
273
|
+
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
304
274
|
var PendingRequests = function PendingRequests(_ref) {
|
|
305
275
|
var helpDocUrl = _ref.helpDocUrl,
|
|
306
276
|
requestUrl = _ref.requestUrl;
|
|
307
277
|
var _useState = react.useState(constants$1.DEFAULT_FILTER_VALUES),
|
|
308
|
-
_useState2 =
|
|
278
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
309
279
|
filters = _useState2[0],
|
|
310
280
|
setFilters = _useState2[1];
|
|
311
281
|
var _useState3 = react.useState({}),
|
|
312
|
-
_useState4 =
|
|
282
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
313
283
|
approvalDetails = _useState4[0],
|
|
314
284
|
setApprovalDetails = _useState4[1];
|
|
315
285
|
var debouncedSearchTerm = reactUtils.useDebounce(filters.searchTerm, constants$1.SEARCH_DELAY);
|
|
@@ -342,10 +312,10 @@ var PendingRequests = function PendingRequests(_ref) {
|
|
|
342
312
|
}));
|
|
343
313
|
};
|
|
344
314
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
345
|
-
children: [!ramda.isEmpty(pendingRequests) ? /*#__PURE__*/jsxRuntime.jsx(
|
|
315
|
+
children: [!ramda.isEmpty(pendingRequests) ? /*#__PURE__*/jsxRuntime.jsx(TableWrapper, {
|
|
346
316
|
className: "mt-6",
|
|
347
317
|
hasPagination: totalCount > pageProperties.pageSize,
|
|
348
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
318
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Table$1, {
|
|
349
319
|
handlePageChange: handlePageChange,
|
|
350
320
|
totalCount: totalCount,
|
|
351
321
|
allowRowClick: true,
|
|
@@ -364,12 +334,12 @@ var PendingRequests = function PendingRequests(_ref) {
|
|
|
364
334
|
})
|
|
365
335
|
}) : /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
366
336
|
className: "flex h-full w-full flex-grow items-center justify-center",
|
|
367
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
337
|
+
children: /*#__PURE__*/jsxRuntime.jsx(NoData, {
|
|
368
338
|
helpText: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
|
|
369
339
|
i18nKey: "neetoApprovals.common.noDataHelpTextLearnMore",
|
|
370
340
|
style: "link",
|
|
371
341
|
components: {
|
|
372
|
-
a: /*#__PURE__*/jsxRuntime.jsx(
|
|
342
|
+
a: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
373
343
|
style: "link",
|
|
374
344
|
target: "_blank",
|
|
375
345
|
to: {
|
|
@@ -418,7 +388,7 @@ var MessageEditor = reactUtils.withT(function (_ref) {
|
|
|
418
388
|
placeholders = _ref$placeholders === void 0 ? [] : _ref$placeholders,
|
|
419
389
|
_ref$initialValue = _ref.initialValue,
|
|
420
390
|
initialValue = _ref$initialValue === void 0 ? "" : _ref$initialValue;
|
|
421
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
391
|
+
return /*#__PURE__*/jsxRuntime.jsx(FormikEditor, {
|
|
422
392
|
initialValue: initialValue,
|
|
423
393
|
required: true,
|
|
424
394
|
label: t("neetoApprovals.inputs.labels.message"),
|
|
@@ -448,13 +418,13 @@ var TemplateForm = function TemplateForm(_ref) {
|
|
|
448
418
|
};
|
|
449
419
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
450
420
|
className: "flex w-full flex-col space-y-6",
|
|
451
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
421
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
452
422
|
autoFocus: true,
|
|
453
423
|
required: true,
|
|
454
424
|
label: t("neetoApprovals.common.name"),
|
|
455
425
|
name: "name",
|
|
456
426
|
placeholder: t("neetoApprovals.inputs.placeholders.name")
|
|
457
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
427
|
+
}), /*#__PURE__*/jsxRuntime.jsx(ToggleFeatureCard, {
|
|
458
428
|
switchName: "descriptionEnabled",
|
|
459
429
|
title: t("neetoApprovals.inputs.labels.description"),
|
|
460
430
|
switchProps: {
|
|
@@ -464,7 +434,7 @@ var TemplateForm = function TemplateForm(_ref) {
|
|
|
464
434
|
disabledSwitchText: t("neetoApprovals.templates.descriptionToggle.disable")
|
|
465
435
|
}
|
|
466
436
|
},
|
|
467
|
-
children: values.descriptionEnabled && /*#__PURE__*/jsxRuntime.jsx(
|
|
437
|
+
children: values.descriptionEnabled && /*#__PURE__*/jsxRuntime.jsx(Textarea, {
|
|
468
438
|
className: "w-full",
|
|
469
439
|
name: "description",
|
|
470
440
|
placeholder: t("neetoApprovals.inputs.placeholders.description")
|
|
@@ -494,30 +464,30 @@ var Form = function Form(_ref) {
|
|
|
494
464
|
}) : t("neetoApprovals.common.edit_", {
|
|
495
465
|
what: t("neetoApprovals.common.template", constants.SINGULAR)
|
|
496
466
|
});
|
|
497
|
-
return /*#__PURE__*/jsxRuntime.jsxs(
|
|
467
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Pane, {
|
|
498
468
|
isOpen: isOpen,
|
|
499
469
|
onClose: onClose,
|
|
500
470
|
initialFocusRef: inputReference,
|
|
501
471
|
size: "large",
|
|
502
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
503
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
472
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Pane.Header, {
|
|
473
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
504
474
|
style: "h2",
|
|
505
475
|
children: header
|
|
506
476
|
})
|
|
507
|
-
}), /*#__PURE__*/jsxRuntime.jsxs(
|
|
477
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(FormikForm, {
|
|
508
478
|
formikProps: {
|
|
509
479
|
enableReinitialize: true,
|
|
510
480
|
initialValues: neetoCist.isPresent(initialData) ? initialData : TEMPLATE_FORM_INITIAL_VALUES,
|
|
511
481
|
validationSchema: TEMPLATE_FORM_VALIDATION_SCHEMA,
|
|
512
482
|
onSubmit: onSubmit
|
|
513
483
|
},
|
|
514
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
484
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Pane.Body, {
|
|
515
485
|
children: /*#__PURE__*/jsxRuntime.jsx(TemplateForm, {
|
|
516
486
|
initialData: initialData,
|
|
517
487
|
placeholders: placeholders
|
|
518
488
|
})
|
|
519
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
520
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
489
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Pane.Footer, {
|
|
490
|
+
children: /*#__PURE__*/jsxRuntime.jsx(ActionBlock, {
|
|
521
491
|
isSubmitting: isLoading,
|
|
522
492
|
cancelButtonProps: {
|
|
523
493
|
"data-cy": "neeto-approvals-templates-close-template-form-btn",
|
|
@@ -561,7 +531,7 @@ var Create = function Create(_ref) {
|
|
|
561
531
|
};
|
|
562
532
|
|
|
563
533
|
function ownKeys$5(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; }
|
|
564
|
-
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) {
|
|
534
|
+
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
565
535
|
var Edit = function Edit(_ref) {
|
|
566
536
|
var templateUrl = _ref.templateUrl,
|
|
567
537
|
template = _ref.template,
|
|
@@ -604,10 +574,10 @@ var Field = function Field(_ref) {
|
|
|
604
574
|
value = _ref.value;
|
|
605
575
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
606
576
|
className: "flex flex-col items-start justify-center",
|
|
607
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
577
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Label, {
|
|
608
578
|
className: "mb-1 font-normal",
|
|
609
579
|
children: label
|
|
610
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
580
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
611
581
|
style: "body1",
|
|
612
582
|
weight: "medium",
|
|
613
583
|
children: value
|
|
@@ -616,7 +586,7 @@ var Field = function Field(_ref) {
|
|
|
616
586
|
};
|
|
617
587
|
var Field$1 = /*#__PURE__*/react.memo(Field);
|
|
618
588
|
|
|
619
|
-
var MemoizedEditorContent = /*#__PURE__*/react.memo(
|
|
589
|
+
var MemoizedEditorContent = /*#__PURE__*/react.memo(EditorContent);
|
|
620
590
|
var TemplateDetails = function TemplateDetails(_ref) {
|
|
621
591
|
var isOpen = _ref.isOpen,
|
|
622
592
|
onClose = _ref.onClose,
|
|
@@ -626,16 +596,16 @@ var TemplateDetails = function TemplateDetails(_ref) {
|
|
|
626
596
|
var name = template.name,
|
|
627
597
|
description = template.description,
|
|
628
598
|
message = template.message;
|
|
629
|
-
return /*#__PURE__*/jsxRuntime.jsxs(
|
|
599
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Pane, {
|
|
630
600
|
isOpen: isOpen,
|
|
631
601
|
onClose: onClose,
|
|
632
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
602
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Pane.Header, {
|
|
633
603
|
className: "space-y-2",
|
|
634
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
604
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
635
605
|
style: "h2",
|
|
636
606
|
children: t("neetoApprovals.common.templateDetails")
|
|
637
607
|
})
|
|
638
|
-
}), /*#__PURE__*/jsxRuntime.jsxs(
|
|
608
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(Pane.Body, {
|
|
639
609
|
className: "space-y-6",
|
|
640
610
|
children: [/*#__PURE__*/jsxRuntime.jsx(Field$1, {
|
|
641
611
|
label: t("neetoApprovals.common.name"),
|
|
@@ -645,7 +615,7 @@ var TemplateDetails = function TemplateDetails(_ref) {
|
|
|
645
615
|
value: description
|
|
646
616
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
647
617
|
className: "flex w-full flex-col space-y-4",
|
|
648
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
618
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Label, {
|
|
649
619
|
className: "mb-1 font-normal",
|
|
650
620
|
children: t("neetoApprovals.inputs.labels.message")
|
|
651
621
|
}), /*#__PURE__*/jsxRuntime.jsx(MemoizedEditorContent, {
|
|
@@ -667,7 +637,7 @@ var renderNoDataHelpText = function renderNoDataHelpText(_ref) {
|
|
|
667
637
|
entity: entity.toLocaleLowerCase()
|
|
668
638
|
},
|
|
669
639
|
components: {
|
|
670
|
-
a: /*#__PURE__*/jsxRuntime.jsx(
|
|
640
|
+
a: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
671
641
|
style: "link",
|
|
672
642
|
target: "_blank",
|
|
673
643
|
to: {
|
|
@@ -680,7 +650,7 @@ var renderNoDataHelpText = function renderNoDataHelpText(_ref) {
|
|
|
680
650
|
|
|
681
651
|
var _excluded$1 = ["entity", "columnData", "rowData", "totalCount", "filters", "setFilters", "setIsPaneOpen", "helpDocUrl", "onEditClick", "onDeleteClick", "pageProperties"];
|
|
682
652
|
function ownKeys$4(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; }
|
|
683
|
-
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) {
|
|
653
|
+
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
684
654
|
var Table = function Table(_ref) {
|
|
685
655
|
var entity = _ref.entity,
|
|
686
656
|
columnData = _ref.columnData,
|
|
@@ -693,7 +663,7 @@ var Table = function Table(_ref) {
|
|
|
693
663
|
onEditClick = _ref.onEditClick,
|
|
694
664
|
onDeleteClick = _ref.onDeleteClick,
|
|
695
665
|
pageProperties = _ref.pageProperties,
|
|
696
|
-
otherProps =
|
|
666
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$1);
|
|
697
667
|
var _useTranslation = reactI18next.useTranslation(),
|
|
698
668
|
t = _useTranslation.t;
|
|
699
669
|
var columns = columnData({
|
|
@@ -723,17 +693,17 @@ var Table = function Table(_ref) {
|
|
|
723
693
|
if (ramda.isEmpty(rowData)) {
|
|
724
694
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
725
695
|
className: "flex h-full w-full flex-grow items-center justify-center",
|
|
726
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
696
|
+
children: /*#__PURE__*/jsxRuntime.jsx(NoData, _objectSpread$4({
|
|
727
697
|
title: t("neetoApprovals.common.notFound_", {
|
|
728
698
|
what: entity
|
|
729
699
|
})
|
|
730
700
|
}, !filters.searchTerm && noDataProps))
|
|
731
701
|
});
|
|
732
702
|
}
|
|
733
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
703
|
+
return /*#__PURE__*/jsxRuntime.jsx(TableWrapper, {
|
|
734
704
|
className: "mt-6",
|
|
735
705
|
hasPagination: totalCount > pageProperties.pageSize,
|
|
736
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
706
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Table$1, _objectSpread$4({
|
|
737
707
|
fixedHeight: true,
|
|
738
708
|
columnData: columns,
|
|
739
709
|
currentPageNumber: pageProperties.page,
|
|
@@ -760,31 +730,31 @@ var columnData = function columnData(_ref) {
|
|
|
760
730
|
dataIndex: "name",
|
|
761
731
|
key: "name",
|
|
762
732
|
sorter: true,
|
|
763
|
-
title:
|
|
733
|
+
title: i18next.t("neetoApprovals.common.name"),
|
|
764
734
|
ellipsis: true,
|
|
765
735
|
render: function render(_, template) {
|
|
766
736
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
767
737
|
className: "flex items-center justify-between gap-x-3",
|
|
768
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
738
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
769
739
|
className: "truncate",
|
|
770
740
|
style: "body2",
|
|
771
741
|
children: template.name
|
|
772
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
742
|
+
}), /*#__PURE__*/jsxRuntime.jsx(MoreDropdown, {
|
|
773
743
|
dropdownProps: {
|
|
774
744
|
strategy: "fixed",
|
|
775
745
|
onClick: function onClick(e) {
|
|
776
746
|
return e.stopPropagation();
|
|
777
747
|
}
|
|
778
748
|
},
|
|
779
|
-
menuItems: [
|
|
749
|
+
menuItems: [_defineProperty({
|
|
780
750
|
key: "edit",
|
|
781
|
-
label:
|
|
751
|
+
label: i18next.t("neetoApprovals.common.edit"),
|
|
782
752
|
onClick: function onClick(event) {
|
|
783
753
|
return onEditClick(event, template);
|
|
784
754
|
}
|
|
785
|
-
}, constants$1.DATA_CY_KEY, "neeto-approvals-templates-edit-template-btn"),
|
|
755
|
+
}, constants$1.DATA_CY_KEY, "neeto-approvals-templates-edit-template-btn"), _defineProperty({
|
|
786
756
|
key: "delete",
|
|
787
|
-
label:
|
|
757
|
+
label: i18next.t("neetoApprovals.common.delete"),
|
|
788
758
|
onClick: function onClick(event) {
|
|
789
759
|
return onDeleteClick(event, template);
|
|
790
760
|
}
|
|
@@ -795,37 +765,37 @@ var columnData = function columnData(_ref) {
|
|
|
795
765
|
}, {
|
|
796
766
|
dataIndex: "description",
|
|
797
767
|
key: "description",
|
|
798
|
-
title:
|
|
768
|
+
title: i18next.t("neetoApprovals.inputs.labels.description")
|
|
799
769
|
}];
|
|
800
770
|
};
|
|
801
771
|
|
|
802
772
|
var _excluded = ["searchTerm", "isNewTemplatePaneOpen", "setIsNewTemplatePaneOpen", "helpDocUrl"];
|
|
803
773
|
function ownKeys$3(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; }
|
|
804
|
-
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) {
|
|
774
|
+
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
805
775
|
var Templates = function Templates(_ref) {
|
|
806
776
|
var searchTerm = _ref.searchTerm,
|
|
807
777
|
isNewTemplatePaneOpen = _ref.isNewTemplatePaneOpen,
|
|
808
778
|
setIsNewTemplatePaneOpen = _ref.setIsNewTemplatePaneOpen,
|
|
809
779
|
helpDocUrl = _ref.helpDocUrl,
|
|
810
|
-
otherProps =
|
|
780
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
811
781
|
var _useState = react.useState(constants$1.DEFAULT_FILTER_VALUES),
|
|
812
|
-
_useState2 =
|
|
782
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
813
783
|
filters = _useState2[0],
|
|
814
784
|
setFilters = _useState2[1];
|
|
815
785
|
var _useState3 = react.useState({}),
|
|
816
|
-
_useState4 =
|
|
786
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
817
787
|
selectedTemplate = _useState4[0],
|
|
818
788
|
setSelectedTemplate = _useState4[1];
|
|
819
789
|
var _useState5 = react.useState(false),
|
|
820
|
-
_useState6 =
|
|
790
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
821
791
|
isDeleteAlertOpen = _useState6[0],
|
|
822
792
|
setIsDeleteAlertOpen = _useState6[1];
|
|
823
793
|
var _useState7 = react.useState(false),
|
|
824
|
-
_useState8 =
|
|
794
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
825
795
|
isEditPaneOpen = _useState8[0],
|
|
826
796
|
setIsEditPaneOpen = _useState8[1];
|
|
827
797
|
var _useState9 = react.useState(false),
|
|
828
|
-
_useState10 =
|
|
798
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
829
799
|
isShowPaneOpen = _useState10[0],
|
|
830
800
|
setIsShowPaneOpen = _useState10[1];
|
|
831
801
|
var _usePaginate = usePaginate(),
|
|
@@ -884,7 +854,7 @@ var Templates = function Templates(_ref) {
|
|
|
884
854
|
};
|
|
885
855
|
var entity = t("neetoApprovals.common.template", constants.PLURAL);
|
|
886
856
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
887
|
-
children: [isTemplateLoading ? /*#__PURE__*/jsxRuntime.jsx(
|
|
857
|
+
children: [isTemplateLoading ? /*#__PURE__*/jsxRuntime.jsx(PageLoader, {}) : /*#__PURE__*/jsxRuntime.jsx(Table, {
|
|
888
858
|
columnData: columnData,
|
|
889
859
|
entity: entity,
|
|
890
860
|
filters: filters,
|
|
@@ -912,7 +882,7 @@ var Templates = function Templates(_ref) {
|
|
|
912
882
|
onClose: function onClose() {
|
|
913
883
|
return setIsEditPaneOpen(false);
|
|
914
884
|
}
|
|
915
|
-
})), /*#__PURE__*/jsxRuntime.jsx(
|
|
885
|
+
})), /*#__PURE__*/jsxRuntime.jsx(Alert, {
|
|
916
886
|
isOpen: isDeleteAlertOpen,
|
|
917
887
|
isSubmitting: isDeleting,
|
|
918
888
|
submitButtonLabel: t("neetoApprovals.buttons.delete"),
|
|
@@ -943,7 +913,7 @@ var Templates = function Templates(_ref) {
|
|
|
943
913
|
};
|
|
944
914
|
|
|
945
915
|
function ownKeys$2(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; }
|
|
946
|
-
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) {
|
|
916
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
947
917
|
var createRoutes = function createRoutes(_ref) {
|
|
948
918
|
var config = _ref.config,
|
|
949
919
|
isNewTemplatePaneOpen = _ref.isNewTemplatePaneOpen,
|
|
@@ -959,7 +929,7 @@ var createRoutes = function createRoutes(_ref) {
|
|
|
959
929
|
},
|
|
960
930
|
path: "".concat(config.approvalsPath).concat(routes.templates.index),
|
|
961
931
|
actionBlock: function actionBlock() {
|
|
962
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
932
|
+
return /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
963
933
|
"data-cy": "neeto-approvals-templates-add-new-button",
|
|
964
934
|
label: i18next.t("neetoApprovals.common.addNew_", {
|
|
965
935
|
what: i18next.t("neetoApprovals.common.template", constants.SINGULAR)
|
|
@@ -997,7 +967,7 @@ var Header = function Header(_ref) {
|
|
|
997
967
|
var currentTab = neetoCist.findBy({
|
|
998
968
|
path: pathname
|
|
999
969
|
}, appRoutes);
|
|
1000
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
970
|
+
return /*#__PURE__*/jsxRuntime.jsx(NeetoHeader, {
|
|
1001
971
|
breadcrumbs: breadcrumbs,
|
|
1002
972
|
titleHelpPopoverProps: titleHelpPopoverProps,
|
|
1003
973
|
actionBlock: currentTab === null || currentTab === void 0 ? void 0 : (_currentTab$actionBlo = currentTab.actionBlock) === null || _currentTab$actionBlo === void 0 ? void 0 : _currentTab$actionBlo.call(currentTab),
|
|
@@ -1009,14 +979,14 @@ var Header = function Header(_ref) {
|
|
|
1009
979
|
};
|
|
1010
980
|
|
|
1011
981
|
var fetch = function fetch() {
|
|
1012
|
-
return
|
|
982
|
+
return axios.get("".concat(constants$1.BASE_URL, "/views"));
|
|
1013
983
|
};
|
|
1014
984
|
var viewsApi = {
|
|
1015
985
|
fetch: fetch
|
|
1016
986
|
};
|
|
1017
987
|
|
|
1018
988
|
function ownKeys$1(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; }
|
|
1019
|
-
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) {
|
|
989
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1020
990
|
var useFetchViews = function useFetchViews() {
|
|
1021
991
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1022
992
|
return reactQuery.useQuery(_objectSpread$1({
|
|
@@ -1048,9 +1018,9 @@ var Tab = function Tab(_ref) {
|
|
|
1048
1018
|
_useFetchViews$data2 = _useFetchViews$data === void 0 ? {} : _useFetchViews$data,
|
|
1049
1019
|
_useFetchViews$data2$ = _useFetchViews$data2.views,
|
|
1050
1020
|
views = _useFetchViews$data2$ === void 0 ? {} : _useFetchViews$data2$;
|
|
1051
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
1021
|
+
return /*#__PURE__*/jsxRuntime.jsx(NeetoUITab, {
|
|
1052
1022
|
children: approvalFilterKeys.map(function (filter) {
|
|
1053
|
-
return /*#__PURE__*/jsxRuntime.jsxs(
|
|
1023
|
+
return /*#__PURE__*/jsxRuntime.jsxs(NeetoUITab.Item, {
|
|
1054
1024
|
active: isActive(filter),
|
|
1055
1025
|
count: views[filter === null || filter === void 0 ? void 0 : filter.toLocaleLowerCase()],
|
|
1056
1026
|
label: approvalFilter[filter].label,
|
|
@@ -1064,14 +1034,14 @@ var Tab = function Tab(_ref) {
|
|
|
1064
1034
|
};
|
|
1065
1035
|
|
|
1066
1036
|
function ownKeys(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; }
|
|
1067
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
1037
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1068
1038
|
var Approvals = function Approvals(_ref) {
|
|
1069
1039
|
var config = _ref.config;
|
|
1070
1040
|
var _useQueryParams = reactUtils.useQueryParams(),
|
|
1071
1041
|
_useQueryParams$searc = _useQueryParams.searchTerm,
|
|
1072
1042
|
searchTerm = _useQueryParams$searc === void 0 ? "" : _useQueryParams$searc;
|
|
1073
1043
|
var _useState = react.useState(false),
|
|
1074
|
-
_useState2 =
|
|
1044
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1075
1045
|
isNewTemplatePaneOpen = _useState2[0],
|
|
1076
1046
|
setIsNewTemplatePaneOpen = _useState2[1];
|
|
1077
1047
|
var appRoutes = createRoutes({
|
|
@@ -1082,7 +1052,7 @@ var Approvals = function Approvals(_ref) {
|
|
|
1082
1052
|
});
|
|
1083
1053
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1084
1054
|
className: "w-full overflow-y-auto",
|
|
1085
|
-
children: /*#__PURE__*/jsxRuntime.jsxs(
|
|
1055
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(Container, {
|
|
1086
1056
|
children: [/*#__PURE__*/jsxRuntime.jsx(Header, _objectSpread({}, _objectSpread({
|
|
1087
1057
|
appRoutes: appRoutes
|
|
1088
1058
|
}, config))), /*#__PURE__*/jsxRuntime.jsx(Tab, {
|