%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/opti/www/ezone-mortuary.optisoft.com.ng/static/js/
Upload File :
Create Path :
Current File : /home/opti/www/ezone-mortuary.optisoft.com.ng/static/js/21.11d2949a.chunk.js

(this["webpackJsonpezone-mortuary-app"]=this["webpackJsonpezone-mortuary-app"]||[]).push([[21],{1122:function(e,t,a){"use strict";a.r(t);var n=a(40),r=a(41),s=a(57),l=a(58),c=a(0),o=a.n(c),m=a(7),i=a(8),d=a(283),u=a(846),g=a(23),p=a(56),f=a(32),b=a(119),E=a(808),x=a(791),y=a(817),h=a(813),v=a(818),N=a(756),O=a(862),P=a(1105),w=a(841),j=a(836),R=Object(N.a)((function(e){return{root:{width:"fit-content",border:"1px solid ".concat(e.palette.divider),borderRadius:2*e.shape.borderRadius,padding:e.spacing(.2,1)}}}));var T=Object(f.i)((function(e){var t=e.match,a=R(),n=Object(m.b)(),r=Object(m.c)((function(e){return e.ezone.branches.branches})),s=Object(m.c)((function(e){return e.reportsApp.reports.loading})),l=Object(m.c)((function(e){return e.reportsApp.reports.form})),c=function(e){return function(t){n(j.p(e,t))}};return console.log(l,"form"),o.a.createElement("div",{className:"flex flex-1 w-full items-center justify-between"},o.a.createElement(p.b,{animation:"transition.slideLeftIn",delay:300},o.a.createElement(b.a,{className:"hidden sm:flex",variant:"h6"},t.params.id?"Admission Report Details":"Admission Reports")),o.a.createElement("div",{className:"flex flex-1 items-start justify-end px-12 space-x-8"},o.a.createElement(p.b,{animation:"transition.slideDownIn",delay:300},o.a.createElement(E.a,{className:"min-w-128",select:!0,label:"Branch",id:"branch_id",name:"branchId",value:l.branchId,onChange:function(e){n(j.o(e))},variant:"outlined",size:"small",InputLabelProps:{disabled:!0}},o.a.createElement(x.a,{value:""},"Select branch"),r.map((function(e){return o.a.createElement(x.a,{key:e.id,value:e.id},e.name)})))),o.a.createElement("div",{className:"flex items-start space-x-8"},o.a.createElement(p.b,{animation:"transition.slideDownIn",delay:300},o.a.createElement(O.a,{utils:w.a},o.a.createElement(y.a,{container:!0,justify:"flex-start",className:a.root},o.a.createElement("div",{className:"flex flex-col"},o.a.createElement(P.a,{disableToolbar:!0,format:"dd/MM/yyyy",id:"start-date",label:"Start",value:l.startDate,onChange:c("startDate"),InputProps:{disableUnderline:!0},InputLabelProps:{disabled:!0},KeyboardButtonProps:{"aria-label":"change date"}})),o.a.createElement("div",{className:"flex flex-col"},o.a.createElement(P.a,{disableToolbar:!0,format:"dd/MM/yyyy",id:"end-date",label:"End",value:l.endDate,onChange:c("endDate"),InputProps:{disableUnderline:!0},InputLabelProps:{disabled:!0},KeyboardButtonProps:{"aria-label":"change date"}}))))),o.a.createElement(p.b,{animation:"transition.slideDownIn",delay:300},o.a.createElement(h.a,{variant:"contained",disableElevation:!0,onClick:function(){n(j.j(l))},endIcon:s&&o.a.createElement(v.a,{size:16}),disabled:!(l.startDate&&l.endDate&&l.branchId)},"Filter")))))})),I=a(21),D=a(946),A=a(947),M=a(948),S=a(949),C=a(1134),k=a(11),Y=a(89),H=a.n(Y),U=a(993),L=a(807),B=a(1133),F=[{id:"form-number",align:"left",disablePadding:!1,label:"Form number",sort:!0},{id:"deceased-name",align:"left",disablePadding:!1,label:"Deceased name",sort:!0},{id:"deceased-age",align:"left",disablePadding:!1,label:"Deceased age",sort:!0},{id:"deceased-gender",align:"left",disablePadding:!1,label:"Deceased gender",sort:!0},{id:"customer-name",align:"left",disablePadding:!1,label:"Customer name",sort:!0},{id:"branch",align:"left",disablePadding:!1,label:"Branch",sort:!0},{id:"admission -date",align:"left",disablePadding:!1,label:"Admission Date",sort:!1}];var K=function(e){var t=function(t){return function(a){e.onRequestSort(a,t)}};return o.a.createElement(U.a,null,o.a.createElement(M.a,{className:"h-64"},F.map((function(a){return o.a.createElement(S.a,{className:"whitespace-no-wrap",key:a.id,align:a.align,padding:a.disablePadding?"none":"default",sortDirection:e.order.id===a.id&&e.order.direction},a.sort?o.a.createElement(L.a,{title:"Sort",placement:"right"===a.align?"bottom-end":"bottom-start",enterDelay:300},o.a.createElement(B.a,{active:e.order.id===a.id,direction:e.order.direction,onClick:t(a.id)},a.label)):o.a.createElement(B.a,{active:e.order.id===a.id,direction:e.order.direction,onClick:t(a.id)},a.label))}),this)))},G=a(741),z=a(790),q=a(844),J=a.n(q),V=o.a.forwardRef((function(e,t){return o.a.createElement(J.a,{targetRef:t,filename:"admission-report.pdf",options:{orientation:"portrait",unit:"in",format:[10,16]},x:.1,y:.1,scale:.8},(function(e){var t=e.toPdf;return o.a.createElement(G.a,{onClick:t},o.a.createElement(z.a,null,"cloud_download"))}))}));var _=Object(f.i)((function(e){var t=o.a.createRef(),a=Object(m.c)((function(e){return e.ezone.branches.branches})),n=Object(m.c)((function(e){return e.reportsApp.reports.form})),r=Object(m.c)((function(e){return e.reportsApp.reports.admissions})),s=r.admissions,l=r.totalItems,i=r.currentPage,d=Object(c.useState)([]),u=Object(I.a)(d,2),g=u[0],f=u[1],b=Object(c.useState)(0),E=Object(I.a)(b,2),x=E[0],y=E[1],h=Object(c.useState)(10),v=Object(I.a)(h,2),N=v[0],O=v[1],P=Object(c.useState)({direction:"asc",id:null}),w=Object(I.a)(P,2),j=w[0],R=w[1];return console.log({admissions:s}),o.a.createElement("div",{className:"relative w-full"},o.a.createElement("div",{className:"absolute right-0 top-0 bg-orange-lighter"},o.a.createElement(V,{ref:t})),o.a.createElement("div",{className:"w-full flex flex-col",ref:t},o.a.createElement(p.b,{delay:100},o.a.createElement("div",{className:"flex justify-center flex-wrap mt-4 mb-16"},o.a.createElement("div",{className:"px-4 pb-5 sm:px-6 text-center"},o.a.createElement("img",{className:"h-72",src:"/assets/images/profile/omega-homes.svg",alt:""}),o.a.createElement("h3",{className:"text-base leading-4 font-bold text-gray-900"},"Daily Admission Report"),o.a.createElement("p",{className:"text-sm"},n.startDate&&"As of ".concat(H()(n.startDate).format("Do MMM, YYYY")))))),o.a.createElement(p.p,{className:"flex-grow overflow-x-auto"},o.a.createElement(D.a,{className:"min-w-xl","aria-labelledby":"tableTitle"},o.a.createElement(K,{numSelected:g.length,order:j,onSelectAllClick:function(e){e.target.checked?f(s.map((function(e){return e.id}))):f([])},onRequestSort:function(e,t){var a=t,n="desc";j.id===t&&"desc"===j.direction&&(n="asc"),R({direction:n,id:a})},rowCount:s.length}),o.a.createElement(A.a,null,k.a.orderBy(s,[function(e){switch(j.id){case"categories":return e.categories[0];default:return e[j.id]}}],[j.direction]).slice(x*N,x*N+N).map((function(e){var t,n=-1!==g.indexOf(e.id);return o.a.createElement(M.a,{className:"h-64 cursor-pointer",hover:!0,role:"checkbox","aria-checked":n,tabIndex:-1,key:e.id,selected:n},o.a.createElement(S.a,{component:"th",scope:"row"},e.formNumber),o.a.createElement(S.a,{className:"truncate",component:"th",scope:"row"},e.deceasedName),o.a.createElement(S.a,{component:"th",scope:"row",align:"left"},e.deceasedAge),o.a.createElement(S.a,{component:"th",scope:"row",align:"left"},e.deceasedGender),o.a.createElement(S.a,{component:"th",scope:"row",align:"left"},e.customerName),o.a.createElement(S.a,{component:"th",scope:"row",align:"left"},e.branchId?null===(t=a.find((function(t){return t.id===e.branchId})))||void 0===t?void 0:t.name:"\u2014"),o.a.createElement(S.a,{component:"th",scope:"row",align:"left"},e.date?H()(e.date).format("ll"):"\u2014"))}))))),o.a.createElement(C.a,{component:"div",count:l,rowsPerPage:N,page:i,backIconButtonProps:{"aria-label":"Previous Page"},nextIconButtonProps:{"aria-label":"Next Page"},onChangePage:function(e,t){y(t)},onChangeRowsPerPage:function(e){O(e.target.value)}})))}));var X=function(){return o.a.createElement("div",null,o.a.createElement("div",{className:"flex items-center justify-between overflow-hidden"},o.a.createElement("div",{className:"flex flex-col"},o.a.createElement(p.b,{delay:100},o.a.createElement("div",{className:"flex flex-wrap mt-8"},o.a.createElement("div",{className:"w-full bg-white shadow overflow-hidden sm:rounded-lg"},o.a.createElement("div",{className:"px-4 py-5 sm:px-6"},o.a.createElement("h3",{className:"text-lg leading-6 font-medium text-gray-900"},"Basic Information"),o.a.createElement("p",{className:"mt-1 max-w-2xl text-sm text-gray-500"},"Personal details and application.")),o.a.createElement("div",{className:"border-t border-gray-200"},o.a.createElement("dl",null,o.a.createElement("div",{className:"bg-gray-50 px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6"},o.a.createElement("dt",{className:"text-sm font-medium text-gray-500"},"First name"),o.a.createElement("dd",{className:"mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2"},"Margot")),o.a.createElement("div",{className:"bg-gray-50 px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6"},o.a.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Sarah"),o.a.createElement("dd",{className:"mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2"},"Margot Foster")),o.a.createElement("div",{className:"bg-gray-50 px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6"},o.a.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Last name"),o.a.createElement("dd",{className:"mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2"},"Foster")),o.a.createElement("div",{className:"bg-white px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6"},o.a.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Gender"),o.a.createElement("dd",{className:"mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2"},"Male")),o.a.createElement("div",{className:"bg-gray-50 px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6"},o.a.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Age"),o.a.createElement("dd",{className:"mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2"},"60")),o.a.createElement("div",{className:"bg-gray-50 px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6"},o.a.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Address"),o.a.createElement("dd",{className:"mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2"},"Marina, Lagos."))))),o.a.createElement("div",{className:"w-full bg-white shadow overflow-hidden sm:rounded-lg"},o.a.createElement("div",{className:"px-4 py-5 sm:px-6"},o.a.createElement("h3",{className:"text-lg leading-6 font-medium text-gray-900"},"Date of Assertion")),o.a.createElement("div",{className:"border-t border-gray-200"},o.a.createElement("dl",null,o.a.createElement("div",{className:"bg-gray-50 px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6"},o.a.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Place of death"),o.a.createElement("dd",{className:"mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2"},"Lagos")),o.a.createElement("div",{className:"bg-white px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6"},o.a.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Date"),o.a.createElement("dd",{className:"mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2"},"2021-04-23")),o.a.createElement("div",{className:"bg-gray-50 px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6"},o.a.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Cause of death"),o.a.createElement("dd",{className:"mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2"},"Car Accident")),o.a.createElement("div",{className:"bg-white px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6"},o.a.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Time"),o.a.createElement("dd",{className:"mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2"},"23:45")),o.a.createElement("div",{className:"bg-gray-50 px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6"},o.a.createElement("dt",{className:"text-sm font-medium text-gray-500"},"How was death ascertained?"),o.a.createElement("dd",{className:"mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2"},"How death was ascertained..."))))),o.a.createElement("div",{className:"w-full bg-white shadow overflow-hidden sm:rounded-lg"},o.a.createElement("div",{className:"px-4 py-5 sm:px-6"},o.a.createElement("h3",{className:"text-lg leading-6 font-medium text-gray-900"},"Medical")),o.a.createElement("div",{className:"border-t border-gray-200"},o.a.createElement("dl",null,o.a.createElement("div",{className:"bg-gray-50 px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6"},o.a.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Name of Hosipital"),o.a.createElement("dd",{className:"mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2"},"Doren Specialist")),o.a.createElement("div",{className:"bg-white px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6"},o.a.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Medical Attendant"),o.a.createElement("dd",{className:"mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2"},"Margot Foster")),o.a.createElement("div",{className:"bg-gray-50 px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6"},o.a.createElement("dt",{className:"text-sm font-medium text-gray-500"},"Address"),o.a.createElement("dd",{className:"mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2"},"Thomas Estate, Ajah, Lagos"))))))))))},Q=a(46),W=function(e){Object(s.a)(a,e);var t=Object(l.a)(a);function a(){return Object(n.a)(this,a),t.apply(this,arguments)}return Object(r.a)(a,[{key:"componentDidMount",value:function(){this.props.getBranches()}},{key:"render",value:function(){var e=this.props.classes;return o.a.createElement(p.n,{classes:{root:e.layoutRoot,content:"flex",header:"min-h-72 h-72 sm:h-136 sm:min-h-136"},header:o.a.createElement(T,null),content:o.a.createElement("div",{className:"p-24 w-full"},this.props.match.params.id?o.a.createElement(X,null):o.a.createElement(_,null)),innerScroll:!0})}}]),a}(c.Component);t.default=Object(d.a)("reportsApp",u.a)(Object(i.a)((function(e){return{layoutRoot:{}}}),{withTheme:!0})(Object(m.a)(null,(function(e){return Object(Q.c)({getBranches:g.b},e)}))(W)))},836:function(e,t,a){"use strict";a.d(t,"c",(function(){return c})),a.d(t,"d",(function(){return o})),a.d(t,"f",(function(){return m})),a.d(t,"g",(function(){return i})),a.d(t,"e",(function(){return d})),a.d(t,"a",(function(){return u})),a.d(t,"b",(function(){return g})),a.d(t,"i",(function(){return p})),a.d(t,"h",(function(){return f})),a.d(t,"j",(function(){return b})),a.d(t,"k",(function(){return E})),a.d(t,"m",(function(){return x})),a.d(t,"n",(function(){return y})),a.d(t,"l",(function(){return h})),a.d(t,"o",(function(){return v})),a.d(t,"p",(function(){return N}));var n=a(34),r=a.n(n),s=a(89),l=a.n(s),c="[CUSTOMER APP] GET ADMISSION REPORT",o="[CUSTOMER APP] GET CREMATION REPORT",m="[CUSTOMER APP] GET VAULT REPORT",i="[CUSTOMER APP] GET VOUCHER REPORT",d="[CUSTOMER APP] GET RELEASE REPORT",u="[CUSTOMER APP] FETCH PROGRESS",g="[CUSTOMER APP] FETCH REPORT ERROR",p="[CUSTOMER APP] SET SEARCH TEXT",f="[CUSTOMER APP] SET FORM";function b(e){return function(t,a){var n=a().auth.user.data;e.orgKey=n.organisation.orgId,console.log("getAdmissionReports",e);var s=r.a.post("/api/v1/reports/admission-form",e);t({type:u}),s.then((function(e){console.log(e,"admission reports response"),t({type:c,payload:e.data.data})})).catch((function(e){t({type:g})}))}}function E(e){return function(t,a){var n=a().auth.user.data;e.orgKey=n.organisation.orgId,console.log("getCremationReports",e);var s=r.a.post("/api/v1/reports/cremation-form",e);t({type:u}),s.then((function(e){console.log(e,"cremation reports response"),t({type:o,payload:e.data.data})})).catch((function(e){t({type:g})}))}}function x(e){return function(t,a){var n=a().auth.user.data;e.orgKey=n.organisation.orgId;var s=r.a.post("/api/v1/reports/vault-form",e);t({type:u}),s.then((function(e){console.log(e,"vault reports response"),t({type:m,payload:e.data.data})})).catch((function(e){t({type:g})}))}}function y(e){return function(t,a){var n=a().auth.user.data;e.orgKey=n.organisation.orgId;var s=r.a.post("/api/v1/reports/voucher-form",e);t({type:u}),s.then((function(e){console.log(e,"voucher reports response"),t({type:i,payload:e.data.data})})).catch((function(e){t({type:g})}))}}function h(e){return function(t,a){t({type:u});var n=a().auth.user.data,s={};e?(e.orgKey=n.organisation.orgId,s=e):s={branchId:null,endDate:l()().format("YYYY-MM-DDTHH:mm:ss"),orgKey:n.organisation.orgId,startDate:l()("1999-07-07").format("YYYY-MM-DDTHH:mm:ss")},r.a.post("/api/v1/reports/release-form",s).then((function(e){console.log(e,"release reports response"),t({type:d,payload:e.data.data})})).catch((function(e){t({type:g})}))}}function v(e){return console.log(e.target.name,"name"),console.log(e.target.value,"value"),{type:f,name:e.target.name,value:e.target.value}}function N(e,t){return{type:f,name:e,value:l()(t).format("YYYY-MM-DDTHH:mm:ss")}}},846:function(e,t,a){"use strict";var n=a(46),r=a(22),s=a(6),l=a(836),c={loading:!1,searchText:"",form:{branchId:"",endDate:null,orgKey:1,startDate:null},admissions:{totalItems:0,admissions:[],totalPages:0,currentPage:0},cremations:{totalItems:0,cremations:[],totalPages:0,currentPage:0},vaults:{totalItems:0,vaults:[],totalPages:0,currentPage:0},vouchers:{totalItems:0,voucherList:[],totalPages:0,currentPage:0},releases:{totalItems:0,invoices:[],totalPages:0,currentPage:0},message:null},o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case l.c:return Object(s.a)(Object(s.a)({},e),{},{loading:!1,admissions:t.payload});case l.d:return Object(s.a)(Object(s.a)({},e),{},{loading:!1,cremations:t.payload});case l.f:return Object(s.a)(Object(s.a)({},e),{},{loading:!1,vaults:t.payload});case l.g:return Object(s.a)(Object(s.a)({},e),{},{loading:!1,vouchers:t.payload});case l.e:return Object(s.a)(Object(s.a)({},e),{},{loading:!1,releases:t.payload});case l.a:return Object(s.a)(Object(s.a)({},e),{},{loading:!0});case l.b:return Object(s.a)(Object(s.a)({},e),{},{loading:!1});case l.i:return Object(s.a)(Object(s.a)({},e),{},{searchText:t.searchText});case l.h:return Object(s.a)(Object(s.a)({},e),{},{form:Object(s.a)(Object(s.a)({},e.form),{},Object(r.a)({},t.name,t.value))});default:return e}},m=Object(n.d)({reports:o});t.a=m}}]);

Zerion Mini Shell 1.0