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

2 lines
15 KiB
JavaScript
Raw Normal View History

2026-10-19 15:32:02 +03:30
import{_ as we}from"./BasicModal.vue_vue_type_style_index_0_lang-3870ceab.js";import{_ as ye,u as xe}from"./useBaseTable-d607863f.js";import{_ as ke}from"./BasicMainCard-7b1fa79c.js";import{_ as Te}from"./BasicInput.vue_vue_type_style_index_0_lang-5017efc1.js";import{_ as Ie}from"./button.vue_vue_type_style_index_0_lang-90a36b25.js";import{I as S}from"./Icon-16a7c1f0.js";import{t as Ue}from"./useDataTime-784b7128.js";import{_ as Re,O as ne,P as ie,Q as Ce,U as oe,d as Be,i as f,x as Se,o as x,c as k,e as s,w as d,b as n,f as N,R as Ae,l as h,t as Ee,n as A,C as X,H as _,S as Le}from"./index-0127add0.js";import{g as E}from"./convert-2ad76038.js";import{n as Y}from"./textUtils-c37780ad.js";import{g as Z}from"./index-98b2baa9.js";import{M as Me}from"./index-a21bea9f.js";import{S as $e}from"./index-9c57cbfd.js";import{C as je}from"./index-c971ffa4.js";import{I as De}from"./index-30500426.js";import{T as F}from"./isSymbol-102dac7e.js";import{U as ee}from"./index-919cae97.js";import"./updateLocale-1362a15b.js";import"./index-163f964f.js";import"./_plugin-vue_export-helper-10c790be.js";import"./shallowequal-327a9d42.js";import"./vnode-e48a529a.js";import"./useState-ab7e8e52.js";import"./useMemo-531a1ef9.js";import"./FormItemContext-99d81d38.js";import"./omit-a9878f04.js";import"./lodash-572b39f3.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-1007497c.js";import"./index-e8339542.js";import"./Badge-8884c4f5.js";import"./isNumeric-3f69e2aa.js";import"./index-def9ba08.js";import"./index-5d23b372.js";import"./index-55a09ddc.js";import"./toArray-2923cdda.js";import"./SearchOutlined-6c1cc274.js";import"./pickAttrs-05046885.js";import"./index-a6785c60.js";import"./isMobile-e2e89480.js";import"./index-827c0a37.js";import"./Grid-6ef11710.js";import"./index-a1a9d49a.js";import"./useRefs-5dfcc3e3.js";import"./_flatRest-56c6e14a.js";import"./index-087c87e8.js";import"./Col-8db1abbb.js";import"./styleChecker-6ecca756.js";import"./isPlainObject-cdd64a7d.js";import"./usePrice-bc935b83.js";import"./DialogWrap-81711a5a.js";import"./index-83d7ccb3.js";import"./LeftOutlined-dfa284aa.js";import"./css-aae66f86.js";import"./index-a8e6060b.js";import"./index-f3e74362.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 c=await ne("announcements",o);return Array.isArray(c)?c:[c]}async function ae(o,c){const u=await ie("announcements",o,{...c,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:c}=await Re(()=>import("./buildSupabaseQuery-91e30fb5.js"),["assets/buildSupabaseQuery-91e30fb5.js","assets/index-0127add0.js","assets/index-ceed3b68.css"]),u={...o};!u.sort&&!u.order&&(u.order="-id");const m=await c(u,"announcements");try{if(Array.isArray(m==null?void 0:m.rows)){const w=u.page||1,O=u.limit||20,z=(w-1)*O,G=m.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{...m,rows:G}}}catch(w){console.error("[getAnnouncementsTable]",w)}return m}const le="home_greeting_subtitle",V="امروز هم یه ماجراجویی تازه داریم!";async function He(o,c){var m,w;const u=await oe("configs",{filters:[{field:"key",op:"eq",value:o}],limit:1,page:1});if((w=(m=u.rows)==null?void 0:m[0])!=null&&w.id){await ie("configs"