PageSourceSearch

https://bankrot.gov.by/assets/extraordinary-create-edit-form-BguIHhiC.js

js bankrot.gov.by collected 2026-10-02 04:00:17 UTC 9,975 bytes, 1 lines download raw bytes

1import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{r as g,u as q,f as M}from"./createLucideIcon-CiWnlb16.js";import{d as z,e as x,lJ as L,lK as O,lL as B,l7 as G,lM as V,lN as h,lO as W,gE as I,L as Y,lP as w,lQ as J,bb as K,lR as Q,lS as U,lT as X,lU as H,lV as Z,lW as ee,lX as ae}from"./loginCallback-DUlVA6A0.js";import{a as A}from"./Select-YNaQnfBW.js";import{d as se,c as re}from"./addLoader-p8WLB-bt.js";import{B as D}from"./index-CQOuJFSK.js";import{T as te}from"./tableLoader-DmKfU8gk.js";/* empty css                 */import{u as le}from"./notistack.esm-h7EINNRQ.js";import{C as n}from"./creditorTypes-B9YPhGF4.js";import{E as i}from"./ErrorMessage-BzkwuuEb.js";import{P as ie}from"./Person-CoHVHeCH.js";import{W as ce,C as oe}from"./WarningAmber-B5dmzcjX.js";import{A as de}from"./AccountBalanceWallet-D4X2ZEnK.js";import"./config.release-CKeoGYk7.js";const b={anchorOrigin:{vertical:"top",horizontal:"right"}},_="w-full px-[15px] py-3 border rounded-lg text-sm text-[#334e68] bg-white outline-none transition-all duration-200 box-border",o=`${_} border-[#c0d1e3] focus:border-[#2aa3d0] focus:shadow-[0_0_0_3px_rgba(42,163,208,0.15)]`,d=`${_} border-[#e12d39] bg-[rgba(225,45,57,0.02)] focus:border-[#e12d39] focus:shadow-[0_0_0_3px_rgba(225,45,57,0.15)]`;function m(){return e.jsx("div",{className:"h-px bg-[#e0e9f1] my-6 w-full"})}function j({icon:p,children:v}){return e.jsxs("h3",{className:"flex items-center gap-2 text-[16px] font-semibold text-[var(--page-content-title)] m-0 mb-[15px] [&_svg]:fill-[#2aa3d0]",children:[p," ",v]})}function Te(){const[p,v]=g.useState(!1),N=q(),l=z(),r=x(L),$=x(O),C=x(B),y=x(G),{id:u}=M(),E=u==="create",{enqueueSnackbar:f}=le(),s=a=>J($,a),T=a=>{s(a)&&l(U(a))},c=(a,t)=>{T(a),l(X({field:a,value:t}))},P=a=>{a=a.replace(/[^0-9.,]/g,""),a=a.replace(/,/g,".");const t=a.split(".");return t.length>2&&(a=t[0]+"."+t.slice(1).join("")),/^\d*\.?\d*$/.test(a)?a.endsWith(".")||a===""||a==="."?a:parseFloat(a):a};g.useEffect(()=>{l(V()),E||(l(h(!0)),l(W({id:u})))},[]);const F=g.useMemo(()=>Object.entries(y).sort(([a],[t])=>Number(t)-Number(a)).map(([a,t])=>({label:Number(a)===I.Active?"Активные":"Завершенные",options:t.map(S=>({value:S.id,label:S.value}))})),[y]),R=()=>{const{ok:a,errors:t}=ee(r);return l(ae(t)),a||f("Заполните обязательные поля",{variant:"warning",...b}),a},k=async()=>{if(!R())return;const a=t=>{f("Сохранено успешно",{variant:"success",...b}),N(t)};l(h(!0));try{E?await l(H({model:r})).unwrap():await l(Z({id:u,model:r})).unwrap(),a("/hub/creditor-requirements")}catch{l(h(!1)),f("Ошибка сохранения",{variant:"error",...b})}};return e.jsxs(se,{type:"section",className:"grid grid-cols-[20%_80%] h-full",children:[e.jsx(re,{type:"div",toggle:p,children:e.jsx(D,{className:"page-filters-button",type:"button",value:"Назад",onClick:()=>N("/hub/creditor-requirements")})}),C?e.jsx(Y,{}):e.jsx("div",{className:"p-5 px-10 bg-[#f7fafd] min-h-[calc(100vh-60px)] flex",children:e.jsxs("div",{className:"bg-white border border-[#e0e9f1] rounded-xl p-10 w-full shadow-[0_4px_20px_rgba(0,0,0,0.04)] flex flex-col",children:[e.jsx("div",{className:"flex justify-between items-center mb-[30px] border-b-2 border-[#f7fafd]",children:e.jsx("h2",{className:"m-0 text-[22px] font-bold uppercase tracking-[0.5px] text-[var(--page-content-title)]",children:"Внеочередные требования"})}),C?e.jsx(te,{}):e.jsxs("form",{className:"flex flex-col gap-2.5",onSubmit:a=>a.preventDefault(),children:[e.jsxs("div",{className:"grid grid-cols-2 gap-5 items-end",children:[e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(A,{options:F,label:"Должник",value:r.debtor?.id?{value:r.debtor.id,label:r.debtor.value}:null,placeholder:"Выберите должника...",noOptionsMessage:"Ничего не найдено",onChange:a=>{T("debtor"),l(a?w({id:a.value,value:a.label}):w(null))}}),e.jsx(i,{message:s("debtor")})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(K,{label:"Дата поступления требований",dateFormat:"dd-MM-yyyy",selected:r.receiptClaimsDate?new Date(r.receiptClaimsDate):null,maxDate:new Date,onChange:a=>c("receiptClaimsDate",a?.toDateString())}),e.jsx(i,{message:s("receiptClaimsDate")})]})]}),e.jsx(m,{}),e.jsxs("div",{className:"grid grid-cols-[2fr_1.2fr] gap-5",children:[e.jsxs("div",{className:"flex flex-col gap-[15px]",children:[e.jsx(j,{icon:e.jsx(ie,{fontSize:"small"}),children:"Данные кредитора"}),e.jsx("div",{className:"flex flex-col gap-1.5",children:e.jsx(A,{options:Object.entries(n).map(([a,t])=>({value:Number(a),label:t.label})),label:"Тип кредитора",value:r.creditorType?{value:r.creditorType,label:n[r.creditorType]?.label}:null,isClearable:!1,isSearchable:!1,placeholder:"Выберите тип кредитора...",onChange:a=>l(Q(a?.value))})}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("label",{className:`uppercase text-[#2a86b3] ${s("creditorName")?"!text-[#e12d39]":""}`,children:n[r.creditorType]?.creditorNameField}),e.jsx("div",{className:"relative",children:e.jsx("input",{type:"text",className:s("creditorName")?d:o,placeholder:"Введите наименование...",value:r.creditorName||"",onChange:a=>c("creditorName",a.target.value)})}),e.jsx(i,{message:s("creditorName")}
1)]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("label",{className:`uppercase text-[#2a86b3] ${s("creditorCredentials")?"!text-[#e12d39]":""}`,children:n[r.creditorType]?.creditorCredentialsField}),e.jsx("div",{className:"relative",children:e.jsx("input",{type:"text",className:s("creditorCredentials")?d:o,placeholder:"Введите номер...",value:r.creditorCredentials||"",onChange:a=>c("creditorCredentials",a.target.value)})}),e.jsx(i,{message:s("creditorCredentials")})]})]}),e.jsx("div",{className:"flex items-start",children:e.jsxs("div",{className:"bg-[#fff9f0] border border-[rgba(242,153,74,0.3)] border-l-[4px] border-l-[#f2994a] rounded-lg p-5 flex gap-[15px] h-full box-border",children:[e.jsx("div",{className:"text-[#f2994a] mt-0.5 shrink-0",children:e.jsx(ce,{fontSize:"medium"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"m-0 mb-2 text-[#c47a28] text-sm font-bold",children:"Важная информация"}),e.jsxs("p",{className:"m-0 mb-2 text-[13px] leading-[1.5] text-[#334e68]",children:["Данные поля «",n[r.creditorType]?.creditorCredentialsField,"» являются"," ",e.jsx("strong",{children:"уникальным идентификатором кредитора"})," в системе."]}),e.jsx("p",{className:"m-0 text-[13px] leading-[1.5] text-[#334e68]",children:"Пожалуйста, внимательно проверяйте корректность вносимой информации во избежание дублирования записей."})]})]})})]}),e.jsx(m,{}),e.jsx(j,{icon:e.jsx(oe,{fontSize:"small"}),children:"Контактные данные"}),e.jsxs("div",{className:"grid grid-cols-3 gap-5",children:[e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("label",{className:`uppercase text-[#2a86b3] ${s("creditorAddress")?"!text-[#e12d39]":""}`,children:"Почтовый адрес"}),e.jsx("div",{className:"relative",children:e.jsx("input",{type:"text",className:s("creditorAddress")?d:o,placeholder:"Индекс, город, улица...",value:r.creditorAddress||"",onChange:a=>c("creditorAddress",a.target.value)})}),e.jsx(i,{message:s("creditorAddress")})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("label",{className:`uppercase text-[#2a86b3] ${s("creditorTel")?"!text-[#e12d39]":""}`,children:"Номера телефонов"}),e.jsx("div",{className:"relative",children:e.jsx("input",{type:"text",className:s("creditorTel")?d:o,placeholder:"+375...",value:r.creditorTel||"",onChange:a=>c("creditorTel",a.target.value)})}),e.jsx(i,{message:s("creditorTel")})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("label",{className:`uppercase text-[#2a86b3] ${s("email")?"!text-[#e12d39]":""}`,children:"Адрес электронной почты"}),e.jsx("div",{className:"relative",children:e.jsx("input",{type:"email",className:s("email")?d:o,placeholder:"[email protected]",value:r.email||"",onChange:a=>c("email",a.target.value)})}),e.jsx(i,{message:s("email")})]})]}),e.jsx(m,{}),e.jsx(j,{icon:e.jsx(de,{fontSize:"small"}),children:"Сумма и основания"}),e.jsxs("div",{className:"grid grid-cols-[1fr_2fr] gap-5",children:[e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("label",{className:`uppercase text-[#2a86b3] ${s("claimsAmount")?"!text-[#e12d39]":""}`,children:"Сумма требований (BYN)"}),e.jsx("div",{className:"relative",children:e.jsx("input",{type:"text",className:`${s("claimsAmount")?d:o} text-base font-semibold`,placeholder:"0.00",value:r.claimsAmount||"",onChange:a=>c("claimsAmount",a.target.value===""?null:P(a.target.value))})}),e.jsx(i,{message:s("claimsAmount")})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("label",{className:`uppercase text-[#2a86b3] ${s("claimsGrounds")?"!text-[#e12d39]":""}`,children:"Основания возникновения требований или обязательств"}),e.jsx("div",{className:"relative",children:e.jsx("textarea",{className:`${s("claimsGrounds")?d:o} resize-y font-[inherit]`,rows:3,placeholder:"Укажите номер договора, решения суда или иного доÐ
1ºÑƒÐ¼ÐµÐ½Ñ‚а...",value:r.claimsGrounds||"",onChange:a=>c("claimsGrounds",a.target.value)})}),e.jsx(i,{message:s("claimsGrounds")})]})]}),e.jsx(m,{}),e.jsx("div",{className:"grid justify-items-end",children:e.jsx(D,{value:"Сохранить требование",type:"button",className:"cr-button cr-button--form",onClick:k})})]})]})})]})}export{Te 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.