PageSourceSearch

https://crm.ifnmu.edu.ua/assets/index-D-F85pne.js

js ifnmu.edu.ua collected 2026-10-02 22:59:54 UTC 8,329 bytes, 1 lines download raw bytes

1import{n as e,ay as T}from"./antdProComponents-6rzHkKcZ.js";import{a1 as b,a0 as I,a5 as z}from"./antdForm-ZZ85gsAg.js";import{r as v,L as E}from"./react-_5RlvHhi.js";import{D as B,f as J}from"./DocumentInfo-D-8-_Ys0.js";import{aV as Z,c2 as X,g as q,b as K,aR as w,cL as N,cM as tt,bZ as et,o as nt,cz as at,a_ as st,a$ as rt,aF as ct,d as ot,aG as dt,cu as lt,aY as S,bq as it,br as ut,bi as mt,bD as O,cN as A,bG as R,P as pt,aJ as ft,as as _t}from"./index-C8gtYebm.js";import{t as yt}from"./transformDate-B5gwoti9.js";import{S as ht,g as xt,f as jt}from"./StudyAgreementTable-BGAPSvOk.js";import{aG as l,cU as Ct}from"./antdBase-DlFOY6T8.js";import{c as Dt,b as g,u as It}from"./query-Bn7EN5Pb.js";import{O as St,r as gt}from"./antdIcons-DhY_pOHd.js";import{M as Ft}from"./antdModal-Dh46Xjql.js";import"./antdTable-Cz58L6xH.js";import"./pdfjs-Jc8nWIli.js";import"./jspdf-B1PPRTPs.js";import"./utils-D8nkOfAZ.js";import"./tiptap-IID5qgYO.js";import"./reactPdf-ChLvjV_L.js";import"./antdMaskInput-f6hZ1glU.js";import"./antdProTable-Ch7uEBlj.js";import"./chart-DuBnvqdM.js";import"./others-6CDmzJG5.js";import"./pdfLib-_sLH-ZSH.js";import"./x6-CTQrGuB4.js";const Tt=n=>n==null?void 0:n.map(({id:o,full_name:a,ep_display:s})=>({id:o,name:a,programme:`[${s}]`,personID:o})),bt=({generateStudentContract:n})=>{const[o,a]=v.useState(null);return e.jsxs(e.Fragment,{children:[e.jsx(Z,{label:"Студент",fetchFn:s=>X({search:s}),fetchKey:"students",transformData:Tt,onChange:s=>a(s),hasProgramme:!0}),e.jsx("div",{className:"fl fl-justify-content-end",children:e.jsx(l,{onClick:()=>n(o),type:"primary",children:"Згенерувати договір про навчання"})})]})},Et=async(n,o,a,s)=>await q.post(`/api/document_management/digital_document_signature_request/${n}/${o}/comment=${a}/`,s),Nt=async n=>await q.post(`/api/n1/contract/draft/${n}/submit/`),Ot=({id:n,contractId:o,data:a,closeModal:s})=>{const{t:d}=K(),[u]=b.useForm(),m=b.useWatch("comment",u),h=Dt(),j=f=>!m&&f===N?(nt("error",d("base.required_field_error")),Promise.reject()):Et(n,f,m||"Одобрено",a),{mutate:i}=g({mutationFn:j,onSuccess:()=>{h.invalidateQueries({queryKey:["student-contracts"]})}}),{mutate:x}=g({mutationFn:()=>Nt(o),onSuccess:()=>{h.invalidateQueries({queryKey:["student-contracts"]}),s()}}),D=[{name:"comment",label:d("base.comment"),type:"textarea",renderType:"vertical",rules:w}],p=e.jsxs("div",{className:"fl fl-justify-content-end fl-gap-15",children:[e.jsx(l,{type:"primary",onClick:x,children:d("student_contracts.resend")}),e.jsx(l,{className:"btn-reject",onClick:()=>i(N),children:d("student_contracts.deny")}),e.jsx(l,{className:"btn-accept",onClick:()=>i(tt),children:d("student_contracts.accept")})]});return e.jsx(et,{form:u,fields:D,formFooter:p})},At=()=>{const{uploaderComponent:n}=at({fileTypes:"*",isSingleFile:!0,className:"StudentContracts__uni-file"});return e.jsxs(e.Fragment,{children:[n,e.jsx("div",{className:"StudentContracts__send-file fl fl-justify-content-end",children:e.jsx(l,{type:"primary",children:"Завантажити"})})]})},U="statusChange",k="uploadDocument",M="documentInfo",Rt="generateEduContract",C="editDocumentInfo",P={open:!1,type:null,id:null,data:null,contractId:null},{Text:Ut}=Ct,ae=()=>{var F;const[n,o]=v.useState(P),{t:a}=K(),{filterIcon:s,filterDropdown:d,onFilterDropdownOpen:u}=st(),{setFilters:m,isFilterActive:h,setAllOrdering:j}=rt(),{sortedSearchParams:i,setSearchParamsToQuery:x}=ct();ot(a("student_contracts.title"));const D=n.type===C?1200:520,p=({type:t,id:r=null,data:c=null,contractId:y=null})=>o({open:!0,type:t,id:r,data:c,contractId:y}),f=()=>o(P),{data:_,isFetching:G}=dt({keys:["student-contracts"],fetcher:t=>J(t)}),{mutate:L}=g({mutationFn:xt,onSuccess:({id:t})=>p({type:C,contractId:t})}),{data:Q}=It({queryFn:()=>jt(n.contractId),queryKey:["eduContractData",n.contractId],enabled:n.contractId!==null&&n.open&&n.type===C}),$=[{title:a("student_contracts.full_name"),filterIcon:s,filterDropdown:d,filterDropdownProps:{onOpenChange:u},dataIndex:"person",render:t=>e.jsx("p",{className:"Claims__name text-nowrap",children:lt(t)})},{title:a("student_contracts.birthday"),dataIndex:["person","birthday"],render:t=>e.jsx("p",{className:"Claims__name",children:t})},{title:a("student_contracts.faculty"),filterIcon:s({fieldName:"faculty_name"}),filterDropdown:d({fieldName:"faculty_name"}),filterDropdownProps:{onOpenChange:u},dataIndex:["faculty_name"]},{title:e.jsx(S,{setFilters:m,title:a("student_contracts.course"),options:ut,filterKey:it,hideOrdering:!0}),dataIndex:["course"]},{title:e.jsx(S,{isFilterActive:h("grade"),setAllOrdering:j,setFilters:m,title:a("student_contracts.grade"),options:mt,filterKey:"grade",hideOrdering:!0}),dataIndex:["grade"]},{title:a("student_contracts.speciality"),filterIcon:s({fieldName:"speciality_name"}),filterDropdown:d({fieldName:"speciality_name"}),filterDropdownProps:{onOpenChange:u},dataIndex:["speciality_name"]},{title:a("student_contracts.document"),render:({original_file:t})=>e.jsx(E,{to:t==null?void 0:t.file,rel:"noreferrer",target:"_blank",children:(t==null?void 0:t.t
1itle)||a("dashboard.documents_placeholder")})},{title:"Вміст",render:({original_file:t})=>e.jsx(E,{to:t==null?void 0:t.short_content,rel:"noreferrer",target:"_blank",children:(t==null?void 0:t.title)||a("dashboard.documents_placeholder")})},{title:a("student_contracts.created_date"),render:t=>{var r,c;return((r=t==null?void 0:t.original_file)==null?void 0:r.created)&&e.jsx("p",{className:"Claims__name",children:I((c=t==null?void 0:t.original_file)==null?void 0:c.created).format(O)})}},{title:a("student_contracts.sign_date"),dataIndex:["signed_file","created"],render:t=>{var r,c;return((r=t==null?void 0:t.signed_file)==null?void 0:r.created)&&e.jsx("p",{className:"Claims__name",children:I((c=t==null?void 0:t.signed_file)==null?void 0:c.created).format(O)})}},{title:a("student_contracts.signed_document"),render:({signed_file:t})=>e.jsx("p",{className:"Claims__name",children:t?e.jsxs(e.Fragment,{children:[e.jsx("a",{href:t==null?void 0:t.file,target:"_blank",rel:"noreferrer",children:"Файл p7s"}),e.jsx(l,{type:"link",onClick:()=>{p({type:M,data:t})},children:"Iнфо"})]}):e.jsx("span",{children:"-"})})},{title:e.jsx(S,{isFilterActive:h(R),setAllOrdering:j,setFilters:t=>{x({...i,page:1}),m(t)},title:a("student_contracts.status"),options:A,filterKey:R,isLong:!0}),dataIndex:"status",render:t=>e.jsx("p",{className:"Claims__name",children:A[t]})},{title:a("student_contracts.change_status"),align:"center",render:(t,{id:r,original_file_id:c,author_id:y,person_id:W,contract_draft_id:Y})=>e.jsx(l,{type:"icon",icon:e.jsx(St,{}),onClick:()=>p({type:U,id:r,data:{original_file_id:c,author_id:y,person_id:W},contractId:Y}),disabled:(t==null?void 0:t.status)===0})},{title:a("student_contracts.signed_university_file_upload"),render:t=>{var r,c,y;return(r=t==null?void 0:t.second_signature_request)!=null&&r.signed_file?e.jsx("a",{href:(y=(c=t==null?void 0:t.second_signature_request)==null?void 0:c.signed_file)==null?void 0:y.file,target:"_blank",rel:"noreferrer",children:"Файл p7s"}):e.jsx(l,{type:"link",icon:e.jsx(gt,{}),onClick:()=>{p({type:k,id:t==null?void 0:t.id})},disabled:(t==null?void 0:t.status)!==2})}}],H=[{type:U,component:e.jsx(Ot,{id:n.id,contractId:n.contractId,data:n.data,closeModal:f})},{type:k,component:e.jsx(At,{id:n.id,closeModal:f})},{type:M,component:e.jsx(B,{data:n.data})},{type:Rt,component:e.jsx(bt,{generateStudentContract:L})},{type:C,component:e.jsx(ht,{data:Q,contractId:n.contractId})}],V=t=>{if(!t)return delete i.created_after,x(i);x({created_after:I(t).format(_t)})};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fl fl-justify-content-between",children:e.jsxs(T,{vertical:!0,children:[e.jsx(pt,{text:a("student_contracts.title")}),e.jsxs(T,{align:"center",gap:10,children:[e.jsx(Ut,{children:"Запити на підписання документів створенні після: "}),e.jsx(z,{onChange:V,value:yt(i.created_after)})]})]})}),e.jsx(ft,{rowKey:"id",loading:G,dataSource:_==null?void 0:_.results,count:_==null?void 0:_.count,columns:$,className:"StudentContracts"}),e.jsx(Ft,{open:n.open,width:D,onCancel:()=>f(),footer:[],destroyOnHidden:!0,children:(F=H.find(t=>t.type===n.type))==null?void 0:F.component})]})};export{ae 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.