1(this["webpackJsonpone-free-ui"]=this["webpackJsonpone-free-ui"]||[]).push([[15],{1152:function(e,t,a){"use strict";var n=a(9),i=a(3),c=a(381),r=a(1368),l=a(1372),o=a(1371),s=a(1367),d=a(1369),b=a(1370),j=a(10),u=a(8),p=a(0),m=a.n(p),O=a(313),x=a(1166),h=a(2),v=Object(c.a)((function(e){var t;return{tableHeaderRow:(t={fontFamily:"Inter-Bold, sans-serif",whiteSpace:"pre-wrap",textAlign:"center",verticalAlign:"top"},Object(i.a)(t,e.breakpoints.down("sm"),{border:"none",display:"flex",flexDirection:"column",alignItems:"center",padding:"0"}),Object(i.a)(t,"& > div",Object(i.a)({"& > label":{fontFamily:"Inter-Regular"},"& > div:nth-of-type(1)":{borderBottom:"1px solid ".concat(e.palette.utility.main)}},e.breakpoints.down("sm"),{minHeight:"50px",display:"flex",flexDirection:"column",alignItems:"center",width:"100%","& > div:nth-of-type(1)":{display:"none"},"& > input":{marginTop:"20px",maxWidth:"100%",width:"85%","&::placeholder":{color:"black"}}})),t),tableBody:{"& tr:nth-of-type(odd)":{background:e.palette.utility.rowOdd}},tableRow:Object(i.a)({},e.breakpoints.down("sm"),{borderBottom:"1px solid ".concat(e.palette.background.border)}),tableBodyRow:Object(i.a)({whiteSpace:"pre-wrap",textAlign:"center"},e.breakpoints.down("sm"),{border:"none",display:"flex",flexDirection:"column",alignItems:"center",padding:"0"}),inputPage:{margin:"0px 10px",width:"70px",textAlign:"center",border:"1px solid ".concat(e.palette.utility.main),background:e.palette.background.main,padding:"5px 7px",borderRadius:"3px",fontWeight:"400"},selectPageSize:{margin:"0px 10px",border:"1px solid ".concat(e.palette.utility.main),background:e.palette.background.main,padding:"7px",borderRadius:"3px",fontWeight:"400"},pagination:Object(i.a)({color:e.palette.text.main,fontFamily:"Inter-Bold"},e.breakpoints.down("sm"),{display:"flex",flexDirection:"column","& > *":{margin:"10px 0"}}),emptyRowsPlaceholder:{height:"80px",backgroundColor:e.palette.background.main}}}));t.a=function(e){var t,a,i,c=e.columns,p=e.onRowClick,f=void 0===p?function(){}:p,g=e.data,N=e.tablePagination,y=void 0!==N&&N,w=e.page,C=void 0===w?1:w,k=e.onChangePage,I=e.pageSize,S=void 0===I?10:I,D=e.pageSizes,P=void 0===D?j.z:D,R=e.changePageSize,H=e.noDataText,T=void 0===H?j.gc:H,F=e.classWrapper,V=e.classRow,B=e.rowProps,E=void 0===B?function(){return{}}:B,A=e.cellProps,W=void 0===A?function(){return{}}:A,z=e.error,L=void 0===z?null:z,M=e.editInvoiceItemIndex,Y=void 0===M?void 0:M,_=e.editInvoiceItemId,q=void 0===_?void 0:_,G=Object(O.a)().t,J=v(e),U=Array.isArray(g)&&g||[],K=Object(x.useTable)({columns:c,data:U}),Q=K.getTableProps,X=K.headerGroups,Z=K.rows,$=K.prepareRow;return Object(h.jsxs)("div",{className:F||"",children:[Object(h.jsx)(s.a,{className:"flex flex-1 striped",children:Object(h.jsxs)(r.a,Object(n.a)(Object(n.a)({},Q()),{},{children:[Object(h.jsx)(d.a,{children:X.map((function(e){return Object(h.jsx)(b.a,Object(n.a)(Object(n.a)({},e.getHeaderGroupProps()),{},{className:J.tableHead,children:e.headers.map((function(e){return Object(h.jsx)(o.a,Object(n.a)(Object(n.a)({},e.getHeaderProps()),{},{className:Object(u.a)(J.tableHeaderRow,(null===e||void 0===e?void 0:e.classHeader)||""),children:e.render("Header")}))}))}))}))}),Object(h.jsx)(l.a,{className:J.tableBody,children:Z.length>0?Z.map((function(e,t){return $(e),Object(h.jsxs)(m.a.Fragment,{children:[Object(h.jsx)(b.a,Object(n.a)(Object(n.a)({},e.getRowProps(E(e))),{},{className:Object(u.a)(J.tableRow,V||""),onClick:function(t){return f(t,e)},children:e.cells.map((function(a){var i;return Object(h.jsxs)(o.a,Object(n.a)(Object(n.a)({},a.getCellProps(W(e))),{},{className:Object(u.a)(J.tableBodyRow,(null===a||void 0===a||null===(i=a.column)||void 0===i?void 0:i.className)||""),children:[a.render("Cell"),L&&t===Y&&a.column.id===q&&Object(h.jsx)("div",{className:"text-10 text-red-500 \n relative md:absolute max-w-160 text-left self-end \n lg:mr-0 mr-16 sm:mr-40 -mt-4 md:mt-0",children:"* ".concat(L)})]}),a.column.id)}))}))," "]},e.id)})):Object(h.jsx)(b.a,{children:Object(h.jsx)(o.a,{className:Object(u.a)(J.emptyRowsPlaceholder,"text-center"),colSpan:"100%",children:G(T)})})})]}))}),(y&&Z.length>0||y&&0!==(null===y||void 0===y?void 0:y.totalPages)&&C>((null===y||void 0===y?void 0:y.totalPages)||0))&&Object(h.jsxs)("div",{className:Object(u.a)(J.pagination,"flex m-10 items-center"),children:[Object(h.jsxs)("span",{children:[Object(h.jsx)("span",{children:G("Page Size")}),Object(h.jsx)("select",{"aria-label":"rows per page",className:J.selectPageSize,value:S,onChange:function(e){return R(e)},children:P.map((function(e){return Object(h.jsxs)("option",{value:e,children:[e," ",G("rows")]},e)}))})]}),Object(h.jsxs)("span",{children:[Object(h.jsx)("span",{className:"ml-10",children:G("Page")}),Object(h.jsx)("input",{className:J.inputPage,"aria-label":"jump to page",type:"number",onChange:function(e){return k(e)},value:C,max:null===y||void 0===y?void 0:y.totalPages,min:1}),Object(h.jsxs)("span",{children:[" / ",null!==(t=null===y||void 0===y?void 0:y.totalPages)&&void 0!==t?t:0]})]}),Object(h.jsx)("span",{className:"w-64"}),Object(h.jsxs)("span",{className:"px-10",children:[G("Number of items"),": ",null!==(a=null===y||void 0===y?void 0:y.numberOfElements)&&void 0!==a?a:0]}),Object(h.jsxs)("span",{id:"total-of-items",className:"px-10",children:[G("Total of items"),": ",null!==(i=null===y||void 0===y?void 0:y.totalElements)&&void 0!==i?i:0]})," "]})]})}},1153:function(e,t,a){"use strict";var n=a(381),i=a(623),c=a(396),r=a(109),l=a(8),o=a(1140),s=a(313),d=a(46),b=a(2),j=Object(n.a)((function(e){return{root:{backgroundColor:e.palette.background.main,color:e.palette.text.main,"& .titleText":{fontFamily:"PlusJakartaSans-Bold !important"}}}}));t.a=function(e){var t=Object(s.a)().t,a=j();return Object(b.jsx)(b.Fragment,{children:Object(b.jsx)("div",{className:Object(l.a)(a.root,"flex items-center w-full"),children:Object(b.jsxs)("div",{className:"w-full mt-12",children:[e.linkBack&&Object(b.jsxs)(r.a,{className:"font-bold flex items-center sm:mb-12",component:d.a,role:"button",to:e.linkBack,color:"inherit",children:[Object(b.jsx)(c.a,{className:"mr-4 text-20",children:"arrow_back"}),t(e.titleBack)]}),e.title&&Object(b.jsx)("div",{className:"headline",children:Object(b.jsxs)("div",{className:"flex items-center",children:[e.icon&&Object(b.jsx)(c.a,{className:"text-24 sm:text-32 mr-12",children:e.icon}),Object(b.jsx)(o.a.span,{initial:{scale:.6},animate:{scale:1,transition:{delay:.2}},className:"text-24 sm:text-32 uppercase titleText",children:t(e.title)})]})}),Object(b.jsxs)("div",{className:"my-10",children:[e.button&&!e.buttonHidden&&Object(b.jsx)(i.a,{component:d.a,to:e.link,className:"whitespace-no-wrap mr-20 ",variant:"contained",color:"primary",children:Object(b.jsx)("span",{children:t(e.button)})}),e.refresh&&Object(b.jsx)(i.a,{id:"refresh",className:"ml-2 m-0",variant:"outlined",color:"primary",onClick:e.handleRefresh,children:Object(b.jsx)(c.a,{className:"",children:"refresh"})}),e.isClearFilter&&Object(b.jsxs)(i.a,{id:"clearFilters",className:"ml-2 m-0",variant:"outlined",color:"primary",onClick:function(){var e=window.location.search.includes("tenantType")?"tenantType=".concat(window.location.search.split("tenantType=")[1].split("&")[0]):"";window.location.search=e},children:[Object(b.jsx)(c.a,{children:"filter_alt"})," Clear"]})]})]})})})}},1154:function(e,t,a){"use strict";var n=a(3),i=a(1132),c=a(10),r=a(52),l=a(16),o=a(2);var s=function(e){var t=Object(l.c)(r.f),a=Object(l.c)(r.c),n=Object(l.c)((function(e){return e.auth.user.data})).role;return Object(o.jsx)("div",{className:e.classes.header,children:e.header&&Object(o.jsx)(i.a,{theme:n===c.kd.contractor_company.name?a:t,children:e.header})})},d=a(9),b=a(19),j=a(108),u=a(1144),p=a(1147),m=a(8),O=a(0),x=a.n(O),h=a(233),v=a(59);var f=function(e){var t=Object(v.a)(),a=Object(l.c)(Object(r.e)(t.palette.primary.main)),n=e.classes;return Object(o.jsxs)(o.Fragment,{children:[e.header&&Object(o.jsx)(i.a,{theme:a,children:Object(o.jsx)("div",{className:Object(m.a)(n.sidebarHeader,e.variant),children:e.header})}),e.content&&Object(o.jsx)(h.a,{className:n.sidebarContent,enable:e.innerScroll,children:e.content})]})};function g(e,t){var a=Object(O.useState)(!1),n=Object(b.a)(a,2),i=n[0],c=n[1],r=e.classes;Object(O.useImperativeHandle)(t,(function(){return{toggleSidebar:l}}));var l=function(){c(!i)};return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(u.a,{lgUp:"permanent"===e.variant,children:Object(o.jsx)(p.a,{variant:"temporary",anchor:e.position,open:i,onOpen:function(e){},onClose:function(e){return l()},disableSwipeToOpen:!0,classes:{root:Object(m.a)(r.sidebarWrapper,e.variant),paper:Object(m.a)(r.sidebar,e.variant,"left"===e.position?r.leftSidebar:r.rightSidebar)},ModalProps:{keepMounted:!0},container:e.rootRef.current,BackdropProps:{classes:{root:r.backdrop}},style:{position:"absolute"},children:Object(o.jsx)(f,Object(d.a)({},e))})}),"permanent"===e.variant&&Object(o.jsx)(u.a,{mdDown:!0,children:Object(o.jsx)(j.a,{variant:"permanent",className:Object(m.a)(r.sidebarWrapper,e.variant),open:i,classes:{paper:Object(m.a)(r.sidebar,e.variant,"left"===e.position?r.leftSidebar:r.rightSidebar)},children:Object(o.jsx)(f,Object(d.a)({},e))})})]})}var N=Object(O.forwardRef)(g),y=a(381),w=200,C=Object(y.a)((function(e){var t;return{"@global":{"#fuse-main":{height:function(e){return e.innerScroll&&"100vh"}}},root:{display:"flex",flexDirection:"row",minWidth:0,minHeight:"100%",position:"relative",flex:"1 1 auto",height:"auto",backgroundColor:e.palette.background.main},innerScroll:{height:"100%"},topBg:Object(n.a)({position:"absolute",left:0,right:0,top:0,height:w,pointerEvents:"none",backgroundSize:"200px auto !important",backgroundRepeat:"no-repeat !important",backgroundPosition:"bottom 60px right 10px !important",backgroundColor:"".concat(e.palette.background.main," !important")},e.breakpoints.down("md"),{backgroundImage:"none !important"}),contentWrapper:(t={display:"flex",flexDirection:"column",padding:"0 3.2rem",flex:"1 1 100%",zIndex:2,maxWidth:"100%",minWidth:0,minHeight:0},Object(n.a)(t,e.breakpoints.down("sm"),{padding:"0 1.6rem"}),Object(n.a)(t,e.breakpoints.down("xs"),{padding:"0 0.5rem"}),t),header:{height:136,minHeight:136,maxHeight:136,display:"flex",color:e.palette.primary.contrastText},headerSidebarToggleButton:{color:e.palette.primary.contrastText},contentCard:{display:"flex",flex:"1 1 100%",flexDirection:"column",paddingTop:"20px",backgroundColor:e.palette.background.dark,boxSh
1adow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",minHeight:0,borderRadius:"8px 8px 0 0"},toolbar:{display:"flex",minHeight:64,alignItems:"center",borderBottom:"1px solid ".concat(e.palette.utility.main)},content:{color:e.palette.text.main,flex:"1 1 auto",height:"100%",overflow:"auto","-webkit-overflow-scrolling":"touch"},sidebarWrapper:{position:"absolute",backgroundColor:"transparent",zIndex:5,overflow:"hidden","&.permanent":Object(n.a)({},e.breakpoints.up("lg"),{zIndex:1,position:"relative"})},sidebar:{position:"absolute","&.permanent":Object(n.a)({},e.breakpoints.up("lg"),{backgroundColor:"transparent",position:"relative",border:"none",overflow:"hidden"}),width:240,height:"100%"},leftSidebar:{},rightSidebar:{},sidebarHeader:{height:w,minHeight:w,color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.dark,"&.permanent":Object(n.a)({},e.breakpoints.up("lg"),{backgroundColor:"transparent"})},sidebarContent:Object(n.a)({display:"flex",flex:"1 1 auto",flexDirection:"column",backgroundColor:e.palette.background.default,color:e.palette.text.primary},e.breakpoints.up("lg"),{overflow:"auto","-webkit-overflow-scrolling":"touch"}),backdrop:{position:"absolute"}}})),k=x.a.forwardRef((function(e,t){var a=Object(O.useRef)(null),n=Object(O.useRef)(null),i=Object(O.useRef)(null),c=C(e),r=e.rightSidebarHeader||e.rightSidebarContent,l=e.leftSidebarHeader||e.leftSidebarContent;return x.a.useImperativeHandle(t,(function(){return{rootRef:i,toggleLeftSidebar:function(){a.current.toggleSidebar()},toggleRightSidebar:function(){n.current.toggleSidebar()}}})),Object(o.jsxs)("div",{className:Object(m.a)(c.root,e.innerScroll&&c.innerScroll),ref:i,children:[Object(o.jsx)("div",{className:c.topBg}),Object(o.jsxs)("div",{className:"flex container w-full",children:[l&&Object(o.jsx)(N,{position:"left",header:e.leftSidebarHeader,content:e.leftSidebarContent,variant:e.leftSidebarVariant||"permanent",innerScroll:e.innerScroll,classes:c,ref:a,rootRef:i}),Object(o.jsxs)("div",{className:Object(m.a)(c.contentWrapper,l&&(void 0===e.leftSidebarVariant||"permanent"===e.leftSidebarVariant)&&"lg:ltr:pl-0 lg:rtl:pr-0",r&&(void 0===e.rightSidebarVariant||"permanent"===e.rightSidebarVariant)&&"lg:pr-0"),children:[Object(o.jsx)(s,{header:e.header,classes:c}),Object(o.jsxs)("div",{className:Object(m.a)(c.contentCard,e.innerScroll&&"inner-scroll"),children:[e.contentToolbar&&Object(o.jsx)("div",{className:c.toolbar,children:e.contentToolbar}),e.content&&Object(o.jsx)(h.a,{className:c.content,enable:e.innerScroll,scrollToTopOnRouteChange:e.innerScroll,children:e.content})]})]}),r&&Object(o.jsx)(N,{position:"right",header:e.rightSidebarHeader,content:e.rightSidebarContent,variant:e.rightSidebarVariant||"permanent",innerScroll:e.innerScroll,classes:c,ref:n,rootRef:i})]})]})}));k.defaultProps={};t.a=x.a.memo(k)},1155:function(e,t,a){"use strict";var n=a(397),i=a(8),c=a(2);t.a=function(e){var t=e.columnName,a=e.content,r=e.hideColumnName,l=e.cellClass,o=Object(n.m)(e);return Object(c.jsxs)("div",{className:Object(i.a)(o.reactTableCell,r&&"flex justify-center",l),children:[!r&&Object(c.jsx)("span",{className:"text-left pl-2",children:t}),a]})}},1156:function(e,t,a){"use strict";var n=a(118),i=a(313),c=a(2);t.a=function(e){var t=e.label,a=e.placeholder,r=e.value,l=e.setValue,o=e.styleWrapper,s=void 0===o?"min-w-128":o,d=e.styleLabel,b=void 0===d?"pb-5":d,j=e.styleInput,u=void 0===j?"text-center text-12 border-b-1 border-grey-400 max-w-320 bg-transparent":j,p=e.setPage,m=e.type,O=void 0===m?"text":m,x=Object(i.a)().t,h=Object(n.a)((function(e){p(1),l(e.target.value)}),1e3);return Object(c.jsx)(c.Fragment,{children:Object(c.jsxs)("div",{className:s,children:[Object(c.jsx)("div",{className:b,children:x(t)}),Object(c.jsx)("input",{id:t,type:O,className:u,placeholder:x(a||t),defaultValue:r,onChange:h})]})})}},1163:function(e,t,a){"use strict";var n=a(3),i=a(381),c=a(1098),r=a(623),l=a(396),o=a(1127),s=a(1103),d=a(313),b=a(2),j=Object(i.a)((function(e){var t;return{root:{"& .title":Object(n.a)({fontFamily:"Inter-Bold, sans-serif",fontSize:"1.8rem"},e.breakpoints.down("md"),{fontSize:"1.4rem"}),"& .dialogContent":Object(n.a)({padding:"20px"},e.breakpoints.down("sm"),{padding:"12px"}),"& .dialog-toolbar":{display:"flex",alignItems:"center",height:"55px"},"& .button-back":Object(n.a)({paddingLeft:"10px",marginLeft:"10px"},e.breakpoints.down("md"),{paddingLeft:"5px",marginRight:0}),"& .button-right":Object(n.a)({minWidth:"70px"},e.breakpoints.down("md"),{margin:0,minWidth:0})},disabledFullHeight:Object(n.a)({height:"auto !important"},e.breakpoints.down("md"),{margin:0,width:"100%",maxHeight:"100%"}),paperFullWidth:Object(n.a)({height:"100%"},e.breakpoints.down("md"),{margin:0,width:"100%",maxHeight:"100%"}),paper:(t={},Object(n.a)(t,e.breakpoints.down("md"),{margin:"0 !important",width:"100% !important",height:"100% !important",maxHeight:"100% !important"}),Object(n.a)(t,e.breakpoints.up("lg"),{maxWidth:"1080px"}),t)}}));t.a=function(e){var t=Object(d.a)().t,a=j(),n=e.open,i=e.onClose,u=e.disabledBackButton,p=void 0!==u&&u,m=e.dialogId,O=e.dialogTitle,x=e.dialogContent,h=e.disabledFullHeight,v=void 0!==h&&h;return Object(b.jsxs)(c.a,{id:m,classes:{paperFullWidth:a.paperFullWidth,paper:v?a.disabledFullHeight:a.paper},className:a.root,fullWidth:!0,maxWidth:"md",open:n,onClose:i,children:[Object(b.jsx)("div",{className:"dialog-appBar bg-white",children:Object(b.jsxs)("div",{className:"dialog-toolbar",children:[Object(b.jsxs)(r.a,{id:"dialog_back",variant:"outlined",color:"primary",className:"button-back",onClick:i,disabled:p,children:[Object(b.jsx)(l.a,{className:"",fontSize:"medium",children:"arrow_back"}),Object(b.jsx)("span",{className:"py-2",children:t("Back")})]}),Object(b.jsx)("div",{className:"title ml-2 flex-1 text-center text-black",children:t(O)}),Object(b.jsx)("div",{className:"button-right"})]})}),Object(b.jsx)(o.a,{}
1),Object(b.jsx)(s.a,{className:"dialogContent",children:x})]})}},1171:function(e,t,a){"use strict";var n=a(1098),i=a(1111),c=a(1133),r=a(395),l=a(109),o=a(623),s=a(1127),d=a(381),b=a(1184),j=a(1185),u=a(8),p=a(313),m=a(2),O=Object(d.a)((function(e){return{header:{backgroundColor:e.palette.background.primary,color:e.palette.secondary.contrastText},dialog:{height:"100vh"}}}));t.a=function(e){var t=Object(p.a)().t,a=O(),d=e.preview,x=e.handleClose,h=e.fileLink,v=e.fileName,f=e.showDownload,g=void 0===f||f,N=e.showCloseButton,y=void 0!==N&&N;return Object(m.jsxs)(n.a,{fullWidth:!0,maxWidth:"xl",open:d,onClose:x,children:[Object(m.jsx)(i.a,{className:"relative",children:Object(m.jsxs)(c.a,{className:Object(u.a)(a.header,"flex justify-between"),children:[Object(m.jsx)(r.a,{className:"mr-16",color:"action",onClick:x,children:Object(m.jsx)(b.a,{color:"action"})}),Object(m.jsx)(l.a,{variant:"h6",className:"hidden sm:flex ml-2 flex-1",children:t("Preview")}),h&&g&&Object(m.jsx)(o.a,{role:"button",color:"primary",variant:"contained",href:h||"",download:v||"",endIcon:Object(m.jsx)(j.a,{}),children:t("Download")}),y&&Object(m.jsx)(o.a,{color:"inherit",variant:"outlined",onClick:x,children:t("Close")})]})}),Object(m.jsx)(s.a,{}),h?Object(m.jsx)("object",{type:"application/pdf",className:a.dialog,width:"100%",data:h,children:Object(m.jsxs)("div",{className:"p-10",children:[Object(m.jsx)("p",{children:t("Unfortunately, your device's operating system or web browser does not support previewing this file.")}),Object(m.jsx)(o.a,{color:"inherit",variant:"outlined",children:Object(m.jsx)("a",{href:h,download:v||"",children:t("Click here to Download.")})})]})}):Object(m.jsx)("div",{className:"p-10",children:t("Loading")})]})}},1172:function(e,t,a){"use strict";var n=a(3),i=a(381),c=a(2),r=Object(i.a)((function(e){return{root:{display:"flex",alignItems:"flex-start",marginTop:"5px",flexWrap:"wrap","& .mobileShown":Object(n.a)({},e.breakpoints.down("md"),{display:"block",order:1,width:"100%"}),"& .left-column-wrapper":Object(n.a)({width:"34%",float:"left",paddingRight:"10px"},e.breakpoints.down("md"),{display:"none"}),"& .right-column-wrapper":Object(n.a)({width:"65%",marginLeft:"auto",marginRight:0},e.breakpoints.down("md"),{width:"100%"})}}}));t.a=function(e){var t=e.leftColumn,a=e.rightColumn,n=e.leftColumnClass,i=r();return Object(c.jsxs)("div",{className:i.root,children:[Object(c.jsx)("div",{className:"left-column-wrapper ".concat(n||""),children:t}),Object(c.jsx)("div",{className:"right-column-wrapper",children:a})]})}},1184:function(e,t,a){"use strict";var n=a(0),i=a(44);t.a=Object(i.a)(n.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},1185:function(e,t,a){"use strict";var n=a(0),i=a(44);t.a=Object(i.a)(n.createElement("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"}),"GetApp")},1187:function(e,t,a){"use strict";var n=a(118),i=a(1062),c=a(625),r=a(313),l=a(2);t.a=function(e){var t=e.label,a=e.value,o=e.setValue,s=e.styleWrapper,d=void 0===s?"":s,b=e.styleLabel,j=void 0===b?"pb-5":b,u=e.styleInput,p=void 0===u?"min-w-84 max-w-320":u,m=e.setPage,O=Object(r.a)().t,x=Object(n.a)((function(e){m(1),o(e.target.value)}),1e3);return Object(l.jsxs)("div",{className:d,children:[Object(l.jsx)("div",{className:j,children:O(t)}),Object(l.jsxs)(i.a,{id:t,value:a,displayEmpty:!0,className:p,required:!1,onChange:x,children:[Object(l.jsx)(c.a,{value:"",children:O("All")},""),Object(l.jsx)(c.a,{value:"true",children:O("\u2705")},1),Object(l.jsx)(c.a,{value:"false",children:O("\u274c")},2)]})]})}},1258:function(e,t,a){"use strict";var n=a(1051),i=a(109),c=a(1127),r=a(623),l=a(396),o=a(397),s=a(1172),d=a(1163),b=a(26),j=a(8),u=a(0),p=a(313),m=a(16),O=a(21),x=a(435),h=a(3),v=a(9),f=a(33),g=a(19),N=a(64),y=a(1055),w=a(1136),C=a(1142),k=a(208),I=a(209),S=a(158),D=a(71),P=a(10),R=a(1171),H=a(237),T=a(445),F=a(2),V=function(e){var t=e.companyId,a=e.startDate,n=e.endDate,i=Object(p.a)().t,c=Object(o.m)(e),d=Object(m.c)((function(e){return e.oneFreeApp.company})).companyEmployee,b=Object(m.c)((function(e){return e.i18n.language})),O=Object(m.c)((function(e){return e.oneFreeApp.reports.vatReports})),x=Object(m.b)(),V=P.Dc.filter((function(e){return P.Ec.includes(e.name)})),B=Object(u.useState)(!1),E=Object(g.a)(B,2),A=E[0],W=E[1],z=Object(u.useState)(a),L=Object(g.a)(z,2),M=L[0],Y=L[1],_=Object(u.useState)(n),q=Object(g.a)(_,2),G=q[0],J=q[1],U=V.map((function(e){return e.value})),K=Object(u.useState)(U),Q=Object(g.a)(K,2),X=Q[0],Z=Q[1],$=Object(u.useState)({}),ee=Object(g.a)($,2),te=ee[0],ae=ee[1],ne=Object(u.useState)(!1),ie=Object(g.a)(ne,2),ce=ie[0],re=ie[1];Object(u.useEffect)((function(){t&&(x(Object(T.a)()),x(Object(H.i)({companyId:t})))}),[x,t]),Object(u.useEffect)((function(){Y(a)}),[a]),Object(u.useEffect)((function(){J(n)}),[n]),Object(D.a)("isAfterStartDate",(function(e,t){var a=new Date(e.startDate),n=new Date(t);return Object(k.a)(n,a)||Object(I.a)(n,a)}
1)),Object(D.a)("isBeforeEndDate",(function(e,t){var a=new Date(e.endDate),n=new Date(t);return Object(S.a)(n,a)||Object(I.a)(n,a)}));return Object(F.jsx)(F.Fragment,{children:Object(F.jsxs)(D.b,{onValidSubmit:function(){x(Object(T.a)());var e={tenantId:null===d||void 0===d?void 0:d.content[0].tenantId,reportDateStart:M||a,reportDateEnd:G||n,type:X,lang:b},t={userProfileId:null===d||void 0===d?void 0:d.content[0].userId,params:e};x(Object(T.d)(t))},children:[Object(F.jsx)(s.a,{leftColumn:Object(F.jsx)(F.Fragment,{children:Object(F.jsxs)("div",{className:c.OFTooltipDialog,children:["Click to allow changes",Object(F.jsx)("span",{className:"p-10",children:A?Object(F.jsx)(r.a,{className:c.guideItemButton,variant:"contained",color:"default",onClick:function(){return W(!A)},children:i("Edit Dates")}):Object(F.jsx)(r.a,{className:c.guideItemButton,variant:"contained",color:"primary",onClick:function(){return W(!A)},children:i("Edit Dates")})})]})}),rightColumn:Object(F.jsxs)(F.Fragment,{children:[Object(F.jsx)(N.d,{className:Object(j.a)(c.guideItemInput,c.guideItemInputHalfLeft),validations:"isBeforeEndDate",validationError:"Start date must be before end date",label:i("Report Start Date"),required:!0,id:"startDate",name:"startDate",type:"date",value:a||"",onChange:function(e){return Y(e.target.value)},InputLabelProps:{shrink:!0},InputProps:{required:!1},disabled:!A}),Object(F.jsx)(N.d,{className:Object(j.a)(c.guideItemInput,c.guideItemInputHalfLeft),validations:"isAfterStartDate",validationErrors:{isAfterStartDate:"End date should be after start date"},label:i("Report End Date"),required:!0,id:"endDate",name:"endDate",type:"date",value:n||"",onChange:function(e){return J(e.target.value)},InputLabelProps:{shrink:!0},InputProps:{required:!0},disabled:!A})]})}),Object(F.jsx)(s.a,{rightColumn:Object(F.jsxs)("div",{hidden:!ce,className:Object(j.a)(c.guideItemInput,c.guideItemInputFull),children:[Object(F.jsx)(y.a,{children:i("Report Types")}),V.map((function(e){return Object(F.jsx)("div",{className:"p-5",children:Object(F.jsx)(w.a,{value:e.value,control:Object(F.jsx)(C.a,{name:"vatReportType",className:"pl-10 p-5",checked:!!X.find((function(t){return t===e.value})),onChange:function(){return function(e){var t=X.indexOf(e);if(-1===t)Z([].concat(Object(f.a)(X),[e]));else{var a=Object(f.a)(X);a.splice(t,1),Z(a)}}(e.value)},inputProps:{"aria-label":e.name}}),label:Object(F.jsxs)("div",{children:[Object(F.jsxs)(l.a,{className:"mx-5",children:[e.icon," ",i(e.name)]})," ",Object(F.jsx)("span",{children:i(e.name)})]})},e.name)},e.name)}))]})}),Object(F.jsx)(s.a,{leftColumn:Object(F.jsx)("div",{className:c.OFTooltipDialog,children:"Default reports are: Sales, Purchases, Vat and Service Fees. You can customise these by pressing Change Report Options"}),rightColumn:Object(F.jsxs)(F.Fragment,{children:[Object(F.jsx)("div",{className:c.OFTooltipDialog,children:"Reports will be shown below"}),Object(F.jsxs)("div",{className:"p-10 flex justify-between",children:[Object(F.jsx)(r.a,{className:c.guideItemButton,variant:"contained",color:"primary",type:"submit",disabled:0===X.length,children:"Generate Reports"}),Object(F.jsx)(r.a,{className:c.guideItemButton,variant:"contained",color:"primary",type:"submit",onClick:function(){return re(!ce)},children:"Change Report Options"})]})]})}),Object(F.jsx)(s.a,{rightColumn:O&&Object.keys(O).map((function(e){return Object(F.jsxs)("div",{children:[Object(F.jsxs)(r.a,{startIcon:Object(F.jsx)(l.a,{fontSize:"medium",children:"preview"}),className:c.guideItemButton,onClick:function(){return function(e){ae((function(t){return Object(v.a)(Object(v.a)({},t),{},Object(h.a)({},e,!0))}))}(e)},children:["Preview ",e.toString()," Report"]}),te[e]&&Object(F.jsx)(R.a,{preview:te[e],handleClose:function(){return function(e){ae((function(t){return Object(v.a)(Object(v.a)({},t),{},Object(h.a)({},e,!1))}))}(e)},fileLink:O[e]})]},e)}))})]})})};t.a=function(e){var t=Object(p.a)().t,a=Object(m.b)(),h=Object(o.m)(e),v=e.openDialog,f
1=e.handleCloseDialog,g=e.vatPeriodId,N=Object(m.c)((function(e){return e.oneFreeApp.vatPeriod})).vatPeriod;Object(u.useEffect)((function(){a(Object(x.d)({vatPeriodId:g}))}),[a,g]);var y=function(e){Object(O.R)(t,a,(function(){a(Object(x.a)({vatPeriodId:null===N||void 0===N?void 0:N.id,action:e})),a(Object(b.a)())}))};return Object(F.jsx)(d.a,{open:v,onClose:f,dialogId:"dialogVatPeriod",dialogTitle:"VAT Period",dialogContent:Object(F.jsxs)(F.Fragment,{children:[Object(F.jsx)(s.a,{leftColumn:Object(F.jsx)("div",{className:h.OFTooltipDialog,children:t("VAT Period Id")}),rightColumn:Object(F.jsx)(n.a,{type:"text",className:Object(j.a)(h.guideItemInput,h.disabledClearInput),disabled:!0,id:"id",name:"id",label:t("Id"),value:(null===N||void 0===N?void 0:N.id)||""})}),Object(F.jsx)(s.a,{leftColumn:Object(F.jsx)("div",{className:h.OFTooltipDialog,children:t("Company Id")}),rightColumn:Object(F.jsx)(n.a,{type:"text",className:Object(j.a)(h.guideItemInput,h.disabledClearInput),disabled:!0,id:"companyId",name:"companyId",label:t("Company Id"),value:(null===N||void 0===N?void 0:N.companyId)||""})}),Object(F.jsx)(s.a,{leftColumn:Object(F.jsx)("div",{className:h.OFTooltipDialog,children:t("Name")}
1),rightColumn:Object(F.jsx)(n.a,{type:"text",className:Object(j.a)(h.guideItemInput,h.disabledClearInput),disabled:!0,id:"name",name:"Name",label:t("Name"),value:(null===N||void 0===N?void 0:N.name)||""})}),Object(F.jsx)(s.a,{leftColumn:Object(F.jsx)("div",{className:h.OFTooltipDialog,children:t("Type")}),rightColumn:Object(F.jsx)(n.a,{type:"text",className:Object(j.a)(h.guideItemInput,h.disabledClearInput),disabled:!0,id:"type",name:"type",label:t("Type"),value:(null===N||void 0===N?void 0:N.type)||""})}),Object(F.jsx)(s.a,{leftColumn:Object(F.jsx)("div",{className:h.OFTooltipDialog,children:t("Start Date")}),rightColumn:Object(F.jsx)(n.a,{type:"date",className:Object(j.a)(h.guideItemInput,h.disabledClearInput),disabled:!0,id:"startDate",name:"startDate",label:t("Start Date"),value:(null===N||void 0===N?void 0:N.startDate)||""})}),Object(F.jsx)(s.a,{leftColumn:Object(F.jsx)("div",{className:h.OFTooltipDialog,children:t("End Date")}),rightColumn:Object(F.jsx)(n.a,{type:"date",className:Object(j.a)(h.guideItemInput,h.disabledClearInput),disabled:!0,id:"endDate",name:"endDate",label:t("End Date"),value:(null===N||void 0===N?void 0:N.endDate)||""})}),Object(F.jsx)(s.a,{leftColumn:Object(F.jsx)("div",{className:h.OFTooltipDialog,children:t("Description")}),rightColumn:Object(F.jsx)(n.a,{type:"text",className:Object(j.a)(h.guideItemInput,h.disabledClearInput),id:"description",name:"description",label:t("Description"),disabled:!0,value:(null===N||void 0===N?void 0:N.description)||"",InputLabelProps:{shrink:!0}})}),Object(F.jsx)(s.a,{rightColumn:Object(F.jsxs)("div",{className:Object(j.a)(h.guideItemInput,"flex items-center"),children:[Object(F.jsx)(i.a,{className:"min-w-128",children:t("Open")}),Object(F.jsx)("span",{children:null!==N&&void 0!==N&&N.isOpen?t("\u2705"):t("\u274c")})]})}),Object(F.jsx)(s.a,{rightColumn:Object(F.jsxs)("div",{className:Object(j.a)(h.guideItemInput,"flex items-center"),children:[Object(F.jsx)(i.a,{className:"min-w-128",children:t("Report Sent")}),Object(F.jsx)("span",{children:null!==N&&void 0!==N&&N.isReportSent?t("\u2705"):t("\u274c")})]})}),Object(F.jsx)(s.a,{rightColumn:Object(F.jsxs)("div",{className:Object(j.a)(h.guideItemInput,"flex items-center"),children:[Object(F.jsx)(i.a,{className:"min-w-128",children:t("Vat Paid")}),Object(F.jsx)("span",{children:null!==N&&void 0!==N&&N.isVatPaid?t("\u2705"):t("\u274c")})]})}),Object(F.jsx)(s.a,{rightColumn:Object(F.jsx)(c.a,{})}),Object(F.jsx)(V,{companyId:null===N||void 0===N?void 0:N.companyId,startDate:null===N||void 0===N?void 0:N.startDate,endDate:null===N||void 0===N?void 0:N.endDate}),Object(F.jsx)(s.a,{rightColumn:Object(F.jsxs)("div",{className:"flex justify-start flex-wrap sm:flex-no-wrap w-full mt-16",children:[Object(F.jsxs)(r.a,{variant:"contained",color:"secondary",className:Object(j.a)(o.c,"sm:mr-5"),disabled:(null===N||void 0===N?void 0:N.isOpen)||(null===N||void 0===N?void 0:N.isReportSent),onClick:function(){return y("sent")},children:[Object(F.jsx)(l.a,{className:"mr-6",fontSize:"small",children:"send"}),t("Mark as send")]}),Object(F.jsxs)(r.a,{variant:"contained",color:"primary",className:o.c,disabled:!(null!==N&&void 0!==N&&N.isReportSent)||(null===N||void 0===N?void 0:N.isVatPaid),onClick:function(){return y("paid")},children:[Object(F.jsx)(l.a,{className:"mr-6",fontSize:"small",children:"account_balance"}),t("Mark as Paid")]})]})})]})})}},1399:function(e,t,a){"use strict";a.r(t);var n=a(19),i=a(623),c=a(396),r=a(1062),l=a(625),o=a(1154),s=a(1156),d=a(143),b=a(65),j=a.n(b),u=a(0),p=a.n(u),m=a(313),O=a(16),x=a(1258),h=a(10),v=a(397),f=a(1187),g=a(1153),N=a(1155),y=a(1152),w=a(234),C=a(435),k=a(2);t.default=Object(d.a)("oneFreeApp",w.a)((function(e){var t=Object(m.a)().t,a=Object(O.b)(),d=Object(v.m)(e),b=Object(O.c)((function(e){return e.oneFreeApp.vatPeriod})).vatPeriods,w=Object(u.useState)(!1),I=Object(n.a)(w,2),S=I[0],D=I[1],P=Object(u.useState)(10),R=Object(n.a)(P,2),H=R[0],T=R[1],F=Object(u.useState)(1),V=Object(n.a)(F,2),B=V[0],E=V[1],A=Object(u.useState)(""),W=Object(n.a)(A,2),z=W[0],L=W[1],M=Object(u.useState)(""),Y=Object(n.a)(M,2),_=Y[0],q=Y[1],G=Object(u.useState)(""),J=Object(n.a)(G,2),U=J[0],K=J[1],Q=Object(u.useState)(""),X=Object(n.a)(Q,2),Z=X[0],$=X[1],ee=Object(u.useState)(""),te=Object(n.a)(ee,2),ae=te[0],ne=te[1],ie=Object(u.useState)(""),ce=Object(n.a)(ie,2),re=ce[0],le=ce[1],oe=Object(u.useState)(""),se=Object(n.a)(oe,2),de=se[0],be=se[1],je=Object(u.useState)(!1),ue=Object(n.a)(je,2),pe=ue[0],me=ue[1],Oe=Object(u.useState)(null),xe=Object(n.a)(Oe,2),he=xe[0],ve=xe[1];Object(u.useEffect)((function(){a(Object(C.e)({page:B-1,size:H,companyId:z,companyRegisteredName:_,type:U,isOpen:Z,isReportSent:ae,isVatPaid:re,isActive:de,s
1ort:"id,desc"}))}),[a,S,B,H,z,_,U,Z,ae,re,de]);var fe=function(){D(!S)},ge=p.a.useMemo((function(){return[{Header:t("View"),className:"justify-center",id:"view",accessor:function(e){return Object(k.jsx)(N.a,{columnName:t("View"),content:Object(k.jsx)(i.a,{className:d.buttonLink,variant:"outlined",color:"default",onClick:function(){ve(null===e||void 0===e?void 0:e.id),me(!0)},children:Object(k.jsx)(c.a,{children:"remove_red_eye"})})})}},{Header:function(){return t("Id")},id:"id",accessor:"id",Cell:function(e){return Object(k.jsx)(N.a,{columnName:t("Id"),content:Object(k.jsx)("span",{children:e.value})})}},{Header:Object(k.jsx)(s.a,{label:t("Company Id"),placeholder:"Company Id",value:z,setValue:L,setPage:E}),id:"companyId",accessor:"companyId",Cell:function(e){return Object(k.jsx)(N.a,{columnName:t("Company Id"),content:Object(k.jsx)("span",{children:e.value})})}},{Header:Object(k.jsx)(s.a,{label:t("Company Name"),placeholder:"Company Name",value:_,setValue:q,setPage:E}),id:"companyRegisteredName",accessor:"companyRegisteredName",Cell:function(e){return Object(k.jsx)(N.a,{columnName:t("Company Name"),content:Object(k.jsx)("span",{children:e.value})})}},{Header:function(){return t("Name")},id:"name",accessor:"name",Cell:function(e){return Object(k.jsx)(N.a,{columnName:t("Name"),content:Object(k.jsx)("span",{children:e.value})})}},{Header:function(){return Object(k.jsxs)("div",{children:[Object(k.jsx)("div",{className:"pb-5",children:t("Type")}),Object(k.jsxs)(r.a,{id:"type",value:U,displayEmpty:!0,className:"min-w-84 max-w-320",required:!1,onChange:function(e){return K(e.target.value)},children:[Object(k.jsx)(l.a,{value:"",children:t("All")},""),h.Dd.map((function(e){return Object(k.jsx)(l.a,{value:e,children:t(e)},e)}))]})]})},id:"type",accessor:"type",Cell:function(e){return Object(k.jsx)(N.a,{columnName:t("Type"),content:Object(k.jsx)("span",{children:e.value})})}},{Header:function(){return t("Start Date")},id:"startDate",accessor:"startDate",Cell:function(e){return Object(k.jsx)(N.a,{columnName:t("Start Date"),content:Object(k.jsx)("span",{children:e.value?j()(e.value).format("DD.MM.YYYY"):t("(not set)")})})}},{Header:function(){return t("End Date")},id:"endDate",accessor:"endDate",Cell:function(e){return Object(k.jsx)(N.a,{columnName:t("End Date"),content:Object(k.jsx)("span",{children:e.value?j()(e.value).format("DD.MM.YYYY"):t("(not set)")})})}},{Header:Object(k.jsx)(f.a,{label:"Open",value:Z,setValue:$,setPage:E}),id:"isOpen",accessor:"isOpen",Cell:function(e){return Object(k.jsx)(N.a,{columnName:t("Open"),content:Object(k.jsx)("span",{children:e.value?t("\u2705"):t("\u274c")})})}},{Header:Object(k.jsx)(f.a,{label:"Report Sent",value:ae,setValue:ne,setPage:E}),id:"isReportSent",accessor:"isReportSent",Cell:function(e){return Object(k.jsx)(N.a,{columnName:t("Report Sent"),content:Object(k.jsx)("span",{children:e.value?t("\u2705"):t("\u274c")})})}},{Header:Object(k.jsx)(f.a,{label:"Vat Paid",value:re,setValue:le,setPage:E}),id:"isVatPaid",accessor:"isVatPaid",Cell:function(e){return Object(k.jsx)(N.a,{columnName:t("Vat Paid"),content:Object(k.jsx)("span",{children:e.value?t("\u2705"):t("\u274c")})})}},{Header:Object(k.jsx)(f.a,{label:"Active",value:de,setValue:be,setPage:E}),id:"isActive",accessor:"isActive",Cell:function(e){return Object(k.jsx)(N.a,{columnName:t("Active"),content:Object(k.jsx)("span",{children:e.value?t("\u2705"):t("\u274c")})})}}]}),[t,d,z,_,U,Z,ae,re,de]);return Object(k.jsx)(o.a,{classes:v.n,header:Object(k.jsx)(g.a,{title:t("Vat Period"),icon:"account_balance"}),content:Object(k.jsxs)("div",{className:"p-8 w-full",children:[Object(k.jsx)(y.a,{columns:ge,data:Array.isArray(null===b||void 0===b?void 0:b.content)&&(null===b||void 0===b?void 0:b.content)||[],tablePagination:b,page:B,onChangePage:function(e){E(e.target.value)},pageSize:H,changePageSize:function(e){T(e.target.value)}}),pe&&Object(k.jsx)(x.a,{openDialog:pe,handleCloseDialog:function(){me(!1),fe()},vatPeriodId:he})]}),sidebarInner:!0})}))}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.