PageSourceSearch

https://ramafm.com/build/assets/cabang-CtzIaWXO.js

js ramafm.com collected 2026-10-08 23:07:40 UTC 3,315 bytes, 1 lines download raw bytes

1import{b as a,r as e,j as s,d as r}from"./app-CYNscnFw.js";import{r as l}from"./index-REljOqL0.js";import{A as n}from"./AdminLayout-C-LvtZfW.js";import"./index-DB8x9uVZ.js";import"./music-2-bjHzdRfv.js";const d=["No","Cabang","Alamat","Deskripsi","Logo","Aksi"],c=({cabangs:n})=>{const{flash:c}=a().props,[o,i]=e.useState(n);return s.jsxs("div",{className:"mt-12 mb-8 flex flex-col gap-6 w-full",children:[s.jsx("div",{className:"flex justify-end mb-4",children:s.jsx(l.Button,{style:{backgroundColor:"#F9ED0D",color:"#222",fontWeight:"bold"},className:"shadow-none normal-case",onClick:()=>window.location.href="/dashboard/cabang/tambah",children:"+ Tambah Cabang"})}),c.success&&s.jsxs("div",{className:"mb-4 bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded-lg",children:["✅ ",c.success]}),c.error&&s.jsxs("div",{className:"mb-4 bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded-lg",children:["❌ ",c.error]}),s.jsxs(l.Card,{children:[s.jsx(l.CardHeader,{variant:"gradient",color:"gray",className:"mb-8 p-6",children:s.jsx(l.Typography,{variant:"h6",color:"black",children:"Kelola Cabang"})}),s.jsx(l.CardBody,{className:"overflow-x-scroll px-0 pt-0 pb-2",children:s.jsxs("table",{className:"w-full min-w-[900px] table-auto",children:[s.jsx("thead",{children:s.jsx("tr",{children:d.map(a=>s.jsx("th",{className:"border-b border-blue-gray-50 py-3 px-5 text-left",children:s.jsx(l.Typography,{variant:"small",className:"text-[11px] font-bold uppercase text-blue-gray-400",children:a})},a))})}),s.jsxs("tbody",{children:[0===o.length&&s.jsx("tr",{children:s.jsx("td",{colSpan:d.length,className:"text-center py-6 text-gray-400",children:"Tidak ada data cabang."})}),o.map((a,e)=>{const n="py-3 px-5 "+(a.id_cabang===o[o.length-1]?.id_cabang?"":"border-b border-blue-gray-50");return s.jsxs("tr",{children:[s.jsx("td",{className:n,children:s.jsx(l.Typography,{variant:"small",color:"blue-gray",className:"font-semibold",children:e+1})}),s.jsx("td",{className:n,children:s.jsx(l.Typography,{variant:"small",color:"blue-gray",className:"font-semibold",children:a.nama_cabang})}),s.jsx("td",{className:n,children:s.jsx(l.Typography,{variant:"small",color:"blue-gray",className:"font-normal",children:a.alamat})}),s.jsx("td",{className:n,children:s.jsx(l.Typography,{variant:"small",color:"blue-gray",className:"font-normal",children:a.deskripsi})}),s.jsx("td",{className:n,children:a.logo?s.jsx(l.Avatar,{src:a.logo,alt:a.nama_cabang,size:"sm",variant:"rounded"}):s.jsx("span",{className:"text-gray-400",children:"-"})}),s.jsx("td",{className:n,children:s.jsxs("div",{className:"flex gap-2",children:[s.jsx(l.Button,{size:"sm",className:"rounded bg-green-600",onClick:()=>window.location.href=`/dashboard/cabang/${a.id_cabang}/detailCabang`,children:"Detail"}),s.jsx(l.Button,{size:"sm",className:"rounded bg-blue-600",onClick:()=>window.location.href=`/dashboard/cabang/edit/${a.id_cabang}`,children:"Edit"}),s.jsx(l.Button,{size:"sm",className:"rounded bg-red-600",onClick:()=>{return e=a.id_cabang,void(window.confirm("Yakin ingin menghapus cabang ini?")&&r.delete(route("cabang.destroy",e),{onSuccess:()=>{i(a=>a.filter(a=>a.id_cabang!==e))}}));var e},children:"Hapus"})]})})]},a.id_cabang)})]})]})})]})]})};c.layout=a=>s.jsx(n,{menu:"cabang",children:a});export{c 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.