1import{d as v,r as d,i as x,a as i,k as _,b as k,g as p,f as h,e as t,F as b,l as w,w as S,v as C,t as y,s as N,o as a}from"./index-DbpIxVVg.js";import{O as V}from"./OrganisationService-iNQIxHRW.js";import{A}from"./ActivityIndicator-CHNVpzvm.js";import{_ as B}from"./ErrorView.vue_vue_type_script_setup_true_lang-rTuR_K5N.js";import{u as O}from"./entity-Dyy2H1qK.js";import"./TrackworkTask-DrBj2lvf.js";import"./Stop-8NKSpgr4.js";import"./ErrorContent.vue_vue_type_script_setup_true_lang--XFDxIpt.js";import"./RoundedBadge-zDfp8xRL.js";import"./ArrowTopRightOnSquareIcon-Bwi8lzNJ.js";import"./ChevronRightIcon-CKGSa4-R.js";import"./disclosure-DbKVSJYz.js";import"./keyboard-C910qfwt.js";const E={key:0,class:"text-center my-5"},T={key:2},D={class:"inline-block min-w-full py-2 align-middle"},F={class:"overflow-hidden shadow-sm ring-1 ring-black ring-opacity-5"},L={class:"min-w-full divide-y divide-gray-300 dark:divide-gray-700"},$={class:"divide-y divide-gray-200 dark:divide-gray-800 bg-white dark:bg-black"},j={class:"whitespace-nowrap text-sm font-medium text-gray-900 dark:text-gray-100"},I={class:"whitespace-nowrap px-3 py-4 text-sm text-gray-500"},Z=v({__name:"OrganisationList",setup(M){const e=d(),l=d(!1),s=d(),g=new V,n=O();x(async()=>{n.organisations instanceof Array&&(e.value=n.organisations),await u()});async function u(){try{l.value=!0,s.value=null,e.value=await g.findAll(),n.organisations=e.value}catch(c){s.value=c}finally{l.value=!1}}return(c,r)=>{const f=N("router-link");return l.value&&!e.value?(a(),i("div",E,[p(A)])):s.value?(a(),_(B,{key:1,error:s.value},null,8,["error"])):e.value?(a(),i("div",T,[r[1]||(r[1]=h('<div class="px-6 py-4"><div class="sm:flex sm:items-center"><div class="sm:flex-auto"><h1 class="text-xl font-semibold text-gray-900 dark:text-gray-100">Organisations</h1></div><div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none"><a href="#" class="cursor-default inline-flex items-center justify-center rounded-md border border-gray-300 bg-white dark:bg-black px-4 py-2 text-sm font-medium text-gray-400 shadow-sm sm:w-auto"> Create organisation </a></div></div></div>',1)),t("div",D,[t("div",F,[t("table",L,[r[0]||(r[0]=t("thead",{class:"bg-gray-50 dark:bg-gray-900"},[t("tr",null,[t("th",{scope:"col",class:"py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 dark:text-gray-100 sm:pl-6 lg:pl-8"}," Title "),t("th",{scope:"col",class:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100"}," Type "),t("th",{scope:"col",class:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100"}," Role "),t("th",{scope:"col",class:"relative py-3.5 pl-3 pr-4 sm:pr-6 lg:pr-8"},[t("span",{class:"sr-only"},"Edit")])])],-1)),t("tbody",$,[(a(!0),i(b,null,w(e.value,o=>{var m;return a(),i("tr",{key:o.id},[t("td",j,[p(f,{to:`/admin/organisation/${o.id}`,class:"block py-4 pl-4 pr-3 sm:pl-6 lg:pl-8"},{default:S(()=>[C(y(o.title),1)]),_:2},1032,["to"])]),t("td",I,y((m=o.type)==null?void 0:m.name),1)])}),128))])])])])])):k("",!0)}}});export{Z 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.