Files
tehran_tala/apps/admin-panel/dist/assets/create-CaeflPy0.js
T
s.esmaeiliandClaude Haiku 5.5 6ccdbc06f0 build: release build of admin, user apps and api
Rebuilt dist/ and api release bundle, with the migration for catalog paging indexes.

Fix Less build error: fade(@token, N%) on theme tokens failed in both user-app
and user-app-v2 CustomerChoiceView; use alpha(), the project's token-aware helper.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-12 15:37:03 +03:30

2 lines
2.0 KiB
JavaScript

import{d as k,a as C,w as o,l as B,r as l,o as N,c as e,A as U,n as V,f as r,y as m,x as j,z as c}from"./index-CfCEpnEw.js";const z={class:"grid-2"},S=k({__name:"create",setup(O){const u=B(!1),a=m({title:"",text:"",type:0}),n=m({});async function f(){var p,t;if(Object.keys(n).forEach(s=>delete n[s]),a.title||(n.title="عنوان الزامی است"),a.text||(n.text="متن پیام الزامی است"),!Object.keys(n).length)try{u.value=!0;const{data:s}=await j.post("notify",a);c.success("نوتیفیکیشن ارسال شد"),a.title="",a.text=""}catch(s){c.error(((t=(p=s==null?void 0:s.response)==null?void 0:p.data)==null?void 0:t.message)??"خطا در ارسال")}finally{u.value=!1}}return(p,t)=>{const s=l("a-input"),_=l("a-form-item"),d=l("a-select-option"),v=l("a-select"),x=l("a-textarea"),y=l("a-button"),b=l("a-form"),g=l("a-card"),w=l("a-spin");return N(),C(w,{spinning:u.value},{default:o(()=>[e(g,{title:"ارسال نوتیفیکیشن"},{default:o(()=>[e(b,{layout:"vertical",onSubmit:U(f,["prevent"])},{default:o(()=>[V("div",z,[e(_,{label:"عنوان","validate-status":n.title?"error":"",help:n.title},{default:o(()=>[e(s,{value:a.title,"onUpdate:value":t[0]||(t[0]=i=>a.title=i)},null,8,["value"])]),_:1},8,["validate-status","help"]),e(_,{label:"نوع کاربر"},{default:o(()=>[e(v,{value:a.type,"onUpdate:value":t[1]||(t[1]=i=>a.type=i)},{default:o(()=>[e(d,{value:0},{default:o(()=>[...t[3]||(t[3]=[r("همه مشتریان",-1)])]),_:1}),e(d,{value:2},{default:o(()=>[...t[4]||(t[4]=[r("مشتریان عمده",-1)])]),_:1}),e(d,{value:1},{default:o(()=>[...t[5]||(t[5]=[r("کارشناسان فروش",-1)])]),_:1})]),_:1},8,["value"])]),_:1})]),e(_,{label:"متن پیام","validate-status":n.text?"error":"",help:n.text},{default:o(()=>[e(x,{value:a.text,"onUpdate:value":t[2]||(t[2]=i=>a.text=i),"auto-size":{minRows:4,maxRows:8}},null,8,["value"])]),_:1},8,["validate-status","help"]),e(y,{type:"primary",onClick:f},{default:o(()=>[...t[6]||(t[6]=[r("ارسال",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["spinning"])}}});export{S as default};