PageSourceSearch

https://cms.businesswireindia.com/assets/AddCompanyCategory-690b8734.js

js businesswireindia.com collected 2026-10-02 03:40:20 UTC 1,778 bytes, 1 lines download raw bytes

1import{ab as A,ac as R,a as q,r as t,bU as B,bV as F,bT as i,bR as k,v as U,w as s,L as $,B as G}from"./index-8acdbf7a.js";const Q={addIndustry:""},T=A({addIndustry:R().required("Industry field is required")}),D=({updatedVariable:e,flag:f,setFlag:h})=>{const r=q(),[x,u]=t.useState(""),[g,{isLoading:c,data:a}]=B(),[p,{isLoading:I,data:d}]=F();t.useEffect(()=>{a&&(o(!0),l(),u((a==null?void 0:a.message)??""),r(i(n)))},[c,a]),t.useEffect(()=>{d&&(o(!0),h(!1),l(),u((d==null?void 0:d.message)??""),r(i(n)))},[I,d]);const{isLoading:b,data:n,refetch:l}=k(""),[j,o]=t.useState(!1);t.useEffect(()=>{n&&r(i(n))},[b,n]);const{values:C,errors:m,handleBlur:N,handleChange:S,handleSubmit:v,setFieldValue:L,touched:E,resetForm:M,handleReset:w}=U({initialValues:Q,validationSchema:T,onSubmit:async y=>{f?p({id:e==null?void 0:e.id,title:y.addIndustry}):g(y.addIndustry),M()}});return t.useEffect(()=>{e&&L("addIndustry",e.name)},[e]),s.jsx("div",{className:"col-xl-4 d-flex flex-grow-1",children:s.jsxs("div",{className:"card card-body border-primary",children:[s.jsxs("form",{action:"#",onSubmit:v,children:[s.jsx("h6",{className:"card-title",children:"Add Industry"}),s.jsxs("div",{className:"",children:[s.jsx("input",{type:"text",className:"form-control",placeholder:"Add Industry",required:!0,name:"addIndustry",onChange:S,onBlur:N,value:C.addIndustry}),m.addIndustry&&E.addIndustry&&s.jsx("p",{className:"text-danger",children:m.addIndustry})]}),s.jsxs("div",{className:"form-group mt-3 d-flex gap-2",children:[s.jsx("button",{type:"submit",className:"btn btn-primary btn-sm",children:"Submit"}),c&&s.jsx($,{}),s.jsx("button",{type:"reset",onClick:w,className:"btn btn-outline-danger btn-sm",children:"Reset"})]})]}),j&&s.jsx(G,{setShowModal:o,modalMsg:x})]})})};export{D as default};

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.