Files
machartaa_admin_dist/dist/assets/index-ba560907.js
T

2 lines
9.1 KiB
JavaScript
Raw Normal View History

2026-07-26 16:24:36 +03:30
import{_ as J}from"./BasicMainCard-1361ed38.js";import{_ as G}from"./BasicModal.vue_vue_type_style_index_0_lang-acac591d.js";import{_ as X}from"./BasicInput.vue_vue_type_style_index_0_lang-6c1f4129.js";import{_ as K,u as Q}from"./useBaseTable-c2761680.js";import{_ as Y}from"./button.vue_vue_type_style_index_0_lang-c37c204f.js";import{I as P}from"./Icon-6b61a044.js";import{t as Z}from"./useDataTime-f3f5ea50.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-4dccb174.js";import{g as A}from"./convert-2ad76038.js";import{_ as lt}from"./TextPreview.vue_vue_type_script_setup_true_lang-243a4d0d.js";import{M as nt}from"./index-a34bba22.js";import{S as ct}from"./index-f08752bf.js";import{I as ut}from"./index-4762b7d8.js";import{T as E}from"./isSymbol-80c521a5.js";import{U as mt}from"./index-bd458d30.js";import"./index-6f4a8a6b.js";import"./index-7a876d00.js";import"./_plugin-vue_export-helper-fc650ede.js";import"./useState-7760581d.js";import"./vnode-8e0d49aa.js";import"./useRefs-b5c660b2.js";import"./_flatRest-00780a2d.js";import"./index-7ce2783e.js";import"./Col-c87d3a9d.js";import"./styleChecker-133e2b1a.js";import"./isPlainObject-819f93b0.js";import"./usePrice-bc935b83.js";import"./updateLocale-72f02bbd.js";import"./index-c7f692d2.js";import"./toArray-8c6d8405.js";import"./FormItemContext-d26e27b7.js";import"./pickAttrs-13d22210.js";import"./lodash-0f8911c3.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-c92640b4.js";import"./index-895cd0d7.js";import"./isNumeric-3f69e2aa.js";import"./index-00d83bfc.js";import"./index-8f783c3c.js";import"./index-ce6d92ba.js";import"./LeftOutlined-2d8ca514.js";import"./css-aae66f86.js";import"./DialogWrap-715ad625.js";import"./index-6a54d8cb.js";import"./textUtils-c37780ad.js";import"./index-495b789b.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-6c90042d.js"),["assets/buildSupabaseQuery-6c90042d.js","assets/index-4dccb174.js","assets/index-338b63e2.css","assets/supabaseTableQuery-95762ff3.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"},"عنوان",-1),Bt=o("div",{class:"mb-1 text-sm text-gray-600"},"توضیحات",-1),Tt=o("div",{class:"mb-1 text-sm text-gray-600"},"آپلود تصویر",-1),Ct={key:0},Mt=o("div",null,"آپلود تصویر",-1),Ut={key:0,class:"mt-1"},Dt={class:"h-2 rounded bg-gray-200 overflow-hidden"},$t={