PageSourceSearch

https://tstu.uz/assets/edit-BYX_wM8F.js

js tstu.uz collected 2026-09-24 19:45:56 UTC 2,975 bytes, 1 lines download raw bytes

1import{r,j as e}from"./react-s6noa07L.js";import{cy as L,j as T,d7 as Y,d as a,R as D,C as n,h as l,B as N,a2 as P,d8 as V}from"./index-CK6lfr5g.js";import{a as z,s as k}from"./mock-BMUYvaM6.js";import{f as v}from"./filter-options-ziNk_2qf.js";import{u as M,d as U}from"./router-CwT0-KLY.js";import{C as O}from"./index-8NSzCpy6.js";import{T as J}from"./index-CUp_myt7.js";import"./i18n-CzrDXj-t.js";const u=P.get("role")==="admin",re=()=>{const{putRequest:b}=V(),{request:x}=L(),w=M(),{old_year:C}=T(),{id:g}=U(),{statusData:I,getStatus:R}=Y(),[d,j]=r.useState(!0),[y,f]=r.useState(null),[o,A]=r.useState(C),[$,q]=r.useState([]),[E,S]=r.useState([]),[c]=a.useForm(),[m,_]=r.useState(null),F=async s=>{await b(`/questionnaireevaluations/updateuestionnaireevaluations/${g}`,s)&&w(`/uz/admin/questionnaire-evaluations?old_year=${o}&semestr=${m}`)},B=async s=>{const t=await x(`/questionnaireevaluations/getbyiduestionnaireevaluations${u?"":"questionnaireresult"}/${s}`);t&&(c.setFieldsValue({group_id:t.group_?.id,lesson_id:t.lesson_?.id,status_id:t?.status_?.id,semestr:t.lesson_?.semestr}),_(t.lesson_?.semestr))};return r.useEffect(()=>{const s=[`/questionnairegroups/getalluestionnairegroups${u?"select":"questionnaireresult"}`,`/questionnairelessons/getalluestionnairelessons${u?"select":"questionnaireresult"}`];async function t(){try{j(!0),f(null);const p=s.map(i=>x(i,{params:{old_year:o,new_year:Number(o)+1,semestr:m}})),[G,H]=await Promise.all(p);S(G.map(({title:i,id:h})=>({label:i,value:h}))),q(H.map(({lesson_:i,id:h})=>({label:i,value:h})))}catch(p){f(p.message||"Unknown error")}finally{j(!1)}}t()},[o,m]),r.useEffect(()=>{B(g),u&&R("uz")},[]),y?e.jsx(O,{children:e.jsx(J,{color:"red",children:y})}):e.jsx(O,{title:"SO‘ROVNOMA BAHOLARI TAHRIRLASH",children:e.jsx(a,{onFinish:F,layout:"vertical",form:c,children:e.jsxs(D,{gutter:[10,10],children:[e.jsx(n,{xs:24,md:12,children:e.jsx(a.Item,{label:"O‘quv yili",rules:[{required:!0}],children:e.jsx(l,{loading:d,value:o,placeholder:"O'quv yilini tanlang",onChange:s=>A(s),options:z})})}),e.jsx(n,{xs:24,md:12,children:e.jsx(a.Item,{name:"semestr",label:"Semestr",rules:[{required:!0}],children:e.jsx(l,{options:k,placeholder:"Semestrni tanlang",onChange:s=>{_(s),c.setFieldsValue({group_id:void 0,lesson_id:void 0}),S([]),q([])}})})}),e.jsx(n,{xs:24,md:12,children:e.jsx(a.Item,{loading:d,name:"group_id",label:"Guruh",rules:[{required:!0}],children:e.jsx(l,{placeholder:"Guruhni tanlang",options:E,showSearch:!0,filterOption:v})})}),e.jsx(n,{xs:24,md:12,children:e.jsx(a.Item,{loading:d,name:"lesson_id",label:"Dars",rules:[{required:!0}],children:e.jsx(l,{placeholder:"Darsni tanlang",options:$,showSearch:!0,filterOption:v})})}),u&&e.jsx(n,{xs:24,md:12,children:e.jsx(a.Item,{rules:[{required:!0}],label:"Holat",name:"status_id",children:e.jsx(l,{style:{width:"100%"},options:I})})}),e.jsx(n,{span:24,children:e.jsx(N,{type:"primary",htmlType:"submit",children:"Yangilash"})})]})})})};export{re 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.