import{_ as S,c as k,g as t,w as a,b as f,i as s,t as o,e as D,h as M,f as P,F as N,u as A,k as g,a as I,T as L,o as b}from"./app-D7zH3Nl5.js";import{h as T}from"./hrmManagement-B9P5L2Nz.js";import{A as V,B as H,a as O,_ as U}from"./AdminPageHeader-4nW0e2pw.js";import{D as j}from"./DeleteOutlined-DI2CK1gU.js";import{E as z}from"./EditOutlined-Corvrvzt.js";import{P as F}from"./index-BUzTR6QN.js";import{T as q}from"./Text-BYGZwHPp.js";import{D as G}from"./dayjs-Bh5BavPT.js";import{_ as J,a as K}from"./index-Cv7zOydE.js";import{_ as Q}from"./index-Bso6TOMG.js";import"./dropdown-C-HKHQ-f.js";import"./useFlexGapSupport-CpBR-RD-.js";import"./move-DTmUXir3.js";import"./index-BUQyFFfI.js";import"./transButton--XrRgMTg.js";import"./useDestroyed-B0Qhtgc6.js";import"./index-_ApNSgqk.js";import"./index-B1-dW-7G.js";import"./Base-Dri4L_EE.js";import"./TextArea-C1mL3q5m.js";import"./index-DzAtlijK.js";import"./index-ClJ_H-9Y.js";import"./CalendarOutlined-m89BWwmS.js";import"./index-DnrvHM6n.js";import"./pickAttrs-1XPwZpL6.js";import"./index-Cu62pBdq.js";import"./index-Q5rqE8AL.js";import"./index-DTmsoxos.js";import"./index-DkTJbm8y.js";import"./Checkbox-BT3Ug64z.js";import"./index-twmpq7Gp.js";import"./RadioButton-BeQscLER.js";import"./MinusSquareOutlined-CjNBof4X.js";import"./FolderOpenOutlined-tH0_VpKZ.js";const R={components:{PlusOutlined:F,EditOutlined:z,DeleteOutlined:j,AdminPageHeader:V},setup(){const{t:n}=A(),{getMonthNameByNumber:m}=T(),v=[{title:n("leave.leave_type"),dataIndex:"name"},{title:n("menu.unpaid_leaves"),dataIndex:"unpaid_leaves"}],e=g([]),d=g(!0),{dayjs:x}=I(),i=g({year:x()}),_=g([]);L(()=>{l()});const l=()=>{d.value=!0;var h=i.value.year.format("YYYY");axiosAdmin.get(`self/unpaid-leaves?year=${h}`).then(c=>{e.value=c.data.data,_.value=c.data.month_year,d.value=!1})};return{columns:v,unpaidLeaves:e,filters:i,getMonthNameByNumber:m,selectedYearStartEndMonths:_,tableLoading:d,setUrlData:l}}},W={class:"table-responsive"};function X(n,m,v,e,d,x){const i=U,_=f("router-link"),l=O,h=H,c=f("AdminPageHeader"),Y=q,p=K,B=G,y=J,E=f("admin-page-filters"),w=Q,C=f("admin-page-table-content");return b(),k(N,null,[t(c,null,{header:a(()=>[t(i,{title:n.$t("menu.unpaid_leaves"),class:"p-0"},null,8,["title"])]),breadcrumb:a(()=>[t(h,{separator:"-",style:{"font-size":"12px"}},{default:a(()=>[t(l,null,{default:a(()=>[t(_,{to:{name:"admin.dashboard.index"}},{default:a(()=>[s(o(n.$t("menu.dashboard")),1)]),_:1})]),_:1}),t(l,null,{default:a(()=>[s(o(n.$t("menu.leaves")),1)]),_:1}),t(l,null,{default:a(()=>[s(o(n.$t("menu.unpaid_leaves")),1)]),_:1})]),_:1})]),_:1}),t(E,null,{default:a(()=>[t(y,{gutter:[16,16],align:"middle"},{default:a(()=>[t(p,{xs:24,sm:24,md:12,lg:10,xl:10},{default:a(()=>[e.selectedYearStartEndMonths&&e.selectedYearStartEndMonths.start_month?(b(),D(Y,{key:0,strong:""},{default:a(()=>[s(o(e.getMonthNameByNumber(e.selectedYearStartEndMonths.start_month))+" "+o(e.selectedYearStartEndMonths.start_year)+" - "+o(e.getMonthNameByNumber(e.selectedYearStartEndMonths.end_month))+" "+o(e.selectedYearStartEndMonths.end_year),1)]),_:1})):M("",!0)]),_:1}),t(p,{xs:24,sm:24,md:12,lg:14,xl:14},{default:a(()=>[t(y,{gutter:[16,16],justify:"end"},{default:a(()=>[t(p,{xs:24,sm:24,md:12,lg:12,xl:8},{default:a(()=>[t(B,{value:e.filters.year,"onUpdate:value":m[0]||(m[0]=r=>e.filters.year=r),placeholder:n.$t("common.select_default_text",[n.$t("holiday.year")]),picker:"year",onChange:e.setUrlData,style:{width:"100%"},allowClear:!1},null,8,["value","placeholder","onChange"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),t(C,null,{default:a(()=>[t(y,null,{default:a(()=>[t(p,{span:24},{default:a(()=>[P("div",W,[t(w,{"row-selection":{getCheckboxProps:r=>({disabled:!1,name:r.xid})},columns:e.columns,"row-key":r=>r.month,"data-source":e.unpaidLeaves,pagination:!1,loading:e.tableLoading,bordered:"",size:"middle"},{bodyCell:a(({column:r,record:u})=>[r.dataIndex=="name"?(b(),k(N,{key:0},[s(o(u.month?e.getMonthNameByNumber(u.month):"")+" "+o(u.year?u.year:""),1)],64)):M("",!0)]),_:1},8,["row-selection","columns","row-key","data-source","loading"])])]),_:1})]),_:1})]),_:1})],64)}const Pe=S(R,[["render",X]]);export{Pe as default};
