@fayz-ai/plugin-shop 0.31.3 → 0.33.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/dist/{ShopPage-WH5SL4WX.js → ShopPage-KF65QBTS.js} +102 -44
- package/dist/ShopPage-KF65QBTS.js.map +1 -0
- package/dist/analytics/cards.d.ts.map +1 -1
- package/dist/data/sale-price-table.d.ts +6 -0
- package/dist/data/sale-price-table.d.ts.map +1 -1
- package/dist/index.js +37 -2
- package/dist/index.js.map +1 -1
- package/dist/locales/en.d.ts +2 -0
- package/dist/locales/en.d.ts.map +1 -0
- package/dist/locales/pt-BR.d.ts +2 -0
- package/dist/locales/pt-BR.d.ts.map +1 -0
- package/dist/views/CustomerModal.d.ts.map +1 -1
- package/dist/views/NewOrderPage.d.ts.map +1 -1
- package/dist/views/customerEntity.d.ts.map +1 -1
- package/package.json +7 -7
- package/dist/ShopPage-WH5SL4WX.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cards.d.ts","sourceRoot":"","sources":["../../src/analytics/cards.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAwC,MAAM,eAAe,CAAA;AAoJ3F,wBAAgB,uBAAuB,IAAI,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"cards.d.ts","sourceRoot":"","sources":["../../src/analytics/cards.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAwC,MAAM,eAAe,CAAA;AAoJ3F,wBAAgB,uBAAuB,IAAI,gBAAgB,EAAE,CAoxB5D"}
|
|
@@ -16,6 +16,12 @@ export declare function quoteSaleUnitPrices(tableId: string | null, lines: Array
|
|
|
16
16
|
}>): Promise<Map<string, SaleLineQuote>>;
|
|
17
17
|
/** The table on the customer's registration (people.price_table_id, 215), if any. */
|
|
18
18
|
export declare function customerPriceTableId(shopCustomerId: string): Promise<string | null>;
|
|
19
|
+
/**
|
|
20
|
+
* Write the customer's default table on their registration. The shop row has
|
|
21
|
+
* no column of its own: the person is canonical, so the CRM record and every
|
|
22
|
+
* document read the same answer. `null` = the store's default.
|
|
23
|
+
*/
|
|
24
|
+
export declare function setCustomerPriceTableId(shopCustomerId: string, tableId: string | null): Promise<void>;
|
|
19
25
|
/** The table an existing order was sold in, from its metadata. */
|
|
20
26
|
export declare function orderPriceTableId(orderId: string): Promise<string | null>;
|
|
21
27
|
//# sourceMappingURL=sale-price-table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sale-price-table.d.ts","sourceRoot":"","sources":["../../src/data/sale-price-table.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,WAAW,GAAI,WAAW,MAAM,EAAE,YAAY,MAAM,GAAG,IAAI,WAAsC,CAAA;AAE9G,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,sEAAsE;IACtE,OAAO,EAAE,OAAO,CAAA;IAChB,iEAAiE;IACjE,OAAO,EAAE,OAAO,CAAA;CACjB;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,MAAM,GAAG,IAAI,EACtB,KAAK,EAAE,KAAK,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC,GAC7D,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAqBrC;
|
|
1
|
+
{"version":3,"file":"sale-price-table.d.ts","sourceRoot":"","sources":["../../src/data/sale-price-table.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,WAAW,GAAI,WAAW,MAAM,EAAE,YAAY,MAAM,GAAG,IAAI,WAAsC,CAAA;AAE9G,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,sEAAsE;IACtE,OAAO,EAAE,OAAO,CAAA;IAChB,iEAAiE;IACjE,OAAO,EAAE,OAAO,CAAA;CACjB;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,MAAM,GAAG,IAAI,EACtB,KAAK,EAAE,KAAK,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC,GAC7D,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAqBrC;AASD,qFAAqF;AACrF,wBAAsB,oBAAoB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAQzF;AAED;;;;GAIG;AACH,wBAAsB,uBAAuB,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAO3G;AAED,kEAAkE;AAClE,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAM/E"}
|
package/dist/index.js
CHANGED
|
@@ -5673,6 +5673,41 @@ function buildShopAnalyticsCards() {
|
|
|
5673
5673
|
viz: { type: "breakdown", measures: ["total"] },
|
|
5674
5674
|
dashboard: { span: 2, order: 24 }
|
|
5675
5675
|
},
|
|
5676
|
+
{
|
|
5677
|
+
...base,
|
|
5678
|
+
// Every channel, not only the site: the read model is over all orders
|
|
5679
|
+
// (0155), so its canonical owner is orders, not the shop's order view.
|
|
5680
|
+
canonicalOwner: "public.orders",
|
|
5681
|
+
id: "shop.sales-by-line",
|
|
5682
|
+
name: tl("Sales by channel", "Vendas por canal"),
|
|
5683
|
+
description: tl(
|
|
5684
|
+
"Delivery, each B2B price table, counter and dine-in apart: orders, revenue, average ticket and freight. The same channel the orders list filters on, and the revenue account it lands on in the P&L.",
|
|
5685
|
+
"Delivery, cada tabela de pre\xE7o do B2B, balc\xE3o e sal\xE3o separados: pedidos, faturamento, ticket m\xE9dio e frete. O mesmo canal que filtra a lista de pedidos, e a conta da DRE em que a venda entra."
|
|
5686
|
+
),
|
|
5687
|
+
icon: "Split",
|
|
5688
|
+
category: CAT.sales,
|
|
5689
|
+
grain: "order",
|
|
5690
|
+
query: {
|
|
5691
|
+
// Cancelled, test and purchase orders are already out of the view.
|
|
5692
|
+
source: { kind: "view", name: "plg_shop_rep_sales_lines" },
|
|
5693
|
+
dimensions: [
|
|
5694
|
+
{ key: "sales_line_label", label: tl("Channel", "Canal") },
|
|
5695
|
+
{ key: "revenue_account", label: tl("Revenue account", "Conta da DRE") }
|
|
5696
|
+
],
|
|
5697
|
+
measures: [
|
|
5698
|
+
{ key: "total", label: tl("Revenue", "Faturamento"), agg: "sum", format: "currency" },
|
|
5699
|
+
{ key: "orders", label: tl("Orders", "Pedidos"), agg: "count", format: "number" },
|
|
5700
|
+
{ ...AOV },
|
|
5701
|
+
{ key: "customers", label: tl("Customers", "Clientes"), agg: "count_distinct", column: "customer_id", format: "number" },
|
|
5702
|
+
{ key: "shipping", label: tl("Freight", "Frete"), agg: "sum", format: "currency" },
|
|
5703
|
+
{ key: "discounts", label: tl("Discounts", "Descontos"), agg: "sum", format: "currency" }
|
|
5704
|
+
],
|
|
5705
|
+
defaultSort: "total",
|
|
5706
|
+
defaultSortDir: "desc"
|
|
5707
|
+
},
|
|
5708
|
+
viz: { type: "breakdown", measures: ["total"] },
|
|
5709
|
+
dashboard: { span: 2, order: 23 }
|
|
5710
|
+
},
|
|
5676
5711
|
{
|
|
5677
5712
|
...base,
|
|
5678
5713
|
id: "shop.orders-by-fulfillment-status",
|
|
@@ -6257,8 +6292,8 @@ function advanceNeoChefCursor(products, overlapMs) {
|
|
|
6257
6292
|
}
|
|
6258
6293
|
|
|
6259
6294
|
// src/index.ts
|
|
6260
|
-
var ShopPage = React.lazy(() => import('./ShopPage-
|
|
6261
|
-
var LazyOrderDetail = React.lazy(() => import('./ShopPage-
|
|
6295
|
+
var ShopPage = React.lazy(() => import('./ShopPage-KF65QBTS.js').then((m) => ({ default: m.ShopPage })));
|
|
6296
|
+
var LazyOrderDetail = React.lazy(() => import('./ShopPage-KF65QBTS.js').then((m) => ({ default: m.ShopOrderDetailSlot })));
|
|
6262
6297
|
function ShopOrderDetail(provider) {
|
|
6263
6298
|
const Detail = (props) => React.createElement(
|
|
6264
6299
|
React.Suspense,
|