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

2 lines
15 KiB
JavaScript
Raw Normal View History

2026-10-10 13:28:46 +03:30
import{_ as we}from"./BasicModal.vue_vue_type_style_index_0_lang-c3b69d02.js";import{_ as ye,u as xe}from"./useBaseTable-e35ecaa9.js";import{_ as ke}from"./BasicMainCard-4c879cc2.js";import{_ as Te}from"./BasicInput.vue_vue_type_style_index_0_lang-9a0053be.js";import{_ as Ie}from"./button.vue_vue_type_style_index_0_lang-b32e1136.js";import{I as A}from"./Icon-85823aa3.js";import{t as Ue}from"./useDataTime-c7be2668.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-90ac1a44.js";import{g as L}from"./convert-2ad76038.js";import{n as Q}from"./textUtils-c37780ad.js";import{g as Z}from"./index-ca449155.js";import{M as Ee}from"./index-a413fea1.js";import{S as $e}from"./index-93d9312f.js";import{C as je}from"./index-788f312f.js";import{I as De}from"./index-027c2128.js";import{T as F}from"./isSymbol-9094e8b7.js";import{U as ee}from"./index-e50485ad.js";import"./updateLocale-cec40f3d.js";import"./index-cfa536c5.js";import"./_plugin-vue_export-helper-8ee86600.js";import"./shallowequal-36516cfd.js";import"./vnode-b0455438.js";import"./useState-64f2823f.js";import"./useMemo-9928f29b.js";import"./FormItemContext-64f846db.js";import"./omit-84d71e15.js";import"./lodash-07b825be.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-fb5041dc.js";import"./index-95b42b3e.js";import"./Badge-54a9cc4e.js";import"./isNumeric-3f69e2aa.js";import"./index-5f5223b4.js";import"./index-c0eeee91.js";import"./index-a2503c07.js";import"./toArray-3936b2d5.js";import"./SearchOutlined-0eaaa97a.js";import"./pickAttrs-ba13e92c.js";import"./index-9869a66e.js";import"./isMobile-e2e89480.js";import"./index-bb804fdd.js";import"./Grid-839ef6d1.js";import"./index-4d938e91.js";import"./useRefs-2a883b79.js";import"./_flatRest-f2577aae.js";import"./index-109c99be.js";import"./Col-fddaa6b7.js";import"./styleChecker-1445806f.js";import"./isPlainObject-aab367ce.js";import"./usePrice-bc935b83.js";import"./DialogWrap-6616a498.js";import"./index-90f5ddad.js";import"./css-aae66f86.js";import"./index-03d99677.js";import"./index-ebd9fdbb.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-c046d1a6.js"),["assets/buildSupabaseQuery-c046d1a6.js","assets/index-90ac1a44.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