????
Current Path : C:/inetpub/vhost/quanlycanbo.gdtvietnam.com/www/static/js/ |
Current File : C:/inetpub/vhost/quanlycanbo.gdtvietnam.com/www/static/js/110.b0f8e731.chunk.js |
(this["webpackJsonpgdt-qlcb"]=this["webpackJsonpgdt-qlcb"]||[]).push([[110],{1243:function(e,t,n){},1452:function(e,t,n){},1461:function(e,t){},1462:function(e,t){},1463:function(e,t){},1464:function(e,t){},1465:function(e,t){},1516:function(e){e.exports=JSON.parse('{"attachment":{"clickToDownload":"Nh\u1ea5n v\xe0o \u0111\u1ec3 t\u1ea3i v\u1ec1","noAttachment":"Kh\xf4ng c\xf3 t\u1eadp tin \u0111\xednh k\xe8m n\xe0o"},"bookmark":{"noBookmark":"Kh\xf4ng c\xf3 \u0111\xe1nh d\u1ea5u n\xe0o"},"core":{"askingPassword":{"requirePasswordToOpen":"T\u1eadp tin y\xeau c\u1ea7u m\u1eadt kh\u1ea9u \u0111\u1ec3 m\u1edf","submit":"G\u1eedi \u0111i"},"wrongPassword":{"submit":"G\u1eedi \u0111i","tryAgain":"M\u1eadt kh\u1ea9u kh\xf4ng \u0111\xfang. Xin th\u1eed l\u1ea1i"}},"defaultLayout":{"attachment":"\u0110\xednh k\xe8m","bookmark":"\u0110\xe1nh d\u1ea5u","thumbnail":"H\xecnh nh\u1ecf"},"download":{"download":"T\u1ea3i v\u1ec1"},"drop":{"dragDropFile":"K\xe9o v\xe0 th\u1ea3 t\u1eadp tin PDF \u1edf \u0111\xe2y"},"fullScreen":{"enterFullScreen":"To\xe0n m\xe0n h\xecnh"},"localeSwitcher":{"switchLocale":"Chuy\u1ec3n ng\xf4n ng\u1eef"},"open":{"openFile":"M\u1edf t\u1eadp tin"},"pageNavigation":{"goToFirstPage":"Trang \u0111\u1ea7u","goToLastPage":"Trang cu\u1ed1i","goToNextPage":"Trang k\u1ebf","goToPreviousPage":"Trang tr\u01b0\u1edbc"},"print":{"cancel":"Hu\u1ef7","preparingDocument":"Chu\u1ea9n b\u1ecb t\xe0i li\u1ec7u ...","print":"In"},"properties":{"author":"T\xe1c gi\u1ea3","close":"\u0110\xf3ng","creationDate":"Ng\xe0y t\u1ea1o","creator":"Ng\u01b0\u1eddi t\u1ea1o","fileName":"T\xean t\u1ec7p tin","fileSize":"K\xedch th\u01b0\u1edbc t\u1ec7p tin","keywords":"T\u1eeb kho\xe1","modificationDate":"Ng\xe0y ch\u1ec9nh s\u1eeda","pageCount":"S\u1ed1 trang","pdfProducer":"Ph\u1ea7n m\u1ec1m t\u1ea1o PDF","pdfVersion":"Phi\xean b\u1ea3n PDF","showProperties":"Th\xf4ng tin t\u1eadp tin","subject":"Ch\u1ee7 \u0111\u1ec1","title":"Ti\xeau \u0111\u1ec1"},"rotate":{"rotateBackward":"Xoay ng\u01b0\u1ee3c chi\u1ec1u kim \u0111\u1ed3ng h\u1ed3","rotateForward":"Xoay chi\u1ec1u kim \u0111\u1ed3ng h\u1ed3"},"scrollMode":{"horizontalScrolling":"Cu\u1ed9n ngang","verticalScrolling":"Cu\u1ed9n d\u1ecdc","wrappedScrolling":"Cu\u1ed9n l\u01b0\u1edbi"},"search":{"close":"\u0110\xf3ng","enterToSearch":"Nh\u1ea5n Enter \u0111\u1ec3 t\xecm","matchCase":"Gi\u1ed1ng ch\u1eef hoa th\u01b0\u1eddng","nextMatch":"K\u1ebft qu\u1ea3 ti\u1ebfp theo","previousMatch":"K\u1ebft qu\u1ea3 tr\u01b0\u1edbc","search":"T\xecm ki\u1ebfm","wholeWords":"To\xe0n b\u1ed9 t\u1eeb"},"selectionMode":{"handTool":"C\u1ea7m tay","textSelectionTool":"Ch\u1ecdn v\u0103n b\u1ea3n"},"toolbar":{"moreActions":"Nhi\u1ec1u t\xe1c v\u1ee5 kh\xe1c"},"zoom":{"actualSize":"K\xedch th\u01b0\u1edbc th\u1ef1c s\u1ef1","pageFit":"V\u1eeba trang","pageWidth":"V\u1eeba chi\u1ec1u r\u1ed9ng","zoomIn":"Ph\xf3ng to","zoomOut":"Thu nh\u1ecf"}}')},1577:function(e,t,n){"use strict";n.r(t);var c=n(5),a=n(14),r=n(1),i=n(0),o=n.n(i),l=n(737),s=n(693),u=n(6),d=function(e){var t,n=e.onFolderClick,c=Object(u.a)(e,["onFolderClick"]),a=c.TypeName,i=c.Uuid;return i?Object(r.jsx)("div",{className:"px-2 col-md-3",children:Object(r.jsx)("div",{className:"card shadow-none",style:{cursor:"pointer"},onClick:n,children:Object(r.jsxs)("div",{className:"card-body d-flex",children:[Object(r.jsx)("div",{className:"mr-3",children:Object(r.jsx)("i",{className:"fas fa-folder-open fa-4x text-warning card-img"})}),Object(r.jsx)("div",{children:Object(r.jsx)("h3",{className:"card-title",children:(t=a,t||"Kh\xf4ng c\xf3 th\xf4ng tin")})})]})})},i):null},f=n(1237),b=function(){return Object(r.jsx)("div",{className:"col-md-3 p-4",children:Object(r.jsxs)("div",{className:"d-flex",children:[Object(r.jsx)(f.a,{variant:"rect",width:56,height:56}),Object(r.jsxs)("div",{className:"flex-grow-1 ml-4",children:[Object(r.jsx)(f.a,{variant:"rect",width:"90%",height:16,className:"mb-3"}),Object(r.jsx)(f.a,{variant:"rect",width:"75%",height:16})]})]})})},h=o.a.memo(b),j=(n(1243),function(e){var t=e.children;return Object(r.jsx)("div",{className:"d-flex align-items-center justify-content-center flex-column m-placeholder-view",children:t})}),m=function(e){var t=e.status,n=e.reload,c=e.documentTypes;return"pending"===t?Object(r.jsx)("div",{className:"row px-3",children:Array.from(new Array(8).keys()).map((function(e){return Object(r.jsx)(h,{},e)}))}):"error"===t?Object(r.jsxs)(j,{children:[Object(r.jsx)("i",{className:"fas fa-exclamation text-danger fa-4x mb-2"}),Object(r.jsx)("h4",{className:"text-danger",children:"\u0110\xe3 x\u1ea3y ra l\u1ed7i. Vui l\xf2ng th\u1eed l\u1ea1i"}),Object(r.jsxs)("button",{className:"btn btn-primary",onClick:n,children:[Object(r.jsx)("i",{className:"fas fa-sync mr-2"}),"Th\u1eed l\u1ea1i"]})]}):"idle"===t?null:0===c.length?Object(r.jsxs)(j,{children:[Object(r.jsx)("i",{className:"fas fa-folder text-muted fa-4x mb-2"}),Object(r.jsx)("h4",{className:"text-muted",children:"Ch\u01b0a c\xf3 th\u01b0 m\u1ee5c. H\xe3y t\u1ea1o m\u1edbi th\u01b0 m\u1ee5c!"})]}):Object(r.jsx)("div",{className:"row px-3",children:c.map(d)})},O=o.a.memo(m),v=n(110),p=n(671),g=n(35),x=(n(1452),"LEFT"),y="RIGHT",w=function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,c=e,a=[];c<=t;)a.push(c),c+=n;return a};var k=function(e){var t=e.currentPage,n=e.totalElements,c=e.pageLimit,a=e.pageNeighbours,o=void 0===a?1:a,l=e.onPageChange,s="number"===typeof o?Math.max(0,Math.min(o,2)):0,u=Math.ceil(n/c),d=function(e){var t=Math.max(0,Math.min(e,u));l(t)},f=function(){return d(t-2*o-1)},b=function(){return d(t+2*s+1)},h=Object(i.useCallback)((function(){var e=2*s+3;if(u>e+2){var n,c=t-s,a=t+s,r=u-1,i=c>2?c:2,o=a<r?a:r,l=e-(n=w(i,o)).length-1,d=i>2,f=o<r,b=x,h=y;if(d&&!f){var j=w(i-l,i-1);n=[b].concat(Object(g.a)(j),Object(g.a)(n))}else if(!d&&f){var m=w(o+1,o+l);n=[].concat(Object(g.a)(n),Object(g.a)(m),[h])}else d&&f&&(n=[b].concat(Object(g.a)(n),[h]));return[1].concat(Object(g.a)(n),[u])}return w(1,u)}),[t,s,u]);return n?1===u?null:Object(r.jsx)("div",{className:"btn-group",role:"group",children:h().map((function(e,n){return e===x?Object(r.jsxs)("button",{onClick:f,className:"btn btn-outline-primary",children:[Object(r.jsx)("i",{className:"fas fa-step-backward m-icon"}),Object(r.jsx)("span",{className:"sr-only",children:"Quay l\u1ea1i"})]},n):e===y?Object(r.jsxs)("button",{onClick:b,className:"btn btn-outline-primary",children:[Object(r.jsx)("i",{className:"fas fa-step-forward m-icon"}),Object(r.jsx)("span",{className:"sr-only",children:"Ti\u1ebfp theo"})]},n):Object(r.jsx)("button",{onClick:function(){return function(e){return d(e)}(e)},className:"btn ".concat(t===e?" btn-primary":" btn-outline-primary"),children:e},n)}))}):null},N=n(139),C=n(1257),S=n(1244),T=n(1027),D=n(1004),B=n(39);function A(){var e=Object(v.a)(["\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n"]);return A=function(){return e},e}var U=[{label:"T\u1ea3i xu\u1ed1ng",icon:"fas fa-download"},{label:"Xem",icon:"fas fa-folder-open"}],E=N.a.h5(A()),P=function(e){var t=e.onOpen,n=e.onDownload,a=(e.onDelete,Object(u.a)(e,["onOpen","onDownload","onDelete"])),i=(a||{}).isOpen;return Object(r.jsxs)(T.a,Object(c.a)(Object(c.a)({},a),{},{direction:"left",children:[Object(r.jsx)(C.a,{tag:"span","data-toggle":"dropdown","aria-expanded":i,children:Object(r.jsx)("i",{className:"fas fa-ellipsis-h circle-icon-button"})}),Object(r.jsx)(S.a,{children:U.map((function(e,c){var a=e.label,i=e.icon;return Object(r.jsxs)(D.a,{className:"pl-4 p-2",id:c,onClick:function(){return 0===(e=c)?n():1===e?t():void 0;var e},children:[Object(r.jsx)("i",{className:"".concat(i," mr-3")}),a]},c)}))})]}))},F=function(e){var t,n=e.onDownload,c=e.onOpen,o=e.onDelete,l=Object(u.a)(e,["onDownload","onOpen","onDelete"]),s=l||{},d=s.Subject,f=s.OrganName,b=s.CreatedDate,h=Object(i.useState)(!1),j=Object(a.a)(h,2),m=j[0],O=j[1],v=Object(i.useCallback)((function(){return O((function(e){return!e}))}),[]),p=Object(i.useCallback)((function(){c(l)}),[l,c]),g=Object(i.useCallback)((function(){n(l)}),[l,n]),x=Object(i.useCallback)((function(){o(l)}),[l,o]);return l&&l.Uuid?Object(r.jsx)("div",{className:"col-md-3 p-2",children:Object(r.jsx)("div",{className:"p-3 border rounded shadow-sm bg-white",children:Object(r.jsxs)("div",{className:"d-flex justify-content-between",style:{textOverflow:"ellipsis"},children:[Object(r.jsxs)("div",{className:"d-flex flex-shrink-1",onClick:g,style:{cursor:"pointer"},children:[Object(r.jsx)("div",{className:"mr-3",children:Object(r.jsx)("i",{className:"fas fa-file-word fa-4x card-img text-primary"})}),Object(r.jsxs)("div",{children:[Object(r.jsx)(E,{className:"card-title mb-0",children:d}),Object(r.jsx)("p",{className:"card-text mb-0 ".concat(f?"":"text-muted"),children:(t=f,t||"Kh\xf4ng c\xf3 th\xf4ng tin c\xe1n b\u1ed9")}),Object(r.jsxs)("p",{className:"card-text",children:["Ng\xe0y \u0111\u0103ng: ",B.e.format(b)]})]})]}),Object(r.jsx)(P,{isOpen:m,toggle:v,onOpen:p,onDownload:g,onDelete:x})]})})}):null},q=o.a.memo(F),L=n(15);function M(){var e=Object(v.a)(["\n min-width: 200px !important;\n height: 38px;\n border: 1px solid hsl(0,0%,80%);\n"]);return M=function(){return e},e}var K=N.a.input(M());function V(e){var t=e.onBackward,n=e.reload,i=e.disableReload,l=e.onSearchSubmit,s=o.a.useState(void 0),u=Object(a.a)(s,2),d=u[0],f=u[1],b=d||{},h=b.Subject,j=void 0===h?"":h,m=b.OrganName,O=void 0===m?"":m,v=function(e,t){var n=o.a.useState(e),c=Object(a.a)(n,2),r=c[0],i=c[1];return o.a.useEffect((function(){var n=setTimeout((function(){i(e)}),t);return function(){clearTimeout(n)}}),[e,t]),r}(d,500);o.a.useEffect((function(){void 0!==v&&l(v)}),[v,l]);var p=function(e){var t=e.target,n=t.value,a=t.name;f((function(e){return Object(c.a)(Object(c.a)({},e),{},Object(L.a)({},a,n))}))};return Object(r.jsx)("div",{className:"card",children:Object(r.jsx)("div",{className:"card-body",children:Object(r.jsxs)("div",{className:"d-flex justify-content-between",children:[Object(r.jsxs)("div",{className:"d-flex",children:[Object(r.jsx)(K,{className:"form-control mr-3",name:"Subject",value:j,onChange:p,placeholder:"T\xecm theo t\xean v\u0103n b\u1ea3n"}),Object(r.jsx)(K,{className:"form-control",placeholder:"T\xecm theo t\xean c\xe1n b\u1ed9",name:"OrganName",value:O,onChange:p})]}),Object(r.jsx)("div",{className:"flex-grow-1",children:Object(r.jsx)("div",{className:"d-flex justify-content-end",children:Object(r.jsxs)("div",{className:"d-flex",children:[Object(r.jsxs)("button",{className:"btn btn-primary mr-3",disabled:i,onClick:n,children:[Object(r.jsx)("i",{className:"fas fa-sync mr-3"}),"T\u1ea3i l\u1ea1i"]}),Object(r.jsxs)("button",{onClick:t,className:"btn btn-primary",children:[Object(r.jsx)("i",{className:"fas fa-backward mr-3"}),"Quay l\u1ea1i"]})]})})})]})})})}var I=o.a.memo(V),R=n(99),z=n(714),X=n(797),G=n(822),H=n(1466),W=(n(1515),n(1516)),$=function(e){var t=e.height,n=void 0===t?"100vh":t,o=e.fileUrl,l=Object(u.a)(e,["height","fileUrl"]),s=Object(i.useState)(""),d=Object(a.a)(s,2),f=d[0],b=d[1],h=Object(H.defaultLayoutPlugin)();return Object(i.useEffect)((function(){b(""),b(o)}),[o]),f&&Object(r.jsx)("div",{style:{height:n},children:Object(r.jsx)(G.Worker,{workerUrl:"/plugins/pdfjs-dist/pdf.worker.min.js",children:Object(r.jsx)(G.Viewer,Object(c.a)(Object(c.a)({},l),{},{fileUrl:f,plugins:[h]}))})})};$.defaultProps={localization:W};var J=$,Q="https://view.officeapps.live.com/op/embed.aspx?src=",_=[".pdf",".doc",".docx"];function Y(e){var t=e.activeDoc,n=e.onClose,c=o.a.useState(Q),i=Object(a.a)(c,2),l=i[0],s=i[1],u=function(){s("https://docs.google.com/gview?url=")};return Object(r.jsx)(X.a,{open:void 0!==t,onClose:n,children:function(){if(!t)return null;if(!t.Uuid)return null;if(!_.includes(t.Extension))return Object(r.jsxs)("div",{className:"w-100 h-100 d-flex flex-column align-items-center justify-content-center",children:[Object(r.jsx)("i",{className:"fas fa-exclamation-circle text-danger fa-3x"}),Object(r.jsx)("h3",{className:"mt-3",children:"\u0110\u1ecbnh d\u1ea1ng v\u0103n b\u1ea3n kh\xf4ng \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3!"}),Object(r.jsxs)("h3",{children:["B\u1ea1n ch\u1ec9 c\xf3 th\u1ec3 xem \u0111\u01b0\u1ee3c c\xe1c v\u0103n b\u1ea3n c\xf3 \u0111\u1ecbnh d\u1ea1ng ",_.join(", ")]})]});var e=t.Extension,n=p.a.getDocUrlByUuid(t.Uuid),c="".concat(Q).concat(encodeURIComponent(n));return e===_[0]?Object(r.jsx)(J,{fileUrl:n,height:"100%"}):Object(r.jsx)("iframe",{onError:u,id:"doc-iframe",title:"Xem v\u0103n b\u1ea3n",src:c,width:"100%",height:"100%",frameBorder:"0",children:l===Q?Object(r.jsxs)(r.Fragment,{children:["This is an embedded",Object(r.jsx)("a",{target:"_blank",rel:"noreferrer",href:"http://office.com",children:"Microsoft Office"})," document, powered by ",Object(r.jsx)("a",{rel:"noreferrer",target:"_blank",href:"http://office.com/webapps",children:"Office Online"}),"."]}):null})}()})}var Z=o.a.memo(Y),ee=function(){this.query="",this.get=function(){return Promise.resolve(this.tableUrl+this.query)},this.table=function(e){return this.tableUrl="/".concat(e),this},this.toString=function(e){var t=this;return Object.entries(e).reduce((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,c=Object(a.a)(n,2),r=c[0],i=c[1],o=arguments.length>2?arguments[2]:void 0;return null===i||void 0===i?e:e.concat("".concat(t.query?"&":te(o),"$").concat(r,"=").concat(i))}),this.query)}},te=function(e){return 0===e?"?":"&"};ee.prototype.table=function(e){this.tableUrl="/"+e};var ne,ce=function(e){return Array.isArray(e)?e.join(" and "):e};["filter","top","skip","count","search","expand","select","contains","orderBy"].forEach((function(e){ee.prototype[e]=function(t){this.query?this.query="".concat(this.query,"&$").concat(e,"=").concat(ce(t)):this.query="?$".concat(e,"=").concat(ce(t))}})),ne=ee.prototype,Object.keys(ne).forEach((function(e){var t=ne[e];"function"!==typeof t||/\breturn\b/.test(t)||(ne[e]=function(){return t.apply(this,arguments),this})}));var ae=ee;function re(){var e=Object(v.a)(["\n height: 48vh;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n"]);return re=function(){return e},e}var ie=12,oe={top:ie,skip:0,count:!0,filter:void 0},le=function(e,t,n){var c,r=Object(a.a)(t,2),i=r[0],o=r[1];return o?e.concat("".concat(0===n?"?":"&","$").concat("filter"!==i?"".concat(i,"=").concat(o):(c=o)?"filter=".concat(function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).Subject;return"contains(Subject, '".concat(void 0===e?"":e,"')")}(c)).concat(function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).OrganName;return" and contains(OrganName, '".concat(void 0===e?"":e,"')")}(c)).concat(function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).DocTypeUuid,t=void 0===e?"":e;return t?" and DocTypeUuid eq ".concat(t," and Status eq true"):" and Status eq true"}(c)):"")):e},se=N.a.div(re()),ue=Object(R.h)(),de=function(e){return{title:e,icon:"error",confirmButtonText:"Th\u1eed l\u1ea1i",cancelButtonText:"\u0110\xf3ng",cancelButtonColor:"#d33"}},fe=function(e){return function(t){t.isConfirmed&&e()}},be=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Kh\xf4ng t\xecm th\u1ea5y v\u0103n b\u1ea3n. Vui l\xf2ng th\u1eed l\u1ea1i";return ue.fire(de(t)).then(fe(e))};function he(e){var t=e.activeFolder,n=e.onBackward,l=o.a.useState(oe),u=Object(a.a)(l,2),d=u[0],f=u[1],b=o.a.useState(void 0),j=Object(a.a)(b,2),m=j[0],O=j[1],v=d.skip,g=d.filter,x=g||{},y=x.Subject,w=x.OrganName;o.a.useEffect((function(){(new ae).table("Documents").select("123123").expand("321312").orderBy("asd asc").filter(["contains(Subject, '12')","asd=123"]).search("333").get()}),[]);var N=Object(i.useCallback)((function(){return p.a.getAll("object"===typeof(e=Object(c.a)(Object(c.a)({},d),{},{filter:Object(c.a)(Object(c.a)({},d.filter),{},{DocTypeUuid:null===t||void 0===t?void 0:t.Uuid})}))?Object.entries(e).reduce(le,""):"");var e}),[d,t]),C=Object(i.useCallback)((function(e){f((function(t){return Object(c.a)(Object(c.a)({},t),{},{skip:(e-1)*ie})}))}),[]),S=Object(i.useCallback)((function(e){f((function(t){return Object(c.a)(Object(c.a)({},t),{},{filter:Object(c.a)(Object(c.a)({},t.filter),e)})}))}),[]),T=Object(i.useCallback)((function(){O(void 0)}),[]),D=Object(i.useCallback)((function(e){if(!e)return be((function(){return D(e)}));O(e)}),[]),B=Object(i.useCallback)((function(e){if(!e)return be((function(){return B(e)}));var t=e.Subject||"",n={pendingSwal:{title:"\u0110ang t\u1ea3i xu\u1ed1ng v\u0103n b\u1ea3n ".concat(t)},callAPIFn:function(){return p.a.downloadDoc(e)},onSuccess:{getSwal:function(){return"V\u0103n b\u1ea3n ".concat(t," \u0111\xe3 \u0111\u01b0\u1ee3c t\u1ea3i xu\u1ed1ng")}},onError:{getSwal:"\u0110\xe3 x\u1ea3y ra l\u1ed7i ho\u1eb7c v\u0103n b\u1ea3n kh\xf4ng c\xf2n t\u1ed3n t\u1ea1i tr\xean h\u1ec7 th\u1ed1ng"}};return z.a.didOpen(n)}),[]),A=Object(i.useMemo)((function(){return v/ie+1}),[v]),U=Object(s.a)(N,!1),E=U.execute,P=U.status,F=U.value,L=(F=void 0===F?{}:F)["@odata.count"],M=void 0===L?ie:L,K=F.value,V=void 0===K?[]:K;o.a.useEffect((function(){t&&(t.Uuid&&E())}),[t,E]);var R=Object(i.useCallback)((function(e,t){return Object(i.createElement)(q,Object(c.a)(Object(c.a)({},e),{},{onOpen:D,onDownload:B,key:t}))}),[D,B]);return Object(r.jsxs)(r.Fragment,{children:[Object(r.jsx)(I,{disableSearchInput:V.length<=12,onBackward:n,disableReload:"pending"===P,isSearched:void 0!==y,onSearchSubmit:S,reload:E}),"pending"===P?Object(r.jsx)("div",{className:"row mb-4 mt-2",children:Array.from(new Array(ie).keys()).map((function(e){return Object(r.jsx)(h,{},e)}))}):"error"===P?Object(r.jsxs)(se,{children:[Object(r.jsx)("i",{className:"fas fa-exclamation fa-3x text-danger"}),Object(r.jsx)("h4",{className:"mt-3",children:"\u0110\xe3 x\u1ea3y ra l\u1ed7i. Vui l\xf2ng th\u1eed l\u1ea1i"}),Object(r.jsx)("button",{className:"btn btn-danger",onClick:E,children:"Th\u1eed l\u1ea1i"})]}):"success"===P?0===V.length?Object(r.jsxs)(se,{children:[Object(r.jsx)("i",{className:"far fa-file-word fa-3x mb-2 text-muted"}),Object(r.jsx)("h4",{className:"text-muted",children:g?"Kh\xf4ng c\xf3 v\u0103n b\u1ea3n ph\xf9 h\u1ee3p ".concat(y?"v\u1edbi t\u1eeb kh\xf3a ".concat(y):""," \n ").concat(w?"".concat(w&&y?" v\xe0":" v\u1edbi"," t\xean c\xe1n b\u1ed9 ").concat(w):"",".\n Vui l\xf2ng th\u1eed c\xe1c t\u1eeb kh\xf3a ho\u1eb7c t\xean c\xe1n b\u1ed9 kh\xe1c"):"Kh\xf4ng c\xf3 v\u0103n b\u1ea3n thu\u1ed9c lo\u1ea1i ".concat((null===t||void 0===t?void 0:t.TypeName)||"n\xe0y",",\n vui l\xf2ng th\u1eed m\u1ed9t lo\u1ea1i v\u0103n b\u1ea3n kh\xe1c")})]}):Object(r.jsx)("div",{className:"row my-2",children:V.map(R)}):null,Object(r.jsx)("div",{className:"justify-content-center d-flex align-items-center",children:Object(r.jsx)(k,{pageLimit:ie,onPageChange:C,currentPage:A,totalElements:M})}),Object(r.jsx)(Z,{activeDoc:m,onClose:T})]})}var je=o.a.memo(he);t.default=function(){var e=o.a.useState(void 0),t=Object(a.a)(e,2),n=t[0],u=t[1],d=Object(i.useCallback)((function(){return l.a.getAll().then((function(e){return e.value.map((function(e){return Object(c.a)(Object(c.a)({},e),{},{onFolderClick:function(){return u(e)}})}))}))}),[]),f=Object(i.useCallback)((function(){u(void 0)}),[]),b=Object(s.a)(d),h=b.status,j=b.execute,m=b.value,v=void 0===m?[]:m;return n?Object(r.jsx)(je,{onBackward:f,activeFolder:n}):Object(r.jsx)(O,{reload:j,documentTypes:v,status:h})}},671:function(e,t,n){"use strict";var c=n(10),a=n(34),r=n(11),i=n(17),o=n(686),l=n(7),s=n(63),u=n(220),d=n.n(u),f=function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(){var e;return Object(c.a)(this,n),(e=t.call(this,"/Documents")).downloadDoc=function(t){var n=t.Uuid,c=t.Subject;return e.GetAuthenADMINODATA("/Download?uuid=".concat(n),{responseType:"blob",noAlert:!0,noLoading:!0}).then((function(e){return d()(e,c)}))},e.getDocUrlByUuid=function(t){return l.i+l.d+e.prefix+e.path+"/Download?uuid=".concat(t)},e}return Object(a.a)(n,[{key:"addDocument",value:function(e){return this.add(e)}},{key:"uploadFileDocument",value:function(e,t){return this.upload(e,t)}},{key:"getByUuid",value:function(e){return this.getAll("(".concat(e,")"),{noAlert:!0,noLoading:!0})}},{key:"getBase64",value:function(e){var t=this.getDocUrlByUuid(e);return fetch(t,Object(s.g)("GET",null,!0)).then((function(e){return e.blob()})).then(URL.createObjectURL)}}]),n}(o.a);t.a=new f},686:function(e,t,n){"use strict";var c=n(10),a=n(11),r=n(17),i=function(e){Object(a.a)(n,e);var t=Object(r.a)(n);function n(e){var a;return Object(c.a)(this,n),(a=t.call(this,"/SDoc",e)).getAll=function(e,t){return a.SearchAllOdata(e,t)},a.add=function(e){return a.InsertODATA(e)},a.upload=function(e,t){return a.UploadODataSdoc("/upload",!0,!1,t,e)},a.edit=function(e,t){return a.UpdateODATA("(".concat(e,")"),t)},a.delete=function(e){return a.DeleteADMINODATA("(".concat(e,")"),{noLoading:"loadCC",noAlert:"lertCC"})},a}return n}(n(109).a);t.a=i},693:function(e,t,n){"use strict";var c=n(14),a=n(0);t.a=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=Object(a.useState)("idle"),r=Object(c.a)(n,2),i=r[0],o=r[1],l=Object(a.useState)(void 0),s=Object(c.a)(l,2),u=s[0],d=s[1],f=Object(a.useState)(void 0),b=Object(c.a)(f,2),h=b[0],j=b[1],m=Object(a.useRef)(!1),O=Object(a.useCallback)((function(){return o("pending"),j(null),e().then((function(e){m.current&&(d(e),o("success"))})).catch((function(e){m.current&&(j(e),o("error"))}))}),[e]);return Object(a.useEffect)((function(){t&&O()}),[O,t]),Object(a.useEffect)((function(){return m.current=!0,function(){m.current=!1}}),[]),{execute:O,status:i,value:u,error:h,setValue:d,setStatus:o}}},714:function(e,t,n){"use strict";var c=n(5),a=n(10),r=n(99),i=n(809),o=n.n(i),l=Object(r.h)().mixin({cancelButtonColor:"#d33"});t.a=new function e(){var t=this;Object(a.a)(this,e),this.defaultErrorSwal={title:"\u0110\xe3 x\u1ea3y ra l\u1ed7i!",text:"Vui l\xf2ng th\u1eed l\u1ea1i",confirmButtonText:"Th\u1eed l\u1ea1i",cancelButtonText:"\u0110\xf3ng",icon:"error"},this.defaultSuccessSwal={icon:"success",showConfirmButton:!0,showCancelButton:!1,confirmButtonText:"X\xe1c nh\u1eadn",allowOutsideClick:!0,title:"Th\xe0nh c\xf4ng",text:""},this.handleSuccess=function(e,n){return function(c){"function"===typeof n&&n(c);var a=void 0!==e?o()(t.defaultSuccessSwal,"string"===typeof e?{title:e}:"object"===typeof e(c)?e(c):{title:e(c)}):t.defaultSuccessSwal;return l.isVisible()?l.update(a):l.fire(a)}},this.handleError=function(e){return function(n){var a=e.onError,r=(a=void 0===a?{}:a).getSwal,i=a.callback;"function"===typeof i&&i(n);return l.fire(Object(c.a)({preConfirm:function(){return t.didOpen(e,!0)}},"string"===typeof r?o()(t.defaultErrorSwal,{title:r}):"function"===typeof r?o()(t.defaultErrorSwal,r(n)):t.defaultErrorSwal))}},this.didOpen=function(e,n){var c=e.confirmSwal,a=e.pendingSwal,r=e.callAPIFn,i=e.onSuccess,s=(i=void 0===i?{}:i).getSwal,u=i.callback;if("function"!==typeof r)throw new Error("WTF Man");var d={icon:"info",title:"\u0110ang x\u1eed l\xfd",showConfirmButton:!1,showCancelButton:!1,allowOutsideClick:!l.isLoading,didOpen:function(){l.showLoading(),r().then(t.handleSuccess(s,u)).catch(t.handleError(e)).finally(l.hideLoading)}},f=function(){return l.fire(void 0===a?d:"object"===typeof a?o()(d,a):"string"===typeof a?o()(d,{title:a}):d)},b={icon:"question",confirmButtonText:"X\xe1c nh\u1eadn",cancelButtonText:"H\u1ee7y",text:"Thao t\xe1c n\xe0y kh\xf4ng th\u1ec3 ho\xe0n t\xe1c!",preConfirm:function(e){if(e)return f()}};return c?n?f():l.fire(o()(b,"object"===typeof c?c:"string"===typeof c?{title:c}:{})):f()}}},737:function(e,t,n){"use strict";var c=n(10),a=n(11),r=n(17),i=function(e){Object(a.a)(n,e);var t=Object(r.a)(n);function n(){return Object(c.a)(this,n),t.call(this,"/DocumentTypes")}return n}(n(686).a);t.a=new i},797:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var c=n(1),a=(n(0),n(805)),r=n(806),i=n(807);function o(e){var t=e.renderCustom,n=e.renderButton,o=e.children,l=e.title,s=e.onClose,u=e.open,d=e.style;return Object(c.jsxs)(a.a,{open:u,onClose:s,style:d,children:[Object(c.jsx)(r.a,{renderCustom:t,renderButton:n,title:l,onClose:s}),Object(c.jsx)(i.a,{children:o})]})}},805:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var c=n(5),a=n(1),r=n(0),i=n.n(r),o=n(812),l=n(923),s=i.a.forwardRef((function(e,t){return Object(a.jsx)(l.a,Object(c.a)({direction:"up",ref:t},e))}));function u(e){var t=e.children,n=e.onClose,c=e.open,r=e.style;return Object(a.jsx)(o.a,{style:r,disableEnforceFocus:!0,fullScreen:!0,open:c,onClose:n,TransitionComponent:s,children:t})}},806:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var c=n(1),a=(n(0),n(1279)),r=n(950),i=n(924),o=n(887),l=n(1111),s=n(229),u=Object(a.a)((function(e){return Object(r.a)({appBar:{position:"relative",backgroundColor:"#033863"},toolbar:{minHeight:40},title:{marginLeft:e.spacing(2),flex:1}})}));function d(e){var t=u(),n=e.renderCustom,a=e.renderButton,r=e.title,d=e.onClose;return Object(c.jsx)(i.a,{className:t.appBar,children:Object(c.jsxs)(o.a,{className:t.toolbar,variant:"dense",children:[n,Object(c.jsx)(l.a,{variant:"h6",className:t.title,children:r}),a,Object(c.jsx)(s.a,{onClick:d,children:"\u0110\xf3ng"})]})})}},807:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var c=n(1),a=(n(0),n(804));function r(e){return Object(c.jsx)(a.a,{style:{backgroundColor:"#eee",paddingTop:20},children:e.children})}}}]);