10 Commits
Author SHA1 Message Date
s.esmaeiliandClaude Opus 5 0e5f9ccd7b user-app: extend the redesign across the account screens
Phase 2, completing the app-wide rollout of the home/product-detail design
language (LESS colour tokens, BEM class names, hairline-bordered cards,
SectionHead, dashed empty states) onto the account side: dashboard, orders,
transactions, profile, login and register.

Reuse over re-implementation: the dashboard's live rate block is now
components/home/RateStrip.vue rather than a second hand-built strip, and
every screen uses components/ui/PageBar.vue for its chrome.

OrderCard and OrderItemCard are restyled to match. OrderItemCard drops its
always-empty note row: our OrderItem schema has no note field (legacy's
per-item note was a real column there; ours is not), so it could only ever
print a dash.

OrdersView swaps ant Tabs for the same scrolling chip rail the rest of the
redesign uses, and its full-screen Modal with hand-written CSS overrides for
a bottom Drawer, matching how every other detail surface opens.

Deleted AppHeader.vue, orphaned once every screen moved to PageBar. Its
shutter animation was driven by transitionFlag, which nothing reads any
more — the router afterEach comment claiming otherwise is corrected rather
than left asserting something untrue, and the now-inert half is flagged in
place. ScrollFetchSearch loses its isFav prop: it gated two empty-state
branches that rendered the identical image, and its only caller
(FavoritesView) now renders its own.

Behaviour is preserved throughout. Orders still reads GET
/customers/:id/orders and filters client-side; transactions still reads
GET /customers/:id/ledger-entries with legacy's CREDIT/DEBIT colour meaning
intact; profile stays read-only over real fields; login keeps the real
customer lookup plus the documented OTP stub; register stays stubbed with
copy that does not claim an account was created.

Verified in a real browser against the running API and native database:
dashboard 4 tiles with a real balance, orders 1 real order card, profile 4
real spec rows, transactions the correct empty state for a customer with no
ledger rows, and login/register confirmed with the session cleared (the
guard bounces a signed-in user away from /login, which is why they needed a
separate pass). No console errors, no horizontal overflow. vue-tsc and vite
build both clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 01:34:30 +03:30
s.esmaeiliandClaude Opus 5 cc62975dd0 user-app: extend the redesign across the purchase path
Applies the home/product-detail design language (LESS colour tokens, BEM
class names, hairline-bordered cards, SectionHead, dashed empty states) to
the screens a shopper actually walks through: search, collection, newest,
cart and favorites.

Two shared pieces are extracted so the language stays consistent rather than
re-typed per screen:
  - components/ui/PageBar.vue — the sticky translucent bar with blur and a
    hairline, lifted from the home screen's own header so every other screen
    gets identical chrome instead of the old dark AppHeader.
  - components/product/ProductCard.vue — the catalogue workhorse card. It is
    deliberately a sibling of home/ShowcaseCard (which keeps its editorial "wide"
    variant and badge) and additionally surfaces stock, which the
    catalogue needs and the home screen does not.

Deleted as orphaned once nothing imported them: ProductList,
ProductVerticalFull, ProductVertical, ProductHorizontal, CollectionCard —
all Tailwind utility soup carried over from the legacy PWA.

Behaviour is preserved throughout; only chrome and cards change. The cart
still posts to the real POST /orders with wagePercent from each item's
pinned variant, still gates on a real session, and still keeps the note
drawer and success step. Search keeps its client-side filtering, the Filters
sheet, category chips and collection tiles. No rial price is printed
anywhere, for the same reason as the rest of the redesign: a finished
piece's price is the live gold rate x weight plus wage, computed at order
time and never stored on the product.

FIXED a regression this redesign introduced before it shipped: dropping
ScrollFetchSearch from the search grid meant all 205 catalogue products
mounted at once (205 cards, 205 images). Both search and newest now render
a 20-item window that grows as the user reaches the end.

Verified in a real browser against the running API and native database, not
just a green build: home 13 cards, search 20 -> 40 -> 60 -> 80 on scroll,
newest 20 -> 40 -> 60, cart empty state, favorites 3 cards behind a seeded
session. All images loaded (0 broken), no horizontal overflow, no console
errors beyond pre-existing vue3-lazyload noise that predates this work.
vue-tsc and vite build both clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 01:01:19 +03:30
s.esmaeiliandClaude Opus 5 f2d83c53df user-app: redesigned home screen and product detail
Design language introduced here and reused across both screens:
  - LESS colour tokens (@ink/@inkSoft/@inkMuted/@inkFaint, @wine/@wineSoft,
    @canvas/@canvasSoft, @hairline/@hairlineSoft) added to
    themeConfig/colors.json and injected globally via vite's modifyVars, so
    scoped <style lang="less"> blocks resolve them with no import
  - BEM-ish scoped class names, hairline-bordered cards at 14-18px radii,
    ink surfaces with a wine accent, dashed-border empty states
  - components/home/: SectionHead, ShowcaseCard, ShowcaseSlider, CategoryRail,
    RateStrip, AccountStrip

Data honesty is deliberate throughout: no rial price is printed for a piece,
because a finished item's price is the live gold rate x weight plus wage,
computed at order time and never stored on the product. Only genuinely
present fields are shown (weight, making-charge percent, stock, category,
brand). Categories and the hero are derived from the real catalogue, so an
empty catalogue renders an empty state rather than placeholder tiles.

Also fixes a real bug in the product detail view: it ran, at module scope,
history.pushState + window.onpopstate = () => history.go(1). Because the
drawer mounts its slot eagerly, that fired for every product card on the
home screen and permanently hijacked the back button for the session.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 23:05:29 +03:30
s.esmaeiliandClaude Opus 5 a12fb0450e api: don't replay the baseline migration on pre-fix databases
The folder-discovery fix in the previous commit surfaced a second problem.
Databases migrated BEFORE that fix recorded the baseline under the name of
the hand-added flat duplicate that used to sit beside it
(prisma/migrations/0001_init.sql). Once the runner started discovering the
real folder (20260910113720_first), it saw a name it had never recorded and
tried to apply the baseline again — against a database that already had it:

  Raw query failed. Code: 42710.
  ERROR: type "AdminRole" already exists

The two files are identical SQL (verified byte-for-byte after normalising
line endings; they differ only by one trailing blank line), so the recorded
legacy name genuinely means that migration is applied. A LEGACY_NAME_ALIASES
map now treats '0001_init.sql' as an already-applied marker for
'20260910113720_first', so upgrading an existing database is a no-op instead
of a crash.

Verified against the local dev database this actually broke on
(postgresql://localhost:5432/gold_banking, which had recorded only the old
flat name): 'npm run dev' in apps/api now logs 'No pending migrations' and
'Nest application successfully started' instead of dying. That database's
tracking table was also reconciled to record both real migration names, and
it was confirmed to already contain both migrations' schema (AdminRole,
City.percent, user_type, CustomerKind all present) — nothing was re-run
against it. The dockerised database is unaffected: it already records the
real names, so the alias is inert there.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 21:44:14 +03:30
s.esmaeiliandClaude Sonnet 5 2b6795d007 api: fix migration runner, serve uploads correctly, add product photos
Three real bugs found and fixed while wiring up product images end-to-end:

1. src/prisma/migrate.ts only discovered flat prisma/migrations/<name>.sql
   files, never Prisma's own folder-per-migration layout
   (<timestamp>_<name>/migration.sql). Every migration created the normal
   way (via 'prisma migrate dev') was silently skipped; only a hand-added
   flat duplicate (prisma/migrations/0001_init.sql, now removed) ever ran.
   This meant schema.prisma had drifted well ahead of what any real deploy
   database actually had (missing columns on City, Customer, Branch,
   Product, several new tables). Fixed to discover both layouts; the
   drift is closed with a new 20260914165255_sync_schema_drift migration.

2. Neither nginx.conf (production) nor vite.config.ts (dev) proxied
   /uploads/ to the API — only /api/. UploadedFile/ProductImage URLs
   (/uploads/<file>, served by main.ts's useStaticAssets OUTSIDE the /api
   prefix) 404'd through both. Both now proxy /uploads/ the same way /api/
   already was.

3. docker-compose.yml's api service had no volume for storage/uploads, so
   every uploaded file — and by extension every ProductImage row pointing
   at one — was lost on the next container recreate/redeploy. Added a
   named volume.

Also: main.ts's static file serving now sets Content-Type: image/avif
explicitly (serve-static's bundled mime table predates .avif and served it
as application/octet-stream; browsers rendered it anyway by sniffing, but
a stricter client would not have).

Product photos: copied 15 real jewelry photos into the uploads volume,
registered them as UploadedFile rows, and assigned each of the 5 existing
Product rows a randomly picked one (duplicates allowed, per request),
replacing their /img/no-items.png placeholder ProductImage row. Verified
end-to-end in a real browser against the real containerized API+DB: logged
in, opened the admin product list, confirmed all 5 rows render their photo
(naturalWidth/Height populated, network 200s, no console errors).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-14 20:56:17 +03:30
s.esmaeiliandClaude Sonnet 5 a2ab9ba192 admin-panel: drop six more redundant add entries from the sidebar
Each now has an add button at the top of its own list page, so the nav
entry duplicated it:
  - 'افزودن دسته بندی'          (/category/add)
  - 'وارد کردن سند مالی مشتری'  (/add/findoc)
  - 'تعریف تخفیف  تک'           (/major/promotion/tak/add)
  - 'تعریف تخفیف  عمده'         (/major/promotion/add)
  - 'افزودن فاکتور'             (/invoice/add)
  - 'افزودن شهر'                (/city/create)

Only adminMenu is touched; all six routes still exist and still work as a
direct-link fallback. Parent submenus keep their remaining children
('تخفیف اتوماتیک' and 'لیست تخفیفات ' both still sit under 'تخفیفات', for
instance).

Verified in a real browser: menu items 26 -> 20, none of the six labels
render, all five parent submenus (دسته بندی ها، اسناد مالی، تخفیفات، فاکتور
انتقال، شهر ها) still present with their list children, icons unchanged at
16, no console errors. Committed dist/ artifact rebuilt to match.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-14 19:43:40 +03:30
s.esmaeiliandClaude Opus 5 d15129168a admin-panel: drop the four redundant add entries from the sidebar
Each of these now has an add button at the top of its own list page, so the
nav entry duplicated it:
  - 'اضافه کردن شخص'  (/customer/add)
  - 'افزودن شعب'      (/branch/add)
  - 'افزودن کارگاه'    (/workshop/add)
  - 'افزودن مدیر'      (/user/create)

Only the adminMenu tree is touched; branchMenu keeps its own /customer/add
entry, since the branch build has no converted add-modal. All four routes
still exist and still work as a direct-link fallback, and the parent
submenus keep their remaining children (including 'دسترسی ها' under مدیران).

