1"use strict";(globalThis.webpackChunkwifiattendance=globalThis.webpackChunkwifiattendance||[]).push([[8365],{8365(e,a,t){t.r(a),t.d(a,{default:()=>v});var l=t(65043),n=t(93374),c=t(72450),o=t.n(c),s=t(17427),d=t(70493);const r=[{value:1,label:"January"},{value:2,label:"February"},{value:3,label:"March"},{value:4,label:"April"},{value:5,label:"May"},{value:6,label:"June"},{value:7,label:"July"},{value:8,label:"August"},{value:9,label:"September"},{value:10,label:"October"},{value:11,label:"November"},{value:12,label:"December"}],i=()=>{const[e,a]=(0,l.useState)([]),[t,n]=(0,l.useState)([]),[c,i]=(0,l.useState)(!1),[u,h]=(0,l.useState)({Month:0,Year:0,LocationId:0});(0,l.useEffect)(()=>{(0,s.wQ)(d.Ay.GET_BRANCH_NAME_LIST).then(e=>{!0===e.Success&&a(e.Data)}).catch(()=>{}),(0,s.wQ)(d.Ay.TEAMSHEET_YEAR).then(e=>{!0===e.Success&&n(e.Data)}).catch(()=>{})},[]);return{branchList:e,yearList:t,months:r,addBrData:u,changeData:e=>{const{name:a,value:t}=e.target;h(e=>({...e,[a]:Number(t)}))},excelLoading:c,downloadExcel:()=>{i(!0),(0,s.uO)(d.Ay.ALL_EMPLOYEE_DOWNLOAD_EXCEL,JSON.stringify(u)).then(e=>{var a;if(e.error)i(!1);else{if(!0===(null===(a=e.json)||void 0===a?void 0:a.Success)){const a=e.json.Data;o().saveAs("data:"+a.ContentType+";base64,"+a.FileContents,a.FileDownloadName)}i(!1)}}).catch(()=>{i(!1)})}}};var u=t(70579);const h=()=>{const{branchList:e,yearList:a,months:t,addBrData:l,changeData:c,excelLoading:o,downloadExcel:s}=i();return(0,u.jsxs)(n.qK,{children:[(0,u.jsx)(n.zY,{title:"Branch Attendance Report",subtitle:"Generate a monthly attendance export for the selected branch."}),(0,u.jsx)(n.qI,{padding:"md",children:(0,u.jsxs)("div",{className:"att-add-empattendance__form",children:[(0,u.jsxs)("div",{className:"att-add-empattendance__grid",children:[(0,u.jsx)(n.Zi,{id:"att-add-empattendance-branch",label:"Branch Name",placeholder:"Select Branch Name",value:l.LocationId||"",onChange:e=>c({target:{name:"LocationId",value:null!==e&&void 0!==e?e:0}}),options:e.map(e=>({value:e.LocationId,label:e.LocationName})),emptyMessage:"No branches match your search"}),(0,u.jsxs)(n.l6,{id:"att-add-empattendance-year",label:"Year",name:"Year",value:l.Year,onChange:c,children:[(0,u.jsx)("option",{value:"",children:"Select Year"}),a.map((e,a)=>(0,u.jsx)("option",{value:e.year,children:e.year},a))]}),(0,u.jsxs)(n.l6,{id:"att-add-empattendance-month",label:"Month",name:"Month",value:l.Month,onChange:c,children:[(0,u.jsx)("option",{value:"",children:"Select Month"}),t.map(e=>(0,u.jsx)("option",{value:e.value,children:e.label},e.value))]})]}),(0,u.jsx)("div",{className:"att-add-empattendance__actions",children:(0,u.jsx)(n.$n,{variant:"primary",loading:o,onClick:s,children:"Download Excel"})})]})})]})},v=(0,l.memo)(h)}}]); 2//# sourceMappingURL=8365.1d1ba962.chunk.js.map
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.