@bigbinary/neeto-approvals-frontend 0.3.9 → 0.3.11
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 +116 -131
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +43 -77
- package/dist/index.js.map +1 -1
- package/package.json +16 -13
package/dist/index.js
CHANGED
|
@@ -4,24 +4,41 @@ import Container from '@bigbinary/neeto-molecules/Container';
|
|
|
4
4
|
import { Link, 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
|
-
import
|
|
7
|
+
import Button from '@bigbinary/neetoui/Button';
|
|
8
8
|
import { isEmpty, keys } from 'ramda';
|
|
9
9
|
import { capitalize, isPresent, findBy, camelToSnakeCase, removeBy, noop } from '@bigbinary/neeto-cist';
|
|
10
10
|
import TableWrapper from '@bigbinary/neeto-molecules/TableWrapper';
|
|
11
|
+
import Table$1 from '@bigbinary/neetoui/Table';
|
|
12
|
+
import NoData from '@bigbinary/neetoui/NoData';
|
|
11
13
|
import { useTranslation, Trans } from 'react-i18next';
|
|
12
14
|
import { useQuery, useQueryClient } from 'react-query';
|
|
13
15
|
import axios from 'axios';
|
|
16
|
+
import Tag from '@bigbinary/neetoui/Tag';
|
|
14
17
|
import DateFormat from '@bigbinary/neeto-molecules/DateFormat';
|
|
15
18
|
import { isEditorEmpty, EditorContent, FormikEditor } from '@bigbinary/neeto-editor';
|
|
16
19
|
import * as yup from 'yup';
|
|
17
20
|
import { dateFormat, withEventTargetValue } from '@bigbinary/neeto-commons-frontend/utils';
|
|
21
|
+
import Label from '@bigbinary/neetoui/Label';
|
|
22
|
+
import Pane from '@bigbinary/neetoui/Pane';
|
|
23
|
+
import Textarea from '@bigbinary/neetoui/Textarea';
|
|
24
|
+
import Typography from '@bigbinary/neetoui/Typography';
|
|
25
|
+
import dayjs from 'dayjs';
|
|
26
|
+
import timezone from 'dayjs/plugin/timezone';
|
|
27
|
+
import utc from 'dayjs/plugin/utc';
|
|
18
28
|
import { globalProps } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
19
29
|
import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
|
|
20
|
-
import
|
|
30
|
+
import Alert from '@bigbinary/neetoui/Alert';
|
|
31
|
+
import ActionBlock from '@bigbinary/neetoui/formik/ActionBlock';
|
|
32
|
+
import FormikForm from '@bigbinary/neetoui/formik/Form';
|
|
21
33
|
import { useFormikContext } from 'formik';
|
|
22
34
|
import ToggleFeatureCard from '@bigbinary/neeto-molecules/ToggleFeatureCard';
|
|
35
|
+
import Input from '@bigbinary/neetoui/formik/Input';
|
|
36
|
+
import Textarea$1 from '@bigbinary/neetoui/formik/Textarea';
|
|
23
37
|
import MoreDropdown from '@bigbinary/neeto-molecules/MoreDropdown';
|
|
24
38
|
import NeetoHeader from '@bigbinary/neeto-molecules/Header';
|
|
39
|
+
import NeetoUITab from '@bigbinary/neetoui/Tab';
|
|
40
|
+
import Select from '@bigbinary/neetoui/Select';
|
|
41
|
+
import Callout from '@bigbinary/neetoui/Callout';
|
|
25
42
|
|
|
26
43
|
function _typeof(o) {
|
|
27
44
|
"@babel/helpers - typeof";
|
|
@@ -351,45 +368,6 @@ var Footer = function Footer(_ref) {
|
|
|
351
368
|
}));
|
|
352
369
|
};
|
|
353
370
|
|
|
354
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
355
|
-
|
|
356
|
-
function getDefaultExportFromCjs (x) {
|
|
357
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
var dayjs_min = {exports: {}};
|
|
361
|
-
|
|
362
|
-
dayjs_min.exports;
|
|
363
|
-
|
|
364
|
-
(function (module, exports) {
|
|
365
|
-
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return b.s(e.$y,4,"0");case"M":return a+1;case"MM":return b.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return b.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return b.s(u,2,"0");case"s":return String(e.$s);case"ss":return b.s(e.$s,2,"0");case"SSS":return b.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
|
|
366
|
-
} (dayjs_min, dayjs_min.exports));
|
|
367
|
-
|
|
368
|
-
var dayjs_minExports = dayjs_min.exports;
|
|
369
|
-
var dayjs = /*@__PURE__*/getDefaultExportFromCjs(dayjs_minExports);
|
|
370
|
-
|
|
371
|
-
var timezone$1 = {exports: {}};
|
|
372
|
-
|
|
373
|
-
timezone$1.exports;
|
|
374
|
-
|
|
375
|
-
(function (module, exports) {
|
|
376
|
-
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t={year:0,month:1,day:2,hour:3,minute:4,second:5},e={};return function(n,i,o){var r,a=function(t,n,i){void 0===i&&(i={});var o=new Date(t),r=function(t,n){void 0===n&&(n={});var i=n.timeZoneName||"short",o=t+"|"+i,r=e[o];return r||(r=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:i}),e[o]=r),r}(n,i);return r.formatToParts(o)},u=function(e,n){for(var i=a(e,n),r=[],u=0;u<i.length;u+=1){var f=i[u],s=f.type,m=f.value,c=t[s];c>=0&&(r[c]=parseInt(m,10));}var d=r[3],l=24===d?0:d,h=r[0]+"-"+r[1]+"-"+r[2]+" "+l+":"+r[4]+":"+r[5]+":000",v=+e;return (o.utc(h).valueOf()-(v-=v%1e3))/6e4},f=i.prototype;f.tz=function(t,e){void 0===t&&(t=r);var n=this.utcOffset(),i=this.toDate(),a=i.toLocaleString("en-US",{timeZone:t}),u=Math.round((i-new Date(a))/1e3/60),f=o(a,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(15*-Math.round(i.getTimezoneOffset()/15)-u,!0);if(e){var s=f.utcOffset();f=f.add(n-s,"minute");}return f.$x.$timezone=t,f},f.offsetName=function(t){var e=this.$x.$timezone||o.tz.guess(),n=a(this.valueOf(),e,{timeZoneName:t}).find((function(t){return "timezonename"===t.type.toLowerCase()}));return n&&n.value};var s=f.startOf;f.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return s.call(this,t,e);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return s.call(n,t,e).tz(this.$x.$timezone,!0)},o.tz=function(t,e,n){var i=n&&e,a=n||e||r,f=u(+o(),a);if("string"!=typeof t)return o(t).tz(a);var s=function(t,e,n){var i=t-60*e*1e3,o=u(i,n);if(e===o)return [i,e];var r=u(i-=60*(o-e)*1e3,n);return o===r?[i,o]:[t-60*Math.min(o,r)*1e3,Math.max(o,r)]}(o.utc(t,i).valueOf(),f,a),m=s[0],c=s[1],d=o(m).utcOffset(c);return d.$x.$timezone=a,d},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(t){r=t;};}}));
|
|
377
|
-
} (timezone$1, timezone$1.exports));
|
|
378
|
-
|
|
379
|
-
var timezoneExports = timezone$1.exports;
|
|
380
|
-
var timezone = /*@__PURE__*/getDefaultExportFromCjs(timezoneExports);
|
|
381
|
-
|
|
382
|
-
var utc$1 = {exports: {}};
|
|
383
|
-
|
|
384
|
-
utc$1.exports;
|
|
385
|
-
|
|
386
|
-
(function (module, exports) {
|
|
387
|
-
!function(t,i){module.exports=i();}(commonjsGlobal,(function(){var t="minute",i=/[+-]\d\d(?::?\d\d)?/g,e=/([+-]|\d\d)/g;return function(s,f,n){var u=f.prototype;n.utc=function(t){var i={date:t,utc:!0,args:arguments};return new f(i)},u.utc=function(i){var e=n(this.toDate(),{locale:this.$L,utc:!0});return i?e.add(this.utcOffset(),t):e},u.local=function(){return n(this.toDate(),{locale:this.$L,utc:!1})};var o=u.parse;u.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),o.call(this,t);};var r=u.init;u.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds();}else r.call(this);};var a=u.utcOffset;u.utcOffset=function(s,f){var n=this.$utils().u;if(n(s))return this.$u?0:n(this.$offset)?a.call(this):this.$offset;if("string"==typeof s&&(s=function(t){void 0===t&&(t="");var s=t.match(i);if(!s)return null;var f=(""+s[0]).match(e)||["-",0,0],n=f[0],u=60*+f[1]+ +f[2];return 0===u?0:"+"===n?u:-u}(s),null===s))return this;var u=Math.abs(s)<=16?60*s:s,o=this;if(f)return o.$offset=u,o.$u=0===s,o;if(0!==s){var r=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(u+r,t)).$offset=u,o.$x.$localOffset=r;}else o=this.utc();return o};var h=u.format;u.format=function(t){var i=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,i)},u.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},u.isUTC=function(){return !!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var l=u.toDate;u.toDate=function(t){return "s"===t&&this.$offset?n(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():l.call(this)};var c=u.diff;u.diff=function(t,i,e){if(t&&this.$u===t.$u)return c.call(this,t,i,e);var s=this.local(),f=n(t).local();return c.call(s,f,i,e)};}}));
|
|
388
|
-
} (utc$1, utc$1.exports));
|
|
389
|
-
|
|
390
|
-
var utcExports = utc$1.exports;
|
|
391
|
-
var utc = /*@__PURE__*/getDefaultExportFromCjs(utcExports);
|
|
392
|
-
|
|
393
371
|
dayjs.extend(utc);
|
|
394
372
|
dayjs.extend(timezone);
|
|
395
373
|
var updateApprovalDetails = function updateApprovalDetails(_ref) {
|
|
@@ -936,29 +914,26 @@ var Form$2 = function Form(_ref) {
|
|
|
936
914
|
size: "large"
|
|
937
915
|
}, /*#__PURE__*/React.createElement(Pane.Header, null, /*#__PURE__*/React.createElement(Typography, {
|
|
938
916
|
style: "h2"
|
|
939
|
-
}, header)), /*#__PURE__*/React.createElement(
|
|
917
|
+
}, header)), /*#__PURE__*/React.createElement(FormikForm, {
|
|
940
918
|
formikProps: {
|
|
941
919
|
enableReinitialize: true,
|
|
942
920
|
initialValues: isPresent(initialData) ? initialData : TEMPLATE_FORM_INITIAL_VALUES,
|
|
943
921
|
validationSchema: TEMPLATE_FORM_VALIDATION_SCHEMA,
|
|
944
922
|
onSubmit: onSubmit
|
|
945
923
|
}
|
|
946
|
-
}, /*#__PURE__*/React.createElement(
|
|
924
|
+
}, /*#__PURE__*/React.createElement(Pane.Body, null, /*#__PURE__*/React.createElement(TemplateForm, {
|
|
947
925
|
initialData: initialData,
|
|
948
926
|
placeholders: placeholders
|
|
949
|
-
})), /*#__PURE__*/React.createElement(Pane.Footer, {
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
style: "text",
|
|
960
|
-
onClick: onClose
|
|
961
|
-
})))));
|
|
927
|
+
})), /*#__PURE__*/React.createElement(Pane.Footer, null, /*#__PURE__*/React.createElement(ActionBlock, {
|
|
928
|
+
isSubmitting: isLoading,
|
|
929
|
+
cancelButtonProps: {
|
|
930
|
+
"data-cy": "neeto-approvals-templates-close-template-form-btn",
|
|
931
|
+
onClick: onClose
|
|
932
|
+
},
|
|
933
|
+
submitButtonProps: {
|
|
934
|
+
"data-cy": "neeto-approvals-templates-save-template-btn"
|
|
935
|
+
}
|
|
936
|
+
}))));
|
|
962
937
|
};
|
|
963
938
|
|
|
964
939
|
var Create = function Create(_ref) {
|
|
@@ -1463,8 +1438,8 @@ var Tab = function Tab(_ref) {
|
|
|
1463
1438
|
_useFetchViews$data2 = _useFetchViews$data === void 0 ? {} : _useFetchViews$data,
|
|
1464
1439
|
_useFetchViews$data2$ = _useFetchViews$data2.views,
|
|
1465
1440
|
views = _useFetchViews$data2$ === void 0 ? {} : _useFetchViews$data2$;
|
|
1466
|
-
return /*#__PURE__*/React.createElement(
|
|
1467
|
-
return /*#__PURE__*/React.createElement(
|
|
1441
|
+
return /*#__PURE__*/React.createElement(NeetoUITab, null, approvalFilterKeys.map(function (filter) {
|
|
1442
|
+
return /*#__PURE__*/React.createElement(NeetoUITab.Item, {
|
|
1468
1443
|
active: isActive(filter),
|
|
1469
1444
|
count: views[filter === null || filter === void 0 ? void 0 : filter.toLocaleLowerCase()],
|
|
1470
1445
|
key: filter,
|
|
@@ -1683,31 +1658,22 @@ var Form = function Form(_ref) {
|
|
|
1683
1658
|
style: "h2"
|
|
1684
1659
|
}, t("neetoApprovals.common.add_", {
|
|
1685
1660
|
what: t("neetoApprovals.common.approval", SINGULAR)
|
|
1686
|
-
}))), /*#__PURE__*/React.createElement(
|
|
1661
|
+
}))), /*#__PURE__*/React.createElement(FormikForm, {
|
|
1687
1662
|
formikProps: {
|
|
1688
1663
|
onSubmit: handleSubmit,
|
|
1689
1664
|
initialValues: APPROVAL_REQUEST_FORM_INITIAL_VALUES,
|
|
1690
1665
|
validationSchema: REQUEST_FORM_VALIDATION_SCHEMA
|
|
1691
1666
|
}
|
|
1692
|
-
},
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
})), /*#__PURE__*/React.createElement(Pane.Footer, {
|
|
1699
|
-
className: "flex gap-x-2"
|
|
1700
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
1701
|
-
disabled: !dirty,
|
|
1702
|
-
label: t("neetoApprovals.buttons.saveChanges"),
|
|
1703
|
-
loading: isLoading,
|
|
1704
|
-
type: "submit"
|
|
1705
|
-
}), /*#__PURE__*/React.createElement(Button, {
|
|
1706
|
-
label: t("neetoApprovals.buttons.cancel"),
|
|
1707
|
-
style: "text",
|
|
1667
|
+
}, /*#__PURE__*/React.createElement(Pane.Body, null, /*#__PURE__*/React.createElement(Form$1, {
|
|
1668
|
+
requestableId: requestableId,
|
|
1669
|
+
selectedTemplateData: selectedTemplateData,
|
|
1670
|
+
setSelectedTemplateData: setSelectedTemplateData
|
|
1671
|
+
})), /*#__PURE__*/React.createElement(Pane.Footer, null, /*#__PURE__*/React.createElement(ActionBlock, {
|
|
1672
|
+
cancelButtonProps: {
|
|
1708
1673
|
onClick: onClose
|
|
1709
|
-
}
|
|
1710
|
-
|
|
1674
|
+
},
|
|
1675
|
+
isSubmitting: isLoading
|
|
1676
|
+
}))));
|
|
1711
1677
|
};
|
|
1712
1678
|
|
|
1713
1679
|
var show = function show(id) {
|