Files
machartaa_admin_dist/dist/assets/index-9c581214.js
T

2 lines
15 KiB
JavaScript
Raw Normal View History

2026-10-10 10:47:47 +03:30
import{_ as we}from"./BasicModal.vue_vue_type_style_index_0_lang-3186fd13.js";import{_ as ye,u as xe}from"./useBaseTable-e684a9eb.js";import{_ as ke}from"./BasicMainCard-f15cc82d.js";import{_ as Te}from"./BasicInput.vue_vue_type_style_index_0_lang-8f3a56f0.js";import{_ as Ie}from"./button.vue_vue_type_style_index_0_lang-de1581fe.js";import{I as A}from"./Icon-623de3ea.js";import{t as Ue}from"./useDataTime-284d8334.js";import{_ as Re,I as ne,J as ie,K as Ce,O as oe,d as Be,i as f,x as Ae,o as x,c as k,e as s,w as d,b as n,f as N,L as Se,l as h,t as Le,n as S,C as Y,H as _,M as Me}from"./index-185c08ed.js";import{g as L}from"./convert-2ad76038.js";import{n as Q}from"./textUtils-c37780ad.js";import{g as Z}from"./index-58ff633a.js";import{M as Ee}from"./index-2573091c.js";import{S as $e}from"./index-5a721f2f.js";import{C as je}from"./index-33777d70.js";import{I as De}from"./index-a29d0cc7.js";import{T as F}from"./isSymbol-18d6b370.js";import{U as ee}from"./index-c950ff98.js";import"./updateLocale-d0f4ef4d.js";import"./index-f463cb03.js";import"./_plugin-vue_export-helper-e26fbd9a.js";import"./shallowequal-6622fb79.js";import"./vnode-8a371720.js";import"./useState-50bb8c1f.js";import"./useMemo-4f3c1eb4.js";import"./FormItemContext-2d3e7341.js";import"./omit-d93eaa18.js";import"./lodash-0633e973.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-e9f1c563.js";import"./index-9383b001.js";import"./Badge-51142f0a.js";import"./isNumeric-3f69e2aa.js";import"./index-9e9f857b.js";import"./index-a2809ce1.js";import"./index-0ee37254.js";import"./toArray-da31f78e.js";import"./SearchOutlined-d9b8def2.js";import"./pickAttrs-e062aa3e.js";import"./index-1f485cc0.js";import"./isMobile-e2e89480.js";import"./index-77ae4c49.js";import"./Grid-337aeaf9.js";import"./index-c3741845.js";import"./useRefs-b56c6fdc.js";import"./_flatRest-947e7901.js";import"./index-229a6022.js";import"./Col-2d184441.js";import"./styleChecker-7bb1c6f5.js";import"./isPlainObject-5638f45d.js";import"./usePrice-bc935b83.js";import"./DialogWrap-9863a7c0.js";import"./index-975de3f6.js";import"./css-aae66f86.js";import"./index-82269ca5.js";import"./index-b2f5f66c.js";const te=[{title:"ردیف",dataIndex:"id",key:"id",filterable:!1,width:70,align:"center",customRender:o=>o.record.index+1},{title:"عنوان",dataIndex:"title",key:"title"},{title:"عنوان ویدیو",dataIndex:"video_title",key:"video_title",customRender:o=>o.record.video_title||"-"},{title:"اسلایدر خانه",dataIndex:"show_on_home",key:"show_on_home",align:"center",width:120,customRender:o=>o.record.show_on_home?"بله":"خیر"},{title:"زمان ایجاد",dataIndex:"created_at",key:"created_at",customRender:o=>Ue(o.record.created_at)},{title:"عملیات",dataIndex:"action",key:"action",slot:"action",filterable:!1,align:"center"}];async function Oe(o){const m=await ne("announcements",o);return Array.isArray(m)?m:[m]}async function ae(o,m){const u=await ie("announcements",o,{...m,updated_at:new Date().toISOString()});return Array.isArray(u)?u:[u]}async function ze(o){await Ce("announcements",o)}async function Ge(o){const{TableEngineRequest:m}=await Re(()=>import("./buildSupabaseQuery-32cb26f7.js"),["assets/buildSupabaseQuery-32cb26f7.js","assets/index-185c08ed.js","assets/index-0643191e.css"]),u={...o};!u.sort&&!u.order&&(u.order="-id");const c=await m(u,"announcements");try{if(Array.isArray(c==null?void 0:c.rows)){const w=u.page||1,O=u.limit||20,z=(w-1)*O,G=c.rows.map((v,H)=>({...v,title:v.title??"",description:v.description??"",video_title:v.video_title??"",thumbnail:v.thumbnail??null,banner:v.banner??null,aparat_embed_code:v.aparat_embed_code??"",show_on_home:v.show_on_home!==!1,index:z+H}));return{...c,rows:G}}}catch(w){console.error("[getAnnouncementsTable]",w)}return c}const le="home_greeting_subtitle",V="امروز هم یه ماجراجویی تازه داریم!";async function He(o,m){var c,w;const u=await oe("configs",{filters:[{field:"key",op:"eq",value:o}],limit:1,page:1});if((w=(c=u.rows)==null?void 0:c[0])!=null&&w.id){await ie("configs",u.rows[0].id,{value:m});return}awa