Verified in a real browser: menu items 30 -> 26, none of the four labels
render, all four parent submenus still present with their list children,
icons unchanged at 16, no console errors. Committed dist/ artifact rebuilt
to match (force-added, as it is gitignored but deliberately tracked for
Dokploy).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 17:45:30 +03:30
s.esmaeiliandClaude Opus 5 4b038c0518 admin-panel: rebuild the committed deploy artifact from current source
dist/ is gitignored by apps/admin-panel/.gitignore but is deliberately
committed for Dokploy copy-only deploys (see root .gitignore's note), so it
is force-added. The previous artifact was a pre-port prototype build; the
previous commit removed its two stale assets without being able to add the
new ones, leaving index.html pointing at files absent from git. This restores
a self-consistent artifact built from current source.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 17:35:13 +03:30
s.esmaeiliandClaude Opus 5 9b6b54dc71 admin-panel: build into the folder the Docker image actually serves
The Dockerfile does `COPY dist /usr/share/nginx/html` and nginx serves that
folder's root, but vite's outDir was 'dist/export' (carried over from legacy's
vue.config.js). So the deployed root kept serving whatever index.html had been
committed at dist/ — a stale pre-port prototype build (lang="en", title
"Gold Bank — Admin Panel", no ant-design-vue at all, committed 2026-09-10 in
cea3b80). That artifact, not the current source, renders as an unstyled stack
of bullets and bare tables.

outDir is now 'dist' (and 'branchDist'), matching what the image serves and
matching apps/user-app's convention.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 17:30:04 +03:30
s.esmaeiliandClaude Opus 5 acc41c21d9 admin-panel: import ant-design-vue 4 reset.css (fixes unstyled page)
The ADV4 upgrade dropped the old `ant-design-vue/dist/antd.less` import but
never added its replacement. ADV4 injects each COMPONENT's styles at runtime
via CSS-in-JS, but NOT the global baseline — that ships separately as
dist/reset.css and must be imported explicitly. Without it the page lost
box-sizing, the body margin reset and the browser default list/heading
resets, so the layout rendered unstyled.

Verified in a real headless browser this time, not just a green build:
reset.css now resolves through LESS and its rules are present in the built
CSS, the CSS-in-JS engine injects component styles (14 <style> tags on the
login page), and buttons/inputs/cards compute real ant metrics with dir=rtl.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 17:22:46 +03:30
229 changed files with 52400 additions and 3120 deletions
+1
View File
@@ -0,0 +1 @@
import{_ as o}from"./Add.vue_vue_type_script_setup_true_lang-CSRRWtPo.js";import"./index-BhesYFRn.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang--1LOdW_Y.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-B_9tVlpu.js";export{o as default};
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
import{_ as o}from"./AddBranches.vue_vue_type_script_setup_true_lang-CRWNlB2A.js";import"./index-BhesYFRn.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang--1LOdW_Y.js";export{o as default};
@@ -0,0 +1 @@
import{d as q,v as G,x as c,f as v,g as s,n as R,u as H,r as S,y as C,e as i,o as p,h as $,c as n,i as z,k as M,F as N,l as g,A as I,z as O,a as J,t as V}from"./index-BhesYFRn.js";import{_ as K}from"./BaseFormModal.vue_vue_type_script_setup_true_lang--1LOdW_Y.js";const P={class:"grid-2"},Q={class:"grid-2"},Y=q({__name:"AddBranches",props:{open:{type:Boolean},id:{}},emits:["update:open","success"],setup(y,{emit:j}){const h=y,w=j,f=h.open!==void 0,A=H(),E=J(),d=f?h.id:A.params.id,m=S(!1),_=S([]),t=C({name:"",phone:"",address:"",user_id:void 0}),r=C({});function k(l,e){var o,u;return String(((u=(o=e==null?void 0:e.children)==null?void 0:o[0])==null?void 0:u.children)??"").includes(l)}async function b(){var l,e;if(Object.keys(r).forEach(o=>delete r[o]),!t.name){r.name="لطفا مقدار را وارد کنید";return}try{m.value=!0,d?await c.put(`branch/${d}`,t):await c.post("branch",t),O.info("اطلاعات با موفقیت به ثبت رسید."),f?(w("success"),w("update:open",!1)):E.push("/branch/list")}catch(o){O.error(((e=(l=o==null?void 0:o.response)==null?void 0:l.data)==null?void 0:e.message)??"خطا در ثبت اطلاعات.")}finally{m.value=!1}}return G(async()=>{try{const{data:l}=await c.get("user/list");_.value=l}catch(l){console.log(l)}if(d)try{const{data:l}=await c.get(`branch/${d}`);Object.assign(t,{name:l.name??"",phone:l.phone??"",address:l.address??"",user_id:l.user_id??void 0})}catch(l){console.log(l)}}),(l,e)=>{const o=i("a-input"),u=i("a-form-item"),U=i("a-select-option"),x=i("a-select"),B=i("a-textarea"),F=i("a-button"),D=i("a-card"),L=i("a-form"),T=i("a-spin");return f?(p(),v(K,{key:0,open:!!y.open,id:R(d),"add-title":"افزودن شعبه","edit-title":"ویرایش شعبه",loading:m.value,submitting:m.value,"onUpdate:open":e[4]||(e[4]=a=>l.$emit("update:open",a)),onSubmit:b},{default:s(()=>[$("div",P,[n(u,{label:"نام شعبه","validate-status":r.name?"error":"",help:r.name},{default:s(()=>[n(o,{value:t.name,"onUpdate:value":e[0]||(e[0]=a=>t.name=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),n(u,{label:"تلفن شعبه"},{default:s(()=>[n(o,{value:t.phone,"onUpdate:value":e[1]||(e[1]=a=>t.phone=a)},null,8,["value"])]),_:1}),n(u,{label:"مدیر"},{default:s(()=>[n(x,{value:t.user_id,"onUpdate:value":e[2]||(e[2]=a=>t.user_id=a),"show-search":"","allow-clear":"",placeholder:"انتخاب کنید","filter-option":k},{default:s(()=>[(p(!0),z(N,null,M(_.value,a=>(p(),v(U,{key:a.id,value:a.id},{default:s(()=>[g(V(a.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})]),n(u,{label:"آدرس"},{default:s(()=>[n(B,{value:t.address,"onUpdate:value":e[3]||(e[3]=a=>t.address=a),"auto-size":{minRows:2,maxRows:5}},null,8,["value"])]),_:1})]),_:1},8,["open","id","loading","submitting"])):(p(),v(T,{key:1,spinning:m.value},{default:s(()=>[n(L,{layout:"vertical",onSubmit:I(b,["prevent"])},{default:s(()=>[n(D,{title:R(d)?"ویرایش شعبه":"افزودن شعبه",class:"mb-base"},{default:s(()=>[$("div",Q,[n(u,{label:"نام شعبه","validate-status":r.name?"error":"",help:r.name},{default:s(()=>[n(o,{value:t.name,"onUpdate:value":e[5]||(e[5]=a=>t.name=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),n(u,{label:"تلفن شعبه"},{default:s(()=>[n(o,{value:t.phone,"onUpdate:value":e[6]||(e[6]=a=>t.phone=a)},null,8,["value"])]),_:1}),n(u,{label:"مدیر"},{default:s(()=>[n(x,{value:t.user_id,"onUpdate:value":e[7]||(e[7]=a=>t.user_id=a),"show-search":"","allow-clear":"",placeholder:"انتخاب کنید","filter-option":k},{default:s(()=>[(p(!0),z(N,null,M(_.value,a=>(p(),v(U,{key:a.id,value:a.id},{default:s(()=>[g(V(a.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})]),n(u,{label:"آدرس"},{default:s(()=>[n(B,{value:t.address,"onUpdate:value":e[8]||(e[8]=a=>t.address=a),"auto-size":{minRows:2,maxRows:5}},null,8,["value"])]),_:1}),n(F,{type:"primary",onClick:b},{default:s(()=>[...e[9]||(e[9]=[g("ثبت اطلاعات",-1)])]),_:1})]),_:1},8,["title"])]),_:1})]),_:1},8,["spinning"]))}}});export{Y as _};
+1
View File
@@ -0,0 +1 @@
import{_ as p}from"./bulkCustomer.vue_vue_type_script_setup_true_lang-TpkO_mzJ.js";import{d as u,b as l,i as f,h as b,c as n,g as e,e as a,o as s,f as r,j as c}from"./index-BhesYFRn.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang--1LOdW_Y.js";const h={id:"page-user-view"},k={id:"user-data"},V=u({__name:"AddCustomer",setup(B){const _=l(),t=o=>!!_.hasPermission(o);return(o,C)=>{const d=a("a-tab-pane"),m=a("a-tabs"),i=a("a-card");return s(),f("div",h,[b("div",k,[n(i,{class:"mb-base"},{default:e(()=>[t("persons.create")?(s(),r(m,{key:0},{default:e(()=>[t("persons.create.client")?(s(),r(d,{key:"omde",tab:"مشتری عمده"},{default:e(()=>[n(p)]),_:1})):c("",!0)]),_:1})):c("",!0)]),_:1})])])}}});export{V as default};
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
.mt-4[data-v-ec17a85d]{margin-top:1rem}.mt-5[data-v-ec17a85d]{margin-top:1.25rem}
+1
View File
@@ -0,0 +1 @@
.grid-1[data-v-78567b99]{display:grid;grid-template-columns:1fr}.flex-1[data-v-78567b99]{flex:1}.mb-8[data-v-78567b99]{margin-bottom:2rem}.overflow-auto[data-v-78567b99]{overflow:auto}
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
import{_ as o}from"./AddWorkshop.vue_vue_type_script_setup_true_lang-_Y4g_duj.js";import"./index-BhesYFRn.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang--1LOdW_Y.js";export{o as default};
@@ -0,0 +1 @@
import{d as N,v as O,x as v,f as b,g as n,n as g,u as S,r as V,y,e as p,o as U,h as x,c as o,l as A,A as E,z as c,a as T}from"./index-BhesYFRn.js";import{_ as W}from"./BaseFormModal.vue_vue_type_script_setup_true_lang--1LOdW_Y.js";const q={class:"grid-3"},D={class:"grid-3"},H=N({__name:"AddWorkshop",props:{open:{type:Boolean},id:{}},emits:["update:open","success"],setup(f,{emit:R}){const h=f,w=R,_=h.open!==void 0,B=S(),C=T(),d=_?h.id:B.params.id,i=V(!1),e=y({workshop_name:"",workshop_phone:"",workshop_address:"",user_fname:"",user_lname:"",user_phone:""}),u=y({});async function m(){var t,a;if(Object.keys(u).forEach(l=>delete u[l]),e.workshop_name||(u.workshop_name="لطفا مقدار را وارد کنید"),(e.user_fname||e.user_lname)&&!e.user_phone&&(u.user_phone="موبایل سرپرست کارگاه الزامی است"),!Object.keys(u).length)try{i.value=!0,d?await v.put(`workshop/${d}`,e):await v.post("workshop",e),c.info("اطلاعات با موفقیت به ثبت رسید."),_?(w("success"),w("update:open",!1)):C.push("/workshop/list")}catch(l){c.error(((a=(t=l==null?void 0:l.response)==null?void 0:t.data)==null?void 0:a.message)??"خطا در ثبت اطلاعات.")}finally{i.value=!1}}return O(async()=>{if(d)try{const{data:t}=await v.get(`workshop/${d}`);Object.assign(e,{workshop_name:t.workshop_name??t.name??"",workshop_phone:t.workshop_phone??t.phone??"",workshop_address:t.workshop_address??t.address??"",user_fname:t.user_fname??"",user_lname:t.user_lname??"",user_phone:t.user_phone??""})}catch(t){console.log(t)}}),(t,a)=>{const l=p("a-input"),r=p("a-form-item"),k=p("a-textarea"),$=p("a-button"),j=p("a-card"),z=p("a-form"),M=p("a-spin");return _?(U(),b(W,{key:0,open:!!f.open,id:g(d),"add-title":"افزودن کارگاه","edit-title":"ویرایش کارگاه",loading:i.value,submitting:i.value,width:"lg","onUpdate:open":a[6]||(a[6]=s=>t.$emit("update:open",s)),onSubmit:m},{default:n(()=>[x("div",q,[o(r,{label:"نام کارگاه","validate-status":u.workshop_name?"error":"",help:u.workshop_name},{default:n(()=>[o(l,{value:e.workshop_name,"onUpdate:value":a[0]||(a[0]=s=>e.workshop_name=s)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"تلفن کارگاه"},{default:n(()=>[o(l,{value:e.workshop_phone,"onUpdate:value":a[1]||(a[1]=s=>e.workshop_phone=s)},null,8,["value"])]),_:1}),o(r,{label:"نام سرپرست کارگاه"},{default:n(()=>[o(l,{value:e.user_fname,"onUpdate:value":a[2]||(a[2]=s=>e.user_fname=s)},null,8,["value"])]),_:1}),o(r,{label:"نام خانوادگی سرپرست کارگاه"},{default:n(()=>[o(l,{value:e.user_lname,"onUpdate:value":a[3]||(a[3]=s=>e.user_lname=s)},null,8,["value"])]),_:1}),o(r,{label:"موبایل سرپرست کارگاه","validate-status":u.user_phone?"error":"",help:u.user_phone},{default:n(()=>[o(l,{value:e.user_phone,"onUpdate:value":a[4]||(a[4]=s=>e.user_phone=s)},null,8,["value"])]),_:1},8,["validate-status","help"])]),o(r,{label:"آدرس"},{default:n(()=>[o(k,{value:e.workshop_address,"onUpdate:value":a[5]||(a[5]=s=>e.workshop_address=s),"auto-size":{minRows:2,maxRows:5}},null,8,["value"])]),_:1})]),_:1},8,["open","id","loading","submitting"])):(U(),b(M,{key:1,spinning:i.value},{default:n(()=>[o(z,{layout:"vertical",onSubmit:E(m,["prevent"])},{default:n(()=>[o(j,{title:g(d)?"ویرایش کارگاه":"افزودن کارگاه",class:"mb-base"},{default:n(()=>[x("div",D,[o(r,{label:"نام کارگاه","validate-status":u.workshop_name?"error":"",help:u.workshop_name},{default:n(()=>[o(l,{value:e.workshop_name,"onUpdate:value":a[7]||(a[7]=s=>e.workshop_name=s)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"تلفن کارگاه"},{default:n(()=>[o(l,{value:e.workshop_phone,"onUpdate:value":a[8]||(a[8]=s=>e.workshop_phone=s)},null,8,["value"])]),_:1}),o(r,{label:"نام سرپرست کارگاه"},{default:n(()=>[o(l,{value:e.user_fname,"onUpdate:value":a[9]||(a[9]=s=>e.user_fname=s)},null,8,["value"])]),_:1}),o(r,{label:"نام خانوادگی سرپرست کارگاه"},{default:n(()=>[o(l,{value:e.user_lname,"onUpdate:value":a[10]||(a[10]=s=>e.user_lname=s)},null,8,["value"])]),_:1}),o(r,{label:"موبایل سرپرست کارگاه","validate-status":u.user_phone?"error":"",help:u.user_phone},{default:n(()=>[o(l,{value:e.user_phone,"onUpdate:value":a[11]||(a[11]=s=>e.user_phone=s)},null,8,["value"])]),_:1},8,["validate-status","help"])]),o(r,{label:"آدرس"},{default:n(()=>[o(k,{value:e.workshop_address,"onUpdate:value":a[12]||(a[12]=s=>e.workshop_address=s),"auto-size":{minRows:2,maxRows:5}},null,8,["value"])]),_:1}),o($,{type:"primary",onClick:m},{default:n(()=>[...a[13]||(a[13]=[A("ثبت اطلاعات",-1)])]),_:1})]),_:1},8,["title"])]),_:1})]),_:1},8,["spinning"]))}}});export{H as _};
+1
View File
@@ -0,0 +1 @@
import{b as r,O as i,_ as m}from"./omdeListModel-ft6VJtjG.js";import{d as n,f as a,n as t,o as s}from"./index-BhesYFRn.js";import"./model-d1Prdbon.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListPageHeader-CAhM3N4J.js";import"./bulkCustomer.vue_vue_type_script_setup_true_lang-TpkO_mzJ.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang--1LOdW_Y.js";import"./UnorderedListOutlined-wfihx1Ro.js";const x=n({__name:"BankerList",setup(l){const e=i.banker.title,o=r("banker");return(p,_)=>(s(),a(m,{title:t(e),model:t(o)},null,8,["title","model"]))}});export{x as default};
@@ -0,0 +1 @@
import{d as r,f as g,g as o,e as a,o as k,c as l,U as x}from"./index-BhesYFRn.js";const b=r({__name:"BaseFormModal",props:{open:{type:Boolean},id:{default:void 0},addTitle:{},editTitle:{},loading:{type:Boolean,default:!1},submitting:{type:Boolean,default:!1},width:{default:"md"},okText:{default:"ثبت اطلاعات"}},emits:["update:open","submit","cancel"],setup(e,{emit:d}){const n=d,s={sm:520,md:720,lg:900,xl:1140};function m(t){n("update:open",t)}function c(){n("update:open",!1),n("cancel")}return(t,i)=>{const f=a("a-form"),u=a("a-spin"),p=a("a-modal");return k(),g(p,{open:e.open,title:e.id?e.editTitle:e.addTitle,width:s[e.width],"confirm-loading":e.submitting,"ok-text":e.okText,"cancel-text":"انصراف","mask-closable":!1,"onUpdate:open":m,onOk:i[0]||(i[0]=T=>t.$emit("submit")),onCancel:c},{default:o(()=>[l(u,{spinning:e.loading},{default:o(()=>[l(f,{layout:"vertical"},{default:o(()=>[x(t.$slots,"default")]),_:3})]),_:3},8,["spinning"])]),_:3},8,["open","title","width","confirm-loading","ok-text"])}}});export{b as _};
@@ -0,0 +1 @@
import{d as P,v as S,x as u,i as m,c as o,g as l,r as _,e as c,y as T,o as i,h as $,F as w,k as C,l as g,z,M as k,f as x,t as B}from"./index-BhesYFRn.js";const D={id:"page-user-list"},E={class:"grid-3"},A=P({__name:"ChangePercent",setup(j){const y=_([]),b=_([]),p=_("-"),f=_(!1),a=T({category_id:void 0,brand_id:void 0,percent:void 0});function h(t,e){var r,s;return String(((s=(r=e==null?void 0:e.children)==null?void 0:r[0])==null?void 0:s.children)??"").toLowerCase().indexOf(t.toLowerCase())>=0}async function v(){try{const{data:t}=await u.post("change/percent/count",{category_id:a.category_id,brand_id:a.brand_id});p.value=t.count}catch(t){console.log("e ==> ",t)}}async function L(){if(a.percent===void 0||a.percent===null){z.error("لطفا اجرت درصدی را وارد کنید");return}try{f.value=!0;const{data:t}=await u.post("change/all",{percent:a.percent,category_id:a.category_id,brand_id:a.brand_id});k.success({title:"تغییرات با موفقیت اعمال شد",okText:"بستن"}),p.value=t.updated}catch(t){k.success({title:"خطا در اعمال تغییرات"}),console.log(t)}finally{f.value=!1}}return S(async()=>{try{const[t,e]=await Promise.all([u.get("brand"),u.post("category")]);y.value=t.data,b.value=(e.data.rows??e.data).map(r=>({id:r.id,title:r.type_str?`${r.title} (${r.type_str}) `:r.title}))}catch(t){console.log(t)}v()}),(t,e)=>{const r=c("a-select-option"),s=c("a-select"),d=c("a-form-item"),M=c("a-input"),N=c("a-input-number"),U=c("a-button"),V=c("a-popconfirm"),F=c("a-form"),O=c("a-card");return i(),m("div",D,[o(O,{title:"تغییر درصد محصولات"},{default:l(()=>[o(F,{layout:"vertical"},{default:l(()=>[$("div",E,[o(d,{label:"دسته بندی"},{default:l(()=>[o(s,{value:a.category_id,"onUpdate:value":e[0]||(e[0]=n=>a.category_id=n),"allow-clear":"","show-search":"",placeholder:"انتخاب کنید","filter-option":h,onChange:v},{default:l(()=>[(i(!0),m(w,null,C(b.value,n=>(i(),x(r,{key:n.id,value:n.id},{default:l(()=>[g(B(n.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),o(d,{label:"برند"},{default:l(()=>[o(s,{value:a.brand_id,"onUpdate:value":e[1]||(e[1]=n=>a.brand_id=n),"allow-clear":"","show-search":"",placeholder:"انتخاب کنید","filter-option":h,onChange:v},{default:l(()=>[(i(!0),m(w,null,C(y.value,n=>(i(),x(r,{key:n.id,value:n.id},{default:l(()=>[g(B(n.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),o(d,{label:"تعداد یافت شده"},{default:l(()=>[o(M,{value:p.value,disabled:""},null,8,["value"])]),_:1}),o(d,{label:"اجرت درصدی"},{default:l(()=>[o(N,{value:a.percent,"onUpdate:value":e[2]||(e[2]=n=>a.percent=n),class:"w-full",step:.1},null,8,["value"])]),_:1})]),o(V,{title:"آیا از اعمال تغییرات مطمئن هستید؟","ok-text":"بله","cancel-text":"خیر",onConfirm:L},{default:l(()=>[o(U,{type:"primary",loading:f.value},{default:l(()=>[...e[3]||(e[3]=[g("اعمال تغییرات",-1)])]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1})])}}});export{A as default};
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
.mr-3[data-v-17bd422b]{margin-left:.75rem}.comments-list ul[data-v-17bd422b]{list-style:none;padding-right:0}.comment-item[data-v-17bd422b]{display:flex;gap:1rem;flex-wrap:wrap;margin-bottom:1rem}.comment-item .img[data-v-17bd422b]{width:65px;height:65px;display:flex;align-items:center;justify-content:center}.comment-body[data-v-17bd422b]{flex:1;min-width:240px}.comment-body .time[data-v-17bd422b]{font-size:12px;color:#888}.border[data-v-17bd422b]{border:1px solid grey;border-radius:50%}
+1
View File
@@ -0,0 +1 @@
.row[data-v-5f575189]{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}.tags[data-v-5f575189]{display:flex;gap:.5rem;flex-wrap:wrap}.slide[data-v-5f575189]{border:1px solid #f0f0f0;border-radius:6px;padding:.75rem;margin-bottom:.75rem}.mobile-c[data-v-5f575189]{margin:0 0 .5rem}.mt-4[data-v-5f575189]{margin-top:1rem}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{c as u,I as l}from"./index-BhesYFRn.js";var d={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-792 72h752v120H136V232zm752 560H136V440h752v352zm-237-64h165c4.4 0 8-3.6 8-8v-72c0-4.4-3.6-8-8-8H651c-4.4 0-8 3.6-8 8v72c0 4.4 3.6 8 8 8z"}}]},name:"credit-card",theme:"outlined"};function c(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.forEach(function(a){o(r,a,e[a])})}return r}function o(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var i=function(t,e){var n=c({},t,e.attrs);return u(l,c({},n,{icon:d}),null)};i.displayName="CreditCardOutlined";i.inheritAttrs=!1;export{i as C};
@@ -0,0 +1 @@
.stats[data-v-0a19293c]{display:flex;gap:.5rem}.mt-4[data-v-0a19293c]{margin-top:1rem}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{j as y}from"./filters-ZZ3U37Dy.js";import{d as j,v as k,x as C,f as l,g as t,r as I,y as b,e,o,c as d,l as i,t as _,i as v,n as w,F as h,j as B}from"./index-BhesYFRn.js";import"./index-DSwQVDho.js";const F=j({__name:"DashboardAnalytics",setup(N){const n=I(!1),r=b({lastOrder:[]}),m=[{title:"شماره سفارش",dataIndex:"name"},{title:"مشتری",dataIndex:"customer"},{title:"وزن",dataIndex:"w"},{title:"وضعیت",dataIndex:"sts_str"},{title:"تاریخ",dataIndex:"caj"}];function p(a){return{success:"green",warning:"orange",danger:"red",primary:"blue"}[a]??""}return k(async()=>{try{n.value=!0;const{data:a}=await C.get("get-analytics-tak");Object.assign(r,a)}catch(a){console.error(a)}finally{n.value=!1}}),(a,O)=>{const u=e("a-tag"),g=e("a-table"),f=e("a-card"),x=e("a-spin");return o(),l(x,{spinning:n.value},{default:t(()=>[d(f,{title:"سفارشات هفته جاری"},{default:t(()=>[d(g,{size:"small","data-source":r.lastOrder,columns:m,pagination:{pageSize:15},"row-key":"id"},{bodyCell:t(({column:c,record:s})=>[c.dataIndex==="sts_str"?(o(),l(u,{key:0,color:p(s.statusColor)},{default:t(()=>[i(_(s.sts_str),1)]),_:2},1032,["color"])):c.dataIndex==="caj"?(o(),v(h,{key:1},[i(_(w(y)(s.caj)),1)],64)):B("",!0)]),_:1},8,["data-source"])]),_:1})]),_:1},8,["spinning"])}}});export{F as default};
@@ -0,0 +1 @@
.stat-card[data-v-ebefdc7b]{height:100%}.stat-row[data-v-ebefdc7b]{display:flex;align-items:center;gap:1rem}.stat-icon[data-v-ebefdc7b]{display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:50%;font-size:22px;flex-shrink:0}.icon-primary[data-v-ebefdc7b]{background:#1c2d561a;color:#1c2d56}.icon-warning[data-v-ebefdc7b]{background:#ff9f431f;color:#ff9f43}.icon-success[data-v-ebefdc7b]{background:#28c76f1f;color:#28c76f}.icon-danger[data-v-ebefdc7b]{background:#ea54551f;color:#ea5455}.stat-value[data-v-ebefdc7b]{margin:0;font-size:20px;color:#1c2d56}.stat-title[data-v-ebefdc7b]{font-size:12px;color:#888}.mt-4[data-v-1ff1473f]{margin-top:1rem}
@@ -0,0 +1 @@
import{d as y,o as d,f as _,g as e,h as n,s as N,m as D,t as c,p as j,e as o,v as k,x as $,r as L,y as z,c as a,l as u,i as T,n as V,F as E,j as M}from"./index-BhesYFRn.js";import{B as v,D as F,S as U,T as q}from"./TeamOutlined-D8v3LQ4l.js";import{_ as O}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{j as A}from"./filters-ZZ3U37Dy.js";import"./index-DSwQVDho.js";const G={class:"stat-row"},H={class:"stat-value"},J={class:"stat-title"},K=y({__name:"StatisticsCardLine",props:{icon:{},statistic:{},statisticTitle:{},color:{default:"primary"},hideChart:{type:Boolean,default:!0}},setup(i){const l=i,t={UsersIcon:q,ShoppingBagIcon:U,DollarSignIcon:F,BarChartIcon:v},p=j(()=>t[l.icon??""]??v);return(C,I)=>{const s=o("a-card");return d(),_(s,{class:"stat-card"},{default:e(()=>[n("div",G,[n("span",{class:N(["stat-icon",`icon-${i.color}`])},[(d(),_(D(p.value)))],2),n("div",null,[n("h2",H,c(i.statistic),1),n("span",J,c(i.statisticTitle),1)])])]),_:1})}}}),h=O(K,[["__scopeId","data-v-ebefdc7b"]]),P={class:"grid-3"},Q={class:"grid-2 mt-4"},R=y({__name:"DashboardECommerce",setup(i){const l=L(!1),t=z({customerCount:0,allgram:0,ordercount:0,reagent:[],lastOrder:[],sumLastOrder:0,sumLastOrderMonth:0}),p=[{title:"کارشناس فروش",dataIndex:"name"},{title:"میزان فروش (گرم)",dataIndex:"grams_sell"},{title:"تعداد سفارش",dataIndex:"order_count"}],C=[{title:"شماره سفارش",dataIndex:"name"},{title:"مشتری",dataIndex:"customer"},{title:"وزن",dataIndex:"w"},{title:"وضعیت",dataIndex:"sts_str"},{title:"تاریخ",dataIndex:"caj"}];function I(s){return{success:"green",warning:"orange",danger:"red",primary:"blue"}[s]??""}return k(async()=>{try{l.value=!0;const{data:s}=await $.get("get-analytics");Object.assign(t,s),t.reagent.sort((m,r)=>Number(r.grams_sell)-Number(m.grams_sell)),t.lastOrder.sort((m,r)=>Number(r.w)-Number(m.w))}catch(s){console.error(s)}finally{l.value=!1}}),(s,m)=>{const r=o("a-table"),g=o("a-card"),x=o("a-descriptions-item"),w=o("a-descriptions"),B=o("a-tag"),S=o("a-spin");return d(),_(S,{spinning:l.value},{default:e(()=>[n("div",P,[a(h,{icon:"UsersIcon",color:"warning",statistic:`${t.customerCount} نفر `,"statistic-title":"تعداد مشتریان ثبت نامی در 30 روز گذشته"},null,8,["statistic"]),a(h,{icon:"ShoppingBagIcon",statistic:`${t.allgram} گرم `,"statistic-title":"طلای فروش رفته در 30 روز گذشته"},null,8,["statistic"]),a(h,{icon:"ShoppingBagIcon",color:"warning",statistic:`${t.ordercount} سفارش `,"statistic-title":"تعداد سفارشات 30 روز گذشته"},null,8,["statistic"])]),n("div",Q,[a(g,{title:"عملکرد کارشناسان فروش"},{default:e(()=>[a(r,{size:"small","data-source":t.reagent,columns:p,pagination:!1,"row-key":"id"},null,8,["data-source"])]),_:1}),a(g,{title:"میزان فروش"},{default:e(()=>[a(w,{bordered:"",size:"small",column:1},{default:e(()=>[a(x,{label:"تعداد سفارش (۳۰ روز)"},{default:e(()=>[u(c(t.sumLastOrder),1)]),_:1}),a(x,{label:"مجموع وزن (۳۰ روز)"},{default:e(()=>[u(c(t.sumLastOrderMonth)+" گرم ",1)]),_:1})]),_:1})]),_:1})]),a(g,{title:"سفارشات هفته جاری",class:"mt-4"},{default:e(()=>[a(r,{size:"small","data-source":t.lastOrder,columns:C,pagination:{pageSize:10},"row-key":"id"},{bodyCell:e(({column:b,record:f})=>[b.dataIndex==="sts_str"?(d(),_(B,{key:0,color:I(f.statusColor)},{default:e(()=>[u(c(f.sts_str),1)]),_:2},1032,["color"])):b.dataIndex==="caj"?(d(),T(E,{key:1},[u(c(V(A)(f.caj)),1)],64)):M("",!0)]),_:1},8,["data-source"])]),_:1})]),_:1},8,["spinning"])}}}),at=O(R,[["__scopeId","data-v-1ff1473f"]]);export{at as default};
+1
View File
@@ -0,0 +1 @@
.hint[data-v-42b77d70]{color:#ea5455;font-size:11px}
+1
View File
@@ -0,0 +1 @@
import{m}from"./index-DSwQVDho.js";import{d as _,w as V,o as r,f as Y,g as h,c as D,i as j,t as M,j as b,r as i,p as x,e as d}from"./index-BhesYFRn.js";import{_ as y}from"./_plugin-vue_export-helper-DlAUqK2U.js";const g={key:0,class:"hint"},k=_({__name:"DateInput",props:{label:{},modelValue:{},placeholder:{default:"مثال: ۱۴۰۳/۰۵/۱۲"}},emits:["update:modelValue"],setup(o,{emit:p}){const n=o,u=p,t=i(void 0),a=i(""),f=x(()=>{if(t.value!==void 0)return t.value;if(!n.modelValue)return"";const e=m(n.modelValue);return e.isValid()?e.format("jYYYY/jMM/jDD"):""});V(()=>n.modelValue,()=>{t.value=void 0});function v(e){if(t.value=e,!e){a.value="",u("update:modelValue",void 0);return}const c=e.replace(/[۰-۹]/g,s=>String("۰۱۲۳۴۵۶۷۸۹".indexOf(s))),l=m(c,"jYYYY/jMM/jDD");l.isValid()?(a.value="",u("update:modelValue",l.format("YYYY-MM-DD"))):a.value="تاریخ معتبر نیست"}return(e,c)=>{const l=d("a-input"),s=d("a-form-item");return r(),Y(s,{label:o.label},{default:h(()=>[D(l,{value:f.value,placeholder:o.placeholder,"allow-clear":"","onUpdate:value":v},null,8,["value","placeholder"]),a.value?(r(),j("small",g,M(a.value),1)):b("",!0)]),_:1},8,["label"])}}}),w=y(k,[["__scopeId","data-v-42b77d70"]]);export{w as D};
+1
View File
@@ -0,0 +1 @@
import{_ as o}from"./Add.vue_vue_type_script_setup_true_lang-CSRRWtPo.js";import{d as t,f as e,o as r}from"./index-BhesYFRn.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang--1LOdW_Y.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-B_9tVlpu.js";const i=t({__name:"Edit",setup(a){return(_,m)=>(r(),e(o))}});export{i as default};
+1
View File
@@ -0,0 +1 @@
import{_ as e}from"./AddBranches.vue_vue_type_script_setup_true_lang-CRWNlB2A.js";import{d as o,f as r,o as t}from"./index-BhesYFRn.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang--1LOdW_Y.js";const p=o({__name:"EditBranches",setup(a){return(n,s)=>(t(),r(e))}});export{p as default};
@@ -0,0 +1 @@
import{_ as o}from"./bulkCustomer.vue_vue_type_script_setup_true_lang-TpkO_mzJ.js";import{d as e,f as t,o as r}from"./index-BhesYFRn.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang--1LOdW_Y.js";const p=e({__name:"EditBulkCustomer",setup(a){return(s,_)=>(r(),t(o))}});export{p as default};
+1
View File
@@ -0,0 +1 @@
import o from"./AddInvoice-Cuu3GiDW.js";import{d as e,f as t,o as r}from"./index-BhesYFRn.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang--1LOdW_Y.js";import"./model-d1Prdbon.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const d=e({__name:"EditInvoice",setup(n){return(p,c)=>(r(),t(o))}});export{d as default};
+1
View File
@@ -0,0 +1 @@
import e from"./AddProduct-Db8uhVD5.js";import{d as o,i as t,c as r,o as c}from"./index-BhesYFRn.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const i=o({__name:"EditProduct",setup(a){return(n,d)=>(c(),t("div",null,[r(e)]))}});export{i as default};
+1
View File
@@ -0,0 +1 @@
.avatar-cell[data-v-9df5bea6]{grid-row:span 2;display:flex;justify-content:center}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{d as C,u as N,a as V,v as D,x as m,e as r,o as p,f as _,g as i,c as s,A as F,n as M,h as z,i as A,F as I,k as L,l as b,t as Q,r as w,y as k,z as x}from"./index-BhesYFRn.js";const T={class:"grid-3"},f="لطفا مقدار را وارد کنید",q=C({__name:"singleCustomer",setup(S){const v=N(),h=V(),c=v.params.id,d=w(!1),g=w([]),a=k({fname:"",lname:"",phone:"",city_id:void 0}),l=k({});function E(t,e){var n,u;return String(((u=(n=e==null?void 0:e.children)==null?void 0:n[0])==null?void 0:u.children)??"").includes(t)}async function y(){var t,e;if(Object.keys(l).forEach(n=>delete l[n]),a.fname||(l.fname=f),a.lname||(l.lname=f),a.phone||(l.phone=f),!Object.keys(l).length)try{d.value=!0;const n={...a,name:`${a.fname} ${a.lname}`.trim(),mobile:a.phone};c?await m.put(`single/${c}`,n):await m.post("single",n),x.info("اطلاعات با موفقیت به ثبت رسید."),h.go(-1)}catch(n){x.error(((e=(t=n==null?void 0:n.response)==null?void 0:t.data)==null?void 0:e.message)??"خطا در ثبت اطلاعات.")}finally{d.value=!1}}return D(async()=>{try{const{data:t}=await m.post("cities/list");g.value=t.rows??[]}catch(t){console.log(t)}if(c)try{const{data:t}=await m.get(`customer/${c}`),e=String(t.name??"").trim().split(" ");Object.assign(a,{fname:t.fname||e[0]||"",lname:t.lname||e.slice(1).join(" "),phone:t.mobile??"",city_id:t.city_id??void 0})}catch(t){console.log(t)}}),(t,e)=>{const n=r("a-input"),u=r("a-form-item"),U=r("a-select-option"),$=r("a-select"),j=r("a-button"),B=r("a-card"),O=r("a-form"),R=r("a-spin");return p(),_(R,{spinning:d.value},{default:i(()=>[s(O,{layout:"vertical",onSubmit:F(y,["prevent"])},{default:i(()=>[s(B,{title:M(c)?"ویرایش مشتری":"افزودن مشتری",class:"mb-base"},{default:i(()=>[z("div",T,[s(u,{label:"نام ","validate-status":l.fname?"error":"",help:l.fname},{default:i(()=>[s(n,{value:a.fname,"onUpdate:value":e[0]||(e[0]=o=>a.fname=o)},null,8,["value"])]),_:1},8,["validate-status","help"]),s(u,{label:"نام خانوادگی","validate-status":l.lname?"error":"",help:l.lname},{default:i(()=>[s(n,{value:a.lname,"onUpdate:value":e[1]||(e[1]=o=>a.lname=o)},null,8,["value"])]),_:1},8,["validate-status","help"]),s(u,{label:"شماره تلفن همراه","validate-status":l.phone?"error":"",help:l.phone},{default:i(()=>[s(n,{value:a.phone,"onUpdate:value":e[2]||(e[2]=o=>a.phone=o)},null,8,["value"])]),_:1},8,["validate-status","help"]),s(u,{label:"شهر"},{default:i(()=>[s($,{value:a.city_id,"onUpdate:value":e[3]||(e[3]=o=>a.city_id=o),"show-search":"","allow-clear":"",placeholder:"انتخاب کنید","filter-option":E},{default:i(()=>[(p(!0),A(I,null,L(g.value,o=>(p(),_(U,{key:o.id,value:o.id},{default:i(()=>[b(Q(o.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})]),s(j,{type:"primary",onClick:y},{default:i(()=>[...e[4]||(e[4]=[b("ثبت اطلاعات",-1)])]),_:1})]),_:1},8,["title"])]),_:1})]),_:1},8,["spinning"])}}}),H=C({__name:"EditSingleCustomer",setup(S){return(v,h)=>(p(),_(q))}});export{H as default};
+1
View File
@@ -0,0 +1 @@
import{_ as o}from"./AddWorkshop.vue_vue_type_script_setup_true_lang-_Y4g_duj.js";import{d as e,f as r,o as t}from"./index-BhesYFRn.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang--1LOdW_Y.js";const m=e({__name:"EditWorkshop",setup(a){return(s,_)=>(t(),r(o))}});export{m as default};
+1
View File
@@ -0,0 +1 @@
.full-page-msg[data-v-4851d61e]{min-height:100vh;display:flex;align-items:center;justify-content:center}
+1
View File
@@ -0,0 +1 @@
import{_}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{i as l,c as e,g as o,l as c,e as s,o as p}from"./index-BhesYFRn.js";const u={},i={class:"full-page-msg"};function d(r,t){const n=s("a-button"),a=s("a-result");return p(),l("div",i,[e(a,{status:"404",title:"صفحه مورد نظر یافت نشد","sub-title":"آدرسی که وارد کرده‌اید وجود ندارد."},{extra:o(()=>[e(n,{type:"primary",onClick:t[0]||(t[0]=m=>r.$router.push("/"))},{default:o(()=>[...t[1]||(t[1]=[c("بازگشت به خانه",-1)])]),_:1})]),_:1})])}const v=_(u,[["render",d],["__scopeId","data-v-4851d61e"]]);export{v as default};
+1
View File
@@ -0,0 +1 @@
import{_}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{i as c,c as e,g as o,l,e as s,o as p}from"./index-BhesYFRn.js";const u={},i={class:"full-page-msg"};function m(r,t){const a=s("a-button"),n=s("a-result");return p(),c("div",i,[e(n,{status:"500",title:"خطای سرور","sub-title":"مشکلی در سرور رخ داده است. لطفاً بعداً تلاش کنید."},{extra:o(()=>[e(a,{type:"primary",onClick:t[0]||(t[0]=d=>r.$router.push("/"))},{default:o(()=>[...t[1]||(t[1]=[l("بازگشت به خانه",-1)])]),_:1})]),_:1})])}const x=_(u,[["render",m],["__scopeId","data-v-abbac884"]]);export{x as default};
+1
View File
@@ -0,0 +1 @@
.full-page-msg[data-v-abbac884]{min-height:100vh;display:flex;align-items:center;justify-content:center}
@@ -0,0 +1 @@
import{d as P,f as o,g as s,e as x,o as l,j as R,c as r,h as E,n as u,E as h,K as B,J as N,U as V,r as p,x as w,z as y,a as A}from"./index-BhesYFRn.js";import{X as I}from"./model-d1Prdbon.js";import{L as S}from"./ListPageHeader-CAhM3N4J.js";const U={class:"flex gap-2"},F=P({__name:"FacilityList",props:{title:{},model:{},editPath:{},activePath:{},addRid:{},addLabel:{}},setup(a){const k=a,$=A(),f=p(null),d=p(!1),m=p(void 0);function g(){m.value=void 0,d.value=!0}function b(e){m.value=e,d.value=!0}function _(e){d.value=e}function O(){var e;(e=f.value)==null||e.fetch()}function L(e){$.push(`${k.editPath}/${e}`)}async function C(e){var i,n,c;try{await w.get(`${k.activePath}/${e}`),y.success("تغییرات ثبت شد"),(i=f.value)==null||i.fetch()}catch(t){y.error(((c=(n=t==null?void 0:t.response)==null?void 0:n.data)==null?void 0:c.message)??"خطا در تغییر وضعیت")}}return(e,i)=>{const n=x("a-tooltip"),c=x("a-card");return l(),o(c,{title:a.title},{default:s(()=>[a.addRid?(l(),o(S,{key:0,rid:a.addRid,"add-label":a.addLabel,onAdd:i[0]||(i[0]=t=>g())},null,8,["rid","add-label"])):R("",!0),r(I,{ref_key:"tbl",ref:f,model:a.model},{actions:s(({record:t})=>[E("div",U,[a.addRid?(l(),o(n,{key:0,title:"ویرایش"},{default:s(()=>[r(u(h),{class:"cursor-pointer mx-1 text-primary",onClick:v=>b(t.id)},null,8,["onClick"])]),_:2},1024)):(l(),o(n,{key:1,title:"ویرایش"},{default:s(()=>[r(u(h),{class:"cursor-pointer mx-1 text-primary",onClick:v=>L(t.id)},null,8,["onClick"])]),_:2},1024)),r(n,{title:"وضعیت"},{default:s(()=>[t.is_active?(l(),o(u(B),{key:0,class:"cursor-pointer mx-1 text-success",onClick:v=>C(t.id)},null,8,["onClick"])):(l(),o(u(N),{key:1,class:"cursor-pointer mx-1 text-danger",onClick:v=>C(t.id)},null,8,["onClick"]))]),_:2},1024)])]),_:1},8,["model"]),V(e.$slots,"form",{open:d.value,editingId:m.value,onUpdateOpen:_,onSuccess:O})]),_:3},8,["title"])}}});export{F as _};
+1
View File
@@ -0,0 +1 @@
import{_ as o}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{i as t,c as r,e as c,o as s}from"./index-BhesYFRn.js";const n={},a={class:"layout--full-page"};function _(l,i){const e=c("router-view");return s(),t("div",a,[r(e)])}const p=o(n,[["render",_]]);export{p as default};
@@ -0,0 +1 @@
import{d as B,w as P,o as u,i as r,c as m,g as h,f as N,n as z,P as D,h as g,t as I,j as R,r as i,p as S,x as U,z as b,e as f}from"./index-BhesYFRn.js";const j={class:"image-upload"},q={key:0},E={key:1},F={style:{"margin-top":"8px"}},L=["src"],$=B({__name:"ImageUploadInput",props:{modelValue:{default:null},purpose:{default:void 0},placeholder:{default:"بارگذاری"}},emits:["update:modelValue","ok"],setup(w,{emit:y}){const s=w,p=y,c=i(!1),d=i(!1),v=i(""),o=i([]);P(()=>s.modelValue,e=>{var a;e?((a=o.value[0])==null?void 0:a.url)!==e&&(o.value=[{uid:e,name:e.split("/").pop()??"file",status:"done",url:e}]):o.value=[]},{immediate:!0});const V=S(()=>s.placeholder);async function k({file:e}){var l,n;const a=new FormData;a.append("file",e),s.purpose&&a.append("purpose",s.purpose),c.value=!0;try{const{data:t}=await U.post("file/create",a);p("update:modelValue",t.url),p("ok",t)}catch(t){const _=((n=(l=t==null?void 0:t.response)==null?void 0:l.data)==null?void 0:n.message)??"بارگذاری فایل ناموفق بود";b.error(_)}finally{c.value=!1}}function x(){return p("update:modelValue",null),!0}function C(e){v.value=e.url,d.value=!0}return(e,a)=>{const l=f("a-spin"),n=f("a-upload"),t=f("a-modal");return u(),r("div",j,[m(n,{"file-list":o.value,"list-type":"picture-card","max-count":1,accept:"image/*","custom-request":k,onRemove:x,onPreview:C},{default:h(()=>[o.value.length===0?(u(),r("div",q,[c.value?(u(),N(l,{key:0,size:"small"})):(u(),r("div",E,[m(z(D)),g("div",F,I(V.value),1)]))])):R("",!0)]),_:1},8,["file-list"]),m(t,{open:d.value,footer:null,onCancel:a[0]||(a[0]=_=>d.value=!1)},{default:h(()=>[g("img",{src:v.value,style:{width:"100%"},alt:""},null,8,L)]),_:1},8,["open"])])}}});export{$ as _};
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
import{a as B,b as s,X as E}from"./model-d1Prdbon.js";import{L as $}from"./ListPageHeader-CAhM3N4J.js";import{_ as D}from"./Add.vue_vue_type_script_setup_true_lang-CSRRWtPo.js";import{d as X,b as L,i as M,c as i,g as n,e as p,o as c,n as m,f,E as O,j as b,D as P,h as k,r as _}from"./index-BhesYFRn.js";import{u as T}from"./useDeleteHandler-CVKr9Ki_.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang--1LOdW_Y.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-B_9tVlpu.js";function V(){const t=new B("admin/categories/list","لیست دسته بندی");return t.add(new s("id","شماره").filterNumber()),t.add(new s("image","تصویر").noSort().renderSlot("image")),t.add(new s("type_str","نوع نمایش")),t.add(new s("title","عنوان دسته").filterNumber()),t.add(new s("parent.title","پدر دسته").filterNumber()),t.add(new s("opt","عملیات").noSort().renderSlot("opt")),t}const j={id:"page-user-list"},A=["src"],H="/img/no-items.png",Q=X({__name:"List",setup(t){const w=L(),g=o=>!!w.hasPermission(o),y=V(),u=_(null),l=_(!1),r=_(void 0),{remove:x}=T({onSuccess:()=>{var o;return(o=u.value)==null?void 0:o.fetch()},successMessage:"دسته حذف شد",successType:"info",fallbackErrorMessage:"خطا در حذف دسته"});function C(){r.value=void 0,l.value=!0}function S(o){r.value=o,l.value=!0}return(o,a)=>{const v=p("a-tooltip"),h=p("a-popconfirm"),N=p("a-card");return c(),M("div",j,[i(N,{title:"لیست دسته بندی ها"},{default:n(()=>[i($,{rid:"collection.create","add-label":"افزودن دسته",onAdd:C}),i(E,{ref_key:"tbl",ref:u,model:m(y)},{image:n(({text:e})=>[k("img",{width:"90px",height:"90px",style:{"object-fit":"scale-down"},src:e&&e.image?e.image:H},null,8,A)]),opt:n(({record:e})=>[g("collection.list.edit")?(c(),f(v,{key:0,title:"ویرایش"},{default:n(()=>[i(m(O),{class:"cursor-pointer mx-1 text-primary",onClick:d=>S(e.id)},null,8,["onClick"])]),_:2},1024)):b("",!0),g("collection.list.remove")?(c(),f(v,{key:1,title:"حذف"},{default:n(()=>[i(h,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:d=>m(x)(`category/${e.id}`)},{title:n(()=>[...a[2]||(a[2]=[k("p",null,"آیا مطمئن به حذف دسته مورد نظر هستید ؟",-1)])]),default:n(()=>[i(m(P),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)):b("",!0)]),_:1},8,["model"]),(c(),f(D,{key:r.value??"new",open:l.value,id:r.value,"onUpdate:open":a[0]||(a[0]=e=>l.value=e),onSuccess:a[1]||(a[1]=e=>{var d;return(d=u.value)==null?void 0:d.fetch()})},null,8,["open","id"]))]),_:1})])}}});export{Q as default};
+1
View File
@@ -0,0 +1 @@
.flex-col[data-v-8d914f2c]{flex-direction:column}.flex-1[data-v-8d914f2c]{flex:1}.justify-between[data-v-8d914f2c]{justify-content:space-between}.mr-3[data-v-8d914f2c]{margin-left:.75rem}
+1
View File
@@ -0,0 +1 @@
import{_ as c}from"./FacilityList.vue_vue_type_script_setup_true_lang-CpAKz9Hb.js";import{_ as m}from"./AddBranches.vue_vue_type_script_setup_true_lang-CRWNlB2A.js";import{a as p,b as t}from"./model-d1Prdbon.js";import{d as l,f as a,g as f,n as _,o}from"./index-BhesYFRn.js";import"./ListPageHeader-CAhM3N4J.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang--1LOdW_Y.js";function u(){const e=new p("admin/branches/list","لیست شعب");return e.add(new t("name","نام").filterText()),e.add(new t("address","آدرس").filterText()),e.add(new t("phone","شماره تلفن").filterNumber()),e.add(new t("user.name","مدیر شعبه").filterNumber().noSort()),e.add(new t("op","عملیات").noSort().renderSlot("actions")),e}const C=l({__name:"ListBranches",setup(e){const r=u();return(b,h)=>(o(),a(c,{title:"لیست شعب",model:_(r),"edit-path":"/branch/edit","active-path":"branch/active","add-rid":"branch.create","add-label":"افزودن شعبه"},{form:f(({open:d,editingId:n,onUpdateOpen:i,onSuccess:s})=>[(o(),a(m,{key:n??"new",open:d,id:n,"onUpdate:open":i,onSuccess:s},null,8,["open","id","onUpdate:open","onSuccess"]))]),_:1},8,["model"]))}});export{C as default};
+1
View File
@@ -0,0 +1 @@
.mt-4[data-v-05c72878]{margin-top:1rem}
+1
View File
@@ -0,0 +1 @@
import{a as M,b as r,X as V}from"./model-d1Prdbon.js";import{L as h}from"./ListPageHeader-CAhM3N4J.js";import z from"./AddInvoice-Cuu3GiDW.js";import{j as H}from"./filters-ZZ3U37Dy.js";import{u as K}from"./useDeleteHandler-CVKr9Ki_.js";import{d as U,i as g,c as e,g as t,e as s,o as x,n as p,h as y,N as P,E as R,D as q,l as d,t as u,f as C,r as _,x as F}from"./index-BhesYFRn.js";import{_ as G}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang--1LOdW_Y.js";import"./index-DSwQVDho.js";function J(){const n=new M("admin/invoices/list","لیست فاکتورها");return n.add(new r("id","ردیف").filterNumber()),n.add(new r("name","نام مشتری").filterKey("branch.name").filterText()),n.add(new r("sum_weight","جمع کل سفارش").filterNumber().noSort()),n.add(new r("count_item","تعداد آیتم ها").filterNumber().noSort()),n.add(new r("caj","تاریخ ثبت").filterKey("createdAt").filterDate().noSort()),n.add(new r("allocator_user.name","ثبت کننده").renderSlot("user").noSort()),n.add(new r("note","توضیحات").filterText().noSort()),n.add(new r("op","عملیات").noSort().renderSlot("actions")),n}const Q={id:"page-user-list"},W={class:"flex gap-2"},Y={key:0},Z=U({__name:"ListInvoice",setup(n){const S=J(),w=_(null),f=_(!1),l=_(void 0),v=_(!1),b=_(void 0);function I(){b.value=void 0,v.value=!0}function N(c){b.value=c,v.value=!0}const $=[{title:"کد محصول",dataIndex:"product_code"},{title:"نام محصول",dataIndex:"title"},{title:"وزن",dataIndex:"grams"}];async function D(c){const{data:o}=await F.get(`branch/product/${c.id}`);l.value=o,f.value=!0}const{remove:E}=K({onSuccess:()=>{var c;return(c=w.value)==null?void 0:c.fetch()},successMessage:"فاکتور حذف شد",fallbackErrorMessage:"خطا در حذف فاکتور"});return(c,o)=>{const k=s("a-tooltip"),L=s("a-popconfirm"),m=s("a-descriptions-item"),T=s("a-descriptions"),j=s("a-table"),A=s("a-empty"),B=s("a-button"),O=s("a-modal"),X=s("a-card");return x(),g("div",Q,[e(X,{title:"لیست فاکتورها"},{default:t(()=>[e(h,{rid:"invoice.create","add-label":"افزودن فاکتور",onAdd:I}),e(V,{ref_key:"tbl",ref:w,model:p(S)},{user:t(({record:a})=>{var i;return[d(u(((i=a.allocator_user)==null?void 0:i.name)??"-"),1)]}),actions:t(({record:a})=>[y("div",W,[e(k,{title:"مشاهده"},{default:t(()=>[e(p(P),{class:"cursor-pointer mx-1 text-success",onClick:i=>D(a)},null,8,["onClick"])]),_:2},1024),e(k,{title:"ویرایش"},{default:t(()=>[e(p(R),{class:"cursor-pointer mx-1 text-primary",onClick:i=>N(a.id)},null,8,["onClick"])]),_:2},1024),e(k,{title:"حذف"},{default:t(()=>[e(L,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:i=>p(E)(`branch/product/${a.id}`)},{title:t(()=>[...o[4]||(o[4]=[y("p",null,"آیا مطمئن به حذف فاکتور مورد نظر هستید ؟",-1)])]),default:t(()=>[e(p(q),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)])]),_:1},8,["model"]),e(O,{open:f.value,"onUpdate:open":o[1]||(o[1]=a=>f.value=a),title:"مشاهده فاکتور",width:"70%"},{footer:t(()=>[e(B,{onClick:o[0]||(o[0]=a=>f.value=!1)},{default:t(()=>[...o[5]||(o[5]=[d("بستن",-1)])]),_:1})]),default:t(()=>[l.value?(x(),g("div",Y,[e(T,{bordered:"",size:"small",column:2},{default:t(()=>[e(m,{label:"شعبه"},{default:t(()=>[d(u(l.value.name),1)]),_:1}),e(m,{label:"ثبت کننده"},{default:t(()=>{var a;return[d(u(((a=l.value.allocator_user)==null?void 0:a.name)??"-"),1)]}),_:1}),e(m,{label:"تاریخ ثبت"},{default:t(()=>[d(u(p(H)(l.value.caj)),1)]),_:1}),e(m,{label:"تعداد آیتم"},{default:t(()=>[d(u(l.value.count_item),1)]),_:1}),e(m,{label:"جمع وزن"},{default:t(()=>[d(u(l.value.sum_weight),1)]),_:1}),e(m,{label:"توضیحات"},{default:t(()=>[d(u(l.value.note??"-"),1)]),_:1})]),_:1}),e(j,{class:"mt-4",size:"small","data-source":l.value.products,columns:$,pagination:!1,"row-key":"id"},null,8,["data-source"])])):(x(),C(A,{key:1}))]),_:1},8,["open"]),(x(),C(z,{key:b.value??"new",open:v.value,id:b.value,"onUpdate:open":o[2]||(o[2]=a=>v.value=a),onSuccess:o[3]||(o[3]=a=>{var i;return(i=w.value)==null?void 0:i.fetch()})},null,8,["open","id"]))]),_:1})])}}}),de=G(Z,[["__scopeId","data-v-05c72878"]]);export{de as default};
@@ -0,0 +1 @@
import{d as i,b as c,o as s,i as l,f as m,g as o,l as u,t as p,c as f,n as _,P as b,j as P,e as g}from"./index-BhesYFRn.js";import{_ as k}from"./_plugin-vue_export-helper-DlAUqK2U.js";const v={class:"list-page-header"},C=i({__name:"ListPageHeader",props:{rid:{default:void 0},addLabel:{default:"افزودن"}},emits:["add"],setup(e){const n=c(),r=t=>!!n.hasPermission(t);return(t,a)=>{const d=g("a-button");return s(),l("div",v,[!e.rid||r(e.rid)?(s(),m(d,{key:0,type:"primary",onClick:a[0]||(a[0]=L=>t.$emit("add"))},{icon:o(()=>[f(_(b))]),default:o(()=>[u(" "+p(e.addLabel),1)]),_:1})):P("",!0)])}}}),y=k(C,[["__scopeId","data-v-af0e7bb2"]]);export{y as L};
@@ -0,0 +1 @@
.list-page-header[data-v-af0e7bb2]{display:flex;justify-content:flex-end;margin-bottom:1rem}
+1
View File
@@ -0,0 +1 @@
import{a as D,b as a,X as E}from"./model-d1Prdbon.js";import{L as U}from"./ListPageHeader-CAhM3N4J.js";import L from"./UserCreate-DVo5-AHZ.js";import{d as M,b as V,v as X,x as $,i as h,c as r,g as s,r as c,e as v,o as m,n as p,f as _,E as O,j as y,D as P,h as A,l as H,t as K}from"./index-BhesYFRn.js";import{u as j}from"./useDeleteHandler-CVKr9Ki_.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang--1LOdW_Y.js";function I(){const o=new D("admin/users/list","لیست مدیران");return o.add(new a("id","کد مدیر")),o.add(new a("fname","نام").filterKey("fullName").filterText()),o.add(new a("lname","نام خانوادگی").filterKey("fullName").filterText()),o.add(new a("mobile","موبایل").filterText()),o.add(new a("ut","نوع کاربر").filterNumber().renderSlot("ut")),o.add(new a("op","عملیات").noSort().renderSlot("op")),o}const q={id:"page-user-list"},Y=M({__name:"ListUser",setup(o){const g=V(),x=e=>!!g.hasPermission(e),k=I(),f=c(null),b=c([]),l=c(!1),i=c(void 0);function w(e){var t;return e==null?"-":((t=b.value.find(d=>d.id===Number(e)))==null?void 0:t.title)??String(e)}function C(){i.value=void 0,l.value=!0}function T(e){i.value=e.id,l.value=!0}const{remove:N}=j({onSuccess:()=>{var e;return(e=f.value)==null?void 0:e.fetch()},successMessage:"کاربر حذف شد",fallbackErrorMessage:"خطا در حذف کاربر"});return X(async()=>{try{const{data:e}=await $.get("const/__list__ut");b.value=e}catch(e){console.log(e)}}),(e,t)=>{const d=v("a-tooltip"),S=v("a-popconfirm"),B=v("a-card");return m(),h("div",q,[r(B,{title:"لیست مدیران"},{default:s(()=>[r(U,{rid:"user.list.create","add-label":"افزودن کاربر",onAdd:C}),r(E,{ref_key:"tbl",ref:f,model:p(k)},{ut:s(({text:n})=>[H(K(w(n)),1)]),op:s(({record:n})=>[x("user.list.edit")?(m(),_(d,{key:0,title:"ویرایش"},{default:s(()=>[r(p(O),{class:"cursor-pointer mx-1 text-primary",onClick:u=>T(n)},null,8,["onClick"])]),_:2},1024)):y("",!0),x("user.list.remove")?(m(),_(d,{key:1,title:"حذف"},{default:s(()=>[r(S,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:u=>p(N)(`users/${n.id}`)},{title:s(()=>[...t[2]||(t[2]=[A("p",null,"آیا مطمئن به حذف کاربر مورد نظر هستید ؟",-1)])]),default:s(()=>[r(p(P),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)):y("",!0)]),_:1},8,["model"]),(m(),_(L,{key:i.value??"new",open:l.value,id:i.value,"onUpdate:open":t[0]||(t[0]=n=>l.value=n),onSuccess:t[1]||(t[1]=n=>{var u;return(u=f.value)==null?void 0:u.fetch()})},null,8,["open","id"]))]),_:1})])}}});export{Y as default};
+1
View File
@@ -0,0 +1 @@
import{_ as p}from"./FacilityList.vue_vue_type_script_setup_true_lang-CpAKz9Hb.js";import{_ as m}from"./AddWorkshop.vue_vue_type_script_setup_true_lang-_Y4g_duj.js";import{a as c,b as e}from"./model-d1Prdbon.js";import{d as l,f as r,g as f,n as _,o as a}from"./index-BhesYFRn.js";import"./ListPageHeader-CAhM3N4J.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang--1LOdW_Y.js";function h(){const o=new c("admin/workshops/list","لیست کارگاه ها");return o.add(new e("name","نام").filterText()),o.add(new e("address","آدرس").filterText()),o.add(new e("phone","شماره تلفن").filterNumber()),o.add(new e("op","عملیات").noSort().renderSlot("actions")),o}const C=l({__name:"ListWorkshop",setup(o){const n=h();return(u,w)=>(a(),r(p,{title:"لیست کارگاه ها",model:_(n),"edit-path":"/workshop/edit","active-path":"workshop/active","add-rid":"workshop.create","add-label":"افزودن کارگاه"},{form:f(({open:s,editingId:t,onUpdateOpen:d,onSuccess:i})=>[(a(),r(m,{key:t??"new",open:s,id:t,"onUpdate:open":d,onSuccess:i},null,8,["open","id","onUpdate:open","onSuccess"]))]),_:1},8,["model"]))}});export{C as default};
+1
View File
@@ -0,0 +1 @@
import{d as E,i as k,c as a,g as n,e as s,o as N,h as t,A as V,l as A,r as u,p as f,z as L,a as M}from"./index-BhesYFRn.js";import{_ as P}from"./henza-icon-DJ1pqeD1.js";import{u as S}from"./auth-lzh32P9S.js";import{_ as T}from"./_plugin-vue_export-helper-DlAUqK2U.js";const U={id:"page-login"},$={class:"login-grid"},F={class:"login-form"},I=E({__name:"Login",setup(J){const w=M(),h=S(),o=u(""),l=u(""),i=u(!1),m=u(!1),_=u(!1),d=f(()=>m.value?o.value?o.value.length<8?"مقدار ورودی صحیح نیست":"":"وارد کردن موبایل الزامی است":""),v=f(()=>_.value?l.value?l.value.length<5?"مقدار ورودی صحیح نیست":"":"وارد کردن رمز عبور الزامی است":""),c=f(()=>!d.value&&!v.value&&o.value!==""&&l.value!=="");async function p(){if(!(!c.value||i.value)){i.value=!0;try{await h.login({phone:o.value,password:l.value}),await w.push("/my-data")}catch(g){console.log(g),L.error("خطا در ورود")}finally{i.value=!1}}}return(g,e)=>{const y=s("a-input"),b=s("a-form-item"),x=s("a-input-password"),B=s("a-button"),z=s("a-form"),C=s("a-card");return N(),k("div",U,[a(C,{class:"login-card",bordered:!1},{default:n(()=>[t("div",$,[t("div",F,[e[5]||(e[5]=t("div",{class:"vx-card__title"},[t("h4",null,"ورود به محیط مدیریت"),t("p",null,"لطفا شماره تلفن همراه خود به همراه رمز عبور وارد کنید.")],-1)),a(z,{layout:"vertical",class:"mt-8",onSubmit:V(p,["prevent"])},{default:n(()=>[a(b,{label:"موبایل","validate-status":d.value?"error":"",help:d.value},{default:n(()=>[a(y,{value:o.value,"onUpdate:value":e[0]||(e[0]=r=>o.value=r),autocomplete:"off",size:"large",onBlur:e[1]||(e[1]=r=>m.value=!0)},null,8,["value"])]),_:1},8,["validate-status","help"]),a(b,{label:"رمز عبور","validate-status":v.value?"error":"",help:v.value},{default:n(()=>[a(x,{value:l.value,"onUpdate:value":e[2]||(e[2]=r=>l.value=r),size:"large",onBlur:e[3]||(e[3]=r=>_.value=!0),onPressEnter:p},null,8,["value"])]),_:1},8,["validate-status","help"]),a(B,{type:"primary",size:"large",disabled:!c.value,loading:i.value,onClick:p},{default:n(()=>[...e[4]||(e[4]=[A(" ورود ",-1)])]),_:1},8,["disabled","loading"])]),_:1})]),e[6]||(e[6]=t("div",{class:"login-art"},[t("img",{src:P,alt:"login"})],-1))])]),_:1})])}}}),D=T(I,[["__scopeId","data-v-3fd07229"]]);export{D as default};
+1
View File
@@ -0,0 +1 @@
#page-login[data-v-3fd07229]{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:16px}.login-card[data-v-3fd07229]{width:100%;max-width:900px}.login-grid[data-v-3fd07229]{display:grid;grid-template-columns:1fr;align-items:center}@media (min-width: 992px){.login-grid[data-v-3fd07229]{grid-template-columns:1fr 1fr}}.login-form[data-v-3fd07229]{background-color:#eff2f7;padding:2rem;min-height:505px}.login-art[data-v-3fd07229]{display:none;text-align:center}@media (min-width: 992px){.login-art[data-v-3fd07229]{display:block}}.login-art img[data-v-3fd07229]{max-width:70%;margin:0 auto}.mt-8[data-v-3fd07229]{margin-top:2rem}
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
.vertical-nav-menu[data-v-bf6b0a16]{min-height:100vh;border-left:1px solid #f0f0f0}.nav-header[data-v-bf6b0a16]{height:61px;display:flex;align-items:center;justify-content:center}.nav-title[data-v-bf6b0a16]{font-size:18px;color:#1c2d56}.the-navbar[data-v-b553fbc4]{height:61px;background:#fff;padding:0 16px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #f0f0f0}.nav-left[data-v-b553fbc4],.nav-right[data-v-b553fbc4]{display:flex;align-items:center;gap:12px}.page-title[data-v-b553fbc4]{font-size:16px;color:#1c2d56}.user-chip[data-v-b553fbc4]{display:inline-flex;align-items:center;gap:8px;cursor:pointer}.layout--main[data-v-1d1e09bc]{min-height:100vh}#content-area[data-v-1d1e09bc]{padding:16px;background:#f8f8f8}.router-header[data-v-1d1e09bc]{display:flex;flex-wrap:wrap;align-items:center;margin-bottom:1.5rem;gap:1rem}.content-area__heading[data-v-1d1e09bc]{margin:0;color:#1c2d56}
+1
View File
@@ -0,0 +1 @@
import{_}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{i as c,c as e,g as o,l,e as s,o as i}from"./index-BhesYFRn.js";const p={},u={class:"full-page-msg"};function f(n,t){const a=s("a-button"),r=s("a-result");return i(),c("div",u,[e(r,{status:"info",title:"در دست تعمیر","sub-title":"این بخش موقتاً در دسترس نیست."},{extra:o(()=>[e(a,{type:"primary",onClick:t[0]||(t[0]=m=>n.$router.push("/"))},{default:o(()=>[...t[1]||(t[1]=[l("بازگشت به خانه",-1)])]),_:1})]),_:1})])}const b=_(p,[["render",f],["__scopeId","data-v-1eb8f55a"]]);export{b as default};
+1
View File
@@ -0,0 +1 @@
.full-page-msg[data-v-1eb8f55a]{min-height:100vh;display:flex;align-items:center;justify-content:center}
+1
View File
@@ -0,0 +1 @@
.flex-1[data-v-56ef7625]{flex:1}.gap-8[data-v-56ef7625]{gap:2rem}.mr-3[data-v-56ef7625]{margin-left:.75rem}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
.full-page-msg[data-v-30826204]{min-height:100vh;display:flex;align-items:center;justify-content:center}
@@ -0,0 +1 @@
import{_}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{i as l,c as e,g as o,l as c,e as s,o as u}from"./index-BhesYFRn.js";const i={},p={class:"full-page-msg"};function d(r,t){const n=s("a-button"),a=s("a-result");return u(),l("div",p,[e(a,{status:"403",title:"دسترسی غیرمجاز","sub-title":"شما دسترسی لازم برای مشاهده این صفحه را ندارید."},{extra:o(()=>[e(n,{type:"primary",onClick:t[0]||(t[0]=m=>r.$router.push("/"))},{default:o(()=>[...t[1]||(t[1]=[c("بازگشت به خانه",-1)])]),_:1})]),_:1})])}const v=_(i,[["render",d],["__scopeId","data-v-30826204"]]);export{v as default};
@@ -0,0 +1 @@
import{b as i,O as r,_ as m}from"./omdeListModel-ft6VJtjG.js";import{d as s,f as a,n as t,o as n}from"./index-BhesYFRn.js";import"./model-d1Prdbon.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListPageHeader-CAhM3N4J.js";import"./bulkCustomer.vue_vue_type_script_setup_true_lang-TpkO_mzJ.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang--1LOdW_Y.js";import"./UnorderedListOutlined-wfihx1Ro.js";const k=s({__name:"OmdeArchivedList",setup(c){const e=r.archived.title,o=i("archived");return(l,p)=>(n(),a(m,{title:t(e),model:t(o)},null,8,["title","model"]))}});export{k as default};
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
import{b as m,O as i,_ as r}from"./omdeListModel-ft6VJtjG.js";import{d as s,f as n,n as t,o as a}from"./index-BhesYFRn.js";import"./model-d1Prdbon.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListPageHeader-CAhM3N4J.js";import"./bulkCustomer.vue_vue_type_script_setup_true_lang-TpkO_mzJ.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang--1LOdW_Y.js";import"./UnorderedListOutlined-wfihx1Ro.js";const x=s({__name:"OmdeList",setup(d){const o=i.omde.title,e=m("omde");return(l,p)=>(a(),n(r,{title:t(o),model:t(e),"show-add-button":""},null,8,["title","model"]))}});export{x as default};
+1
View File
@@ -0,0 +1 @@
.flex-col[data-v-2edca598]{flex-direction:column}.flex-1[data-v-2edca598]{flex:1}.mr-3[data-v-2edca598]{margin-left:.75rem}
@@ -0,0 +1 @@
import{b as i,O as n,_ as r}from"./omdeListModel-ft6VJtjG.js";import{d as m,f as s,n as e,o as l}from"./index-BhesYFRn.js";import"./model-d1Prdbon.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListPageHeader-CAhM3N4J.js";import"./bulkCustomer.vue_vue_type_script_setup_true_lang-TpkO_mzJ.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang--1LOdW_Y.js";import"./UnorderedListOutlined-wfihx1Ro.js";const x=m({__name:"OmdeNonVerifiedList",setup(p){const t=n.nonVerified.title,o=i("nonVerified");return(a,d)=>(l(),s(r,{title:e(t),model:e(o),"reject-only-step-one":""},null,8,["title","model"]))}});export{x as default};
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
[dir=rtl] .ant-tree-checkbox-inner:after{right:55%;top:35%;border-left:0!important;-webkit-transform:rotate(-45deg) scale(0) translate(50%,-50%);transform:rotate(-45deg) scale(0) translate(50%,-50%)}[dir=rtl] .ant-tree-checkbox-checked .ant-tree-checkbox-inner:after{border-left:0!important;border-right:2px solid #fff;-webkit-transform:rotate(45deg) scale(1) translate(0%,-60%);transform:rotate(45deg) scale(1) translateY(-60%)}.tree-item[data-v-e971944e]{grid-column:1 / -1}
+1
View File
@@ -0,0 +1 @@
.w-48[data-v-97e5c67e]{width:12rem}.mt-4[data-v-97e5c67e]{margin-top:1rem}.product-thumb[data-v-97e5c67e]{width:48px;height:48px;object-fit:cover;border-radius:4px}
+1
View File
@@ -0,0 +1 @@
import{d as U,b as z,i as p,c as o,g as e,e as r,o as i,h,t as u,n as v,f as m,E as X,j as _,B as j,D as q,l as c,r as y,p as H,x as A,a as F,C as G}from"./index-BhesYFRn.js";import{X as J}from"./model-d1Prdbon.js";import{b as K}from"./productListModel-CMbL10EO.js";import{u as Q}from"./useDeleteHandler-CVKr9Ki_.js";import{_ as W}from"./_plugin-vue_export-helper-DlAUqK2U.js";const Y={id:"page-user-list"},Z=["src"],ee={key:1},te={key:0,class:"w-48 flex"},oe={key:0},ae=U({__name:"ProductList",setup(se){const C=F(),w=z(),b=l=>!!w.hasPermission(l),P=K(),x=y(null),g=y([]),I=H(()=>G()),f=y(!1),s=y(void 0),B=[{title:"عنوان",dataIndex:"title"},{title:"وزن",dataIndex:"grams"},{title:"اجرت درصدی",dataIndex:"percentage_pay"},{title:"تعداد",dataIndex:"qty"}];async function V(l){const{data:a}=await A.get(`admin/products/${l.id}`);s.value=a,f.value=!0}const{remove:$}=Q({onSuccess:()=>{var l;return(l=x.value)==null?void 0:l.fetch()},successMessage:"محصول حذف شد",successType:"info",fallbackErrorMessage:"خطا در حذف محصول"});function D(l){return $(`delete/product/${l}`,{method:"post"})}function E(l){C.push(`/apps/product/edit/${l}`)}return(l,a)=>{const k=r("a-tooltip"),M=r("a-popconfirm"),d=r("a-descriptions-item"),N=r("a-descriptions"),L=r("a-table"),O=r("a-empty"),R=r("a-button"),S=r("a-modal"),T=r("a-card");return i(),p("div",Y,[o(T,{title:"لیست محصولات"},{default:e(()=>[h("h6",null,"تعداد "+u(g.value.length)+" محصول انتخاب شده است.",1),o(J,{ref_key:"tblProducts",ref:x,modelValue:g.value,"onUpdate:modelValue":a[0]||(a[0]=t=>g.value=t),model:v(P),"has-selection":!0},{image:e(({record:t})=>[t.ProductImage&&t.ProductImage.length?(i(),p("img",{key:0,src:t.ProductImage[0].image,class:"product-thumb",alt:""},null,8,Z)):(i(),p("span",ee,"-"))]),show_type:e(({record:t})=>[c(u(t.show_type_str),1)]),op:e(({record:t})=>[I.value?_("",!0):(i(),p("div",te,[b("product.list.edit")?(i(),m(k,{key:0,title:"ویرایش"},{default:e(()=>[o(v(X),{class:"cursor-pointer mx-1 text-primary",onClick:n=>E(t.id)},null,8,["onClick"])]),_:2},1024)):_("",!0),b("product.list.view")?(i(),m(k,{key:1,title:"اطلاعات جامع"},{default:e(()=>[o(v(j),{class:"cursor-pointer mx-1 text-warning",onClick:n=>V(t)},null,8,["onClick"])]),_:2},1024)):_("",!0),b("product.list.remove")?(i(),m(k,{key:2,title:"حذف"},{default:e(()=>[o(M,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:n=>D(t.id)},{title:e(()=>[...a[3]||(a[3]=[h("p",null,"آیا مطمئن به حذف محصول مورد نظر هستید ؟",-1)])]),default:e(()=>[o(v(q),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)):_("",!0)]))]),_:1},8,["modelValue","model"]),o(S,{open:f.value,"onUpdate:open":a[2]||(a[2]=t=>f.value=t),title:"اطلاعات جامع محصول",width:"70%"},{footer:e(()=>[o(R,{onClick:a[1]||(a[1]=t=>f.value=!1)},{default:e(()=>[...a[4]||(a[4]=[c("بستن",-1)])]),_:1})]),default:e(()=>{var t;return[s.value?(i(),p("div",oe,[o(N,{bordered:"",size:"small",column:2},{default:e(()=>[o(d,{label:"نام محصول"},{default:e(()=>[c(u(s.value.title),1)]),_:1}),o(d,{label:"کد محصول"},{default:e(()=>[c(u(s.value.product_code||"-"),1)]),_:1}),o(d,{label:"برند"},{default:e(()=>{var n;return[c(u(((n=s.value.brand)==null?void 0:n.title)||"-"),1)]}),_:1}),o(d,{label:"دسته بندی"},{default:e(()=>{var n;return[c(u(((n=s.value.category)==null?void 0:n.title)||"-"),1)]}),_:1}),o(d,{label:"نوع نمایش"},{default:e(()=>[c(u(s.value.show_type_str),1)]),_:1}),o(d,{label:"تعداد تنوع"},{default:e(()=>{var n;return[c(u(((n=s.value.variants_all)==null?void 0:n.length)??s.value.variants_count??0),1)]}),_:1})]),_:1}),(t=s.value.variants_all)!=null&&t.length?(i(),m(L,{key:0,class:"mt-4",size:"small","data-source":s.value.variants_all,columns:B,pagination:!1,"row-key":"id"},null,8,["data-source"])):_("",!0)])):(i(),m(O,{key:1}))]}),_:1},8,["open"])]),_:1})])}}}),ce=W(ae,[["__scopeId","data-v-97e5c67e"]]);export{ce as default};
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
.grid-4--tight[data-v-49b26fd5]{gap:.5rem}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{b as r,O as p,_ as s}from"./omdeListModel-ft6VJtjG.js";import{d as i,f as m,n as e,o as n}from"./index-BhesYFRn.js";import"./model-d1Prdbon.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListPageHeader-CAhM3N4J.js";import"./bulkCustomer.vue_vue_type_script_setup_true_lang-TpkO_mzJ.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang--1LOdW_Y.js";import"./UnorderedListOutlined-wfihx1Ro.js";const b=i({__name:"ShopkeeperList",setup(a){const t=p.shopkeeper.title,o=r("shopkeeper");return(l,_)=>(n(),m(s,{title:e(t),model:e(o)},null,8,["title","model"]))}});export{b as default};
@@ -0,0 +1 @@
.charge-grid[data-v-98f23295]{display:grid;grid-template-columns:1fr auto;gap:1rem;align-items:end}
@@ -0,0 +1 @@
import{d as z,b as F,f as m,g as t,p as L,e as l,o as f,c as o,n as p,E as M,j as h,N as R,h as W,l as q,r as d,z as w,x as A,a as D,C as G}from"./index-BhesYFRn.js";import{a as H,b as u,X as J}from"./model-d1Prdbon.js";import{C as Q}from"./CreditCardOutlined-B5AuqjiO.js";import{_ as Y}from"./_plugin-vue_export-helper-DlAUqK2U.js";function Z(){const a=new H("admin/customers-omde/single/list","لیست مشتریان تک");return a.add(new u("id","کد").filterNumber()),a.add(new u("fname","نام").filterKey("fullName").filterText()),a.add(new u("lname","نام خانوادگی").filterKey("fullName").filterText().noSort()),a.add(new u("phone","تلفن تماس").filterKey("mobile").filterText().noSort()),a.add(new u("email","ایمیل").filterText().noSort()),a.add(new u("branch.name","نام شعبه").filterText().noSort()),a.add(new u("op","عملیات").noSort().renderSlot("op")),a}const ee={class:"charge-grid"},te=z({__name:"SingleCustomer",setup(a){const _=D(),y=F(),v=e=>!!y.hasPermission(e),k=Z(),S=d(null),x=L(()=>G()),c=d(!1),C=d(!1),r=d(void 0),g=d(void 0);function N(e){g.value=e,r.value=void 0,c.value=!0}function T(){r.value=void 0,c.value=!1}async function V(){var e,n;if(!g.value||!r.value){w.error("لطفا مقدار را وارد کنید");return}try{C.value=!0,await A.post("wallet/charge",{customer_id:g.value,value:r.value}),w.info("عملیات با موفقیت انجام شد"),c.value=!1,r.value=void 0,await _.push("/wallet")}catch(s){console.log(s),w.error(((n=(e=s==null?void 0:s.response)==null?void 0:e.data)==null?void 0:n.message)??"خطا در ثبت اطلاعات.")}finally{C.value=!1}}function B(e){_.push(`/singleCustomer/edit/${e}`)}function $(e){_.push(`/singleCustomer/view/${e}`)}return(e,n)=>{const s=l("a-tooltip"),E=l("a-input-number"),X=l("a-form-item"),K=l("a-button"),O=l("a-popconfirm"),U=l("a-form"),I=l("a-spin"),P=l("a-modal"),j=l("a-card");return f(),m(j,{title:x.value?"لیست مشتریان":"لیست مشتریان تک فروشی"},{default:t(()=>[o(J,{ref_key:"tbl",ref:S,model:p(k)},{op:t(({record:i})=>[o(s,{title:"ویرایش"},{default:t(()=>[o(p(M),{class:"cursor-pointer mx-1 text-primary",onClick:b=>B(i.id)},null,8,["onClick"])]),_:2},1024),v("wallet.charge")&&!x.value?(f(),m(s,{key:0,title:"شارژ کیف پول"},{default:t(()=>[o(p(Q),{class:"cursor-pointer mx-1",style:{color:"#d48806"},onClick:b=>N(i.id)},null,8,["onClick"])]),_:2},1024)):h("",!0),v("wallet.charge")?(f(),m(s,{key:1,title:"مشاهده اطلاعات"},{default:t(()=>[o(p(R),{class:"cursor-pointer mx-1 text-success",onClick:b=>$(i.id)},null,8,["onClick"])]),_:2},1024)):h("",!0)]),_:1},8,["model"]),v("wallet.charge")?(f(),m(P,{key:0,open:c.value,"onUpdate:open":n[1]||(n[1]=i=>c.value=i),footer:null,title:"شارژ کیف پول"},{default:t(()=>[o(I,{spinning:C.value},{default:t(()=>[o(U,{layout:"vertical"},{default:t(()=>[W("div",ee,[o(X,{label:"میزان شارژ"},{default:t(()=>[o(E,{value:r.value,"onUpdate:value":n[0]||(n[0]=i=>r.value=i),class:"w-full"},null,8,["value"])]),_:1}),o(O,{style:{"margin-bottom":"24px"},title:"آیا از شارژ کیف پول مطمعن هستید؟","ok-text":"بله","cancel-text":"خیر",onConfirm:V,onCancel:T},{default:t(()=>[o(K,{type:"primary"},{default:t(()=>[...n[2]||(n[2]=[q("ثبت",-1)])]),_:1})]),_:1})])]),_:1})]),_:1},8,["spinning"])]),_:1},8,["open"])):h("",!0)]),_:1},8,["title"])}}}),se=Y(te,[["__scopeId","data-v-98f23295"]]);export{se as default};
+1
View File
@@ -0,0 +1 @@
.flex-col[data-v-705151d2]{flex-direction:column}.flex-1[data-v-705151d2]{flex:1}.mr-3[data-v-705151d2]{margin-left:.75rem}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{r as C}from"./icons-MICjc-88.js";import{U as k}from"./UnorderedListOutlined-wfihx1Ro.js";import{d as v,o as t,i,c as _,g as l,f as e,m as s,s as a,p as x,e as r}from"./index-BhesYFRn.js";const h={key:1},g=v({__name:"TooltipBtn",props:{title:{},popTitle:{},icon:{},iconClass:{default:"w-5 h-5"}},emits:["click"],setup(o,{emit:m}){const p=o,u=m,n=x(()=>C(p.icon)??k);function c(){u("click")}return(B,T)=>{const d=r("a-popconfirm"),f=r("a-tooltip");return t(),i("div",null,[_(f,{title:o.title},{default:l(()=>[o.popTitle?(t(),e(d,{key:0,"ok-text":"بله","cancel-text":"خیر",title:o.popTitle,onConfirm:c},{default:l(()=>[(t(),e(s(n.value),{class:a(["cursor-pointer",o.iconClass])},null,8,["class"]))]),_:1},8,["title"])):(t(),i("div",h,[(t(),e(s(n.value),{class:a(["cursor-pointer",o.iconClass]),onClick:c},null,8,["class"]))]))]),_:1},8,["title"])])}}});export{g as _};
@@ -0,0 +1 @@
import{c as l,I as c}from"./index-BhesYFRn.js";var p={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"};function i(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.forEach(function(a){m(r,a,e[a])})}return r}function m(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var f=function(t,e){var n=i({},t,e.attrs);return l(c,i({},n,{icon:p}),null)};f.displayName="SettingOutlined";f.inheritAttrs=!1;var O={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z"}}]},name:"stop",theme:"outlined"};function u(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.forEach(function(a){g(r,a,e[a])})}return r}function g(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var s=function(t,e){var n=u({},t,e.attrs);return l(c,u({},n,{icon:O}),null)};s.displayName="StopOutlined";s.inheritAttrs=!1;var b={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"unordered-list",theme:"outlined"};function o(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.forEach(function(a){v(r,a,e[a])})}return r}function v(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var d=function(t,e){var n=o({},t,e.attrs);return l(c,o({},n,{icon:b}),null)};d.displayName="UnorderedListOutlined";d.inheritAttrs=!1;export{f as S,d as U,s as a};
+1
View File
@@ -0,0 +1 @@
.hint[data-v-c1320d45]{color:#888;font-size:12px;margin-bottom:1rem}
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
import e from"./UserCreate-DVo5-AHZ.js";import{d as r,f as o,o as t}from"./index-BhesYFRn.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang--1LOdW_Y.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const i=r({__name:"UserEdit",setup(a){return(p,s)=>(t(),o(e))}});export{i as default};
@@ -0,0 +1 @@
import{C as t}from"./CustomerDetail-dzza56hg.js";import{d as e,f as o,o as r}from"./index-BhesYFRn.js";import"./filters-ZZ3U37Dy.js";import"./index-DSwQVDho.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const _=e({__name:"ViewOmdeCustomer",setup(a){return(s,m)=>(r(),o(t,{title:"مشاهده اطلاعات مشتری عمده","show-activity":!0,"show-wallet":!1}))}});export{_ as default};
@@ -0,0 +1 @@
import{C as t}from"./CustomerDetail-dzza56hg.js";import{d as e,f as o,o as r}from"./index-BhesYFRn.js";import"./filters-ZZ3U37Dy.js";import"./index-DSwQVDho.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const _=e({__name:"ViewSingleCustomer",setup(a){return(s,i)=>(r(),o(t,{title:"مشاهده اطلاعات مشتری","show-wallet":!0,"show-activity":!1}))}});export{_ as default};
@@ -0,0 +1 @@
const s=(t,r)=>{const o=t.__vccOpts||t;for(const[c,e]of r)o[c]=e;return o};export{s as _};
+1
View File
@@ -0,0 +1 @@
import{_ as o}from"./addFinDoc.vue_vue_type_script_setup_true_lang-BChfFAwF.js";import"./index-BhesYFRn.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang--1LOdW_Y.js";export{o as default};
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
import{G as n,Q as o,R as s,b as a,x as i}from"./index-BhesYFRn.js";const g=n("auth",{state:()=>({userPermission:[]}),getters:{token:()=>localStorage.getItem(o),user:()=>{const e=localStorage.getItem(s);if(!e)return null;try{return JSON.parse(e)}catch{return null}},isLoggedIn(){return!!this.token}},actions:{async login(e){const{data:r}=await i.post("admin-login",e);a().getRoles((r.roles??[]).map(l=>l.rid));const t={...r};return delete t.roles,delete t.ut,this.inject(t),t},inject(e){localStorage.setItem(o,e.api_token),localStorage.setItem("login","true"),localStorage.setItem(s,JSON.stringify(e))},logout(){localStorage.removeItem(o),localStorage.removeItem(s),localStorage.removeItem("login");const e=a();e.deleteRoles(),e.deleteUserInfo()}}});export{g as u};
@@ -0,0 +1 @@
import{d as w,v as x,x as _,f as B,g as r,A as C,r as m,y as f,e as o,o as N,c as s,h as V,l as z,z as v}from"./index-BhesYFRn.js";const M={class:"grid-3"},j=w({__name:"autopromotion",setup(S){const u=m(!1),l=m(!1),c=f({discount_percent:void 0}),i=f({});async function d(){var t,e;if(Object.keys(i).forEach(a=>delete i[a]),c.discount_percent===void 0||c.discount_percent===null){i.discount_percent="وارد کردن درصد تخفیف اتوماتیک الزامی است";return}try{u.value=!0,await _.post("autopromotion",{state:l.value,discount_percent:c.discount_percent}),v.success("اطلاعات با موفقیت به ثبت رسید.")}catch(a){v.error(((e=(t=a==null?void 0:a.response)==null?void 0:t.data)==null?void 0:e.message)??"خطا در ثبت اطلاعات.")}finally{u.value=!1}}return x(async()=>{try{const{data:t}=await _.get("autopromotion");l.value=!!t.state,c.discount_percent=t.discount_percent??void 0}catch(t){console.log(t)}}),(t,e)=>{const a=o("a-switch"),p=o("a-form-item"),b=o("a-input-number"),h=o("a-card"),y=o("a-spin"),g=o("a-button"),k=o("a-form");return N(),B(k,{layout:"vertical",onSubmit:C(d,["prevent"])},{default:r(()=>[s(y,{spinning:u.value},{default:r(()=>[s(h,{title:"تخفیف اتوماتیک یکبار مصرف ویژه مشتریان جدید",class:"mb-base"},{default:r(()=>[V("div",M,[s(p,{label:"وضعیت تخفیف اتوماتیک"},{default:r(()=>[s(a,{checked:l.value,"onUpdate:checked":e[0]||(e[0]=n=>l.value=n),size:"default"},null,8,["checked"])]),_:1}),s(p,{label:"درصد تخفیف اتوماتیک روی محصولات","validate-status":i.discount_percent?"error":"",help:i.discount_percent},{default:r(()=>[s(b,{value:c.discount_percent,"onUpdate:value":e[1]||(e[1]=n=>c.discount_percent=n),dir:"ltr",min:0,max:100,formatter:n=>`${n}%`,parser:n=>n.replace("%",""),style:{width:"100%"}},null,8,["value","formatter","parser"])]),_:1},8,["validate-status","help"])])]),_:1})]),_:1},8,["spinning"]),s(g,{type:"primary",class:"mr-4",onClick:d},{default:r(()=>[...e[2]||(e[2]=[z("ثبت اطلاعات",-1)])]),_:1})]),_:1})}}});export{j as default};
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
import{a as M,b as c,X as H}from"./model-d1Prdbon.js";import{L as j}from"./ListPageHeader-CAhM3N4J.js";import{_ as z}from"./createCity.vue_vue_type_script_setup_true_lang-CqYC6w5T.js";import{d as A,b as K,i as R,c as a,g as o,e as r,o as y,n as _,f as N,E as q,j as $,D as F,h as G,l as w,t as T,r as v,y as I,x as g,z as U}from"./index-BhesYFRn.js";import{u as J}from"./useDeleteHandler-CVKr9Ki_.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang--1LOdW_Y.js";function Q(){const i=new M("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"},le=A({__name:"cityList",setup(i){const B=K(),k=n=>!!B.hasPermission(n),D=Q(),p=v(null),x=v(!1),d=v(!1),S=v(void 0),l=I({title:"",percent:null,percent_aux:null});async function E(n){S.value=n,l.title=n.title??"";try{const[e,s]=await Promise.all([g.get(`cities/get-percent/${n.id}`),g.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 L(){var n,e,s,m;try{await g.put(`cities/${(n=S.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:O}=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"),C=r("a-input-number"),P=r("a-form"),V=r("a-modal"),X=r("a-card");return y(),R("div",W,[a(X,{title:"لیست شهر ها"},{default:o(()=>[a(j,{rid:"cities.create","add-label":"افزودن شهر",onAdd:e[0]||(e[0]=t=>x.value=!0)}),a(H,{ref_key:"citiesTable",ref:p,model:_(D)},{percent:o(({text:t})=>[w(T(t??"-"),1)]),percent_aux:o(({text:t})=>[w(T(t??"-"),1)]),opt:o(({record:t})=>[k("cities.list.view.edit")?(y(),N(s,{key:0,title:"ویرایش"},{default:o(()=>[a(_(q),{class:"cursor-pointer mx-1 text-primary",onClick:f=>E(t)},null,8,["onClick"])]),_:2},1024)):$("",!0),k("cities.list.remove")?(y(),N(s,{key:1,title:"حذف"},{default:o(()=>[a(m,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:f=>_(O)(`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)):$("",!0)]),_:1},8,["model"]),a(V,{open:d.value,"onUpdate:open":e[4]||(e[4]=t=>d.value=t),title:"ویرایش شهر",onOk:L},{default:o(()=>[a(P,{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(C,{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(C,{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(z,{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{le as default};
+1
View File
@@ -0,0 +1 @@
.mt-4[data-v-b3f6276a]{margin-top:1rem}
+1
View File
@@ -0,0 +1 @@
import{d as w,f as C,g as o,r as B,e as l,o as N,c as e,A as U,h as V,l as r,y as m,x as j,z as c}from"./index-BhesYFRn.js";const z={class:"grid-2"},S=w({__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"),k=l("a-spin");return N(),C(k,{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};
+1
View File
@@ -0,0 +1 @@
.grid-5[data-v-1b8c9bc3]{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem}.ml-2[data-v-1b8c9bc3]{margin-right:.5rem}.mt-4[data-v-1b8c9bc3]{margin-top:1rem}.mt-5[data-v-1b8c9bc3]{margin-top:1.25rem}.totals[data-v-1b8c9bc3]{margin:1rem 0}
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
import{d as z,b as A,f as a,g as t,r as x,e as u,o as l,c as d,A as K,h as M,l as c,j as p,n as O,y as P,x as D,z as j}from"./index-BhesYFRn.js";import{a as E,b as _,X as I}from"./model-d1Prdbon.js";import{_ as $}from"./_plugin-vue_export-helper-DlAUqK2U.js";function q(){const r=new E("admin/misc/sms/list","لیست پیامک ها");return r.add(new _("id","شماره")),r.add(new _("text","متن پیامک").filterKey("body").filterText()),r.add(new _("mobile","گیرندگان").noSort()),r.add(new _("sent_count","تعداد").noSort()),r.add(new _("sender","ارسال کننده").noSort()),r.add(new _("caj","تاریخ").filterKey("createdAt").filterDate().noSort()),r}const F={class:"grid-2"},G=z({__name:"create",setup(r){const B=A(),f=y=>!!B.hasPermission(y),N=q(),g=x(null),k=x(!1),o=x(-1),m=x(""),b=x(""),s=P({});async function S(){var y,e,i;if(Object.keys(s).forEach(n=>delete s[n]),b.value||(s.text="متن پیامک الزامی است"),(o.value===-1||o.value===9)&&!m.value&&(s.mobile="شماره موبایل الزامی است"),!Object.keys(s).length)try{k.value=!0;const{data:n}=await D.post("sms",{type:o.value,mobile:m.value,text:b.value});j.success(`پیامک برای ${n.sentCount} شماره ثبت شد`),b.value="",m.value="",(y=g.value)==null||y.fetch()}catch(n){j.error(((i=(e=n==null?void 0:n.response)==null?void 0:e.data)==null?void 0:i.message)??"خطا در ارسال پیامک")}finally{k.value=!1}}return(y,e)=>{const i=u("a-select-option"),n=u("a-select"),w=u("a-form-item"),C=u("a-textarea"),R=u("a-input"),T=u("a-button"),V=u("a-form"),U=u("a-card"),X=u("a-spin");return l(),a(X,{spinning:k.value},{default:t(()=>[d(U,{title:"ارسال پیامک"},{default:t(()=>[d(V,{layout:"vertical",onSubmit:K(S,["prevent"])},{default:t(()=>[M("div",F,[d(w,{label:"ارسال برای"},{default:t(()=>[d(n,{value:o.value,"onUpdate:value":e[0]||(e[0]=v=>o.value=v)},{default:t(()=>[f("sms.create.single")?(l(),a(i,{key:0,value:-1},{default:t(()=>[...e[4]||(e[4]=[c(" شماره موبایل ",-1)])]),_:1})):p("",!0),f("sms.create.all")?(l(),a(i,{key:1,value:0},{default:t(()=>[...e[5]||(e[5]=[c(" همه مشتریان ",-1)])]),_:1})):p("",!0),f("sms.create.reagent")?(l(),a(i,{key:2,value:1},{default:t(()=>[...e[6]||(e[6]=[c(" کارشناسان فروش ",-1)])]),_:1})):p("",!0),f("sms.create.omde")?(l(),a(i,{key:3,value:2},{default:t(()=>[...e[7]||(e[7]=[c(" مشتریان عمده ",-1)])]),_:1})):p("",!0),f("sms.create.multiple")?(l(),a(i,{key:4,value:9},{default:t(()=>[...e[8]||(e[8]=[c(" شماره های موبایل ",-1)])]),_:1})):p("",!0)]),_:1},8,["value"])]),_:1}),o.value===-1||o.value===9?(l(),a(w,{key:0,label:o.value===9?"شماره های موبایل":"شماره موبایل","validate-status":s.mobile?"error":"",help:s.mobile},{default:t(()=>[o.value===9?(l(),a(C,{key:0,value:m.value,"onUpdate:value":e[1]||(e[1]=v=>m.value=v),"auto-size":{minRows:2,maxRows:6},placeholder:"هر شماره در یک خط"},null,8,["value"])):(l(),a(R,{key:1,value:m.value,"onUpdate:value":e[2]||(e[2]=v=>m.value=v)},null,8,["value"]))]),_:1},8,["label","validate-status","help"])):p("",!0)]),d(w,{label:"متن پیامک","validate-status":s.text?"error":"",help:s.text},{default:t(()=>[d(C,{value:b.value,"onUpdate:value":e[3]||(e[3]=v=>b.value=v),"auto-size":{minRows:4,maxRows:8}},null,8,["value"])]),_:1},8,["validate-status","help"]),d(T,{type:"primary",onClick:S},{default:t(()=>[...e[9]||(e[9]=[c("ارسال",-1)])]),_:1})]),_:1})]),_:1}),f("sms.list")?(l(),a(U,{key:0,title:"لیست پیامک ها",class:"mt-4"},{default:t(()=>[d(I,{ref_key:"tbl",ref:g,model:O(N)},null,8,["model"])]),_:1})):p("",!0)]),_:1},8,["spinning"])}}}),Q=$(G,[["__scopeId","data-v-b3f6276a"]]);export{Q as default};
+1
View File
@@ -0,0 +1 @@
import{_ as o}from"./createCity.vue_vue_type_script_setup_true_lang-CqYC6w5T.js";import"./index-BhesYFRn.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang--1LOdW_Y.js";export{o as default};

Some files were not shown because too many files have changed in this diff Show More