(this.webpackJsonpdimo=this.webpackJsonpdimo||[]).push([[90],{1331:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),c=(a(13),a(247)),i=a(803),o=a(951),u=a(254),s=Object(c.a)((function(e){return{root:{backgroundColor:e.palette.background.dark,minHeight:"100%"}}}));t.default=function(e){var t=e.location,a=s(),n=t.state.data,c=n.transactionType,l=n.transactionNumber,m=n.transactionDate,O=n.accountOrigin,d=n.accountOriginName,E=n.accountNumberOrigin,A=n.accountDestiny,D=n.accountDestinyName,T=n.accountNumberDestiny,g=n.amount;return r.a.createElement(u.a,{className:a.root,title:"Pagos de TC"},r.a.createElement(i.a,{maxWidth:"lg"},r.a.createElement(o.b,{transactionType:c,transactionNumber:l,transactionDate:m,accountOrigin:O,accountOriginName:d,accountNumberOrigin:E,accountDestiny:A,accountDestinyName:D,accountNumberDestiny:T,amount:g})))}},951:function(e,t,a){"use strict";a.d(t,"c",(function(){return T})),a.d(t,"a",(function(){return g})),a.d(t,"g",(function(){return f})),a.d(t,"f",(function(){return p})),a.d(t,"d",(function(){return C})),a.d(t,"e",(function(){return N}));var n=a(37),r=a(0),c=a.n(r),i=(a(13),a(255)),o=a(976),u=a.n(o),s=a(247),l=a(194),m=a(249),O=a(808),d=a(789),E=a(154),A=Object(s.a)((function(e){return{root:{},principalText:{color:e.palette.text.primary,fontSize:"14px",wordBreak:"break-word"},secondText:{color:e.palette.text.tertiary,fontSize:"16px"},amountText:{color:e.palette.text.tertiary,fontSize:"22px"},button:{backgroundColor:"rgba(114, 124, 142, .6)",color:"#fff"}}})),D=function(e){var t=e.toString().split(".");return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,"."),t.join(".")},T=function(e){var t=e+"";return""!==t?(t=t.substring(0,t.length-2),"Gs. "+D(t+"")):"Gs. "+D(t+"")};function g(e){var t=e.className,a=e.description,n=e.value,r=e.isAmount,i=A();return c.a.createElement(l.a,{display:"flex",flexDirection:"column",className:t},c.a.createElement(m.a,{variant:"body1",className:i.principalText},a),c.a.createElement(m.a,{variant:"body1",className:r?i.amountText:i.secondText},n))}var f=function(e,t){if("TRAN"===e)return"TRANSFERENCIA";if("PAGO"===e){var a="PAGO";return t&&(t===E.g.PAGO.servicios.PAGOCR?a+=" DE PRESTAMO":t===E.g.PAGO.servicios.APORTE?a+=" DE APORTE":t===E.g.PAGO.servicios.SOLIDARIDAD&&(a+=" DE SOLIDARIDAD")),a}return e===E.g.COMP.value?"COMPRA":"TRANSFERENCIA"},p=function(e,t){return"TPO"===e||"TPD"===e?"TARJETA DIMO":"TCO"===e||"TCD"===e?"TARJETA DE CREDITO":e===E.d.CCAHOO?"CAJA DE AHORROS":e===E.c.CCAHOD?t===E.g.PAGO.servicios.RUEDA?"RUEDA DE AHORRO":"CAJA DE AHORROS":"BANCOO"===e||"BANCOD"===e?"CUENTA BANCARIA":e===E.c.CRDD?"PRESTAMO":e===E.c.OBLGD?"OBLIGACION COOPERATIVA":e===E.c.CCOMD?"COMERCIO CABAL":void 0},C=function(e,t){return"TPD"===e||"TCD"===e||"TPO"===e||"TCO"===e?t.substr(t.length-4,t):t},N=function(e){return e===E.d.TPO||e===E.d.TCO||e===E.c.TPD||e===E.c.TCD?"Tarjeta":e===E.c.CCOMD?"Comercio":"Cuenta"};t.b=function(e){var t=e.transactionType,a=e.transactionCodService,o=e.transactionNumber,s=e.transactionDate,m=e.accountOrigin,E=e.accountOriginName,D=e.accountNumberOrigin,R=e.accountDestiny,b=e.accountDestinyName,v=e.accountNumberDestiny,x=e.transferNoDIMO,P=e.amount,y=A(),h=c.a.useRef(),I=Object(r.useState)({width:0,height:0}),S=Object(n.a)(I,2),M=S[0],G=S[1],k=(M.width,function(){u()(h.current.getElementsByTagName("div")[0]).then((function(e){var t=e.toDataURL("image/png"),a=document.createElement("a");a.download="comprobante_transaccion.png",a.href=t,a.click()}))});return c.a.createElement(i.a,{bounds:!0,onResize:function(e){return G(e.bounds)}},(function(e){var n=e.measureRef;return c.a.createElement(l.a,{ref:n},c.a.createElement(l.a,{padding:2,ref:h},c.a.createElement(O.a,{container:!0,spacing:1},c.a.createElement(O.a,{item:!0,xs:12},c.a.createElement(g,{description:"Tipo de Transacci\xf3n",value:f(t,a)})),c.a.createElement(O.a,{item:!0,xs:12},c.a.createElement(g,{description:"Nro. de Transacci\xf3n",value:o})),c.a.createElement(O.a,{item:!0,xs:12},c.a.createElement(g,{description:"Fecha de Transacci\xf3n",value:s})),c.a.createElement(O.a,{item:!0,xs:12},c.a.createElement(g,{description:"Origen",value:p(m)})),c.a.createElement(O.a,{item:!0,xs:12},c.a.createElement(g,{description:N(m)+" Origen",value:E+" - "+C(m,D)})),c.a.createElement(O.a,{item:!0,xs:12},c.a.createElement(g,{description:"Destino",value:p(R,a)+(x?" NUEVA":"")})),c.a.createElement(O.a,{item:!0,xs:12},c.a.createElement(g,{description:N(R)+" Destino",value:b+" - "+(x?"NUEVA":C(R,v))})),c.a.createElement(O.a,{item:!0,xs:12},c.a.createElement(g,{description:"Monto",isAmount:!0,value:T(P)})))),c.a.createElement(l.a,{padding:2},c.a.createElement(d.a,{color:"primary",classes:{label:y.label},size:"large",fullWidth:!0,variant:"contained",startIcon:c.a.createElement("img",{src:"/static/images/dimo/icon_share_white.png",alt:"icon_share_white.png"}),onClick:k},"COMPARTIR COMPROBANTE")))}))}}}]);
//# sourceMappingURL=90.c611c453.chunk.js.map