Author SHA1 Message Date
s.esmaeiliandCursor 032fa800d9 fix(admin-panel): serve assets under /admin/ for same-host path deploy
Default Vite base to /admin/ (ADMIN_PANEL_BASE) so Dokploy Path+/admin + Strip Path resolves assets instead of the user app root.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-31 23:24:46 +03:30
mahmoodandClaude Sonnet 5.5 7b0bbc072c build: refresh release artifacts after cart rial wage, header back button, variant modal responsive
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-31 10:48:08 +03:30
mahmoodandClaude Sonnet 5.5 09ff2a9c9b feat(app): rial wage total on cart lines, split cart totals, back button on every header; admin variant modal responsive
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-31 10:43:31 +03:30
mahmoodandClaude Sonnet 5.5 6514b05d18 fix(money,orders): wage/gram-debt parity, atomic document confirm, expert edit, made-to-order, QA fixes
- Rial wage and gram-debt arithmetic matched to the reference; order corrections keep debt in sync
- Document confirm/un-confirm is a compare-and-swap (no double-applied cache under concurrency)
- Settlement document and expert inputs validated (400 instead of 500)
- Expert: edit / activate-deactivate own customers, adjust raw weights only
- Made-to-order flow in the app, PreOrder.quantity migration
- Order grids: customer column, sort keys; panel select search; pre-order quantity save
- Rebuilt release artifacts

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-29 18:09:02 +03:30
mahmoodandCursor 959a272227 build: refresh release artifacts after dropping user-app
Rebuild API bundle, admin panel, and user-app-v2 for Dokploy copy-only deploy.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-28 16:25:46 +03:30
mahmoodandCursor 520454481b Remove user-app v1 and ship pending order, auth, and app fixes.
Drop the duplicate customer app from the monorepo and keep user-app-v2 as the only app; include order pricing, admin cart, OTP/SMS, and dashboard cache updates.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-28 16:22:32 +03:30
mahmoodandClaude Sonnet 5.5 bc881a0a8a build: rebuild API release bundle for the one-mobile-one-person check
Rebuilds apps/api/release so the deployed image carries 5f3b004. The vendored
Prisma client changes are only its recorded build paths. No source change.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 14:26:16 +03:30
mahmoodandClaude Sonnet 5.5 5f3b00497e feat(auth): one mobile, one person across sales experts and customers
Experts (AdminUser) and customers (Customer) sign in to the same apps by mobile
but live in different tables, so the database cannot make the number unique
across them. A number could be given to an expert and to a customer, and the
login then silently merged the two (the customer row was adopted as the expert's
trading account), which left the expert on a customer session and the panel's
name edits unreachable.

The reference rejected a duplicate at entry (`unique:customers`, the agent being
a customers row too); this does the same where a number is typed in:

- customer create/update (wholesale, banker, walk-in): refused when an ACTIVE
  expert holds the number;
- expert create/update: refused when a customer holds it (the expert's own
  trading account excepted);
- the app's self sign-up: refused when an active expert holds it.

Only a number being created or CHANGED is checked, so existing duplicates keep
signing in and stay editable; the login's "expert wins" adoption is untouched.
Plain equality on the two unique columns, normalised with faToEn, so both
lookups are index hits.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 14:24:37 +03:30
mahmoodandClaude Sonnet 5.5 5ddb225813 fix(ui): act-as strip no longer covers headers; customer type and slider permission
- apps: the fixed «در حال مشاهده به‌عنوان» strip (38px) sat over the fixed page
  headers, which still sat at top: 0 (the old 30px body padding was shorter than
  the strip too). The strip's height is now one variable, --aab-h, that the
  fixed headers (PageBar, home, dashboard, toasts) use as their top.
- admin: the customer form offers only «مغازه دار اپلیکیشن» to anyone but the
  super admin; bankers and walk-in shopkeepers are listed by super-admin-only
  endpoints, so ordinary admins lost the customers they created under them.
- admin: the mobile slider rid (custom.config.statics.slider) was only under the
  «سفارشی» branch, which the permission screen hides outside level 104. Same rid,
  now listed under «مدیریت ثابت ها». Display only: the slider routes are still
  gated by config.statics.

Rebuilds admin-panel, user-app and user-app-v2 dist.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 11:16:23 +03:30
mahmoodandClaude Sonnet 5.5 8c4ca20a25 fix(app): open the expert drawers — ant-design-vue 3 takes visible, not open
CustomerChoiceView, ChildOrdersView and ReportView bound their Drawer with
v-model:open, which only exists from ant-design-vue 4. Both apps ship 3.2.20,
so the drawer never opened: tapping a customer in «مشتریان من» did nothing and
the "ورود به حساب این مشتری" button inside it was unreachable.

Rebuilds user-app and user-app-v2 dist.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 10:51:34 +03:30
mahmoodandClaude Sonnet 5.5 0b973f9e46 fix(app): re-check the sales-expert flag on every dashboard visit
The "سفارش مشتریان" / "مشتریان من" entries are shown from session.isSalesExpert,
which was fetched from /expert/whoami only once, at sign-in. A slow or failed
request (silently swallowed) left the flag false until the next login, so an
expert saw a customer-only menu. The dashboard now asks again on mount and on
every re-activation, and keeps the current value when the request fails.

Rebuilds user-app and user-app-v2 dist.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 10:23:08 +03:30
mahmoodandClaude Sonnet 5.5 d8b6d36c1b build: rebuild API release bundle and admin panel for the omde list debug block
Rebuilds apps/api/release and apps/admin-panel/dist so the deployed images
carry 0156a97 (X-Debug counts block on the wholesale lists, console output in
the panel). No source change.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 09:38:35 +03:30
mahmoodandClaude Sonnet 5.5 0156a976e7 feat(customers): opt-in debug block on the omde lists, printed in the panel console
Sending X-Debug: 1 makes the five wholesale list endpoints return a counts-only
`debug` block next to the rows: the WHERE that actually ran, how many customers
the scope matches before the grid's own filters, how many customers exist per
kind/active/archived/step and how many are an expert's trading account. The
panel sends the header and console-logs the block when localStorage.debug === '1'.

Off by default; DIAG_LOG=false disables it server-side. No names or mobiles.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 08:59:33 +03:30
s.esmaeiliandClaude Opus 5.5 ab39f6abed chore(api): temporary boot-time data diagnostics in the container log
Prints aggregate counts only, prefixed [DIAG], right after migrations: customers
by kind/active/archived/step, what the omde list can show and how many rows are
sales-expert trading accounts (created vs adopted), experts' profile/trading
state, referral counts, the Admin table and the last applied migrations.

Read-only, no mobile/name/id is printed, each query isolated so a failure is
reported without stopping boot. Disable with DIAG_LOG=false; remove once the
empty-omde-list investigation is closed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 08:02:57 +03:30
s.esmaeiliandClaude Opus 5.5 ee43d664d5 fix(experts): an expert edited in the panel now shows up in the app
The app shows a sales expert their own account through the linked trading
Customer row (/customer/me). That row was seeded from the expert once, at first
sign-in, and never updated again, so a name, mobile, credit-limit or wage-percent
change made in the panel never reached the app. In the reference the agent and
that account were one row, so an edit changed both.

Editing an expert now mirrors exactly the changed fields onto the trading row in
the same transaction: name parts, credit limit (gram_level), wage percent, and the
mobile when no other customer holds it. Existing drift heals on the next save.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 08:00:01 +03:30
s.esmaeiliandClaude Sonnet 5.5 600ce06d15 fix: Persian duplicate-value errors; admin panel favicon uses the project logo
- PrismaExceptionFilter returned "Unique constraint failed on: mobile" in
  English for a duplicate. It now answers in Persian, naming the field
  (mobile, national code, member code, order number), with a safe generic
  fallback. Covered by a unit test.
- The admin panel still shipped the old "NZ" favicon. favicon.png/.ico are now
  generated from the project logo (the same one the user apps use), in both
  public/ and dist/, and the links carry ?v=2 so browsers drop the cached icon.
- Rebuilt apps/api/release/app.js.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 06:54:28 +03:30
s.esmaeiliandClaude Sonnet 5.5 0c52adcd26 fix(customers): show every non-archived wholesale customer in the main list
The reference (henza_server AdminController::getCustomer) lists type=2 AND
is_archive=0 with no verification or active filter. The develop-branch change
that hid inactive customers with a pending verification step from «عمده»
emptied the list for customers migrated in that state, while their numbers
stayed taken ("already exists"). Restore parity; the sales-expert trading
account exclusion is kept.

Includes the rebuilt release/app.js and a regression test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 06:50:05 +03:30
s.esmaeiliandClaude Sonnet 5.5 e2ec30f241 build: rebuild API release bundle for the admin/expert table split
app.js, seed.js, the Prisma client in release/vendor and the new migration
20261026120000_split_admin_table, built with `pnpm build:release` (API only;
the admin panel and user apps are unchanged by this work).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 23:55:07 +03:30
s.esmaeiliandClaude Sonnet 5.5 06c8a5f434 feat(auth): split panel admins out of AdminUser into their own Admin table
AdminUser held both panel staff and sales experts, so one mobile could not be
both. Staff now live in "Admin" (panel only); sales experts stay in "AdminUser"
untouched. Uniqueness is per table.

- migration 20261026120000_split_admin_table: additive only. Creates "Admin",
  copies non-expert rows with their ids, re-points the "who did this" foreign
  keys (ledger, order status, sms, notification, upload, allocation, workshop,
  admin session) to "Admin" without moving data. Never writes to "AdminUser".
- login, JWT, SSO, branch/workshop supervisors and the users grid use "Admin";
  SALES_EXPERT create/edit still goes through admin/users into "AdminUser".
- an admin cannot be turned into an expert or the reverse (different tables).
- manual/: optional phase-2 script to drop the dormant admin copies from
  "AdminUser", and a read-only expert-login diagnostic.
- docs/ADMIN-TABLE-SPLIT.md: what changed, deploy checklist, rollback.

