2026-08-18 16:19:11 +03:30
|
|
|
import{_ as J}from"./BasicMainCard-0ad7dc72.js";import{_ as G}from"./BasicModal.vue_vue_type_style_index_0_lang-4b1d1ef5.js";import{_ as X}from"./BasicInput.vue_vue_type_style_index_0_lang-f043e831.js";import{_ as K,u as Q}from"./useBaseTable-f8894810.js";import{_ as Y}from"./button.vue_vue_type_style_index_0_lang-bc3a48f6.js";import{I as P}from"./Icon-767d2866.js";import{t as Z}from"./useDataTime-4be5c5cf.js";import{_ as tt,G as S,d as et,g as b,o as D,c as $,b as n,w as f,a as o,e as at,H as ot,j as B,k as R,y as it,t as st,D as g,I as rt}from"./index-24cdd011.js";import{g as A}from"./convert-2ad76038.js";import{_ as lt}from"./TextPreview.vue_vue_type_script_setup_true_lang-630b180a.js";import{M as nt}from"./index-5eb1b262.js";import{S as ct}from"./index-d68d1b34.js";import{I as ut}from"./index-942dc2ed.js";import{T as E}from"./isSymbol-e7ce9b5a.js";import{U as mt}from"./index-5477dee9.js";import"./Grid-ce03674d.js";import"./index-bcc6b780.js";import"./_plugin-vue_export-helper-06d65383.js";import"./shallowequal-59945f6f.js";import"./index-4057f476.js";import"./vnode-562ae89f.js";import"./index-fec9c5bc.js";import"./useState-bb6abd58.js";import"./useRefs-2bd76cbf.js";import"./_flatRest-28f96ed6.js";import"./isMobile-e2e89480.js";import"./omit-08db5ef5.js";import"./index-ef7f0d13.js";import"./Col-8ec8a751.js";import"./styleChecker-aeb3f501.js";import"./isPlainObject-25081d35.js";import"./usePrice-bc935b83.js";import"./updateLocale-58c30845.js";import"./index-cbf3fafb.js";import"./index-bc659f42.js";import"./useMemo-5fb6706d.js";import"./FormItemContext-a07e1be1.js";import"./lodash-3126ec34.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-5acaa0f7.js";import"./index-3078e65c.js";import"./Badge-aa4916ac.js";import"./isNumeric-3f69e2aa.js";import"./index-38d9344c.js";import"./index-39621559.js";import"./index-093e137a.js";import"./DialogWrap-4e2453b1.js";import"./pickAttrs-64381c06.js";import"./css-aae66f86.js";import"./index-0ceac0d6.js";import"./toArray-e3c28da8.js";import"./SearchOutlined-3570b8ac.js";import"./index-559e3814.js";import"./textUtils-c37780ad.js";import"./index-3867b2dc.js";import"./index-9df579ce.js";const dt=[{title:"ردیف",dataIndex:"id",key:"id",filterable:!1,width:70,align:"center",customRender:i=>i.record.index+1},{title:"عنوان",dataIndex:"title",key:"title"},{title:"توضیحات",dataIndex:"description",key:"description",slot:"description"},{title:"تصویر",dataIndex:"src_img",key:"src_img",customRender:i=>i.record.src_img||"-"},{title:"زمان ایجاد",dataIndex:"created_at",key:"created_at",customRender:i=>Z(i.record.created_at)},{title:"عملیات",dataIndex:"action",key:"action",slot:"action",filterable:!1,align:"center"}];async function pt(i){const{data:p,error:c}=await S.from("images_book").insert([i]).select();if(c)throw c;return p}async function _t(i,p){const{data:c,error:m}=await S.from("images_book").update(p).eq("id",i).select();if(m)throw m;return c}async function ft(i){const{error:p}=await S.from("images_book").delete().eq("id",i);if(p)throw p}async function gt(i){const{TableEngineRequest:p}=await tt(()=>import("./buildSupabaseQuery-856791d4.js"),["assets/buildSupabaseQuery-856791d4.js","assets/index-24cdd011.js","assets/index-a54d32f7.css","assets/supabaseTableQuery-8ab5665d.js"]),c={...i};!c.sort&&!c.order&&(c.order="-id");const m=await p(c,"images_book");try{if(Array.isArray(m==null?void 0:m.rows)){const T=c.page||1,k=c.limit||200,w=(T-1)*k,I=m.rows.map((u,v)=>({id:u.id,title:u.title??null,description:u.description??null,src_img:u.src_img??null,created_at:u.created_at??"",index:w+v,...u}));return{...m,rows:I}}}catch(T){console.log("[getImagesBookTable] normalize error:",T)}return m}const vt={class:"flex justify-between items-center mb-4"},ht=o("h2",null,"تصاویر کتاب",-1),xt={class:"gap-2 flex justify-center"},yt=o("span",null,"حذف",-1),bt=o("span",null,"ویرایش",-1),kt={class:"space-y-4 relative"},wt={key:0,class:"absolute inset-0 bg-white/60 z-10 flex items-center justify-center"},It=o("div",{class:"mb-1 text-sm text-gray-600"},"عن�
|