PageSourceSearch

https://www.fenoxbonus.ru/_next/static/chunks/pages/quiz-management-7cff636b4df275df.js

js fenoxbonus.ru collected 2026-10-08 09:20:11 UTC 4,590 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[759],{31063:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/quiz-management",function(){return n(94742)}])},58826:function(e,t,n){"use strict";var s=n(85893);t.Z=()=>(0,s.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M19 19L14.65 14.65M17 9C17 13.4183 13.4183 17 9 17C4.58172 17 1 13.4183 1 9C1 4.58172 4.58172 1 9 1C13.4183 1 17 4.58172 17 9Z",stroke:"#1E2023",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})},21321:function(e,t,n){"use strict";var s=n(85893),i=n(87357),a=n(98456);t.Z=e=>{let{color:t="#E51C2F",size:n=40}=e;return(0,s.jsx)(i.Z,{sx:{display:"flex",width:"100%",height:"100%",alignItems:"center",justifyContent:"center"},children:(0,s.jsx)(a.Z,{sx:{color:t},size:n})})}},24320:function(e,t,n){"use strict";n.d(t,{Z:function(){return useDebounce}});var s=n(67294);function useDebounce(e,t){let[n,i]=(0,s.useState)(e);return(0,s.useEffect)(()=>{let n=setTimeout(()=>{i(e)},t);return()=>{clearTimeout(n)}},[e,t]),n}},94742:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return k}});var s=n(85893),i=n(69481),a=n(67294),r=n(96540),u=n(87109),l=n(58826),d=n(50594),c=n(50135),o=n(24320),h=n(28119),x=n(26303),m=n(41664),g=n.n(m),j=n(5917),p=n(21321),f=n(70385);let C={DRAFT:"Черновик",PUBLISHED:"Опубликованный"};var z=n(93946),w=n(79369),b=n(38333),Z=n(23599),cards_QuizAdminCard=e=>{let{quiz:t,onDelete:n,onEdit:i,onUpdateStatus:r}=e,[u,l]=(0,a.useState)(null),handleMenuClose=()=>{l(null)};return(0,s.jsxs)("div",{className:"bg-white shadow-card p-6 rounded-2xl",children:[(0,s.jsxs)("div",{className:"mb-2.5 flex items-center justify-between",children:[(0,s.jsx)("div",{className:"px-2 w-fit rounded-md border border-solid ".concat(t.status===f.QuizStatus.PUBLISHED?"border-green text-green":"border-grey4 text-grey4"),children:C[t.status]}),(0,s.jsx)(z.Z,{onClick:e=>{l(e.currentTarget)},children:(0,s.jsx)(w.Z,{})}
1),(0,s.jsxs)(b.Z,{anchorEl:u,open:!!u,onClose:handleMenuClose,children:[(0,s.jsx)(Z.Z,{onClick:()=>{handleMenuClose(),i()},children:"Редактировать"}),(0,s.jsx)(Z.Z,{onClick:()=>{handleMenuClose(),r(t.status===f.QuizStatus.PUBLISHED?f.QuizStatus.DRAFT:f.QuizStatus.PUBLISHED)},children:t.status===f.QuizStatus.PUBLISHED?"Добавить в черновики":"Опубликовать"}),(0,s.jsx)(Z.Z,{onClick:()=>{handleMenuClose(),n()},children:"Удалить"})]})]}),(0,s.jsx)(g(),{className:"text-grey4 text-h4 font-bold no-underline hover:text-red",href:"/quiz-management/".concat(t.id),children:t.name})]})},v=n(11163);let QuizManagementPage=()=>{let e=(0,v.useRouter)(),[t,n]=(0,a.useState)("");(0,o.Z)(t,700);let{data:h=[],isLoading:x,isFetched:m,refetch:f}=j.h.quiz.getAll.useQuery(),{mutate:C}=j.h.quiz.updateStatus.useMutation({onSuccess:async()=>{await f()}}),{mutate:z}=j.h.quiz.delete.useMutation({onSuccess:async()=>{await f()}}),handleQuizEditClick=async t=>{await e.push("/quiz-management/"+t+"/edit")},handleQuizUpdateClick=(e,t)=>{C({id:e,status:t})},handleQuizDeleteClick=e=>{z(e)};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.Z,{title:"Тестирования"}),(0,s.jsxs)("div",{className:"p-5",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,s.jsx)(c.Z,{value:t,onChange:e=>n(e.target.value),className:"bg-white w-[320px]",placeholder:"Поиск",InputProps:{className:"text-subtitle1 border-0 h-12",startAdornment:(0,s.jsx)(u.Z,{position:"start",children:(0,s.jsx)(l.Z,{})}),endAdornment:t&&(0,s.jsx)(u.Z,{position:"end",onClick:()=>n(""),className:"cursor-pointer",children:(0,s.jsx)(d.Z,{})})}}),(0,s.jsxs)(g(),{href:"/quiz-management/new/edit",className:"bg-grey4 text-white border-none hover:bg-red rounded-lg h-12 px-5 py-4 no-underline flex items-center justify-center uppercase font-bold text-button",children:[(0,s.jsx)(r.Z,{className:"mr-2"}),"Создать Тест"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-[repeat(auto-fit,minmax(540px,max-content))] gap-5",children:[x&&(0,s.jsx)(p.Z,{}),m&&h.map(e=>(0,s.jsx)(cards_QuizAdminCard,{quiz:e,onEdit:()=>handleQuizEditClick(e.id),onUpdateStatus:t=>handleQuizUpdateClick(e.id,t),onDelete:()=>handleQuizDeleteClick(e.id)},e.id))]})]})]})};QuizManagementPage.getLayout=e=>(0,s.jsx)(h.Z,{children:e}),QuizManagementPage.auth={roles:[x.vX.ADMIN]};var k=QuizManagementPage}},function(e){e.O(0,[4241,2346,3647,135,385,2130,2844,9774,2888,179],function(){return e(e.s=31063)}),_N_E=e.O()}]);

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.