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>
2 lines
4.0 KiB
JavaScript
2 lines
4.0 KiB
JavaScript
import{a as L,b as c,X as z}from"./model-DOsh9ZRP.js";import{_ as A}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-DIOKotFA.js";import{_ as H}from"./createCity.vue_vue_type_script_setup_true_lang-D25ws4Mm.js";import{d as K,u as R,b as j,c as a,w as o,r,o as y,h as _,a as C,E as q,i as N,D as F,n as G,f as w,t as T,l as v,y as I,x as k,z as U}from"./index-JKzARUiG.js";import{u as J}from"./useDeleteHandler-Ddu12Nud.js";import"./SettingOutlined-7WAqpvd6.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-BzOLU8hC.js";function Q(){const i=new L("admin/misc/cities/list","لیست شهر ها");return i.add(new c("title","نام شهر").filterKey("name").filterText()),i.add(new c("level","سطح").filterNumber().noSort()),i.add(new c("percent","درصد مشتری عمده").renderSlot("percent").noSort()),i.add(new c("percent_aux","درصد کارشناس فروش").renderSlot("percent_aux").noSort()),i.add(new c("opt","عملیات").noSort().renderSlot("opt")),i}const W={id:"page-user-list"},oe=K({__name:"cityList",setup(i){const B=R(),S=n=>!!B.hasPermission(n),D=Q(),p=v(null),x=v(!1),d=v(!1),g=v(void 0),l=I({title:"",percent:null,percent_aux:null});async function E(n){g.value=n,l.title=n.title??"";try{const[e,s]=await Promise.all([k.get(`cities/get-percent/${n.id}`),k.get(`cities/get-percent-aux/${n.id}`)]);l.percent=e.data===null?null:Number(e.data),l.percent_aux=s.data===null?null:Number(s.data)}catch{l.percent=n.percent===null?null:Number(n.percent),l.percent_aux=n.percent_aux===null?null:Number(n.percent_aux)}d.value=!0}async function O(){var n,e,s,m;try{await k.put(`cities/${(n=g.value)==null?void 0:n.id}`,{title:l.title,percent:l.percent,percent_aux:l.percent_aux}),U.success("تغییرات ثبت شد"),d.value=!1,(e=p.value)==null||e.fetch()}catch(u){U.error(((m=(s=u==null?void 0:u.response)==null?void 0:s.data)==null?void 0:m.message)??"خطا در ثبت تغییرات")}}const{remove:V}=J({onSuccess:()=>{var n;return(n=p.value)==null?void 0:n.fetch()},successMessage:"شهر حذف شد",fallbackErrorMessage:"خطا در حذف شهر"});return(n,e)=>{const s=r("a-tooltip"),m=r("a-popconfirm"),u=r("a-input"),b=r("a-form-item"),$=r("a-input-number"),X=r("a-form"),M=r("a-modal"),P=r("a-card");return y(),j("div",W,[a(P,{title:"لیست شهر ها"},{default:o(()=>[a(z,{ref_key:"citiesTable",ref:p,model:_(D)},{add:o(()=>[a(A,{rid:"cities.create","add-label":"افزودن شهر",onAdd:e[0]||(e[0]=t=>x.value=!0)})]),percent:o(({text:t})=>[w(T(t??"-"),1)]),percent_aux:o(({text:t})=>[w(T(t??"-"),1)]),opt:o(({record:t})=>[S("cities.list.view.edit")?(y(),C(s,{key:0,title:"ویرایش"},{default:o(()=>[a(_(q),{class:"cursor-pointer mx-1 text-primary",onClick:f=>E(t)},null,8,["onClick"])]),_:2},1024)):N("",!0),S("cities.list.remove")?(y(),C(s,{key:1,title:"حذف"},{default:o(()=>[a(m,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:f=>_(V)(`cities/${t.id}`)},{title:o(()=>[...e[7]||(e[7]=[G("p",null,"آیا مطمئن به حذف شهر مورد نظر هستید ؟",-1)])]),default:o(()=>[a(_(F),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)):N("",!0)]),_:1},8,["model"]),a(M,{open:d.value,"onUpdate:open":e[4]||(e[4]=t=>d.value=t),title:"ویرایش شهر",onOk:O},{default:o(()=>[a(X,{layout:"vertical"},{default:o(()=>[a(b,{label:"نام شهر"},{default:o(()=>[a(u,{value:l.title,"onUpdate:value":e[1]||(e[1]=t=>l.title=t)},null,8,["value"])]),_:1}),a(b,{label:"درصد مشتری عمده"},{default:o(()=>[a($,{value:l.percent,"onUpdate:value":e[2]||(e[2]=t=>l.percent=t),class:"w-full",step:.1},null,8,["value"])]),_:1}),a(b,{label:"درصد کارشناس فروش"},{default:o(()=>[a($,{value:l.percent_aux,"onUpdate:value":e[3]||(e[3]=t=>l.percent_aux=t),class:"w-full",step:.1},null,8,["value"])]),_:1})]),_:1})]),_:1},8,["open"]),a(H,{open:x.value,"onUpdate:open":e[5]||(e[5]=t=>x.value=t),onSuccess:e[6]||(e[6]=t=>{var f;return(f=p.value)==null?void 0:f.fetch()})},null,8,["open"])]),_:1})])}}});export{oe as default};
|