PHP Classes

File: dist/js/card.js

Recommend this page to a friend!
  Classes of Naif Alshaye   Laravel Nova Paypal   dist/js/card.js   Download  
File: dist/js/card.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Laravel Nova Paypal
Show Paypal account transactions in Laravel Nova
Author: By
Last change:
Date: 5 years ago
Size: 4,328 bytes
 

Contents

Class file image Download
!function(t){var e={};function a(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,a),s.l=!0,s.exports}a.m=t,a.c=e,a.d=function(t,e,n){a.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="",a(a.s=0)}([function(t,e,a){a(1),t.exports=a(6)},function(t,e,a){Nova.booting(function(t,e){t.component("paypal",a(2))})},function(t,e,a){var n=a(3)(a(4),a(5),!1,null,null,null);t.exports=n.exports},function(t,e){t.exports=function(t,e,a,n,s,i){var o,r=t=t||{},c=typeof t.default;"object"!==c&&"function"!==c||(o=t,r=t.default);var l,d="function"==typeof r?r.options:r;if(e&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0),a&&(d.functional=!0),s&&(d._scopeId=s),i?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},d._ssrRegister=l):n&&(l=n),l){var _=d.functional,p=_?d.render:d.beforeCreate;_?(d._injectStyles=l,d.render=function(t,e){return l.call(e),p(t,e)}):d.beforeCreate=p?[].concat(p,l):[l]}return{esModule:o,exports:r,options:d}}},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:["card"],data:function(){return{paypal_logo:"https://www.paypalobjects.com/webstatic/en_US/mktg/pages/stories/pp_h_rgb.jpg",response:[],balance:[],hide_logo:!1,loading:!0,days:5}},mounted:function(){var t=this;1==this.card.hide_logo&&(this.hide_logo=!0,this.days=!0),this.card.days>0?this.days=this.card.days:this.days=5,Nova.request().get("/nova-vendor/paypal/getData",{params:{days:this.card.days,count:this.card.count}}).then(function(e){t.balance=e.data.balance.balance,e.data.transactions.transactions.length>0?t.transactions=e.data.transactions.transactions:t.transactions=!1,t.loading=!1,document.getElementById("spinner").style.display="none"})}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("card",{staticClass:"h-auto"},[a("div",{staticClass:"px-3 py-3",staticStyle:{"min-height":"200px"}},[a("div",{attrs:{align:"left"}},[a("img",{directives:[{name:"show",rawName:"v-show",value:!1===t.hide_logo,expression:"hide_logo === false"}],attrs:{src:t.paypal_logo,width:"150"}}),t._v(" "),a("div",{staticClass:"spinner",attrs:{id:"spinner",align:"center"}})]),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:!t.loading,expression:"!loading"}]},[a("div",{staticStyle:{"margin-bottom":"20px","font-family":"'Arial'"}},["Success"===t.balance.ACK?a("div",{staticClass:"text-center text-2lg font-light",staticStyle:{"font-size":"14px",color:"green"}},[t._v("Current Balance: $"+t._s(t.balance.L_AMT0))]):t._e(),t._v(" "),"Failure"===t.balance.ACK?a("div",{staticClass:"text-center",staticStyle:{color:"red","font-size":"12px"}},[t._v(t._s(t.balance.L_SEVERITYCODE0)+" "+t._s(t.balance.L_ERRORCODE0)+": "+t._s(t.balance.L_LONGMESSAGE0))]):t._e()]),t._v(" "),!1!==t.transactions?a("div",{staticStyle:{"margin-bottom":"20px"}},[a("table",{staticClass:"table table-bordered table-hover table-responsive",staticStyle:{"font-size":"14px","margin-left":"auto","margin-right":"auto"}},[a("tr",[a("th",[t._v("Transaction ID")]),t._v(" "),a("th",[t._v("Date")]),t._v(" "),a("th",[t._v("Amount")]),t._v(" "),a("th",[t._v("Status")])]),t._v(" "),t._l(t.transactions,function(e){return a("tr",[a("td",{staticStyle:{height:"40px","font-size":"12px"}},[a("a",{attrs:{href:"https://www.paypal.com/activity/payment/"+e.transaction_id,target:"_blank"}},[t._v(t._s(e.transaction_id))])]),t._v(" "),a("td",{staticStyle:{height:"40px"}},[t._v(t._s(e.timestamp))]),t._v(" "),a("td",{staticStyle:{height:"40px"}},[t._v("$"+t._s(e.amt))]),t._v(" "),a("td",{staticStyle:{height:"40px"}},[t._v(t._s(e.status))])])})],2)]):t._e(),t._v(" "),!1===t.transactions?a("div",{staticStyle:{"text-align":"center",color:"#db363c","font-size":"12px"}},[t._v("No transacitons found since "+t._s(this.days)+" days ago!")]):t._e()])])])},staticRenderFns:[]}},function(t,e){}]);