1var y=Object.defineProperty;var h=(i,t,s)=>t in i?y(i,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[t]=s;var o=(i,t,s)=>h(i,typeof t!="symbol"?t+"":t,s);import{M as b,C as p,bs as g,P as x,n as d,m as C,a as w,bp as A}from"./index.DWWmJUnZ.js";import{L}from"./list-loader.DZJwgi9E.js";import{L as P}from"./list-filter.BryuqNQd.js";import{L as D}from"./has-list-deletion.CZE4r7R3.js";import{g as k,c as E,f as $,d as F,e as H,a as O}from"./icon-action-wrapper.Czvvp8ZQ.js";import{B as S}from"./bottom-actions.D5vBxWOt.js";import{V}from"./vue-vendor.DBNq8RD-.js";import"./ui-vendor.BUbMkMsg.js";import"./chart-vendor.C66Rhri0.js";import"./form-vendor.JG9vwo5_.js";import"./date-vendor.Cdd9DwIG.js";import"./interaction-vendor.C2NohYeI.js";import"./utility-vendor.Rsti9Bg6.js";import"./editor-vendor.BrpUY8vf.js";import"./animation-vendor.DKDGeBIk.js";import"./helper.ByGKvkek.js";import"./pick.noUWRIuZ.js";import"./_flatRest.CVJNNw2v.js";class B extends b{constructor(){super(...arguments);o(this,"access_date","");o(this,"ip_address","");o(this,"access_mode","");o(this,"operational_system","");o(this,"browser","");o(this,"mobile",!1);o(this,"is_access",!1);o(this,"is_atual_device",!1)}}var U=Object.defineProperty,j=Object.getOwnPropertyDescriptor,u=(i,t,s,e)=>{for(var r=e>1?void 0:e?j(t,s):t,a=i.length-1,n;a>=0;a--)(n=i[a])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&U(t,s,r),r};let l=class extends V{constructor(){super(...arguments);o(this,"items");o(this,"fields",[{key:"access_mode",label:"Atividade"},{key:"ip_address",label:"Endereço IP"},{key:"access_date",label:"Data/Hora"}])}getColumnWidthStyle(s){return{access_mode:"350px",ip_address:"250px",access_date:"250px"}[s]||""}getIconToShow(s){return s.is_access?s.mobile?"mdi mdi-cellphone":!s.mobile&&s.is_access?"mdi mdi-monitor":"":"mdi mdi-lock-open-outline"}};u([x({default:[]})],l.prototype,"items",2);l=u([p({name:"DesktopView",components:{AppBadge:g}})],l);var _=function(){var t=this,s=t._self._c;return t._self._setupProxy,s("div",[s("b-table",{staticClass:"user-activity-history-list",attrs:{borderless:!1,responsive:!0,hover:!0,items:t.items,fields:t.fields,"tbody-tr-class":"user-activity-history-list__row"},scopedSlots:t._u([{key:"table-colgroup",fn:function(e){return t._l(e.fields,function(r){return s("col",{key:r.key,style:{minWidth:t.getColumnWidthStyle(r.key)}})})}},{key:"head()",fn:function(e){return[s("div",{staticClass:"user-activity-history-list__label"},[t._t("head",function(){return[t._v(" "+t._s(e.label)+" ")]},null,e)],2)]}},{key:"cell(access_mode)",fn:function({item:e}){return[s("i",{class:t.getIconToShow(e)}),s("span",{staticClass:"user-activity-history-list__text pl-3"},[t._v(t._s(e.access_mode))]),e.is_atual_device?s("app-badge",{staticClass:"ml-3",attrs:{label:"Dispositivo Atual","bg-color":"#C4D1ED","font-color":"var(--text-muted)"}}):t._e(),e.browser?s("span",{staticClass:"user-activity-history-list__browser text-muted"},[t._v(t._s(e.browser))]):t._e()]}},{key:"cell(ip_address)",fn:function({item:e}){return[s("span",{staticClass:"user-activity-history-list__text"},[t._v(t._s(e.ip_address))])]}},{key:"cell(access_date)",fn:function({item:e}){return[s("span",{staticClass:"user-activity-history-list__text"},[t._v(t._s(t._f("date")(e.access_date,"DD/MM/YYYY HH:mm:ss")))])]}}],null,!0)})],1)},I=[];_._withStripped=!0;var m=d(l,_,I,!1,null,null);m.options.__file="/builds/commerce/sales-admin/front/src/pages/configurations/user-activity-history/list/desktop-view/desktop-view.vue";const M=m.exports;var T=Object.defineProperty,Y=Object.getOwnPropertyDescriptor,q=(i,t,s,e)=>{for(var r=e>1?void 0:e?Y(t,s):t,a=i.length-1,n;a>=0;a--)(n=i[a])&&(r=(e?n(t,s,r):n(r))||r);return e&&r&&T(t,s,r),r};class R extends D{}const W=C(w,R);let c=class extends W{constructor(){super(...arguments);o(this,"listLoader",new L(`/users/${this.$route.params.id}/activity-history`));o(this,"listFilter",new P(this.$store,this.$router,"configurations/userActivityHistory/filters"))}beforeFind(t){return this.startLoading(),t}afterFind(t){this.items=t.data.map(s=>B.from(s))}onCompleted(){this.stopLoading()}
1cancel(){this.$router.push({name:"settings-users-list"})}};c=q([p({name:"UserActivityHistoryPage",components:{AppAlert:A,BottomActions:S,AppListCardFilterAction:k,AppListCard:E,AppListCardHeader:$,AppListCardBody:F,AppListCardFooter:H,AppListCardError:O,DesktopView:M}})],c);var f=function(){var t=this,s=t._self._c;return t._self._setupProxy,s("div",{staticClass:"user-activity-history-list"},[s("app-page-header"),s("app-alert",{attrs:{show:"",icon:"mdi mdi-information-outline",subtitle:"Serão mantidos os últimos 10 acessos de login do usuário."}}),s("app-list-card",{attrs:{"is-loading":t.isLoading,"has-registered-items":t.hasRegisteredItems,error:t.errorType},scopedSlots:t._u([{key:"error-no-registered-items",fn:function(){return[s("app-list-card-error",{attrs:{icon:"not-found/empty-notification.svg",title:"Você ainda não possui histórico de atividades"}})]},proxy:!0},{key:"error-not-found",fn:function(){return[s("app-list-card-error",{attrs:{icon:"not-found/empty-notification.svg",title:"Usuário não encontrado",message:"Verifique os termos da sua pesquisa para ver se estão corretos, ou tente filtrar as atividades ou buscar por outra informação."}})]},proxy:!0},{key:"error-request-failure",fn:function(){return[s("app-list-card-error",{attrs:{icon:"not-found/empty-notification.svg",title:"Ops, algo inesperado aconteceu",message:"Tente recarregar a página ou refazer o login.","button-refresh-page":!0}})]},proxy:!0}])},[t.items&&t.items.length>0?s("app-list-card-body",[s("desktop-view",{attrs:{items:t.items}}
1)],1):t._e()],1),s("div",{staticClass:"user-activity-history-list__button"},[s("button",{staticClass:"btn ml-3 btn-primary",on:{click:t.cancel}},[t._v("Voltar")])])],1)},z=[];f._withStripped=!0;var v=d(c,f,z,!1,null,null);v.options.__file="/builds/commerce/sales-admin/front/src/pages/configurations/user-activity-history/list/list.vue";const _t=v.exports;export{_t as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.