(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2c372d02"],{"3ea0":function(t,s,e){},"9e43":function(t,s,e){"use strict";e.r(s);var a=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("tr",{staticClass:"receiver-row",class:t.getStatusClass},[e("wi-list-data-table-actions",{attrs:{config:t.config,props:t.props}}),e("td",{staticClass:"receiver-type"},[e("div",{staticClass:"type-badge"},[e("v-icon",{attrs:{small:""}},[t._v(t._s(t.getTypeIcon))]),e("span",[t._v(t._s(t.getTypeName))])],1)]),e("td",{staticClass:"receiver-action"},[e("div",{staticClass:"action-badge",style:{background:t.getActionColor}},[e("v-icon",{attrs:{small:"",color:"white"}},[t._v(t._s(t.getActionIcon))]),e("span",[t._v(t._s(t.getActionName))])],1)]),e("td",{staticClass:"receiver-status"},[e("div",{staticClass:"status-badge",style:{background:t.getStatusColor}},[e("v-icon",{attrs:{small:"",color:"white"}},[t._v(t._s(t.getStatusIcon))]),e("span",[t._v(t._s(t.getStatusName))])],1)]),e("td",{staticClass:"receiver-person"},[t.props.item.person?e("div",{staticClass:"person-info"},[e("v-icon",{attrs:{small:""}},[t._v("person")]),e("div",{staticClass:"person-details"},[e("span",{staticClass:"person-name"},[t._v(t._s(t.props.item.person.name||"---"))]),t.props.item.person.email?e("span",{staticClass:"person-email"},[t._v(t._s(t.props.item.person.email))]):t._e()])],1):e("span",{staticClass:"no-person"},[t._v("---")])]),e("td",{staticClass:"receiver-metadata"},[e("div",{staticClass:"metadata-wrapper"},[t.props.item.ip_address?e("div",{staticClass:"metadata-item"},[e("v-icon",{attrs:{"x-small":""}},[t._v("public")]),e("span",[t._v(t._s(t.props.item.ip_address))])],1):t._e(),t.props.item.version?e("div",{staticClass:"metadata-item"},[e("v-icon",{attrs:{"x-small":""}},[t._v("info")]),e("span",[t._v("v"+t._s(t.props.item.version))])],1):t._e(),t.props.item.device?e("div",{staticClass:"metadata-item"},[e("v-icon",{attrs:{"x-small":""}},[t._v("devices")]),e("span",[t._v(t._s(t.props.item.device))])],1):t._e(),t.props.item.platform?e("div",{staticClass:"metadata-item"},[e("v-icon",{attrs:{"x-small":""}},[t._v("computer")]),e("span",[t._v(t._s(t.props.item.platform))])],1):t._e(),t.props.item.ip_address||t.props.item.version||t.props.item.device||t.props.item.platform?t._e():e("span",{staticClass:"no-metadata"},[t._v("---")])])]),e("td",{staticClass:"receiver-observation"},[e("div",{staticClass:"observation-wrapper"},[t.props.item.observation?e("button",{staticClass:"view-details-btn",on:{click:function(s){t.showDialog=!0}}},[e("v-icon",{attrs:{small:""}},[t._v("visibility")]),t._v(" Ver detalhes ")],1):e("span",{staticClass:"no-observation"},[t._v("---")])]),e("v-dialog",{attrs:{"max-width":"700px"},model:{value:t.showDialog,callback:function(s){t.showDialog=s},expression:"showDialog"}},[e("v-card",[e("v-card-title",{staticClass:"dialog-title"},[e("v-icon",{attrs:{left:""}},[t._v("code")]),t._v(" Detalhes do Receiver "),e("v-spacer"),e("v-btn",{attrs:{icon:""},on:{click:function(s){t.showDialog=!1}}},[e("v-icon",[t._v("close")])],1)],1),e("v-card-text",{staticClass:"dialog-content"},[e("pre",{staticClass:"json-code"},[e("code",[t._v(t._s(t.formattedJson))])])])],1)],1)],1),e("td",{staticClass:"receiver-dates"},[e("div",{staticClass:"dates-wrapper"},[e("div",{staticClass:"date-item"},[e("v-icon",{attrs:{"x-small":""}},[t._v("event")]),e("span",[t._v(t._s(t.formatDate(t.props.item.created_at)))])],1),t.props.item.updated_at!==t.props.item.created_at?e("div",{staticClass:"date-item date-updated"},[e("v-icon",{attrs:{"x-small":""}},[t._v("update")]),e("span",[t._v(t._s(t.formatDate(t.props.item.updated_at)))])],1):t._e()])])],1)},i=[],o=(e("b0c0"),e("b150")),n={name:"Receivers",components:{WiListDataTableActions:o["a"]},props:{config:Object,props:Object},data:function(){return{showDialog:!1}},computed:{getStatusClass:function(){var t,s=(null===(t=this.props.item.status_info)||void 0===t?void 0:t.code)||"pending";return"receiver-status--".concat(s)},getStatusName:function(){var t;return(null===(t=this.props.item.status_info)||void 0===t?void 0:t.name)||"Pendente"},getStatusIcon:function(){var t;return(null===(t=this.props.item.status_info)||void 0===t?void 0:t.icon)||"schedule"},getStatusColor:function(){var t,s=(null===(t=this.props.item.status_info)||void 0===t?void 0:t.color)||"orange",e={green:"#4CAF50",orange:"#FF9800",red:"#F44336",grey:"#9E9E9E"};return e[s]||s},getTypeName:function(){var t;return(null===(t=this.props.item.type_info)||void 0===t?void 0:t.name)||"Desconhecido"},getTypeIcon:function(){var t,s=null===(t=this.props.item.type_info)||void 0===t?void 0:t.code,e={business_file:"attach_file",order:"shopping_cart",task:"assignment",task_finance:"account_balance",task_product_entry:"inventory",task_product_remove:"remove_shopping_cart",task_product_sale:"point_of_sale",form_reply_content:"description",form_reply:"assignment_turned_in",finance:"attach_money",customer_phone:"phone",customer_address:"location_on",customer:"person_add"};return e[s]||"inbox"},getActionName:function(){var t;return(null===(t=this.props.item.action_info)||void 0===t?void 0:t.name)||"Desconhecido"},getActionIcon:function(){var t;return(null===(t=this.props.item.action_info)||void 0===t?void 0:t.icon)||"help"},getActionColor:function(){var t,s=(null===(t=this.props.item.action_info)||void 0===t?void 0:t.color)||"grey",e={blue:"#2196F3",orange:"#FF9800",red:"#F44336",grey:"#9E9E9E"};return e[s]||s},parsedObservation:function(){try{if(this.props.item.observation)return JSON.parse(this.props.item.observation)}catch(t){return null}return null},formattedJson:function(){return this.props.item.observation?JSON.stringify(this.parsedObservation||this.props.item.observation,null,2):""}},methods:{formatDate:function(t){if(!t)return"---";var s=new Date(t);return new Intl.DateTimeFormat("pt-BR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"}).format(s)}}},r=n,c=(e("ab51"),e("2877")),p=Object(c["a"])(r,a,i,!1,null,"186b6c90",null);s["default"]=p.exports},ab51:function(t,s,e){"use strict";e("3ea0")}}]); //# sourceMappingURL=chunk-2c372d02.68569168.js.map