????
Current Path : C:/inetpub/vhost/qlk.nextform.vn/www/wwwroot/static/js/ |
Current File : C:/inetpub/vhost/qlk.nextform.vn/www/wwwroot/static/js/8281.6f335a8f.chunk.js |
"use strict";(self.webpackChunkgdt=self.webpackChunkgdt||[]).push([[8281],{85560:(e,t,o)=>{o.d(t,{A:()=>s});var n=o(9950),a=o(15255),i=o(83803),l=o(428),d=o(4370),r=o(67116),c=o(44414);class s extends n.Component{render(){const{tableRef:e,url:t,title:o,columns:n,pageSize:s,detailPanel:u,where:p,search:h,selectType:f,rowStyle:g,onAdd:m,onEdit:v,onDelete:C,onActions:b,onRowClick:y,SearchAdvanced:R,CustumToolbar:w,CustumCell:T,urlExt:k,unRefresDatatable:S,notCreateUUID:A,messageCustomDetele:x}=this.props,D=e=>n.filter((e=>l.gn(e.field)&&e.dataRef)).map((e=>({column:e,field_split:e.field.split(".")}))).forEach((t=>{delete e[t.field_split[0]]})),E=e=>{let t=n.filter((e=>e.dataCheck));for(var o=0;o<t.length;o++)if(l.gn(t[o].field)&&t[o].dataRef){if(null===e[t[o].dataRef[0]]||void 0===e[t[o].dataRef[0]]||""===e[t[o].field])return(0,r.AB)("Vui l\xf2ng nh\u1eadp d\u1eef li\u1ec7u c\u1ed9t "+t[o].title),!1}else if(void 0===e[t[o].field]||null===e[t[o].field]||""===e[t[o].field])return(0,r.AB)("Vui l\xf2ng nh\u1eadp d\u1eef li\u1ec7u c\u1ed9t "+t[o].title),!1;return!0};return(0,c.jsx)(i.A,{search:h,pageSize:s,title:o,columns:n,tableRef:e,SearchAdvanced:R,CustumToolbar:w,CustumCell:T,data:e=>k?(0,d.g3)((e=>"".concat(k).concat(p?"?"+p:"&","skip=").concat(e.page*e.pageSize,"&take=").concat(e.pageSize))(e),"GET",null,!1).then((t=>({data:void 0===t.value?[]:t.value,page:e.page,totalCount:Number(t.count)}))):(0,d.g3)((e=>{let o="".concat(t,"?").concat(l.Z5(e.page,e.pageSize));o+="".concat(l.e9(n)).concat(l.Is(n,f)),e.orderBy&&void 0!==e.orderBy&&e.orderDirection&&""!==e.orderDirection&&(o+=l.V$(e.orderBy.field,e.orderDirection));let a=l.A5(e,n);return o+=a?p?"&$filter=(".concat(a,") and ").concat(p):"&$filter=".concat(a):p?"&$filter="+p:"",o})(e)).then((t=>({data:void 0===t.value?[]:t.value,page:e.page,totalCount:Number(t["odata.count"])}))),rowStyle:g,detailPanel:u,editable:(()=>{let e={};return m&&void 0===m.onClick&&!1===m.disabled&&(void 0===m.onRowAdd?e.onRowAdd=e=>new Promise(((o,i)=>{let c=l.G5(n);c.type&&"numeric"!==c.type&&(A?delete e[l.UI(n)]:c.dataIdCustom||(e[l.UI(n)]=(0,a.A)())),D(e),m.defaultValues&&m.defaultValues.forEach((t=>e[t.field]=t.value)),E(e)?(0,d.g3)("".concat(t),"POST",JSON.stringify(e)).then((e=>o(e))).catch((e=>{e.json().then((e=>(0,r.AB)(e.value))),i(e)})).finally((()=>{this.props.updateCountRadioList&&this.props.updateCountRadioList(),this.props.addCallback&&this.props.addCallback()})):i()})).then((e=>this.props.addCallbackWithResponse&&this.props.addCallbackWithResponse(e))).catch((e=>console.log(e))):e.onRowAdd=e=>m.onRowAdd(e)),v&&void 0===v.onClick&&(v.hidden&&("function"===typeof v.hidden?e.onUpdateHidden=e=>v.hidden(e):e.onUpdateHidden=v.hidden),v.disabled&&(e.isEditable=e=>v.disabled(e)),void 0===v.onRowUpdate?e.onRowUpdate=(e,o)=>new Promise(((a,i)=>{D(e),E(e)?(0,d.g3)(l.Yv(t,n,o),"PATCH",JSON.stringify(e)).then((()=>a())).catch((e=>{e.json().then((e=>(0,r.AB)(e.value))),i(e)})).finally((()=>{this.props.updateCountRadioList&&this.props.updateCountRadioList(),this.props.updateCallback&&this.props.updateCallback()})):i()})):e.onRowUpdate=(e,t)=>v.onRowUpdate(e,t)),C&&void 0===C.onClick&&(C.hidden&&("function"===typeof C.hidden?e.onDeleteHidden=e=>C.hidden(e):e.onDeleteHidden=C.hidden),C.disabled&&(e.isDeletable=e=>C.disabled(e)),void 0===C.onRowDelete?e.onRowDelete=e=>new Promise(((o,a)=>(0,d.g3)(l.Yv(t,n,e),"DELETE").then((()=>{C.messageSuccess?o(null,C.messageSuccess):o("X\xf3a d\u1eef li\u1ec7u th\xe0nh c\xf4ng !")})).catch((e=>{x?(0,r.a3)(x,"Th\xf4ng b\xe1o"):(0,r.a3)("X\xf3a d\u1eef li\u1ec7u kh\xf4ng th\xe0nh c\xf4ng !"),C.messageError?a(e,C.messageError):a("X\xf3a d\u1eef li\u1ec7u th\u1ea5t b\u1ea1i !")})).finally((()=>{this.props.updateCountRadioList&&this.props.updateCountRadioList(),this.props.deleteCallback&&this.props.deleteCallback()})))):e.onRowDelete=e=>C.onRowDelete(e)),e})(),actions:(()=>{let e=[];return b&&b.map((t=>e.push(t))),m&&m.onClick&&(m.icon="add_box",m.tooltip="Th\xeam",m.isAdd=!0,m.isFreeAction=!0,e.push(m)),v&&v.onClick&&(v.icon="edit",v.tooltip="S\u1eeda",v.isEdit=!0,e.push(v)),C&&C.onClick&&(C.icon="delete",C.tooltip="X\xf3a",C.isDelete=!0,e.push(C)),e})(),onRowClick:void 0===y?void 0:(e,t)=>y(e,t)})}}s.defaultProps={title:"",columns:[],pageSize:10,search:!0,tableRef:n.createRef()}},83803:(e,t,o)=>{o.d(t,{A:()=>p});var n=o(9950);const a={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"}};var i=o(44414);const l=n.lazy((()=>Promise.all([o.e(9818),o.e(4057),o.e(4059),o.e(4351),o.e(484),o.e(783),o.e(7930),o.e(8488),o.e(5060),o.e(8412),o.e(537),o.e(1804),o.e(2152)]).then(o.bind(o,38671)))),d=n.lazy((()=>Promise.all([o.e(9818),o.e(4351),o.e(783),o.e(7930),o.e(5060),o.e(8044)]).then(o.bind(o,46350)))),r=n.lazy((()=>Promise.all([o.e(9818),o.e(3435)]).then(o.bind(o,33435)))),c={color:"#000",padding:"2px",fontSize:"12px",fontWeight:"bold",textAlign:"center",backgroundColor:"powderblue",borderLeft:"0.5px solid rgb(224, 224, 224)",zIndex:99},s={even:"#FFF",odd:"rgb(247, 248, 255)"},u={fontSize:"12px",borderLeft:"0.5px solid rgba(224, 224, 224, 1)"};class p extends n.Component{render(){const{addMoreRows:e,pageSize:t,search:o,CustumToolbar:n,CustumCell:s,SearchAdvanced:p,onRowClick:h,dataCount:f,rowStyle:g,rowsPerPage:m,page:v,...C}=this.props;return(0,i.jsx)(l,{...C,addMoreRows:e,localization:a,options:{exportButton:!1,search:o,actionsColumnIndex:-1,pageSize:t,headerStyle:c,rowStyle:g},onRowClick:void 0===h?void 0:(e,t)=>h(e,t),components:(()=>{let e={Toolbar:e=>(0,i.jsx)(d,{...e,SearchAdvanced:p}),Cell:e=>(0,i.jsx)(r,{...e,style:u})};return n&&(e.Toolbar=n),s&&(e.Cell=s),e})()})}}p.defaultProps={rowStyle:(e,t,o)=>({backgroundColor:t%2===0?s.even:s.odd}),pageSize:10,search:!0}},428:(e,t,o)=>{o.d(t,{A5:()=>p,G5:()=>a,Is:()=>m,UI:()=>i,V$:()=>f,Yv:()=>c,Z5:()=>h,e9:()=>g,gn:()=>l,jB:()=>u,nl:()=>s,xz:()=>v});var n=o(67116);const a=e=>e.filter((e=>e.dataID))[0],i=e=>a(e).field,l=e=>e&&e.includes("."),d=e=>e.split(".").join("/"),r=(e,t)=>e?t.fieldExpand?t.fieldExpand:t.field:t,c=(e,t,o)=>{const n=a(t);return"".concat(e,"(").concat("guid"===n.type?"guid":"","'").concat(o[n.field],"')")},s=(e,t)=>{let o=e.filter((e=>e.dataCheck));for(var a=0;a<o.length;a++)if(l(o[a].field)&&o[a].dataRef){if(null===t[o[a].dataRef[0]]||void 0===t[o[a].dataRef[0]])return(0,n.AB)("Vui l\xf2ng nh\u1eadp d\u1eef li\u1ec7u c\u1ed9t "+o[a].title),!1}else if(void 0===t[o[a].field]||null===t[o[a].field])return(0,n.AB)("Vui l\xf2ng nh\u1eadp d\u1eef li\u1ec7u c\u1ed9t "+o[a].title),!1;return!0},u=function(e,t,o){return arguments.length>3&&void 0!==arguments[3]&&arguments[3]?"substringof('".concat(o,"', ").concat(e,")"):"".concat(e," eq ").concat(((e,t)=>"string"===e?"'".concat(t,"'"):"datetime"===e?"datetime'".concat(t,"'"):"guid"===e?"guid'".concat(t,"'"):"".concat(t))(t,o))},p=(e,t)=>{if(e.filters&&e.filters.length>0){const t=e.filters.filter((e=>e.column.field&&e.column.type)).map((e=>{const t="".concat(l(e.column.field)?e.column.dataRef?e.column.dataRef[0]:d(e.column.field):e.column.field);return u(t,e.column.type,e.value)}));return t&&t.join(" and ")}if(e.search&&e.search.length>=1){const o=t.filter((e=>e.searchable&&e.field&&e.type)).map((t=>{const o="".concat(l(t.field)?d(t.field):t.field);return u(o,t.type,e.search,!0)}));return o&&o.join(" or ")}return""},h=(e,t,o)=>o?"&take=".concat(e*t===0?10:e*t):"$top=".concat(t,"&$skip=").concat(e*t,"&$inlinecount=allpages"),f=(e,t)=>"&$orderby=".concat(l(e)?d(e):e," ").concat(t),g=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=e.filter((e=>l(r(t,e))));return 0===o.length?"":"&$expand=".concat(function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=[];return e.forEach(((e,n)=>{let a=r(t,e).split(".").reverse().splice(1).reverse().join("/");0===n?o.push(a):o.some((e=>e===a))||o.push(a)})),o.join(",")}(o,t))},m=function(e){const t=function(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t?"withColumns"===t?"".concat(e.reduce(((e,t,n,a)=>{let i=r(o,t),c="".concat(e);return l(i)?c+="".concat(void 0===t.dataRef?"":t.dataRef[0]+",").concat(d(i)):c+="".concat(i),"".concat(c).concat(n===a.length-1?"":",")}),"")):"":"".concat(e.filter((e=>l(e.field))).reduce(((e,t)=>"".concat(e,",").concat(d(r(o,t)))),"*"))}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"withColumns",!(arguments.length>2&&void 0!==arguments[2])||arguments[2]);return t?"&$select=".concat(t):""},v=function(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"withColumns";return"".concat(g(e,o)).concat(m(e,n,o)).concat(t?"&$filter="+t:"")}},8281:(e,t,o)=>{o.r(t),o.d(t,{default:()=>l});o(9950);var n=o(85560);const a=[{title:"Id",field:"Id",type:"numeric",dataID:!0,editable:"never",cellStyle:{textAlign:"center"}},{title:"T\xean",field:"Name",type:"string"}];var i=o(44414);const l=()=>(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(n.A,{title:"Danh m\u1ee5c chi ph\xed \u0111\u1ecbnh l\u01b0\u1ee3ng kh\xe1c",url:"DinhLuongKhacs",columns:a,selectType:"withColumns",onAdd:{disabled:!1},onEdit:{},onDelete:{}})})},15255:(e,t,o)=>{var n;o.d(t,{A:()=>u});var a=new Uint8Array(16);function i(){if(!n&&!(n="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!==typeof msCrypto&&"function"===typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(a)}const l=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const d=function(e){return"string"===typeof e&&l.test(e)};for(var r=[],c=0;c<256;++c)r.push((c+256).toString(16).substr(1));const s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=(r[e[t+0]]+r[e[t+1]]+r[e[t+2]]+r[e[t+3]]+"-"+r[e[t+4]]+r[e[t+5]]+"-"+r[e[t+6]]+r[e[t+7]]+"-"+r[e[t+8]]+r[e[t+9]]+"-"+r[e[t+10]]+r[e[t+11]]+r[e[t+12]]+r[e[t+13]]+r[e[t+14]]+r[e[t+15]]).toLowerCase();if(!d(o))throw TypeError("Stringified UUID is invalid");return o};const u=function(e,t,o){var n=(e=e||{}).random||(e.rng||i)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){o=o||0;for(var a=0;a<16;++a)t[o+a]=n[a];return t}return s(n)}}}]);