Files
tehran_taj/apps/user-app/dist/assets/NewestView-CbBYVbbQ.js
T
s.esmaeiliandClaude Opus 5.5 2bbd9408dd build: rebuild the server bundle, admin panel and both apps from main
Fresh release output after merging dev: apps/api/release (server
bundle, migrations and the database client) and the three front-end
dist folders. All three front-ends type-check clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 10:24:53 +03:30

2 lines
2.5 KiB
JavaScript

import{P as x}from"./PageBar-Du5QsTnO.js";import{d as p,i as o,c as r,p as n,l as i,G as P,H as S,J as k,n as B,K as b,M as _,C as v,f as y,g as u,x as C,N as E,O as L,z as d,F as N,r as $,h as A,B as F,_ as V}from"./index-DvtDx2r1.js";import{S as H}from"./SectionHead-BGP0LHqU.js";import{P as I}from"./ProductCard-CGx8C-rP.js";const z={class:"flex justify-center items-center empty"},D=p({__name:"EmptyState",props:{description:{},image:{}},setup(e){return(t,a)=>(o(),r("div",z,[n(i(P),{description:"موردی یافت نشد",image:e.image,class:"h-[200px] w-[200px] opacity-70"},null,8,["image"])]))}}),G="/assets/favoritEmpty-kbtPAdi5.svg",M=p({__name:"ScrollFetchSearch",props:{loading:{type:Boolean},flag:{type:Boolean},padding:{}},emits:["fetch"],setup(e,{emit:t}){const a=t,l=S(),s=u(null);return k(s,()=>{a("fetch")},{distance:50}),(c,f)=>(o(),r("main",{class:"flex flex-col flex-1 overflow-auto no-scrollbar w-[100vw] max-w-screen-md m-auto",style:B({paddingTop:e.padding||i(l).headerHeight+"px"}),ref_key:"scrollArea",ref:s},[b(c.$slots,"default"),n(_,{cls:"my-[10px]",spinning:e.loading,indicator:!0,tip:"درحال دریافت اطلاعات"},null,8,["spinning"]),e.flag?(o(),v(D,{key:0,image:i(G)},null,8,["image"])):y("",!0)],4))}});function T(){const e=E({totalPages:0,productList:[],flag:!1});return{productsData:e,getProducts:async(a,l=!1)=>{if(!l){a.value=!0;try{e.productList=await C.listProducts(),e.flag=e.productList.length<1}catch(s){console.log(s)}finally{a.value=!1}}}}}const j={class:"newest"},J={key:0,class:"newest__grid"},g=20,K=p({__name:"NewestView",setup(e){const{productsData:t,getProducts:a}=T(),l=u(!1),s=u(!1),c=u(g),f=A(()=>t.productList.slice(0,c.value));L(async()=>{await a(l,!1)});const h=async()=>{if(c.value<t.productList.length){c.value+=g;return}await a(s,!0)};return(O,Z)=>{const w=F("container");return o(),r("div",j,[n(x,{title:"جدیدترین محصولات","back-to":"home"}),n(_,{spinning:l.value,tip:"درحال دریافت اطلاعات"},{default:d(()=>[n(M,{class:"newest__scroll",loading:s.value,flag:i(t).flag,padding:"0px",onFetch:h},{default:d(()=>[n(w,{class:"newest__body"},{default:d(()=>[n(H,{title:"تازه‌ها",subtitle:"آخرین افزوده‌های مجموعه"}),i(t).productList.length?(o(),r("div",J,[(o(!0),r(N,null,$(f.value,m=>(o(),v(I,{key:m.id,value:m},null,8,["value"]))),128))])):y("",!0)]),_:1})]),_:1},8,["loading","flag"])]),_:1},8,["spinning"])])}}}),W=V(K,[["__scopeId","data-v-222395fd"]]);export{W as default};