1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7806],{31425:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var i=n(63366),a=n(87462),r=n(67294),s=n(90512),o=n(94780),l=n(90948),u=n(28628),d=n(1588),c=n(34867);function g(e){return(0,c.ZP)("MuiDialogActions",e)}(0,d.Z)("MuiDialogActions",["root","spacing"]);var m=n(85893);const p=["className","disableSpacing"],h=(0,l.ZP)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})((({ownerState:e})=>(0,a.Z)({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})));var x=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiDialogActions"}),{className:r,disableSpacing:l=!1}=n,d=(0,i.Z)(n,p),c=(0,a.Z)({},n,{disableSpacing:l}),x=(e=>{const{classes:t,disableSpacing:n}=e,i={root:["root",!n&&"spacing"]};return(0,o.Z)(i,g,t)})(c);return(0,m.jsx)(h,(0,a.Z)({className:(0,s.Z)(x.root,r),ownerState:c,ref:t},d))}))},6514:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var i=n(63366),a=n(87462),r=n(67294),s=n(90512),o=n(94780),l=n(90948),u=n(28628),d=n(1588),c=n(34867);function g(e){return(0,c.ZP)("MuiDialogContent",e)}(0,d.Z)("MuiDialogContent",["root","dividers"]);var m=n(4472),p=n(85893);const h=["className","dividers"],x=(0,l.ZP)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})((({theme:e,ownerState:t})=>(0,a.Z)({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},t.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${m.Z.root} + &`]:{paddingTop:0}})));var f=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiDialogContent"}),{className:r,dividers:l=!1}=n,d=(0,i.Z)(n,h),c=(0,a.Z)({},n,{dividers:l}),m=(e=>{const{classes:t,dividers:n}=e,i={root:["root",n&&"dividers"]};return(0,o.Z)(i,g,t)})(c);return(0,p.jsx)(x,(0,a.Z)({className:(0,s.Z)(m.root,r),ownerState:c,ref:t},d))}))},58951:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var i=n(63366),a=n(87462),r=n(67294),s=n(90512),o=n(94780),l=n(90948),u=n(14136),d=n(28628),c=n(15861),g=n(1588),m=n(34867);function p(e){return(0,m.ZP)("MuiDialogContentText",e)}(0,g.Z)("MuiDialogContentText",["root"]);var h=n(85893);const x=["children","className"],f=(0,l.ZP)(c.Z,{shouldForwardProp:e=>(0,u.Z)(e)||"classes"===e,name:"MuiDialogContentText",slot:"Root",overridesResolver:(e,t)=>t.root})({});var b=r.forwardRef((function(e,t){const n=(0,d.i)({props:e,name:"MuiDialogContentText"}),{className:r}=n,l=(0,i.Z)(n,x),u=(e=>{const{classes:t}=e,n=(0,o.Z)({root:["root"]},p,t);return(0,a.Z)({},t,n)})(l);return(0,h.jsx)(f,(0,a.Z)({component:"p",variant:"body1",color:"text.secondary",ref:t,ownerState:l,className:(0,s.Z)(u.root,r)},n,{classes:u}))}))},37645:function(e,t,n){"use strict";var i=n(87462),a=n(63366),r=n(67294),s=n(90512),o=n(94780),l=n(15861),u=n(90948),d=n(28628),c=n(4472),g=n(34182),m=n(85893);const p=["className","id"],h=(0,u.ZP)(l.Z,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),x=r.forwardRef((function(e,t){const n=(0,d.i)({props:e,name:"MuiDialogTitle"}),{className:l,id:u}=n,x=(0,a.Z)(n,p),f=n,b=(e=>{const{classes:t}=e;return(0,o.Z)({root:["root"]},c.a,t)})(f),{titleId:v=u}=r.useContext(g.Z);return(0,m.jsx)(h,(0,i.Z)({component:"h2",className:(0,s.Z)(b.root,l),ownerState:f,ref:t,variant:"h6",id:null!=u?u:v},x))}));t.Z=x},4472:function(e,t,n){"use strict";n.d(t,{a:function(){return r}});var i=n(1588),a=n(34867);function r(e){return(0,a.ZP)("MuiDialogTitle",e)}const s=(0,i.Z)("MuiDialogTitle",["root"]);t.Z=s},25490:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/corporate/jurnal/fitness",function(){return n(48649)}])},38858:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var i=n(85893),a=n(45697),r=n.n(a),s=n(89510),o=n(14924),l=n(90948),u=n(51796),d=(0,l.ZP)("header")((function(e){var t=e.theme;return(0,o.Z)({top:0,left:0,lineHeight:0,width:"100%",position:"absolute",padding:t.spacing(3,3,0)},t.breakpoints.up("sm"),{padding:t.spacing(5,5,0)})}));function c(e){var t=e.children;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d,{children:(0,i.jsx)(u.Z,{})}),t]})}function g(e){var t=e.variant,n=void 0===t?"dashboard":t,a=e.children;return"logoOnly"===n?(0,i.jsxs)(c,{children:[" ",a," "]}):(0,i.jsxs)(s.Z,{children:[" ",a," "]})}c.propTypes={children:r().node}
1,g.propTypes={children:r().node.isRequired,variant:r().oneOf(["dashboard","main","logoOnly"])}},48649:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ue}});var i=n(47568),a=n(14924),r=n(26042),s=n(69396),o=n(97582),l=n(85893),u=n(30381),d=n.n(u),c=n(57460),g=n.n(c),m=n(67294),p=n(65582),h=n(15861),x=n(66242),f=n(5616),b=n(69417),v=n(72882),I=n(7906),w=n(295),M=n(53816),Z=n(53252),j=n(86886),y=n(10633),C=n(82771),k=n(91045),S=n(63447),T=n(34444),K=n(45697),R=n.n(K),D=n(50657),W=n(37645),B=n(6514),N=n(58951),_=n(31425);function A(e){var t=e.row,n=e.submitConfirmation,i=e.onCloseDialog,a=t.title,r=t.message,s=t.open,o=t.confirm;return(0,l.jsxs)(D.Z,{open:s,style:{textAlign:"center"},maxWidth:"xs",children:[(0,l.jsx)(W.Z,{sx:{mb:2},children:a}),(0,l.jsx)(B.Z,{children:(0,l.jsx)(N.Z,{children:r})}),(0,l.jsxs)(_.Z,{sx:{display:"flex",justifyContent:"center",gap:2},children:[(0,l.jsx)(b.Z,{sx:{borderRadius:"16px",px:6.5,py:1.25},variant:"outlined",onClick:function(){i(!s)},children:"Kembali"}),(0,l.jsx)(b.Z,{sx:{borderRadius:"16px",px:6.5,py:1.25},variant:"contained",onClick:function(e){e.preventDefault(),n(),i(!1)},autoFocus:!0,color:"error",children:o})]})]})}A.propTypes={row:R().object,onCloseDialog:R().func,submitConfirmation:R().func};var L=n(29417),H=n(56978),O=n(38858),P=n(81458),F=n(5306),E=n(50135),q=n(21499),G=n(58227),Y=n(89047),U=n(66448);function X(e){return(0,U.Yu)("".concat(Y.Xp.baseUrl,"/api/fmj?key=").concat(e,"&v=b2b"))}function z(e,t,n){var i="";return Object.keys(n).forEach((function(e){i+=""===i?"?":"&",i+="".concat(e,"=").concat(n[e])})),(0,U.Yu)("".concat(Y.Xp.baseUrl,"/api/fmj/b2b/").concat(e.page,"/").concat(e.limit).concat(i),null,t)}function J(e){return(0,U.qC)("".concat(Y.Xp.baseUrl,"/api/fmj"),e)}function V(e){return(0,U.B6)("".concat(Y.Xp.baseUrl,"/api/fmj"),e)}function $(e){var t=new FormData;return t.append("file",e),(0,U.qC)("".concat(Y.Xp.baseUrl,"/api/fmj/b2b/bulk/check"),t)}var Q=n(54692),ee={user:null,inputedDate:d()().local().format("YYYY-MM-DDTHH:mm"),sarInCm:"",gsMaxRightInKg:"",gsMaxLeftInKg:"",mwtInMeters:"",mwtInBpm:"",mwtInSpo2:"",medicalHistory:"",imagePreview:"",imageFile:null};function te(e){var t=e.children,n=e.label,i=e.isRequired;return(0,l.jsx)(j.ZP,{item:!0,xs:6,children:(0,l.jsxs)(f.Z,{mb:1,children:[(0,l.jsxs)("label",{children:[n,i&&(0,l.jsx)(h.Z,{component:"span",sx:{color:"red"},children:"*"})]}),t]})})}function ne(e){var t=e.id,n=e.row,u=e.onCloseDialog,c=e.onSubmit,g=n.open,p=n.type,x=(0,m.useState)(!1),v=x[0],I=x[1],w=(0,m.useState)({}),M=w[0],Z=w[1],y=function(){var e=(0,i.Z)((function(e){var n,i,a;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:return e.preventDefault(),I(!0),n={},i=(0,s.Z)((0,r.Z)({version:"b2b",inputedDate:R.inputedDate?d()(R.inputedDate).format():void 0},t?{user:R.user.id}:{ownerId:R.user.id}),{sarInCm:R.sarInCm?Number(R.sarInCm):void 0,gsMaxLeftInKg:R.gsMaxLeftInKg?Number(R.gsMaxLeftInKg):void 0,gsMaxRightInKg:R.gsMaxRightInKg?Number(R.gsMaxRightInKg):void 0,mwtInMeters:R.mwtInMeters?Number(R.mwtInMeters):void 0,mwtInBpm:R.mwtInBpm?Number(R.mwtInBpm):void 0,mwtInSpo2:R.mwtInSpo2?Number(R.mwtInSpo2):void 0,mhInformation:R.medicalHistory||void 0}),R.user||(n.user="Nama kosong!"),R.inputedDate||(n.inputedDate="Tanggal kosong!"),R.sarInCm&&R.sarInCm<0&&(n.sarInCm="Hasil Sit and Reach Test lebih kecil dari 0"),R.gsMaxRightInKg&&R.gsMaxRightInKg<0&&(n.gsMaxRightInKg="Nilai Maksimum Genggaman Tangan Kanan lebih kecil dari 0"),R.gsMaxLeftInKg&&R.gsMaxLeftInKg<0&&(n.gsMaxLeftInKg="Nilai Maksimum Genggaman Tangan Kiri lebih kecil dari 0"),R.mwtInMeters&&R.mwtInMeters<0&&(n.mwtInMeters="Hasil 6MWT lebih kecil dari 0"),R.mwtInBpm&&R.mwtInBpm<0&&(n.mwtInBpm="Detak Jantung 6MWT lebih kecil dari 0"),R.mwtInSpo2&&R.mwtInSpo2<0&&(n.mwtInSpo2="SPO2 6MWT lebih kecil dari 0"),R.medicalHistory&&(R.medicalHistory.length<2?n.medicalHistory="Keterangan Riwayat Medis tidak boleh kurang dari 2 karakter":i.mhInformation=R.medicalHistory),R.imageFile?(a=R.imageFile[0],[4,(0,Q.cT)("".concat(Y.Xp.pathMainUpload,"/fitness-measurement/").concat(R.user.id),a,"web-".concat(d()().unix(),"-").concat(a.name))]):[3,2];case 1:i.imageUrl=o.sent(),o.label=2;case 2:return R.gsMaxRightInKg&&!R.gsMaxLeftInKg&&(n.gsMaxLeftInKg="Nilai Maksimum Genggaman Tangan Kiri kosong!"),!R.gsMaxRightInKg&&R.gsMaxLeftInKg&&(n.gsMaxRightInKg="Nilai Maksimum Genggaman Tangan Kanan kosong!"),R.mwtInMeters||!R.mwtInBpm&&!R.mwtInSpo2||(n.mwtInMeters="Hasil 6MWT Kosong!"),Object.keys(n).length>0?(Z(n),I(!1),[2]):(c(i),N(ee),Z({}),I(!1),u(),[2])}}))}));return function(t){return e.apply(this,arguments)}}(),C=(0,q.V)(),k=(0,m.useState)([]),S=k[0],T=k[1],K=(0,m.useState)(ee),R=K[0],N=K[1],A=function(e){var t=e.target,n=t.name,i=t.value;N((function(e){return(0,s.Z)((0,r.Z)({},e),(0,a.Z)({},n,i))}))};return(0,m.useEffect)((function(){var e=function(){var e=(0,i.Z)((function(){var e,t,n,i;return(0,o.__generator)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,5,,6]),e=[],"corporate"!==C.accountType?[3,2]:[4,(0,G.qK)()];case 1:return t=a.sent(),[3,4];case 2:return[4,(0,G.qw)()];case 3:t=a.sent(),a.label=4;case 4:return e=t.data.map((function(e,t){var i,a;return{id:null===(i=e.user)||void 0===i?void 0:i._id,key:t,label:"".concat(e.user.name.first," ").concat(e.user.name.last," | ").concat(null!==(n=null===e||void 0===e||null===(a=e.user)||void 0===a?void 0:a.phoneNumber)&&void 0!==n?n:"")}})),T(e),[3,6];case 5:return i=a.sent(),console.log("ERROR:",i),[3,6];case 6:return[2]}}
1))}));return function(){return e.apply(this,arguments)}}();e()}),[]),(0,m.useEffect)((function(){var e=function(){var e=(0,i.Z)((function(){var e,n,i,a;return(0,o.__generator)(this,(function(r){switch(r.label){case 0:return[4,X(t)];case 1:return i=r.sent(),a=(null===i||void 0===i||null===(e=i.data)||void 0===e||null===(n=e.data)||void 0===n?void 0:n.detail)||{},N({inputedDate:d()(a.inputedDate).format("YYYY-MM-DDTHH:mm"),user:S.find((function(e){var t;return e.id==(null===a||void 0===a||null===(t=a.user)||void 0===t?void 0:t._id)}))||null,sarInCm:a.sarInCm||"",gsMaxRightInKg:a.gsMaxRightInKg||"",gsMaxLeftInKg:a.gsMaxLeftInKg||"",mwtInMeters:a.mwtInMeters||"",mwtInBpm:a.mwtInBpm||"",mwtInSpo2:a.mwtInSpo2||"",medicalHistory:a.mhInformation||"",imagePreview:a.imageUrl||""}),[2]}}))}));return function(){return e.apply(this,arguments)}}();t&&p&&e()}),[t]),(0,l.jsx)(D.Z,{fullWidth:!0,maxWidth:"md",open:g,onClose:function(){N(ee),Z({}),u()},children:v?(0,l.jsxs)(B.Z,{children:[(0,l.jsx)(h.Z,{variant:"h6",sx:{mb:2},children:"Harap menunggu"}),(0,l.jsx)(P.Z,{color:"success"})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(W.Z,{component:"h6",sx:{mb:2},children:["create"===p?"Tambah":"edit"===p?"Edit":""," Data Hasil Tes Kebugaran"]}),(0,l.jsx)(B.Z,{children:(0,l.jsxs)(j.ZP,{container:!0,rowSpacing:3,columnSpacing:3,children:[(0,l.jsx)(te,{isRequired:!1,label:"Nama",children:(0,l.jsx)(F.Z,{disabled:"view"===p,value:R.user,onCh
1ange:function(e,t){N((function(e){return(0,s.Z)((0,r.Z)({},e),{user:t})}))},options:S,getOptionLabel:function(e){return e.label},isOptionEqualToValue:function(e,t){return e.id===(t?t.id:null)},size:"small",renderInput:function(e){return(0,l.jsx)(E.Z,(0,r.Z)({fullWidth:!0,variant:"outlined",color:"primary",sx:(0,r.Z)({"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:"black"},"&:hover fieldset":{borderColor:"black"},"&.Mui-focused fieldset":{borderColor:"black"}}},"view"===p?{"& .MuiInputBase-input.Mui-disabled":{color:"#000000",WebkitTextFillColor:"#000000"}}:{}),error:!!M.user,helperText:M.user,placeholder:"view"===p?"":"Isi Nama"},e))}})}),(0,l.jsx)(te,{isRequired:!1,label:"Tanggal",children:(0,l.jsx)(E.Z,{fullWidth:!0,type:"datetime-local",variant:"outlined",error:!!M.inputedDate,helperText:M.inputedDate,value:R.inputedDate,color:"primary",size:"small",name:"inputedDate",placeholder:"view"===p?"":"Contoh 17.5",onChange:A,inputProps:{max:(new Date).toISOString().slice(0,16)},sx:(0,r.Z)({"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:"black"},"&:hover fieldset":{borderColor:"black"},"&.Mui-focused fieldset":{borderColor:"black"}}},"view"===p?{"& .MuiInputBase-input.Mui-disabled":{color:"#000000",WebkitTextFillColor:"#000000"}}:{}),disabled:"view"===p})}),(0,l.jsx)(te,{isRequired:!1,label:"Hasil Sit and Reach Test",children:(0,l.jsxs)(f.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,l.jsx)(E.Z,{fullWidth:!0,type:"number",variant:"outlined",error:!!M.sarInCm,helperText:M.sarInCm,value:R.sarInCm,color:"primary",size:"small",name:"sarInCm",placeholder:"view"===p?"":"Contoh 17.5",onChange:A,sx:(0,r.Z)({"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:"black"},"&:hover fieldset":{borderColor:"black"},"&.Mui-focused fieldset":{borderColor:"black"}}},"view"===p?{"& .MuiInputBase-input.Mui-disabled":{color:"#000000",WebkitTextFillColor:"#000000"}}:{}),disabled:"view"===p}),(0,l.jsx)(h.Z,{children:"cm"})]})}),(0,l.jsx)(te,{isRequired:!1,label:"Nilai Maksimum Genggaman Tangan Kanan",children:(0,l.jsxs)(f.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,l.jsx)(E.Z,{fullWidth:!0,type:"number",variant:"outlined",error:!!M.gsMaxRightInKg,helperText:M.gsMaxRightInKg,value:R.gsMaxRightInKg,color:"primary",size:"small",name:"gsMaxRightInKg",placeholder:"view"===p?"":"Contoh 32.4",onChange:A,sx:(0,r.Z)({"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:"black"},"&:hover fieldset":{borderColor:"black"},"&.Mui-focused fieldset":{borderColor:"black"}}},"view"===p?{"& .MuiInputBase-input.Mui-disabled":{color:"#000000",WebkitTextFillColor:"#000000"}}:{}),disabled:"view"===p}),(0,l.jsx)(h.Z,{children:"kg"})]})}),(0,l.jsx)(te,{isRequired:!1,label:"Nilai Maksimum Genggaman Tangan Kiri",children:(0,l.jsxs)(f.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,l.jsx)(E.Z,{fullWidth:!0,type:"number",variant:"outlined",error:!!M.gsMaxLeftInKg,helperText:M.gsMaxLeftInKg,value:R.gsMaxLeftInKg,color:"primary",size:"small",name:"gsMaxLeftInKg",placeholder:"view"===p?"":"Contoh 17.5",onChange:A,sx:(0,r.Z)({"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:"black"},"&:hover fieldset":{borderColor:"black"},"&.Mui-focused fieldset":{borderColor:"black"}}},"view"===p?{"& .MuiInputBase-input.Mui-disabled":{color:"#000000",WebkitTextFillColor:"#000000"}}:{}),disabled:"view"===p}),(0,l.jsx)(h.Z,{children:"kg"})]})}),(0,l.jsx)(te,{isRequired:!1,label:"Hasil 6MWT",children:(0,l.jsxs)(f.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,l.jsx)(E.Z,{fullWidth:!0,type:"number",variant:"outlined",error:!!M.mwtInMeters,helperText:M.mwtInMeters,value:R.mwtInMeters,color:"primary",size:"small",name:"mwtInMeters",placeholder:"view"===p?"":"Contoh 450",onChange:A,sx:(0,r.Z)({"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:"black"},"&:hover fieldset":{borderColor:"black"},"&.Mui-focused fieldset":{borderColor:"black"}}},"view"===p?{"& .MuiInputBase-input.Mui-disabled":{color:"#000000",WebkitTextFillColor:"#000000"}}:{}),disabled:"view"===p}),(0,l.jsx)(h.Z,{children:"meter"})]})}),(0,l.jsx)(te,{isRequired:!1,label:"Detak Jantung 6MWT",children:(0,l.jsxs)(f.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,l.jsx)(E.Z,{fullWidth:!0,type:"number",variant:"outlined",error:!!M.mwtInBpm,helperText:M.mwtInBpm,value:R.mwtInBpm,color:"primary",size:"small",name:"mwtInBpm",placeholder:"view"===p?"":"Contoh 100",onChange:A,sx:(0,r.Z)({"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:"black"},"&:hover fieldset":{borderColor:"black"},"&.Mui-focused fieldset":{borderColor:"black"}}},"view"===p?{"& .MuiInputBase-input.Mui-disabled":{color:"#000000",WebkitTextFillColor:"#000000"}}:{}),disabled:"view"===p}),(0,l.jsx)(h.Z,{children:"bpm"})]})}),(0,l.jsx)(te,{isRequired:!1,label:"SPO2 6MWT",children:(0,l.jsxs)(f.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,l.jsx)(E.Z,{fullWidth:!0,type:"number",variant:"outlined",error:!!M.mwtInSpo2,helperText:M.mwtInSpo2,value:R.mwtInSpo2,color:"primary",size:"small",name:"mwtInSpo2",placeholder:"view"===p?"":"Contoh 100",onChange:A,sx:(0,r.Z)({"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:"black"},"&:hover fieldset":{borderColor:"black"},"&.Mui-focused fieldset":{borderColor:"black"}}},"view"===p?{"& .MuiInputBase-input.Mui-disabled":{color:"#000000",WebkitTextFillColor:"#000000"}}:{}),disabled:"view"===p}),(0,l.jsx)(h.Z,{children:"%"})]})}),(0,l.jsx)(te,{isRequired:!1,label:"Keterangan Riwayat Medis",children:(0,l.jsx)(E.Z,{fullWidth:!0,multiline:!0,rows:4,variant:"outlined",error:!!M.medicalHistory,helperText:M.medicalHistory,value:R.medicalHistory,color:"primary",size:"small",name:"medicalHistory",placeholder:"view"===p?"":"Isi Keterangan Riwayat Medis",onChange:A,sx:(0,r.Z)({"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:"black"},"&:hover fieldset":{borderColor:"black"},"&.Mui-focused fieldset":{borderColor:"black"}}},"view"===p?{"& .MuiInputBase-input.Mui-disabled":{color:"#000000",WebkitTextFillColor:"#000000"}}:{}),disabled:"view"===p})}),(0,l.jsx)(te,{isRequired:!1,label:"Foto",children:(0,l.jsxs)(f.Z,{sx:{display:"flex",flexDirection:"column",gap:1.5,py:1},children:[(0,l.jsx)("input",{type:"file",accept:"image/*",onChange:function(e){return t=e.target.files,void N((function(e){return(0,s.Z)((0,r.Z)({},e),{imageFile:t,imagePreview:URL.createObjectURL(t[0])})}));var t},disabled:"view"===p}),(0,l.jsx)(f.Z,{sx:{display:"flex",alignItems:"center"},children:R.imagePreview&&(0,l.jsx)("img",{src:R.imagePreview,height:135,width:135,alt:"image"})})]})})]})}),("create"===p||"edit"===p)&&(0,l.jsxs)(_.Z,{sx:{borderTop:"1px solid #D9D9D9",mx:2},children:[(0,l.jsx)(b.Z,{sx:{borderRadius:"16px",px:6.5,py:1.25},variant:"outlined",onClick:u,children:"Batal"}),(0,l.jsx)(b.Z,{sx:{borderRadius:"16px",px:6.5,py:1.25},variant:"contained",onClick:y,autoFocus:!0,color:"error",disabled:function(){var e=!1;return R.user&&R.inputedDate||(e=!0),R.user&&R.inputedDate&&(R.sarInCm||R.gsMaxRightInKg||R.gsMaxLeftInKg||R.mwtInMeters||R.mwtInBpm||R.mwtInSpo2||(e=!0),R.sarInCm&&(e=!1),(R.gsMaxRightInKg&&!R.gsMaxLeftInKg||!R.gsMaxRightInKg&&R.gsMaxLeftInKg)&&(e=!0),R.gsMaxRightInKg&&R.gsMaxLeftInKg&&(e=!1),R.mwtInMeters||!R.mwtInBpm&&!R.mwtInSpo2||(e=!0),R.mwtInMeters&&(e=!1)),e}(),children:"Simpan"})]})]})})}te.propTypes={children:R().node,label:R().string,isRequired:R().bool}
1,ne.propTypes={id:R().string,row:R().object,onCloseDialog:R().func,onSubmit:R().func};var ie=n(40571),ae=n(96486),re=n(31750),se=[{id:"username",label:"Nama",align:"center",filter:!0,sort:!0,type:"text",typeInput:"text",width:300,textWidth:"100%",verticalAlign:"bottom"},{id:"createdAt",label:"Tanggal",align:"center",filter:!0,sort:!1,typeInput:"date",textWidth:"100%",width:200,verticalAlign:"bottom"},{id:"sarInCm",label:"Sit & Reach Test",align:"center",filter:!0,sort:!1,typeInput:"text",width:125,verticalAlign:"bottom",textWidth:"100%"},{id:"sarCategory",label:"Kategori Sit & Reach Test",align:"center",width:125,selectFullWidth:!0,applySelectMinWidth:"none",verticalAlign:"bottom",filter:!0,sort:!1,type:"select",selectOptions:["Semua","Baik","Normal","Kurang","Buruk"]},{id:"gsMaxLeftInKg",label:"Max Genggaman Kiri",align:"center",filter:!0,sort:!1,typeInput:"text",verticalAlign:"bottom",textWidth:"100%",width:125},{id:"gsMaxRightInKg",label:"Max Genggaman Kanan",align:"center",filter:!0,sort:!1,typeInput:"text",verticalAlign:"bottom",textWidth:"100%",width:125},{id:"gsTotalInKg",label:"Total Nilai Genggaman",align:"center",filter:!0,sort:!1,typeIn
1put:"text",verticalAlign:"bottom",textWidth:"100%",width:125},{id:"gsMeanInKg",label:"Rata-rata Kekuatan Genggaman",align:"center",filter:!0,sort:!1,typeInput:"text",verticalAlign:"bottom",textWidth:"100%",width:125},{id:"gsCategory",label:"Kategori Kekuatan Genggaman",align:"center",filter:!0,sort:!1,type:"select",selectOptions:["Semua","Sangat Baik","Baik","Normal","Buruk","Sangat Buruk"],verticalAlign:"bottom",width:165,selectFullWidth:!0,applySelectMinWidth:"none"},{id:"mwtInMeters",label:"Hasil 6MWT",align:"center",filter:!0,sort:!1,typeInput:"text",width:100,verticalAlign:"bottom",textWidth:"100%"},{id:"mwtInBpm",label:"Detak Jantung 6MWT",align:"center",filter:!0,sort:!1,typeInput:"text",width:100,verticalAlign:"bottom",textWidth:"100%"},{id:"mwtInSpo2",label:"SPO2 6MWT",align:"center",filter:!0,sort:!1,typeInput:"text",width:125,verticalAlign:"bottom",textWidth:"100%"},{id:"mwtCategory",label:"Kategori 6MWT",align:"center",filter:!0,sort:!1,verticalAlign:"bottom",width:150,type:"select",selectOptions:["Semua","Sangat Baik","Normal","Buruk"],selectFullWidth:!0,applySelectMinWidth:"none"},{id:"mhInformation",label:"Keterangan Riwayat Medis",align:"center",filter:!0,sort:!1,typeIn
1put:"text",width:250,verticalAlign:"bottom",textWidth:"100%"},{id:"15",label:"Foto",align:"center",width:125,verticalAlign:"bottom"},{id:"16",label:"Aksi",align:"center",width:200,verticalAlign:"bottom"}],oe=[{id:"row",label:"Row",align:"center",width:50,verticalAlign:"bottom"},{id:"username",label:"Nama",align:"center",width:200,verticalAlign:"bottom"},{id:"phone",label:"Nomor Hp",align:"center",width:150,verticalAlign:"bottom"},{id:"createdAt",label:"Tanggal",align:"center",textWidth:"100%",width:200,verticalAlign:"bottom"},{id:"sarInCm",label:"Sit & Reach Test",align:"center",width:125,verticalAlign:"bottom"},{id:"gsMaxLeftInKg",label:"Max Genggaman Kiri",align:"center",verticalAlign:"bottom",width:125},{id:"gsMaxRightInKg",label:"Max Genggaman Kanan",align:"center",verticalAlign:"bottom",width:125},{id:"mwtInMeters",label:"Hasil 6MWT",align:"center",width:100,verticalAlign:"bottom"},{id:"mwtInBpm",label:"Detak Jantung 6MWT",align:"center",width:100,verticalAlign:"bottom"},{id:"mwtInSpo2",label:"SPO2 6MWT",align:"center",width:125,verticalAlign:"bottom"},{id:"mhInformation",label:"Keterangan Riwayat Medis",align:"center",width:250,verticalAlign:"bottom"}],le={"Sangat Baik":"Very Good",Baik:"Good",Normal:"Normal",Kurang:"Fair",Buruk:"Bad","Sangat Buruk":"Very Bad"};function ue(){var e,t,n,u=(0,re.useI18n)().language,c=(0,ie.Z)().themeStretch,K=(0,m.useState)(10),R=K[0],D=K[1],W=(0,m.useState)(1),B=W[0],N=W[1],_=(0,m.useState)({}),O=_[0],P=_[1],F=(0,m.useState)(!1),E=F[0],q=F[1],G=(0,m.useState)({status:!1,message:"",code:""}),X=G[0],ee=G[1],te=(0,m.useState)([]),ue=te[0],de=te[1],ce=(0,m.useState)([]),ge=ce[0],me=ce[1],pe=(0,m.useState)([]),he=pe[0],xe=pe[1],fe=(0,m.useState)([]),be=fe[0],ve=fe[1],Ie=(0,m.useState)(!1),we=Ie[0],Me=Ie[1],Ze=(0,m.useState)(!1),je=Ze[0],ye=Ze[1],Ce=(0,m.useState)(!1),ke=Ce[0],Se=Ce[1],Te=(0,m.useState)(!1),Ke=Te[0],Re=Te[1],De=(0,m.useState)(null),We=De[0],Be=De[1],Ne=function(){var e=(0,i.Z)((function(){var e,t,n;return(0,o.__generator)(this,(function(i){switch(i.label){case 0:return[4,z({page:B,limit:10},u,O)];case 1:return t=i.sent(),n=null===t||void 0===t||null===(e=t.data)||void 0===e?void 0:e.data,de(n.list),D(n.pages||1),[2]}}))}));return function(){return e.apply(this,arguments)}}(),_e=function(){var e=(0,i.Z)((function(){var e,t,n;return(0,o.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,3,4]),[4,(a=We,(0,U.SR)("".concat(Y.Xp.baseUrl,"/api/fmj/").concat(a,"?v=b2b")))];case 1:return t=i.sent(),!1!==(null===(n=null===t||void 0===t||null===(e=t.data)||void 0===e?void 0:e.data)||void 0===n?void 0:n.isSuccess)&&n?(ee({status:!0,message:"Berhasil menhapus data",code:"success"}),Ne()):ee({status:!0,message:"Terjadi kesalahan ketika menghapus data",code:"error"}),[3,4];case 2:return i.sent(),ee({status:!0,message:"Internal Server Error",code:"error"}),[3,4];case 3:return setTimeout((function(){ee({status:!1,message:"",code:""})}),3e3),[7];case 4:return[2]}var a}))}));return function(){return e.apply(this,arguments)}}(),Ae=function(){var e=(0,i.Z)((function(e){var t,n,i;return(0,o.__generator)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,3,4]),[4,V((0,s.Z)((0,r.Z)({},e),{_id:We}))];case 1:return n=a.sent(),!1!==(null===(i=null===n||void 0===n||null===(t=n.data)||void 0===t?void 0:t.data)||void 0===i?void 0:i.isSuccess)&&i?(ee({status:!0,message:"Berhasil mengubah data",code:"success"}),Be(null),Ne()):ee({status:!0,message:"Terjadi kesalahan ketika mengubah data",code:"error"}),[3,4];case 2:return a.sent(),ee({status:!0,message:"Internal Server Error",code:"error"}),[3,4];case 3:return setTimeout((function(){ee({status:!1,message:"",code:""})}),3e3),[7];case 4:return[2]}}
1))}));return function(t){return e.apply(this,arguments)}}(),Le=function(){var e=(0,i.Z)((function(e){var t,n,i;return(0,o.__generator)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,3,4]),[4,J(e)];case 1:return n=a.sent(),!1!==(null===(i=null===n||void 0===n||null===(t=n.data)||void 0===t?void 0:t.data)||void 0===i?void 0:i.isSuccess)&&i?(ee({status:!0,message:"Berhasil menambahkan data",code:"success"}),Be(null),Ne()):ee({status:!0,message:"Terjadi kesalahan ketika menambahkan data",code:"error"}),[3,4];case 2:return a.sent(),ee({status:!0,message:"Internal Server Error",code:"error"}),[3,4];case 3:return setTimeout((function(){ee({status:!1,message:"",code:""})}),3e3),[7];case 4:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),He=function(){var e=(0,i.Z)((function(){var e,t,n;return(0,o.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,3,4]),[4,(a={dataList:ge},(0,U.qC)("".concat(Y.Xp.baseUrl,"/api/fmj/b2b/bulk"),a))];case 1:return t=i.sent(),!1===(null===(n=null===t||void 0===t||null===(e=t.data)||void 0===e?void 0:e.data)||void 0===n?void 0:n.isSuccess)?ee({status:!0,message:"Terjadi kesalahan ketika menambahkan data",code:"error"}):(ee({status:!0,message:"Berhasil menambahkan ".concat(n.uploadCount||1," data(s)"),code:"success"}),me([]),xe([]),ve([]),Ne()),[3,4];case 2:return i.sent(),ee({status:!0,message:"Internal Server Error",code:"error"}),[3,4];case 3:return setTimeout((function(){ee({status:!1,message:"",code:""})}),3e3),[7];case 4:return[2]}var a}))}));return function(){return e.apply(this,arguments)}}(),Oe=(e=function(e){P(e)},t=500,(0,m.useMemo)((function(){return(0,ae.debounce)(e,t)}),[e,t])),Pe=function(e,t){t&&Be(t._id),Re(e),ye(!0)},Fe=function(){var e=(0,i.Z)((function(e){var t,n,i;return(0,o.__generator)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,$(e)];case 1:return n=a.sent(),i=null===n||void 0===n||null===(t=n.data)||void 0===t?void 0:t.data,me(i.dataList||[]),ve(i.errorList||[]),xe(i.dataList.map((function(e,t){return{index:t+2,username:e.name,phone:e.nomorHp,testDate:d()(e.tanggalTes).format("D MMMM YYYY HH.mm"),sarInCm:e.sitAndReach,gsMaxLeftInKg:e.maxGenggamTanganKiri,gsMaxRightInKg:e.maxGenggamTanganKanan,mwtInMeters:e._6mwtMeter,mwtInBpm:e._6mwtBpm,mwtInSpo2:e._6mwtSpo2,mhInformation:e.riwayatMedis,isError:e.isError||!1}}))||[]),[3,3];case 2:return a.sent(),ee({status:!0,message:"Internal Server Error",code:"error"}),setTimeout((function(){ee({status:!1,message:"",code:""})}),3e3),[3,3];case 3:return[2]}}
1))}));return function(t){return e.apply(this,arguments)}}();return(0,m.useEffect)((function(){q(!0),Ne(),q(!1)}),[B,u,O]),(0,l.jsxs)(C.Z,{title:"Jurnal Test Kebugaran",children:[(0,l.jsx)(p.Z,{maxWidth:!c&&"xl",children:(0,l.jsxs)(h.Z,{variant:"h3",component:"h1",children:["Jurnal Peserta ",(0,l.jsx)("br",{}),"Internal GorryWell"]})}),(0,l.jsxs)(x.Z,{children:[(0,l.jsxs)(f.Z,{sx:{display:"flex",justifyContent:"flex-end",p:3,alignItems:"center",gap:2},children:[(0,l.jsx)(b.Z,{sx:{borderRadius:"16px",px:6.5,py:1.25},variant:"outlined",onClick:function(){Se(!0)},children:"Bulk Upload"}),(0,l.jsx)(b.Z,{sx:{borderRadius:"16px",px:6.5,py:1.25},variant:"contained",onClick:function(){return Pe("create",null)},startIcon:(0,l.jsx)(T.Z,{icon:"material-symbols:add",width:24,height:24}),children:"Add Data"})]}),(0,l.jsx)(k.Z,{children:(0,l.jsx)(v.Z,{sx:{mb:3,px:3},children:(0,l.jsxs)(I.Z,{size:"medium",sx:(n={},(0,a.Z)(n,"&.MuiTable-root",{backgroundColor:""}),(0,a.Z)(n,"& .MuiTableCell-head",{boxShadow:"none !important"}),(0,a.Z)(n,"tableLayout","fixed"),(0,a.Z)(n,"minWidth","max-content"),n),children:[(0,l.jsx)(S.K,{headLabel:se,filterTable:function(e){Oe((0,r.Z)({},e.username&&{user:e.username},e.createdAt&&{inputedDate:e.createdAt},e.sarInCm&&{sarInCm:Number(e.sarInCm)},e.gsMaxLeftInKg&&{gsMaxLeftInKg:Number(e.gsMaxLeftInKg)},e.gsMaxRightInKg&&{gsMaxRightInKg:Number(e.gsMaxRightInKg)},e.gsTotalInKg&&{gsTotalInKg:Number(e.gsTotalInKg)},e.gsMeanInKg&&{gsMeanInKg:Number(e.gsMeanInKg)},e.mwtInMeters&&{mwtInMeters:Number(e.mwtInMeters)},e.mwtInBpm&&{mwtInBpm:Number(e.mwtInBpm)},e.mwtInSpo2&&{mwtInSpo2:Number(e.mwtInSpo2)},e.mhInformation&&{mhInformation:e.mhInformation},le[e.sarCategory]&&{sarCategory:le[e.sarCategory]},le[e.gsCategory]&&{gsCategory:le[e.gsCategory]},le[e.mwtCategory]&&{mwtCategory:le[e.mwtCategory]}))},path:"journal"}),(0,l.jsxs)(w.Z,{children:[ue.length>0&&!E&&ue.map((function(e,t){var n,i,a;return(0,l.jsxs)(M.Z,{id:"".concat(e.id,"-journal-fitness"),children:[(0,l.jsx)(Z.Z,{align:"left",children:(0,l.jsx)(h.Z,{variant:"subtitle3",children:e.user})}),(0,l.jsx)(Z.Z,{align:"center",children:(0,l.jsx)(h.Z,{variant:"subtitle3",children:d()(e.inputedDate).format("D MMMM YYYY HH.mm")})}),(0,l.jsx)(Z.Z,{align:"center",children:(0,l.jsx)(h.Z,{variant:"subtitle3",children:e.sarInCm||"-"})}),(0,l.jsx)(Z.Z,{align:"center",children:(0,l.jsx)(h.Z,{variant:"subtitle3",children:(null===e||void 0===e||null===(n=e.sarCategory)||void 0===n?void 0:n.display)||"-"})}),(0,l.jsx)(Z.Z,{align:"center",children:(0,l.jsx)(h.Z,{variant:"subtitle3",children:e.gsMaxLeftInKg||"-"})}),(0,l.jsx)(Z.Z,{align:"center",children:(0,l.jsx)(h.Z,{variant:"subtitle3",children:e.gsMaxRightInKg||"-"})}),(0,l.jsx)(Z.Z,{align:"center",children:(0,l.jsx)(h.Z,{variant:"subtitle3",children:e.gsTotalInKg||"-"})}),(0,l.jsx)(Z.Z,{align:"center",children:(0,l.jsx)(h.Z,{variant:"subtitle3",children:e.gsMeanInKg||"-"})}),(0,l.jsx)(Z.Z,{align:"center",children:(0,l.jsx)(h.Z,{variant:"subtitle3",children:(null===e||void 0===e||null===(i=e.gsCategory)||void 0===i?void 0:i.display)||"-"})}),(0,l.jsx)(Z.Z,{align:"center",children:(0,l.jsx)(h.Z,{variant:"subtitle3",children:e.mwtInMeters||"-"})}),(0,l.jsx)(Z.Z,{align:"center",children:(0,l.jsx)(h.Z,{variant:"subtitle3",children:e.mwtInBpm||"-"})}),(0,l.jsx)(Z.Z,{align:"center",children:(0,l.jsx)(h.Z,{variant:"subtitle3",children:e.mwtInSpo2||"-"})}),(0,l.jsx)(Z.Z,{align:"center",children:(0,l.jsx)(h.Z,{variant:"subtitle3",children:(null===e||void 0===e||null===(a=e.mwtCategory)||void 0===a?void 0:a.display)||"-"})}),(0,l.jsx)(Z.Z,{align:"left",children:(0,l.jsx)(h.Z,{variant:"subtitle3",children:e.mhInformation||"-"})}),(0,l.jsx)(Z.Z,{align:"center",children:(0,l.jsx)("img",{src:(0,Q.fe)("".concat(e.imageUrl)),onError:function(e){return e.target.src="".concat(Y.Xp.domainUrl,"/assets/icons/default.jpg")},alt:"Image Journal",style:{width:"auto",height:"auto"}})}),(0,l.jsx)(Z.Z,{align:"center",sx:{p:0},children:(0,l.jsxs)(j.ZP,{container:!0,columnSpacing:1,sx:{m:0},children:[(0,l.jsx)(j.ZP,{item:!0,xs:4,children:(0,l.jsx)(b.Z,{sx:{minWidth:20,minHeight:20},onClick:function(){return Pe("view",e)},children:(0,l.jsx)(T.Z,{icon:"mdi:eye",width:20,height:20,sx:{color:"#5EB660"}})})}),(0,l.jsx)(j.ZP,{item:!0,xs:4,children:(0,l.jsx)(b.Z,{sx:{minWidth:20,minHeight:20},onClick:function(){return Pe("edit",e)},children:(0,l.jsx)(T.Z,{icon:"mdi:square-edit-outline",width:20,height:20,sx:{color:"#ffd233"}})})}),(0,l.jsx)(j.ZP,{item:!0,xs:4,children:(0,l.jsx)(b.Z,{sx:{minWidth:20,minHeight:20},onClick:function(){return function(e){Be(e._id),Me(!0)}(e)},children:(0,l.jsx)(T.Z,{icon:"mdi:delete-outline",width:20,height:20,sx:{color:"red"}})})})]})})]},t)})),!E&&0===ue.length&&(0,l.jsx)(M.Z,{children:(0,l.jsx)(Z.Z,{align:"center",colSpan:se.length,children:"Data tidak ditemukan"})})]})]})})}),(0,l.jsx)(f.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},children:(0,l.jsx)(y.Z,{count:R,page:B,onChange:function(e,t){return N(t)},color:"primary"})})]}),(0,l.jsx)(A,{row:{title:"Hapus Jurnal Hasil Test Kebugaran",message:"Yakin ingin menghapus jurnal hasil test kebugaran ini? Jurnal yang dihapus tidak dapat dikembalikan",open:we,confirm:"Hapus"},submitConfirmation:_e,onCloseDialog:function(){Be(null),Me(!1)}}),(0,l.jsx)(ne,{id:We,row:{open:je,type:Ke},onCloseDialog:function(){Be(null),ye(!1),Re(!1)},onSubmit:"create"===Ke?Le:"edit"===Ke?Ae:function(){}}),(0,l.jsx)(L.Z,{row:{open:ke,tableHead:oe,previewDatas:he,previewErrors:be},onCloseDialog:function(){Se(!1)},onExport:function(){var e=g().unparse({fields:["nomorHp","sitAndReach","maxGenggamTanganKiri","maxGenggamTanganKanan","_6mwtMeter","_6mwtBpm","_6mwtSpo2","riwayatMedis"],data:["6281234567890",99.2,99.35,99.1,100,99,99,"Text riwayat medis"]}),t=new Blob([e],{type:"text/csv;charset=utf-8;"}),n=document.createElement("a"),i=URL.createObjectURL(t);n.href=i,n.setAttribute("download","template_jurnal_test_kebugaran.csv"),document.body.appendChild(n),n.click(),document.body.removeChild(n)},onValidate:Fe,onSubmit:He}),(0,l.jsx)(H.Z,{row:X})]})}ue.getLayout=function(e){return(0,l.jsx)(O.Z,{children:e})}}},function(e){e.O(0,[2016,4885,135,2298,2679,7155,7722,5917,4225,503,6794,633,3466,7918,6650,5306,1322,510,1830,3447,9150,9774,2888,179],(function(){return t=25490,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
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.