PageSourceSearch

https://gaurang.page/_next/static/chunks/pages/company/job-board/layoff-form-1e5fb87430ae8efe.js

js gaurang.page collected 2026-09-25 21:32:14 UTC 7,364 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2447],{8072:(e,l,t)=>{"use strict";t.d(l,{A:()=>o});var n=t(37876),r=t(89099),a=t(2171);let o=e=>l=>{let t=(0,r.useRouter)(),{primaryUserData:o}=(0,a.useSelector)(e=>e.PrimaryUserData);if(null==o?void 0:o.id)return(null==o?void 0:o.isInternalUser)||(null==o?void 0:o.isInternalJobPostUser)?(0,n.jsx)(e,{...l}):(t.push("/404"),null)}},43498:(e,l,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/company/job-board/layoff-form",function(){return t(43693)}])},43693:(e,l,t)=>{"use strict";t.r(l),t.d(l,{default:()=>P});var n=t(37876),r=t(77328),a=t.n(r),o=t(14232),i=t(57994),u=t(86425),s=t(95726),d=t(34217),c=t(89311),v=t(21639),m=t(16495),f=t(63819),h=t(69198),y=t(71297),p=t(34321),g=t(68827),x=t(47553),b=t(8072),j=t(46397);let A="company",L="website",w="layoff",S="date",C="industry",N="place",E="source",O="percentage",P=(0,x.A)((0,b.A)(()=>{let[e,l]=(0,o.useState)({}),[t,r]=(0,o.useState)(!1),[x,b]=(0,o.useState)({}),P=e=>{x[e]&&(delete x[e],b(x))},_=(e,t)=>{((null==x?void 0:x[e])||(null==x?void 0:x.formIncomplete))&&(P(e),P("formIncomplete")),l(l=>({...l,[e]:t}))},R=e=>g.A.GLOBAL.requiredFieldIsNotPresent(e).message,T=async t=>{t.preventDefault();let n=(e=>{var l;let t={};return f.default.isEmptyString(null==e?void 0:e[A])&&(t.company=R("Company name")),f.default.isEmptyString(null==e?void 0:e[L])?t.website=R("Website link"):f.default.validateURL(null==e?void 0:e[L])||(t.website=g.A.GLOBAL.invalidUrl("Website url").message),f.default.isEmptyString(null==e?void 0:e[S])&&(t.date=R("Date")),(null==e||null==(l=e[N])?void 0:l.country.length)||(t.place=R("Place")),f.default.isEmptyString(null==e?void 0:e[E])?t.source=R("Source link"):f.default.validateURL(null==e?void 0:e[E])||(t.source=g.A.GLOBAL.invalidUrl("Source url").message),t})(e);if(Object.keys(n).length)return void b(n);let a=(e=>{let l=null==e?void 0:e[O];l&&(l=l.toString().replace(/[%\s]+/g,""),e[O]="".concat(l,"%"));let t=null==e?void 0:e[S];t&&(e[S]=new Date(t));let n=null==e?void 0:e[w];return n&&(e[w]=Number(n)),e})(e);try{r(!0),await p.yZ.createLayoff(a),l({}),y.A.SuccessToast(h.A.LAYOFF_FORM.add)}catch(e){var o,i,u;b({formIncomplete:(null==e||null==(u=e.response)||null==(i=u.data)||null==(o=i.error)?void 0:o.message)||g.A.GLOBAL.wrong})}finally{r(!1)}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a(),{children:(0,n.jsx)("title",{children:"Layoff Form"})}),(0,n.jsxs)(i.A.Center,{children:[(0,n.jsx)(i.A.CenterTop,{internalPage:!0,children:(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)(i.A.BackButton,{}),(0,n.jsx)(i.A.PageHeading,{children:"Layoff Form"})]})}),(0,n.jsxs)("form",{noValidate:!0,children:[(0,n.jsxs)("div",{className:"p-4 mob:p-6 mb-36 lg:mb-10 flex flex-col mob:gap-10 gap-6",children:[(0,n.jsx)(u.A.Row,{sectionLabel:"Company name",required:!0,children:(0,n.jsx)(s.Ay,{id:"company",placeholder:"Google",value:(null==e?void 0:e[A])||"",maxLength:m.HEADLINE_MAX_LENGTH,onChange:e=>{_(A,e.target.value)},error:null==x?void 0:x[A]})}),(0,n.jsx)(u.A.Row,{sectionLabel:"Website",required:!0,children:(0,n.jsx)(s.Ay,{id:"website",placeholder:"www.google.com",value:(null==e?void 0:e[L])||"",onChange:e=>{_(L,e.target.value)},error:null==x?void 0:x[L]})}),(0,n.jsx)(u.A.Row,{sectionLabel:"Number of Layoff",children:(0,n.jsx)(s.Ay,{type:"number",id:"layoff",placeholder:"120",value:(null==e?void 0:e[w])||"",onChange:e=>{_(w,e.target.value)},error:null==x?void 0:x[w]})}),(0,n.jsx)(u.A.Row,{sectionLabel:"Date",required:!0,children:(0,n.jsx)(s.Hc,{id:"date",value:(null==e?void 0:e[S])||"",onChange:e=>{_(S,e.target.value)},error:null==x?void 0:x[S]})}),(0,n.jsx)(u.A.Row,{sectionLabel:"Industry",children:(0,n.jsx)(s.Ay,{id:"industry",placeholder:"Food procurement startup",value:(null==e?void 0:e[C])||"",onChange:e=>{_(C,e.target.value)},error:null==x?void 0:x[C]})}),(0,n.jsx)(u.A.Row,{sectionLabel:"Place",required:!0,children:(0,n.jsx)(j.A,{id:"location",placeholder:"Pune",location:(null==e?void 0:e[N])||"",setLocation:e=>{_(N,e)},isMulti:!1,error:null==x?void 0:x[N]})}),(0,n.jsx)(u.A.Row,{sectionLabel:"Source",required:!0,children:(0,n.jsx)(s.Ay,{id:"source",placeholder:"peerlist.io/layoff",value:(null==e?void 0:e[E])||"",onChange:e=>{_(E,e.target.value)},error:null==x?void 0:x[E]})}),(0,n.jsx)(u.A.Row,{sectionLabel:"Percentage",children:(0,n.jsx)(s.Ay,{id:"percentage",placeholder:"20%",type:"number",value:(null==e?void 0:e[O])||"",onChange:e=>{_(O,e.target.value)},error:null==x?void 0:x[O]})})]}),(0,n.jsxs)(d.A.SaveBottomBanner,{className:"flex-col z-10",bottomPosition:"bottom-[72px]",children:[x.formIncomplete?(0,n.jsx)("div",{className:"flex items-start w-full mb-2",children:(0,n.jsx)(c.default.ErrorText,{className:"text-left ml-0",children:x.formIncomplete})}):null,(0,n.jsx)("div",{className:"flex items-center w-full justify-between",children:(0,n.jsx)(v.Ay.Primary,{small:!0,loading:t,disabled:t,onClick:e=>T(e),className:"ml-auto",type:"submit",children:"Save"})})]})]})]}),(0,n.jsx)(i.A.Right,{hideOnSmallScreens:!0})]})}))},46397:(e,l,t)=>{"use strict";t.d(l,{A:()=>f});var n=t(37876),r=t(14232),a=t(97160),o=t(6815),i=t(34321),u=t(89311),s=t(61028),d=t(63819),c=t(96940);let v=e=>e?e.city?"".concat(e.city).concat(e.countryCode||e.country?", ".concat(e.countryCode||e.country):""):"".concat(e.country||"WorldWide"):"",m=e=>{let{data:l}=e;return l?(0,n.jsx)(a.c.MultiValueLabel,{...e,children:(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)(u.default.MediumText,{xs:!0,children:v(l)}),(0,n.jsx)(c.Vn,{})]})}):null},f=e=>{var l;let{error:t,setError:a=()=>{},location:u,setLocation:c,label:f="",isClearable:h=!1,isDisabled:y=!1,required:p=!1,placeholder:g="Search Cities / Country",cacheCity:x=!0,onClear:b=()=>{},isMulti:j=!0,subText:A,max:L=null}=e,[w,S]=(0,r.useState)(!1),C=(0,r.useRef)(null),[N,E]=(0,r.useState)(""),[O,P]=(0,r.useState)(u);(0,r.useEffect)(()=>()=>{C.current&&clearTimeout(C.current)},[]);let _=async e=>{S(!0);try{var l,t;let n=await (0,i.g$)({query:e,country:(null==u?void 0:u.countryCode)||""}),r=null==n||null==(t=n.data)||null==(l=t.data)?void 0:l.data;return S(!1),(r||[]).map(e=>({...e,label:v(e),value:v(e)}))}catch(e){}finally{S(!1)}},R=async e=>{try{await (0,i.UA)(e)}catch(e){}};return(0,r.useEffect)(()=>{j?(null==u?void 0:u.length)?P(u.map(e=>({...e,label:v(e),value:v(e)}))):P([]):Object.keys(u||{}).length>0?P({...u,label:v(u),value:v(u)}):P(null)},[JSON.stringify(u)]),(0,n.jsx)("div",{children:(0,n.jsx)("div",{children:(0,n.jsx)(s.A,{isMulti:j,as:o.A,label:f,subText:A,max:L,id:"location",inputId:"location",instanceId:"location",cacheOptions:x,loadOptions:e=>new Promise(l=>{if(!e||e.trim().length<2)return void l([]);C.current&&clearTimeout(C.current),C.current=setTimeout(()=>l(_(e)),700)}),placeholder:g,components:{MultiValueLabel:m},isClearable:h,disabled:y,isLoading:w,onChange:e=>{if((N||t)&&(E(""),a()),!e)return void b();(e=>{c(e),j?e.filter(e=>!(null==O?void 0:O.some(l=>d.default.convertLocationObjectToString(e)===d.default.convertLocationObjectToString(l)))).forEac
1h(e=>{R(e)}):R(e),P(e)})(e)},value:O,noOptionsMessage:e=>{let{inputValue:l}=e;return l?"No results found":"Start typing.."},required:p,error:N||t,menuPortalTarget:"undefined"!=typeof document?null==(l=document)?void 0:l.body:void 0})})})}}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=43498)),_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.