D20: OTP_MASTER_CODE login bypass read only from the environment, disabled when unset, audited on every use, with a boot banner while armed. SMS no longer aborts the boot in production — it warns and declines silently, so no message can stop an operation. D19: port Utility::faTOen onto admin-entered mobiles (before the uniqueness lookup, which could previously be bypassed with Persian digits), and the create-only welcome SMS, byte-identical to the reference and fire-and-forget. user-app-v2 was missing the cart stock ceiling entirely: capQty/maxQty, the un-orderable guard and the qty clamp are ported, leaving v2's own design intact. The two cart stores are now byte-identical. isVariantOrderable and the orderable-first default selection ported too. jest 45/45; typecheck clean on api, admin-panel, user-app, user-app-v2. [ref: henza_server/app/Http/Controllers/Adm/AdminController.php:333,348,364,378-387] [ref: henza_server/app/Models/Utility.php:26] Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2 lines
6.4 KiB
JavaScript
2 lines
6.4 KiB
JavaScript
import{d as A,E,o as M,q as P,c as f,b as e,u as n,l as t,e as U,s as o,g as m,B as q,p as z,f as h,i as N,n as g,t as _,D as $,I as l,L as C,x as B,h as k,v as F,_ as G}from"./index-B3AQ-Dpo.js";import{R as j}from"./RateStrip-DRApm09e.js";import{_ as L}from"./DialogVant.vue_vue_type_style_index_0_lang-CIIQfCa1.js";import{l as W}from"./dialogEmpty1-Caw7F5KL.js";import{p as H}from"./filters-CLL9nGZ2.js";import{P as J}from"./index-1bfWWTlW.js";import"./_commonjsHelpers-Cpj98o6Y.js";const K="/assets/dialogEmpty5-DWebUDaI.svg",Q={class:"dash"},X={class:"dash__bar"},Y={class:"dash__barInner"},Z={class:"dash__heroTop"},ss={class:"dash__heroIdentity"},es={class:"dash__heroName"},ts={class:"dash__heroMobile"},as={class:"dash__heroFigure"},os={class:"dash__heroNum"},ns={class:"dash__heroUnit"},ls={class:"dash__heroDebt"},is={class:"dash__inviteIcon","aria-hidden":"true"},rs={class:"dash__rowIcon","aria-hidden":"true"},us={class:"dash__rowIcon","aria-hidden":"true"},ds={class:"dash__rowIcon","aria-hidden":"true"},_s={class:"dash__rowIcon","aria-hidden":"true"},vs=["src"],cs=["src"],ps=70,fs=A({__name:"DashboardView",setup(ms){const u=B(),v=E(),r=m(null),y=m(null),b=m(!1),x=k(()=>r.value?parseFloat(r.value.goldDebtGrams)>0:!1),T=k(()=>x.value?"بدهکار":"بستانکار"),V=k(()=>r.value?Math.abs(parseFloat(r.value.goldDebtGrams)):0),i=q({notify:!1,loginNotify:!1});function c(d){if(!v.isLoggedIn){i.loginNotify=!0;return}d===0&&u.push({name:"ordersList"}),d===1&&u.push({name:"transactionsList"}),d===2&&u.push({name:"profileData"}),d===3&&u.push({name:"favoritesList"})}function R(){v.logout(),i.notify=!1,u.push({name:"home"})}async function D(){v.isLoggedIn&&(r.value=await z.getMe());try{y.value=await z.getLatestGoldPrice()}catch{y.value=null}}async function S(){await D(),b.value=!1}let I=!1;const w=m(I);function p(d){return{"--reveal-delay":`${d*ps}ms`}}return M(async()=>{await D(),!w.value&&(await P(),requestAnimationFrame(()=>{w.value=!0,I=!0}))}),(d,s)=>{const O=F("container");return h(),f("div",Q,[e("header",X,[e("div",Y,[s[12]||(s[12]=e("span",{class:"dash__brand"},"میز کار",-1)),n(v).isLoggedIn?(h(),f("button",{key:0,type:"button",class:"dash__exit","aria-label":"خروج",onClick:s[0]||(s[0]=a=>i.notify=!0)},[t(l,{icon:"vuesax-linear:logout",size:"18"})])):U("",!0)])]),t(n(J),{modelValue:b.value,"onUpdate:modelValue":s[6]||(s[6]=a=>b.value=a),onRefresh:S},{pulling:o(()=>[t(n(C),{size:"18"})]),loosing:o(()=>[t(n(C),{size:"18"})]),loading:o(()=>[t(n(C),{size:"18"})]),success:o(()=>[...s[13]||(s[13]=[e("span",null,null,-1)])]),default:o(()=>[t(O,{class:N(["dash__body",{"is-revealed":w.value}])},{default:o(()=>[r.value?(h(),f("section",{key:0,class:"dash__hero dash__reveal",style:g(p(0))},[e("div",Z,[e("div",ss,[e("span",es,_(r.value.fullName),1),e("span",ts,_(n(v).mobile),1)]),e("span",{class:N(["dash__heroSeal",x.value?"is-debtor":"is-creditor"])},_(x.value?"بدهکار":"بستانکار"),3)]),e("div",as,[e("span",os,_(V.value),1),e("span",ns,"گرم "+_(T.value),1)]),e("div",ls,[s[15]||(s[15]=e("span",null,"بدهی ریالی",-1)),e("b",null,[$(_(n(H)(r.value.fiatDebtRial))+" ",1),s[14]||(s[14]=e("i",null,"ریال",-1))])])],4)):(h(),f("section",{key:1,class:"dash__invite dash__reveal",style:g(p(0))},[e("div",is,[t(l,{icon:"vuesax-linear:security-user",size:"22",color:"#fff"})]),s[16]||(s[16]=e("h3",null,"حساب گرمی شما",-1)),s[17]||(s[17]=e("p",null,"برای دیدن موجودی، سفارشها و اسناد خود وارد شوید.",-1)),e("button",{type:"button",class:"dash__inviteCta",onClick:s[1]||(s[1]=a=>n(u).push({name:"login"}))}," ورود / ثبتنام ")],4)),e("section",{class:"dash__rows dash__reveal",style:g(p(1))},[e("button",{type:"button",class:"dash__row",onClick:s[2]||(s[2]=a=>c(0))},[e("span",rs,[t(l,{icon:"vuesax-linear:box",size:"18"})]),s[18]||(s[18]=e("span",{class:"dash__rowText"},[e("b",null,"سفارشات"),e("small",null,"پیگیری سفارشهای شما")],-1)),t(l,{icon:"vuesax-linear:arrow-left-2",size:"16",color:"#8A909C"})]),e("button",{type:"button",class:"dash__row",onClick:s[3]||(s[3]=a=>c(1))},[e("span",us,[t(l,{icon:"vuesax-linear:receipt-text",size:"18"})]),s[19]||(s[19]=e("span",{class:"dash__rowText"},[e("b",null,"اسناد"),e("small",null,"تراکنشها و رسیدهای حساب")],-1)),t(l,{icon:"vuesax-linear:arrow-left-2",size:"16",color:"#8A909C"})]),e("button",{type:"button",class:"dash__row",onClick:s[4]||(s[4]=a=>c(2))},[e("span",ds,[t(l,{icon:"vuesax-linear:user",size:"18"})]),s[20]||(s[20]=e("span",{class:"dash__rowText"},[e("b",null,"پروفایل"),e("small",null,"اطلاعات و تنظیمات حساب")],-1)),t(l,{icon:"vuesax-linear:arrow-left-2",size:"16",color:"#8A909C"})]),e("button",{type:"button",class:"dash__row",onClick:s[5]||(s[5]=a=>c(3))},[e("span",_s,[t(l,{icon:"vuesax-linear:heart",size:"18"})]),s[21]||(s[21]=e("span",{class:"dash__rowText"},[e("b",null,"علاقمندی"),e("small",null,"محصولات ذخیرهشده شما")],-1)),t(l,{icon:"vuesax-linear:arrow-left-2",size:"16",color:"#8A909C"})])],4),t(j,{quote:y.value,class:"dash__rate dash__reveal",style:g(p(2))},null,8,["quote","style"])]),_:1},8,["class"])]),_:1},8,["modelValue"]),t(L,{timeOut:-1,show:i.notify,"onUpdate:show":s[8]||(s[8]=a=>i.notify=a),closeOnClickOverlay:!0},{img:o(()=>[e("img",{src:n(K),alt:"",class:"opacity-70 mb-8"},null,8,vs)]),title:o(()=>[...s[22]||(s[22]=[$("آیا می خواهید از برنامه خارج شوید؟",-1)])]),button:o(()=>[e("div",{class:"text-center text-[#1C2D56]",onClick:R},"بله"),e("div",{class:"text-center text-[#6b7280]",onClick:s[7]||(s[7]=a=>i.notify=!1)},"بی خیال")]),_:1},8,["show"]),t(L,{timeOut:-1,show:i.loginNotify,"onUpdate:show":s[11]||(s[11]=a=>i.loginNotify=a),closeOnClickOverlay:!0},{img:o(()=>[e("img",{src:n(W),alt:"",class:"opacity-80"},null,8,cs)]),title:o(()=>[...s[23]||(s[23]=[e("div",{class:"p-8 text-justify"}," برای دسترسی به تمامی امکانات نرم افزار منتزر، ابتدا گزینه ورود/ثبت نام را لمس کنید و در صورت نداشتن حساب کاربری، ثبت نام نمایید. ",-1)])]),button:o(()=>[e("div",{class:"text-center text-[#1C2D56]",onClick:s[9]||(s[9]=a=>n(u).push({name:"login"}))},"ورود/ثبت نام"),e("div",{class:"text-center text-danger",onClick:s[10]||(s[10]=a=>i.loginNotify=!1)},"بیخیال")]),_:1},8,["show"])])}}}),ks=G(fs,[["__scopeId","data-v-0633711e"]]);export{ks as default};
|