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

2 lines
15 KiB
JavaScript
Raw Normal View History

import{_ as we}from"./BasicModal.vue_vue_type_style_index_0_lang-6969d1dc.js";import{_ as ye,u as xe}from"./useBaseTable-2f44456a.js";import{_ as ke}from"./BasicMainCard-e958eff9.js";import{_ as Te}from"./BasicInput.vue_vue_type_style_index_0_lang-1e71e6d8.js";import{_ as Ie}from"./button.vue_vue_type_style_index_0_lang-c84b0596.js";import{I as A}from"./Icon-e9d21126.js";import{t as Ue}from"./useDataTime-c5fd0475.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-88b436a3.js";import{g as L}from"./convert-2ad76038.js";import{n as Q}from"./textUtils-c37780ad.js";import{g as Z}from"./index-eb78e5b4.js";import{M as Ee}from"./index-801e70c1.js";import{S as $e}from"./index-77cb2497.js";import{C as je}from"./index-6971af25.js";import{I as De}from"./index-5b1d7174.js";import{T as F}from"./isSymbol-5adcf314.js";import{U as ee}from"./index-58f8102d.js";import"./updateLocale-50b6b1dc.js";import"./index-371b21ab.js";import"./_plugin-vue_export-helper-0965689e.js";import"./shallowequal-a265b4c4.js";import"./vnode-4c3cf924.js";import"./useState-89585daf.js";import"./useMemo-9783b0bd.js";import"./FormItemContext-0dc63d45.js";import"./omit-c69ba12d.js";import"./lodash-ff1cad4c.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-8738a2db.js";import"./index-59dbbd66.js";import"./Badge-b5f795c2.js";import"./isNumeric-3f69e2aa.js";import"./index-e3b71aec.js";import"./index-608635af.js";import"./index-7fdb0173.js";import"./toArray-20aa7010.js";import"./SearchOutlined-a51da12b.js";import"./pickAttrs-fd92707c.js";import"./index-70730f49.js";import"./isMobile-e2e89480.js";import"./index-4c23d157.js";import"./Grid-3500d868.js";import"./index-3056cee8.js";import"./useRefs-b589f2c4.js";import"./_flatRest-bfa472d2.js";import"./index-ab792bfc.js";import"./Col-dbdf0e50.js";import"./styleChecker-e121d19f.js";import"./isPlainObject-6af67cf0.js";import"./usePrice-bc935b83.js";import"./DialogWrap-540d386d.js";import"./index-4ad375f9.js";import"./css-aae66f86.js";import"./index-ad76e424.js";import"./index-f6397275.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-073609fa.js"),["assets/buildSupabaseQuery-073609fa.js","assets/index-88b436a3.js","assets/index-ceed3b68.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