????

Your IP : 216.73.216.130


Current Path : C:/inetpub/vhost/quanlycanbo.gdtvietnam.com/www/static/js/
Upload File :
Current File : C:/inetpub/vhost/quanlycanbo.gdtvietnam.com/www/static/js/144.fd3873ad.chunk.js

(this["webpackJsonpgdt-qlcb"]=this["webpackJsonpgdt-qlcb"]||[]).push([[144],{1552:function(e,n,t){"use strict";t.r(n),t.d(n,"default",(function(){return c}));var o=t(1),i=(t(0),t(868)),r=t(122);function c(){return Object(o.jsx)(i.a,{title:"Danh m\u1ee5c \u0110\u01b0\u1eddng/Ph\u1ed1",columns:[{field:"uuid",dataID:!0,type:"uuid",hidden:!0},{title:"M\xe3",field:"code",type:"string",dataCheck:!0,searchable:!0},{title:"Ti\u1ec1n t\u1ed1",field:"prefix",type:"string",dataCheck:!0,searchable:!0},{title:"T\xean",field:"name",type:"string",dataCheck:!0,searchable:!0}],queryRemote:function(e){return r.d.getAll(e)},onAdd:{onRowAdd:function(e){return r.d.add(e)}},onEdit:{onRowUpdate:function(e){return r.d.edit(e)}},onDelete:{onRowDelete:function(e){return r.d.delete(e)}}})}},778:function(e,n,t){"use strict";t.d(n,"a",(function(){return T}));var o=t(1),i=t(0),r=t.n(i),c=t(5),a=t(6),u={body:{emptyDataSourceMessage:"Kh\xf4ng c\xf3 d\u1eef li\u1ec7u \u0111\u1ec3 hi\u1ec3n th\u1ecb",addTooltip:"Th\xeam",editTooltip:"S\u1eeda",deleteTooltip:"X\xf3a",editRow:{deleteText:"B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn x\xf3a d\xf2ng n\xe0y kh\xf4ng?",cancelTooltip:"H\u1ee7y",saveTooltip:"L\u01b0u"}},toolbar:{exportTitle:"Xu\u1ea5t file",searchTooltip:"T\xecm ki\u1ebfm",showColumnsTitle:"Hi\u1ec7n c\u1ed9t",addRemoveColumns:"Th\xeam v\xe0 hi\u1ec3n th\u1ecb c\xe1c c\u1ed9t",searchPlaceholder:"T\xecm ki\u1ebfm"},pagination:{labelRowsPerPage:"S\u1ed1 d\xf2ng cho 1 trang",labelRowsSelect:"d\xf2ng",labelDisplayedRows:" {from}-{to} c\u1ee7a {count}",firstTooltip:"Trang \u0111\u1ea7u ti\xean",previousTooltip:"Trang tr\u01b0\u1edbc",nextTooltip:"Trang sau",lastTooltip:"Trang cu\u1ed1i c\xf9ng"},header:{actions:"Thao t\xe1c"}},l=r.a.lazy((function(){return Promise.all([t.e(0),t.e(3),t.e(4),t.e(6),t.e(87)]).then(t.bind(null,1575))})),d=r.a.lazy((function(){return Promise.all([t.e(0),t.e(4),t.e(38),t.e(120)]).then(t.bind(null,1260))})),f=r.a.lazy((function(){return t.e(142).then(t.bind(null,1246))})),s={color:"#000",padding:"4px",fontSize:"12px",fontWeight:"bold",textAlign:"center",backgroundColor:"rgb(245, 247, 255)",borderLeft:"0.5px solid rgb(224, 224, 224)"},h={even:"#FFF",odd:"rgb(247, 248, 255)"},p={fontSize:"0.778rem",borderLeft:"0.5px solid rgba(224, 224, 224, 1)"};function g(e){var n=e.addMoreRows,t=e.pageSize,i=e.search,r=e.CustumToolbar,h=e.CustumCell,g=e.SearchAdvanced,b=e.onRowClick,m=(e.dataCount,e.rowStyle),v=(e.rowsPerPage,e.page,Object(a.a)(e,["addMoreRows","pageSize","search","CustumToolbar","CustumCell","SearchAdvanced","onRowClick","dataCount","rowStyle","rowsPerPage","page"]));return Object(o.jsx)(l,Object(c.a)(Object(c.a)({},v),{},{addMoreRows:n,localization:u,options:{exportButton:!1,search:i,actionsColumnIndex:-1,pageSize:t,headerStyle:s,rowStyle:m},onRowClick:void 0===b?void 0:function(e,n){return b(e,n)},components:function(){var e={Toolbar:function(e){return Object(o.jsx)(d,Object(c.a)(Object(c.a)({},e),{},{SearchAdvanced:g}))},Cell:function(e){return Object(o.jsx)(f,Object(c.a)(Object(c.a)({},e),{},{style:p}))}};return r&&(e.Toolbar=r),h&&(e.Cell=h),e}()}))}g.defaultProps={rowStyle:function(e,n,t){return{backgroundColor:n%2===0?h.even:h.odd}},pageSize:10,search:!0};var b=function(e){return e&&e.includes(".")},m=function(e){return e.split(".").join(".")},v=function(e,n){return e?n.field:n},C=function(e,n){var t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return n?"withColumns"===n?"".concat(e.reduce((function(e,n,o,i){if(n.customsRemote)return"";var r=v(t,n),c="".concat(e);return b(r)?c+="".concat(void 0===n.dataRef?"":n.dataRef[0]+",").concat(m(r)):c+="".concat(r),"".concat(c).concat(o===i.length-1?"":",")}),"")):"":"".concat(e.filter((function(e){return b(e.field)})).reduce((function(e,n){return"".concat(e,",").concat(m(v(t,n)))}),"*"))},R=function(e,n){return"string"===e||"datetime"===e||"uuid"===e?"'".concat(n,"'"):"".concat(n)},w=function(e,n,t){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return o?"string"===n?"".concat(e," @like (string|").concat(t,")"):"".concat(e," @eq (").concat(n,"|").concat(t,")"):"".concat(e," eq ").concat(R(n,t))},y=t(99);function T(e){var n=e.queryRemote,t=e.customQuery,i=e.selectType,r=e.tableRef,c=e.title,a=e.columns,u=e.pageSize,l=e.detailPanel,d=e.search,f=e.rowStyle,s=e.onRowClick,h=e.where,p=e.onRefresh,v=e.onAdd,R=e.onEdit,T=e.onDelete,j=e.onActions,S=e.SearchAdvanced,k=e.CustumToolbar,O=e.CustumCell,A=e.removeAlert,x=e.odata,D=function(e,n){return n[function(e){return e.filter((function(e){return e.dataID}))[0]}(e).field]},P=function(e){return a.filter((function(e){return b(e.field)&&e.dataRef})).map((function(e){return{column:e,field_split:e.field.split(".")}})).forEach((function(n){delete e[n.field_split[0]]}))},z=function(e){var n,t,o="?".concat(function(e,n){return"size=".concat(n,"&page=").concat(e,"&count=true")}(e.page,e.pageSize));o+="".concat(function(e,n){var t=C(e,n,!(arguments.length>2&&void 0!==arguments[2])||arguments[2]);return t?"&select=".concat(t):""}(a,i)),e.orderBy&&void 0!==e.orderBy&&e.orderDirection&&""!==e.orderDirection&&(o+=(n=e.orderBy.field,t=e.orderDirection,"&orderby=".concat(b(n)?m(n):n," ").concat("asc"===t?"":t).trim()));var r=Array.of(h,function(e,n){if(e.filters&&e.filters.length>0){var t=e.filters.filter((function(e){return e.column.field&&e.column.type})).map((function(e){var n="".concat(b(e.column.field)?e.column.dataRef?e.column.dataRef[0]:m(e.column.field):e.column.field);return w(n,e.column.type,e.value)}));return t&&t.join(" and ")}if(e.search&&e.search.length>=1){var o=n.filter((function(e){return e.searchable&&e.field&&e.type})).map((function(n){var t="".concat(b(n.field)?m(n.field):n.field);return w(t,n.type,e.search,!0)}));return o&&o.join(" or ")}return""}(e,a)).filter((function(e){return e}));return o+=r.length>0?"&search=".concat(encodeURIComponent(r.join(" and "))):""},E=function(e){for(var n=a.filter((function(e){return e.dataCheck})),t=0;t<n.length;t++)if(b(n[t].field)&&n[t].dataRef){if(null===e[n[t].dataRef[0]]||void 0===e[n[t].dataRef[0]])return Object(y.g)("Vui l\xf2ng nh\u1eadp d\u1eef li\u1ec7u c\u1ed9t "+n[t].title),!1}else if(void 0===e[n[t].field]||null===e[n[t].field])return Object(y.g)("Vui l\xf2ng nh\u1eadp d\u1eef li\u1ec7u c\u1ed9t "+n[t].title),!1;return!0};return Object(o.jsx)(g,{search:d,pageSize:u,title:c,columns:a,tableRef:r,SearchAdvanced:S,CustumToolbar:k,CustumCell:O,data:function(e){return t?t(e,z(e)):n(z(e)).then((function(n){var t=x?null===n||void 0===n?void 0:n.value:(null===n||void 0===n?void 0:n.content)||[];return{data:t,page:e.page,totalCount:Number(n.totalElements)||t.length}}))},rowStyle:f,detailPanel:l,editable:function(){var e={};return v&&void 0===v.onClick&&(e.onRowAdd=function(e){return new Promise((function(n,t){P(e),v.defaultValues&&v.defaultValues.forEach((function(n){return e[n.field]=n.value})),E(e)?v.onRowAdd(e).then((function(){Object(y.f)("Th\xeam d\u1eef li\u1ec7u th\xe0nh c\xf4ng !"),n()})).catch((function(e){Object(y.e)("Th\xeam d\u1eef li\u1ec7u kh\xf4ng th\xe0nh c\xf4ng !"),t(e)})):t()}))}),R&&void 0===R.onClick&&(R.hidden&&("function"===typeof R.hidden?e.onUpdateHidden=function(e){return R.hidden(e)}:e.onUpdateHidden=R.hidden),R.disabled&&(e.isEditable=function(e){return R.disabled(e)}),e.onRowUpdate=function(e,n){return new Promise((function(t,o){P(e),E(e)?R.onRowUpdate(e,n,D(a,n)).then((function(){A||Object(y.f)("S\u1eeda d\u1eef li\u1ec7u th\xe0nh c\xf4ng !"),t()})).catch((function(e){Object(y.e)("S\u1eeda d\u1eef li\u1ec7u kh\xf4ng th\xe0nh c\xf4ng !"),o(e)})):o()}))}),T&&void 0===T.onClick&&(T.hidden&&("function"===typeof T.hidden?e.onDeleteHidden=function(e){return T.hidden(e)}:e.onDeleteHidden=T.hidden),T.disabled&&(e.isDeletable=function(e){return T.disabled(e)}),e.onRowDelete=function(e){return new Promise((function(n,t){return T.onRowDelete(D(a,e)).then((function(){Object(y.f)("X\xf3a d\u1eef li\u1ec7u th\xe0nh c\xf4ng !"),n()})).catch((function(e){Object(y.e)("X\xf3a d\u1eef li\u1ec7u kh\xf4ng th\xe0nh c\xf4ng !"),t(e)}))}))}),e}(),actions:function(){var e=[];return p?(p.icon="refresh",p.isRefresh=!0,p.tooltip="T\u1ea3i l\u1ea1i d\u1eef li\u1ec7u",p.isFreeAction=!0,e.push(p)):e.push({icon:"refresh",isRefresh:!0,tooltip:"T\u1ea3i l\u1ea1i d\u1eef li\u1ec7u",isFreeAction:!0,onClick:function(){return r.current&&r.current.onQueryChange()}}),j&&j.map((function(n){return e.push(n)})),v&&v.onClick&&(v.icon="add_box",v.tooltip="Th\xeam",v.isAdd=!0,v.isFreeAction=!0,e.push(v)),R&&R.onClick&&(R.icon="edit",R.tooltip="S\u1eeda",R.isEdit=!0,e.push(R)),T&&T.onClick&&(T.icon="delete",T.tooltip="X\xf3a",T.isDelete=!0,e.push(T)),e}(),onRowClick:s})}T.defaultProps={title:"",columns:[],pageSize:10,search:!0,selectType:"withColumns",tableRef:r.a.createRef()}},868:function(e,n,t){"use strict";t.d(n,"a",(function(){return o.a}));var o=t(778)}}]);