@endora-commerce/mod-quick-order 0.100.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +58 -0
- package/dist/admin/api/quick-order-client.d.ts +76 -0
- package/dist/admin/api/quick-order-client.d.ts.map +1 -0
- package/dist/admin/api/quick-order-client.js +18 -0
- package/dist/admin/api/quick-order-client.js.map +1 -0
- package/dist/admin/components/DefaultPreferencesPanel.d.ts +44 -0
- package/dist/admin/components/DefaultPreferencesPanel.d.ts.map +1 -0
- package/dist/admin/components/DefaultPreferencesPanel.js +107 -0
- package/dist/admin/components/DefaultPreferencesPanel.js.map +1 -0
- package/dist/admin/index.d.ts +48 -0
- package/dist/admin/index.d.ts.map +1 -0
- package/dist/admin/index.js +120 -0
- package/dist/admin/index.js.map +1 -0
- package/dist/admin/pages/QuickOrderOnBehalfPage.d.ts +16 -0
- package/dist/admin/pages/QuickOrderOnBehalfPage.d.ts.map +1 -0
- package/dist/admin/pages/QuickOrderOnBehalfPage.js +85 -0
- package/dist/admin/pages/QuickOrderOnBehalfPage.js.map +1 -0
- package/dist/admin/zones/CustomerDefaults.d.ts +27 -0
- package/dist/admin/zones/CustomerDefaults.d.ts.map +1 -0
- package/dist/admin/zones/CustomerDefaults.js +11 -0
- package/dist/admin/zones/CustomerDefaults.js.map +1 -0
- package/dist/admin/zones/OrderEntryQuickTab.d.ts +21 -0
- package/dist/admin/zones/OrderEntryQuickTab.d.ts.map +1 -0
- package/dist/admin/zones/OrderEntryQuickTab.js +26 -0
- package/dist/admin/zones/OrderEntryQuickTab.js.map +1 -0
- package/dist/admin/zones/OrganizationDefaults.d.ts +30 -0
- package/dist/admin/zones/OrganizationDefaults.d.ts.map +1 -0
- package/dist/admin/zones/OrganizationDefaults.js +11 -0
- package/dist/admin/zones/OrganizationDefaults.js.map +1 -0
- package/dist/backend/entities/quick-order-default-preference.entity.d.ts +22 -0
- package/dist/backend/entities/quick-order-default-preference.entity.d.ts.map +1 -0
- package/dist/backend/entities/quick-order-default-preference.entity.js +76 -0
- package/dist/backend/entities/quick-order-default-preference.entity.js.map +1 -0
- package/dist/backend/index.d.ts +88 -0
- package/dist/backend/index.d.ts.map +1 -0
- package/dist/backend/index.js +235 -0
- package/dist/backend/index.js.map +1 -0
- package/dist/backend/routes.admin.d.ts +35 -0
- package/dist/backend/routes.admin.d.ts.map +1 -0
- package/dist/backend/routes.admin.js +64 -0
- package/dist/backend/routes.admin.js.map +1 -0
- package/dist/backend/routes.d.ts +35 -0
- package/dist/backend/routes.d.ts.map +1 -0
- package/dist/backend/routes.js +77 -0
- package/dist/backend/routes.js.map +1 -0
- package/dist/backend/routes.one-click.d.ts +22 -0
- package/dist/backend/routes.one-click.d.ts.map +1 -0
- package/dist/backend/routes.one-click.js +35 -0
- package/dist/backend/routes.one-click.js.map +1 -0
- package/dist/backend/routes.preferences.admin.d.ts +23 -0
- package/dist/backend/routes.preferences.admin.d.ts.map +1 -0
- package/dist/backend/routes.preferences.admin.js +40 -0
- package/dist/backend/routes.preferences.admin.js.map +1 -0
- package/dist/backend/routes.preferences.d.ts +21 -0
- package/dist/backend/routes.preferences.d.ts.map +1 -0
- package/dist/backend/routes.preferences.js +42 -0
- package/dist/backend/routes.preferences.js.map +1 -0
- package/dist/backend/services/catalog-lookup.d.ts +39 -0
- package/dist/backend/services/catalog-lookup.d.ts.map +1 -0
- package/dist/backend/services/catalog-lookup.js +104 -0
- package/dist/backend/services/catalog-lookup.js.map +1 -0
- package/dist/backend/services/default-preference-authz.d.ts +31 -0
- package/dist/backend/services/default-preference-authz.d.ts.map +1 -0
- package/dist/backend/services/default-preference-authz.js +26 -0
- package/dist/backend/services/default-preference-authz.js.map +1 -0
- package/dist/backend/services/default-preference-resolver.d.ts +28 -0
- package/dist/backend/services/default-preference-resolver.d.ts.map +1 -0
- package/dist/backend/services/default-preference-resolver.js +27 -0
- package/dist/backend/services/default-preference-resolver.js.map +1 -0
- package/dist/backend/services/default-preference-service.d.ts +63 -0
- package/dist/backend/services/default-preference-service.d.ts.map +1 -0
- package/dist/backend/services/default-preference-service.js +176 -0
- package/dist/backend/services/default-preference-service.js.map +1 -0
- package/dist/backend/services/excel-importer.d.ts +11 -0
- package/dist/backend/services/excel-importer.d.ts.map +1 -0
- package/dist/backend/services/excel-importer.js +47 -0
- package/dist/backend/services/excel-importer.js.map +1 -0
- package/dist/backend/services/import-from-request.d.ts +9 -0
- package/dist/backend/services/import-from-request.d.ts.map +1 -0
- package/dist/backend/services/import-from-request.js +17 -0
- package/dist/backend/services/import-from-request.js.map +1 -0
- package/dist/backend/services/import-pipeline.d.ts +89 -0
- package/dist/backend/services/import-pipeline.d.ts.map +1 -0
- package/dist/backend/services/import-pipeline.js +188 -0
- package/dist/backend/services/import-pipeline.js.map +1 -0
- package/dist/backend/services/import-rows.d.ts +43 -0
- package/dist/backend/services/import-rows.d.ts.map +1 -0
- package/dist/backend/services/import-rows.js +102 -0
- package/dist/backend/services/import-rows.js.map +1 -0
- package/dist/backend/services/one-click-service.d.ts +50 -0
- package/dist/backend/services/one-click-service.d.ts.map +1 -0
- package/dist/backend/services/one-click-service.js +83 -0
- package/dist/backend/services/one-click-service.js.map +1 -0
- package/dist/backend/services/quick-order-build-service.d.ts +35 -0
- package/dist/backend/services/quick-order-build-service.d.ts.map +1 -0
- package/dist/backend/services/quick-order-build-service.js +61 -0
- package/dist/backend/services/quick-order-build-service.js.map +1 -0
- package/dist/backend/services/variant-resolver.d.ts +40 -0
- package/dist/backend/services/variant-resolver.d.ts.map +1 -0
- package/dist/backend/services/variant-resolver.js +47 -0
- package/dist/backend/services/variant-resolver.js.map +1 -0
- package/dist/manifest.d.ts +190 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +129 -0
- package/dist/manifest.js.map +1 -0
- package/dist/migrations/20260611T140359_quick_order_default_preferences.d.ts +15 -0
- package/dist/migrations/20260611T140359_quick_order_default_preferences.d.ts.map +1 -0
- package/dist/migrations/20260611T140359_quick_order_default_preferences.js +53 -0
- package/dist/migrations/20260611T140359_quick_order_default_preferences.js.map +1 -0
- package/dist/migrations/index.d.ts +27 -0
- package/dist/migrations/index.d.ts.map +1 -0
- package/dist/migrations/index.js +29 -0
- package/dist/migrations/index.js.map +1 -0
- package/docs/quick_order.md +98 -0
- package/i18n/en.json +47 -0
- package/i18n/pl.json +47 -0
- package/package.json +91 -0
- package/tailwind.css +14 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Migration } from '@mikro-orm/migrations';
|
|
2
|
+
/**
|
|
3
|
+
* Quick-order default ordering preferences (feature 039 — US2).
|
|
4
|
+
*
|
|
5
|
+
* One row per target (`scope` = organization | customer, `scope_id` = its id)
|
|
6
|
+
* holding four nullable default references. A customer row overrides the
|
|
7
|
+
* organization row per field; resolution is in the service. FKs are
|
|
8
|
+
* `ON DELETE SET NULL` so removing a method / address degrades the default to
|
|
9
|
+
* "unset" rather than blocking (FR-020).
|
|
10
|
+
*/
|
|
11
|
+
export class Migration20260611T140359QuickOrderDefaultPreferences extends Migration {
|
|
12
|
+
async up() {
|
|
13
|
+
this.addSql(`
|
|
14
|
+
create table "quick_order_default_preferences" (
|
|
15
|
+
"id" uuid not null,
|
|
16
|
+
"scope" varchar(16) not null,
|
|
17
|
+
"scope_id" uuid not null,
|
|
18
|
+
"default_payment_method_id" uuid null,
|
|
19
|
+
"default_delivery_method_id" uuid null,
|
|
20
|
+
"default_billing_address_id" uuid null,
|
|
21
|
+
"default_shipping_address_id" uuid null,
|
|
22
|
+
"created_at" timestamptz not null,
|
|
23
|
+
"updated_at" timestamptz not null,
|
|
24
|
+
constraint "quick_order_default_preferences_pkey" primary key ("id"),
|
|
25
|
+
constraint "quick_order_default_preferences_scope_check"
|
|
26
|
+
check ("scope" in ('organization', 'customer'))
|
|
27
|
+
);
|
|
28
|
+
`);
|
|
29
|
+
this.addSql(`
|
|
30
|
+
create unique index "quick_order_default_preferences_scope_target_uq"
|
|
31
|
+
on "quick_order_default_preferences" ("scope", "scope_id");
|
|
32
|
+
`);
|
|
33
|
+
this.addSql(`
|
|
34
|
+
create index "quick_order_default_preferences_scope_id_idx"
|
|
35
|
+
on "quick_order_default_preferences" ("scope_id");
|
|
36
|
+
`);
|
|
37
|
+
this.addSql(`
|
|
38
|
+
alter table "quick_order_default_preferences"
|
|
39
|
+
add constraint "qodp_payment_method_fk"
|
|
40
|
+
foreign key ("default_payment_method_id") references "payment_methods" ("id") on delete set null,
|
|
41
|
+
add constraint "qodp_delivery_method_fk"
|
|
42
|
+
foreign key ("default_delivery_method_id") references "delivery_methods" ("id") on delete set null,
|
|
43
|
+
add constraint "qodp_billing_address_fk"
|
|
44
|
+
foreign key ("default_billing_address_id") references "addresses" ("id") on delete set null,
|
|
45
|
+
add constraint "qodp_shipping_address_fk"
|
|
46
|
+
foreign key ("default_shipping_address_id") references "addresses" ("id") on delete set null;
|
|
47
|
+
`);
|
|
48
|
+
}
|
|
49
|
+
async down() {
|
|
50
|
+
this.addSql('drop table if exists "quick_order_default_preferences";');
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=20260611T140359_quick_order_default_preferences.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"20260611T140359_quick_order_default_preferences.js","sourceRoot":"","sources":["../../src/migrations/20260611T140359_quick_order_default_preferences.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD;;;;;;;;GAQG;AACH,MAAM,OAAO,oDAAqD,SAAQ,SAAS;IACxE,KAAK,CAAC,EAAE;QACf,IAAI,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;KAeX,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC;;;KAGX,CAAC,CAAC;QACH,IAAI,CAAC,MAAM,CAAC;;;KAGX,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC;;;;;;;;;;KAUX,CAAC,CAAC;IACL,CAAC;IAEQ,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,MAAM,CAAC,yDAAyD,CAAC,CAAC;IACzE,CAAC;CACF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `./migrations` subpath — every migration class this module owns, as one
|
|
3
|
+
* ordered `migrations` array.
|
|
4
|
+
*
|
|
5
|
+
* The array is what the platform reads when this module is **installed**:
|
|
6
|
+
* `src/packages/package-runtime.ts` takes `exported['migrations']` and refuses
|
|
7
|
+
* the package outright when it is absent (D-168).
|
|
8
|
+
*
|
|
9
|
+
* Listed in ascending timestamp, which is the order of this module's own
|
|
10
|
+
* migrations and of nothing else (feature 081): a manifest `dependencies` array
|
|
11
|
+
* is the only thing ordering this block against another module's.
|
|
12
|
+
*
|
|
13
|
+
* The **named** exports stay beside the array, and the asymmetry with
|
|
14
|
+
* `./backend` — which publishes an array and no named class (D-168) — is
|
|
15
|
+
* deliberate. `db/migrations-registry.generated.ts` imports each class by name
|
|
16
|
+
* from this specifier, and a migration class name is contract in a way an entity
|
|
17
|
+
* class name is not: `mikro_orm_migrations` persists it, so it is a string every
|
|
18
|
+
* already-migrated database holds.
|
|
19
|
+
*
|
|
20
|
+
* A class that is in neither the array nor the barrel is a migration that does
|
|
21
|
+
* not run: `migration:pending` reports nothing pending and the first symptom is
|
|
22
|
+
* a query against a table nobody created.
|
|
23
|
+
*/
|
|
24
|
+
import { Migration20260611T140359QuickOrderDefaultPreferences } from './20260611T140359_quick_order_default_preferences.js';
|
|
25
|
+
export declare const migrations: (typeof Migration20260611T140359QuickOrderDefaultPreferences)[];
|
|
26
|
+
export { Migration20260611T140359QuickOrderDefaultPreferences, };
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,oDAAoD,EAAE,MAAM,sDAAsD,CAAC;AAE5H,eAAO,MAAM,UAAU,iEAEtB,CAAC;AAEF,OAAO,EACL,oDAAoD,GACrD,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `./migrations` subpath — every migration class this module owns, as one
|
|
3
|
+
* ordered `migrations` array.
|
|
4
|
+
*
|
|
5
|
+
* The array is what the platform reads when this module is **installed**:
|
|
6
|
+
* `src/packages/package-runtime.ts` takes `exported['migrations']` and refuses
|
|
7
|
+
* the package outright when it is absent (D-168).
|
|
8
|
+
*
|
|
9
|
+
* Listed in ascending timestamp, which is the order of this module's own
|
|
10
|
+
* migrations and of nothing else (feature 081): a manifest `dependencies` array
|
|
11
|
+
* is the only thing ordering this block against another module's.
|
|
12
|
+
*
|
|
13
|
+
* The **named** exports stay beside the array, and the asymmetry with
|
|
14
|
+
* `./backend` — which publishes an array and no named class (D-168) — is
|
|
15
|
+
* deliberate. `db/migrations-registry.generated.ts` imports each class by name
|
|
16
|
+
* from this specifier, and a migration class name is contract in a way an entity
|
|
17
|
+
* class name is not: `mikro_orm_migrations` persists it, so it is a string every
|
|
18
|
+
* already-migrated database holds.
|
|
19
|
+
*
|
|
20
|
+
* A class that is in neither the array nor the barrel is a migration that does
|
|
21
|
+
* not run: `migration:pending` reports nothing pending and the first symptom is
|
|
22
|
+
* a query against a table nobody created.
|
|
23
|
+
*/
|
|
24
|
+
import { Migration20260611T140359QuickOrderDefaultPreferences } from './20260611T140359_quick_order_default_preferences.js';
|
|
25
|
+
export const migrations = [
|
|
26
|
+
Migration20260611T140359QuickOrderDefaultPreferences,
|
|
27
|
+
];
|
|
28
|
+
export { Migration20260611T140359QuickOrderDefaultPreferences, };
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,oDAAoD,EAAE,MAAM,sDAAsD,CAAC;AAE5H,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,oDAAoD;CACrD,CAAC;AAEF,OAAO,EACL,oDAAoD,GACrD,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: quick_order
|
|
3
|
+
description: CSV-import + type-ahead helpers for buyers ordering by SKU
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# `quick_order`
|
|
7
|
+
|
|
8
|
+
The platform's **quick-ordering toolkit**.
|
|
9
|
+
It bundles several conveniences that let B2B buyers place repeat and
|
|
10
|
+
high-volume orders with the fewest steps, reusing the existing Cart, Quote
|
|
11
|
+
Request, Order/Checkout, Organization, Payment/Shipping method, Catalog, and
|
|
12
|
+
Settings capabilities rather than introducing a parallel ordering engine.
|
|
13
|
+
|
|
14
|
+
## Capabilities
|
|
15
|
+
|
|
16
|
+
### 1. CSV / Excel import → Cart or Quote Request
|
|
17
|
+
|
|
18
|
+
`POST /api/v1/quick-order/import` accepts a pasted CSV (`csv`) **or** an
|
|
19
|
+
uploaded CSV / `.xlsx` file (`file: { filename, contentBase64 }`). Both are
|
|
20
|
+
normalized to the same row model and validated against the catalog:
|
|
21
|
+
|
|
22
|
+
- Required columns `sku` + `quantity` (header row, order-independent,
|
|
23
|
+
case-insensitive). Any other column is treated as a **variant attribute
|
|
24
|
+
value** and resolved against the parent product's variant-axis attributes —
|
|
25
|
+
a row resolves only when exactly one purchasable variant matches.
|
|
26
|
+
- The response partitions rows into `recognized` + `rejected` (each with a
|
|
27
|
+
per-row reason: `sku_missing`, `quantity_invalid`, `product_not_found`,
|
|
28
|
+
`product_archived`, `malformed_row`, `variant_not_resolved`,
|
|
29
|
+
`variant_ambiguous`, `row_limit_exceeded`) plus a `summary`.
|
|
30
|
+
- Duplicate SKUs are merged (quantities summed); rows beyond
|
|
31
|
+
`quick_order.import_max_rows` are rejected.
|
|
32
|
+
|
|
33
|
+
`POST /api/v1/quick-order/build` turns the confirmed recognized rows into a
|
|
34
|
+
**Cart** (`CartService`) or a **Quote Request** (`RfqService`), priced under the
|
|
35
|
+
buyer's / organization's current price list. The admin twins
|
|
36
|
+
(`/api/v1/admin/quick-order/import` + `/build`, guarded by `orders:write`)
|
|
37
|
+
build on behalf of a chosen customer via `onBehalfOf`.
|
|
38
|
+
|
|
39
|
+
`.xlsx` parsing uses **`exceljs`** (backend-only, isolated to
|
|
40
|
+
`excel-importer.ts`); only the first worksheet is read.
|
|
41
|
+
|
|
42
|
+
### 2. Quick search
|
|
43
|
+
|
|
44
|
+
`GET /api/v1/quick-order/search?q=` matches by SKU, product name, and the
|
|
45
|
+
values of attributes flagged **`quick_searchable`** (an independent boolean on
|
|
46
|
+
`product_attributes`, toggled in the admin Attributes manager). Values of
|
|
47
|
+
non-flagged attributes never match. Session-gated; channel-scoped.
|
|
48
|
+
|
|
49
|
+
### 3. Default ordering preferences
|
|
50
|
+
|
|
51
|
+
`quick_order_default_preferences` stores four defaults — payment method,
|
|
52
|
+
delivery method, billing address, shipping address — per target
|
|
53
|
+
(`scope` = `organization` | `customer`). Resolution is most-specific-wins
|
|
54
|
+
(customer overrides organization, per field) with a use-time eligibility
|
|
55
|
+
re-check (active / org-allowed / address exists → otherwise dropped to null).
|
|
56
|
+
|
|
57
|
+
- Storefront: a customer manages their own defaults (`/preferences`); checkout
|
|
58
|
+
pre-selects the resolved defaults.
|
|
59
|
+
- Admin: `/api/v1/admin/quick-order/preferences` — a platform admin manages any
|
|
60
|
+
scope; a salesperson only their assigned organizations and those orgs'
|
|
61
|
+
customers. Every change is audited.
|
|
62
|
+
|
|
63
|
+
### 4. Reorder
|
|
64
|
+
|
|
65
|
+
"Order again" on a past order produces either a new Cart
|
|
66
|
+
(`POST /orders/:id/reorder`) or a new Quote Request
|
|
67
|
+
(`POST /orders/:id/clone-to-quote`) at current prices, reporting unavailable
|
|
68
|
+
lines and respecting the `orders.reorder_enabled` setting.
|
|
69
|
+
|
|
70
|
+
### 5. One-click buy
|
|
71
|
+
|
|
72
|
+
When `quick_order.one_click_buy_enabled` is on for the buyer's sales channel
|
|
73
|
+
**and** the buyer has all four eligible defaults, the product page shows a
|
|
74
|
+
"Buy in one click" button. It skips Cart and Checkout: the order is placed from
|
|
75
|
+
the defaults (`clear cart → add product → OrderService.placeOrder`) and the
|
|
76
|
+
buyer is routed by the payment `nextAction` (gateway redirect, or the order /
|
|
77
|
+
success page when no payment step is required). Same validations as a normal
|
|
78
|
+
order (org active, minimum value, credit limit, stock).
|
|
79
|
+
|
|
80
|
+
## Settings
|
|
81
|
+
|
|
82
|
+
| Code | Type | Default | Scope |
|
|
83
|
+
|------|------|---------|-------|
|
|
84
|
+
| `quick_order.one_click_buy_enabled` | boolean | `false` | per sales channel |
|
|
85
|
+
| `quick_order.import_max_rows` | number | `2000` | global |
|
|
86
|
+
|
|
87
|
+
## Data
|
|
88
|
+
|
|
89
|
+
- New table `quick_order_default_preferences` (migration 057).
|
|
90
|
+
- New column `product_attributes.quick_searchable` (migration 058, catalog).
|
|
91
|
+
|
|
92
|
+
## Dependencies
|
|
93
|
+
|
|
94
|
+
Builds on `orders` (Core ordering engine), `carts`, `quote_requests`,
|
|
95
|
+
`organizations`, `payment_methods`, `delivery_methods`, `catalog`, `addresses`,
|
|
96
|
+
and `settings`. The `orders` module does **not** depend on `quick_order`; the
|
|
97
|
+
one-click flow receives `OrderService` through a lazy getter wired in
|
|
98
|
+
composition.
|
package/i18n/en.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"module.name": "Quick Order",
|
|
3
|
+
"settings.oneClickBuyEnabled.label": "One-click buy enabled",
|
|
4
|
+
"settings.importMaxRows.label": "Import row limit",
|
|
5
|
+
"actions.openQuickOrder.label": "Quick order on behalf",
|
|
6
|
+
"actions.openQuickOrder.description": "Import a CSV or Excel file and build a cart or quote request for a customer",
|
|
7
|
+
"onBehalf.page.title": "Quick order on behalf",
|
|
8
|
+
"onBehalf.page.description": "Import a CSV / Excel file and build a cart or quote request for a customer.",
|
|
9
|
+
"onBehalf.customer.title": "Customer",
|
|
10
|
+
"onBehalf.customer.account": "Customer account",
|
|
11
|
+
"onBehalf.customer.accountPlaceholder": "Search customers by name or email…",
|
|
12
|
+
"onBehalf.customer.accountEmpty": "No matching customers.",
|
|
13
|
+
"onBehalf.customer.organization": "Organization",
|
|
14
|
+
"onBehalf.customer.organizationPlaceholder": "Search organizations…",
|
|
15
|
+
"onBehalf.customer.organizationEmpty": "No organizations found",
|
|
16
|
+
"onBehalf.import.title": "Import",
|
|
17
|
+
"onBehalf.import.dropzone": "Drag a CSV or Excel file here, or click to choose",
|
|
18
|
+
"onBehalf.import.selectedFile": "Selected: {name}",
|
|
19
|
+
"onBehalf.import.pasteLabel": "…or paste CSV",
|
|
20
|
+
"onBehalf.import.preview": "Preview",
|
|
21
|
+
"onBehalf.preview.title": "Preview",
|
|
22
|
+
"onBehalf.preview.summary": "{recognized} recognised, {rejected} rejected",
|
|
23
|
+
"onBehalf.preview.truncated": "truncated",
|
|
24
|
+
"onBehalf.preview.empty": "No rows matched the catalog.",
|
|
25
|
+
"onBehalf.column.line": "Line",
|
|
26
|
+
"onBehalf.column.sku": "SKU",
|
|
27
|
+
"onBehalf.column.variant": "Variant",
|
|
28
|
+
"onBehalf.column.quantity": "Qty",
|
|
29
|
+
"onBehalf.column.reason": "Reason",
|
|
30
|
+
"onBehalf.column.raw": "Raw",
|
|
31
|
+
"onBehalf.action.buildCart": "Build cart",
|
|
32
|
+
"onBehalf.action.buildQuoteRequest": "Build quote request",
|
|
33
|
+
"onBehalf.success.cart": "Cart built: {id}",
|
|
34
|
+
"onBehalf.success.quoteRequest": "Quote request created: {id}",
|
|
35
|
+
"onBehalf.error.import": "Import failed.",
|
|
36
|
+
"onBehalf.error.build": "Build failed.",
|
|
37
|
+
"onBehalf.error.missingCustomer": "Choose a customer account and an organization first.",
|
|
38
|
+
"onBehalf.reason.sku_missing": "SKU missing",
|
|
39
|
+
"onBehalf.reason.quantity_invalid": "Invalid quantity",
|
|
40
|
+
"onBehalf.reason.product_not_found": "Product not found",
|
|
41
|
+
"onBehalf.reason.product_archived": "Product archived",
|
|
42
|
+
"onBehalf.reason.malformed_row": "Malformed row",
|
|
43
|
+
"onBehalf.reason.variant_not_resolved": "Variant not resolved",
|
|
44
|
+
"onBehalf.reason.variant_ambiguous": "Ambiguous variant",
|
|
45
|
+
"onBehalf.reason.row_limit_exceeded": "Row limit exceeded",
|
|
46
|
+
"orderEntry.tab.quick": "Quick order"
|
|
47
|
+
}
|
package/i18n/pl.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"module.name": "Szybkie zamówienia",
|
|
3
|
+
"settings.oneClickBuyEnabled.label": "Zakup jednym kliknięciem włączony",
|
|
4
|
+
"settings.importMaxRows.label": "Limit wierszy importu",
|
|
5
|
+
"actions.openQuickOrder.label": "Szybkie zamówienie w imieniu klienta",
|
|
6
|
+
"actions.openQuickOrder.description": "Zaimportuj plik CSV lub Excel i zbuduj koszyk albo zapytanie ofertowe dla klienta",
|
|
7
|
+
"onBehalf.page.title": "Szybkie zamówienie w imieniu klienta",
|
|
8
|
+
"onBehalf.page.description": "Zaimportuj plik CSV / Excel i zbuduj koszyk albo zapytanie ofertowe dla klienta.",
|
|
9
|
+
"onBehalf.customer.title": "Klient",
|
|
10
|
+
"onBehalf.customer.account": "Konto klienta",
|
|
11
|
+
"onBehalf.customer.accountPlaceholder": "Szukaj klientów po nazwie lub adresie e-mail…",
|
|
12
|
+
"onBehalf.customer.accountEmpty": "Brak pasujących klientów.",
|
|
13
|
+
"onBehalf.customer.organization": "Organizacja",
|
|
14
|
+
"onBehalf.customer.organizationPlaceholder": "Szukaj organizacji…",
|
|
15
|
+
"onBehalf.customer.organizationEmpty": "Nie znaleziono organizacji",
|
|
16
|
+
"onBehalf.import.title": "Import",
|
|
17
|
+
"onBehalf.import.dropzone": "Przeciągnij tutaj plik CSV lub Excel albo kliknij, aby wybrać",
|
|
18
|
+
"onBehalf.import.selectedFile": "Wybrano: {name}",
|
|
19
|
+
"onBehalf.import.pasteLabel": "…lub wklej CSV",
|
|
20
|
+
"onBehalf.import.preview": "Podgląd",
|
|
21
|
+
"onBehalf.preview.title": "Podgląd",
|
|
22
|
+
"onBehalf.preview.summary": "rozpoznano: {recognized}, odrzucono: {rejected}",
|
|
23
|
+
"onBehalf.preview.truncated": "przycięto",
|
|
24
|
+
"onBehalf.preview.empty": "Żaden wiersz nie pasuje do katalogu.",
|
|
25
|
+
"onBehalf.column.line": "Wiersz",
|
|
26
|
+
"onBehalf.column.sku": "SKU",
|
|
27
|
+
"onBehalf.column.variant": "Wariant",
|
|
28
|
+
"onBehalf.column.quantity": "Ilość",
|
|
29
|
+
"onBehalf.column.reason": "Powód",
|
|
30
|
+
"onBehalf.column.raw": "Dane źródłowe",
|
|
31
|
+
"onBehalf.action.buildCart": "Zbuduj koszyk",
|
|
32
|
+
"onBehalf.action.buildQuoteRequest": "Zbuduj zapytanie ofertowe",
|
|
33
|
+
"onBehalf.success.cart": "Koszyk zbudowany: {id}",
|
|
34
|
+
"onBehalf.success.quoteRequest": "Zapytanie ofertowe utworzone: {id}",
|
|
35
|
+
"onBehalf.error.import": "Import nie powiódł się.",
|
|
36
|
+
"onBehalf.error.build": "Budowanie nie powiodło się.",
|
|
37
|
+
"onBehalf.error.missingCustomer": "Najpierw wybierz konto klienta i organizację.",
|
|
38
|
+
"onBehalf.reason.sku_missing": "Brak SKU",
|
|
39
|
+
"onBehalf.reason.quantity_invalid": "Nieprawidłowa ilość",
|
|
40
|
+
"onBehalf.reason.product_not_found": "Nie znaleziono produktu",
|
|
41
|
+
"onBehalf.reason.product_archived": "Produkt zarchiwizowany",
|
|
42
|
+
"onBehalf.reason.malformed_row": "Nieprawidłowy wiersz",
|
|
43
|
+
"onBehalf.reason.variant_not_resolved": "Nie rozpoznano wariantu",
|
|
44
|
+
"onBehalf.reason.variant_ambiguous": "Niejednoznaczny wariant",
|
|
45
|
+
"onBehalf.reason.row_limit_exceeded": "Przekroczono limit wierszy",
|
|
46
|
+
"orderEntry.tab.quick": "Szybkie zamówienie"
|
|
47
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@endora-commerce/mod-quick-order",
|
|
3
|
+
"version": "0.100.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"sideEffects": false,
|
|
6
|
+
"description": "Bulk Cart / Quote Request import (CSV + Excel, with variants), quick product search, reorder, default ordering preferences, and one-click buy.",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"endora": {
|
|
9
|
+
"type": "module",
|
|
10
|
+
"id": "quick_order"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/endora-commerce/endora-commerce.git",
|
|
15
|
+
"directory": "packages/modules/quick_order"
|
|
16
|
+
},
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public"
|
|
19
|
+
},
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/manifest.d.ts",
|
|
23
|
+
"default": "./dist/manifest.js"
|
|
24
|
+
},
|
|
25
|
+
"./backend": {
|
|
26
|
+
"types": "./dist/backend/index.d.ts",
|
|
27
|
+
"default": "./dist/backend/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./migrations": {
|
|
30
|
+
"types": "./dist/migrations/index.d.ts",
|
|
31
|
+
"default": "./dist/migrations/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./admin": {
|
|
34
|
+
"types": "./dist/admin/index.d.ts",
|
|
35
|
+
"default": "./dist/admin/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./tailwind.css": "./tailwind.css",
|
|
38
|
+
"./package.json": "./package.json"
|
|
39
|
+
},
|
|
40
|
+
"files": [
|
|
41
|
+
"dist",
|
|
42
|
+
"i18n",
|
|
43
|
+
"docs",
|
|
44
|
+
"tailwind.css"
|
|
45
|
+
],
|
|
46
|
+
"engines": {
|
|
47
|
+
"node": ">=22.18.0"
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"@mikro-orm/core": "^6",
|
|
51
|
+
"@mikro-orm/migrations": "^6",
|
|
52
|
+
"@mikro-orm/postgresql": "^6",
|
|
53
|
+
"exceljs": "^4",
|
|
54
|
+
"fastify": "^5",
|
|
55
|
+
"react": "^19",
|
|
56
|
+
"zod": "^4",
|
|
57
|
+
"@endora-commerce/admin-kit": "0.100.0",
|
|
58
|
+
"@endora-commerce/contracts": "0.100.0",
|
|
59
|
+
"@endora-commerce/platform": "0.100.0"
|
|
60
|
+
},
|
|
61
|
+
"peerDependenciesMeta": {
|
|
62
|
+
"@endora-commerce/admin-kit": {
|
|
63
|
+
"optional": true
|
|
64
|
+
},
|
|
65
|
+
"react": {
|
|
66
|
+
"optional": true
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"devDependencies": {
|
|
70
|
+
"@mikro-orm/core": "^6.6.13",
|
|
71
|
+
"@mikro-orm/migrations": "^6.6.13",
|
|
72
|
+
"@mikro-orm/postgresql": "^6.6.13",
|
|
73
|
+
"@types/node": "^22.9.0",
|
|
74
|
+
"@types/react": "^19.2.14",
|
|
75
|
+
"exceljs": "^4.4.0",
|
|
76
|
+
"fastify": "^5.12.5",
|
|
77
|
+
"react": "^19.2.5",
|
|
78
|
+
"typescript": "^5.9.3",
|
|
79
|
+
"vitest": "^4.1.11",
|
|
80
|
+
"zod": "^4.2.0",
|
|
81
|
+
"@endora-commerce/admin-kit": "0.100.0",
|
|
82
|
+
"@endora-commerce/contracts": "0.100.0",
|
|
83
|
+
"@endora-commerce/platform": "0.100.0"
|
|
84
|
+
},
|
|
85
|
+
"scripts": {
|
|
86
|
+
"build": "tsc -p tsconfig.build.json && tsc -p tsconfig.ui.json",
|
|
87
|
+
"typecheck": "tsc -p tsconfig.json && tsc -p tsconfig.ui.json --noEmit",
|
|
88
|
+
"lint": "eslint src",
|
|
89
|
+
"test": "vitest run"
|
|
90
|
+
}
|
|
91
|
+
}
|
package/tailwind.css
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* @endora-commerce/mod-quick-order — AUTO-GENERATED by `pnpm --filter backend run manifests:generate`.
|
|
2
|
+
*
|
|
3
|
+
* The `@source` directives this package asks its host to scan
|
|
4
|
+
* (`specs/110-instance-repository/contracts/admin-stylesheet-composition.md` R1).
|
|
5
|
+
* They resolve relative to **this file**, so they hold wherever the package is
|
|
6
|
+
* installed — a workspace link here, `node_modules` in a client's instance.
|
|
7
|
+
*
|
|
8
|
+
* The `dist` line is what a published tarball ships and is what an instance
|
|
9
|
+
* scans; the `src` line is inert there and is what keeps `pnpm --filter admin
|
|
10
|
+
* run dev` reading source in this repository. Do not edit: run
|
|
11
|
+
* `pnpm --filter backend run manifests:generate`.
|
|
12
|
+
*/
|
|
13
|
+
@source "./dist/admin";
|
|
14
|
+
@source "./src/admin";
|