1import{r as c,j as t,a}from"./app-CQfBt9vv.js";import{D as b}from"./DataGrid-DIaImp98.js";import{D as f}from"./DashboardLayout-DI3iYG2w.js";/* empty css */import"./app-Db6YNbSk.js";import"./index-Chjiymov.js";import"./Flash-BuRVA9fq.js";import"./transition-6ofIaba-.js";import"./open-closed-uPENVjsD.js";import"./createLucideIcon-CStc99R3.js";import"./award-j_eBvE0q.js";import"./gift-ZeuBOg9X.js";import"./qr-code-DWP9nR2R.js";import"./users-CQC9RAWg.js";import"./building-2-BIMx69hh.js";import"./index-BJtLSIBu.js";import"./user-Dr-lEdiD.js";import"./log-out-rVJbfEIp.js";import"./dialog-CmFnChoS.js";import"./focus-management-DnLetxYS.js";import"./portal-He44Dz9R.js";import"./hidden-BFawPZ9i.js";import"./close-provider-COIuF1Lo.js";import"./x-C9-UvLqQ.js";import"./shield-BDLjNzhw.js";import"./house-xE1SSHuj.js";import"./chevron-down-CJfEazRz.js";import"./chevron-right-D8kYemcC.js";import"./menu--Z_hIDJi.js";function J({auth:o,auctions:n}){const[y,m]=c.useState([]),p=n.map((e,l)=>{var r,i,s,d;return{id:e.id,no:l+1,action:e,brand:(r=e.brand)==null?void 0:r.brand,user:(i=e.user)==null?void 0:i.name,category:(s=e.category)==null?void 0:s.name,thumbnail:(d=e.thumbnail_image)==null?void 0:d.name,name:e.name,manufacture:e.manufacture,price:e.price,description:e.description?"Yes":"No",status:e.status,period:e.period}}),h=[{name:"id",header:"Id",defaultWidth:42,defaultVisible:!1},{name:"no",header:"#",defaultWidth:42,defaultVisible:!0},{name:"action",header:"Action",defaultWidth:356,defaultVisible:!0,render:({value:e})=>t.jsxs("div",{className:"flex gap-1 py-2",children:[t.jsx(a,{as:"a",href:route("dashboard.admin.auction.edit",e.id),className:"rounded bg-sky-700 px-2 py-1 text-white shadow hover:bg-sky-200 hover:text-sky-700",children:"Edit"}),t.jsx(a,{as:"button",method:"delete",href:route("dashboard.admin.auction.destroy",e.id),className:"rounded bg-red-iims px-2 py-1 text-white shadow hover:bg-red-200 hover:text-red-iims",children:e.status==="Published"?"Archive":"Publish"}),t.jsx(a,{as:"a",href:route("dashboard.admin.auction.show",e.id),className:"rounded bg-sky-700 px-2 py-1 text-white shadow hover:bg-sky-200 hover:text-sky-700",children:"List Bidders"}),t.jsx(a,{as:"a",href:route("dashboard.admin.create-fake",e.id),className:"rounded bg-sky-700 px-2 py-1 text-white shadow hover:bg-sky-200 hover:text-sky-700",children:"Fake Bid"})]})},{name:"brand",sortable:!0,header:"Brand",defaultWidth:152},{name:"user",sortable:!0,header:"Upload By",defaultWidth:152},{name:"category",sortable:!0,header:"Category",defaultWidth:152},{name:"thumbnail",sortable:!0,header:"Thumbnail.",defaultWidth:152},{name:"name",sortable:!0,header:"Product Name",defaultWidth:152},{name:"manufacture",sortable:!0,header:"Manufacture",defaultWidth:152},{name:"price",sortable:!0,header:"Price",defaultWidth:152},{name:"description",sortable:!0,header:"Description",defaultWidth:152},{name:"status",sortable:!0,header:"Status",defaultWidth:152},{name:"period",sortable:!0,header:"Period",defaultWidth:152}],u=[{name:"brand",operator:"contains",type:"string",value:""},{name:"user",operator:"contains",type:"string",value:""},{name:"category",operator:"contains",type:"string",value:""},{name:"name",operator:"contains",type:"string",value:""},{name:"manufacture",operator:"contains",type:"string",value:""},{name:"price",operator:"contains",type:"string",value:""},{name:"description",operator:"contains",type:"string",value:""},{name:"status",operator:"contains",type:"string",value:""},{name:"period",operator:"contains",type:"string",value:""}];return t.jsx(f,{user:o.user,title:"List Auction Items",children:t.jsxs("div",{className:"grid grid-cols-12 gap-2",children:[t.jsx("div",{className:"col-span-12 flex justify-start gap-2 md:gap-4",children:t.jsx(a,{as:"a",href:route("dashboard.admin.auction.create"),className:"rounded bg-sky-700 px-4 py-2 text-white shadow hover:bg-slate-200 hover:text-sky-700",children:"Create New"})}),t.jsx("div",{className:"col-span-12",children:t.jsx(b,{idProperty:"id",columns:h,dataSource:p,pagination:!0,filterValue:u,rowHeight:120,maxRowHeight:400,handleSelected:e=>m(e)})})]})})}export{J 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.