PageSourceSearch

https://fonds.lv/build/assets/Index-T4HViOwx.js

js fonds.lv collected 2026-09-24 10:03:29 UTC 6,139 bytes, 7 lines download raw bytes

1import{T as f}from"./tabulator.min-NWc-ChHA.js";import{A as w}from"./AuthenticatedLayout-DcpqZk2r.js";import{i as v,Z as b,r as i,f as g,a as n,w as d,b as t,e as k,F as x,T as y,o as C}from"./app-B9KORyBa.js";import{_ as M}from"./Modal-Bzvoe6wK.js";import{_,a as D,b as L,c as A}from"./EyeOutline-BJItCWaF.js";import{_ as F}from"./CheckmarkCircleOutline-D-9-1wJh.js";import{P as T}from"./PrimaryButton-vaEit9c1.js";import{_ as z}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ApplicationLogo-DrAX-EpC.js";import"./NavLink-BiVKPBr8.js";import"./TextOutline-CGLkonHp.js";import"./DocumentTextOutline-B7A647Cs.js";import"./InformationCircleOutline-DCl6slX2.js";const S={components:{AuthenticatedLayout:w,Head:b,Link:v,Modal:M,EyeOutline:A,TrashOutline:L,CheckmarkCircleOutline:F,EditOutline:D,CloseCircleOutline:_,PrimaryButton:T},props:{assessors:{type:Array,default:()=>[]}},data(){return{showDeleteModal:!1,assessorIdToDelete:null}},methods:{openDeleteModal(l){this.assessorIdToDelete=l,this.showDeleteModal=!0},closeDeleteModal(){this.showDeleteModal=!1,this.assessorIdToDelete=null},deleteAssessor(l){y({}).delete(route("admin.assessors.destroy",{assessor:l}),{onSuccess:()=>{this.closeDeleteModal()},preserveState:!1})}},mounted(){const l=this.assessors.map(s=>({id:s.id,name:s.name,email:s.email,scholarships:s.scholarships.map(r=>JSON.parse(r.name).lv).join(", "),scholarshipsCount:s.scholarships.length})),e=[{title:"ID",field:"id",width:50},{title:"Name",field:"name",width:200,headerFilter:"list",headerFilterParams:{valuesLookup:!0,clearable:!0}},{title:"Email",field:"email",width:200,headerFilter:"list",headerFilterParams:{valuesLookup:!0,clearable:!0}},{title:"Scholarships",field:"scholarships",headerFilter:"list",headerFilterParams:{valuesLookup:!0,clearable:!0}},{title:"Scholarships Count",field:"scholarshipsCount",width:50},{width:150,title:"Actions",field:"actions",formatter:()=>`
2                <div class="flex space-x-2">
3                    <button class="view-btn text-blue-500"><svg class="view-btn" style="height:20px" xmlns="http://www.w3.org/2000/svg" :class="styleClasses" viewBox="0 0 512 512"><path d="M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 00-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 000-17.47C428.89 172.28 347.8 112 255.66 112z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><circle cx="256" cy="256" r="80" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/></svg></button>
4                    <button class="edit-btn text-green-500"><svg class="edit-btn" style="height:20px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M384 224v184a40 40 0 01-40 40H104a40 40 0 01-40-40V168a40 40 0 0140-40h167.48" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><path d="M459.94 53.25a16.06 16.06 0 00-23.22-.56L424.35 65a8 8 0 000 11.31l11.34 11.32a8 8 0 0011.34 0l12.06-12c6.1-6.09 6.67-16.01.85-22.38zM399.34 90L218.82 270.2a9 9 0 00-2.31 3.93L208.16 299a3.91 3.91 0 004.86 4.86l24.85-8.35a9 9 0 003.93-2.31L422 112.66a9 9 0 000-12.66l-9.95-10a9 9 0 00-12.71 0z"/></svg></button>
5                    <button class="delete-btn text-red-500"><svg class="delete-btn" style="height:20px" xmlns="http://www.w3.org/2000/svg" :class="styleClasses" viewBox="0 0 512 512"><path d="M112 112l20 320c.95 18.49 14.4 32 32 32h184c17.67 0 30.87-13.51 32-32l20-320" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M80 112h352"/><path d="M192 112V72h0a23.93 23.93 0 0124-24h80a23.93 23.93 0 0124 24h0v40M256 176v224M184 176l8 224M328 176l-8 224" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg></button>
6                </div>
7            `,cellClick:(s,r)=>{const a=r.getRow().getData().id,o=s.target;o.classList.contains("view-btn")?window.location.href=route("admin.assessors.show",{assessor:a}):o.classList.contains("edit-btn")?window.location.href=route("admin.assessors.edit",{assessor:a}):o.classList.contains("delete-btn")&&window.openDeleteModal(a)}}];new f("#tabulator-table",{data:l,columns:e,layout:"fitColumns",responsiveLayout:"hide",pagination:"local",paginationSizeSelector:[30,50,100,500,1e3],paginationSize:30}),window.openDeleteModal=this.openDeleteModal}},j={class:"flex"},B={class:"space-y-5"},V={class:"p-4 space-y-5"},I={class:"flex space-x-4"};function O(l,e,s,r,a,o){const u=i("Head"),p=i("Link"),h=i("Modal"),m=i("AuthenticatedLayout");return C(),g(x,null,[n(u,{title:"Assessors"}),n(m,null,{header:d(()=>[t("div",j,[e[3]||(e[3]=t("h2",{class:"font-semibold text-xl text-gray-800 leading-tight"},"Vērtētāji",-1)),e[4]||(e[4]=t("div",{class:"flex-grow"},null,-1)),n(p,{class:"btn btn-primary",href:l.route("admin.assessors.create")},{default:d(()=>[...e[2]||(e[2]=[k(" Pievienot vērtētāju ",-1)])]),_:1},8,["href"])])]),default:d(()=>[e[8]||(e[8]=t("div",{class:"py-12 space-y-5"},[t("div",{class:"bg-white overflow-hidden shadow-sm sm:rounded-lg p-4 space-y-4"},[t("div",{id:"tabulator-table"})])],-1)),n(h,{show:a.showDeleteModal,onClose:o.closeDeleteModal},{default:d(()=>[t("div",B,[e[7]||(e[7]=t("div",{class:"w-full bg-gray-200 py-2 px-4"},[t("p",{class:"text-gray-700 font-bold"},"Dzēšanas apstiprināšana")],-1)),t("div",V,[e[6]||(e[6]=t("h1",{class:"text-gray-700"},"Vai Jūs tiešām vēlaties dzēst?",-1)),t("div",I,[e[5]||(e[5]=t("div",{class:"flex-grow"},null,-1)),t("div",{class:"border border-gray-900 font-semibold text-white bg-gray-900 rounded-lg py-1 px-3 cursor-pointer",onClick:e[0]||(e[0]=(...c)=>o.closeDeleteModal&&o.closeDeleteModal(...c))},"Atcelt"),t("div",{class:"border border-red-600 font-semibold text-white bg-red-600 rounded-lg py-1 px-3 cursor-pointer",onClick:e[1]||(e[1]=c=>o.deleteAssessor(a.assessorIdToDelete))},"Dzēst")])])])]),_:1},8,["show","onClose"])]),_:1})],64)}
7const W=z(S,[["render",O]]);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.