Files
machartaa_admin_dist/dist/assets/index-6ea7cc3f.js
T

2 lines
9.1 KiB
JavaScript
Raw Normal View History

2026-07-26 21:18:50 +03:30
import{_ as J}from"./BasicMainCard-ad68421c.js";import{_ as G}from"./BasicModal.vue_vue_type_style_index_0_lang-7e7e37ca.js";import{_ as X}from"./BasicInput.vue_vue_type_style_index_0_lang-0813ef79.js";import{_ as K,u as Q}from"./useBaseTable-1503ffff.js";import{_ as Y}from"./button.vue_vue_type_style_index_0_lang-c90761af.js";import{I as P}from"./Icon-ecd42e7a.js";import{t as Z}from"./useDataTime-57fc1f09.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-a1cbdc04.js";import{g as A}from"./convert-2ad76038.js";import{_ as lt}from"./TextPreview.vue_vue_type_script_setup_true_lang-83aa5405.js";import{M as nt}from"./index-9c349efd.js";import{S as ct}from"./index-81112407.js";import{I as ut}from"./index-0f8757b7.js";import{T as E}from"./isSymbol-52713665.js";import{U as mt}from"./index-efbd5d64.js";import"./index-bf7cee9b.js";import"./index-6a6e2f69.js";import"./_plugin-vue_export-helper-a1c1a00b.js";import"./useState-7eb66b9e.js";import"./vnode-2778ccba.js";import"./useRefs-d6fb9168.js";import"./_flatRest-61b4c813.js";import"./index-c40db828.js";import"./Col-08ce96dd.js";import"./styleChecker-0c4cbd10.js";import"./isPlainObject-f510e32a.js";import"./usePrice-bc935b83.js";import"./updateLocale-16bb7b9a.js";import"./index-1a119724.js";import"./toArray-8d6c1cc7.js";import"./FormItemContext-8408af52.js";import"./pickAttrs-21cead41.js";import"./lodash-5e93f948.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-c33a79e6.js";import"./index-022013ee.js";import"./isNumeric-3f69e2aa.js";import"./index-be2c7609.js";import"./index-c8c86a9a.js";import"./index-9c0e62f2.js";import"./LeftOutlined-40fb7e14.js";import"./css-aae66f86.js";import"./DialogWrap-65e27abc.js";import"./index-039fd9c4.js";import"./textUtils-c37780ad.js";import"./index-a23af28e.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-2a43acca.js"),["assets/buildSupabaseQuery-2a43acca.js","assets/index-a1cbdc04.js","assets/index-12bcf37b.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={