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

2 lines
15 KiB
JavaScript
Raw Normal View History

2026-10-10 13:00:20 +03:30
import{_ as we}from"./BasicModal.vue_vue_type_style_index_0_lang-a4f4e215.js";import{_ as ye,u as xe}from"./useBaseTable-2ab18557.js";import{_ as ke}from"./BasicMainCard-b162b1c4.js";import{_ as Te}from"./BasicInput.vue_vue_type_style_index_0_lang-b95b808e.js";import{_ as Ie}from"./button.vue_vue_type_style_index_0_lang-1d790c18.js";import{I as A}from"./Icon-82d1568b.js";import{t as Ue}from"./useDataTime-54c17809.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-b1a7e04b.js";import{g as L}from"./convert-2ad76038.js";import{n as Q}from"./textUtils-c37780ad.js";import{g as Z}from"./index-eed351fd.js";import{M as Ee}from"./index-95736a95.js";import{S as $e}from"./index-abe83bbb.js";import{C as je}from"./index-d8d70cfa.js";import{I as De}from"./index-40ad5e11.js";import{T as F}from"./isSymbol-8bb1a5fc.js";import{U as ee}from"./index-b2a473c2.js";import"./updateLocale-7460d5f0.js";import"./index-3c78ebad.js";import"./_plugin-vue_export-helper-bc5e645a.js";import"./shallowequal-8317aeac.js";import"./vnode-cf87e7d8.js";import"./useState-bee297fc.js";import"./useMemo-f1dd6d43.js";import"./FormItemContext-75ce584c.js";import"./omit-8d80653a.js";import"./lodash-a3cc5b11.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-dbbf8b2d.js";import"./index-ca8dc14f.js";import"./Badge-815f7351.js";import"./isNumeric-3f69e2aa.js";import"./index-62a1d374.js";import"./index-a5f1405d.js";import"./index-c03866b7.js";import"./toArray-7c7c3b23.js";import"./SearchOutlined-280cd434.js";import"./pickAttrs-6c8634eb.js";import"./index-3adb8492.js";import"./isMobile-e2e89480.js";import"./index-35b107f8.js";import"./Grid-bde7d306.js";import"./index-89d97954.js";import"./useRefs-8cde84b1.js";import"./_flatRest-49c0ef8d.js";import"./index-53cb41a6.js";import"./Col-b5ed65ce.js";import"./styleChecker-e7996752.js";import"./isPlainObject-aea507b4.js";import"./usePrice-bc935b83.js";import"./DialogWrap-06d91612.js";import"./index-06b581ca.js";import"./css-aae66f86.js";import"./index-b14e1723.js";import"./index-32cf5d9b.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-75615d81.js"),["assets/buildSupabaseQuery-75615d81.js","assets/index-b1a7e04b.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