Files
tehran_taj/apps/user-app/dist/assets/HomeView-BGeO2hhk.js
T
s.esmaeiliandClaude Opus 5 53436ec855 chore(release): prepare release/delivery + fix docker env passthrough
DEPLOY-01: docker-compose.yml passed only DATABASE_URL and PORT to the api
service, so JWT_SECRET, JWT_CUSTOMER_SECRET, OTP_MASTER_CODE and every SMS_TREZ_*
variable were silently dropped in Docker. A deployed build would have used the
development JWT fallback and would not have had the delivery master code at all,
so the demo login would have failed with no obvious cause. All are now forwarded,
defaulting to empty (which the code treats as unset); verified with
`docker compose config`.

TEST-01: test-sales-expert-roundtrip.cjs had localhost:3077 hardcoded and could
only connect by accident. Now defaults to the repo's API_PORT. 33/33.

DELIVERY.md documents env vars (names only), run/deploy commands, how migrations
run inside the container, the verification results and the known issues.

release/delivery contains both parity branches with no conflicts (fast-forward).
build 5/5, jest 45/45, admin smoke 43/43, apps smoke 43/43, B2B scan 34/34,
B2B writes 25/25, auth-smoke 32/32, typecheck clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 00:30:09 +03:30

2 lines
10 KiB
JavaScript

