%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/infra/radar.ongrace.com/
Upload File :
Create Path :
Current File : //home/infra/radar.ongrace.com/19.js

(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{273:function(t,a,e){"use strict";e.r(a);var s=e(2),n=e(9),o=e.n(n),i={mixins:[s.a],components:{JsonViewer:o.a},i18n:{messages:{en:{operation_success:"Success",gateway:"Payment Gateway",date_from:"From",date_to:"To",donations_successful:"in successful donations",date_sell:"Sell date",date_credit:"Credit date",net_value:"Net value",brand:"Brand",fee:"Fee",pos:"POS",reconciliation:"Bank reconciliation"},pt:{operation_success:"Sucesso",gateway:"Gateway de Pagamento",date_from:"De",date_to:"Até",donations_successful:"em doações efetuadas com sucesso",date_sell:"Data da Venda",date_credit:"Data do Crédito",net_value:"Valor Líquido",brand:"Bandeira",fee:"Tarifa",pos:"POS",reconciliation:"Conciliação Bancária"}}},mounted:function(){this.load()},data:function(){return{transactionList:[],q:"",sortField:"id",sortTransaction:"desc",page:1,modalNewActive:!1,date_from:new Date((new Date).getFullYear()-1,(new Date).getMonth(),(new Date).getDate()),date_to:new Date,status:"",brand:"",company:"",product_id:"",transactionView:[]}},methods:{load:function(){this.$router.currentRoute.query.product_id&&(this.product_id=this.$router.currentRoute.query.product_id),queue.push(this,["getTransactions"])},getTransactions:function(){var t=this;return store.state.isLoading=!0,console.log(t.$router.currentRoute),console.log(t.$router),new Promise((function(a,e){axios.get("/api/transactions",{headers:{Authorization:"Bearer "+store.state.auth.access_token},params:{page:t.page,paginate:!0,q:t.q,sortBy:t.sortField,sortDirection:t.sortTransaction,date_from:t.date_from,date_to:t.date_to,status:t.status,brand_id:t.brand,company_id:t.company,product_id:t.product_id,with:"media, brand, product"}}).then((function(e){t.transactionList=e.data,store.state.isLoading=!1,a()}))}))},onPageChange:function(t){this.page=t,this.load()},onSort:function(t,a){this.sortField=t,this.sortTransaction=a,this.load()},editTransaction:function(t){this.transactionView=t,this.modalNewActive=!0},feeCheck:function(t){if(t&&t.product)return t.fee>t.product.fee}},computed:{}},r=e(1),c=Object(r.a)(i,(function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"container is-fluid"},[e("nav",{staticClass:"level"},[e("div",{staticClass:"level-left"},[e("div",{staticClass:"level-item"},[e("p",{staticClass:"subtitle is-5"},[e("strong",{domProps:{textContent:t._s(t.transactionList.total)}}),t._v("\n                        "+t._s(t.$tc("transaction",t.transactionList.total))+"\n                    ")])])]),t._v(" "),e("div",{staticClass:"level-right"},[e("p",{staticClass:"level-item"},[e("b-datepicker",{attrs:{placeholder:t.$tc("date_from"),icon:"calendar-today"},on:{input:t.getTransactions},model:{value:t.date_from,callback:function(a){t.date_from=a},expression:"date_from"}}),t._v(" "),e("b-datepicker",{attrs:{placeholder:t.$tc("date_to"),icon:"calendar-today"},on:{input:t.getTransactions},model:{value:t.date_to,callback:function(a){t.date_to=a},expression:"date_to"}})],1),t._v(" "),e("p",{staticClass:"level-item"},[e("b-select",{attrs:{placeholder:t.$tc("status")},on:{input:t.getTransactions},model:{value:t.status,callback:function(a){t.status=a},expression:"status"}},[e("option",{attrs:{value:""}},[t._v(t._s(t.$tc("status")))]),t._v(" "),e("option",{attrs:{value:"pending"}},[t._v(t._s(t.$tc("pending")))]),t._v(" "),e("option",{attrs:{value:"verified"}},[t._v(t._s(t.$tc("verified")))])])],1),t._v(" "),e("p",{staticClass:"level-item"},[e("b-select",{attrs:{placeholder:t.$tc("company")},on:{input:t.getTransactions},model:{value:t.company,callback:function(a){t.company=a},expression:"company"}},[e("option",{attrs:{value:""}},[t._v(t._s(t.$tc("company")))]),t._v(" "),t._l(t.$root.store.companyList,(function(a){return e("option",{domProps:{value:a.id}},[t._v(t._s(a.name))])}))],2)],1),t._v(" "),e("p",{staticClass:"level-item"},[e("b-select",{attrs:{placeholder:t.$tc("brand")},on:{input:t.getTransactions},model:{value:t.brand,callback:function(a){t.brand=a},expression:"brand"}},[e("option",{attrs:{value:""}},[t._v(t._s(t.$tc("brand")))]),t._v(" "),t._l(t.$root.store.brandList,(function(a){return e("option",{domProps:{value:a.id}},[t._v(t._s(a.name))])}))],2)],1),t._v(" "),e("div",{staticClass:"level-item",staticStyle:{"z-index":"0"}},[e("div",{staticClass:"field has-addons"},[e("p",{staticClass:"control"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.q,expression:"q"},{name:"focus",rawName:"v-focus"}],staticClass:"input",attrs:{type:"text",placeholder:t.$t("query")},domProps:{value:t.q},on:{keyup:function(a){return!a.type.indexOf("key")&&t._k(a.keyCode,"enter",13,a.key,"Enter")?null:t.getTransactions.apply(null,arguments)},input:function(a){a.target.composing||(t.q=a.target.value)}}})]),t._v(" "),e("p",{staticClass:"control"},[e("button",{staticClass:"button",on:{click:t.getTransactions}},[t._v("\n                                "+t._s(t.$t("search"))+"\n                            ")])])])]),t._v(" "),e("p",{staticClass:"level-item"},[e("a",{staticClass:"button",on:{click:t.load}},[t._m(0)])])])]),t._v(" "),e("b-table",{attrs:{data:t.transactionList.data,total:t.transactionList.total,paginated:"",striped:"","backend-pagination":"","backend-sorting":"","per-page":"15","current-page":t.page,"default-sort":"name","aria-next-label":t.$t("nextPage"),"aria-previous-label":t.$t("previousPage"),"aria-page-label":t.$t("page"),"aria-current-label":t.$t("currentPage"),"default-sort-direction":"asc","default-sort":[t.sortField,t.sortTransaction]},on:{"update:currentPage":function(a){t.page=a},"update:current-page":function(a){t.page=a},"page-change":t.onPageChange,sort:t.onSort},scopedSlots:t._u([{key:"default",fn:function(a){return[e("b-table-column",{attrs:{field:"media.company.name",label:t.$tc("company")}},[t._v("\n                    "+t._s(a.row.media.company.name)),e("br"),t._v(" "),e("span",{staticStyle:{"font-size":"9px"}},[t._v(t._s(a.row.media.filename_original))])]),t._v(" "),e("b-table-column",{attrs:{field:"date_sell",label:t.$tc("date"),sortable:""}},[t._v("\n                    "+t._s(t.$tc("date_sell"))+": "+t._s(a.row.date_sell)),e("br"),t._v("                    \n                    "+t._s(t.$tc("date_credit"))+": "+t._s(a.row.date_credit)+"\n                ")]),t._v(" "),e("b-table-column",{attrs:{field:"value",label:t.$tc("value"),sortable:""}},[t._v("\n                    "+t._s(t.$tc("value"))+": "+t._s(t._f("toBrl")(a.row.value))+" "),e("br"),t._v("\n                    "+t._s(t.$tc("net_value"))+": "+t._s(t._f("toBrl")(a.row.net_value))+"\n                ")]),t._v(" "),e("b-table-column",{attrs:{field:"fee",label:t.$tc("fee"),sortable:""}},[t._v("                    \n                    "+t._s(t._f("toBrl")(a.row.fee))+"%\n                    "),t.feeCheck(a.row)?e("b-icon",{attrs:{icon:"stop",type:"is-danger",size:"is-small"}}):e("b-icon",{attrs:{icon:"check",type:"is-success",size:"is-small"}}),t._v(" "),e("br"),t._v("\n                    "+t._s(a.row.brand.name)+" ("+t._s(a.row.product.name)+")\n                    ")],1),t._v(" "),e("b-table-column",{attrs:{field:"pos",label:t.$tc("pos"),sortable:""}},[e("span",{staticStyle:{"text-transform":"uppercase"}},[t._v(t._s(a.row.pos))])]),t._v(" "),e("b-table-column",{attrs:{field:"",label:"",width:"120",numeric:""}},[e("b-button",{attrs:{type:"is-default is-small","icon-left":"eye"},on:{click:function(e){return t.editTransaction(a.row)}}})],1)]}}])}),t._v(" "),e("b-modal",{attrs:{active:t.modalNewActive,"has-modal-card":"","trap-focus":"","destroy-on-hide":!0,"aria-role":"dialog","aria-modal":""},on:{"update:active":function(a){t.modalNewActive=a}}},[e("div",{staticClass:"modal-card",staticStyle:{width:"960px"}},[e("header",{staticClass:"modal-card-head"},[e("p",{staticClass:"modal-card-title"},[t._v("\n                        "+t._s(t.$t("details"))+"\n                    ")])]),t._v(" "),e("section",{staticClass:"modal-card-body"},[e("json-viewer",{attrs:{value:t.transactionView}})],1),t._v(" "),e("footer",{staticClass:"modal-card-foot"},[e("button",{staticClass:"button",attrs:{type:"button"},on:{click:function(a){t.modalNewActive=!1}}},[t._v("\n                        "+t._s(t.$t("close"))+"\n                    ")])])])])],1)}),[function(){var t=this.$createElement,a=this._self._c||t;return a("span",{staticClass:"icon is-small"},[a("i",{staticClass:"fas fa-sync-alt"})])}],!1,null,null,null);a.default=c.exports}}]);
//# sourceMappingURL=19.js.map

Zerion Mini Shell 1.0