1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5483],{51958:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/components/SecretariatDashboard/LatestApplicationPopup",function(){return t(30477)}])},57153:function(e,n,t){"use strict";t.d(n,{Bu:function(){return w},CP:function(){return y},Cl:function(){return p},EQ:function(){return N},Fw:function(){return b},R5:function(){return _},Rx:function(){return v},XC:function(){return f},e$:function(){return u},eY:function(){return g},gn:function(){return A},kC:function(){return D},ki:function(){return x},lm:function(){return S},lr:function(){return j},oX:function(){return h},yr:function(){return m}});var r=t(79720);t(53649);var a=t(30381),i=t.n(a),c=t(58890),s=t(74536),d=t(71092),o=t(34043),l=t(21968);let u=e=>e instanceof Error?e.message:String(e);function f(e){let n="";try{var t,a;t="message",a=String(e),n=t in e?e[t]:a,n=r.isString(n)?n:""}catch(e){n=""}return n}new Intl.DateTimeFormat("en-GB",{dateStyle:"medium"}),new Intl.NumberFormat("en-GB",{style:"currency",currency:"GBP"}),new Intl.NumberFormat("en-GB");let m=()=>{let e=new Date().getMonth();return e>=0&&e<3?1:e>=3&&e<6?2:e>=6&&e<9?3:(console.log("current month",e),4)},p=e=>"success"===e||"in_academy"===e?"statusSuccess":"shared"===e?"statusShared":"completed"===e?"statusReceived":"approved"===e||"accepted"===e?"statusApproved":"paid"===e||"standby_vessel"===e?"statusReceived":"invoiced"===e?"statusSent":"not_accepted"===e||"overdue"===e?"statusWarning":"over_30_days"===e||"deferred_disciplinary"===e||"deferred_medical"===e?"statusSoftWarning":"rejected"===e||"suspended"===e?"statusWarning":"submitted"===e?"statusSuccess":"draft"===e?"statusSoftWarning":"not-received"===e||"graduated"===e?"statusInactive":"action-required"===e?"statusRequest":"invoice-sent"===e||"on_board"===e||"done_debriefing_enrollment"===e||"done_debriefing_graduation"===e?"statusSent":"in-review"===e?"statusReview":"terminated_disciplinary"===e||"terminated_academic"===e||"terminated_medical"===e?"statusPending":"resigned"===e?"statusResigned":"deceased"===e?"statusDeceased":void 0,g=["statusShared","statusRequest","statusWarning","statusSoftWarning"],y=e=>{let{submissionDate:n}=e,t=i()(n,"DD-MM-YYYY"),r=t.year();return t.month()>8?r-1:r-2},_=e=>{let{status:n,submissionDate:t,grantName:r}=e;if("action-required"===n)return!0;let a=i()().year(),c=i()().month(),s=i()().format("YYYY-MM-DD"),d=c>8?a:a-1,o=i()(s).isBetween("".concat(d,"-09-30"),"".concat(d+1,"-04-01")),l=i()(s).isBetween("".concat(a,"-03-31"),"".concat(a,"-07-01")),u=i()(t,"DD-MM-YYYY"),f=!1;return"ssf"===r&&(f="draft"===n&&o&&u.isBetween("".concat(d,"-09-30"),"".concat(d+1,"-04-01"))),"sepf"===r&&(f="draft"===n&&l&&u.isBetween("".concat(a,"-03-31"),"".concat(a,"-07-01"))),"imtf"===r&&(f="draft"===n&&u.isBetween("".concat(a-1,"-12-31"),"".concat(a+1,"-01-01"))),f};function v(e){try{if(!e)return{};return JSON.parse(e)}catch(e){return console.log("Error parsing JSON"),{}}}function b(e){if(!e)return"-";let n=i()(e,"DD-MM-YYYY"),t=new Date;return(0,c.o)(t,n.toDate())}function D(e){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"string"!=typeof e?"":n?e.toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):e.charAt(0).toUpperCase()+e.slice(1)}function h(e){var n;return e?null!==(n=({"In Academy":"in_academy","Deferred (Medical Leave)":"deferred_medical",Suspended:"suspended","Terminated (Medical)":"terminated_medical","Terminated (Disciplinary)":"terminated_disciplinary","Terminated (Academic Deficiency)":"terminated_academic",Resigned:"resigned","On Board":"on_board","Stand By (Waiting for Vessel Assignment)":"standby_vessel",Graduated:"graduated","Deferred (Disciplinary)":"deferred_disciplinary","Done De-briefing - For Enrollment":"done_debriefing_enrollment","Done De-briefing - For Graduation":"done_debriefing_graduation",Deceased:"deceased"})[e])&&void 0!==n?n:e.split(" ")[0].toLowerCase():"all"}function w(e){var n;return null!==(n=({in_academy:"In Academy",deferred_medical:"Deferred (Medical Leave)",suspended:"Suspended",terminated_medical:"Terminated (Medical)",terminated_disciplinary:"Terminated (Disciplinary)",terminated_academic:"Terminated (Academic Deficiency)",resigned:"Resigned",on_board:"On Board",standby_vessel:"Stand By (Waiting for Vessel Assignment)",graduated:"Graduated",deferred_disciplinary:"Deferred (Disciplinary)",done_debriefing_enrollment:"Done De-briefing - For Enrollment",done_debriefing_graduation:"Done De-briefing - For Graduation",deceased:"Deceased"})[null!=e?e:""])&&void 0!==n?n:"-"}function x(e){let{headers:n,csvRowData:t}=e,r=[n.join(","),...t.map(e=>n.map(n=>{var t;return'"'.concat(null!==(t=e[n])&&void 0!==t?t:"",'"')}).join(","))].join("\n"),a=new Date().toISOString().split("T")[0];return{blob:new Blob([r],{type:"text/csv;charset=utf-8;"}),fileName:"csv-".concat(a,".csv")}}function S(e){let n=URL.createObjectURL(e.blob),t=document.createElement("a");t.setAttribute("href",n),t.setAttribute("download",e.fileName),document.body.appendChild(t),t.click(),document.body.removeChild(t),URL.revokeObjectURL(n)}function N(e,n){return Array.from({length:n-e+1},(e,t)=>({value:(n-t).toString(),label:(n-t).toString()}))}function j(e){let n;let t=(0,s.Qc)(e,"dd/MM/yyyy",new Date),r=new Date,a=(0,d.X)(r,t),i=(0,o.A)(r,t),c=(0,l.j)(r,t);return a<60&&(n="".concat(a," minute").concat(1===a?"":"s"," ago")),i<24&&i>=1&&(n="Today"),c>=1&&(n="".concat(c," day").concat(1===c?"":"s"," ago")),{daysAgo:c,formattedDaysAgo:"".concat(c," days ago."),formattedAgo:n}}function A(e){return null==e?void 0:e.replaceAll("&","&")}},30477:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return s}});var r=t(85893),a=t(57153),i=t(96486),c=t.n(i);function s(e){let{memberName:n,grantType:t,status:i,date:s}=e,d=(0,a.Cl)(i);return(0,r.jsxs)("div",{className:"popupTable",children:[(0,r.jsx)("div",{className:"tableTitle p-2 text-center",children:n}),(0,r.jsxs)("div",{className:"tableContents",children:[(0,r.jsxs)("div",{className:"d-flex flex-wrap",children:[(0,r.jsx)("div",{className:"tableHeader col-4 d-flex align-items-center border-end ps-3 py-2",children:"Grant Type"}),(0,r.jsx)("div",{className:"tableInfo text-center col-8 ps-3 py-2",children:t})]}),(0,r.jsxs)("div",{className:"d-flex flex-wrap",children:[(0,r.jsx)("div",{className:"tableHeader col-4 d-flex align-items-center border-end ps-3 py-2",children:"Status"}),(0,r.jsx)("div",{className:"tableInfo col-8 ps-3 py-2 text-center",children:(0,r.jsx)("span",{className:"".concat(d),children:"invoice-sent"===i?"Approved - Payment in progress":c().upperFirst(i)})})]}),(0,r.jsxs)("div",{className:"d-flex flex-wrap",children:[(0,r.jsx)("div",{className:"tableHeader col-4 d-flex align-items-center border-end ps-3 py-2",children:"Date"}),(0,r.jsx)("div",{className:"tableInfo col-8 ps-3 py-2 text-center",children:s})]})]})]})}}},function(e){e.O(0,[4885,8925,9160,9801,2185,95,3662,8764,7460,2888,9774,179],function(){return e(e.s=51958)}),_N_E=e.O()}]);
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.