import{_ as ae}from"./Spinner.vue_vue_type_style_index_0_lang-iladsJNR.js";import{d as E,o as te,a as K,c as n,b as a,n as oe,F as V,r as O,e as M,f,g as S,h as A,i as s,_ as H,t as L,w as ne,u as i,j as le,k as u,I as R,l as ie,m as re,p as se,q,s as x,v as Q,x as F,L as j,y as ce}from"./index-gDBsh1na.js";import{u as ue,S as de}from"./SingleProduct-DoCRibqt.js";import{R as _e}from"./RateStrip-CWGvnHfp.js";import{u as ve,a as me}from"./cartStore-CnHZpE-f.js";import{S as Z}from"./SectionHead-D1crGF_Y.js";import{u as ge}from"./filtersStore-DRUTekNT.js";import{P as he}from"./index-C_XVtQe0.js";import{D as pe}from"./index-DHV2EObP.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./NotifyVant.vue_vue_type_script_setup_true_lang-04nlwBMZ.js";import"./DialogVant.vue_vue_type_style_index_0_lang-CjJCtcu_.js";import"./dialogEmpty1-Caw7F5KL.js";import"./filters-CLL9nGZ2.js";import"./classCallCheck-Cn_U7yJ4.js";const fe={key:0,class:"showcase"},ye=["onClick"],ke=["src"],be={key:0,class:"showcase__dots"},we=["aria-label","onClick"],ee=.18,Se=6,Ce=E({__name:"ShowcaseSlider",props:{slides:{}},emits:["select"],setup(l,{emit:g}){const r=l,z=g,d=S(0);let v;function b(o){d.value=o,p()}function p(){v&&clearInterval(v),r.slides.length>1&&(v=setInterval(()=>{d.value=(d.value+1)%r.slides.length},6e3))}te(p),K(()=>{v&&clearInterval(v)});const C=S(null),h=S(!1),y=S(0);let c=null,I=0,D=0,$=0,k=!1;function X(o){var e;if(r.slides.length<2||c!==null)return;const m=C.value;m&&(c=o.pointerId,I=o.clientX,D=o.clientY,$=m.getBoundingClientRect().width||1,y.value=0,h.value=!0,k=!1,(e=m.setPointerCapture)==null||e.call(m,o.pointerId))}function U(o){if(!h.value||o.pointerId!==c)return;const m=o.clientX-I,e=o.clientY-D;!k&&Math.abs(m)>Math.abs(e)&&Math.abs(m)>Se&&(k=!0),k&&(y.value=m)}function B(){if(!h.value)return;const m=y.value/$;h.value=!1,c=null,y.value=0,m<=-ee&&d.value<r.slides.length-1?d.value++:m>=ee&&d.value>0&&d.value--,k&&p(),k=!1}function N(o){o.pointerId===c&&B()}function Y(o){o.pointerId===c&&(h.value=!1,c=null,y.value=0,k=!1)}function G(o){k||z("select",o)}const T=A(()=>{const o=-d.value*100,m=$?y.value/$*100:0;return{transform:`translate3d(${o+m}%, 0, 0)`,transition:h.value?"none":void 0}});return K(()=>{if(c!==null&&C.value)try{C.value.releasePointerCapture(c)}catch{}}),(o,m)=>l.slides.length?(s(),n("section",fe,[a("div",{ref_key:"root",ref:C,class:M(["showcase__frame",{"is-dragging":h.value}]),onPointerdown:X,onPointermove:U,onPointerup:N,onPointercancel:Y},[a("div",{class:"showcase__track",style:oe(T.value)},[(s(!0),n(V,null,O(l.slides,(e,t)=>(s(),n("article",{key:e.key,class:M(["showcase__slide",{"is-active":t===d.value}]),onClick:_=>G(e)},[e.image?(s(),n("img",{key:0,src:e.image,alt:"",class:"showcase__art",draggable:"false"},null,8,ke)):f("",!0)],10,ye))),128))],4)],34),l.slides.length>1?(s(),n("div",be,[(s(!0),n(V,null,O(l.slides,(e,t)=>(s(),n("button",{key:e.key,type:"button",class:M(["showcase__dot",{"is-active":t===d.value}]),"aria-label":e.title,onClick:_=>b(t)},null,10,we))),128))])):f("",!0)])):f("",!0)}}),Ie=H(Ce,[["__scopeId","data-v-4f09b443"]]),$e={class:"rail no-scrollbar"},Pe=["onClick"],xe={class:"rail__mark","aria-hidden":"true"},ze=["src"],De={class:"rail__title"},Re=E({__name:"CategoryRail",props:{categories:{},activeId:{}},emits:["select"],setup(l,{emit:g}){const r=g;return(z,d)=>(s(),n("div",$e,[(s(!0),n(V,null,O(l.categories,v=>{var b;return s(),n("button",{key:v.id,type:"button",class:M(["rail__chip",{"is-active":v.id===l.activeId}]),onClick:p=>r("select",v)},[a("span",xe,[(b=v.icon)!=null&&b.image?(s(),n("img",{key:0,src:v.icon.image,alt:""},null,8,ze)):f("",!0)]),a("span",De,L(v.title),1)],10,Pe)}),128))]))}}),Ae=H(Re,[["__scopeId","data-v-c61b3098"]]),Le={class:"card__art"},Me=["alt"],Be={key:0,class:"card__badge"},Fe={class:"card__body"},Ve={class:"card__title"},Oe={class:"card__meta"},Xe={class:"card__weight"},qe={key:0,class:"card__wage"},Ee=E({__name:"ShowcaseCard",props:{value:{},wide:{type:Boolean},badge:{}},emits:["open"],setup(l,{emit:g}){const r=l,z=g,d=ue(),{image:v,id:b,title:p,min_gram:C,wage:h}=ve(r.value),y=A(()=>{const c=h.value;return c==null?"":c%1===0?String(c):c.toFixed(2)});return(c,I)=>{const D=ie("lazy");return s(),n("article",{class:M(["card",{"card--wide":l.wide}]),onClick:I[1]||(I[1]=$=>z("open",l.value))},[a("div",Le,[ne(a("img",{alt:i(p)},null,8,Me),[[D,i(v)]]),a("button",{type:"button",class:M(["card__fav",{"is-on":i(d).isFavorite(i(b))}]),onClick:I[0]||(I[0]=le($=>i(d).toggle(i(b)),["stop"]))},[u(R,{icon:i(d).isFavorite(i(b))?"vuesax-linear:heart-fill":"vuesax-linear:heart",size:"17"},null,8,["icon"])],2),l.badge?(s(),n("span",Be,L(l.badge),1)):f("",!0)]),a("div",Fe,[a("h3",Ve,L(i(p)),1),a("div",Oe,[a("span",Xe,L(i(C))+" گرم",1),i(h)!=null?(s(),n("span",qe,"اجرت "+L(y.value)+"٪",1)):f("",!0)])])],2)}}}),W=H(Ee,[["__scopeId","data-v-43c92533"]]),He="/assets/shipping-and-delivery-CyUGL93q.png",Ue="/assets/sports-and-competition-ao926_SX.png",Ne=[{type:"popup",src:He,text:"ارسال سریع و مطمئن سفارش‌های شما به سراسر کشور.",link:void 0},{type:"popup",src:Ue,text:"جدیدترین محصولات منتزر را در بخش محصولات جدید ببینید.",link:void 0},{type:"popup",src:se,text:"منتزر، همراه شما در خرید و فروش طلا.",link:void 0}],Ye=re("config",{state:()=>({config:{main_slider:Ne},cats:[],loaded:!1}),actions:{setCats(l){this.cats=l},async init(){try{const l=await q.listProducts(),g=new Map;for(const r of l)r.category&&!g.has(r.category.id)&&g.set(r.category.id,{id:r.category.id,title:r.category.title,icon:{image:se}});this.cats=[...g.values()],this.loaded=!0}catch(l){console.log(l)}}}}),Ge={class:"home"},Te={class:"home__bar"},je={class:"home__barInner"},We={key:0,class:"home__badge"},Je={key:2,class:"home__section"},Ke={key:0,class:"home__grid"},Qe={key:3,class:"home__section"},Ze={class:"home__reel no-scrollbar"},et={key:4,class:"home__empty"},tt={class:"home__trust"},st={class:"home__trustItem"},at={class:"home__trustItem"},ot={class:"home__trustItem"},nt=E({__name:"HomeView",setup(l){const g=ce(),r=Ye(),z=me(),d=ge(),v=S(!0),b=S(!1),p=S([]),C=S(null),h=S(null),y=S(!1),c=S(null),I=A(()=>p.value[0]??null),D=A(()=>p.value.slice(1,5)),$=A(()=>p.value.slice(5,13)),k=[{eyebrow:"مجموعه منتزر",cta:"دیدن مجموعه"},{eyebrow:"انتخاب سردبیر",cta:"مشاهده"},{eyebrow:"پیشنهاد این هفته",cta:"بررسی کنید"}],X=A(()=>{var t;if((t=h.value)!=null&&t.length)return h.value.filter(_=>_.image).map((_,P)=>({key:`${P}-${_.image}`,eyebrow:"مجموعه منتزر",title:"",subtitle:"",cta:"",image:_.image,link:_.link||void 0}));const e=r.cats.slice(0,3);return e.length?e.map((_,P)=>({key:_.id,eyebrow:k[P%k.length].eyebrow,title:_.title,subtitle:"ساخته‌شده از طلای ۱۸ عیار، با اجرت شفاف و اصالت تضمین‌شده.",cta:k[P%k.length].cta,image:U(_.id),categoryId:_.id})):[]});function U(e){var _,P;const t=p.value.find(w=>{var J;return((J=w.category)==null?void 0:J.id)===e});return(P=(_=t==null?void 0:t.images)==null?void 0:_[0])==null?void 0:P.url}function B(e){c.value=e.id,y.value=!0}function N(e){d.query.cats=[e.id],g.push({name:"search"})}function Y(e){if(e.link){/^https?:\/\//i.test(e.link)?window.open(e.link,"_blank","noopener"):g.push(e.link);return}e.categoryId&&(d.query.cats=[e.categoryId]),g.push({name:"search"})}function G(){g.push({name:"search"})}function T(){g.push({name:"newestProduct"})}async function o(){try{const[e]=await Promise.all([q.listProducts(),r.init()]);p.value=e}catch(e){console.log(e)}try{C.value=await q.getLatestGoldPrice()}catch{C.value=null}try{h.value=await q.getHomeSlider()}catch{h.value=null}}async function m(){await o(),b.value=!1}return te(async()=>{await o(),v.value=!1}),(e,t)=>{const _=Q("router-link"),P=Q("container");return s(),n("div",Ge,[a("header",Te,[a("div",je,[u(_,{to:{name:"cart"},class:"home__iconBtn","aria-label":"سبد خرید"},{default:x(()=>[u(R,{icon:"vuesax-linear:bag-2",size:"21"}),i(z).items.length?(s(),n("span",We,L(i(z).items.length),1)):f("",!0)]),_:1}),t[3]||(t[3]=a("img",{src:ae,alt:"منتزر",class:"home__logo"},null,-1)),u(_,{to:{name:"search"},class:"home__iconBtn","aria-label":"جستجو"},{default:x(()=>[u(R,{icon:"vuesax-linear:search-normal-1",size:"21"})]),_:1})])]),u(i(he),{modelValue:b.value,"onUpdate:modelValue":t[0]||(t[0]=w=>b.value=w),onRefresh:m},{pulling:x(()=>[u(i(j),{size:"18"})]),loosing:x(()=>[u(i(j),{size:"18"})]),loading:x(()=>[u(i(j),{size:"18"})]),success:x(()=>[...t[4]||(t[4]=[a("span",null,null,-1)])]),default:x(()=>[u(P,{class:"home__body"},{default:x(()=>[u(_e,{quote:C.value,class:"home__rate"},null,8,["quote"]),X.value.length?(s(),F(Ie,{key:0,slides:X.value,class:"home__hero",onSelect:Y},null,8,["slides"])):f("",!0),i(r).cats.length?(s(),F(Ae,{key:1,categories:i(r).cats,"active-id":null,class:"home__rail",onSelect:N},null,8,["categories"])):f("",!0),I.value?(s(),n("section",Je,[u(Z,{title:"برگزیده منتزر",subtitle:"انتخاب‌شده از میان مجموعه‌های موجود","action-label":"همه محصولات",onAction:G}),u(W,{value:I.value,wide:"",badge:"برگزیده",onOpen:B},null,8,["value"]),D.value.length?(s(),n("div",Ke,[(s(!0),n(V,null,O(D.value,w=>(s(),F(W,{key:w.id,value:w,onOpen:B},null,8,["value"]))),128))])):f("",!0)])):f("",!0),$.value.length?(s(),n("section",Qe,[u(Z,{title:"تازه‌ها",subtitle:"آخرین افزوده‌های مجموعه","action-label":"مشاهده همه",onAction:T}),a("div",Ze,[(s(!0),n(V,null,O($.value,w=>(s(),F(W,{key:w.id,value:w,class:"home__reelItem",onOpen:B},null,8,["value"]))),128))])])):f("",!0),!v.value&&!p.value.length?(s(),n("section",et,[u(R,{icon:"vuesax-linear:box",size:"26"}),t[5]||(t[5]=a("p",null,"هنوز محصولی در مجموعه ثبت نشده است.",-1))])):f("",!0),a("div",tt,[a("div",st,[u(R,{icon:"vuesax-linear:shield-tick",size:"18"}),t[6]||(t[6]=a("span",null,"خرید امن",-1))]),a("div",at,[u(R,{icon:"vuesax-linear:verify",size:"18"}),t[7]||(t[7]=a("span",null,"اصالت کالا",-1))]),a("div",ot,[u(R,{icon:"vuesax-linear:box-tick",size:"18"}),t[8]||(t[8]=a("span",null,"ارسال بیمه‌شده",-1))])])]),_:1})]),_:1},8,["modelValue"]),u(i(pe),{visible:y.value,"onUpdate:visible":t[2]||(t[2]=w=>y.value=w),placement:"bottom",closable:!1,class:"rtl",height:"100vh",bodyStyle:{padding:0,position:"relative"}},{default:x(()=>[c.value?(s(),F(de,{key:0,id:c.value,onCloseDrawer:t[1]||(t[1]=w=>y.value=!1)},null,8,["id"])):f("",!0)]),_:1},8,["visible"])])}}}),bt=H(nt,[["__scopeId","data-v-ad3f39ad"]]);export{bt as default};