2026-08-19 18:36:32 +03:30
|
|
|
import{_ as J}from"./BasicMainCard-c1077cbf.js";import{_ as G}from"./BasicModal.vue_vue_type_style_index_0_lang-0121d908.js";import{_ as X}from"./BasicInput.vue_vue_type_style_index_0_lang-83b58369.js";import{_ as K,u as Q}from"./useBaseTable-7b78293f.js";import{_ as Y}from"./button.vue_vue_type_style_index_0_lang-dcd86e7a.js";import{I as P}from"./Icon-8dedfa53.js";import{t as Z}from"./useDataTime-a337f5c6.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-b0561d74.js";import{g as A}from"./convert-2ad76038.js";import{_ as lt}from"./TextPreview.vue_vue_type_script_setup_true_lang-7903e918.js";import{M as nt}from"./index-12bdf78c.js";import{S as ct}from"./index-b7f1770d.js";import{I as ut}from"./index-d18c8f13.js";import{T as E}from"./isSymbol-a4291d99.js";import{U as mt}from"./index-2e6c7b29.js";import"./Grid-80c38bfa.js";import"./index-f9091817.js";import"./_plugin-vue_export-helper-130a5518.js";import"./shallowequal-4f931fa5.js";import"./index-2dc7fe57.js";import"./vnode-531f9d95.js";import"./index-5d725680.js";import"./useState-94528018.js";import"./useRefs-899ec8f3.js";import"./_flatRest-39f9ed6b.js";import"./isMobile-e2e89480.js";import"./omit-e6701bfc.js";import"./index-9a77c0e9.js";import"./Col-08664037.js";import"./styleChecker-d39a1d44.js";import"./isPlainObject-3a5eccde.js";import"./usePrice-bc935b83.js";import"./updateLocale-b730d578.js";import"./index-092c5981.js";import"./index-bc659f42.js";import"./useMemo-0162b583.js";import"./FormItemContext-5520cb52.js";import"./lodash-9a3882db.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-71825e72.js";import"./index-46f9dc77.js";import"./Badge-d2c862d8.js";import"./isNumeric-3f69e2aa.js";import"./index-7febe226.js";import"./index-93c22234.js";import"./index-b618fa76.js";import"./DialogWrap-9c2d8a9c.js";import"./pickAttrs-69dd58a4.js";import"./css-aae66f86.js";import"./index-482a46a3.js";import"./toArray-1ab9b01c.js";import"./SearchOutlined-ca6a4719.js";import"./index-840dd6b2.js";import"./textUtils-c37780ad.js";import"./index-5398304a.js";import"./index-ea044634.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-09e09955.js"),["assets/buildSupabaseQuery-09e09955.js","assets/index-b0561d74.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"},"عنÙ
|