1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chunk-128.IBKxgX1S.js","assets/chunk-0.BQTcFCuj.js","assets/application-RP1kPeZZ.js","assets/chunk-1.CSLvTqCX.js","assets/chunk-2.CdHshs4a.js","assets/chunk-3.DZpX2-qG.js","assets/chunk-4.gGG46lw5.js","assets/chunk-11.DlviFypL.js","assets/chunk-5.jp9tPKLy.js","assets/chunk-7.Bvp3O-pW.js","assets/chunk-6.dInuiVBM.js","assets/chunk-10.BJgcy-UC.js","assets/chunk-12.G1p8DcM6.js","assets/chunk-13.CDuM2Qdy.js","assets/chunk-8.DNOf1mmO.js","assets/chunk-14.CvGUziHP.js","assets/chunk-15.KmJ9C-WP.js","assets/chunk-16.3L-7inlN.js","assets/chunk-19.B5DfSNcD.js","assets/chunk-17.Du1IMh6x.js","assets/chunk-18.CpHKvu62.js","assets/application-DvDm18t9.css"])))=>i.map(i=>d[i]); 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},l=(new e.Error).stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="546ef7a3-5e16-47e3-a6a5-f53ee42d5fe2",e._sentryDebugIdIdentifier="sentry-dbid-546ef7a3-5e16-47e3-a6a5-f53ee42d5fe2")}catch(e){}}();import{At as e,D as l,G as a,J as t,Ot as s,T as o,U as n,_ as i,b as r,bt as c,ct as d,jt as u,m as p,p as m,q as k,st as f,v as b,w as v,x as w,y as g}from"./chunk-0.BQTcFCuj.js";import{t as y}from"./chunk-11.DlviFypL.js";import{t as _}from"./chunk-19.B5DfSNcD.js";import{B as x,E as h,M as C,z as j}from"./application-RP1kPeZZ.js";import{t as D}from"./chunk-27.BccvNwAy.js";var T={class:"tt-table-row"},V={class:"tt-table-column"},I={class:"tt-table-column flex-wrap"},A={class:"font-bold"},L={class:"italic text-xs"},M={class:"italic text-xs"},S={class:"tt-table-column break-all"},z={class:"tt-table-column break-all"},E={key:1},R={class:"tt-table-column"},B=l({__name:"RowComponent",props:{workplace:{type:Object,required:!0}},emits:["toggle-modal"],setup(e){const l=e,g=c(!1),y=c(!0),_=i(()=>{var e;const a=null!==(e=l.workplace.workplace_user_connections)&&void 0!==e?e:[];return g.value?a:a.slice(0,2)}),x=i(()=>{var e;return(null!==(e=l.workplace.workplace_user_connections)&&void 0!==e?e:[]).length});return(l,i)=>{var c,h,C;const j=k("router-link"),D=t("outside-click");return n(),w("div",T,[b("div",{class:s(["tt-table-column",{"text-gray font-bold":!e.workplace.workplace_number}])},u(null!==(c=e.workplace.workplace_number)&&void 0!==c?c:"Saknas"),3),b("div",V,u(e.workplace.title),1),b("div",I,[(n(!0),w(p,null,a(_.value,(e,l)=>(n(),w("div",{key:e.id,class:"flex-full"},[null!==e.user?(n(),w(p,{key:0},[b("div",A,u(e.user.full_name),1),b("div",L," ("+u(e.user.email)+") ",1)],64)):null!==e.company_user_latest_invite?(n(),w(p,{key:1},[i[3]||(i[3]=b("div",{class:"font-bold"},[v(" Ny administratör "),b("span",{class:"font-normal italic text-xs"},"(Inbjudan pågår)")],-1)),b("div",M," ("+u(e.company_user_latest_invite.email)+") ",1)],64)):r("",!0),x.value>2&&l===_.value.length-1?(n(),w("div",{key:2,class:"text-blue font-bold cursor-pointer select-none underline",onClick:i[0]||(i[0]=e=>g.value=!g.value)},[g.value?(n(),w(p,{key:1},[v(" Dölj ")],64)):(n(),w(p,{key:0},[v(" Visa alla ")],64))])):r("",!0)]))),128))]),b("div",S,u(null===(h=e.workplace.checkin)||void 0===h?void 0:h.username),1),d((n(),w("div",z,[y.value?(n(),w("b",{key:0,class:"text-blue font-bold cursor-pointer select-none underline",onClick:i[1]||(i[1]=e=>y.value=!1)},"Visa lösenord")):(n(),w("b",E,u(null===(C=e.workplace.checkin)||void 0===C?void 0:C.password),1))])),[[D,()=>y.value=!0]]),b("div",R,[o(j,{to:{name:"settings.workplaces.edit",params:{id:e.workplace.id}},class:"inline-block Button Circle Yellow Small mr-s"},{default:f(()=>[...i[4]||(i[4]=[b("i",{class:"fas fa-pen"},null,-1)])]),_:1},8,["to"]),b("a",{href:"javascript:void(0);",class:"inline-block Button Red Circle Small",onClick:i[2]||(i[2]=m(a=>l.$emit("toggle-modal",{action:"delete",item:e.workplace}),["prevent"]))},[...i[5]||(i[5]=[b("i",{class:"fas fa-times"},null,-1)])])])])}}}),O=B,q=l({components:{TableComponent:D,RowComponent:O,DeleteConfirmationModal:h(()=>x(()=>import("./chunk-128.IBKxgX1S.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])))},setup(){const e=y(),l=j(),a=c(!0),t=c({selected:null,delete:{isVisible:!1}});l.loadWorkplaces({params:{load_checkin:!0,load_workplace_user_connections:!0}}).then(()=>a.value=!1);const s={showModal(e){t.value.selected=e.item,t.value[e.action].isVisible=!0}},o=c(null);return{modal:t,isLoading:a,sortField:o,subheadingTooltip:{content:"I tabellen nedan ser du vilka arbetsplatser som finns för det företag som du hanterar för tillfället. Du kan redigera uppgifter för en arbetsplats genom att klicka på redigeringsknappen. Arbetsplatser kan tillsvidare inte tas bort utan att kontakta Timetjeks support."},tableHeadings:[{text:"Nummer",key:"workplace_number",size:"200px"},{text:"Namn",key:"title"},{text:"Administratörer",key:"administrators",sort:!1},{text:"Arbetsplats-ID",key:"username",size:"192px"},{text:"Lösenord",key:"password",size:"128px",sort:!1},{text:"Hantera",key:"manage",size:"96px",sort:!1}],company:i(()=>e.company),workplaces:i(()=>{const e=[...l.general.workplaces],a=null!==o.value?o.value:{key:"workplace_number",sortDirection:0};return e.sort((e,l)=>_(a,e,l)),e}),...s}}}),F={id:"Accounts",key:"content",class:"p-xl"},H={class:"flex flex-wrap items-center my-xl"},N={class:"flex-auto"},G={class:"Subtitle mb-n"},U={class:"fa fa-fw fa-question-circle text-blue"},J={class:"flex-none"};function P(l,a,s,i,c,u){const p=k("router-link"),m=k("RowComponent"),y=k("TableComponent"),_=k("DeleteConfirmationModal"),x=t("tooltip");return n(),w("div",F,[a[6]||(a[6]=b("div",{class:"flex flex-wrap items-center"},[b("div",{class:"flex-auto"},[b("h4",{class:"Title"}," Arbetsplatser ")])],-1)),b("div",H,[b("div",N,[b("h4",G,[a[4]||(a[4]=v(" Tillagda arbetsplatser ",-1)),d(b("i",U,null,512),[[x,l.subheadingTooltip]])])]),b("div",J,[o(p,{to:{name:"settings.workplaces.create"},class:"Button"},{default:f(()=>[...a[5]||(a[5]=[b("i",{class:"fas fa-fw fa-plus"},null,-1),v(" Lägg till arbetsplats ",-1)])]),_:1})])]),o(y,{headings:l.tableHeadings,items:l.workplaces,isLoading:l.isLoading,isSortEnabled:!0,onOnChangeActiveSortField:a[1]||(a[1]=e=>l.sortField=e)},{row:f(({item:t,columnGrid:s})=>[(n(),g(m,{key:t.id,workplace:t,style:e(s),onToggleModal:a[0]||(a[0]=e=>l.showModal(e))},null,8,["workplace","style"]))]),_:1},8,["headings","items","isLoading"]),l.modal.delete.isVisible&&l.modal.selected?(n(),g(_,{key:0,modelValue:l.modal.selected,"onUpdate:modelValue":a[2]||(a[2]=e=>l.modal.selected=e),onClose:a[3]||(a[3]=e=>{l.modal.delete.isVisible=!1})},null,8,["modelValue"])):r("",!0)])}var W=C(q,[["render",P]]);export{W 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.