klioso
Version:
Multi-Service Provider Management System for WordPress and Web Development with Enhanced Scanner
2 lines (1 loc) • 2.3 kB
JavaScript
import{u as d,j as e,L as n}from"./app-DZ07njAd.js";import{A as o}from"./AuthenticatedLayout-BKOGad_C.js";import{F as l}from"./Form-DWGkysrX.js";import{B as c}from"./Button-D6Jcp-tA.js";import"./ApplicationLogo-GDc3W5ND.js";import"./transition-BCwV6od8.js";function v({plugin:s}){const{data:i,setData:r,put:u,errors:a}=d({name:s.name||"",description:s.description||"",is_paid:s.is_paid,purchase_url:s.purchase_url||"",install_source:s.install_source||""});return e.jsx(o,{header:e.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Edit Plugin"}),children:e.jsxs("div",{className:"flex gap-8 py-8",children:[e.jsxs("nav",{className:"w-64 bg-white rounded-lg shadow p-6 flex flex-col gap-4",children:[e.jsx(n,{href:"/clients",className:"text-blue-600 hover:underline font-medium",children:"Clients"}),e.jsx(n,{href:"/websites",className:"text-blue-600 hover:underline font-medium",children:"Websites"}),e.jsx(n,{href:"/plugins",className:"text-blue-600 hover:underline font-medium",children:"Plugins"}),e.jsx(n,{href:"/templates",className:"text-blue-600 hover:underline font-medium",children:"Templates"}),e.jsx(n,{href:"/hosting-providers",className:"text-blue-600 hover:underline font-medium",children:"Hosting Providers"})]}),e.jsx("div",{className:"flex-1",children:e.jsxs("div",{className:"bg-white rounded-lg shadow p-6 max-w-xl mx-auto",children:[e.jsxs(l,{onSubmit:t=>{t.preventDefault(),u(`/plugins/${s.id}`)},children:[e.jsx(l.Input,{label:"Name",value:i.name,onChange:t=>r("name",t.target.value),required:!0,error:a==null?void 0:a.name}),e.jsx(l.Textarea,{label:"Description",value:i.description,onChange:t=>r("description",t.target.value),error:a==null?void 0:a.description}),e.jsx(l.Checkbox,{label:"Paid",checked:i.is_paid,onChange:t=>r("is_paid",t.target.checked),error:a==null?void 0:a.is_paid}),e.jsx(l.Input,{label:"Purchase URL",value:i.purchase_url,onChange:t=>r("purchase_url",t.target.value),error:a==null?void 0:a.purchase_url}),e.jsx(l.Input,{label:"Install Source",value:i.install_source,onChange:t=>r("install_source",t.target.value),required:!0,error:a==null?void 0:a.install_source}),e.jsx(c,{type:"submit",children:"Update"})]}),a&&e.jsx("div",{className:"mt-4 text-red-500 text-sm",children:Object.values(a).join(", ")})]})})]})})}export{v as default};