2 lines
15 KiB
JavaScript
2 lines
15 KiB
JavaScript
import{_ as we}from"./BasicModal.vue_vue_type_style_index_0_lang-6296deb9.js";import{_ as ye,u as xe}from"./useBaseTable-e18d3b32.js";import{_ as ke}from"./BasicMainCard-ff1543bd.js";import{_ as Te}from"./BasicInput.vue_vue_type_style_index_0_lang-06536e2e.js";import{_ as Ie}from"./button.vue_vue_type_style_index_0_lang-fbfa965d.js";import{I as A}from"./Icon-671f08f9.js";import{t as Ue}from"./useDataTime-206d8d2e.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-c678e119.js";import{g as L}from"./convert-2ad76038.js";import{n as Q}from"./textUtils-c37780ad.js";import{g as Z}from"./index-af384b16.js";import{M as Ee}from"./index-66da2c76.js";import{S as $e}from"./index-5203b45e.js";import{C as je}from"./index-05e85885.js";import{I as De}from"./index-e517c667.js";import{T as F}from"./isSymbol-5130882b.js";import{U as ee}from"./index-ff90b762.js";import"./updateLocale-e9df593e.js";import"./index-c5016c96.js";import"./_plugin-vue_export-helper-edd5ed68.js";import"./shallowequal-93b92d94.js";import"./vnode-34fe2aaf.js";import"./useState-fb1fd992.js";import"./useMemo-3527b8f5.js";import"./FormItemContext-53695780.js";import"./omit-30cc2465.js";import"./lodash-2343a0ae.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-0d6b57d1.js";import"./index-064013c2.js";import"./Badge-b566fed9.js";import"./isNumeric-3f69e2aa.js";import"./index-d768dcac.js";import"./index-ea10bb13.js";import"./index-01af60d8.js";import"./toArray-acd138e5.js";import"./SearchOutlined-445bfd70.js";import"./pickAttrs-09168c62.js";import"./index-27b4bb6d.js";import"./isMobile-e2e89480.js";import"./index-31ed7972.js";import"./Grid-192c1e72.js";import"./index-88858982.js";import"./useRefs-d469f03d.js";import"./_flatRest-89cece1c.js";import"./index-2a1871d2.js";import"./Col-65d77001.js";import"./styleChecker-c202e4d7.js";import"./isPlainObject-2f8cd8cc.js";import"./usePrice-bc935b83.js";import"./DialogWrap-0297f46d.js";import"./index-d80ea252.js";import"./css-aae66f86.js";import"./index-679d69b0.js";import"./index-e3658ae2.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-72aac971.js"),["assets/buildSupabaseQuery-72aac971.js","assets/index-c678e119.js","assets/index-0d7ad6b5.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
|