Tested on a copy with 12,000 experts: expert rows byte-identical (md5) before
and after; full migration chain applies and matches schema.prisma.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 23:52:33 +03:30
s.esmaeiliandCursor 4679e2498c Exclude sales-expert trading accounts from wholesale customer lists.
Expert trading rows are APP_SHOPKEEPER for orders/ledger and were showing next to real omde customers.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-25 23:16:13 +03:30
s.esmaeiliandCursor 066bfd2818 Build release artifacts for deploy.
Refresh API release bundle and admin/user app dist outputs for Dokploy copy-only deploys.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-25 22:46:21 +03:30
s.esmaeiliandCursor 6592e88a2c Fix admin IAM redirect and separate pending wholesale lists.
Keep admin browser bootstrap from falling back to the customer app URL, and exclude activated customers from the pending-verification list so it no longer mirrors the main omde grid.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-25 22:44:48 +03:30
mahmood 55d27151c9 feat(products): port missing variant fields from henza and redesign variant modal 2026-10-25 16:06:17 +03:30
mahmood 143d9aefbb fix(cities): remove 'استان' prefix, keep clean city/province names 2026-10-25 13:31:35 +03:30
mahmood 41fc2496ef fix(cities): keep only 31 provinces, remove bulky sub-cities seed 2026-10-25 13:23:57 +03:30
mahmood bb281cc5d6 feat(cities): seed all Iran provinces and cities with tree hierarchy 2026-10-25 13:04:07 +03:30
mahmood af5095a0e3 build: rebuild release and app bundles 2026-10-25 12:08:58 +03:30
mahmood 88cc8935de build: rebuild assets and update bundles 2026-10-25 11:55:55 +03:30
786 changed files with 15920 additions and 34625 deletions
+5 -1
View File
@@ -19,7 +19,9 @@ DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGR
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
API_PORT=3000 API_PORT=3000
ADMIN_PANEL_PORT=5180 ADMIN_PANEL_PORT=5180
USER_APP_PORT=5181 # Vite `base` for the admin panel. Default `/admin/` for same-host path deploy
# (Dokploy: Path `/admin` + Strip Path). Use `/` only for a dedicated subdomain.
ADMIN_PANEL_BASE=/admin/
USER_APP_V2_PORT=5182 USER_APP_V2_PORT=5182
# API Configuration (kept for any tooling that still reads bare PORT) # API Configuration (kept for any tooling that still reads bare PORT)
@@ -85,6 +87,8 @@ IAM_POST_LOGOUT_REDIRECT_URI=
# مقصدهای مجاز خروج اپ کاربر، با کاما. باید عیناً در post_logout کلاینت باشند. # مقصدهای مجاز خروج اپ کاربر، با کاما. باید عیناً در post_logout کلاینت باشند.
IAM_ALLOWED_RETURN_URLS= IAM_ALLOWED_RETURN_URLS=
# پنل ادمین. خالی یعنی بررسی بی‌صدای ورود در پنل انجام نمی‌شود. # پنل ادمین. خالی یعنی بررسی بی‌صدای ورود در پنل انجام نمی‌شود.
# IAM_ADMIN_BROWSER_RETURN_URL را خالی نگذارید اگر IAM_BROWSER_RETURN_URL
# (اپ کاربر) پر است — وگرنه بعد از ورود ادمین مرورگر به اپ کاربر می‌افتد.
IAM_ADMIN_REDIRECT_URI= IAM_ADMIN_REDIRECT_URI=
IAM_ADMIN_REDIRECT_URIS= IAM_ADMIN_REDIRECT_URIS=
IAM_ADMIN_BROWSER_RETURN_URL= IAM_ADMIN_BROWSER_RETURN_URL=
+7 -5
View File
@@ -240,7 +240,7 @@ pnpm dev # all apps via turbo
``` ```
Ports come from the repo-root `.env` (single source of truth): Ports come from the repo-root `.env` (single source of truth):
API 3000, admin-panel 5180, user-app 5181, user-app-v2 5182. API 3000, admin-panel 5180, user-app-v2 5182.
### Build ### Build
@@ -263,8 +263,8 @@ docker compose up -d --build
> success. During this delivery's compose run that bundle was four days old and > success. During this delivery's compose run that bundle was four days old and
> the container was missing every route added since. Tracked as **DEPLOY-03**. > the container was missing every route added since. Tracked as **DEPLOY-03**.
Services: `db` (Postgres 15), `api` (port 3000), `admin-panel`, `user-app`, Services: `db` (Postgres 15), `api` (port 3000), `admin-panel`,
`user-app-v2` (each nginx on port 80). The apps expose no host ports — `user-app-v2` (nginx on port 80). The apps expose no host ports —
Dokploy/Traefik routes to them by domain. Uploads persist in the `api_uploads` Dokploy/Traefik routes to them by domain. Uploads persist in the `api_uploads`
volume; without it every previously uploaded image 404s after a redeploy. volume; without it every previously uploaded image 404s after a redeploy.
@@ -385,8 +385,10 @@ risks and both recorded in D21:
1. `myChild` minted an `api_token` per listed customer so the agent could act 1. `myChild` minted an `api_token` per listed customer so the agent could act
**as** them — a session-hijack primitive. **as** them — a session-hijack primitive.
2. The child-order edit drawer (`PUT /order/child/{id}`) recalculated an 2. The child-order edit drawer (`PUT /order/child/{id}`) recalculated an
order's weights and prices from client-sent values. The card opens a order's weights and prices from client-sent values. **Since 2026-10-29 it is
read-only summary instead. back in a safe form:** the expert sends only the real raw weight per piece and
the server applies the making charge, recomputes totals and debt, and checks
the order is theirs.
### Behavioural gaps ### Behavioural gaps
+13 -5
View File
@@ -8,7 +8,7 @@ Dokploy only builds thin images that copy those files (no `pnpm install` on the
```bash ```bash
pnpm install pnpm install
pnpm build:release pnpm build:release
git add -f apps/api/release apps/admin-panel/dist apps/user-app/dist apps/user-app-v2/dist git add -f apps/api/release apps/admin-panel/dist apps/user-app-v2/dist
git commit -m "chore: refresh release artifacts" git commit -m "chore: refresh release artifacts"
git push git push
``` ```
@@ -19,8 +19,7 @@ What this produces:
|---|---|---| |---|---|---|
| API | `apps/api/release/app.js` (+ Prisma under `release/vendor`) | `docker.arvancloud.ir/node:20-bookworm` | | API | `apps/api/release/app.js` (+ Prisma under `release/vendor`) | `docker.arvancloud.ir/node:20-bookworm` |
| Admin | `apps/admin-panel/dist/` | `docker.arvancloud.ir/nginx:latest` | | Admin | `apps/admin-panel/dist/` | `docker.arvancloud.ir/nginx:latest` |
| User | `apps/user-app/dist/` | `docker.arvancloud.ir/nginx:latest` | | User | `apps/user-app-v2/dist/` | `docker.arvancloud.ir/nginx:latest` |
| User v2 | `apps/user-app-v2/dist/` | `docker.arvancloud.ir/nginx:latest` |
## Dokploy Environment ## Dokploy Environment
@@ -42,11 +41,20 @@ different Compose project name for each application.
## Domains (container ports) ## Domains (container ports)
Same host (path-based) — default in this repo:
| Service | Path | Port | Notes |
|---|---|---|---|
| `user-app-v2` | `/` | **80** | |
| `admin-panel` | `/admin` | **80** | Strip Path on. Build with `ADMIN_PANEL_BASE=/admin/` (default) so `index.html` links `/admin/assets/…`. |
| `api` | (optional) | **3000** | |
Or separate subdomains — set `ADMIN_PANEL_BASE=/` before `pnpm build:release`:
| Service | Domain | Port | | Service | Domain | Port |
|---|---|---| |---|---|---|
| `admin-panel` | admin.example.com | **80** | | `admin-panel` | admin.example.com | **80** |
| `user-app` | app.example.com | **80** | | `user-app-v2` | app.example.com | **80** |
| `user-app-v2` | app-v2.example.com | **80** |
| `api` | (optional) | **3000** | | `api` | (optional) | **3000** |
Frontends call `/api` on their own domain; nginx proxies to `api:3000`. Frontends call `/api` on their own domain; nginx proxies to `api:3000`.
@@ -1 +1 @@
import{c as O,I as x,d as j,x as B,y as m,o as C,a as A,w as y,f as $,t as E,h as P,i as L,m as u,a8 as v,M as b,G as M,r as N}from"./index-CfFqH7Y1.js";var V={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"};function g(o){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable}))),r.forEach(function(c){z(o,c,n[c])})}return o}function z(o,t,n){return t in o?Object.defineProperty(o,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):o[t]=n,o}var d=function(t,n){var r=g({},t,n.attrs);return O(x,g({},r,{icon:V}),null)};d.displayName="SyncOutlined";d.inheritAttrs=!1;const I=j({__name:"AccountingSyncButton",props:{endpoint:{}},emits:["done"],setup(o,{emit:t}){const n=o,r=t,c=u(!1),p=u(null),i=u(!1),h={customers:"مشتریان",balances:"مانده‌ها",products:"کارساخته‌ها و موجودی"},_={scanned:"بررسی‌شده",inScope:"در گروه‌های انتخابی",refreshed:"به‌روز",linked:"لینک‌شده",imported:"وارد شده",issues:"مغایرت",updated:"به‌روز",items:"کارساخته",stockErrors:"خطای موجودی"},S=e=>e&&typeof e=="object"?Object.entries(e).map(([s,a])=>`${_[s]??s}: ${a}`).join("، "):"";B(async()=>{try{const{data:e}=await m.get("admin/accounting-status");c.value=!!(e!=null&&e.connected),p.value=(e==null?void 0:e.provider)??null}catch{c.value=!1}});async function w(){var e,s;i.value=!0;try{const{data:a}=await m.post(n.endpoint),k=Object.entries(a.results).map(([f,l])=>v("p",{style:l.ok?"":"color:#d4380d"},`${h[f]??f}: ${l.ok?S(l.summary)||"انجام شد":`خطا — ${l.error}`}`));(a.ok?b.success:b.warning)({title:a.ok?"سینک با حسابداری انجام شد":"سینک با حسابداری کامل انجام نشد",content:v("div",k),okText:"باشه"}),r("done")}catch(a){M.error(((s=(e=a==null?void 0:a.response)==null?void 0:e.data)==null?void 0:s.message)||"سینک با حسابداری انجام نشد")}finally{i.value=!1}}return(e,s)=>{const a=N("a-button");return c.value?(C(),A(a,{key:0,loading:i.value,onClick:w},{icon:y(()=>[O(P(d))]),default:y(()=>[$(" سینک با "+E(p.value||"حسابداری"),1)]),_:1},8,["loading"])):L("",!0)}}});export{I as _}; import{c as O,I as x,d as j,x as B,y as m,o as C,a as A,w as y,f as $,t as E,h as N,i as P,m as u,a9 as v,N as b,J as L,r as M}from"./index-BpoVO8sC.js";var V={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"};function g(o){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable}))),r.forEach(function(c){z(o,c,n[c])})}return o}function z(o,t,n){return t in o?Object.defineProperty(o,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):o[t]=n,o}var d=function(t,n){var r=g({},t,n.attrs);return O(x,g({},r,{icon:V}),null)};d.displayName="SyncOutlined";d.inheritAttrs=!1;const I=j({__name:"AccountingSyncButton",props:{endpoint:{}},emits:["done"],setup(o,{emit:t}){const n=o,r=t,c=u(!1),p=u(null),i=u(!1),h={customers:"مشتریان",balances:"مانده‌ها",products:"کارساخته‌ها و موجودی"},_={scanned:"بررسی‌شده",inScope:"در گروه‌های انتخابی",refreshed:"به‌روز",linked:"لینک‌شده",imported:"وارد شده",issues:"مغایرت",updated:"به‌روز",items:"کارساخته",stockErrors:"خطای موجودی"},S=e=>e&&typeof e=="object"?Object.entries(e).map(([s,a])=>`${_[s]??s}: ${a}`).join("، "):"";B(async()=>{try{const{data:e}=await m.get("admin/accounting-status");c.value=!!(e!=null&&e.connected),p.value=(e==null?void 0:e.provider)??null}catch{c.value=!1}});async function w(){var e,s;i.value=!0;try{const{data:a}=await m.post(n.endpoint),k=Object.entries(a.results).map(([f,l])=>v("p",{style:l.ok?"":"color:#d4380d"},`${h[f]??f}: ${l.ok?S(l.summary)||"انجام شد":`خطا — ${l.error}`}`));(a.ok?b.success:b.warning)({title:a.ok?"سینک با حسابداری انجام شد":"سینک با حسابداری کامل انجام نشد",content:v("div",k),okText:"باشه"}),r("done")}catch(a){L.error(((s=(e=a==null?void 0:a.response)==null?void 0:e.data)==null?void 0:s.message)||"سینک با حسابداری انجام نشد")}finally{i.value=!1}}return(e,s)=>{const a=M("a-button");return c.value?(C(),A(a,{key:0,loading:i.value,onClick:w},{icon:y(()=>[O(N(d))]),default:y(()=>[$(" سینک با "+E(p.value||"حسابداری"),1)]),_:1},8,["loading"])):P("",!0)}}});export{I as _};
+1
View File
@@ -0,0 +1 @@
import{_ as o}from"./Add.vue_vue_type_script_setup_true_lang-BcAS3HVh.js";import"./index-BpoVO8sC.js";import"./select--BgT6D7O.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-AKFpsSMX.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-DFb5CG1L.js";export{o as default};
-1
View File
@@ -1 +0,0 @@
import{_ as o}from"./Add.vue_vue_type_script_setup_true_lang-DQg8ipd6.js";import"./index-CfFqH7Y1.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-c3IiekqO.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-Bef1m3ur.js";export{o as default};
File diff suppressed because one or more lines are too long
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-E7Zk4Fh3.js";import"./index-BpoVO8sC.js";import"./select--BgT6D7O.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-AKFpsSMX.js";export{o as default};
-1
View File
@@ -1 +0,0 @@
import{_ as o}from"./AddBranches.vue_vue_type_script_setup_true_lang-C2O0z_CA.js";import"./index-CfFqH7Y1.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-c3IiekqO.js";export{o as default};
@@ -1 +0,0 @@
import{d as L,x as T,y as c,a as v,w as l,h as R,k as q,m as S,z as C,r as i,o as p,p as O,c as n,b as $,e as j,f as g,t as z,F as M,H as I,G as N,l as J}from"./index-CfFqH7Y1.js";import{_ as K}from"./BaseFormModal.vue_vue_type_style_index_0_lang-c3IiekqO.js";const P={class:"grid-2"},Q={class:"grid-2"},Y=L({__name:"AddBranches",props:{open:{type:Boolean},id:{}},emits:["update:open","success"],setup(h,{emit:V}){const y=h,w=V,f=y.open!==void 0,E=q(),F=J(),r=f?y.id:E.params.id,m=S(!1),_=S([]),t=C({name:"",phone:"",address:"",user_id:void 0}),d=C({});function k(s,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(s)}async function b(){var s,e;if(Object.keys(d).forEach(o=>delete d[o]),!t.name){d.name="لطفا مقدار را وارد کنید";return}try{m.value=!0,r?await c.put(`branch/${r}`,t):await c.post("branch",t),N.info("اطلاعات با موفقیت به ثبت رسید."),r||Object.assign(t,{name:"",phone:"",address:"",user_id:void 0}),f?(w("success"),w("update:open",!1)):F.push("/branch/list")}catch(o){N.error(((e=(s=o==null?void 0:o.response)==null?void 0:s.data)==null?void 0:e.message)??"خطا در ثبت اطلاعات.")}finally{m.value=!1}}return T(async()=>{try{const{data:s}=await c.get("user/list");_.value=s}catch(s){console.log(s)}if(r)try{const{data:s}=await c.get(`branch/${r}`);Object.assign(t,{name:s.name??"",phone:s.phone??"",address:s.address??"",user_id:s.user_id??void 0})}catch(s){console.log(s)}}),(s,e)=>{const o=i("a-input"),u=i("a-form-item"),U=i("a-select-option"),x=i("a-select"),B=i("a-textarea"),A=i("a-button"),D=i("a-card"),G=i("a-form"),H=i("a-spin");return f?(p(),v(K,{key:0,open:!!h.open,id:R(r),"add-title":"افزودن شعبه","edit-title":"ویرایش شعبه",loading:m.value,submitting:m.value,"onUpdate:open":e[4]||(e[4]=a=>s.$emit("update:open",a)),onSubmit:b},{default:l(()=>[O("div",P,[n(u,{label:"نام شعبه","validate-status":d.name?"error":"",help:d.name},{default:l(()=>[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:l(()=>[n(o,{value:t.phone,"onUpdate:value":e[1]||(e[1]=a=>t.phone=a)},null,8,["value"])]),_:1}),n(u,{label:"مدیر"},{default:l(()=>[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:l(()=>[(p(!0),$(M,null,j(_.value,a=>(p(),v(U,{key:a.id,value:a.id},{default:l(()=>[g(z(a.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})]),n(u,{label:"آدرس"},{default:l(()=>[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(H,{key:1,spinning:m.value},{default:l(()=>[n(G,{layout:"vertical",onSubmit:I(b,["prevent"])},{default:l(()=>[n(D,{title:R(r)?"ویرایش شعبه":"افزودن شعبه",class:"mb-base page-card"},{default:l(()=>[O("div",Q,[n(u,{label:"نام شعبه","validate-status":d.name?"error":"",help:d.name},{default:l(()=>[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:l(()=>[n(o,{value:t.phone,"onUpdate:value":e[6]||(e[6]=a=>t.phone=a)},null,8,["value"])]),_:1}),n(u,{label:"مدیر"},{default:l(()=>[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:l(()=>[(p(!0),$(M,null,j(_.value,a=>(p(),v(U,{key:a.id,value:a.id},{default:l(()=>[g(z(a.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})]),n(u,{label:"آدرس"},{default:l(()=>[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(A,{type:"primary",class:"form-submit",onClick:b},{default:l(()=>[...e[9]||(e[9]=[g("ثبت اطلاعات",-1)])]),_:1})]),_:1},8,["title"])]),_:1})]),_:1},8,["spinning"]))}}});export{Y as _};
@@ -0,0 +1 @@
import{d as J,x as L,y as c,a as v,w as s,h as R,k as q,m as C,z as O,r as i,o as p,p as S,c as n,b as $,e as j,f as g,t as z,F as M,H as G,J as N,l as I}from"./index-BpoVO8sC.js";import{o as K}from"./select--BgT6D7O.js";import{_ as P}from"./BaseFormModal.vue_vue_type_style_index_0_lang-AKFpsSMX.js";const Q={class:"grid-2"},W={class:"grid-2"},ee=J({__name:"AddBranches",props:{open:{type:Boolean},id:{}},emits:["update:open","success"],setup(y,{emit:V}){const h=y,w=V,f=h.open!==void 0,E=q(),F=I(),r=f?h.id:E.params.id,m=C(!1),_=C([]),t=O({name:"",phone:"",address:"",user_id:void 0}),d=O({});function k(o,e){return K(e).includes(o)}async function b(){var o,e;if(Object.keys(d).forEach(l=>delete d[l]),!t.name){d.name="لطفا مقدار را وارد کنید";return}try{m.value=!0,r?await c.put(`branch/${r}`,t):await c.post("branch",t),N.info("اطلاعات با موفقیت به ثبت رسید."),r||Object.assign(t,{name:"",phone:"",address:"",user_id:void 0}),f?(w("success"),w("update:open",!1)):F.push("/branch/list")}catch(l){N.error(((e=(o=l==null?void 0:l.response)==null?void 0:o.data)==null?void 0:e.message)??"خطا در ثبت اطلاعات.")}finally{m.value=!1}}return L(async()=>{try{const{data:o}=await c.get("user/list");_.value=o}catch(o){console.log(o)}if(r)try{const{data:o}=await c.get(`branch/${r}`);Object.assign(t,{name:o.name??"",phone:o.phone??"",address:o.address??"",user_id:o.user_id??void 0})}catch(o){console.log(o)}}),(o,e)=>{const l=i("a-input"),u=i("a-form-item"),x=i("a-select-option"),U=i("a-select"),B=i("a-textarea"),T=i("a-button"),A=i("a-card"),D=i("a-form"),H=i("a-spin");return f?(p(),v(P,{key:0,open:!!y.open,id:R(r),"add-title":"افزودن شعبه","edit-title":"ویرایش شعبه",loading:m.value,submitting:m.value,"onUpdate:open":e[4]||(e[4]=a=>o.$emit("update:open",a)),onSubmit:b},{default:s(()=>[S("div",Q,[n(u,{label:"نام شعبه","validate-status":d.name?"error":"",help:d.name},{default:s(()=>[n(l,{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(l,{value:t.phone,"onUpdate:value":e[1]||(e[1]=a=>t.phone=a)},null,8,["value"])]),_:1}),n(u,{label:"مدیر"},{default:s(()=>[n(U,{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),$(M,null,j(_.value,a=>(p(),v(x,{key:a.id,value:a.id},{default:s(()=>[g(z(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(H,{key:1,spinning:m.value},{default:s(()=>[n(D,{layout:"vertical",onSubmit:G(b,["prevent"])},{default:s(()=>[n(A,{title:R(r)?"ویرایش شعبه":"افزودن شعبه",class:"mb-base page-card"},{default:s(()=>[S("div",W,[n(u,{label:"نام شعبه","validate-status":d.name?"error":"",help:d.name},{default:s(()=>[n(l,{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(l,{value:t.phone,"onUpdate:value":e[6]||(e[6]=a=>t.phone=a)},null,8,["value"])]),_:1}),n(u,{label:"مدیر"},{default:s(()=>[n(U,{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),$(M,null,j(_.value,a=>(p(),v(x,{key:a.id,value:a.id},{default:s(()=>[g(z(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(T,{type:"primary",class:"form-submit",onClick:b},{default:s(()=>[...e[9]||(e[9]=[g("ثبت اطلاعات",-1)])]),_:1})]),_:1},8,["title"])]),_:1})]),_:1},8,["spinning"]))}}});export{ee as _};
+1
View File
@@ -0,0 +1 @@
import{c as h,I as w,d as x,u as z,m as B,b as l,p as n,w as I,F as v,e as P,a as m,g as k,i as p,k as A,s as R,r as F,o as i,h as b,A as H,l as M,q as V,t as y,M as j,_ as N}from"./index-BpoVO8sC.js";import{_ as D}from"./bulkCustomer.vue_vue_type_script_setup_true_lang-Ouikyiku.js";import{R as U}from"./ReagentCustomer-BF1FMq1p.js";import{S as $}from"./singleCustomer-D_ZNJxNr.js";import{S as q}from"./ShopOutlined-DVjFkugI.js";import{U as E}from"./UserOutlined-LZP399mF.js";import"./select--BgT6D7O.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-AKFpsSMX.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-DFb5CG1L.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-hgtQuMnj.js";import"./DateInput-DmRoQ6ii.js";import"./index-B_k8FJMA.js";import"./EnvironmentOutlined-Ct4S5Z03.js";import"./PercentageOutlined-ma5C50gj.js";import"./SafetyCertificateOutlined-Cz-icoeY.js";import"./CameraOutlined-CV3xdZPp.js";var L={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-40 632H136V232h752v560zM610.3 476h123.4c1.3 0 2.3-3.6 2.3-8v-48c0-4.4-1-8-2.3-8H610.3c-1.3 0-2.3 3.6-2.3 8v48c0 4.4 1 8 2.3 8zm4.8 144h185.7c3.9 0 7.1-3.6 7.1-8v-48c0-4.4-3.2-8-7.1-8H615.1c-3.9 0-7.1 3.6-7.1 8v48c0 4.4 3.2 8 7.1 8zM224 673h43.9c4.2 0 7.6-3.3 7.9-7.5 3.8-50.5 46-90.5 97.2-90.5s93.4 40 97.2 90.5c.3 4.2 3.7 7.5 7.9 7.5H522a8 8 0 008-8.4c-2.8-53.3-32-99.7-74.6-126.1a111.8 111.8 0 0029.1-75.5c0-61.9-49.9-112-111.4-112s-111.4 50.1-111.4 112c0 29.1 11 55.5 29.1 75.5a158.09 158.09 0 00-74.6 126.1c-.4 4.6 3.2 8.4 7.8 8.4zm149-262c28.5 0 51.7 23.3 51.7 52s-23.2 52-51.7 52-51.7-23.3-51.7-52 23.2-52 51.7-52z"}}]},name:"idcard",theme:"outlined"};function g(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},o=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable}))),o.forEach(function(s){T(a,s,t[s])})}return a}function T(a,e,t){return e in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}var _=function(e,t){var o=g({},e,t.attrs);return h(w,g({},o,{icon:L}),null)};_.displayName="IdcardOutlined";_.inheritAttrs=!1;const G={id:"page-user-view",class:"pf-page"},J={class:"pf-head"},Q={class:"kind-picker",role:"tablist"},W=["aria-selected","onClick"],X={class:"kind-card__icon"},Y={class:"kind-card__text"},Z=x({__name:"AddCustomer",setup(a){const e=A(),t=M(),o=z(),s=B(e.query.tab||"omde"),u=c=>!!o.hasPermission(c),d=R(()=>{const c=[];return u("persons.create.client")&&c.push({key:"omde",title:"مشتری عمده",hint:"مغازه‌دار، بنکدار و خریدار عمده",icon:q}),u("persons.create.seller")&&c.push({key:"reagent",title:"کارشناس فروش",hint:"کارشناس با کمیسیون و سقف اعتبار",icon:_}),o.isSuperAdmin&&c.push({key:"tak",title:"مشتری تک",hint:"مشتری خرده‌فروشی حضوری",icon:E}),c}),O={omde:D,reagent:U,tak:$};function C(){window.history.length>1?t.back():t.push("/customer/omde-list")}return(c,f)=>{const S=F("a-button");return i(),l("div",G,[n("header",J,[h(S,{class:"pf-head__back",shape:"circle",onClick:C},{icon:I(()=>[h(b(H))]),_:1}),f[0]||(f[0]=n("div",{class:"pf-head__text"},[n("h1",null,"افزودن شخص"),n("p",null,"نوع شخص را انتخاب و اطلاعات او را تکمیل کنید.")],-1))]),u("persons.create")&&d.value.length?(i(),l(v,{key:0},[n("div",Q,[(i(!0),l(v,null,P(d.value,r=>(i(),l("button",{key:r.key,type:"button",role:"tab",class:V(["kind-card",{"is-on":s.value===r.key}]),"aria-selected":s.value===r.key,onClick:K=>s.value=r.key},[n("span",X,[(i(),m(k(r.icon)))]),n("span",Y,[n("b",null,y(r.title),1),n("small",null,y(r.hint),1)]),s.value===r.key?(i(),m(b(j),{key:0,class:"kind-card__check"})):p("",!0)],10,W))),128))]),d.value.some(r=>r.key===s.value)?(i(),m(k(O[s.value]),{key:s.value})):p("",!0)],64)):p("",!0)])}}}),fe=N(Z,[["__scopeId","data-v-09902473"]]);export{fe as default};
-1
View File
@@ -1 +0,0 @@
import{c as h,I as w,d as x,u as z,m as B,b as l,p as n,w as I,F as v,e as P,a as m,g as k,i as p,k as R,s as A,r as F,o as i,h as b,R as H,l as V,q as j,t as y,L as M,_ as N}from"./index-CfFqH7Y1.js";import{_ as D}from"./bulkCustomer.vue_vue_type_script_setup_true_lang-kvkFAhMn.js";import{R as U}from"./ReagentCustomer-BhGDNkn2.js";import{S as $}from"./singleCustomer-CGlWd29n.js";import{S as q}from"./ShopOutlined-B8DDAqCd.js";import{U as E}from"./UserOutlined-CYxHdL50.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-c3IiekqO.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-Bef1m3ur.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-BpLncgqo.js";import"./DateInput-CIVPRY3v.js";import"./index-C7lpysFQ.js";import"./EnvironmentOutlined-CPphX-yj.js";import"./PercentageOutlined-Bd1Dkr7s.js";import"./SafetyCertificateOutlined-BZ63h8A6.js";import"./CameraOutlined-xjgD1EU0.js";var L={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-40 632H136V232h752v560zM610.3 476h123.4c1.3 0 2.3-3.6 2.3-8v-48c0-4.4-1-8-2.3-8H610.3c-1.3 0-2.3 3.6-2.3 8v48c0 4.4 1 8 2.3 8zm4.8 144h185.7c3.9 0 7.1-3.6 7.1-8v-48c0-4.4-3.2-8-7.1-8H615.1c-3.9 0-7.1 3.6-7.1 8v48c0 4.4 3.2 8 7.1 8zM224 673h43.9c4.2 0 7.6-3.3 7.9-7.5 3.8-50.5 46-90.5 97.2-90.5s93.4 40 97.2 90.5c.3 4.2 3.7 7.5 7.9 7.5H522a8 8 0 008-8.4c-2.8-53.3-32-99.7-74.6-126.1a111.8 111.8 0 0029.1-75.5c0-61.9-49.9-112-111.4-112s-111.4 50.1-111.4 112c0 29.1 11 55.5 29.1 75.5a158.09 158.09 0 00-74.6 126.1c-.4 4.6 3.2 8.4 7.8 8.4zm149-262c28.5 0 51.7 23.3 51.7 52s-23.2 52-51.7 52-51.7-23.3-51.7-52 23.2-52 51.7-52z"}}]},name:"idcard",theme:"outlined"};function g(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},o=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable}))),o.forEach(function(s){T(r,s,t[s])})}return r}function T(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var _=function(e,t){var o=g({},e,t.attrs);return h(w,g({},o,{icon:L}),null)};_.displayName="IdcardOutlined";_.inheritAttrs=!1;const G={id:"page-user-view",class:"pf-page"},J={class:"pf-head"},Q={class:"kind-picker",role:"tablist"},W=["aria-selected","onClick"],X={class:"kind-card__icon"},Y={class:"kind-card__text"},Z=x({__name:"AddCustomer",setup(r){const e=R(),t=V(),o=z(),s=B(e.query.tab||"omde"),u=c=>!!o.hasPermission(c),d=A(()=>{const c=[];return u("persons.create.client")&&c.push({key:"omde",title:"مشتری عمده",hint:"مغازه‌دار، بنکدار و خریدار عمده",icon:q}),u("persons.create.seller")&&c.push({key:"reagent",title:"کارشناس فروش",hint:"کارشناس با کمیسیون و سقف اعتبار",icon:_}),o.isSuperAdmin&&c.push({key:"tak",title:"مشتری تک",hint:"مشتری خرده‌فروشی حضوری",icon:E}),c}),O={omde:D,reagent:U,tak:$};function C(){window.history.length>1?t.back():t.push("/customer/omde-list")}return(c,f)=>{const S=F("a-button");return i(),l("div",G,[n("header",J,[h(S,{class:"pf-head__back",shape:"circle",onClick:C},{icon:I(()=>[h(b(H))]),_:1}),f[0]||(f[0]=n("div",{class:"pf-head__text"},[n("h1",null,"افزودن شخص"),n("p",null,"نوع شخص را انتخاب و اطلاعات او را تکمیل کنید.")],-1))]),u("persons.create")&&d.value.length?(i(),l(v,{key:0},[n("div",Q,[(i(!0),l(v,null,P(d.value,a=>(i(),l("button",{key:a.key,type:"button",role:"tab",class:j(["kind-card",{"is-on":s.value===a.key}]),"aria-selected":s.value===a.key,onClick:K=>s.value=a.key},[n("span",X,[(i(),m(k(a.icon)))]),n("span",Y,[n("b",null,y(a.title),1),n("small",null,y(a.hint),1)]),s.value===a.key?(i(),m(b(M),{key:0,class:"kind-card__check"})):p("",!0)],10,W))),128))]),d.value.some(a=>a.key===s.value)?(i(),m(k(O[s.value]),{key:s.value})):p("",!0)],64)):p("",!0)])}}}),_e=N(Z,[["__scopeId","data-v-09902473"]]);export{_e as default};
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
.mt-4[data-v-a752a6ce]{margin-top:1rem}.mt-5[data-v-a752a6ce]{margin-top:1.25rem}
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
.mt-4[data-v-42197ac4]{margin-top:1rem}.mt-5[data-v-42197ac4]{margin-top:1.25rem}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
import{_ as o}from"./AddWorkshop.vue_vue_type_script_setup_true_lang-DOx1Q7F_.js";import"./index-CfFqH7Y1.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-c3IiekqO.js";export{o as default};
+1
View File
@@ -0,0 +1 @@
import{_ as o}from"./AddWorkshop.vue_vue_type_script_setup_true_lang-TRBP_542.js";import"./index-BpoVO8sC.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-AKFpsSMX.js";export{o as default};
@@ -1 +1 @@
import{d as N,x as O,y as v,a as b,w as n,h as g,k as S,m as V,z as y,r as p,o as U,p as x,c as o,f as A,H as E,G as c,l as G}from"./index-CfFqH7Y1.js";import{_ as H}from"./BaseFormModal.vue_vue_type_style_index_0_lang-c3IiekqO.js";const T={class:"grid-3"},W={class:"grid-3"},F=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=G(),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(H,{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",T,[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 page-card"},{default:n(()=>[x("div",W,[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",class:"form-submit",onClick:m},{default:n(()=>[...a[13]||(a[13]=[A("ثبت اطلاعات",-1)])]),_:1})]),_:1},8,["title"])]),_:1})]),_:1},8,["spinning"]))}}});export{F as _}; import{d as N,x as O,y as v,a as b,w as n,h as g,k as S,m as V,z as y,r as p,o as U,p as x,c as o,f as A,H as E,J as c,l as H}from"./index-BpoVO8sC.js";import{_ as J}from"./BaseFormModal.vue_vue_type_style_index_0_lang-AKFpsSMX.js";const T={class:"grid-3"},W={class:"grid-3"},F=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=H(),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(J,{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",T,[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 page-card"},{default:n(()=>[x("div",W,[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",class:"form-submit",onClick:m},{default:n(()=>[...a[13]||(a[13]=[A("ثبت اطلاعات",-1)])]),_:1})]),_:1},8,["title"])]),_:1})]),_:1},8,["spinning"]))}}});export{F as _};
@@ -1 +1 @@
import{d as D,x as S,y as A,a as b,w as a,k as F,m as y,r as d,o as i,c as l,f as n,t as s,p as E,b as p,F as f,h as I,i as k,_ as M}from"./index-CfFqH7Y1.js";import{j as h}from"./filters-DWtPewx7.js";import"./index-C7lpysFQ.js";const R={class:"stats mt-4"},T=D({__name:"AgentDetail",setup($){const j=F().params.id,m=y(!1),o=y(void 0),C=[{title:"نام",dataIndex:"name"},{title:"موبایل",dataIndex:"mobile"},{title:"شهر",dataIndex:"city"},{title:"نوع",dataIndex:"type_str"},{title:"وضعیت",dataIndex:"active"},{title:"تاریخ ثبت",dataIndex:"caj"}],w=[{title:"شماره سفارش",dataIndex:"name"},{title:"مشتری",dataIndex:"customer"},{title:"وزن",dataIndex:"w"},{title:"وضعیت",dataIndex:"status"},{title:"تاریخ",dataIndex:"caj"}];return S(async()=>{try{m.value=!0;const{data:_}=await A.get(`admin/customers-omde/reagent/${j}`);o.value=_}catch(_){console.log(_)}finally{m.value=!1}}),(_,G)=>{const c=d("a-descriptions-item"),u=d("a-tag"),z=d("a-descriptions"),B=d("a-card"),v=d("a-table"),x=d("a-tab-pane"),N=d("a-tabs"),V=d("a-spin");return i(),b(V,{spinning:m.value},{default:a(()=>[l(B,{title:"مشاهده اطلاعات کارشناس فروش",class:"page-card"},{default:a(()=>[l(z,{bordered:"",size:"small",column:{xxl:3,xl:3,lg:3,md:2,sm:2,xs:1}},{default:a(()=>[l(c,{label:"نام"},{default:a(()=>{var e;return[n(s(((e=o.value)==null?void 0:e.name)??"-"),1)]}),_:1}),l(c,{label:"موبایل"},{default:a(()=>{var e;return[n(s(((e=o.value)==null?void 0:e.mobile)??"-"),1)]}),_:1}),l(c,{label:"شعبه"},{default:a(()=>{var e,t;return[n(s(((t=(e=o.value)==null?void 0:e.branch)==null?void 0:t.name)??"-"),1)]}),_:1}),l(c,{label:"درصد کمیسیون"},{default:a(()=>{var e;return[n(s(((e=o.value)==null?void 0:e.percent)??"-"),1)]}),_:1}),l(c,{label:"وضعیت"},{default:a(()=>{var e;return[l(u,{color:((e=o.value)==null?void 0:e.active)===1?"green":"red"},{default:a(()=>{var t;return[n(s(((t=o.value)==null?void 0:t.active)===1?"فعال":"غیر فعال"),1)]}),_:1},8,["color"])]}),_:1}),l(c,{label:"میزان فروش (گرم)"},{default:a(()=>{var e;return[n(s(((e=o.value)==null?void 0:e.grams_sell)??0),1)]}),_:1})]),_:1}),E("div",R,[l(u,{color:"blue"},{default:a(()=>{var e,t;return[n("مشتریان معرفی‌شده: "+s(((t=(e=o.value)==null?void 0:e.referred_customers)==null?void 0:t.length)??0),1)]}),_:1}),l(u,{color:"green"},{default:a(()=>{var e,t;return[n("سفارش‌های ثبت‌شده: "+s(((t=(e=o.value)==null?void 0:e.orders)==null?void 0:t.length)??0),1)]}),_:1})])]),_:1}),l(N,{class:"mt-4 detail-tabs","default-active-key":"referred"},{default:a(()=>[l(x,{key:"referred",tab:"مشتریان معرفی‌شده"},{default:a(()=>{var e;return[l(v,{size:"small","data-source":(e=o.value)==null?void 0:e.referred_customers,columns:C,pagination:{pageSize:10},"row-key":"id"},{bodyCell:a(({column:t,record:r})=>{var g;return[t.dataIndex==="active"?(i(),b(u,{key:0,color:r.active===1?"green":"red"},{default:a(()=>[n(s(r.active===1?"فعال":"غیر فعال"),1)]),_:2},1032,["color"])):t.dataIndex==="city"?(i(),p(f,{key:1},[n(s(((g=r.city)==null?void 0:g.title)??"-"),1)],64)):t.dataIndex==="caj"?(i(),p(f,{key:2},[n(s(I(h)(r.caj)),1)],64)):k("",!0)]}),_:1},8,["data-source"])]}),_:1}),l(x,{key:"orders",tab:"سفارش‌های مشتریان"},{default:a(()=>{var e;return[l(v,{size:"small","data-source":(e=o.value)==null?void 0:e.orders,columns:w,pagination:{pageSize:10},"row-key":"id"},{bodyCell:a(({column:t,record:r})=>[t.dataIndex==="caj"?(i(),p(f,{key:0},[n(s(I(h)(r.caj)),1)],64)):k("",!0)]),_:1},8,["data-source"])]}),_:1})]),_:1})]),_:1},8,["spinning"])}}}),L=M(T,[["__scopeId","data-v-eef9d79c"]]);export{L as default}; import{d as D,x as S,y as A,a as b,w as a,k as F,m as y,r as d,o as i,c as l,f as n,t as s,p as E,b as p,F as f,h as I,i as k,_ as M}from"./index-BpoVO8sC.js";import{j as h}from"./filters-OZN7JLpr.js";import"./index-B_k8FJMA.js";const R={class:"stats mt-4"},T=D({__name:"AgentDetail",setup($){const j=F().params.id,m=y(!1),o=y(void 0),C=[{title:"نام",dataIndex:"name"},{title:"موبایل",dataIndex:"mobile"},{title:"شهر",dataIndex:"city"},{title:"نوع",dataIndex:"type_str"},{title:"وضعیت",dataIndex:"active"},{title:"تاریخ ثبت",dataIndex:"caj"}],w=[{title:"شماره سفارش",dataIndex:"name"},{title:"مشتری",dataIndex:"customer"},{title:"وزن",dataIndex:"w"},{title:"وضعیت",dataIndex:"status"},{title:"تاریخ",dataIndex:"caj"}];return S(async()=>{try{m.value=!0;const{data:_}=await A.get(`admin/customers-omde/reagent/${j}`);o.value=_}catch(_){console.log(_)}finally{m.value=!1}}),(_,G)=>{const c=d("a-descriptions-item"),u=d("a-tag"),z=d("a-descriptions"),B=d("a-card"),v=d("a-table"),x=d("a-tab-pane"),N=d("a-tabs"),V=d("a-spin");return i(),b(V,{spinning:m.value},{default:a(()=>[l(B,{title:"مشاهده اطلاعات کارشناس فروش",class:"page-card"},{default:a(()=>[l(z,{bordered:"",size:"small",column:{xxl:3,xl:3,lg:3,md:2,sm:2,xs:1}},{default:a(()=>[l(c,{label:"نام"},{default:a(()=>{var e;return[n(s(((e=o.value)==null?void 0:e.name)??"-"),1)]}),_:1}),l(c,{label:"موبایل"},{default:a(()=>{var e;return[n(s(((e=o.value)==null?void 0:e.mobile)??"-"),1)]}),_:1}),l(c,{label:"شعبه"},{default:a(()=>{var e,t;return[n(s(((t=(e=o.value)==null?void 0:e.branch)==null?void 0:t.name)??"-"),1)]}),_:1}),l(c,{label:"درصد کمیسیون"},{default:a(()=>{var e;return[n(s(((e=o.value)==null?void 0:e.percent)??"-"),1)]}),_:1}),l(c,{label:"وضعیت"},{default:a(()=>{var e;return[l(u,{color:((e=o.value)==null?void 0:e.active)===1?"green":"red"},{default:a(()=>{var t;return[n(s(((t=o.value)==null?void 0:t.active)===1?"فعال":"غیر فعال"),1)]}),_:1},8,["color"])]}),_:1}),l(c,{label:"میزان فروش (گرم)"},{default:a(()=>{var e;return[n(s(((e=o.value)==null?void 0:e.grams_sell)??0),1)]}),_:1})]),_:1}),E("div",R,[l(u,{color:"blue"},{default:a(()=>{var e,t;return[n("مشتریان معرفی‌شده: "+s(((t=(e=o.value)==null?void 0:e.referred_customers)==null?void 0:t.length)??0),1)]}),_:1}),l(u,{color:"green"},{default:a(()=>{var e,t;return[n("سفارش‌های ثبت‌شده: "+s(((t=(e=o.value)==null?void 0:e.orders)==null?void 0:t.length)??0),1)]}),_:1})])]),_:1}),l(N,{class:"mt-4 detail-tabs","default-active-key":"referred"},{default:a(()=>[l(x,{key:"referred",tab:"مشتریان معرفی‌شده"},{default:a(()=>{var e;return[l(v,{size:"small","data-source":(e=o.value)==null?void 0:e.referred_customers,columns:C,pagination:{pageSize:10},"row-key":"id"},{bodyCell:a(({column:t,record:r})=>{var g;return[t.dataIndex==="active"?(i(),b(u,{key:0,color:r.active===1?"green":"red"},{default:a(()=>[n(s(r.active===1?"فعال":"غیر فعال"),1)]),_:2},1032,["color"])):t.dataIndex==="city"?(i(),p(f,{key:1},[n(s(((g=r.city)==null?void 0:g.title)??"-"),1)],64)):t.dataIndex==="caj"?(i(),p(f,{key:2},[n(s(I(h)(r.caj)),1)],64)):k("",!0)]}),_:1},8,["data-source"])]}),_:1}),l(x,{key:"orders",tab:"سفارش‌های مشتریان"},{default:a(()=>{var e;return[l(v,{size:"small","data-source":(e=o.value)==null?void 0:e.orders,columns:w,pagination:{pageSize:10},"row-key":"id"},{bodyCell:a(({column:t,record:r})=>[t.dataIndex==="caj"?(i(),p(f,{key:0},[n(s(I(h)(r.caj)),1)],64)):k("",!0)]),_:1},8,["data-source"])]}),_:1})]),_:1})]),_:1},8,["spinning"])}}}),L=M(T,[["__scopeId","data-v-eef9d79c"]]);export{L as default};
@@ -1 +1 @@
import{c as i,I as u}from"./index-CfFqH7Y1.js";var l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"};function a(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(c){return Object.getOwnPropertyDescriptor(e,c).enumerable}))),n.forEach(function(c){p(r,c,e[c])})}return r}function p(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var o=function(t,e){var n=a({},t,e.attrs);return i(u,a({},n,{icon:l}),null)};o.displayName="AppstoreOutlined";o.inheritAttrs=!1;export{o as A}; import{c as i,I as u}from"./index-BpoVO8sC.js";var l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"};function a(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(c){return Object.getOwnPropertyDescriptor(e,c).enumerable}))),n.forEach(function(c){p(r,c,e[c])})}return r}function p(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var o=function(t,e){var n=a({},t,e.attrs);return i(u,a({},n,{icon:l}),null)};o.displayName="AppstoreOutlined";o.inheritAttrs=!1;export{o as A};
+1
View File
@@ -0,0 +1 @@
import{b as m,O as i,a as e}from"./OmdeCustomerList-Dpuu7pb9.js";import{d as p,a,h as t,o as s}from"./index-BpoVO8sC.js";import"./index-B_k8FJMA.js";import"./model-CTGHGliB.js";import"./filters-OZN7JLpr.js";import"./SettingOutlined-adv0dYGx.js";import"./ListPageHeader.vue_vue_type_script_setup_true_lang-BQSUUyv5.js";import"./AccountingSyncButton.vue_vue_type_script_setup_true_lang-kn1AdRB0.js";import"./bulkCustomer.vue_vue_type_script_setup_true_lang-Ouikyiku.js";import"./select--BgT6D7O.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-AKFpsSMX.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-DFb5CG1L.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-hgtQuMnj.js";import"./DateInput-DmRoQ6ii.js";import"./UserOutlined-LZP399mF.js";import"./ShopOutlined-DVjFkugI.js";import"./EnvironmentOutlined-Ct4S5Z03.js";import"./PercentageOutlined-ma5C50gj.js";import"./SafetyCertificateOutlined-Cz-icoeY.js";import"./UnorderedListOutlined-2L8Ker7x.js";const q=p({__name:"BankerList",setup(n){const o=i.banker.title,r=m("banker");return(l,c)=>(s(),a(e,{title:t(o),model:t(r)},null,8,["title","model"]))}});export{q as default};
-1
View File
@@ -1 +0,0 @@
import{b as m,O as i,a as e}from"./OmdeCustomerList-DhlVlCDe.js";import{d as p,a,h as t,o as s}from"./index-CfFqH7Y1.js";import"./index-C7lpysFQ.js";import"./model-jivQdHnP.js";import"./filters-DWtPewx7.js";import"./SettingOutlined-BsS6G0WY.js";import"./ListPageHeader.vue_vue_type_script_setup_true_lang-CbA7uKX0.js";import"./AccountingSyncButton.vue_vue_type_script_setup_true_lang-DJiq02DZ.js";import"./bulkCustomer.vue_vue_type_script_setup_true_lang-kvkFAhMn.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-c3IiekqO.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-Bef1m3ur.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-BpLncgqo.js";import"./DateInput-CIVPRY3v.js";import"./UserOutlined-CYxHdL50.js";import"./ShopOutlined-B8DDAqCd.js";import"./EnvironmentOutlined-CPphX-yj.js";import"./PercentageOutlined-Bd1Dkr7s.js";import"./SafetyCertificateOutlined-BZ63h8A6.js";import"./UnorderedListOutlined-BL3ZK7KP.js";const j=p({__name:"BankerList",setup(n){const o=i.banker.title,r=m("banker");return(l,c)=>(s(),a(e,{title:t(o),model:t(r)},null,8,["title","model"]))}});export{j as default};
@@ -1 +1 @@
import{d as r,a as g,w as a,r as o,o as k,c as i,a7 as w}from"./index-CfFqH7Y1.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,l)=>{const f=o("a-form"),u=o("a-spin"),p=o("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,"wrap-class-name":"base-form-modal","onUpdate:open":m,onOk:l[0]||(l[0]=x=>t.$emit("submit")),onCancel:c},{default:a(()=>[i(u,{spinning:e.loading},{default:a(()=>[i(f,{layout:"vertical"},{default:a(()=>[w(t.$slots,"default")]),_:3})]),_:3},8,["spinning"])]),_:3},8,["open","title","width","confirm-loading","ok-text"])}}});export{b as _}; import{d as r,a as g,w as a,r as o,o as k,c as i,a8 as w}from"./index-BpoVO8sC.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,l)=>{const f=o("a-form"),u=o("a-spin"),p=o("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,"wrap-class-name":"base-form-modal","onUpdate:open":m,onOk:l[0]||(l[0]=x=>t.$emit("submit")),onCancel:c},{default:a(()=>[i(u,{spinning:e.loading},{default:a(()=>[i(f,{layout:"vertical"},{default:a(()=>[w(t.$slots,"default")]),_:3})]),_:3},8,["spinning"])]),_:3},8,["open","title","width","confirm-loading","ok-text"])}}});export{b as _};
@@ -1 +1 @@
import{c as i,I as u}from"./index-CfFqH7Y1.js";var o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 248H728l-32.4-90.8a32.07 32.07 0 00-30.2-21.2H358.6c-13.5 0-25.6 8.5-30.1 21.2L296 248H160c-44.2 0-80 35.8-80 80v456c0 44.2 35.8 80 80 80h704c44.2 0 80-35.8 80-80V328c0-44.2-35.8-80-80-80zm8 536c0 4.4-3.6 8-8 8H160c-4.4 0-8-3.6-8-8V328c0-4.4 3.6-8 8-8h186.7l17.1-47.8 22.9-64.2h250.5l22.9 64.2 17.1 47.8H864c4.4 0 8 3.6 8 8v456zM512 384c-88.4 0-160 71.6-160 160s71.6 160 160 160 160-71.6 160-160-71.6-160-160-160zm0 256c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96z"}}]},name:"camera",theme:"outlined"};function c(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},a=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(t).filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),a.forEach(function(n){f(r,n,t[n])})}return r}function f(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var l=function(e,t){var a=c({},e,t.attrs);return i(u,c({},a,{icon:o}),null)};l.displayName="CameraOutlined";l.inheritAttrs=!1;export{l as C}; import{c as i,I as u}from"./index-BpoVO8sC.js";var o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 248H728l-32.4-90.8a32.07 32.07 0 00-30.2-21.2H358.6c-13.5 0-25.6 8.5-30.1 21.2L296 248H160c-44.2 0-80 35.8-80 80v456c0 44.2 35.8 80 80 80h704c44.2 0 80-35.8 80-80V328c0-44.2-35.8-80-80-80zm8 536c0 4.4-3.6 8-8 8H160c-4.4 0-8-3.6-8-8V328c0-4.4 3.6-8 8-8h186.7l17.1-47.8 22.9-64.2h250.5l22.9 64.2 17.1 47.8H864c4.4 0 8 3.6 8 8v456zM512 384c-88.4 0-160 71.6-160 160s71.6 160 160 160 160-71.6 160-160-71.6-160-160-160zm0 256c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96z"}}]},name:"camera",theme:"outlined"};function c(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},a=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(t).filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),a.forEach(function(n){f(r,n,t[n])})}return r}function f(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var l=function(e,t){var a=c({},e,t.attrs);return i(u,c({},a,{icon:o}),null)};l.displayName="CameraOutlined";l.inheritAttrs=!1;export{l as C};
@@ -1 +0,0 @@
import{d as P,x as S,y as u,b as v,c as n,w as l,m as _,r as s,z as T,o as d,p as $,F as w,e as C,f as g,G as z,M as k,a as x,t as B}from"./index-CfFqH7Y1.js";const D={id:"page-user-list"},E={class:"grid-3"},q=P({__name:"ChangePercent",setup(G){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,c;return String(((c=(r=e==null?void 0:e.children)==null?void 0:r[0])==null?void 0:c.children)??"").toLowerCase().indexOf(t.toLowerCase())>=0}async function m(){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)}m()}),(t,e)=>{const r=s("a-select-option"),c=s("a-select"),i=s("a-form-item"),M=s("a-input"),N=s("a-input-number"),U=s("a-button"),V=s("a-popconfirm"),F=s("a-form"),O=s("a-card");return d(),v("div",D,[n(O,{title:"تغییر درصد محصولات",class:"page-card"},{default:l(()=>[n(F,{layout:"vertical"},{default:l(()=>[$("div",E,[n(i,{label:"دسته بندی"},{default:l(()=>[n(c,{value:a.category_id,"onUpdate:value":e[0]||(e[0]=o=>a.category_id=o),"allow-clear":"","show-search":"",placeholder:"انتخاب کنید","filter-option":h,onChange:m},{default:l(()=>[(d(!0),v(w,null,C(b.value,o=>(d(),x(r,{key:o.id,value:o.id},{default:l(()=>[g(B(o.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),n(i,{label:"برند"},{default:l(()=>[n(c,{value:a.brand_id,"onUpdate:value":e[1]||(e[1]=o=>a.brand_id=o),"allow-clear":"","show-search":"",placeholder:"انتخاب کنید","filter-option":h,onChange:m},{default:l(()=>[(d(!0),v(w,null,C(y.value,o=>(d(),x(r,{key:o.id,value:o.id},{default:l(()=>[g(B(o.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),n(i,{label:"تعداد یافت شده"},{default:l(()=>[n(M,{value:p.value,disabled:""},null,8,["value"])]),_:1}),n(i,{label:"اجرت درصدی"},{default:l(()=>[n(N,{value:a.percent,"onUpdate:value":e[2]||(e[2]=o=>a.percent=o),class:"w-full",step:.1},null,8,["value"])]),_:1})]),n(V,{title:"آیا از اعمال تغییرات مطمئن هستید؟","ok-text":"بله","cancel-text":"خیر",onConfirm:L},{default:l(()=>[n(U,{type:"primary",class:"form-submit",loading:f.value},{default:l(()=>[...e[3]||(e[3]=[g("اعمال تغییرات",-1)])]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1})])}}});export{q as default};
@@ -0,0 +1 @@
import{o as O}from"./select--BgT6D7O.js";import{d as P,x as $,y as d,b as m,c as n,w as l,m as u,r,z,o as c,p as D,F as h,e as C,f as v,J as E,N as k,a as x,t as B}from"./index-BpoVO8sC.js";const J={id:"page-user-list"},S={class:"grid-3"},G=P({__name:"ChangePercent",setup(j){const g=u([]),y=u([]),p=u("-"),_=u(!1),t=z({category_id:void 0,brand_id:void 0,percent:void 0});function b(e,a){return O(a).toLowerCase().indexOf(e.toLowerCase())>=0}async function f(){try{const{data:e}=await d.post("change/percent/count",{category_id:t.category_id,brand_id:t.brand_id});p.value=e.count}catch(e){console.log("e ==> ",e)}}async function L(){if(t.percent===void 0||t.percent===null){E.error("لطفا اجرت درصدی را وارد کنید");return}try{_.value=!0;const{data:e}=await d.post("change/all",{percent:t.percent,category_id:t.category_id,brand_id:t.brand_id});k.success({title:"تغییرات با موفقیت اعمال شد",okText:"بستن"}),p.value=e.updated}catch(e){k.success({title:"خطا در اعمال تغییرات"}),console.log(e)}finally{_.value=!1}}return $(async()=>{try{const[e,a]=await Promise.all([d.get("brand"),d.post("category")]);g.value=e.data,y.value=(a.data.rows??a.data).map(s=>({id:s.id,title:s.type_str?`${s.title} (${s.type_str}) `:s.title}))}catch(e){console.log(e)}f()}),(e,a)=>{const s=r("a-select-option"),w=r("a-select"),i=r("a-form-item"),N=r("a-input"),T=r("a-input-number"),U=r("a-button"),V=r("a-popconfirm"),F=r("a-form"),M=r("a-card");return c(),m("div",J,[n(M,{title:"تغییر درصد محصولات",class:"page-card"},{default:l(()=>[n(F,{layout:"vertical"},{default:l(()=>[D("div",S,[n(i,{label:"دسته بندی"},{default:l(()=>[n(w,{value:t.category_id,"onUpdate:value":a[0]||(a[0]=o=>t.category_id=o),"allow-clear":"","show-search":"",placeholder:"انتخاب کنید","filter-option":b,onChange:f},{default:l(()=>[(c(!0),m(h,null,C(y.value,o=>(c(),x(s,{key:o.id,value:o.id},{default:l(()=>[v(B(o.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),n(i,{label:"برند"},{default:l(()=>[n(w,{value:t.brand_id,"onUpdate:value":a[1]||(a[1]=o=>t.brand_id=o),"allow-clear":"","show-search":"",placeholder:"انتخاب کنید","filter-option":b,onChange:f},{default:l(()=>[(c(!0),m(h,null,C(g.value,o=>(c(),x(s,{key:o.id,value:o.id},{default:l(()=>[v(B(o.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),n(i,{label:"تعداد یافت شده"},{default:l(()=>[n(N,{value:p.value,disabled:""},null,8,["value"])]),_:1}),n(i,{label:"اجرت درصدی"},{default:l(()=>[n(T,{value:t.percent,"onUpdate:value":a[2]||(a[2]=o=>t.percent=o),class:"w-full",step:.1},null,8,["value"])]),_:1})]),n(V,{title:"آیا از اعمال تغییرات مطمئن هستید؟","ok-text":"بله","cancel-text":"خیر",onConfirm:L},{default:l(()=>[n(U,{type:"primary",class:"form-submit",loading:_.value},{default:l(()=>[...a[3]||(a[3]=[v("اعمال تغییرات",-1)])]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1})])}}});export{G as default};
@@ -1 +0,0 @@
import{d as m,o as v,a as g,s as w,r as k}from"./index-CfFqH7Y1.js";const _=m({__name:"CityTreeSelect",props:{value:{},cities:{},parentPicker:{type:Boolean},excludeId:{},placeholder:{}},emits:["update:value","change"],setup(i,{emit:u}){const n=i,d=u,h=w(()=>{const l=new Set(n.cities.map(e=>e.id)),o=new Map;for(const e of n.cities){const a=e.parent&&l.has(e.parent)&&e.parent!==e.id?e.parent:null;o.has(a)||o.set(a,[]),o.get(a).push(e)}const r=new Set,p=(e,a)=>(o.get(e)??[]).filter(t=>!r.has(t.id)&&!(n.parentPicker&&t.id===n.excludeId)).map(t=>{r.add(t.id);const s=p(t.id,a+1),c={value:t.id,key:t.id,title:t.title};return s.length&&(c.children=s),!n.parentPicker&&a===0&&s.length&&(c.disabled=!0),c});return p(null,0)});function f(l){d("update:value",l??void 0),d("change",l??void 0)}return(l,o)=>{const r=k("a-tree-select");return v(),g(r,{value:i.value??void 0,"tree-data":h.value,"show-search":"","allow-clear":"","tree-default-expand-all":"","tree-node-filter-prop":"title","dropdown-style":{maxHeight:"400px",overflow:"auto"},placeholder:i.placeholder??"شهر را انتخاب کنید",class:"w-full","onUpdate:value":f},null,8,["value","tree-data","placeholder"])}}});export{_};
@@ -0,0 +1 @@
import{d as m,o as k,a as w,s as u,r as _}from"./index-BpoVO8sC.js";const p=" › ",g=m({__name:"CityTreeSelect",props:{value:{},cities:{},parentPicker:{type:Boolean},excludeId:{},placeholder:{}},emits:["update:value","change"],setup(o,{emit:h}){const c=o,r=h,d=u(()=>{const e=new Set(c.cities.map(n=>n.id)),l=new Map;for(const n of c.cities){const t=n.parent&&e.has(n.parent)&&n.parent!==n.id?n.parent:null;l.has(t)||l.set(t,[]),l.get(t).push(n)}const a=new Set,i=n=>(l.get(n)??[]).filter(t=>!a.has(t.id)&&!(c.parentPicker&&t.id===c.excludeId)).map(t=>(a.add(t.id),{id:t.id,title:t.title,children:i(t.id)}));return i(null)});function s(e,l,a=""){return e.flatMap(i=>{const n=[...l,i.title],t=n.join(p);return[{value:i.id,label:t,search:a?`${a}${p}${t}`:t},...s(i.children,n,a)]})}const v=u(()=>c.parentPicker?s(d.value,[]):d.value.map(e=>e.children.length?{key:e.id,label:e.title,options:s(e.children,[],e.title)}:{value:e.id,label:e.title,search:e.title}));function f(e){r("update:value",e??void 0),r("change",e??void 0)}return(e,l)=>{const a=_("a-select");return k(),w(a,{value:o.value??void 0,options:v.value,"show-search":"","allow-clear":"","option-filter-prop":"search",placeholder:o.placeholder??"شهر را انتخاب کنید",class:"w-full","onUpdate:value":f},null,8,["value","options","placeholder"])}}});export{g as _};
-1
View File
@@ -1 +0,0 @@
.mr-3[data-v-26513e49]{margin-left:.75rem}.comments-list ul[data-v-26513e49]{list-style:none;padding-right:0}.comment-item[data-v-26513e49]{display:flex;gap:1rem;flex-wrap:wrap;margin-bottom:1rem}.comment-item .img[data-v-26513e49]{width:65px;height:65px;display:flex;align-items:center;justify-content:center}.comment-body[data-v-26513e49]{flex:1;min-width:240px}.comment-body .time[data-v-26513e49]{font-size:12px;color:#888}.border[data-v-26513e49]{border:1px solid grey;border-radius:50%}@media (max-width: 575px){.comment-item[data-v-26513e49]{gap:10px;flex-wrap:nowrap;margin-bottom:12px}.comment-item .img[data-v-26513e49]{width:40px;height:40px;flex-shrink:0}.comment-body[data-v-26513e49]{min-width:0}}
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
.mr-3[data-v-a75e1991]{margin-left:.75rem}.comments-list ul[data-v-a75e1991]{list-style:none;padding-right:0}.comment-item[data-v-a75e1991]{display:flex;gap:1rem;flex-wrap:wrap;margin-bottom:1rem}.comment-item .img[data-v-a75e1991]{width:65px;height:65px;display:flex;align-items:center;justify-content:center}.comment-body[data-v-a75e1991]{flex:1;min-width:240px}.comment-body .time[data-v-a75e1991]{font-size:12px;color:#888}.border[data-v-a75e1991]{border:1px solid grey;border-radius:50%}@media (max-width: 575px){.comment-item[data-v-a75e1991]{gap:10px;flex-wrap:nowrap;margin-bottom:12px}.comment-item .img[data-v-a75e1991]{width:40px;height:40px;flex-shrink:0}.comment-body[data-v-a75e1991]{min-width:0}}
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
.row[data-v-60098c92]{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}.tags[data-v-60098c92]{display:flex;gap:.5rem;flex-wrap:wrap}.slider-toolbar[data-v-60098c92]{display:flex;justify-content:space-between;align-items:center;gap:.5rem;flex-wrap:wrap;margin-bottom:1rem}.slider-count[data-v-60098c92]{color:#00000073}.slider-grid[data-v-60098c92]{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr));gap:16px}.slide-card[data-v-60098c92]{display:flex;flex-direction:column;gap:10px;min-width:0;padding:12px;border:1px solid #f0f0f0;border-radius:8px;background:#fff}.slide-card__head[data-v-60098c92]{display:flex;justify-content:space-between;align-items:center}.slide-card__title[data-v-60098c92]{font-weight:600}.slide-card__media[data-v-60098c92]{height:140px}.slide-card__media[data-v-60098c92] .image-upload,.slide-card__media[data-v-60098c92] .ant-upload-wrapper,.slide-card__media[data-v-60098c92] .ant-upload-list,.slide-card__media[data-v-60098c92] .ant-upload-list-item-container,.slide-card__media[data-v-60098c92] .ant-upload.ant-upload-select{width:100%!important;height:100%!important;margin:0!important}.slide-card__media[data-v-60098c92] .ant-upload-wrapper{display:block}.slide-card__media[data-v-60098c92] .ant-upload-list-item-thumbnail img{object-fit:cover}.mt-4[data-v-60098c92]{margin-top:1rem}@media (max-width: 575px){.row>.ant-input[data-v-60098c92]{flex:1 1 140px;max-width:none!important}.mt-4[data-v-60098c92]{margin-top:12px}}
+1
View File
@@ -0,0 +1 @@
.row[data-v-f2e1c33e]{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}.tags[data-v-f2e1c33e]{display:flex;gap:.5rem;flex-wrap:wrap}.slider-toolbar[data-v-f2e1c33e]{display:flex;justify-content:space-between;align-items:center;gap:.5rem;flex-wrap:wrap;margin-bottom:1rem}.slider-count[data-v-f2e1c33e]{color:#00000073}.slider-grid[data-v-f2e1c33e]{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr));gap:16px}.slide-card[data-v-f2e1c33e]{display:flex;flex-direction:column;gap:10px;min-width:0;padding:12px;border:1px solid #f0f0f0;border-radius:8px;background:#fff}.slide-card__head[data-v-f2e1c33e]{display:flex;justify-content:space-between;align-items:center}.slide-card__title[data-v-f2e1c33e]{font-weight:600}.slide-card__media[data-v-f2e1c33e]{height:140px}.slide-card__media[data-v-f2e1c33e] .image-upload,.slide-card__media[data-v-f2e1c33e] .ant-upload-wrapper,.slide-card__media[data-v-f2e1c33e] .ant-upload-list,.slide-card__media[data-v-f2e1c33e] .ant-upload-list-item-container,.slide-card__media[data-v-f2e1c33e] .ant-upload.ant-upload-select{width:100%!important;height:100%!important;margin:0!important}.slide-card__media[data-v-f2e1c33e] .ant-upload-wrapper{display:block}.slide-card__media[data-v-f2e1c33e] .ant-upload-list-item-thumbnail img{object-fit:cover}.mt-4[data-v-f2e1c33e]{margin-top:1rem}.custom-btn-form[data-v-f2e1c33e]{max-width:480px}@media (max-width: 575px){.row>.ant-input[data-v-f2e1c33e]{flex:1 1 140px;max-width:none!important}.mt-4[data-v-f2e1c33e]{margin-top:12px}}
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{c as u,I as l}from"./index-CfFqH7Y1.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}; import{c as u,I as l}from"./index-BpoVO8sC.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};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{m}from"./index-C7lpysFQ.js";import{d as _,n as V,o as r,a as Y,w as h,c as D,b,t as j,i as M,m as i,s as x,r as d,_ as y}from"./index-CfFqH7Y1.js";const k={key:0,class:"hint"},C=_({__name:"DateInput",props:{label:{},modelValue:{},placeholder:{default:"مثال: ۱۴۰۳/۰۵/۱۲"}},emits:["update:modelValue"],setup(o,{emit:p}){const n=o,c=p,t=i(void 0),a=i(""),v=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 f(e){if(t.value=e,!e){a.value="",c("update:modelValue",void 0);return}const u=e.replace(/[۰-۹]/g,s=>String("۰۱۲۳۴۵۶۷۸۹".indexOf(s))),l=m(u,"jYYYY/jMM/jDD");l.isValid()?(a.value="",c("update:modelValue",l.format("YYYY-MM-DD"))):a.value="تاریخ معتبر نیست"}return(e,u)=>{const l=d("a-input"),s=d("a-form-item");return r(),Y(s,{label:o.label},{default:h(()=>[D(l,{value:v.value,placeholder:o.placeholder,"allow-clear":"","onUpdate:value":f},null,8,["value","placeholder"]),a.value?(r(),b("small",k,j(a.value),1)):M("",!0)]),_:1},8,["label"])}}}),I=y(C,[["__scopeId","data-v-3863c3bc"]]);export{I as D}; import{m}from"./index-B_k8FJMA.js";import{d as _,n as V,o as r,a as Y,w as h,c as D,b,t as j,i as M,m as i,s as x,r as d,_ as y}from"./index-BpoVO8sC.js";const k={key:0,class:"hint"},C=_({__name:"DateInput",props:{label:{},modelValue:{},placeholder:{default:"مثال: ۱۴۰۳/۰۵/۱۲"}},emits:["update:modelValue"],setup(o,{emit:p}){const n=o,c=p,t=i(void 0),a=i(""),v=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 f(e){if(t.value=e,!e){a.value="",c("update:modelValue",void 0);return}const u=e.replace(/[۰-۹]/g,s=>String("۰۱۲۳۴۵۶۷۸۹".indexOf(s))),l=m(u,"jYYYY/jMM/jDD");l.isValid()?(a.value="",c("update:modelValue",l.format("YYYY-MM-DD"))):a.value="تاریخ معتبر نیست"}return(e,u)=>{const l=d("a-input"),s=d("a-form-item");return r(),Y(s,{label:o.label},{default:h(()=>[D(l,{value:v.value,placeholder:o.placeholder,"allow-clear":"","onUpdate:value":f},null,8,["value","placeholder"]),a.value?(r(),b("small",k,j(a.value),1)):M("",!0)]),_:1},8,["label"])}}}),I=y(C,[["__scopeId","data-v-3863c3bc"]]);export{I as D};
+1
View File
@@ -0,0 +1 @@
import{_ as o}from"./Add.vue_vue_type_script_setup_true_lang-BcAS3HVh.js";import{d as t,a as r,o as e}from"./index-BpoVO8sC.js";import"./select--BgT6D7O.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-AKFpsSMX.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-DFb5CG1L.js";const f=t({__name:"Edit",setup(a){return(m,p)=>(e(),r(o))}});export{f as default};
-1
View File
@@ -1 +0,0 @@
import{_ as o}from"./Add.vue_vue_type_script_setup_true_lang-DQg8ipd6.js";import{d as t,a as e,o as r}from"./index-CfFqH7Y1.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-c3IiekqO.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-Bef1m3ur.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 o}from"./AddBranches.vue_vue_type_script_setup_true_lang-E7Zk4Fh3.js";import{d as e,a as r,o as t}from"./index-BpoVO8sC.js";import"./select--BgT6D7O.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-AKFpsSMX.js";const i=e({__name:"EditBranches",setup(a){return(n,s)=>(t(),r(o))}});export{i as default};
-1
View File
@@ -1 +0,0 @@
import{_ as e}from"./AddBranches.vue_vue_type_script_setup_true_lang-C2O0z_CA.js";import{d as o,a,o as r}from"./index-CfFqH7Y1.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-c3IiekqO.js";const p=o({__name:"EditBranches",setup(t){return(n,s)=>(r(),a(e))}});export{p as default};
@@ -1 +0,0 @@
import{_ as o}from"./bulkCustomer.vue_vue_type_script_setup_true_lang-kvkFAhMn.js";import{d as r,a as t,o as m}from"./index-CfFqH7Y1.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-c3IiekqO.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-Bef1m3ur.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-BpLncgqo.js";import"./DateInput-CIVPRY3v.js";import"./index-C7lpysFQ.js";import"./UserOutlined-CYxHdL50.js";import"./ShopOutlined-B8DDAqCd.js";import"./EnvironmentOutlined-CPphX-yj.js";import"./PercentageOutlined-Bd1Dkr7s.js";import"./SafetyCertificateOutlined-BZ63h8A6.js";const C=r({__name:"EditBulkCustomer",setup(p){return(i,a)=>(m(),t(o,{class:"page-card"}))}});export{C as default};
@@ -0,0 +1 @@
import{_ as o}from"./bulkCustomer.vue_vue_type_script_setup_true_lang-Ouikyiku.js";import{d as r,a as t,o as m}from"./index-BpoVO8sC.js";import"./select--BgT6D7O.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-AKFpsSMX.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-DFb5CG1L.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-hgtQuMnj.js";import"./DateInput-DmRoQ6ii.js";import"./index-B_k8FJMA.js";import"./UserOutlined-LZP399mF.js";import"./ShopOutlined-DVjFkugI.js";import"./EnvironmentOutlined-Ct4S5Z03.js";import"./PercentageOutlined-ma5C50gj.js";import"./SafetyCertificateOutlined-Cz-icoeY.js";const g=r({__name:"EditBulkCustomer",setup(p){return(i,a)=>(m(),t(o,{class:"page-card"}))}});export{g as default};
-1
View File
@@ -1 +0,0 @@
import o from"./AddInvoice-BjP8NU-f.js";import{d as t,a as r,o as e}from"./index-CfFqH7Y1.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-c3IiekqO.js";import"./model-jivQdHnP.js";import"./filters-DWtPewx7.js";import"./index-C7lpysFQ.js";import"./SettingOutlined-BsS6G0WY.js";const u=t({__name:"EditInvoice",setup(p){return(i,m)=>(e(),r(o))}});export{u as default};
+1
View File
@@ -0,0 +1 @@
import o from"./AddInvoice-Ds7WXE_u.js";import{d as t,a as r,o as e}from"./index-BpoVO8sC.js";import"./select--BgT6D7O.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-AKFpsSMX.js";import"./model-CTGHGliB.js";import"./filters-OZN7JLpr.js";import"./index-B_k8FJMA.js";import"./SettingOutlined-adv0dYGx.js";const l=t({__name:"EditInvoice",setup(p){return(i,m)=>(e(),r(o))}});export{l as default};
-1
View File
@@ -1 +0,0 @@
import e from"./AddProduct-ujcNlyqt.js";import{d as o,b as t,c as r,o as c}from"./index-CfFqH7Y1.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-Bef1m3ur.js";import"./AppstoreOutlined-uUzvwsI9.js";const _=o({__name:"EditProduct",setup(a){return(n,d)=>(c(),t("div",null,[r(e)]))}});export{_ as default};
+1
View File
@@ -0,0 +1 @@
import e from"./AddProduct-DeIOhHwB.js";import{d as o,b as t,c as r,o as c}from"./index-BpoVO8sC.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-DFb5CG1L.js";import"./AppstoreOutlined-DpD8Fmqj.js";const _=o({__name:"EditProduct",setup(a){return(n,d)=>(c(),t("div",null,[r(e)]))}});export{_ as default};
-1
View File
@@ -1 +0,0 @@
import{R as t}from"./ReagentCustomer-BhGDNkn2.js";import{d as o,a as r,o as e}from"./index-CfFqH7Y1.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-BpLncgqo.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-Bef1m3ur.js";import"./UserOutlined-CYxHdL50.js";import"./ShopOutlined-B8DDAqCd.js";import"./EnvironmentOutlined-CPphX-yj.js";import"./CameraOutlined-xjgD1EU0.js";import"./PercentageOutlined-Bd1Dkr7s.js";const g=o({__name:"EditReagent",setup(a){return(p,m)=>(e(),r(t,{class:"page-card"}))}});export{g as default};
+1
View File
@@ -0,0 +1 @@
import{R as t}from"./ReagentCustomer-BF1FMq1p.js";import{d as o,a as r,o as e}from"./index-BpoVO8sC.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-hgtQuMnj.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-DFb5CG1L.js";import"./UserOutlined-LZP399mF.js";import"./ShopOutlined-DVjFkugI.js";import"./EnvironmentOutlined-Ct4S5Z03.js";import"./CameraOutlined-CV3xdZPp.js";import"./PercentageOutlined-ma5C50gj.js";const g=o({__name:"EditReagent",setup(a){return(p,m)=>(e(),r(t,{class:"page-card"}))}});export{g as default};
@@ -0,0 +1 @@
import{S as o}from"./singleCustomer-D_ZNJxNr.js";import{d as r,a as e,o as t}from"./index-BpoVO8sC.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-hgtQuMnj.js";import"./DateInput-DmRoQ6ii.js";import"./index-B_k8FJMA.js";import"./UserOutlined-LZP399mF.js";const u=r({__name:"EditSingleCustomer",setup(a){return(m,p)=>(t(),e(o,{class:"page-card"}))}});export{u as default};
@@ -1 +0,0 @@
import{S as o}from"./singleCustomer-CGlWd29n.js";import{d as r,a as e,o as t}from"./index-CfFqH7Y1.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-BpLncgqo.js";import"./DateInput-CIVPRY3v.js";import"./index-C7lpysFQ.js";import"./UserOutlined-CYxHdL50.js";const u=r({__name:"EditSingleCustomer",setup(a){return(m,p)=>(t(),e(o,{class:"page-card"}))}});export{u as default};
-1
View File
@@ -1 +0,0 @@
import{_ as o}from"./AddWorkshop.vue_vue_type_script_setup_true_lang-DOx1Q7F_.js";import{d as e,a as r,o as t}from"./index-CfFqH7Y1.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-c3IiekqO.js";const m=e({__name:"EditWorkshop",setup(a){return(s,_)=>(t(),r(o))}});export{m as default};
+1
View File
@@ -0,0 +1 @@
import{_ as o}from"./AddWorkshop.vue_vue_type_script_setup_true_lang-TRBP_542.js";import{d as e,a as r,o as t}from"./index-BpoVO8sC.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-AKFpsSMX.js";const m=e({__name:"EditWorkshop",setup(a){return(s,_)=>(t(),r(o))}});export{m as default};
@@ -1 +1 @@
import{c as o,I as u}from"./index-CfFqH7Y1.js";var l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 289.1a362.49 362.49 0 00-79.9-115.7 370.83 370.83 0 00-118.2-77.8C610.7 76.6 562.1 67 512 67c-50.1 0-98.7 9.6-144.5 28.5-44.3 18.3-84 44.5-118.2 77.8A363.6 363.6 0 00169.4 289c-19.5 45-29.4 92.8-29.4 142 0 70.6 16.9 140.9 50.1 208.7 26.7 54.5 64 107.6 111 158.1 80.3 86.2 164.5 138.9 188.4 153a43.9 43.9 0 0022.4 6.1c7.8 0 15.5-2 22.4-6.1 23.9-14.1 108.1-66.8 188.4-153 47-50.4 84.3-103.6 111-158.1C867.1 572 884 501.8 884 431.1c0-49.2-9.9-97-29.4-142zM512 880.2c-65.9-41.9-300-207.8-300-449.1 0-77.9 31.1-151.1 87.6-206.3C356.3 169.5 431.7 139 512 139s155.7 30.5 212.4 85.9C780.9 280 812 353.2 812 431.1c0 241.3-234.1 407.2-300 449.1zm0-617.2c-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 551c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 439c0-29.9 11.7-58 32.8-79.2C454 338.6 482.1 327 512 327c29.9 0 58 11.6 79.2 32.8C612.4 381 624 409.1 624 439c0 29.9-11.6 58-32.8 79.2z"}}]},name:"environment",theme:"outlined"};function c(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),r.forEach(function(a){f(n,a,t[a])})}return n}function f(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var i=function(e,t){var r=c({},e,t.attrs);return o(u,c({},r,{icon:l}),null)};i.displayName="EnvironmentOutlined";i.inheritAttrs=!1;export{i as E}; import{c as o,I as u}from"./index-BpoVO8sC.js";var l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 289.1a362.49 362.49 0 00-79.9-115.7 370.83 370.83 0 00-118.2-77.8C610.7 76.6 562.1 67 512 67c-50.1 0-98.7 9.6-144.5 28.5-44.3 18.3-84 44.5-118.2 77.8A363.6 363.6 0 00169.4 289c-19.5 45-29.4 92.8-29.4 142 0 70.6 16.9 140.9 50.1 208.7 26.7 54.5 64 107.6 111 158.1 80.3 86.2 164.5 138.9 188.4 153a43.9 43.9 0 0022.4 6.1c7.8 0 15.5-2 22.4-6.1 23.9-14.1 108.1-66.8 188.4-153 47-50.4 84.3-103.6 111-158.1C867.1 572 884 501.8 884 431.1c0-49.2-9.9-97-29.4-142zM512 880.2c-65.9-41.9-300-207.8-300-449.1 0-77.9 31.1-151.1 87.6-206.3C356.3 169.5 431.7 139 512 139s155.7 30.5 212.4 85.9C780.9 280 812 353.2 812 431.1c0 241.3-234.1 407.2-300 449.1zm0-617.2c-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 551c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 439c0-29.9 11.7-58 32.8-79.2C454 338.6 482.1 327 512 327c29.9 0 58 11.6 79.2 32.8C612.4 381 624 409.1 624 439c0 29.9-11.6 58-32.8 79.2z"}}]},name:"environment",theme:"outlined"};function c(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),r.forEach(function(a){f(n,a,t[a])})}return n}function f(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var i=function(e,t){var r=c({},e,t.attrs);return o(u,c({},r,{icon:l}),null)};i.displayName="EnvironmentOutlined";i.inheritAttrs=!1;export{i as E};
@@ -1 +1 @@
import{_,b as c,c as e,w as o,f as l,r as s,o as u}from"./index-CfFqH7Y1.js";const p={},d={class:"full-page-msg"};function i(r,t){const a=s("a-button"),n=s("a-result");return u(),c("div",d,[e(n,{status:"404",title:"صفحه مورد نظر یافت نشد","sub-title":"آدرسی که وارد کرده‌اید وجود ندارد."},{extra:o(()=>[e(a,{type:"primary",onClick:t[0]||(t[0]=f=>r.$router.push("/"))},{default:o(()=>[...t[1]||(t[1]=[l("بازگشت به خانه",-1)])]),_:1})]),_:1})])}const x=_(p,[["render",i],["__scopeId","data-v-82a95474"]]);export{x as default}; import{_,b as c,c as e,w as o,f as l,r as s,o as u}from"./index-BpoVO8sC.js";const p={},d={class:"full-page-msg"};function i(r,t){const a=s("a-button"),n=s("a-result");return u(),c("div",d,[e(n,{status:"404",title:"صفحه مورد نظر یافت نشد","sub-title":"آدرسی که وارد کرده‌اید وجود ندارد."},{extra:o(()=>[e(a,{type:"primary",onClick:t[0]||(t[0]=f=>r.$router.push("/"))},{default:o(()=>[...t[1]||(t[1]=[l("بازگشت به خانه",-1)])]),_:1})]),_:1})])}const x=_(p,[["render",i],["__scopeId","data-v-82a95474"]]);export{x as default};
@@ -1 +1 @@
import{_,b as c,c as e,w as o,f as l,r as s,o as u}from"./index-CfFqH7Y1.js";const p={},d={class:"full-page-msg"};function i(r,t){const a=s("a-button"),n=s("a-result");return u(),c("div",d,[e(n,{status:"500",title:"خطای سرور","sub-title":"مشکلی در سرور رخ داده است. لطفاً بعداً تلاش کنید."},{extra:o(()=>[e(a,{type:"primary",onClick:t[0]||(t[0]=f=>r.$router.push("/"))},{default:o(()=>[...t[1]||(t[1]=[l("بازگشت به خانه",-1)])]),_:1})]),_:1})])}const x=_(p,[["render",i],["__scopeId","data-v-1080291a"]]);export{x as default}; import{_,b as c,c as e,w as o,f as l,r as s,o as u}from"./index-BpoVO8sC.js";const p={},d={class:"full-page-msg"};function i(r,t){const a=s("a-button"),n=s("a-result");return u(),c("div",d,[e(n,{status:"500",title:"خطای سرور","sub-title":"مشکلی در سرور رخ داده است. لطفاً بعداً تلاش کنید."},{extra:o(()=>[e(a,{type:"primary",onClick:t[0]||(t[0]=f=>r.$router.push("/"))},{default:o(()=>[...t[1]||(t[1]=[l("بازگشت به خانه",-1)])]),_:1})]),_:1})])}const x=_(p,[["render",i],["__scopeId","data-v-1080291a"]]);export{x as default};
@@ -1 +1 @@
import{d as E,a as i,w as l,r as x,o as s,c as d,aj as P,p as w,h as u,E as y,W as B,$ as L,a7 as S,m as v,y as A,G as $,l as I}from"./index-CfFqH7Y1.js";import{X as N}from"./model-jivQdHnP.js";import{_ as V}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-CbA7uKX0.js";const X={class:"flex gap-2"},T=E({__name:"FacilityList",props:{title:{},model:{},editPath:{},activePath:{},addRid:{},addLabel:{}},setup(a){const k=a,h=I(),m=v(null),c=v(!1),f=v(void 0);function _(){f.value=void 0,c.value=!0}function b(e){f.value=e,c.value=!0}function g(e){c.value=e}function O(){var e;(e=m.value)==null||e.fetch()}function R(e){h.push(`${k.editPath}/${e}`)}async function C(e){var o,n,r;try{await A.get(`${k.activePath}/${e}`),$.success("تغییرات ثبت شد"),(o=m.value)==null||o.fetch()}catch(t){$.error(((r=(n=t==null?void 0:t.response)==null?void 0:n.data)==null?void 0:r.message)??"خطا در تغییر وضعیت")}}return(e,o)=>{const n=x("a-tooltip"),r=x("a-card");return s(),i(r,{title:a.title,class:"page-card"},{default:l(()=>[d(N,{ref_key:"tbl",ref:m,model:a.model,"mobile-cards":""},P({actions:l(({record:t})=>[w("div",X,[a.addRid?(s(),i(n,{key:0,title:"ویرایش"},{default:l(()=>[d(u(y),{class:"cursor-pointer mx-1 text-primary",onClick:p=>b(t.id)},null,8,["onClick"])]),_:2},1024)):(s(),i(n,{key:1,title:"ویرایش"},{default:l(()=>[d(u(y),{class:"cursor-pointer mx-1 text-primary",onClick:p=>R(t.id)},null,8,["onClick"])]),_:2},1024)),d(n,{title:"وضعیت"},{default:l(()=>[t.is_active?(s(),i(u(B),{key:0,class:"cursor-pointer mx-1 text-success",onClick:p=>C(t.id)},null,8,["onClick"])):(s(),i(u(L),{key:1,class:"cursor-pointer mx-1 text-danger",onClick:p=>C(t.id)},null,8,["onClick"]))]),_:2},1024)])]),_:2},[a.addRid?{name:"add",fn:l(()=>[d(V,{rid:a.addRid,"add-label":a.addLabel,onAdd:o[0]||(o[0]=t=>_())},null,8,["rid","add-label"])]),key:"0"}:void 0]),1032,["model"]),S(e.$slots,"form",{open:c.value,editingId:f.value,onUpdateOpen:g,onSuccess:O})]),_:3},8,["title"])}}});export{T as _}; import{d as E,a as i,w as l,r as x,o as s,c as d,Y as P,p as w,h as u,E as y,W as B,a0 as L,a8 as S,m as v,y as A,J as h,l as I}from"./index-BpoVO8sC.js";import{X as N}from"./model-CTGHGliB.js";import{_ as V}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-BQSUUyv5.js";const X={class:"flex gap-2"},U=E({__name:"FacilityList",props:{title:{},model:{},editPath:{},activePath:{},addRid:{},addLabel:{}},setup(a){const k=a,$=I(),m=v(null),c=v(!1),f=v(void 0);function _(){f.value=void 0,c.value=!0}function b(e){f.value=e,c.value=!0}function g(e){c.value=e}function O(){var e;(e=m.value)==null||e.fetch()}function R(e){$.push(`${k.editPath}/${e}`)}async function C(e){var o,n,r;try{await A.get(`${k.activePath}/${e}`),h.success("تغییرات ثبت شد"),(o=m.value)==null||o.fetch()}catch(t){h.error(((r=(n=t==null?void 0:t.response)==null?void 0:n.data)==null?void 0:r.message)??"خطا در تغییر وضعیت")}}return(e,o)=>{const n=x("a-tooltip"),r=x("a-card");return s(),i(r,{title:a.title,class:"page-card"},{default:l(()=>[d(N,{ref_key:"tbl",ref:m,model:a.model,"mobile-cards":""},P({actions:l(({record:t})=>[w("div",X,[a.addRid?(s(),i(n,{key:0,title:"ویرایش"},{default:l(()=>[d(u(y),{class:"cursor-pointer mx-1 text-primary",onClick:p=>b(t.id)},null,8,["onClick"])]),_:2},1024)):(s(),i(n,{key:1,title:"ویرایش"},{default:l(()=>[d(u(y),{class:"cursor-pointer mx-1 text-primary",onClick:p=>R(t.id)},null,8,["onClick"])]),_:2},1024)),d(n,{title:"وضعیت"},{default:l(()=>[t.is_active?(s(),i(u(B),{key:0,class:"cursor-pointer mx-1 text-success",onClick:p=>C(t.id)},null,8,["onClick"])):(s(),i(u(L),{key:1,class:"cursor-pointer mx-1 text-danger",onClick:p=>C(t.id)},null,8,["onClick"]))]),_:2},1024)])]),_:2},[a.addRid?{name:"add",fn:l(()=>[d(V,{rid:a.addRid,"add-label":a.addLabel,onAdd:o[0]||(o[0]=t=>_())},null,8,["rid","add-label"])]),key:"0"}:void 0]),1032,["model"]),S(e.$slots,"form",{open:c.value,editingId:f.value,onUpdateOpen:g,onSuccess:O})]),_:3},8,["title"])}}});export{U as _};
@@ -1 +1 @@
import{_ as o,b as t,c,r,o as s}from"./index-CfFqH7Y1.js";const n={},a={class:"layout--full-page"};function _(l,u){const e=r("router-view");return s(),t("div",a,[c(e)])}const i=o(n,[["render",_]]);export{i as default}; import{_ as o,b as t,c,r,o as s}from"./index-BpoVO8sC.js";const n={},a={class:"layout--full-page"};function _(l,u){const e=r("router-view");return s(),t("div",a,[c(e)])}const i=o(n,[["render",_]]);export{i as default};
@@ -1 +1 @@
import{d as r,x as c,y as n,b as i,l as m,o as d}from"./index-CfFqH7Y1.js";import{u as _}from"./auth-CVdVeDFj.js";const l={style:{"min-height":"100vh",display:"grid","place-items":"center"}},h=r({__name:"IamCallback",setup(p){const t=m(),o=_();return c(async()=>{const e=new URLSearchParams(window.location.search);if(sessionStorage.removeItem("gb_admin_iam_sso_checked"),e.get("error")||!e.get("code")||!e.get("state")){sessionStorage.setItem("gb_admin_iam_sso_skip","1"),await t.replace("/auth/login");return}try{const{data:s}=await n.post("admin/auth/sso/callback",{code:e.get("code"),state:e.get("state")}),a={...s};delete a.roles,delete a.ut,o.inject(a),await t.replace("/dashboard/ecommerce")}catch{sessionStorage.setItem("gb_admin_iam_sso_skip","1"),await t.replace("/auth/login")}}),(e,s)=>(d(),i("div",l,"در حال ورود..."))}});export{h as default}; import{d as r,x as c,y as n,b as i,l as m,o as d}from"./index-BpoVO8sC.js";import{u as _}from"./auth-B6A5SMXF.js";const l={style:{"min-height":"100vh",display:"grid","place-items":"center"}},h=r({__name:"IamCallback",setup(p){const t=m(),o=_();return c(async()=>{const e=new URLSearchParams(window.location.search);if(sessionStorage.removeItem("gb_admin_iam_sso_checked"),e.get("error")||!e.get("code")||!e.get("state")){sessionStorage.setItem("gb_admin_iam_sso_skip","1"),await t.replace("/auth/login");return}try{const{data:s}=await n.post("admin/auth/sso/callback",{code:e.get("code"),state:e.get("state")}),a={...s};delete a.roles,delete a.ut,o.inject(a),await t.replace("/dashboard/ecommerce")}catch{sessionStorage.setItem("gb_admin_iam_sso_skip","1"),await t.replace("/auth/login")}}),(e,s)=>(d(),i("div",l,"در حال ورود..."))}});export{h as default};
@@ -1 +1 @@
import{d as B,n as P,o as u,b as r,c as m,w as h,a as N,h as b,P as D,p as y,t as I,i as R,m as i,s as S,y as U,G as q,r as f}from"./index-CfFqH7Y1.js";const z={class:"image-upload"},E={key:0},F={key:1},G={style:{"margin-top":"8px"}},L=["src"],$=B({__name:"ImageUploadInput",props:{modelValue:{default:null},purpose:{default:void 0},placeholder:{default:"بارگذاری"}},emits:["update:modelValue","ok"],setup(g,{emit:w}){const s=g,p=w,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)??"بارگذاری فایل ناموفق بود";q.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",z,[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",E,[c.value?(u(),N(l,{key:0,size:"small"})):(u(),r("div",F,[m(b(D)),y("div",G,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(()=>[y("img",{src:v.value,style:{width:"100%"},alt:""},null,8,L)]),_:1},8,["open"])])}}});export{$ as _}; import{d as B,n as P,o as u,b as r,c as m,w as h,a as N,h as b,P as D,p as y,t as I,i as R,m as i,s as S,y as U,J as q,r as f}from"./index-BpoVO8sC.js";const z={class:"image-upload"},E={key:0},F={key:1},J={style:{"margin-top":"8px"}},L=["src"],$=B({__name:"ImageUploadInput",props:{modelValue:{default:null},purpose:{default:void 0},placeholder:{default:"بارگذاری"}},emits:["update:modelValue","ok"],setup(g,{emit:w}){const s=g,p=w,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)??"بارگذاری فایل ناموفق بود";q.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",z,[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",E,[c.value?(u(),N(l,{key:0,size:"small"})):(u(),r("div",F,[m(b(D)),y("div",J,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(()=>[y("img",{src:v.value,style:{width:"100%"},alt:""},null,8,L)]),_:1},8,["open"])])}}});export{$ as _};
+1
View File
@@ -0,0 +1 @@
.flex-col[data-v-73ba2ddd]{flex-direction:column}.flex-1[data-v-73ba2ddd]{flex:1}.justify-between[data-v-73ba2ddd]{justify-content:space-between}.mr-3[data-v-73ba2ddd]{margin-left:.75rem}
+1
View File
@@ -0,0 +1 @@
import{a as $,b as s,X as B}from"./model-CTGHGliB.js";import{_ as E}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-BQSUUyv5.js";import{_ as X}from"./Add.vue_vue_type_script_setup_true_lang-BcAS3HVh.js";import{d as D,u as M,b as O,c as i,w as o,r as u,o as c,h as m,a as f,E as T,i as b,G as V,p as w,m as _}from"./index-BpoVO8sC.js";import{u as A}from"./useDeleteHandler-b0QaQDrX.js";import"./filters-OZN7JLpr.js";import"./index-B_k8FJMA.js";import"./SettingOutlined-adv0dYGx.js";import"./select--BgT6D7O.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-AKFpsSMX.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-DFb5CG1L.js";function I(){const t=new $("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 P={id:"page-user-list"},U=["src"],j="/img/no-items.png",Y=D({__name:"List",setup(t){const k=M(),g=n=>!!k.hasPermission(n),y=I(),p=_(null),r=_(!1),l=_(void 0),{remove:x}=A({onSuccess:()=>{var n;return(n=p.value)==null?void 0:n.fetch()},successMessage:"دسته حذف شد",successType:"info",fallbackErrorMessage:"خطا در حذف دسته"});function C(){l.value=void 0,r.value=!0}function S(n){l.value=n,r.value=!0}return(n,a)=>{const v=u("a-tooltip"),h=u("a-popconfirm"),N=u("a-card");return c(),O("div",P,[i(N,{title:"لیست دسته بندی ها",class:"page-card"},{default:o(()=>[i(B,{ref_key:"tbl",ref:p,model:m(y),"mobile-cards":""},{add:o(()=>[i(E,{rid:"collection.create","add-label":"افزودن دسته",onAdd:C})]),image:o(({text:e})=>[w("img",{width:"90px",height:"90px",style:{"object-fit":"scale-down"},src:e&&e.image?e.image:j},null,8,U)]),opt:o(({record:e})=>[g("collection.list.edit")?(c(),f(v,{key:0,title:"ویرایش"},{default:o(()=>[i(m(T),{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:o(()=>[i(h,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:d=>m(x)(`category/${e.id}`)},{title:o(()=>[...a[2]||(a[2]=[w("p",null,"آیا مطمئن به حذف دسته مورد نظر هستید ؟",-1)])]),default:o(()=>[i(m(V),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)):b("",!0)]),_:1},8,["model"]),(c(),f(X,{key:l.value??"new",open:r.value,id:l.value,"onUpdate:open":a[0]||(a[0]=e=>r.value=e),onSuccess:a[1]||(a[1]=e=>{var d;return(d=p.value)==null?void 0:d.fetch()})},null,8,["open","id"]))]),_:1})])}}});export{Y as default};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
.flex-col[data-v-d7104f94]{flex-direction:column}.flex-1[data-v-d7104f94]{flex:1}.justify-between[data-v-d7104f94]{justify-content:space-between}.mr-3[data-v-d7104f94]{margin-left:.75rem}
-1
View File
@@ -1 +0,0 @@
import{a as $,b as s,X as B}from"./model-jivQdHnP.js";import{_ as E}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-CbA7uKX0.js";import{_ as D}from"./Add.vue_vue_type_script_setup_true_lang-DQg8ipd6.js";import{d as X,u as M,b as O,c as i,w as o,r as u,o as c,h as m,a as f,E as T,i as b,D as V,p as w,m as _}from"./index-CfFqH7Y1.js";import{u as A}from"./useDeleteHandler-DLWuzPzA.js";import"./filters-DWtPewx7.js";import"./index-C7lpysFQ.js";import"./SettingOutlined-BsS6G0WY.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-c3IiekqO.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-Bef1m3ur.js";function I(){const t=new $("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 P={id:"page-user-list"},U=["src"],j="/img/no-items.png",W=X({__name:"List",setup(t){const k=M(),g=n=>!!k.hasPermission(n),y=I(),p=_(null),r=_(!1),l=_(void 0),{remove:x}=A({onSuccess:()=>{var n;return(n=p.value)==null?void 0:n.fetch()},successMessage:"دسته حذف شد",successType:"info",fallbackErrorMessage:"خطا در حذف دسته"});function C(){l.value=void 0,r.value=!0}function S(n){l.value=n,r.value=!0}return(n,a)=>{const v=u("a-tooltip"),h=u("a-popconfirm"),N=u("a-card");return c(),O("div",P,[i(N,{title:"لیست دسته بندی ها",class:"page-card"},{default:o(()=>[i(B,{ref_key:"tbl",ref:p,model:m(y),"mobile-cards":""},{add:o(()=>[i(E,{rid:"collection.create","add-label":"افزودن دسته",onAdd:C})]),image:o(({text:e})=>[w("img",{width:"90px",height:"90px",style:{"object-fit":"scale-down"},src:e&&e.image?e.image:j},null,8,U)]),opt:o(({record:e})=>[g("collection.list.edit")?(c(),f(v,{key:0,title:"ویرایش"},{default:o(()=>[i(m(T),{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:o(()=>[i(h,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:d=>m(x)(`category/${e.id}`)},{title:o(()=>[...a[2]||(a[2]=[w("p",null,"آیا مطمئن به حذف دسته مورد نظر هستید ؟",-1)])]),default:o(()=>[i(m(V),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)):b("",!0)]),_:1},8,["model"]),(c(),f(D,{key:l.value??"new",open:r.value,id:l.value,"onUpdate:open":a[0]||(a[0]=e=>r.value=e),onSuccess:a[1]||(a[1]=e=>{var d;return(d=p.value)==null?void 0:d.fetch()})},null,8,["open","id"]))]),_:1})])}}});export{W as default};
-1
View File
@@ -1 +0,0 @@
import{_ as m}from"./FacilityList.vue_vue_type_script_setup_true_lang-BIYrCVz7.js";import{_ as c}from"./AddBranches.vue_vue_type_script_setup_true_lang-C2O0z_CA.js";import{a as p,b as t}from"./model-jivQdHnP.js";import{d as l,a as n,w as f,h as _,o}from"./index-CfFqH7Y1.js";import"./ListPageHeader.vue_vue_type_script_setup_true_lang-CbA7uKX0.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-c3IiekqO.js";import"./filters-DWtPewx7.js";import"./index-C7lpysFQ.js";import"./SettingOutlined-BsS6G0WY.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 N=l({__name:"ListBranches",setup(e){const r=u();return(h,b)=>(o(),n(m,{title:"لیست شعب",model:_(r),"edit-path":"/branch/edit","active-path":"branch/active","add-rid":"branch.create","add-label":"افزودن شعبه"},{form:f(({open:d,editingId:a,onUpdateOpen:i,onSuccess:s})=>[(o(),n(c,{key:a??"new",open:d,id:a,"onUpdate:open":i,onSuccess:s},null,8,["open","id","onUpdate:open","onSuccess"]))]),_:1},8,["model"]))}});export{N as default};
+1
View File
@@ -0,0 +1 @@
import{_ as m}from"./FacilityList.vue_vue_type_script_setup_true_lang-B1hqy0yy.js";import{_ as c}from"./AddBranches.vue_vue_type_script_setup_true_lang-E7Zk4Fh3.js";import{a as p,b as t}from"./model-CTGHGliB.js";import{d as l,a as o,w as f,h as _,o as r}from"./index-BpoVO8sC.js";import"./ListPageHeader.vue_vue_type_script_setup_true_lang-BQSUUyv5.js";import"./select--BgT6D7O.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-AKFpsSMX.js";import"./filters-OZN7JLpr.js";import"./index-B_k8FJMA.js";import"./SettingOutlined-adv0dYGx.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 U=l({__name:"ListBranches",setup(e){const n=u();return(h,b)=>(r(),o(m,{title:"لیست شعب",model:_(n),"edit-path":"/branch/edit","active-path":"branch/active","add-rid":"branch.create","add-label":"افزودن شعبه"},{form:f(({open:i,editingId:a,onUpdateOpen:d,onSuccess:s})=>[(r(),o(c,{key:a??"new",open:i,id:a,"onUpdate:open":d,onSuccess:s},null,8,["open","id","onUpdate:open","onSuccess"]))]),_:1},8,["model"]))}});export{U as default};
+1
View File
@@ -0,0 +1 @@
import{a as M,b as d,X as V}from"./model-CTGHGliB.js";import{_ as h}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-BQSUUyv5.js";import z from"./AddInvoice-Ds7WXE_u.js";import{j as K}from"./filters-OZN7JLpr.js";import{u as R}from"./useDeleteHandler-b0QaQDrX.js";import{d as U,b as g,c as e,w as t,r as s,o as x,h as p,p as y,R as G,E as H,G as q,f as r,t as u,a as C,m as _,y as F,_ as J}from"./index-BpoVO8sC.js";import"./SettingOutlined-adv0dYGx.js";import"./select--BgT6D7O.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-AKFpsSMX.js";import"./index-B_k8FJMA.js";function P(){const n=new M("admin/invoices/list","لیست فاکتورها");return n.add(new d("id","ردیف").filterNumber()),n.add(new d("name","نام مشتری").filterKey("branch.name").filterText()),n.add(new d("sum_weight","جمع کل سفارش").filterNumber().noSort()),n.add(new d("count_item","تعداد آیتم ها").filterNumber().noSort()),n.add(new d("caj","تاریخ ثبت").filterKey("createdAt").filterDate().noSort()),n.add(new d("allocator_user.name","ثبت کننده").renderSlot("user").noSort()),n.add(new d("note","توضیحات").filterText().noSort()),n.add(new d("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=P(),w=_(null),f=_(!1),l=_(void 0),v=_(!1),b=_(void 0);function I(){b.value=void 0,v.value=!0}function $(c){b.value=c,v.value=!0}const E=[{title:"کد محصول",dataIndex:"product_code"},{title:"نام محصول",dataIndex:"title"},{title:"وزن",dataIndex:"grams"}];async function N(c){const{data:o}=await F.get(`branch/product/${c.id}`);l.value=o,f.value=!0}const{remove:D}=R({onSuccess:()=>{var c;return(c=w.value)==null?void 0:c.fetch()},successMessage:"فاکتور حذف شد",fallbackErrorMessage:"خطا در حذف فاکتور"});return(c,o)=>{const k=s("a-tooltip"),T=s("a-popconfirm"),m=s("a-descriptions-item"),j=s("a-descriptions"),A=s("a-table"),B=s("a-empty"),O=s("a-button"),X=s("a-modal"),L=s("a-card");return x(),g("div",Q,[e(L,{title:"لیست فاکتورها",class:"page-card"},{default:t(()=>[e(V,{ref_key:"tbl",ref:w,model:p(S),"mobile-cards":""},{add:t(()=>[e(h,{rid:"invoice.create","add-label":"افزودن فاکتور",onAdd:I})]),user:t(({record:a})=>{var i;return[r(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(G),{class:"cursor-pointer mx-1 text-success",onClick:i=>N(a)},null,8,["onClick"])]),_:2},1024),e(k,{title:"ویرایش"},{default:t(()=>[e(p(H),{class:"cursor-pointer mx-1 text-primary",onClick:i=>$(a.id)},null,8,["onClick"])]),_:2},1024),e(k,{title:"حذف"},{default:t(()=>[e(T,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:i=>p(D)(`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(X,{open:f.value,"onUpdate:open":o[1]||(o[1]=a=>f.value=a),title:"مشاهده فاکتور",width:"70%","wrap-class-name":"detail-modal"},{footer:t(()=>[e(O,{onClick:o[0]||(o[0]=a=>f.value=!1)},{default:t(()=>[...o[5]||(o[5]=[r("بستن",-1)])]),_:1})]),default:t(()=>[l.value?(x(),g("div",Y,[e(j,{bordered:"",size:"small",column:{xxl:2,xl:2,lg:2,md:2,sm:2,xs:1}},{default:t(()=>[e(m,{label:"شعبه"},{default:t(()=>[r(u(l.value.name),1)]),_:1}),e(m,{label:"ثبت کننده"},{default:t(()=>{var a;return[r(u(((a=l.value.allocator_user)==null?void 0:a.name)??"-"),1)]}),_:1}),e(m,{label:"تاریخ ثبت"},{default:t(()=>[r(u(p(K)(l.value.caj)),1)]),_:1}),e(m,{label:"تعداد آیتم"},{default:t(()=>[r(u(l.value.count_item),1)]),_:1}),e(m,{label:"جمع وزن"},{default:t(()=>[r(u(l.value.sum_weight),1)]),_:1}),e(m,{label:"توضیحات"},{default:t(()=>[r(u(l.value.note??"-"),1)]),_:1})]),_:1}),e(A,{class:"mt-4",size:"small","data-source":l.value.products,columns:E,pagination:!1,"row-key":"id"},null,8,["data-source"])])):(x(),C(B,{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})])}}}),ce=J(Z,[["__scopeId","data-v-7869d72f"]]);export{ce as default};
-1
View File
@@ -1 +0,0 @@
import{a as M,b as d,X as V}from"./model-jivQdHnP.js";import{_ as h}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-CbA7uKX0.js";import z from"./AddInvoice-BjP8NU-f.js";import{j as K}from"./filters-DWtPewx7.js";import{u as U}from"./useDeleteHandler-DLWuzPzA.js";import{d as H,b as g,c as e,w as t,r as s,o as x,h as p,p as y,Q,E as R,D as q,f as r,t as u,a as C,m as _,y as F,_ as G}from"./index-CfFqH7Y1.js";import"./SettingOutlined-BsS6G0WY.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-c3IiekqO.js";import"./index-C7lpysFQ.js";function J(){const n=new M("admin/invoices/list","لیست فاکتورها");return n.add(new d("id","ردیف").filterNumber()),n.add(new d("name","نام مشتری").filterKey("branch.name").filterText()),n.add(new d("sum_weight","جمع کل سفارش").filterNumber().noSort()),n.add(new d("count_item","تعداد آیتم ها").filterNumber().noSort()),n.add(new d("caj","تاریخ ثبت").filterKey("createdAt").filterDate().noSort()),n.add(new d("allocator_user.name","ثبت کننده").renderSlot("user").noSort()),n.add(new d("note","توضیحات").filterText().noSort()),n.add(new d("op","عملیات").noSort().renderSlot("actions")),n}const P={id:"page-user-list"},W={class:"flex gap-2"},Y={key:0},Z=H({__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 $(c){b.value=c,v.value=!0}const D=[{title:"کد محصول",dataIndex:"product_code"},{title:"نام محصول",dataIndex:"title"},{title:"وزن",dataIndex:"grams"}];async function E(c){const{data:o}=await F.get(`branch/product/${c.id}`);l.value=o,f.value=!0}const{remove:N}=U({onSuccess:()=>{var c;return(c=w.value)==null?void 0:c.fetch()},successMessage:"فاکتور حذف شد",fallbackErrorMessage:"خطا در حذف فاکتور"});return(c,o)=>{const k=s("a-tooltip"),T=s("a-popconfirm"),m=s("a-descriptions-item"),j=s("a-descriptions"),A=s("a-table"),B=s("a-empty"),O=s("a-button"),X=s("a-modal"),L=s("a-card");return x(),g("div",P,[e(L,{title:"لیست فاکتورها",class:"page-card"},{default:t(()=>[e(V,{ref_key:"tbl",ref:w,model:p(S),"mobile-cards":""},{add:t(()=>[e(h,{rid:"invoice.create","add-label":"افزودن فاکتور",onAdd:I})]),user:t(({record:a})=>{var i;return[r(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(Q),{class:"cursor-pointer mx-1 text-success",onClick:i=>E(a)},null,8,["onClick"])]),_:2},1024),e(k,{title:"ویرایش"},{default:t(()=>[e(p(R),{class:"cursor-pointer mx-1 text-primary",onClick:i=>$(a.id)},null,8,["onClick"])]),_:2},1024),e(k,{title:"حذف"},{default:t(()=>[e(T,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:i=>p(N)(`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(X,{open:f.value,"onUpdate:open":o[1]||(o[1]=a=>f.value=a),title:"مشاهده فاکتور",width:"70%","wrap-class-name":"detail-modal"},{footer:t(()=>[e(O,{onClick:o[0]||(o[0]=a=>f.value=!1)},{default:t(()=>[...o[5]||(o[5]=[r("بستن",-1)])]),_:1})]),default:t(()=>[l.value?(x(),g("div",Y,[e(j,{bordered:"",size:"small",column:{xxl:2,xl:2,lg:2,md:2,sm:2,xs:1}},{default:t(()=>[e(m,{label:"شعبه"},{default:t(()=>[r(u(l.value.name),1)]),_:1}),e(m,{label:"ثبت کننده"},{default:t(()=>{var a;return[r(u(((a=l.value.allocator_user)==null?void 0:a.name)??"-"),1)]}),_:1}),e(m,{label:"تاریخ ثبت"},{default:t(()=>[r(u(p(K)(l.value.caj)),1)]),_:1}),e(m,{label:"تعداد آیتم"},{default:t(()=>[r(u(l.value.count_item),1)]),_:1}),e(m,{label:"جمع وزن"},{default:t(()=>[r(u(l.value.sum_weight),1)]),_:1}),e(m,{label:"توضیحات"},{default:t(()=>[r(u(l.value.note??"-"),1)]),_:1})]),_:1}),e(A,{class:"mt-4",size:"small","data-source":l.value.products,columns:D,pagination:!1,"row-key":"id"},null,8,["data-source"])])):(x(),C(B,{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})])}}}),re=G(Z,[["__scopeId","data-v-7869d72f"]]);export{re as default};
@@ -1 +1 @@
import{d,u as i,o as u,a as m,w as s,f as c,t as l,c as f,h as p,P as C,i as P,r as b}from"./index-CfFqH7Y1.js";const _=d({__name:"ListPageHeader",props:{rid:{default:void 0},addLabel:{default:"افزودن"}},emits:["add"],setup(e){const o=i(),n=t=>!!o.hasPermission(t);return(t,a)=>{const r=b("a-button");return!e.rid||n(e.rid)?(u(),m(r,{key:0,type:"primary",onClick:a[0]||(a[0]=k=>t.$emit("add"))},{icon:s(()=>[f(p(C))]),default:s(()=>[c(" "+l(e.addLabel),1)]),_:1})):P("",!0)}}});export{_}; import{d,u as i,o as u,a as m,w as s,f as c,t as l,c as f,h as p,P as C,i as P,r as b}from"./index-BpoVO8sC.js";const _=d({__name:"ListPageHeader",props:{rid:{default:void 0},addLabel:{default:"افزودن"}},emits:["add"],setup(e){const o=i(),n=t=>!!o.hasPermission(t);return(t,a)=>{const r=b("a-button");return!e.rid||n(e.rid)?(u(),m(r,{key:0,type:"primary",onClick:a[0]||(a[0]=k=>t.$emit("add"))},{icon:s(()=>[f(p(C))]),default:s(()=>[c(" "+l(e.addLabel),1)]),_:1})):P("",!0)}}});export{_};
@@ -1 +1 @@
import{a as D,b as a,X as E}from"./model-jivQdHnP.js";import{_ as U}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-CbA7uKX0.js";import $ from"./UserCreate-DHiJy6bA.js";import{d as M,u as V,x as X,y as h,b as O,c as r,w as n,m as c,r as _,o as m,h as p,a as v,E as A,i as y,D as K,p as L,f as P,t as H}from"./index-CfFqH7Y1.js";import{u as I}from"./useDeleteHandler-DLWuzPzA.js";import"./filters-DWtPewx7.js";import"./index-C7lpysFQ.js";import"./SettingOutlined-BsS6G0WY.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-c3IiekqO.js";function j(){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"},ee=M({__name:"ListUser",setup(o){const k=V(),x=e=>!!k.hasPermission(e),w=j(),f=c(null),b=c([]),l=c(!1),i=c(void 0);function g(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}=I({onSuccess:()=>{var e;return(e=f.value)==null?void 0:e.fetch()},successMessage:"کاربر حذف شد",fallbackErrorMessage:"خطا در حذف کاربر"});return X(async()=>{try{const{data:e}=await h.get("const/__list__ut");b.value=e}catch(e){console.log(e)}}),(e,t)=>{const d=_("a-tooltip"),S=_("a-popconfirm"),B=_("a-card");return m(),O("div",q,[r(B,{title:"لیست مدیران",class:"page-card"},{default:n(()=>[r(E,{ref_key:"tbl",ref:f,model:p(w),"mobile-cards":""},{add:n(()=>[r(U,{rid:"user.list.create","add-label":"افزودن کاربر",onAdd:C})]),ut:n(({text:s})=>[P(H(g(s)),1)]),op:n(({record:s})=>[x("user.list.edit")?(m(),v(d,{key:0,title:"ویرایش"},{default:n(()=>[r(p(A),{class:"cursor-pointer mx-1 text-primary",onClick:u=>T(s)},null,8,["onClick"])]),_:2},1024)):y("",!0),x("user.list.remove")?(m(),v(d,{key:1,title:"حذف"},{default:n(()=>[r(S,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:u=>p(N)(`users/${s.id}`)},{title:n(()=>[...t[2]||(t[2]=[L("p",null,"آیا مطمئن به حذف کاربر مورد نظر هستید ؟",-1)])]),default:n(()=>[r(p(K),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)):y("",!0)]),_:1},8,["model"]),(m(),v($,{key:i.value??"new",open:l.value,id:i.value,"onUpdate:open":t[0]||(t[0]=s=>l.value=s),onSuccess:t[1]||(t[1]=s=>{var u;return(u=f.value)==null?void 0:u.fetch()})},null,8,["open","id"]))]),_:1})])}}});export{ee as default}; import{a as E,b as a,X as U}from"./model-CTGHGliB.js";import{_ as $}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-BQSUUyv5.js";import D from"./UserCreate-BpvLMg16.js";import{d as M,u as V,x as X,y as h,b as O,c as r,w as n,m as c,r as _,o as m,h as p,a as v,E as A,i as y,G as K,p as L,f as P,t as G}from"./index-BpoVO8sC.js";import{u as H}from"./useDeleteHandler-b0QaQDrX.js";import"./filters-OZN7JLpr.js";import"./index-B_k8FJMA.js";import"./SettingOutlined-adv0dYGx.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-AKFpsSMX.js";function I(){const o=new E("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 j={id:"page-user-list"},ee=M({__name:"ListUser",setup(o){const k=V(),x=e=>!!k.hasPermission(e),w=I(),f=c(null),b=c([]),l=c(!1),i=c(void 0);function g(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}=H({onSuccess:()=>{var e;return(e=f.value)==null?void 0:e.fetch()},successMessage:"کاربر حذف شد",fallbackErrorMessage:"خطا در حذف کاربر"});return X(async()=>{try{const{data:e}=await h.get("const/__list__ut");b.value=e}catch(e){console.log(e)}}),(e,t)=>{const d=_("a-tooltip"),S=_("a-popconfirm"),B=_("a-card");return m(),O("div",j,[r(B,{title:"لیست مدیران",class:"page-card"},{default:n(()=>[r(U,{ref_key:"tbl",ref:f,model:p(w),"mobile-cards":""},{add:n(()=>[r($,{rid:"user.list.create","add-label":"افزودن کاربر",onAdd:C})]),ut:n(({text:s})=>[P(G(g(s)),1)]),op:n(({record:s})=>[x("user.list.edit")?(m(),v(d,{key:0,title:"ویرایش"},{default:n(()=>[r(p(A),{class:"cursor-pointer mx-1 text-primary",onClick:u=>T(s)},null,8,["onClick"])]),_:2},1024)):y("",!0),x("user.list.remove")?(m(),v(d,{key:1,title:"حذف"},{default:n(()=>[r(S,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:u=>p(N)(`users/${s.id}`)},{title:n(()=>[...t[2]||(t[2]=[L("p",null,"آیا مطمئن به حذف کاربر مورد نظر هستید ؟",-1)])]),default:n(()=>[r(p(K),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)):y("",!0)]),_:1},8,["model"]),(m(),v(D,{key:i.value??"new",open:l.value,id:i.value,"onUpdate:open":t[0]||(t[0]=s=>l.value=s),onSuccess:t[1]||(t[1]=s=>{var u;return(u=f.value)==null?void 0:u.fetch()})},null,8,["open","id"]))]),_:1})])}}});export{ee as default};
@@ -1 +1 @@
import{_ as d}from"./FacilityList.vue_vue_type_script_setup_true_lang-BIYrCVz7.js";import{_ as m}from"./AddWorkshop.vue_vue_type_script_setup_true_lang-DOx1Q7F_.js";import{a as c,b as e}from"./model-jivQdHnP.js";import{d as l,a as r,w as f,h as _,o as a}from"./index-CfFqH7Y1.js";import"./ListPageHeader.vue_vue_type_script_setup_true_lang-CbA7uKX0.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-c3IiekqO.js";import"./filters-DWtPewx7.js";import"./index-C7lpysFQ.js";import"./SettingOutlined-BsS6G0WY.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 U=l({__name:"ListWorkshop",setup(o){const n=h();return(w,u)=>(a(),r(d,{title:"لیست کارگاه ها",model:_(n),"edit-path":"/workshop/edit","active-path":"workshop/active","add-rid":"workshop.create","add-label":"افزودن کارگاه"},{form:f(({open:s,editingId:t,onUpdateOpen:i,onSuccess:p})=>[(a(),r(m,{key:t??"new",open:s,id:t,"onUpdate:open":i,onSuccess:p},null,8,["open","id","onUpdate:open","onSuccess"]))]),_:1},8,["model"]))}});export{U as default}; import{_ as d}from"./FacilityList.vue_vue_type_script_setup_true_lang-B1hqy0yy.js";import{_ as m}from"./AddWorkshop.vue_vue_type_script_setup_true_lang-TRBP_542.js";import{a as c,b as e}from"./model-CTGHGliB.js";import{d as l,a as r,w as f,h as _,o as a}from"./index-BpoVO8sC.js";import"./ListPageHeader.vue_vue_type_script_setup_true_lang-BQSUUyv5.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-AKFpsSMX.js";import"./filters-OZN7JLpr.js";import"./index-B_k8FJMA.js";import"./SettingOutlined-adv0dYGx.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 U=l({__name:"ListWorkshop",setup(o){const n=h();return(w,u)=>(a(),r(d,{title:"لیست کارگاه ها",model:_(n),"edit-path":"/workshop/edit","active-path":"workshop/active","add-rid":"workshop.create","add-label":"افزودن کارگاه"},{form:f(({open:s,editingId:t,onUpdateOpen:i,onSuccess:p})=>[(a(),r(m,{key:t??"new",open:s,id:t,"onUpdate:open":i,onSuccess:p},null,8,["open","id","onUpdate:open","onSuccess"]))]),_:1},8,["model"]))}});export{U as default};
@@ -1 +1 @@
import{c as i,I as l}from"./index-CfFqH7Y1.js";var u={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"lock",theme:"outlined"};function a(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(c){return Object.getOwnPropertyDescriptor(e,c).enumerable}))),n.forEach(function(c){f(r,c,e[c])})}return r}function f(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var o=function(t,e){var n=a({},t,e.attrs);return i(l,a({},n,{icon:u}),null)};o.displayName="LockOutlined";o.inheritAttrs=!1;export{o as L}; import{c as i,I as l}from"./index-BpoVO8sC.js";var u={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"lock",theme:"outlined"};function a(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(c){return Object.getOwnPropertyDescriptor(e,c).enumerable}))),n.forEach(function(c){f(r,c,e[c])})}return r}function f(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var o=function(t,e){var n=a({},t,e.attrs);return i(l,a({},n,{icon:u}),null)};o.displayName="LockOutlined";o.inheritAttrs=!1;export{o as L};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{_ as c,b as _,c as e,w as o,f as l,r as s,o as u}from"./index-CfFqH7Y1.js";const i={},p={class:"full-page-msg"};function d(n,t){const a=s("a-button"),r=s("a-result");return u(),_("div",p,[e(r,{status:"info",title:"در دست تعمیر","sub-title":"این بخش موقتاً در دسترس نیست."},{extra:o(()=>[e(a,{type:"primary",onClick:t[0]||(t[0]=f=>n.$router.push("/"))},{default:o(()=>[...t[1]||(t[1]=[l("بازگشت به خانه",-1)])]),_:1})]),_:1})])}const x=c(i,[["render",d],["__scopeId","data-v-4e6c833c"]]);export{x as default}; import{_ as c,b as _,c as e,w as o,f as l,r as s,o as u}from"./index-BpoVO8sC.js";const i={},p={class:"full-page-msg"};function d(n,t){const a=s("a-button"),r=s("a-result");return u(),_("div",p,[e(r,{status:"info",title:"در دست تعمیر","sub-title":"این بخش موقتاً در دسترس نیست."},{extra:o(()=>[e(a,{type:"primary",onClick:t[0]||(t[0]=f=>n.$router.push("/"))},{default:o(()=>[...t[1]||(t[1]=[l("بازگشت به خانه",-1)])]),_:1})]),_:1})])}const x=c(i,[["render",d],["__scopeId","data-v-4e6c833c"]]);export{x as default};
-1
View File
@@ -1 +0,0 @@
.flex-1[data-v-4a9a9c66]{flex:1}.gap-8[data-v-4a9a9c66]{gap:2rem}.mr-3[data-v-4a9a9c66]{margin-left:.75rem}@media (max-width: 575px){.make-detail[data-v-4a9a9c66]{flex-direction:column;gap:12px}.make-detail>.flex[data-v-4a9a9c66]{min-width:0}}
+1
View File
@@ -0,0 +1 @@
.flex-1[data-v-bb2f59e2]{flex:1}.gap-8[data-v-bb2f59e2]{gap:2rem}.mr-3[data-v-bb2f59e2]{margin-left:.75rem}@media (max-width: 575px){.make-detail[data-v-bb2f59e2]{flex-direction:column;gap:12px}.make-detail>.flex[data-v-bb2f59e2]{min-width:0}}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long

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