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
mahmood 5bd77c33d3 update admin panel, api, and shared-types 2026-10-25 11:43:45 +03:30
mahmood 2134de99e2 Fix some for iam docs 2026-10-18 22:45:47 +03:30
s.esmaeiliandCursor 3223c90983 build: rebuild release bundles for orders pagination and dashboard hero
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-17 13:21:55 +03:30
s.esmaeiliandCursor afb068c643 feat: paginate customer orders and polish the dashboard hero
Add paged orders API and infinite scroll, short order numbers, and align the guest invite card with the logged-in hero shell.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-17 13:11:42 +03:30
s.esmaeiliandClaude Opus 5.5 f550172567 build: rebuild release bundles for the product detail action bar fix
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 15:54:27 +03:30
s.esmaeiliandClaude Opus 5.5 037280cc09 fix: size the v2 product detail to the visible screen so its action bar stays on screen
اپ۲: دکمه‌ی «افزودن به سفارش» در صفحه‌ی جزئیات محصول دیگر از پایین صفحه بیرون نمی‌افتد و همیشه دیده می‌شود.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 15:49:35 +03:30
s.esmaeiliandClaude Haiku 5.5 1cfc19f483 build: rebuild release bundles for wine colour change
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-14 15:30:33 +03:30
s.esmaeiliandClaude Haiku 5.5 c018fe6dae style: use the brand wine instead of navy for fills and borders
اپ۲: رنگ دکمه‌ها، نوار نرخ طلا و خط‌های جداکننده‌ی بالای صفحه از سرمه‌ای به قرمز-شرابی برند تغییر کرد.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-14 15:27:45 +03:30
s.esmaeiliandClaude Haiku 5.5 b4f260a1c5 build: rebuild release bundles for navy and person-form fixes
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-14 15:21:24 +03:30
s.esmaeiliandClaude Haiku 5.5 1c4571a68d fix: remove navy from the customer app chrome and keep person forms fresh
اپ۲: رنگ سرمه‌ای از پس‌زمینه‌ی بالای برنامه و رنگ نوار مرورگر حذف شد؛ همه‌جا از رنگ صفحه‌ی اصلی استفاده می‌شود.
پنل: فرم افزودن شخص با هر بار جابه‌جایی نوع شخص خالی باز می‌شود و اطلاعات نیمه‌کارهٔ قبلی دیگر نمایش داده نمی‌شود.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-14 15:18:26 +03:30
s.esmaeiliandClaude Haiku 5.5 890f5a9725 build: rebuild release bundles with retail dashboard change
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-14 14:54:52 +03:30
s.esmaeiliandClaude Haiku 5.5 640a42da05 feat: show retail dashboard figures to the super admin only
پنل: بخش‌های «تک فروشی» داشبورد (کارت، نمودار روند و تفکیک عمده/تک) فقط برای مدیر اصلی نمایش داده می‌شود.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-14 14:51:25 +03:30
s.esmaeiliandClaude Haiku 5.5 0520aaf1b1 build: rebuild release bundles with new logo
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-14 14:37:52 +03:30
s.esmaeiliandClaude Haiku 5.5 37902e8bff feat: replace brand logo across apps and icons
اپ: لوگوی تازه‌ی برند در صفحه‌ی اصلی، لودر و صفحه‌ی ورود نمایش داده می‌شود.
پنل: لوگوی تازه‌ی برند در ورود، منو و کامنت‌ها نمایش داده می‌شود.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-14 14:34:19 +03:30
s.esmaeiliandClaude Haiku 5.5 c845f6db19 build: rebuild release bundles for build 181
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-14 13:35:35 +03:30
s.esmaeiliandClaude Haiku 5.5 532ceee189 feat: move brand name to one config and redesign the accounting card
اپ: نام برند در همه‌ی صفحه‌ها و پیام‌ها یکسان شده و از یک تنظیم مرکزی خوانده می‌شود.
اپ: کارت حسابداری در صفحه‌ی مشتری بازطراحی شد؛ مانده‌ها و وضعیت لینک واضح‌تر نمایش داده می‌شوند.
پنل: کارت حسابداری در پرونده‌ی مشتری بازطراحی شد؛ مانده‌ها، آخرین ارسال و فرم لینک دستی واضح‌تر شده‌اند.
پنل: ستون «کد» در جدول‌ها به‌طور پیش‌فرض پنهان است و از انتخاب ستون‌ها قابل نمایش است.
پنل: تغییر نمایش ستون‌ها در جدول‌ها بلافاصله اعمال می‌شود.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-14 13:31:20 +03:30
s.esmaeiliandClaude Haiku 5.5 5d2a1efb0c build(api): rebuild release bundle with baseline-first migration fix
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-14 10:46:15 +03:30
s.esmaeiliandClaude Haiku 5.5 e7c9b7238f fix(api): run baseline migration first so an empty database boots
Migrations were applied in plain name order, so 0002_admin_schema.sql ran
before 20260910113720_first and failed with relation "City" does not exist.
sortMigrations now always puts the baseline first; existing databases are
unaffected because their applied names are unchanged.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-14 10:45:30 +03:30
M.Lotfi 2a33c0f290 Merge remote-tracking branch 'origin/design/login-restore' 2026-10-14 10:19:27 +03:30
M.Lotfi 3f033071f7 Fix some for docker 2026-10-14 08:48:15 +03:30
961 changed files with 21864 additions and 35365 deletions
+17 -2
View File
@@ -3,7 +3,8 @@ POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=goldbank
# Host port exposed for PostgreSQL (used by docker-compose db service)
# Host port for PostgreSQL. Each copy of this stack on the same machine
# must use a different port (the apps talk to hostname "db", not this port).
EXTERNAL_DB_PORT=5432
# Prisma connection string (inside Docker network use hostname "db")
@@ -18,7 +19,9 @@ DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGR
# ---------------------------------------------------------------------------
API_PORT=3000
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
# API Configuration (kept for any tooling that still reads bare PORT)
@@ -84,6 +87,8 @@ IAM_POST_LOGOUT_REDIRECT_URI=
# مقصدهای مجاز خروج اپ کاربر، با کاما. باید عیناً در post_logout کلاینت باشند.
IAM_ALLOWED_RETURN_URLS=
# پنل ادمین. خالی یعنی بررسی بی‌صدای ورود در پنل انجام نمی‌شود.
# IAM_ADMIN_BROWSER_RETURN_URL را خالی نگذارید اگر IAM_BROWSER_RETURN_URL
# (اپ کاربر) پر است — وگرنه بعد از ورود ادمین مرورگر به اپ کاربر می‌افتد.
IAM_ADMIN_REDIRECT_URI=
IAM_ADMIN_REDIRECT_URIS=
IAM_ADMIN_BROWSER_RETURN_URL=
@@ -161,3 +166,13 @@ PROFILE_ADMIN_MOBILES=
# Api/ApiMobileController::setOrder:740-743). Blank means nobody is notified —
# the order, the customer's SMS and the sales expert's SMS still go through.
ORDER_ADMIN_MOBILES=
# ---------------------------------------------------------------------------
# Brand
# ---------------------------------------------------------------------------
# The name at the top of every SMS («تهران تاج\n…») and the site link in the
# welcome SMS. Blank = the defaults in apps/api/src/common/brand.ts. The
# frontends take their brand from the repo-root brand.ts instead; the full
# rebrand checklist is docs/BRANDING.md.
BRAND_NAME=
BRAND_SITE_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):
API 3000, admin-panel 5180, user-app 5181, user-app-v2 5182.
API 3000, admin-panel 5180, user-app-v2 5182.
### Build
@@ -263,8 +263,8 @@ docker compose up -d --build
> 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**.
Services: `db` (Postgres 15), `api` (port 3000), `admin-panel`, `user-app`,
`user-app-v2` (each nginx on port 80). The apps expose no host ports —
Services: `db` (Postgres 15), `api` (port 3000), `admin-panel`,
`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`
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
**as** them — a session-hijack primitive.
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
read-only summary instead.
order's weights and prices from client-sent values. **Since 2026-10-29 it is
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
+20 -5
View File
@@ -8,7 +8,7 @@ Dokploy only builds thin images that copy those files (no `pnpm install` on the
```bash
pnpm install
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 push
```
@@ -19,8 +19,7 @@ What this produces:
|---|---|---|
| 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` |
| User | `apps/user-app/dist/` | `docker.arvancloud.ir/nginx:latest` |
| User v2 | `apps/user-app-v2/dist/` | `docker.arvancloud.ir/nginx:latest` |
| User | `apps/user-app-v2/dist/` | `docker.arvancloud.ir/nginx:latest` |
## Dokploy Environment
@@ -33,13 +32,29 @@ DATABASE_URL=postgresql://goldbank:...@db:5432/goldbank?schema=public
PORT=3000
```
A second copy on the **same server** is a separate Dokploy application (its own
domains, passwords, and `JWT_SECRET`). Do not set `container_name` in this file:
those names are global in Docker, and a fixed `goldbank_db` collides with the
first copy. Give the second app its own `EXTERNAL_DB_PORT` (for example `5434`
if `5433` is already taken). Volumes stay separate because Dokploy uses a
different Compose project name for each application.
## 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 |
|---|---|---|
| `admin-panel` | admin.example.com | **80** |
| `user-app` | app.example.com | **80** |
| `user-app-v2` | app-v2.example.com | **80** |
| `user-app-v2` | app.example.com | **80** |
| `api` | (optional) | **3000** |
Frontends call `/api` on their own domain; nginx proxies to `api:3000`.
@@ -1 +1 @@
import{c as O,I as x,d as B,v as j,x as m,o as C,a as A,w as v,f as $,t as E,h as P,i as L,l as u,a7 as y,M as b,B as M,r as N}from"./index-CJkJkMFX.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=B({__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("، "):"";j(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])=>y("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:y("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:v(()=>[O(P(d))]),default:v(()=>[$(" سینک با "+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-CWLQwHa7.js";import"./index-CJkJkMFX.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-DJoKJ02i.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
@@ -1 +0,0 @@
import{_ as o}from"./AddBranches.vue_vue_type_script_setup_true_lang-X9erv2LY.js";import"./index-CJkJkMFX.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.js";export{o as default};
+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};
@@ -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 +0,0 @@
import{d as T,v as q,x as c,a as v,w as l,h as R,j as H,l as S,y as j,r as i,o as p,n as C,c as n,b as O,e as $,f as g,t as M,F as N,G as I,B as V,k as J}from"./index-CJkJkMFX.js";import{_ as K}from"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.js";const P={class:"grid-2"},Q={class:"grid-2"},Y=T({__name:"AddBranches",props:{open:{type:Boolean},id:{}},emits:["update:open","success"],setup(h,{emit:z}){const y=h,w=z,f=y.open!==void 0,E=H(),F=J(),r=f?y.id:E.params.id,m=S(!1),_=S([]),t=j({name:"",phone:"",address:"",user_id:void 0}),d=j({});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),V.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){V.error(((e=(s=o==null?void 0:o.response)==null?void 0:s.data)==null?void 0:e.message)??"خطا در ثبت اطلاعات.")}finally{m.value=!1}}return q(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"),L=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(()=>[C("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),O(N,null,$(_.value,a=>(p(),v(U,{key:a.id,value:a.id},{default:l(()=>[g(M(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(L,{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(()=>[C("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),O(N,null,$(_.value,a=>(p(),v(U,{key:a.id,value:a.id},{default:l(()=>[g(M(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 _};
+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
@@ -0,0 +1 @@
b[data-v-09902473]{font-weight:500}.kind-picker[data-v-09902473]{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-bottom:20px}.kind-card[data-v-09902473]{position:relative;display:flex;align-items:center;gap:12px;padding:14px 16px;border:1.5px solid #eef0f5;border-radius:16px;background:#fff;text-align:start;cursor:pointer;font:inherit;transition:border-color .2s ease,box-shadow .2s ease,background .2s ease}.kind-card[data-v-09902473]:hover{border-color:#c9d0dd}.kind-card.is-on[data-v-09902473]{border-color:#1c2d56;background:#1c2d5608;box-shadow:0 0 0 3px #1c2d5614}.kind-card__icon[data-v-09902473]{width:42px;height:42px;flex-shrink:0;display:grid;place-items:center;border-radius:12px;font-size:16px;color:#8a94a6;background:#f2f4f7;transition:color .2s ease,background .2s ease}.kind-card.is-on .kind-card__icon[data-v-09902473]{color:#fff;background:#1c2d56}.kind-card__text[data-v-09902473]{display:flex;flex-direction:column;gap:2px;min-width:0}.kind-card__text b[data-v-09902473]{font-size:14px;color:#101828}.kind-card__text small[data-v-09902473]{font-size:12px;color:#8a94a6}.kind-card__check[data-v-09902473]{margin-inline-start:auto;font-size:16px;color:#1c2d56}@media (max-width: 575px){.kind-picker[data-v-09902473]{grid-template-columns:minmax(0,1fr);gap:8px;margin-bottom:12px}.kind-card[data-v-09902473]{padding:10px 12px}.kind-card__icon[data-v-09902473]{width:36px;height:36px;font-size:16px}}
-1
View File
@@ -1 +0,0 @@
b[data-v-dbdf9683]{font-weight:500}.kind-picker[data-v-dbdf9683]{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-bottom:20px}.kind-card[data-v-dbdf9683]{position:relative;display:flex;align-items:center;gap:12px;padding:14px 16px;border:1.5px solid #eef0f5;border-radius:16px;background:#fff;text-align:start;cursor:pointer;font:inherit;transition:border-color .2s ease,box-shadow .2s ease,background .2s ease}.kind-card[data-v-dbdf9683]:hover{border-color:#c9d0dd}.kind-card.is-on[data-v-dbdf9683]{border-color:#1c2d56;background:#1c2d5608;box-shadow:0 0 0 3px #1c2d5614}.kind-card__icon[data-v-dbdf9683]{width:42px;height:42px;flex-shrink:0;display:grid;place-items:center;border-radius:12px;font-size:16px;color:#8a94a6;background:#f2f4f7;transition:color .2s ease,background .2s ease}.kind-card.is-on .kind-card__icon[data-v-dbdf9683]{color:#fff;background:#1c2d56}.kind-card__text[data-v-dbdf9683]{display:flex;flex-direction:column;gap:2px;min-width:0}.kind-card__text b[data-v-dbdf9683]{font-size:14px;color:#101828}.kind-card__text small[data-v-dbdf9683]{font-size:12px;color:#8a94a6}.kind-card__check[data-v-dbdf9683]{margin-inline-start:auto;font-size:16px;color:#1c2d56}@media (max-width: 575px){.kind-picker[data-v-dbdf9683]{grid-template-columns:minmax(0,1fr);gap:8px;margin-bottom:12px}.kind-card[data-v-dbdf9683]{padding:10px 12px}.kind-card__icon[data-v-dbdf9683]{width:36px;height:36px;font-size:16px}}
-1
View File
@@ -1 +0,0 @@
import{c as h,I as w,d as P,u as x,l as z,b as l,n,w as B,F as v,e as I,a as u,g as k,i as p,aa as A,j as R,q as j,r as F,o as c,h as b,P as H,k as V,p as M,t as y,K as N,_ as D}from"./index-CJkJkMFX.js";import{_ as U}from"./bulkCustomer.vue_vue_type_script_setup_true_lang-Oqr_La0l.js";import{R as $}from"./ReagentCustomer-DWOpEaGE.js";import{S as q}from"./singleCustomer-Bl29UTYy.js";import{S as E}from"./ShopOutlined-CLnJ_zq6.js";import{U as L}from"./UserOutlined-B6p2SzcN.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-DJoKJ02i.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-C-XoiP-s.js";import"./DateInput-Bd3GkdF5.js";import"./index-CcPs5_14.js";import"./PercentageOutlined-BDHjAjTy.js";import"./SafetyCertificateOutlined-Dpqr0GGL.js";import"./CameraOutlined-DaIK8Qbh.js";var T={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){G(r,s,t[s])})}return r}function G(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:T}),null)};_.displayName="IdcardOutlined";_.inheritAttrs=!1;const J={id:"page-user-view",class:"pf-page"},K={class:"pf-head"},Q={class:"kind-picker",role:"tablist"},W=["aria-selected","onClick"],X={class:"kind-card__icon"},Y={class:"kind-card__text"},Z=P({__name:"AddCustomer",setup(r){const e=R(),t=V(),o=x(),s=z(e.query.tab||"omde"),d=i=>!!o.hasPermission(i),m=j(()=>{const i=[];return d("persons.create.client")&&i.push({key:"omde",title:"مشتری عمده",hint:"مغازه‌دار، بنکدار و خریدار عمده",icon:E}),d("persons.create.seller")&&i.push({key:"reagent",title:"کارشناس فروش",hint:"کارشناس با کمیسیون و سقف اعتبار",icon:_}),o.isSuperAdmin&&i.push({key:"tak",title:"مشتری تک",hint:"مشتری خرده‌فروشی حضوری",icon:L}),i}),O={omde:U,reagent:$,tak:q};function C(){window.history.length>1?t.back():t.push("/customer/omde-list")}return(i,f)=>{const S=F("a-button");return c(),l("div",J,[n("header",K,[h(S,{class:"pf-head__back",shape:"circle",onClick:C},{icon:B(()=>[h(b(H))]),_:1}),f[0]||(f[0]=n("div",{class:"pf-head__text"},[n("h1",null,"افزودن شخص"),n("p",null,"نوع شخص را انتخاب و اطلاعات او را تکمیل کنید.")],-1))]),d("persons.create")&&m.value.length?(c(),l(v,{key:0},[n("div",Q,[(c(!0),l(v,null,I(m.value,a=>(c(),l("button",{key:a.key,type:"button",role:"tab",class:M(["kind-card",{"is-on":s.value===a.key}]),"aria-selected":s.value===a.key,onClick:ee=>s.value=a.key},[n("span",X,[(c(),u(k(a.icon)))]),n("span",Y,[n("b",null,y(a.title),1),n("small",null,y(a.hint),1)]),s.value===a.key?(c(),u(b(N),{key:0,class:"kind-card__check"})):p("",!0)],10,W))),128))]),(c(),u(A,null,[m.value.some(a=>a.key===s.value)?(c(),u(k(O[s.value]),{key:s.value})):p("",!0)],1024))],64)):p("",!0)])}}}),_e=D(Z,[["__scopeId","data-v-dbdf9683"]]);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-8Mvjpt5a.js";import"./index-CJkJkMFX.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.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 +0,0 @@
import{d as O,v as S,x as v,a as b,w as n,h as g,j as V,l as z,y,r as p,o as U,n as x,c as o,f as A,G as E,B as c,k as G}from"./index-CJkJkMFX.js";import{_ as T}from"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.js";const W={class:"grid-3"},q={class:"grid-3"},H=O({__name:"AddWorkshop",props:{open:{type:Boolean},id:{}},emits:["update:open","success"],setup(f,{emit:B}){const h=f,w=B,_=h.open!==void 0,R=V(),j=G(),d=_?h.id:R.params.id,i=z(!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)):j.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 S(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"),C=p("a-button"),$=p("a-card"),M=p("a-form"),N=p("a-spin");return _?(U(),b(T,{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",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[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(N,{key:1,spinning:i.value},{default:n(()=>[o(M,{layout:"vertical",onSubmit:E(m,["prevent"])},{default:n(()=>[o($,{title:g(d)?"ویرایش کارگاه":"افزودن کارگاه",class:"mb-base page-card"},{default:n(()=>[x("div",q,[o(r,{label:"نام کارگاه","validate-status":u.workshop_name?"error":"",help:u.workshop_name},{default:n(()=>[o(l,{value:e.workshop_name,"onUpdate:value":a[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(C,{type:"primary",class:"form-submit",onClick:m},{default:n(()=>[...a[13]||(a[13]=[A("ثبت اطلاعات",-1)])]),_:1})]),_:1},8,["title"])]),_:1})]),_:1},8,["spinning"]))}}});export{H as _};
@@ -0,0 +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,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
View File
@@ -0,0 +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-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
View File
@@ -1 +0,0 @@
import{d as D,v as S,x as A,a as b,w as a,j as F,l as y,r as d,o as i,c as l,f as o,t as s,n as E,b as p,F as f,h as I,i as k,_ as M}from"./index-CJkJkMFX.js";import{j}from"./filters-Bg3NuEZs.js";import"./index-CcPs5_14.js";const R={class:"stats mt-4"},T=D({__name:"AgentDetail",setup($){const h=F().params.id,m=y(!1),n=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/${h}`);n.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[o(s(((e=n.value)==null?void 0:e.name)??"-"),1)]}),_:1}),l(c,{label:"موبایل"},{default:a(()=>{var e;return[o(s(((e=n.value)==null?void 0:e.mobile)??"-"),1)]}),_:1}),l(c,{label:"شعبه"},{default:a(()=>{var e,t;return[o(s(((t=(e=n.value)==null?void 0:e.branch)==null?void 0:t.name)??"-"),1)]}),_:1}),l(c,{label:"درصد کمیسیون"},{default:a(()=>{var e;return[o(s(((e=n.value)==null?void 0:e.percent)??"-"),1)]}),_:1}),l(c,{label:"وضعیت"},{default:a(()=>{var e;return[l(u,{color:((e=n.value)==null?void 0:e.active)===1?"green":"red"},{default:a(()=>{var t;return[o(s(((t=n.value)==null?void 0:t.active)===1?"فعال":"غیر فعال"),1)]}),_:1},8,["color"])]}),_:1}),l(c,{label:"میزان فروش (گرم)"},{default:a(()=>{var e;return[o(s(((e=n.value)==null?void 0:e.grams_sell)??0),1)]}),_:1})]),_:1}),E("div",R,[l(u,{color:"blue"},{default:a(()=>{var e,t;return[o("مشتریان معرفی‌شده: "+s(((t=(e=n.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[o("سفارش‌های ثبت‌شده: "+s(((t=(e=n.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=n.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(()=>[o(s(r.active===1?"فعال":"غیر فعال"),1)]),_:2},1032,["color"])):t.dataIndex==="city"?(i(),p(f,{key:1},[o(s(((g=r.city)==null?void 0:g.title)??"-"),1)],64)):t.dataIndex==="caj"?(i(),p(f,{key:2},[o(s(I(j)(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=n.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},[o(s(I(j)(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-CJkJkMFX.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
@@ -1 +0,0 @@
import{b as m,O as e,a as i}from"./omdeListModel-DAVtaYo3.js";import{d as p,a,h as t,o as s}from"./index-CJkJkMFX.js";import"./model-Dhlo-7J6.js";import"./filters-Bg3NuEZs.js";import"./index-CcPs5_14.js";import"./SettingOutlined-M4ZHugxj.js";import"./ListPageHeader.vue_vue_type_script_setup_true_lang-Df3Sf6qU.js";import"./AccountingSyncButton.vue_vue_type_script_setup_true_lang-D0sRb0mO.js";import"./bulkCustomer.vue_vue_type_script_setup_true_lang-Oqr_La0l.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-DJoKJ02i.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-C-XoiP-s.js";import"./DateInput-Bd3GkdF5.js";import"./UserOutlined-B6p2SzcN.js";import"./ShopOutlined-CLnJ_zq6.js";import"./PercentageOutlined-BDHjAjTy.js";import"./SafetyCertificateOutlined-Dpqr0GGL.js";import"./UnorderedListOutlined-BzWwCg94.js";const g=p({__name:"BankerList",setup(n){const o=e.banker.title,r=m("banker");return(l,c)=>(s(),a(i,{title:t(o),model:t(r)},null,8,["title","model"]))}});export{g as default};
+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 +1 @@
import{d as r,a as g,w as a,r as o,o as k,c as i,a6 as w}from"./index-CJkJkMFX.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-CJkJkMFX.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,v as S,x as u,b as m,c as o,w as l,l as _,r as s,y as T,o as d,n as $,F as w,e as C,f as g,B as D,M as k,a as x,t as B}from"./index-CJkJkMFX.js";const E={id:"page-user-list"},j={class:"grid-3"},A=P({__name:"ChangePercent",setup(q){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 v(){try{const{data:t}=await u.post("change/percent/count",{category_id:a.category_id,brand_id:a.brand_id});p.value=t.count}catch(t){console.log("e ==> ",t)}}async function L(){if(a.percent===void 0||a.percent===null){D.error("لطفا اجرت درصدی را وارد کنید");return}try{f.value=!0;const{data:t}=await u.post("change/all",{percent:a.percent,category_id:a.category_id,brand_id:a.brand_id});k.success({title:"تغییرات با موفقیت اعمال شد",okText:"بستن"}),p.value=t.updated}catch(t){k.success({title:"خطا در اعمال تغییرات"}),console.log(t)}finally{f.value=!1}}return S(async()=>{try{const[t,e]=await Promise.all([u.get("brand"),u.post("category")]);y.value=t.data,b.value=(e.data.rows??e.data).map(r=>({id:r.id,title:r.type_str?`${r.title} (${r.type_str}) `:r.title}))}catch(t){console.log(t)}v()}),(t,e)=>{const r=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(),m("div",E,[o(O,{title:"تغییر درصد محصولات",class:"page-card"},{default:l(()=>[o(F,{layout:"vertical"},{default:l(()=>[$("div",j,[o(i,{label:"دسته بندی"},{default:l(()=>[o(c,{value:a.category_id,"onUpdate:value":e[0]||(e[0]=n=>a.category_id=n),"allow-clear":"","show-search":"",placeholder:"انتخاب کنید","filter-option":h,onChange:v},{default:l(()=>[(d(!0),m(w,null,C(b.value,n=>(d(),x(r,{key:n.id,value:n.id},{default:l(()=>[g(B(n.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),o(i,{label:"برند"},{default:l(()=>[o(c,{value:a.brand_id,"onUpdate:value":e[1]||(e[1]=n=>a.brand_id=n),"allow-clear":"","show-search":"",placeholder:"انتخاب کنید","filter-option":h,onChange:v},{default:l(()=>[(d(!0),m(w,null,C(y.value,n=>(d(),x(r,{key:n.id,value:n.id},{default:l(()=>[g(B(n.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),o(i,{label:"تعداد یافت شده"},{default:l(()=>[o(M,{value:p.value,disabled:""},null,8,["value"])]),_:1}),o(i,{label:"اجرت درصدی"},{default:l(()=>[o(N,{value:a.percent,"onUpdate:value":e[2]||(e[2]=n=>a.percent=n),class:"w-full",step:.1},null,8,["value"])]),_:1})]),o(V,{title:"آیا از اعمال تغییرات مطمئن هستید؟","ok-text":"بله","cancel-text":"خیر",onConfirm:L},{default:l(()=>[o(U,{type:"primary",class:"form-submit",loading:f.value},{default:l(()=>[...e[3]||(e[3]=[g("اعمال تغییرات",-1)])]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1})])}}});export{A 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,q as w,r as k}from"./index-CJkJkMFX.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 _};
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
.mr-3[data-v-e1f6f0e2]{margin-left:.75rem}.comments-list ul[data-v-e1f6f0e2]{list-style:none;padding-right:0}.comment-item[data-v-e1f6f0e2]{display:flex;gap:1rem;flex-wrap:wrap;margin-bottom:1rem}.comment-item .img[data-v-e1f6f0e2]{width:65px;height:65px;display:flex;align-items:center;justify-content:center}.comment-body[data-v-e1f6f0e2]{flex:1;min-width:240px}.comment-body .time[data-v-e1f6f0e2]{font-size:12px;color:#888}.border[data-v-e1f6f0e2]{border:1px solid grey;border-radius:50%}@media (max-width: 575px){.comment-item[data-v-e1f6f0e2]{gap:10px;flex-wrap:nowrap;margin-bottom:12px}.comment-item .img[data-v-e1f6f0e2]{width:40px;height:40px;flex-shrink:0}.comment-body[data-v-e1f6f0e2]{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
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
.row[data-v-e791ba95]{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}.tags[data-v-e791ba95]{display:flex;gap:.5rem;flex-wrap:wrap}.slide[data-v-e791ba95]{border:1px solid #f0f0f0;border-radius:6px;padding:.75rem;margin-bottom:.75rem}.mobile-c[data-v-e791ba95]{margin:0 0 .5rem}.mt-4[data-v-e791ba95]{margin-top:1rem}@media (max-width: 575px){.row>.ant-input[data-v-e791ba95]{flex:1 1 140px;max-width:none!important}.slide[data-v-e791ba95]{padding:10px}.slide .row[data-v-e791ba95]>*{flex:1 1 100%}.mt-4[data-v-e791ba95]{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}}
@@ -1 +1 @@
import{c as u,I as l}from"./index-CJkJkMFX.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};
@@ -1 +0,0 @@
.mt-4[data-v-3185cd59]{margin-top:1rem}.mt-2[data-v-3185cd59]{margin-top:.5rem}.ms-2[data-v-3185cd59]{margin-inline-start:.5rem}.muted[data-v-3185cd59]{color:#888}.small[data-v-3185cd59]{font-size:12px}.warn[data-v-3185cd59]{color:#d4380d}.debt[data-v-3185cd59]{color:#cf1322}.credit[data-v-3185cd59]{color:#389e0d}.stats[data-v-445a9145]{display:flex;flex-wrap:wrap;gap:.5rem}.mt-4[data-v-445a9145]{margin-top:1rem}@media (max-width: 575px){.mt-4[data-v-445a9145]{margin-top:12px}.stats[data-v-445a9145] .ant-tag{margin:0}.detail-tabs[data-v-445a9145] .ant-tabs-nav{margin-bottom:8px}.detail-tabs[data-v-445a9145] .ant-table-content{overflow-x:auto}.detail-tabs[data-v-445a9145] .ant-table-content>table{min-width:max-content}}
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
View File
@@ -0,0 +1 @@
.hint[data-v-3863c3bc]{color:#ea5455;font-size:11px}
-1
View File
@@ -1 +0,0 @@
.hint[data-v-42b77d70]{color:#ea5455;font-size:11px}
@@ -1 +1 @@
import{m}from"./index-CcPs5_14.js";import{d as _,m as V,o as r,a as Y,w as h,c as D,b,t as j,i as M,l as d,q as x,r as i,_ as y}from"./index-CJkJkMFX.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,u=p,t=d(void 0),a=d(""),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="",u("update:modelValue",void 0);return}const c=e.replace(/[۰-۹]/g,s=>String("۰۱۲۳۴۵۶۷۸۹".indexOf(s))),l=m(c,"jYYYY/jMM/jDD");l.isValid()?(a.value="",u("update:modelValue",l.format("YYYY-MM-DD"))):a.value="تاریخ معتبر نیست"}return(e,c)=>{const l=i("a-input"),s=i("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-42b77d70"]]);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
@@ -1 +0,0 @@
import{_ as o}from"./Add.vue_vue_type_script_setup_true_lang-CWLQwHa7.js";import{d as t,a as e,o as r}from"./index-CJkJkMFX.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-DJoKJ02i.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"./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
@@ -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-X9erv2LY.js";import{d as o,a,o as r}from"./index-CJkJkMFX.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.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-Oqr_La0l.js";import{d as r,a as t,o as m}from"./index-CJkJkMFX.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-DJoKJ02i.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-C-XoiP-s.js";import"./DateInput-Bd3GkdF5.js";import"./index-CcPs5_14.js";import"./UserOutlined-B6p2SzcN.js";import"./ShopOutlined-CLnJ_zq6.js";import"./PercentageOutlined-BDHjAjTy.js";import"./SafetyCertificateOutlined-Dpqr0GGL.js";const x=r({__name:"EditBulkCustomer",setup(p){return(a,e)=>(m(),t(o,{class:"page-card"}))}});export{x 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-DB3DcjKd.js";import{d as t,a as r,o as e}from"./index-CJkJkMFX.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.js";import"./model-Dhlo-7J6.js";import"./filters-Bg3NuEZs.js";import"./index-CcPs5_14.js";import"./SettingOutlined-M4ZHugxj.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
@@ -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 e from"./AddProduct-B0xAXjAX.js";import{d as o,b as t,c as r,o as c}from"./index-CJkJkMFX.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-DJoKJ02i.js";import"./AppstoreOutlined-rx9lO6v2.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-DWOpEaGE.js";import{d as o,a as e,o as r}from"./index-CJkJkMFX.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-C-XoiP-s.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-DJoKJ02i.js";import"./UserOutlined-B6p2SzcN.js";import"./ShopOutlined-CLnJ_zq6.js";import"./CameraOutlined-DaIK8Qbh.js";import"./PercentageOutlined-BDHjAjTy.js";const l=o({__name:"EditReagent",setup(a){return(p,m)=>(r(),e(t,{class:"page-card"}))}});export{l 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};
@@ -1 +0,0 @@
import{S as o}from"./singleCustomer-Bl29UTYy.js";import{d as r,a as e,o as t}from"./index-CJkJkMFX.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-C-XoiP-s.js";import"./DateInput-Bd3GkdF5.js";import"./index-CcPs5_14.js";import"./UserOutlined-B6p2SzcN.js";const u=r({__name:"EditSingleCustomer",setup(a){return(m,p)=>(t(),e(o,{class:"page-card"}))}});export{u 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
View File
@@ -1 +0,0 @@
import{_ as o}from"./AddWorkshop.vue_vue_type_script_setup_true_lang-8Mvjpt5a.js";import{d as e,a as r,o as t}from"./index-CJkJkMFX.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.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};
@@ -0,0 +1 @@
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
View File
@@ -1 +0,0 @@
.full-page-msg[data-v-4851d61e]{min-height:100vh;display:flex;align-items:center;justify-content:center}
+1
View File
@@ -0,0 +1 @@
.full-page-msg[data-v-82a95474]{min-height:100vh;display:flex;align-items:center;justify-content:center}
-1
View File
@@ -1 +0,0 @@
import{_,b as c,c as e,w as o,f as l,r as s,o as u}from"./index-CJkJkMFX.js";const p={},d={class:"full-page-msg"};function i(r,t){const n=s("a-button"),a=s("a-result");return u(),c("div",d,[e(a,{status:"404",title:"صفحه مورد نظر یافت نشد","sub-title":"آدرسی که وارد کرده‌اید وجود ندارد."},{extra:o(()=>[e(n,{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-4851d61e"]]);export{x as default};
+1
View File
@@ -0,0 +1 @@
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
View File
@@ -1 +0,0 @@
.full-page-msg[data-v-abbac884]{min-height:100vh;display:flex;align-items:center;justify-content:center}
+1
View File
@@ -0,0 +1 @@
.full-page-msg[data-v-1080291a]{min-height:100vh;display:flex;align-items:center;justify-content:center}
@@ -1 +1 @@
import{_,b as c,c as e,w as o,f as l,r as s,o as u}from"./index-CJkJkMFX.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 b=_(p,[["render",i],["__scopeId","data-v-abbac884"]]);export{b 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 +0,0 @@
import{d as B,a as i,w as l,r as C,o as s,c as d,a8 as E,n as P,h as u,E as h,V as w,Z as L,a6 as S,l as p,x as V,B as y,k as A}from"./index-CJkJkMFX.js";import{X as I}from"./model-Dhlo-7J6.js";import{_ as N}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-Df3Sf6qU.js";const X={class:"flex gap-2"},Z=B({__name:"FacilityList",props:{title:{},model:{},editPath:{},activePath:{},addRid:{},addLabel:{}},setup(a){const k=a,$=A(),f=p(null),c=p(!1),m=p(void 0);function _(){m.value=void 0,c.value=!0}function b(e){m.value=e,c.value=!0}function g(e){c.value=e}function O(){var e;(e=f.value)==null||e.fetch()}function R(e){$.push(`${k.editPath}/${e}`)}async function x(e){var o,n,r;try{await V.get(`${k.activePath}/${e}`),y.success("تغییرات ثبت شد"),(o=f.value)==null||o.fetch()}catch(t){y.error(((r=(n=t==null?void 0:t.response)==null?void 0:n.data)==null?void 0:r.message)??"خطا در تغییر وضعیت")}}return(e,o)=>{const n=C("a-tooltip"),r=C("a-card");return s(),i(r,{title:a.title,class:"page-card"},{default:l(()=>[d(I,{ref_key:"tbl",ref:f,model:a.model,"mobile-cards":""},E({actions:l(({record:t})=>[P("div",X,[a.addRid?(s(),i(n,{key:0,title:"ویرایش"},{default:l(()=>[d(u(h),{class:"cursor-pointer mx-1 text-primary",onClick:v=>b(t.id)},null,8,["onClick"])]),_:2},1024)):(s(),i(n,{key:1,title:"ویرایش"},{default:l(()=>[d(u(h),{class:"cursor-pointer mx-1 text-primary",onClick:v=>R(t.id)},null,8,["onClick"])]),_:2},1024)),d(n,{title:"وضعیت"},{default:l(()=>[t.is_active?(s(),i(u(w),{key:0,class:"cursor-pointer mx-1 text-success",onClick:v=>x(t.id)},null,8,["onClick"])):(s(),i(u(L),{key:1,class:"cursor-pointer mx-1 text-danger",onClick:v=>x(t.id)},null,8,["onClick"]))]),_:2},1024)])]),_:2},[a.addRid?{name:"add",fn:l(()=>[d(N,{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:m.value,onUpdateOpen:g,onSuccess:O})]),_:3},8,["title"])}}});export{Z as _};
@@ -0,0 +1 @@
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-CJkJkMFX.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,v as c,x as n,b as i,k as m,o as d}from"./index-CJkJkMFX.js";import{u as _}from"./auth-SCFNR-pz.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};
@@ -0,0 +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,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 +0,0 @@
import{d as C,m as N,o as u,b as r,c as m,w as h,a as P,h as R,R as b,n as g,t as q,i as D,l as i,q as I,x as S,B as U,r as f}from"./index-CJkJkMFX.js";const z={class:"image-upload"},E={key:0},F={key:1},L={style:{"margin-top":"8px"}},O=["src"],j=C({__name:"ImageUploadInput",props:{modelValue:{default:null},purpose:{default:void 0},placeholder:{default:"بارگذاری"}},emits:["update:modelValue","ok"],setup(w,{emit:y}){const l=w,p=y,c=i(!1),d=i(!1),v=i(""),o=i([]);N(()=>l.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=I(()=>l.placeholder);async function k({file:e}){var s,n;const a=new FormData;a.append("file",e),l.purpose&&a.append("purpose",l.purpose),c.value=!0;try{const{data:t}=await S.post("file/create",a);p("update:modelValue",t.url),p("ok",t)}catch(t){const _=((n=(s=t==null?void 0:t.response)==null?void 0:s.data)==null?void 0:n.message)??"بارگذاری فایل ناموفق بود";U.error(_)}finally{c.value=!1}}function x(){return p("update:modelValue",null),!0}function B(e){v.value=e.url,d.value=!0}return(e,a)=>{const s=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:B},{default:h(()=>[o.value.length===0?(u(),r("div",E,[c.value?(u(),P(s,{key:0,size:"small"})):(u(),r("div",F,[m(R(b)),g("div",L,q(V.value),1)]))])):D("",!0)]),_:1},8,["file-list"]),m(t,{open:d.value,footer:null,onCancel:a[0]||(a[0]=_=>d.value=!1)},{default:h(()=>[g("img",{src:v.value,style:{width:"100%"},alt:""},null,8,O)]),_:1},8,["open"])])}}});export{j 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-Dhlo-7J6.js";import{_ as E}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-Df3Sf6qU.js";import{_ as D}from"./Add.vue_vue_type_script_setup_true_lang-CWLQwHa7.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,n as w,l as _}from"./index-CJkJkMFX.js";import{u as A}from"./useDeleteHandler-DdDkD9hE.js";import"./filters-Bg3NuEZs.js";import"./index-CcPs5_14.js";import"./SettingOutlined-M4ZHugxj.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-DJoKJ02i.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),l=_(!1),r=_(void 0),{remove:x}=A({onSuccess:()=>{var n;return(n=p.value)==null?void 0:n.fetch()},successMessage:"دسته حذف شد",successType:"info",fallbackErrorMessage:"خطا در حذف دسته"});function C(){r.value=void 0,l.value=!0}function S(n){r.value=n,l.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:r.value??"new",open:l.value,id:r.value,"onUpdate:open":a[0]||(a[0]=e=>l.value=e),onSuccess:a[1]||(a[1]=e=>{var d;return(d=p.value)==null?void 0:d.fetch()})},null,8,["open","id"]))]),_:1})])}}});export{W 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
@@ -1 +0,0 @@
import{_ as m}from"./FacilityList.vue_vue_type_script_setup_true_lang-5xhk1aSU.js";import{_ as c}from"./AddBranches.vue_vue_type_script_setup_true_lang-X9erv2LY.js";import{a as p,b as t}from"./model-Dhlo-7J6.js";import{d as l,a as n,w as f,h as _,o}from"./index-CJkJkMFX.js";import"./ListPageHeader.vue_vue_type_script_setup_true_lang-Df3Sf6qU.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.js";import"./filters-Bg3NuEZs.js";import"./index-CcPs5_14.js";import"./SettingOutlined-M4ZHugxj.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{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-Dhlo-7J6.js";import{_ as h}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-Df3Sf6qU.js";import z from"./AddInvoice-DB3DcjKd.js";import{j as K}from"./filters-Bg3NuEZs.js";import{u as U}from"./useDeleteHandler-DdDkD9hE.js";import{d as H,b as g,c as e,w as t,r as s,o as x,h as p,n as y,O as R,E as q,D as F,f as r,t as u,a as C,l as _,x as G,_ as J}from"./index-CJkJkMFX.js";import"./SettingOutlined-M4ZHugxj.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-Bd3umksm.js";import"./index-CcPs5_14.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=H({__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 D=[{title:"کد محصول",dataIndex:"product_code"},{title:"نام محصول",dataIndex:"title"},{title:"وزن",dataIndex:"grams"}];async function E(c){const{data:o}=await G.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"),O=s("a-popconfirm"),m=s("a-descriptions-item"),T=s("a-descriptions"),j=s("a-table"),A=s("a-empty"),B=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(R),{class:"cursor-pointer mx-1 text-success",onClick:i=>E(a)},null,8,["onClick"])]),_:2},1024),e(k,{title:"ویرایش"},{default:t(()=>[e(p(q),{class:"cursor-pointer mx-1 text-primary",onClick:i=>$(a.id)},null,8,["onClick"])]),_:2},1024),e(k,{title:"حذف"},{default:t(()=>[e(O,{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(F),{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(B,{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(T,{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(j,{class:"mt-4",size:"small","data-source":l.value.products,columns:D,pagination:!1,"row-key":"id"},null,8,["data-source"])])):(x(),C(A,{key:1}))]),_:1},8,["open"]),(x(),C(z,{key:b.value??"new",open:v.value,id:b.value,"onUpdate:open":o[2]||(o[2]=a=>v.value=a),onSuccess:o[3]||(o[3]=a=>{var i;return(i=w.value)==null?void 0:i.fetch()})},null,8,["open","id"]))]),_:1})])}}}),re=J(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,R as C,i as b,r as k}from"./index-CJkJkMFX.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=k("a-button");return!e.rid||n(e.rid)?(u(),m(r,{key:0,type:"primary",onClick:a[0]||(a[0]=y=>t.$emit("add"))},{icon:s(()=>[f(p(C))]),default:s(()=>[c(" "+l(e.addLabel),1)]),_:1})):b("",!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{_};

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