1import{a as le}from"./chunk-BFKTGSKN.js";import{a as re}from"./chunk-N5SNFM3V.js";import{f as Y}from"./chunk-7ND52XFG.js";import{a as K}from"./chunk-QP3BVK56.js";import{b as D,c as J,d as q}from"./chunk-PVF56CBF.js";import{B as oe,c as Q,f as X,j as Z,m as ee,r as te,s as ie,t as ne,u as ae}from"./chunk-AJIMFBGO.js";import{$b as y,D as w,Eb as p,Fb as i,Gb as n,Hb as x,Nb as S,Pb as v,Pc as z,Qc as W,Rb as d,Vc as G,Wc as $,Xa as r,Y as R,a as U,aa as N,ac as a,bc as c,cc as h,dc as V,ec as H,fc as A,gb as F,gc as C,ha as u,hc as E,ia as g,ja as _,ka as f,lc as M,mb as B,p as L,pc as I,qc as k,rb as b}from"./chunk-OXNYUAQ4.js";var P=class o{constructor(t){this.http=t}http;API_URL=`${K.apiUrl}/admin/job-applications`;APPLICATION_STATUSES=["Pending","Under Review","Shortlisted","Approved","Rejected","On Hold"];getHeaders(){let t=localStorage.getItem("access_token");return new D({"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${t}`})}getJobApplications(t={}){let e=new J;return t.jobId&&(e=e.set("jobId",t.jobId.toString())),t.applicationStatus&&(e=e.set("applicationStatus",t.applicationStatus)),t.departmentId&&(e=e.set("departmentId",t.departmentId.toString())),t.dateFrom&&(e=e.set("dateFrom",t.dateFrom)),t.dateTo&&(e=e.set("dateTo",t.dateTo)),t.pageNumber&&(e=e.set("pageNumber",t.pageNumber.toString())),t.pageSize&&(e=e.set("pageSize",t.pageSize.toString())),this.http.get(this.API_URL,{headers:this.getHeaders(),params:e}).pipe(w(this.handleError))}getJobApplicationById(t){return this.http.get(`${this.API_URL}/${t}`,{headers:this.getHeaders()}).pipe(w(this.handleError))}updateApplicationStatus(t,e){return this.http.put(`${this.API_URL}/${t}/status`,e,{headers:this.getHeaders()}).pipe(w(this.handleError))}getApplicationStatistics(t={}){let e=new J;return t.jobId&&(e=e.set("jobId",t.jobId.toString())),t.departmentId&&(e=e.set("departmentId",t.departmentId.toString())),t.dateFrom&&(e=e.set("dateFrom",t.dateFrom)),t.dateTo&&(e=e.set("dateTo",t.dateTo)),this.http.get(`${this.API_URL}/statistics`,{headers:this.getHeaders(),params:e}).pipe(w(this.handleError))}getJobsWithApplicationCount(t,e){let s=new J;return t&&(s=s.set("departmentId",t.toString())),e!==void 0&&(s=s.set("isActive",e.toString())),this.http.get(`${this.API_URL}/jobs-summary`,{headers:this.getHeaders(),params:s}).pipe(w(this.handleError))}exportApplications(t){let e=new D({Authorization:`Bearer ${localStorage.getItem("access_token")}`});return this.http.post(`${this.API_URL}/export`,t,{headers:e,responseType:"blob"}).pipe(w(this.handleError))}getApplicationStatuses(){return this.http.get(`${this.API_URL}/statuses`,{headers:this.getHeaders()}).pipe(w(this.handleError))}downloadFile(t,e){let s=window.URL.createObjectURL(t),l=document.createElement("a");l.href=s,l.download=e,l.click(),window.URL.revokeObjectURL(s)}generateExportFilename(t="xlsx",e){let l=`JobApplications_${new Date().toISOString().slice(0,19).replace(/:/g,"-")}`;return e?.jobId&&(l+=`_Job${e.jobId}`),e?.departmentId&&(l+=`_Dept${e.departmentId}`),e?.applicationStatus&&(l+=`_${e.applicationStatus.replace(" ","")}`),`${l}.${t}`}formatDateForApi(t){return t.toISOString().split("T")[0]}parseEducationDetails(t){return t?t.split(` 2`).filter(e=>e.trim()):[]}parseExperienceDetails(t){return t?t.split(` 3`).filter(e=>e.trim()):[]}calculateAge(t){let e=new Date(t),s=new Date,l=s.getFullYear()-e.getFullYear(),m=s.getMonth()-e.getMonth();return(m<0||m===0&&s.getDate()<e.getDate())&&l--,l}getStatusColor(t){return{Pending:{bg:"bg-yellow-100",text:"text-yellow-800",border:"border-yellow-300"},"Under Review":{bg:"bg-blue-100",text:"text-blue-800",border:"border-blue-300"},Shortlisted:{bg:"bg-purple-100",text:"text-purple-800",border:"border-purple-300"},Approved:{bg:"bg-green-100",text:"text-green-800",border:"border-green-300"},Rejected:{bg:"bg-red-100",text:"text-red-800",border:"border-red-300"},"On Hold":{bg:"bg-gray-100",text:"text-gray-800",border:"border-gray-300"}}[t]||{bg:"bg-gray-100",text:"text-gray-800",border:"border-gray-300"}}formatCurrency(t){return t?new Intl.NumberFormat("en-PK",{style:"currency",currency:"PKR",minimumFractionDigits:0}).format(t):"Not specified"}formatDate(t){return new Date(t).toLocaleDateString("en-PK",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}getFileIcon(t){if(!t)return"\u{1F4CE}";let e=t.split(".").pop()?.toLowerCase();return{pdf:"\u{1F4C4}",doc:"\u{1F4DD}",docx:"\u{1F4DD}",jpg:"\u{1F5BC}\uFE0F",jpeg:"\u{1F5BC}\uFE0F",png:"\u{1F5BC}\uFE0F",gif:"\u{1F5BC}\uFE0F"}[e||""]||"\u{1F4CE}"}canAccessJobApplications(){let t=localStorage.getItem("access_token");if(!t)return!1;try{let e=JSON.parse(atob(t.split(".")[1])),s=e["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"]||e.role;return s==="Admin"||s==="Hr"}catch(e){return console.error("Error parsing token:",e),!1}}handleError(t){let e="An error occurred";return t.error?.message?e=t.error.message:t.message?e=t.message:t.status===401?e="Unauthorized. Please login again.":t.status===403?e="You don't have permission to perform this action.":t.status===404?e="Resource not found.":t.status===0&&(e="Unable to connect to server. Please check your internet connection."),console.error("Job Applications API Error:",t),L(()=>new Error(e))}static \u0275fac=function(e){return new(e||o)(N(q))};static \u0275prov=R({token:o,factory:o.\u0275fac,providedIn:"root"})};var ge=()=>[1,2,3,4],pe=()=>[1,2,3,4,5];function xe(o,t){if(o&1&&(i(0,"div",17)(1,"div",18)(2,"div",19)(3,"div",20)(4,"div",21),_(),i(5,"svg",22),x(6,"path",23),n()()(),f(),i(7,"div",24)(8,"dl")(9,"dt",25),a(10,"Total Applications"),n(),i(11,"dd",26),a(12),I(13,"number"),n()()()()(),i(14,"div",27)(15,"div",19)(16,"div",20)(17,"div",28),_(
3),i(18,"svg",29),x(19,"path",30),n()()(),f(),i(20,"div",24)(21,"dl")(22,"dt",25),a(23,"Pending Review"),n(),i(24,"dd",26),a(25),I(26,"number"),n()()()()(),i(27,"div",31)(28,"div",19)(29,"div",20)(30,"div",32),_(),i(31,"svg",33),x(32,"path",34),n()()(),f(),i(33,"div",24)(34,"dl")(35,"dt",25),a(36,"Approved"),n(),i(37,"dd",26),a(38),I(39,"number"),n()()()()(),i(40,"div",35)(41,"div",19)(42,"div",20)(43,"div",36),_(),i(44,"svg",37),x(45,"path",38),n()()(),f(),i(46,"div",24)(47,"dl")(48,"dt",25),a(49,"Rejected"),n(),i(50,"dd",26),a(51),I(52,"number"),n()()()()()()),o&2){let e=d(2);r(12),c(k(13,4,e.statistics.totalApplications)),r(13),c(k(26,6,e.statistics.pendingCount)),r(13),c(k(39,8,e.statistics.approvedCount)),r(13),c(k(52,10,e.statistics.rejectedCount))}}function be(o,t){o&1&&(i(0,"div",40)(1,"div",5),x(2,"div",41),i(3,"div",42),x(4,"div",43)(5,"div",44),n()()())}function ve(o,t){o&1&&(i(0,"div",17),b(1,be,6,0,"div",39),n()),o&2&&(r(),p("ngForOf",M(1,ge)))}function _e(o,t){if(o&1&&(i(0,"div",45)(1,"h3",46),a(2,"Application Status Breakdown"),n(),i(3,"div",47)(4,"div",48)(5,"div",49),a(6),n(),i(7,"div",50),a(8,"Pending"),n()(),i(9,"div",48)(10,"div",51),a(11),n(),i(12,"div",50),a(13,"Under Review"),n()(),i(14,"div",48)(15,"div",52),a(16),n(),i(17,"div",50),a(18,"Shortlisted"),n()(),i(19,"div",48)(20,"div",53),a(21),n(),i(22,"div",50),a(23,"Approved"),n()(),i(24,"div",48)(25,"div",54),a(26),n(),i(27,"div",50),a(28,"Rejected"),n()(),i(29,"div",48)(30,"div",55),a(31),n(),i(32,"div",50),a(33,"Others"),n()()()()),o&2){let e=d(2);r(6),c(e.statistics.pendingCount),r(5),c(e.statistics.underReviewCount),r(5),c(e.statistics.shortlistedCount),r(5),c(e.statistics.approvedCount),r(5),c(e.statistics.rejectedCount),r(5),c(e.statistics.totalApplications-e.statistics.pendingCount-e.statistics.underReviewCount-e.statistics.shortlistedCount-e.statistics.approvedCount-e.statistics.rejectedCount)}}function fe(o,t){if(o&1&&(i(0,"div",14),b(1,xe,53,12,"div",15)(2,ve,2,2,"div",15)(3,_e,34,6,"div",16),n()),o&2){let e=d();r(),p("ngIf",e.statistics),r(),p("ngIf",e.isLoadingStats),r(),p("ngIf",e.statistics)}}function he(o,t){if(o&1&&(i(0,"option",77),a(1),n()),o&2){let e=t.$implicit;p("value",e.departmentID),r(),h(" ",e.departmentName," ")}}function Se(o,t){if(o&1&&(i(0,"option",77),a(1),n()),o&2){let e=t.$implicit;p("value",e),r(),h(" ",e," ")}}function we(o,t){if(o&1){let e=S();i(0,"div",71)(1,"div")(2,"label",72),a(3,"Department"),n(),i(4,"select",73),v("change",function(l){u(e);let m=d(2);return g(m.onDepartmentChange(l))}),i(5,"option",74),a(6,"All Departments"),n(),b(7,he,2,2,"option",75),n()(),i(8,"div")(9,"label",72),a(10,"Status"),n(),i(11,"select",73),v("change",function(l){u(e);let m=d(2);return g(m.onStatusChange(l))}),i(12,"option",74),a(13,"All Statuses"),n(),b(14,Se,2,2,"option",75),n()(),i(15,"div")(16,"label",72),a(17,"Date From"),n(),i(18,"input",76),E("ngModelChange",function(l){u(e);let m=d(2);return C(m.filters.dateFrom,l)||(m.filters.dateFrom=l),g(l)}),n()(),i(19,"div")(20,"label",72),a(21,"Date To"),n(),i(22,"input",76),E("ngModelChange",function(l){u(e);let m=d(2);return C(m.filters.dateTo,l)||(m.filters.dateTo=l),g(l)}),n()()()}if(o&2){let e=d(2);r(7),p("ngForOf",e.departments),r(7),p("ngForOf",e.applicationStatuses),r(4),A("ngModel",e.filters.dateFrom),r(4),A("ngModel",e.filters.dateTo)}}function ye(o,t){if(o&1){let e=S();i(0,"div",5)(1,"button",78),v("click",function(){u(e);let l=d(2);return g(l.applyFilters())}),a(2," Apply Filters "),n(),i(3,"button",79),v("click",function(){u(e);let l=d(2);return g(l.clearFilters())}),a(4," Clear Filters "),n()()}}function Ae(o,t){o&1&&(i(0,"div",83)(1,"div",84),x(2,"div",85),i(3,"div",86),x(4,"div",87)(5,"div",88)(6,"div",89),n()()())}function Ce(o,t){o&1&&(i(0,"div",80)(1,"div",81),b(2,Ae,7,0,"div",82),n()()),o&2&&(r(2),p("ngForOf",M(1,pe)))}function Ee(o,t){if(o&1){let e=S();i(0,"tr",96)(1,"td",97)(2,"div",19)(3,"div",98)(4,"div",99)(5,"span",100),a(6),n()()(),i(7,"div",101)(8,"div",102),a(9),n(),i(10,"div",66),a(11),n()()()(),i(12,"td",97)(13,"div",103),a(14),n()(),i(15,"td",97)(16,"div",103),a(17),n()(),i(18,"td",97)(19,"span"),a(20),n()(),i(21,"td",104),a(22),n(),i(23,"td",105)(24,"button",106),v("click",function(){let l=u(e).$implicit,m=d(3);return g(m.viewApplicationDetail(l.applicationId))}),a(25," View "),n(),i(26,"button",107),v("click",function(){let l=u(e).$implicit,m=d(3);return g(m.openStatusUpdate(l))}),a(27," Update Status "),n()()()}if(o&2){let e=t.$implicit,s=d(3);r(6),h(" ",e.applicantName.charAt(0)," "),r(3),c(e.applicantName),r(2),c(e.email),r(3),c(e.jobTitle),r(3),c(e.departmentName),r(2),y("inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium "+s.getStatusColor(e.applicationStatus).bg+" "+s.getStatusColor(e.applicationStatus).text),r(),h(" ",e.applicationStatus," "),r(2),h(" ",s.formatDate(e.applicationDate)," ")}}function Ie(o,t){if(o&1&&(i(0,"div",90)(1,"table",91)(2,"thead",92)(3,"tr")(4,"th",93),a(5,"Applicant"),n(),i(6,"th",93),a(7,"Job Title"),n(),i(8,"th",93),a(9,"Department"),n(),i(10,"th",93),a(11,"Status"),n(),i(12,"th",93),a(13,"Applied Date"),n(),i(14,"th",93),a(15,"Actions"),n()()(),i(16,"tbody",94),b(17,Ee,28,9,"tr",95),n()()()),o&2){let e=d(2);r(17),p("ngForOf",e.applications)}}
3function ke(o,t){o&1&&(i(0,"div",108)(1,"div",109),_(),i(2,"svg",110),x(3,"path",23),n(),f(),i(4,"p",111),a(5,"No applications found"),n(),i(6,"p",112),a(7,"Try adjusting your filters to see more results."),n()()())}function Fe(o,t){if(o&1){let e=S();i(0,"button",11),v("click",function(){let l=u(e).$implicit,m=d(3);return g(m.onPageChange(l))}),a(1),n()}if(o&2){let e=t.$implicit,s=d(3);y(e===s.currentPage?"relative inline-flex items-center px-4 py-2 border border-gray-300 bg-blue-50 text-sm font-medium text-blue-700":"relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50"),r(),h(" ",e," ")}}function Te(o,t){if(o&1){let e=S();i(0,"div",113)(1,"div",65)(2,"div",114),a(3),n(),i(4,"nav",115)(5,"button",116),v("click",function(){u(e);let l=d(2);return g(l.onPageChange(l.currentPage-1))}),_(),i(6,"svg",117),x(7,"path",118),n()(),b(8,Fe,2,3,"button",119),f(),i(9,"button",120),v("click",function(){u(e);let l=d(2);return g(l.onPageChange(l.currentPage+1))}),_(),i(10,"svg",117),x(11,"path",121),n()()()()()}if(o&2){let e=d(2);r(3),H(" Showing ",(e.currentPage-1)*e.pageSize+1," to ",e.Math.min(e.currentPage*e.pageSize,e.totalCount)," of ",e.totalCount," results "),r(2),p("disabled",e.currentPage===1),r(3),p("ngForOf",e.getPaginationPages()),r(),p("disabled",e.currentPage===e.totalPages)}}function Me(o,t){if(o&1){let e=S();i(0,"div",14)(1,"div",45)(2,"div",56)(3,"h3",57),a(4,"Filters"),n(),i(5,"button",58),v("click",function(){u(e);let l=d();return g(l.showFilters=!l.showFilters)}),_(),i(6,"svg",59),x(7,"path",60),n(),a(8),n()(),b(9,we,23,4,"div",61)(10,ye,5,0,"div",62),n(),f(),i(11,"div",63)(12,"div",64)(13,"div",65)(14,"h3",57),a(15),I(16,"number"),n(),i(17,"div",66),a(18),n()()(),b(19,Ce,3,2,"div",67)(20,Ie,18,1,"div",68)(21,ke,8,0,"div",69)(22,Te,12,6,"div",70),n()()}if(o&2){let e=d();r(8),h(" ",e.showFilters?"Hide":"Show"," Filters "),r(),p("ngIf",e.showFilters),r(),p("ngIf",e.showFilters),r(5),h(" Job Applications (",k(16,10,e.totalCount),") "),r(3),V(" Page ",e.currentPage," of ",e.totalPages," "),r(),p("ngIf",e.isLoading),r(),p("ngIf",!e.isLoading&&e.applications.length>0),r(),p("ngIf",!e.isLoading&&e.applications.length===0),r(),p("ngIf",!e.isLoading&&e.applications.length>0&&e.totalPages>1)}}function Je(o,t){o&1&&(i(0,"div",83)(1,"div",122),x(2,"div",123)(3,"div",88)(4,"div",87),n()())}function Pe(o,t){o&1&&(i(0,"div",80)(1,"div",81),b(2,Je,5,0,"div",82),n()()),o&2&&(r(2),p("ngForOf",M(1,pe)))}function je(o,t){if(o&1&&(i(0,"tr",96)(1,"td",97)(2,"div",102),a(3),n()(),i(4,"td",97)(5,"div",103),a(6),n()(),i(7,"td",104),a(8),n(),i(9,"td",97)(10,"span"),a(11),n()(),i(12,"td",124),a(13),n(),i(14,"td",125),a(15),n(),i(16,"td",126),a(17),n(),i(18,"td",127),a(19),n()()),o&2){let e=t.$implicit,s=d(3);r(3),c(e.jobTitle),r(3),c(e.departmentName),r(2),h(" ",s.formatDate(e.lastDate)," "),r(2),y(e.isActive?"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800":"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-red-100 text-red-800"),r(),h(" ",e.isActive?"Active":"Inactive"," "),r(2),h(" ",e.applicationCount," "),r(2),h(" ",e.pendingCount," "),r(2),h(" ",e.approvedCount," "),r(2),h(" ",e.rejectedCount," ")}}function Ve(o,t){if(o&1&&(i(0,"div",90)(1,"table",91)(2,"thead",92)(3,"tr")(4,"th",93),a(5,"Job Title"),n(),i(6,"th",93),a(7,"Department"),n(),i(8,"th",93),a(9,"Last Date"),n(),i(10,"th",93),a(11,"Status"),n(),i(12,"th",93),a(13,"Total Apps"),n(),i(14,"th",93),a(15,"Pending"),n(),i(16,"th",93),a(17,"Approved"),n(),i(18,"th",93),a(19,"Rejected"),n()()(),i(20,"tbody",94),b(21,je,20,10,"tr",95),n()()()),o&2){let e=d(2);r(21),p("ngForOf",e.jobs)}}function De(o,t){o&1&&(i(0,"div",108)(1,"div",109),_(),i(2,"svg",110),x(3,"path",128),n(),f(),i(4,"p",111),a(5,"No jobs found"),n(),i(6,"p",112),a(7,"No jobs are currently available with applications."),n()()())}function Oe(o,t){if(o&1&&(i(0,"div",14)(1,"div",63)(2,"div",64)(3,"h3",57),a(4,"Jobs with Application Counts"),n()(),b(5,Pe,3,2,"div",67)(6,Ve,22,1,"div",68)(7,De,8,0,"div",69),n()()),o&2){let e=d();r(5),p("ngIf",e.isLoadingJobs),r(),p("ngIf",!e.isLoadingJobs&&e.jobs.length>0),r(),p("ngIf",!e.isLoadingJobs&&e.jobs.length===0)}}function Ue(o,t){if(o&1&&(i(0,"div")(1,"span",142),a(2,"City:"),n(),i(3,"span",143),a(4),n()()),o&2){let e=d(2);
3r(4),c(e.selectedApplication.city)}}function Le(o,t){if(o&1&&(i(0,"div")(1,"span",142),a(2,"Permanent Address:"),n(),i(3,"span",143),a(4),n()()),o&2){let e=d(2);r(4),c(e.selectedApplication.permanentAddress)}}function Re(o,t){if(o&1&&(i(0,"div")(1,"span",142),a(2,"Postal Address:"),n(),i(3,"span",143),a(4),n()()),o&2){let e=d(2);r(4),c(e.selectedApplication.postalAddress)}}function Ne(o,t){if(o&1&&(i(0,"div")(1,"span",142),a(2,"Reviewed Date:"),n(),i(3,"span",143),a(4),n()()),o&2){let e=d(2);r(4),c(e.formatDate(e.selectedApplication.reviewedDate))}}function Be(o,t){if(o&1&&(i(0,"div")(1,"span",142),a(2,"Reviewed By:"),n(),i(3,"span",143),a(4),n()()),o&2){let e=d(2);r(4),c(e.selectedApplication.reviewedByName)}}function He(o,t){if(o&1&&(i(0,"div",159),x(1,"span",160),i(2,"span"),a(3),n()()),o&2){let e=t.$implicit;r(3),c(e)}}function ze(o,t){if(o&1&&(i(0,"div",137)(1,"h4",138),_(),i(2,"svg",155),x(3,"path",156),n(),a(4," Education "),n(),f(),i(5,"div",157),b(6,He,4,1,"div",158),n()()),o&2){let e=d(2);r(6),p("ngForOf",e.parseEducation(e.selectedApplication.educationDetails))}}function We(o,t){if(o&1&&(i(0,"div",159),x(1,"span",162),i(2,"span"),a(3),n()()),o&2){let e=t.$implicit;r(3),c(e)}}function Ge(o,t){if(o&1&&(i(0,"div",137)(1,"h4",138),_(),i(2,"svg",161),x(3,"path",128),n(),a(4," Experience "),n(),f(),i(5,"div",157),b(6,We,4,1,"div",158),n()()),o&2){let e=d(2);r(6),p("ngForOf",e.parseExperience(e.selectedApplication.experienceDetails))}}function $e(o,t){if(o&1){let e=S();i(0,"button",168),v("click",function(){u(e);let l=d(3);return g(l.downloadFile(l.selectedApplication.passportPicFileName,l.selectedApplication.passportPicBase64Data,l.selectedApplication.passportPicFileType))}),a(1," Download "),n()}}function qe(o,t){if(o&1&&(i(0,"div",163)(1,"div",164),a(2),n(),i(3,"div",165),a(4),n(),i(5,"div",166),a(6,"Passport Photo"),n(),b(7,$e,2,0,"button",167),n()),o&2){let e=d(2);r(2),c(e.getFileIcon(e.selectedApplication.passportPicFileName)),r(2),c(e.selectedApplication.passportPicFileName),r(3),p("ngIf",e.selectedApplication.passportPicBase64Data)}}function Ye(o,t){if(o&1){let e=S();i(0,"button",168),v("click",function(){u(e);let l=d(3);return g(l.downloadFile(l.selectedApplication.salarySlipFileName,l.selectedApplication.salarySlipBase64Data,l.selectedApplication.salarySlipFileType))}),a(1," Download "),n()}}function Ke(o,t){if(o&1&&(i(0,"div",163)(1,"div",164),a(2),n(),i(3,"div",165),a(4),n(),i(5,"div",166),a(6,"Salary Slip"),n(),b(7,Ye,2,0,"button",167),n()),o&2){let e=d(2);r(2),c(e.getFileIcon(e.selectedApplication.salarySlipFileName)),r(2),c(e.selectedApplication.salarySlipFileName),r(3),p("ngIf",e.selectedApplication.salarySlipBase64Data)}}function Qe(o,t){if(o&1){let e=S();i(0,"button",168),v("click",function(){u(e);let l=d(3);return g(l.downloadFile(l.selectedApplication.resumeFileName,l.selectedApplication.resumeBase64Data,l.selectedApplication.resumeFileType))}),a(1," Download "),n()}}function Xe(o,t){if(o&1&&(i(0,"div",163)(1,"div",164),a(2),n(),i(3,"div",165),a(4),n(),i(5,"div",166),a(6,"Resume"),n(),b(7,Qe,2,0,"button",167),n()),o&2){let e=d(2);r(2),c(e.getFileIcon(e.selectedApplication.resumeFileName)),r(2),c(e.selectedApplication.resumeFileName),r(3),p("ngIf",e.selectedApplication.resumeBase64Data)}}function Ze(o,t){if(o&1&&(i(0,"div",147)(1,"h4",138),_(),i(2,"svg",169),x(3,"path",170),n(),a(4," Comments "),n(),f(),i(5,"div",171)(6,"p",114),a(7),n()()()),o&2){let e=d(2);r(7),c(e.selectedApplication.comments)}}function et(o,t){if(o&1){let e=S();i(0,"div",129)(1,"div",130)(2,"div",131)(3,"h3",57),a(4,"Application Details"),n(),i(5,"button",132),v("click",function(){u(e);let l=d();return g(l.closeApplicationDetail())}),_(),i(6,"svg",133),x(7,"path",134),n()()(),f(),i(8,"div",135)(9,"div",136)(10,"div",137)(11,"h4",138),_(),i(12,"svg",139),x(13,"path",140),n(),a(14," Personal Information "),n(),f(),i(15,"div",141)(16,"div")(17,"span",142),a(18,"Name:"),n(),i(19,"span",143),a(20),n()(),i(21,"div")(22,"span",142),a(23,"Father's Name:"),n(),i(24,"span",143),a(25),n()(),i(26,"div")(27,"span",142),a(28,"Email:"),n(),i(29,"span",143),a(30),n()(),i(31,"div")(32,"span",142),a(33,"Phone:"),n(),i(34,"span",143),a(35),n()(),i(36,"div")(37,"span",142),a(38,"Date of Birth:"),n(),i(39,"span",143),a(40),n()(),b(41,Ue,5,1,"div",144)(42,Le,5,1,"div",144)(43,Re,5,1,"div",144),n()(),i(44,"div",137)(45,"h4",138),_(),i(46,"svg",145),x(47,"path",128),n(),a(48," Job Information "),n(),f(),i(49,"div",141)(50,"div")(51,"span",142),a(52,"Job Title:"),n(),i(53,"span",143),a(54),n()(),i(55,"div")(56,"span",142),a(57,"Department:"),n(),i(58,"span",143),a(59),n()(),i(60,"div")(61,"span",142),a(62,"Place of Posting:"),n(),i(63,"span",143),a(64),n()(),i(65,"div")(66,"span",142),a(67,"Grade Range:"),n(),i(68,"span",143),a(69),n()(),i(70,"div")(71,"span",142),a(72,"Current Salary:"),n(),i(73,"span",143),a(74),n()(),i(75,"div")(76,"span",142),a(77,"Expected Salary:"),n(),i(78,"span",143),a(79),n()(),i(80,"div")(81,"span",142),a(82,"Application Status:"),n(),i(83,"span"),a(84),n()(),i(85,"div")(86,"span",142),a(87,"Applied Date:"),n(),i(88,"span",143),a(89),n()(),b(90,Ne,5,1,"div",144)(91,Be,5,1,"div",144),n()(),b(92,ze,7,1,"div",146)(93,Ge,7,1,"div",146),i(94,"div",147)(95,"h4",138),_(),i(96,"svg",148),x(97,"path",149),n(),a(98," Attachments "),n(),f(),i(99,"div",150),b(100,qe,8,3,"div",151)(101,Ke,8,3,"div",151)(102,Xe,8,3,"div",151),n()(),b(103,Ze,8,1,"div",152),n()(),i(104,"div",153)(105,"button",78),v("click",function(){u(e);let l=d();return g(l.openStatusUpdate(l.selectedApplication))}),a(106," Update Status "),n(),i(107,"button",154),v("click",function(){u(e);let l=d();return g(l.closeApplicationDetail())}),a(108," Close "),n()()()()}if(o&2){let e=d();r(20),c(e.selectedApplication.applicantName),r(5),c(e.selectedApplication.fatherName),r(5),c(e.selectedApplication.email),r(5),c(e.selectedApplication.phone),r(5),V("",e.formatDate(e.selectedApplication.dateOfBirth)," (Age: ",e.calculateAge(e.selectedApplication.dateOfBirth),")"),r(),p("ngIf",e.selectedApplication.city),r(),p("ngIf",e.selectedApplication.permanentAddress),r(),p("ngIf",e.selectedApplication.postalAddress),r(11),c(e.selectedApplication.jobTitle),r(5),c(e.selectedApplication.departmentName),r(5),c(e.selectedApplication.placeOfPosting),r(5),c(e.selectedApplication.gradeRange),r(5),c(e.formatCurrency(e.selectedApplication.currentSalary)),r(5),c(e.formatCurrency(e.selectedApplication.expectedSalary)),r(4),y("ml-2 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium "+e.getStatusColor(e.selectedApplication.applicationStatus).bg+" "+e.getStatusColor(e.selectedApplication.applicationStatus).text),r(),h(" ",e.selectedApplication.applicationStatus," "),r(5),c(e.formatDate(e.selectedApplication.applicationDate)),r(),p("ngIf",e.selectedApplication.reviewedDate),r(),p("ngIf",e.selectedApplication.reviewedByName),r(),p("ngIf",e.selectedApplication.educationDetail
3s),r(),p("ngIf",e.selectedApplication.experienceDetails),r(7),p("ngIf",e.selectedApplication.passportPicFileName),r(),p("ngIf",e.selectedApplication.salarySlipFileName),r(),p("ngIf",e.selectedApplication.resumeFileName),r(),p("ngIf",e.selectedApplication.comments)}}function tt(o,t){if(o&1&&(i(0,"option",77),a(1),n()),o&2){let e=t.$implicit;p("value",e),r(),h(" ",e," ")}}function it(o,t){if(o&1){let e=S();i(0,"div",129)(1,"div",172)(2,"div",131)(3,"h3",57),a(4,"Update Application Status"),n(),i(5,"button",132),v("click",function(){u(e);let l=d();return g(l.closeStatusUpdateModal())}),_(),i(6,"svg",133),x(7,"path",134),n()()(),f(),i(8,"div",173)(9,"div")(10,"label",72),a(11,"Status *"),n(),i(12,"select",174),E("ngModelChange",function(l){u(e);let m=d();return C(m.statusUpdateForm.applicationStatus,l)||(m.statusUpdateForm.applicationStatus=l),g(l)}),i(13,"option",74),a(14,"Select Status"),n(),b(15,tt,2,2,"option",75),n()(),i(16,"div")(17,"label",72),a(18,"Comments"),n(),i(19,"textarea",175),E("ngModelChange",function(l){u(e);let m=d();return C(m.statusUpdateForm.comments,l)||(m.statusUpdateForm.comments=l),g(l)}),n()()(),i(20,"div",153)(21,"button",154),v("click",function(){u(e);let l=d();return g(l.closeStatusUpdateModal())}),a(22," Cancel "),n(),i(23,"button",176),v("click",function(){u(e);let l=d();return g(l.updateApplicationStatus())}),a(24," Update Status "),n()()()()}if(o&2){let e=d();r(12),A("ngModel",e.statusUpdateForm.applicationStatus),r(3),p("ngForOf",e.applicationStatuses),r(4),A("ngModel",e.statusUpdateForm.comments),r(4),p("disabled",!e.statusUpdateForm.applicationStatus)}}function nt(o,t){o&1&&(i(0,"li"),a(1,"\u2022 Applications from selected department"),n())}function at(o,t){if(o&1&&(i(0,"li"),a(1),n()),o&2){let e=d(2);r(),h('\u2022 Applications with "',e.exportForm.applicationStatus,'" status')}}function ot(o,t){o&1&&(i(0,"li"),a(1,"\u2022 Applications within date range"),n())}function rt(o,t){o&1&&(i(0,"li"),a(1,"\u2022 All applications (current filters applied)"),n())}function lt(o,t){o&1&&x(0,"div",186)}function st(o,t){o&1&&(_(),i(0,"svg",187),x(1,"path",8),n())}function pt(o,t){if(o&1){let e=S();i(0,"div",129)(1,"div",172)(2,"div",131)(3,"h3",57),a(4,"Export Applications"),n(),i(5,"button",132),v("click",function(){u(e);let l=d();return g(l.closeExportModal())}),_(),i(6,"svg",133),x(7,"path",134),n()()(),f(),i(8,"div",173)(9,"div")(10,"label",72),a(11,"Export Format"),n(),i(12,"div",84)(13,"label",19)(14,"input",177),E("ngModelChange",function(l){u(e);let m=d();
3return C(m.exportForm.exportFormat,l)||(m.exportForm.exportFormat=l),g(l)}),n(),i(15,"span",178),a(16,"Excel (.xlsx)"),n()(),i(17,"label",19)(18,"input",179),E("ngModelChange",function(l){u(e);let m=d();return C(m.exportForm.exportFormat,l)||(m.exportForm.exportFormat=l),g(l)}),n(),i(19,"span",178),a(20,"CSV (.csv)"),n()()()(),i(21,"div",180)(22,"h4",181),a(23,"Export will include:"),n(),i(24,"ul",182),b(25,nt,2,0,"li",144)(26,at,2,1,"li",144)(27,ot,2,0,"li",144)(28,rt,2,0,"li",144),n()()(),i(29,"div",153)(30,"button",154),v("click",function(){u(e);let l=d();return g(l.closeExportModal())}),a(31," Cancel "),n(),i(32,"button",183),v("click",function(){u(e);let l=d();return g(l.exportApplications())}),b(33,lt,1,0,"div",184)(34,st,2,0,"svg",185),a(35),n()()()()}if(o&2){let e=d();r(14),A("ngModel",e.exportForm.exportFormat),r(4),A("ngModel",e.exportForm.exportFormat),r(7),p("ngIf",e.exportForm.departmentId),r(),p("ngIf",e.exportForm.applicationStatus),r(),p("ngIf",e.exportForm.dateFrom||e.exportForm.dateTo),r(),p("ngIf",!e.exportForm.departmentId&&!e.exportForm.applicationStatus&&!e.exportForm.dateFrom&&!e.exportForm.dateTo),r(4),p("disabled",e.isExporting),r(),p("ngIf",e.isExporting),r(),p("ngIf",!e.isExporting),r(),h(" ",e.isExporting?"Exporting...":"Export"," ")}}var se=class o{constructor(t,e,s,l){this.jobApplicationsService=t;this.jobService=e;this.authService=s;this.router=l;this.applicationStatuses=this.jobApplicationsService.APPLICATION_STATUSES}jobApplicationsService;jobService;authService;router;currentUser=null;isLoading=!1;isLoadingStats=!1;isLoadingJobs=!1;isExporting=!1;applications=[];departments=[];jobs=[];statistics=null;selectedApplication=null;currentPage=1;pageSize=20;totalCount=0;totalPages=0;filters={pageNumber:1,pageSize:20};showFilters=!1;showApplicationDetail=!1;showStatusUpdateModal=!1;showExportModal=!1;activeTab="dashboard";statusUpdateForm={applicationId:0,applicationStatus:"",comments:""};exportForm={exportFormat:"xlsx"};applicationStatuses=[];subscriptions=[];ngOnInit(){if(console.log("JobApplicantComponent ngOnInit started"),!this.authService.isAuthenticated()){console.warn("User not authenticated"),this.authService.forceLogout();return}try{if(this.currentUser=this.authService.getCurrentUser(),!this.currentUser){console.error("No current user found"),this.authService.forceLogout();return}if(!this.canAccessJobApplications()){console.warn("User does not have permission to access job applications"),alert("You do not have permission to access job applications"),this.router.navigate(["/admin/dashboard"]);return}console.log("User has permission to access job applications")}catch(t){console.error("Error checking user permissions:",t),this.authService.forceLogout();return}this.loadDashboardData(),this.subscriptions.push(this.authService.currentUser$.subscribe({next:t=>{!t&&this.currentUser&&(console.log("User logged out"),this.currentUser=null,this.router.navigate(["/auth/login"]))},error:t=>{console.error("Error in currentUser$ subscription:",t)}}))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}canAccessJobApplications(){return this.currentUser?.role==="Admin"||this.currentUser?.role==="Hr"}loadDashboardData(){this.loadStatistics(),this.loadDepartments(),this.loadJobsSummary()}loadStatistics(){this.isLoadingStats=!0,this.jobApplicationsService.getApplicationStatistics(this.filters).subscribe({next:t=>{t.success&&t.data&&(this.statistics=t.data,console.log("Statistics loaded:",this.statistics)),this.isLoadingStats=!1},error:t=>{console.error("Error loading statistics:",t),this.handleError(t,"Failed to load statistics"),this.isLoadingStats=!1}})}loadApplications(){this.isLoading=!0,this.jobApplicationsService.getJobApplications(this.filters).subscribe({next:t=>{t.success&&t.data&&(this.applications=t.data.applications,this.totalCount=t.data.totalCount,this.totalPages=t.data.totalPages,this.currentPage=t.data.pageNumber,console.log(`Loaded ${this.applications.length} applications`)),this.isLoading=!1},error:t=>{console.error("Error loading applications:",t),this.handleError(t,"Failed to load applications"),this.isLoading=!1}})}loadDepartments(){this.jobService.getDepartments().subscribe({next:t=>{this.departments=t,console.log(`Loaded ${t.length} departments`)},error:t=>{console.error("Error loading departments:",t),this.handleError(t,"Failed to load departments")}})}loadJobsSummary(){this.isLoadingJobs=!0,this.jobApplicationsService.getJobsWithApplicationCount().subscribe({next:t=>{t.success&&t.data&&(this.jobs=t.data,console.log(`Loaded ${this.jobs.length} jobs with application counts`)),this.isLoadingJobs=!1},error:t=>{console.error("Error loading jobs summary:",t),this.handleError(t,"Failed to load jobs summary"),this.isLoadingJobs=!1}})}switchTab(t){this.activeTab=t,t==="applications"&&this.applications.length===0&&this.loadApplications()}applyFilters(){this.filters.pageNumber=1,this.currentPage=1,this.loadApplications(),this.loadStatistics(),this.show
3Filters=!1}clearFilters(){this.filters={pageNumber:1,pageSize:this.pageSize},this.loadApplications(),this.loadStatistics()}onDepartmentChange(t){this.filters.departmentId=t.target.value?parseInt(t.target.value):void 0}onStatusChange(t){this.filters.applicationStatus=t.target.value||void 0}onJobChange(t){this.filters.jobId=t.target.value?parseInt(t.target.value):void 0}onPageChange(t){t>=1&&t<=this.totalPages&&t!==this.currentPage&&(this.filters.pageNumber=t,this.currentPage=t,this.loadApplications(),window.scrollTo({top:0,behavior:"smooth"}))}getPaginationPages(){let t=[],s=Math.max(1,this.currentPage-Math.floor(2.5)),l=Math.min(this.totalPages,s+5-1);l-s<4&&(s=Math.max(1,l-5+1));for(let m=s;m<=l;m++)t.push(m);return t}viewApplicationDetail(t){this.jobApplicationsService.getJobApplicationById(t).subscribe({next:e=>{e.success&&e.data&&(this.selectedApplication=e.data,this.showApplicationDetail=!0,console.log("Application detail loaded:",this.selectedApplication))},error:e=>{console.error("Error loading application detail:",e),this.handleError(e,"Failed to load application details")}})}closeApplicationDetail(){this.showApplicationDetail=!1,this.selectedApplication=null}openStatusUpdate(t){this.statusUpdateForm={applicationId:t.applicationId,applicationStatus:t.applicationStatus,comments:t.comments||""},this.showStatusUpdateModal=!0}updateApplicationStatus(){if(!this.statusUpdateForm.applicationStatus){alert("Please select a status");return}let t={applicationId:this.statusUpdateForm.applicationId,applicationStatus:this.statusUpdateForm.applicationStatus,comments:this.statusUpdateForm.comments||void 0};this.jobApplicationsService.updateApplicationStatus(this.statusUpdateForm.applicationId,t).subscribe({next:e=>{e.success&&(console.log("Status updated successfully"),alert("Application status updated successfully!"),this.showStatusUpdateModal=!1,this.loadApplications(),this.loadStatistics(),this.selectedApplication&&this.selectedApplication.applicationId===this.statusUpdateForm.applicationId&&this.viewApplicationDetail(this.statusUpdateForm.applicationId))},error:e=>{console.error("Error updating status:",e),this.handleError(e,"Failed to update application status")}})}closeStatusUpdateModal(){this.showStatusUpdateModal=!1,this.statusUpdateForm={applicationId:0,applicationStatus:"",comments:""}}openExportModal(){this.exportForm=U({exportFormat:"xlsx"},this.filters),this.showExportModal=!0}exportApplications(){this.isExporting||(this.isExporting=!0,this.jobApplicationsService.exportApplications(this.exportForm).subscribe({next:t=>{let e=this.jobApplicationsService.generateExportFilename(this.exportForm.exportFormat||"xlsx",this.exportForm);this.jobApplicationsService.downloadFile(t,e),console.log("Export completed:",e),this.showExportModal=!1,this.isExporting=!1},error:t=>{console.error("Error exporting applications:",t),this.handleError(t,"Failed to export applications"),this.isExporting=!1}}))}closeExportModal(){this.showExportModal=!1,this.exportForm={exportFormat:"xlsx"}}getStatusColor(t){return this.jobApplicationsService.getStatusColor(t)}get Math(){return Math}formatDate(t){return this.jobApplicationsService.formatDate(t)}formatCurrency(t){return this.jobApplicationsService.formatCurrency(t)}calculateAge(t){return this.jobApplicationsService.calculateAge(t)}parseEducation(t){return this.jobApplicationsService.parseEducationDetails(t)}parseExperience(t){return this.jobApplicationsService.parseExperienceDetails(t)}getFileIcon(t){return this.jobApplicationsService.getFileIcon(t||"")}downloadFile(t,e,s){try{let l=atob(e),m=new Array(l.length);for(let T=0;T<l.length;T++)m[T]=l.charCodeAt(T);let de=new Uint8Array(m),ce=new Blob([de],{type:s}),O=window.URL.createObjectURL(ce),j=document.createElement("a");j.href=O,j.download=t,j.click(),window.URL.revokeObjectURL(O)}catch(l){console.error("Error downloading file:",l),alert("Error downloading file")}}handleError(t,e="An error occurred"){let s=e;t.message&&(s=t.message),t.message?.includes("Unauthorized")||t.status===401?(console.log("Authentication error, attempting token refresh"),this.authService.refreshToken().subscribe({next:()=>{console.log("Token refreshed, retrying...")},error:l=>{console.error("Token refresh failed:",l),alert("Session expired. Please log in again."),this.authService.forceLogout()}})):t.message?.includes("permission")||t.status===403?alert("You do not have permission to perform this action."):alert(s)}static \u0275fac=function(e){return new(e||o)(F(P),F(le),F(re),F(Y))};static \u0275cmp=B({type:o,selectors:[["app-job-applicant"]],decls:27,vars:12,consts:[[1,"p-6","bg-gray-50","min-h-screen"],[1,"mb-8"],[1,"flex","items-center","justify-between","mb-6"],[1,"text-3xl","font-bold","text-gray-900"],[1,"text-gray-600","mt-1"],[1,"flex","items-center","space-x-4"],[1,"inline-flex","items-center","px-4","py-2","bg-green-600","text-white","rounded-lg","hover:bg-green-700","transition-colors","duration-200","shadow-md",3,"click"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-5","h-5","mr-2"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M12 10v6m0 0l-3-3m3 3l3-3M3 17V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v10a2 2 0 01-2 2H5a2 2 0 01-2-2z"],[1,"border-b","border-gray-200"],[1,"-mb-px","flex","space-x-8"],[3,"click"],["class","space-y-6",4,"ngIf"],["class","fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full z-50",4,"ngIf"],[1,"space-y-6"],["class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",4,"ngIf"],["class","bg-white rounded-lg shadow-md p-6",4,"ngIf"],[1,"grid","grid-cols-1","md:grid-cols-2","lg:grid-cols-4","gap-6"],[1,"bg-white","rounded-lg","shadow-md","p-6","border-l-4","border-blue-500"],[1,"flex","items-center"],[1,"flex-shrink-0"],[1,"w-8","h-8","bg-blue-100","rounded-full","flex","items-center","justify-center"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-5","h-5","text-blue-600"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"],[1,"ml-5","w-0","flex-1"],[1,"text-sm","font-medium","text-gray-500","truncate"],[1,"text-lg","font-medium","text-gray-900"],[1,"bg-white","rounded-lg","shadow-md","p-6","border-l-4","border-yellow-500"],[1,"w-8","h-8","bg-yellow-100","rounded-full","flex","items-center","justify-center"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-5","h-5","text-yellow-600"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"],[1,"bg-white","rounded-lg","shadow-md","p-6","border-l-4","border-green-500"],[1,"w-8","h-8","bg-green-100","rounded-full","flex","items-center","justify-center"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-5","h-5","text-green-600"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"],[1,"bg-white","rounded-lg","shadow-md","p-6","border-l-4","border-red-500"],[1,"w-8","h-8","bg-red-100","rounded-full","flex","items-center","justify-center"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-5","h-5","text-red-600"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"],["class","bg-white rounded-lg shadow-md p-6 animate-pulse",4,"ngFor","ngForOf"],[1,"bg-white","rounded-lg","shadow-md","p-6","animate-pulse"],[1,"w-8","h-8","bg-gray-300","rounded-full"],[1,"flex-1"],[1,"h-4","bg-gray-300","rounded","w-3/4","mb-2"],[1,"h-6","bg-gray-300","rounded","w-1/2"],[1,"bg-white","rounded-lg","shadow-md","p-6"],[1,"text-lg","font-semibold","text-gray-900","mb-4"],[1,"grid","grid-cols-2","md:grid-cols-3","lg:grid-cols-6","gap-4"],[1,"text-center"],[1,"text-2xl","font-bold","text-yellow-600"],[1,"text-sm","text-gray-600"],[1,"text-2xl","font-bold","text-blue-600"],[1,"text-2xl","font-bold","text-purple-600"],[1,"text-2xl","font-bold","text-green-600"],[1,"text-2xl","font-bold","text-red-600"],[1,"text-2xl","font-bold","text-gray-600"],[1,"flex","items-center","justify-between","mb-4"],[1,"text-lg","font-semibold","text-gray-900"],[1,"text-blue-600","hover:text-blue-700","flex","items-center",3,"click"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-5","h-5","mr-1"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"],["class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-4",4,"ngIf"],["class","flex items-center space-x-4",4,"ngIf"],[1,"bg-white","rounded-lg","shadow-md","overflow-hidden"],[1,"px-6","py-4","border-b","border-gray-200"],[1,"flex","items-center","justify-between"],[1,"text-sm","text-gray-500"],["class","p-6",4,"ngIf"],["class","overflow-x-auto",4,"ngIf"],["class","p-6 text-center",4,"ngIf"],["class","px-6 py-4 border-t border-gray-200",4,"ngIf"],[1,"grid","grid-cols-1","md:grid-cols-2","lg:grid-cols-4","gap-4","mb-4"],[1,"block","text-sm","font-medium","text-gray-700","mb-2"],[1,"w-full","border","border-gray-300","rounded-lg","px-3","py-2","focus:outline-none","focus:ring-2","focus:ring-blue-500",3,"change"],["value",""],[3,"value",4,"ngFor","ngForOf"],["type","date",1,"w-full","border","border-gray-300","rounded-lg","px-3","py-2","focus:outline-none","focus:ring-2","focus:ring-blue-500",3,"ngModelChange","ngModel"],[3,"value"],[1,"px-4","py-2","bg-blue-600","text-white","rounded-lg","hover:bg-blue-700","transition-colors","duration-200",3,"click"],[1,"px-4","py-2","bg-gray-600","text-white","rounded-lg","hover:bg-gray-700","transition-colors","duration-200",3,"click"],[1,"p-6"],[1,"animate-pulse","space-y-4"],["class","border border-gray-200 rounded-lg p-4",4,"ngFor","ngForOf"],[1,"border","border-gray-200","rounded-lg","p-4"],[1,"flex","space-x-4"],[1,"w-12","h-12","bg-gray-300","rounded-full"],[1,"flex-1","space-y-2"],[1,"h-4","bg-gray-300","rounded","w-1/4"],[1,"h-4","bg-gray-300","rounded","w-1/2"],[1,"h-4","bg-gray-300","rounded","w-1/3"],[1,"overflow-x-auto"],[1,"min-w-full","divide-y","divide-gray-200"],[1,"bg-gray-50"],[1,"px-6","py-3","text-left","text-xs","font-medium","text-gray-500","uppercase","tracking-wider"],[1,"bg-white","divide-y","divide-gray-200"],["class","hover:bg-gray-50",4,"ngFor","ngForOf"],[1,"hover:bg-gray-50"],[1,"px-6","py-4","whitespace-nowrap"],[1,"flex-shrink-0","h-10","w-10"],[1,"h-10","w-10","rounded-full","bg-gray-300","flex","items-center","justify-center"],[1,"text-sm","font-medium","text-gray-700"],[1,"ml-4"],[1,"text-sm","font-medium","text-gray-900"],[1,"text-sm","text-gray-900"],[1,"px-6","py-4","whitespace-nowrap","text-sm","text-gray-500"],[1,"px-6","py-4","whitespace-nowrap","text-sm","font-medium","space-x-2"],[1,"text-blue-600","hover:text-blue-900",3,"click"],[1,"text-green-600","hover:text-green-900",3,"click"],[1,"p-6","text-center"],[1,"text-gray-500"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"mx-auto","h-12","w-12","text-gray-400","mb-4"],[1,"text-lg","font-medium"],[1,"text-sm"],[1,"px-6","py-4","border-t","border-gray-200"],[1,"text-sm","text-gray-700"],[1,"relative","z-0","inline-flex","rounded-md","shadow-sm","-space-x-px"],[1,"relative","inline-flex","items-center","px-2","py-2","rounded-l-md","border","border-gray-300","bg-white","text-sm","font-medium","text-gray-500","hover:bg-gray-50","disabled:opacity-50","disabled:cursor-not-allowed",3,"click","disabled"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"h-5","w-5"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M15 19l-7-7 7-7"],[3,"class","click",4,"ngFor","ngForOf"],[1,"relative","inline-flex","items-center","px-2","py-2","rounded-r-md","border","border-gray-300","bg-white","text-sm","font-medium","text-gray-500","hover:bg-gray-50","disabled:opacity-50","disabled:cursor-not-allowed",3,"click","disabled"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M9 5l7 7-7 7"],[1,"space-y-2"],[1,"h-4","bg-gray-300","rounded","w-3/4"],[1,"px-6","py-4","whitespace-nowrap","text-sm","text-gray-900","font-medium"],[1,"px-6","py-4","whitespace-nowrap","text-sm","text-yellow-600","font-medium"],[1,"px-6","py-4","whitespace-nowrap","text-sm","text-green-600","font-medium"],[1,"px-6","py-4","whitespace-nowrap","text-sm","text-red-600","font-medium"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M21 13.255A23.931 23.931 0 0112 15c-3.183 0-6.22-.62-9-1.745M16 6V4a2 2 0 00-2-2h-4a2 2 0 00-2-2v2m8 0V6a2 2 0 00-2 2H6a2 2 0 00-2-2V6m0 0v6.5a2 2 0 002 2h8a2 2 0 002-2V6z"],[1,"fixed","inset-0","bg-gray-600","bg-opacity-50","overflow-y-auto","h-full","w-full","z-50"],[1,"relative","top-20","mx-auto","p-5","border","w-11/12","max-w-4xl","shadow-lg","rounded-md","bg-white"],[1,"flex","items-center","justify-between","pb-4","border-b","border-gray-200"],[1,"text-gray-400","hover:text-gray-600",3,"click"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-6","h-6"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M6 18L18 6M6 6l12 12"],[1,"mt-6","max-h-96","overflow-y-auto"],[1,"grid","grid-cols-1","md:grid-cols-2","gap-6"],[1,"space-y-4"],[1,"font-semibold","text-gray-900","flex","items-center"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-5","h-5","mr-2","text-blue-600"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"],[1,"space-y-3","text-sm"],[1,"font-medium","text-gray-700"],[1,"ml-2"],[4,"ngIf"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-5","h-5","mr-2","text-green-600"],["class","space-y-4",4,"ngIf"],[1,"md:col-span-2","space-y-4"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-5","h-5","mr-2","text-indigo-600"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.48
36L20.5 13"],[1,"grid","grid-cols-1","md:grid-cols-3","gap-4"],["class","border border-gray-200 rounded-lg p-4 text-center hover:bg-gray-50",4,"ngIf"],["class","md:col-span-2 space-y-4",4,"ngIf"],[1,"flex","items-center","justify-end","space-x-4","pt-4","border-t","border-gray-200","mt-6"],[1,"px-4","py-2","bg-gray-300","text-gray-700","rounded-lg","hover:bg-gray-400","transition-colors","duration-200",3,"click"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-5","h-5","mr-2","text-purple-600"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.746 0 3.332.477 4.5 1.253v13C19.832 18.477 18.246 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"],[1,"text-sm","space-y-2"],["class","flex items-start",4,"ngFor","ngForOf"],[1,"flex","items-start"],[1,"w-2","h-2","bg-purple-400","rounded-full","mt-2","mr-3","flex-shrink-0"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-5","h-5","mr-2","text-orange-600"],[1,"w-2","h-2","bg-orange-400","rounded-full","mt-2","mr-3","flex-shrink-0"],[1,"border","border-gray-200","rounded-lg","p-4","text-center","hover:bg-gray-50"],[1,"text-2xl","mb-2"],[1,"text-sm","font-medium","text-gray-900","truncate"],[1,"text-xs","text-gray-500","mb-2"],["class","text-blue-600 hover:text-blue-700 text-xs",3,"click",4,"ngIf"],[1,"text-blue-600","hover:text-blue-700","text-xs",3,"click"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-5","h-5","mr-2","text-gray-600"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M7 8h10M7 12h4m1 8l-4-4H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-3l-4 4z"],[1,"bg-gray-50","rounded-lg","p-4"],[1,"relative","top-20","mx-auto","p-5","border","w-11/12","max-w-md","shadow-lg","rounded-md","bg-white"],[1,"mt-6","space-y-4"],["required","",1,"w-full","border","border-gray-300","rounded-lg","px-3","py-2","focus:outline-none","focus:ring-2","focus:ring-blue-500",3,"ngModelChange","ngModel"],["rows","4","placeholder","Add comments about the status change...",1,"w-full","border","border-gray-300","rounded-lg","px-3","py-2","focus:outline-none","focus:ring-2","focus:ring-blue-500",3,"ngModelChange","ngModel"],[1,"px-4","py-2","bg-blue-600","text-white","rounded-lg","hover:bg-blue-700","disabled:opacity-50","disabled:cursor-not-allowed","transition-colors","duration-200",3,"click","disabled"],["type","radio","value","xlsx","name","exportFormat",1,"text-blue-600",3,"ngModelChange","ngModel"],[1,"ml-2","text-sm"],["type","radio","value","csv","name","exportFormat",1,"text-blue-600",3,"ngModelChange","ngModel"],[1,"bg-blue-50","border","border-blue-200","rounded-lg","p-4"],[1,"text-sm","font-medium","text-blue-900","mb-2"],[1,"text-sm","text-blue-700","space-y-1"],[1,"px-4","py-2","bg-green-600","text-white","rounded-lg","hover:bg-green-700","disabled:opacity-50","disabled:cursor-not-allowed","transition-colors","duration-200","flex","items-center",3,"click","disabled"],["class","animate-spin rounded-full h-4 w-4 border-b-2 border-white mr-2",4,"ngIf"],["class","w-4 h-4 mr-2","fill","none","stroke","currentColor","viewBox","0 0 24 24",4,"ngIf"],[1,"animate-spin","rounded-full","h-4","w-4","border-b-2","border-white","mr-2"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-4","h-4","mr-2"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div")(4,"h1",3),a(5,"Job Applications Management"),n(),i(6,"p",4),a(7,"Manage and review job applications"),n()(),i(8,"div",5)(9,"button",6),v("click",function(){return s.openExportModal()}),_(),i(10,"svg",7),x(11,"path",8),n(),a(12," Export Data "),n()()(),f(),i(13,"div",9)(14,"nav",10)(15,"button",11),v("click",function(){return s.switchTab("dashboard")}),a(16," Dashboard "),n(),i(17,"button",11),v("click",function(){return s.switchTab("applications")}),a(18," Applications "),n(),i(19,"button",11),v("click",function(){return s.switchTab("jobs")}),a(20," Jobs Summary "),n()()()(),b(21,fe,4,3,"div",12)(22,Me,23,12,"div",12)(23,Oe,8,3,"div",12),n(),b(24,et,109,27,"div",13)(25,it,25,4,"div",13)(26,pt,36,10,"div",13)),e&2&&(r(15),y(s.activeTab==="dashboard"?"border-blue-500 text-blue-600 whitespace-nowrap py-2 px-1 border-b-2 font-medium text-sm":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 whitespace-nowrap py-2 px-1 border-b-2 font-medium text-sm"),r(2),y(s.activeTab==="applications"?"border-blue-500 text-blue-600 whitespace-nowrap py-2 px-1 border-b-2 font-medium text-sm":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 whitespace-nowrap py-2 px-1 border-b-2 font-medium text-sm"),r(2),y(s.activeTab==="jobs"?"border-blue-500 text-blue-600 whitespace-nowrap py-2 px-1 border-b-2 font-medium text-sm":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 whitespace-nowrap py-2 px-1 border-b-2 font-medium text-sm"),r(2),p("ngIf",s.activeTab==="dashboard"),r(),p("ngIf",s.activeTab==="applications"),r(),p("ngIf",s.activeTab==="jobs"),r(),p("ngIf",s.showApplicationDetail&&s.selectedApplication),r(),p("ngIf",s.showStatusUpdateModal),r(),p("ngIf",s.showExportModal))},dependencies:[$,z,W,oe,ie,ne,Q,te,ee,X,ae,Z,G],styles:['.modal-scroll[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.modal-scroll[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#f1f1f1;border-radius:3px}.modal-scroll[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#c1c1c1;border-radius:3px}.modal-scroll[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#a8a8a8}tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background-color:#f9fafb;transition:background-color .15s ease-in-out}.status-badge[_ngcontent-%COMP%]{transition:all .2s ease-in-out}.status-badge[_ngcontent-%COMP%]:hover{transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.btn-hover[_ngcontent-%COMP%]{transition:all .2s ease-in-out}.btn-hover[_ngcontent-%COMP%]:hover{transform:translateY(-1px);box-shadow:0 4px 12px #00000026}.card-hover[_ngcontent-%COMP%]{transition:all .3s ease-in-out}.card-hover[_ngcontent-%COMP%]:hover{transform:translateY(-2px);box-shadow:0 10px 25px #0000001a}@keyframes _ngcontent-%COMP%_skeleton-loading{0%{background-position:-200px 0}to{background-position:calc(200px + 100%) 0}}.skeleton[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_skeleton-loading 1.2s ease-in-out infinite;
3background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 37%,#f0f0f0 63%);background-size:400px 100%}.tab-active[_ngcontent-%COMP%]{position:relative}.tab-active[_ngcontent-%COMP%]:after{content:"";position:absolute;bottom:-2px;left:0;right:0;height:2px;background:linear-gradient(90deg,#3b82f6,#1d4ed8);border-radius:1px}.stats-card-1[_ngcontent-%COMP%]{background:linear-gradient(135deg,#667eea,#764ba2)}.stats-card-2[_ngcontent-%COMP%]{background:linear-gradient(135deg,#f093fb,#f5576c)}.stats-card-3[_ngcontent-%COMP%]{background:linear-gradient(135deg,#4facfe,#00f2fe)}.stats-card-4[_ngcontent-%COMP%]{background:linear-gradient(135deg,#43e97b,#38f9d7)}.modal-backdrop[_ngcontent-%COMP%]{backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}.custom-checkbox[_ngcontent-%COMP%]:checked{background:linear-gradient(45deg,#3b82f6,#1d4ed8);border-color:#3b82f6}.custom-radio[_ngcontent-%COMP%]:checked{background:linear-gradient(45deg,#3b82f6,#1d4ed8);border-color:#3b82f6}.file-preview[_ngcontent-%COMP%]{border:2px dashed #d1d5db;border-radius:8px;transition:all .3s ease}.file-preview[_ngcontent-%COMP%]:hover{border-color:#3b82f6;background-color:#f8fafc}.file-preview.has-file[_ngcontent-%COMP%]{border-style:solid;border-color:#10b981;background-color:#ecfdf5}@media(max-width:768px){.table-responsive[_ngcontent-%COMP%]{font-size:14px}.table-responsive[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .table-responsive[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:8px 12px}}.dropdown-enter[_ngcontent-%COMP%]{opacity:0;transform:translateY(-10px)}.dropdown-enter-active[_ngcontent-%COMP%]{opacity:1;transform:translateY(0);transition:all .2s ease-out}.pagination-btn[_ngcontent-%COMP%]{min-width:40px;height:40px;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.pagination-btn[_ngcontent-%COMP%]:hover:not(:disabled){background-color:#f3f4f6;transform:translateY(-1px)}.pagination-btn.active[_ngcontent-%COMP%]{background:linear-gradient(45deg,#3b82f6,#1d4ed8);color:#fff;box-shadow:0 2px 8px #3b82f64d}.export-info[_ngcontent-%COMP%]{background:linear-gradient(135deg,#eff6ff,#dbeafe);border-left:4px solid #3b82f6}[_ngcontent-%COMP%]:root{--status-pending: #fbbf24;--status-review: #3b82f6;--status-shortlisted: #8b5cf6;--status-approved: #10b981;--status-rejected: #ef4444;--status-hold: #6b7280}@media(prefers-color-scheme:dark){.dark-mode[_ngcontent-%COMP%]{background-color:#1f2937;color:#f9fafb}.dark-mode[_ngcontent-%COMP%] .bg-white[_ngcontent-%COMP%]{background-color:#374151}.dark-mode[_ngcontent-%COMP%] .text-gray-900[_ngcontent-%COMP%]{color:#f9fafb}}']})};export{se as JobApplicantComponent};
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.