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