import{_ as y,a as C,b as N,c as b,d as R,C as P}from"./AppLayout.vue_vue_type_script_setup_true_lang-BA0fi5xR.js";import{_ as f}from"./AppLogoIcon.vue_vue_type_script_setup_true_lang-M23wUS8o.js";import{d as w,D as F,a as n,o as i,e as o,b as s,u as e,h as $,k as g,w as r,g as S,l as m,i as u,F as k,B as z,t as l,G as B}from"./app-KXUNt_n9.js";import{E as U}from"./ellipsis-vertical-BziiSx5X.js";import{C as V,_ as j}from"./_plugin-vue_export-helper-6HKQXqTi.js";import"./useForwardExpose-B0NY7lip.js";import"./VisuallyHidden-OJAPlYzx.js";import"./RovingFocusGroup-DKdqcDpA.js";import"./useArrowNavigation-C6Y-ieo6.js";import"./index-Z7dItZLR.js";import"./createLucideIcon-CFEmdjHu.js";const I={class:"p-6"},A={class:"flex justify-between items-center mb-6"},E={class:"w-full border text-left"},D={class:"p-2 border"},L={class:"p-2 border"},G={class:"p-2 border"},T={class:"p-2 border"},W={class:"p-2 border"},H={class:"p-2 border"},J={key:0},K={key:0,class:"mt-6 flex items-center justify-center space-x-4"},M={class:"text-sm text-gray-700"},O={key:1,class:"mt-4 text-center text-sm text-gray-600"},Q=w({layout:y,__name:"NFRs-result",props:{product_backlogs:{},breadcrumbs:{}},setup(a){const p=a,h=F().props.auth?.user?.role??"user",x=c=>{const t=p.product_backlogs.meta?.current_page||1,d=p.product_backlogs.meta?.per_page||10;return(t-1)*d+c+1},_=c=>{c&&B.visit(c)};return(c,t)=>(i(),n(k,null,[o(e($),{title:"NFRs Result"}),s("div",I,[s("div",A,[t[5]||(t[5]=s("h1",{class:"text-2xl font-bold"},"I-USPA-NFRs Prioritization Result",-1)),o(e(R),null,{default:r(()=>[o(e(C),{asChild:""},{default:r(()=>[o(e(f),{variant:"ghost",class:"p-2"},{default:r(()=>[o(e(U),{class:"h-5 w-5"})]),_:1})]),_:1}),o(e(N),{align:"end",class:"bg-white text-gray-800 dark:bg-neutral-900 dark:text-gray-100 border rounded shadow-lg"},{default:r(()=>[e(h)==="admin"?(i(),S(e(b),{key:0,asChild:""},{default:r(()=>[o(e(m),{href:"/i-uspa-decisions/change-status"},{default:r(()=>[...t[2]||(t[2]=[u("Change Status",-1)])]),_:1})]),_:1})):g("",!0),o(e(b),{asChild:""},{default:r(()=>[o(e(m),{href:"/i-uspa-decisions/fu-finals"},{default:r(()=>[...t[3]||(t[3]=[u("I-USPA-FU Prioritization Result",-1)])]),_:1})]),_:1}),o(e(b),{asChild:""},{default:r(()=>[o(e(m),{href:"/i-uspa-decisions/nfr-finals"},{default:r(()=>[...t[4]||(t[4]=[u("I-USPA-NFR Prioritization Result",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),s("table",E,[t[7]||(t[7]=s("thead",{class:"bg-gray-100 dark:bg-neutral-900"},[s("tr",null,[s("th",{class:"p-2 border"},"No"),s("th",{class:"p-2 border"},"Projects"),s("th",{class:"p-2 border"},"NFR"),s("th",{class:"p-2 border"},"Weight"),s("th",{class:"p-2 border"},"Rank"),s("th",{class:"p-2 border"},"Updated at")])],-1)),s("tbody",null,[(i(!0),n(k,null,z(a.product_backlogs.data,(d,v)=>(i(),n("tr",{key:d.id},[s("td",D,l(x(v)),1),s("td",L,l(d.project.name),1),s("td",G,l(d.name),1),s("td",T,l(d.weight),1),s("td",W,l(d.rank),1),s("td",H,l(d.updated_at),1)]))),128)),a.product_backlogs.data.length===0?(i(),n("tr",J,[...t[6]||(t[6]=[s("td",{colspan:"7",class:"p-4 border text-center text-gray-500"}," No requirements found. ",-1)])])):g("",!0)])]),a.product_backlogs.meta&&a.product_backlogs.meta.last_page>1?(i(),n("div",K,[o(e(f),{variant:"outline",size:"sm",disabled:!a.product_backlogs.links.prev,onClick:t[0]||(t[0]=d=>_(a.product_backlogs.links.prev))},{default:r(()=>[o(e(V),{class:"h-4 w-4"}),t[8]||(t[8]=u(" Previous ",-1))]),_:1},8,["disabled"]),s("span",M," Page "+l(a.product_backlogs.meta.current_page)+" of "+l(a.product_backlogs.meta.last_page),1),o(e(f),{variant:"outline",size:"sm",disabled:!a.product_backlogs.links.next,onClick:t[1]||(t[1]=d=>_(a.product_backlogs.links.next))},{default:r(()=>[t[9]||(t[9]=u(" Next ",-1)),o(e(P),{class:"h-4 w-4"})]),_:1},8,["disabled"])])):g("",!0),a.product_backlogs.meta?(i(),n("div",O," Showing "+l(a.product_backlogs.meta.from)+" to "+l(a.product_backlogs.meta.to)+" of "+l(a.product_backlogs.meta.total)+" results ",1)):g("",!0)])],64))}}),it=j(Q,[["__scopeId","data-v-0358d756"]]);export{it as default};
