PageSourceSearch

https://smartedu.ai/build/assets/Index-BYVWeuhx.js

js smartedu.ai collected 2026-10-05 15:06:47 UTC 1,641 bytes, 1 lines download raw bytes

1import{i as j,t as C}from"./react-C6JdJxIB.js";import{a as f,i as D}from"./index.esm-DxXUb9DD.js";import{t as E}from"./jsx-runtime-CGXBp6bb.js";import{t as b}from"./useLanguages-D4QGBoF3.js";import{t as k}from"./CentralLayout-B7lm4y_K.js";import g from"./CreateForm-_FheFAc7.js";import L from"./DataTable-IrhSKl-l.js";import q from"./DeleteModal-C4pwAZev.js";var t=j(C(),1),s=E();function B({features:x,tenantTypes:d=[]}){const{languages:l}=b(),[O,m]=(0,t.useState)(!1),[y,u]=(0,t.useState)(!1),[F,i]=(0,t.useState)(!1),[r,n]=(0,t.useState)(null),[S,c]=(0,t.useState)(!1),a=l?.length>0?l:[{code:"en",name:"English",direction:"ltr"}],p=f({name:a.reduce((e,o)=>(e[o.code]="",e),{}),key:"",tenant_type_ids:[],description:"",is_active:!0}),_=f({name:a.reduce((e,o)=>(e[o.code]="",e),{}),key:"",tenant_type_ids:[],description:"",is_active:!0}),v=e=>{n(e),_.setData({name:buildNameState(e.name_translations??{}),key:e.key,tenant_type_ids:e.tenant_type_ids??[],description:e.description??"",is_active:!!e.is_active}),u(!0)},h=()=>{c(!0),D.delete(route("admin.features.destroy",r.id),{onFinish:()=>{c(!1),i(!1),n(null)}})};return(0,s.jsxs)(k,{section:"admin",title:"Features",currentRoute:"admin.features.index",children:[(0,s.jsx)(L,{features:x,onAdd:()=>m(!0),onEdit:v,onDelete:e=>{n(e),i(!0)}}),(0,s.jsx)(g,{isOpen:O,onClose:()=>{m(!1),p.reset()},form:p,languages:a,tenantTypes:d}),(0,s.jsx)(g,{isOpen:y,onClose:()=>{u(!1),n(null)},form:_,languages:a,tenantTypes:d,title:`Edit — ${r?.name??"Feature"}`,submitLabel:"Save Changes"}),(0,s.jsx)(q,{isOpen:F,onClose:()=>i(!1),onConfirm:h,processing:S,itemName:r?.name??""})]})}export{B 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.