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-CgV11GBz.js";import{h as T}from"./hrmManagement-DSu-pZ5D.js";import{A as V,B as H,a as O,_ as U}from"./AdminPageHeader-BbLazqh2.js";import{D as j}from"./DeleteOutlined-CzplmvFG.js";import{E as z}from"./EditOutlined-CDoHc2FT.js";import{P as F}from"./index-B7-RTJOc.js";import{T as q}from"./Text-BEWt5-6S.js";import{D as G}from"./dayjs-1hJdMHbK.js";import{_ as J,a as K}from"./index-CyQQxPex.js";import{_ as Q}from"./index-vRSySr5e.js";import"./dropdown-C8TPWlvJ.js";import"./useFlexGapSupport-CWWB0EO1.js";import"./move-DC4W0EQt.js";import"./index-BnFAf-Nu.js";import"./transButton-BBsxYOSm.js";import"./useDestroyed-DU9zWypE.js";import"./index-4wtx7HnJ.js";import"./index-MBDGOAKp.js";import"./Base-CoAoxKFd.js";import"./TextArea-CiAld6jk.js";import"./index-BiYulQUu.js";import"./index-Oi0DGWnW.js";import"./CalendarOutlined-DlxTbIcy.js";import"./index-GcUTOa9d.js";import"./pickAttrs-6g5FyZe9.js";import"./index-CJx7RGCD.js";import"./index-E6lmxuug.js";import"./index-DtCc1bFm.js";import"./index-DEQO-jTQ.js";import"./Checkbox-tUwuA94o.js";import"./index-DFoCNTvZ.js";import"./RadioButton-BPv4-qI8.js";import"./MinusSquareOutlined-Cd4pIAZ_.js";import"./FolderOpenOutlined-5lmK0J8L.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};
