1import{r as d,j as e}from"./react-s6noa07L.js";import{f as I}from"./filter-options-ziNk_2qf.js";import{d7 as T,cy as q,d as s,R as v,C as a,h as i,e as c,B as E,d8 as P}from"./index-CK6lfr5g.js";import{u as R,d as w}from"./router-CwT0-KLY.js";import{C as S}from"./index-8NSzCpy6.js";import"./i18n-CzrDXj-t.js";const z=()=>{const p=R(),{statusData:m,getStatus:x}=T(),{putRequest:y}=P(),{request:l,loading:o}=q(),[h,j]=d.useState([]),[n]=s.useForm(),{id:u}=w(),f=async r=>{const t=await l(`/tyutorreporttype/getbyidtyutorreporttype/${r}`);t&&n.setFieldsValue({...t,status_id:t.status_.id})},b=async()=>{const r=await l("/tyutorreporttype/getalltyutorreporttypeselect");r.length>0&&j(r.map(t=>({label:t.title,value:t.id})))},g=async r=>{await y(`/tyutorreporttype/updatetyutorreporttype/${u}`,r)&&p("/uz/admin/tyutorreporttype")};return d.useEffect(()=>{b(),x("uz"),f(u)},[]),e.jsx(S,{title:"EDIT TYUTOR REPORT TYPE",children:e.jsx(s,{onFinish:g,layout:"vertical",form:n,children:e.jsxs(v,{gutter:[10,10],children:[e.jsx(a,{xs:24,md:12,children:e.jsx(s.Item,{name:"parent_id",label:"Parent",rules:[{required:!0}],children:e.jsx(i,{loading:o,options:[{label:"Parent",value:0},...h],filterOption:I,showSearch:!0,placeholder:"Parent"})})}),e.jsx(a,{xs:24,md:12,children:e.jsx(s.Item,{name:"indicator",label:"Indicator",rules:[{required:!0}],children:e.jsx(i,{loading:o,placeholder:"Indicator",options:[{value:!0,label:"True"},{value:!1,label:"False"}]})})}),e.jsx(a,{xs:24,md:12,children:e.jsx(s.Item,{name:"title",label:"Title",rules:[{required:!0}],children:e.jsx(c,{placeholder:"Title"})})}),e.jsx(a,{xs:24,md:12,children:e.jsx(s.Item,{name:"description",label:"Description",rules:[{required:!0}],children:e.jsx(c,{placeholder:"Description"})})}),e.jsx(a,{xs:24,md:8,children:e.jsx(s.Item,{rules:[{required:!0}],label:"Status",name:"status_id",children:e.jsx(i,{style:{width:"100%"},options:m})})}),e.jsx(a,{span:24,children:e.jsx(E,{type:"primary",htmlType:"submit",children:"update"})})]})})})};export{z 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.