@fayz-ai/plugin-tables 0.10.2 → 0.10.4
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/ComandaSettingsView-ZB5RK7TP.js +176 -0
- package/dist/ComandaSettingsView-ZB5RK7TP.js.map +1 -0
- package/dist/TablesPage-VVDNK3GN.js +1145 -0
- package/dist/TablesPage-VVDNK3GN.js.map +1 -0
- package/dist/chunk-XHRPH676.js +12 -0
- package/dist/chunk-XHRPH676.js.map +1 -0
- package/dist/context.d.ts +10 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/data/core-supabase.d.ts +32 -0
- package/dist/data/core-supabase.d.ts.map +1 -0
- package/dist/data/mock.d.ts.map +1 -1
- package/dist/data/registries.d.ts.map +1 -1
- package/dist/data/types.d.ts +39 -1
- package/dist/data/types.d.ts.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1234 -21
- package/dist/index.js.map +1 -1
- package/dist/locales/en.d.ts.map +1 -1
- package/dist/locales/pt-BR.d.ts.map +1 -1
- package/dist/migrations/index.d.ts +7 -0
- package/dist/migrations/index.d.ts.map +1 -0
- package/dist/store.d.ts +40 -1
- package/dist/store.d.ts.map +1 -1
- package/dist/types.d.ts +138 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/views/ComandaActions.d.ts +63 -0
- package/dist/views/ComandaActions.d.ts.map +1 -0
- package/dist/views/ComandaSettingsView.d.ts +3 -0
- package/dist/views/ComandaSettingsView.d.ts.map +1 -0
- package/dist/views/FloorPlanView.d.ts.map +1 -1
- package/dist/views/TableRailPage.d.ts +3 -0
- package/dist/views/TableRailPage.d.ts.map +1 -0
- package/package.json +4 -4
- package/dist/TablesPage-GKTE4SD2.js +0 -274
- package/dist/TablesPage-GKTE4SD2.js.map +0 -1
package/dist/locales/en.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/locales/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/locales/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA4FrC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pt-BR.d.ts","sourceRoot":"","sources":["../../src/locales/pt-BR.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"pt-BR.d.ts","sourceRoot":"","sources":["../../src/locales/pt-BR.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA4FvC,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const MIGRATION_001_FLOOR_PLAN = "-- plugin-tables \u2014 the floor plan's own schema.\n--\n-- A mesa was homeless before this: `public.restaurant_tables` never shipped in\n-- any pool, and `orders.location_id` is a FK to `app.units` \u2014 the BRANCH, not a\n-- table in the sal\u00E3o. So the plugin owns its two tables, plus the row that ties\n-- a comanda to the mesa it is open on (the `plg_*_order_extensions` convention\n-- plugin-shop and plugin-courses already follow).\n--\n-- Idempotent. Applied to klvfxzreepavcpyjiwla on 2026-09-04.\n\ncreate table if not exists public.plg_tables_zones (\n id uuid primary key default gen_random_uuid(),\n tenant_id uuid not null references public.tenants(id) on delete cascade,\n name text not null,\n color text,\n sort_order integer not null default 0,\n is_active boolean not null default true,\n created_at timestamptz not null default now(),\n updated_at timestamptz not null default now()\n);\n\ncreate table if not exists public.plg_tables_tables (\n id uuid primary key default gen_random_uuid(),\n tenant_id uuid not null references public.tenants(id) on delete cascade,\n zone_id uuid references public.plg_tables_zones(id) on delete set null,\n name text not null,\n number integer not null,\n seats integer not null default 2 check (seats > 0),\n shape text not null default 'square'\n check (shape in ('square','round','rectangle','bar')),\n -- The stored state covers what nobody can derive: reserved and cleaning are\n -- decisions. `occupied` is NOT stored \u2014 it is the presence of an open\n -- comanda, and storing it twice is how a floor plan starts disagreeing with\n -- the orders list.\n status text not null default 'available'\n check (status in ('available','reserved','cleaning')),\n grid_col integer not null default 0,\n grid_row integer not null default 0,\n is_active boolean not null default true,\n created_at timestamptz not null default now(),\n updated_at timestamptz not null default now(),\n unique (tenant_id, number)\n);\n\n-- Which mesa a comanda is open on. One row per order, dropped with the order.\ncreate table if not exists public.plg_tables_order_extensions (\n order_id uuid primary key references public.orders(id) on delete cascade,\n tenant_id uuid not null references public.tenants(id) on delete cascade,\n table_id uuid references public.plg_tables_tables(id) on delete set null,\n guests integer check (guests is null or guests > 0),\n seated_at timestamptz not null default now(),\n created_at timestamptz not null default now(),\n updated_at timestamptz not null default now()\n);\n\ncreate index if not exists plg_tables_tables_tenant_idx on public.plg_tables_tables (tenant_id, number);\ncreate index if not exists plg_tables_zones_tenant_idx on public.plg_tables_zones (tenant_id, sort_order);\ncreate index if not exists plg_tables_order_ext_table_idx on public.plg_tables_order_extensions (table_id);\n\ndo $$ begin\n create trigger plg_tables_zones_updated_at before update on public.plg_tables_zones\n for each row execute function public.handle_updated_at();\nexception when duplicate_object then null; end $$;\ndo $$ begin\n create trigger plg_tables_tables_updated_at before update on public.plg_tables_tables\n for each row execute function public.handle_updated_at();\nexception when duplicate_object then null; end $$;\ndo $$ begin\n create trigger plg_tables_order_ext_updated_at before update on public.plg_tables_order_extensions\n for each row execute function public.handle_updated_at();\nexception when duplicate_object then null; end $$;\n\n-- Tenant-scoped, like every other plg_ table here. Deliberately NOT gated on\n-- `units.manage`: changing a mesa's state is a waiter's everyday job, and that\n-- permission is for managing business units.\nalter table public.plg_tables_zones enable row level security;\nalter table public.plg_tables_tables enable row level security;\nalter table public.plg_tables_order_extensions enable row level security;\n\n-- THE ACTIVE ACCOUNT, not every account you belong to.\n--\n-- The first pass scoped these by `user_tenant_ids()`, and the sal\u00E3o of one\n-- restaurant showed the mesas of another: that function honours only a signed\n-- JWT claim, while switching workspace happens through the `x-fayz-tenant`\n-- header \u2014 so it does not see the switch at all and answers with the UNION of\n-- the caller's accounts. Artorius drew Papa L\u00E9guas' two mesas.\n--\n-- `app.current_tenant_id()` is the one that reads the header, and it validates\n-- against app.memberships before trusting it: it CHOOSES among the accounts you\n-- already belong to and can never widen. The writes matter more than the reads\n-- here \u2014 union-scoped, a waiter in one sal\u00E3o could rename a mesa in another.\ndo $$\ndeclare t text;\nbegin\n foreach t in array array['plg_tables_zones','plg_tables_tables','plg_tables_order_extensions'] loop\n execute format('drop policy if exists %I on public.%I', t || '_select', t);\n execute format('drop policy if exists %I on public.%I', t || '_insert', t);\n execute format('drop policy if exists %I on public.%I', t || '_update', t);\n execute format('drop policy if exists %I on public.%I', t || '_delete', t);\n end loop;\n -- The first hand-run named the extension's four policies `..._order_ext_*`,\n -- shortened. The loop above drops `..._order_extensions_*`, so those four\n -- SURVIVED the rewrite \u2014 and a permissive policy that survives is not inert:\n -- Postgres ORs them, so the union-scoped leftovers put the leak straight back\n -- while the strict ones looked correct in the file. Named explicitly here so\n -- a replay onto a cluster that saw that first run comes out clean.\n foreach t in array array['plg_tables_order_ext_select','plg_tables_order_ext_insert',\n 'plg_tables_order_ext_update','plg_tables_order_ext_delete'] loop\n execute format('drop policy if exists %I on public.plg_tables_order_extensions', t);\n end loop;\n foreach t in array array['plg_tables_zones','plg_tables_tables','plg_tables_order_extensions'] loop\n execute format('create policy %I on public.%I for select using (tenant_id = (select app.current_tenant_id()))', t || '_select', t);\n execute format('create policy %I on public.%I for insert with check (tenant_id = (select app.current_tenant_id()))', t || '_insert', t);\n execute format('create policy %I on public.%I for update using (tenant_id = (select app.current_tenant_id()))', t || '_update', t);\n execute format('create policy %I on public.%I for delete using (tenant_id = (select app.current_tenant_id()))', t || '_delete', t);\n execute format('grant select, insert, update, delete on public.%I to authenticated', t);\n end loop;\nend $$;\n\n-- The floor plan as one read: every mesa with the comanda sitting on it, so\n-- \"ocupada\" and \"h\u00E1 um pedido aberto\" are the same fact read from one place.\n--\n-- A LATERAL, not a LEFT JOIN on the extension table: the extension rows are not\n-- filtered by the orders join, so a mesa served three times yesterday would come\n-- back three times today \u2014 once per closed comanda \u2014 and the floor plan would\n-- draw it three times while the summary counted it three times.\ncreate or replace view public.v_tables with (security_invoker = true) as\nselect\n t.id, t.tenant_id, t.zone_id, z.name as zone_name, z.color as zone_color,\n t.name, t.number, t.seats, t.shape, t.grid_col, t.grid_row, t.is_active,\n case when open.order_id is not null then 'occupied' else t.status end as status,\n open.order_id as current_order_id,\n open.reference_number as current_order_reference,\n open.total as current_total,\n open.guests as current_guests,\n open.seated_at as seated_at,\n t.created_at, t.updated_at\nfrom public.plg_tables_tables t\nleft join public.plg_tables_zones z on z.id = t.zone_id\nleft join lateral (\n select o.id as order_id, o.reference_number, o.total, x.guests, x.seated_at\n from public.plg_tables_order_extensions x\n join public.orders o on o.id = x.order_id\n where x.table_id = t.id\n and o.kind in ('dine_in','takeout','delivery')\n and o.status not in ('completed','cancelled')\n order by x.seated_at desc\n limit 1\n) open on true;\n\ngrant select on public.v_tables to authenticated;\n";
|
|
2
|
+
export declare const MIGRATION_002_COMANDA = "-- plugin-tables \u2014 a comanda que fecha a conta.\n--\n-- A mesa j\u00E1 abria, lan\u00E7ava item e somava. O que faltava \u00E9 tudo o que acontece\n-- entre sentar e pagar: de quem \u00E9 cada item, o desconto, o cancelamento com\n-- motivo, a transfer\u00EAncia, e a taxa de servi\u00E7o \u2014 que at\u00E9 aqui era uma\n-- CONSTANTE no c\u00F3digo do app (`serviceChargePercent: 10`) e por isso n\u00E3o\n-- chegava \u00E0 fatura levantada no fechamento.\n--\n-- Nenhuma coluna nova em `public.items` ou `public.orders`: as duas s\u00E3o a\n-- espinha compartilhada com shop, financeiro e CRM. Participante de restaurante\n-- mora em tabela do plugin, chaveada pelo pk da linha da espinha \u2014 a mesma\n-- conven\u00E7\u00E3o que `plg_tables_order_extensions` j\u00E1 usa.\n--\n-- E o que a espinha J\u00C1 tem n\u00E3o se recria: `items.discount`, `items.cancelled_at`\n-- e `items.cancel_reason` s\u00E3o colunas do baseline.\n--\n-- Idempotente.\n\n-- ---------------------------------------------------------------------------\n-- A casa\n-- ---------------------------------------------------------------------------\n\ncreate table if not exists public.plg_tables_settings (\n tenant_id uuid primary key references public.tenants(id) on delete cascade,\n service_charge_percent numeric(5,2) not null default 0\n check (service_charge_percent >= 0 and service_charge_percent <= 100),\n -- O terminal do sal\u00E3o fica logado a noite inteira, e quem cancela nem sempre\n -- \u00E9 quem est\u00E1 logado. Desligado por padr\u00E3o: o restaurante de um dono s\u00F3 nunca\n -- v\u00EA a segunda tela, e a rede que precisa dela liga em um clique \u2014 em vez de\n -- descobrir a exig\u00EAncia na sexta \u00E0 noite, como no V1.\n cancel_requires_pin boolean not null default false,\n -- O dia do restaurante n\u00E3o \u00E9 o dia do calend\u00E1rio: come\u00E7ar \u00E0s 06:00 mant\u00E9m a\n -- virada da madrugada no turno a que ela pertence.\n operational_day_start time not null default '06:00',\n created_at timestamptz not null default now(),\n updated_at timestamptz not null default now()\n);\n\n-- A taxa desta mesa. Nulo = a da casa.\nalter table public.plg_tables_order_extensions\n add column if not exists service_charge_percent numeric(5,2)\n check (service_charge_percent is null\n or (service_charge_percent >= 0 and service_charge_percent <= 100));\n\n-- ---------------------------------------------------------------------------\n-- O participante \u2014 a pe\u00E7a de que caem a transfer\u00EAncia e a taxa por pessoa\n-- ---------------------------------------------------------------------------\n\ncreate table if not exists public.plg_tables_order_guests (\n id uuid primary key default gen_random_uuid(),\n tenant_id uuid not null references public.tenants(id) on delete cascade,\n order_id uuid not null references public.orders(id) on delete cascade,\n seat_no integer not null check (seat_no > 0),\n label text,\n -- Nulo = a da mesa, que por sua vez cai para a da casa. \u00C9 a regra que o V1\n -- escreve na tela (\"Deixe em branco para usar a taxa geral\"), declarada uma\n -- vez no formato de dado em vez de reimplementada em cada di\u00E1logo.\n service_charge_percent numeric(5,2)\n check (service_charge_percent is null\n or (service_charge_percent >= 0 and service_charge_percent <= 100)),\n created_at timestamptz not null default now(),\n updated_at timestamptz not null default now(),\n unique (order_id, seat_no)\n);\n\n-- De quem \u00E9 a linha. Uma linha por item atribu\u00EDdo; item sem linha \u00E9 DA MESA.\ncreate table if not exists public.plg_tables_item_guests (\n item_id uuid primary key references public.items(id) on delete cascade,\n tenant_id uuid not null references public.tenants(id) on delete cascade,\n guest_id uuid not null references public.plg_tables_order_guests(id) on delete cascade,\n created_at timestamptz not null default now()\n);\n\n-- ---------------------------------------------------------------------------\n-- Cancelamento e transfer\u00EAncia\n-- ---------------------------------------------------------------------------\n\ncreate table if not exists public.plg_tables_cancel_reasons (\n id uuid primary key default gen_random_uuid(),\n tenant_id uuid not null references public.tenants(id) on delete cascade,\n label text not null,\n is_active boolean not null default true,\n sort_order integer not null default 0,\n created_at timestamptz not null default now(),\n updated_at timestamptz not null default now()\n);\n\n-- O hist\u00F3rico que o V1 mostra (\"Transfer\u00EAncias realizadas nesta comanda\") e que\n-- ningu\u00E9m consegue reconstruir depois, porque l\u00E1 a transfer\u00EAncia s\u00F3 reescreve o\n-- destino e n\u00E3o deixa rastro.\ncreate table if not exists public.plg_tables_order_transfers (\n id uuid primary key default gen_random_uuid(),\n tenant_id uuid not null references public.tenants(id) on delete cascade,\n order_id uuid not null references public.orders(id) on delete cascade,\n kind text not null check (kind in ('table','guest','items')),\n from_table_id uuid references public.plg_tables_tables(id) on delete set null,\n to_table_id uuid references public.plg_tables_tables(id) on delete set null,\n target_order_id uuid references public.orders(id) on delete set null,\n guest_id uuid,\n item_ids uuid[] not null default '{}',\n note text,\n performed_by uuid,\n created_at timestamptz not null default now()\n);\n\ncreate index if not exists plg_tables_order_guests_order_idx on public.plg_tables_order_guests (order_id, seat_no);\ncreate index if not exists plg_tables_item_guests_guest_idx on public.plg_tables_item_guests (guest_id);\ncreate index if not exists plg_tables_cancel_reasons_tenant_idx on public.plg_tables_cancel_reasons (tenant_id, sort_order);\ncreate index if not exists plg_tables_order_transfers_order_idx on public.plg_tables_order_transfers (order_id, created_at desc);\n\ndo $$ begin\n create trigger plg_tables_settings_updated_at before update on public.plg_tables_settings\n for each row execute function public.handle_updated_at();\nexception when duplicate_object then null; end $$;\ndo $$ begin\n create trigger plg_tables_order_guests_updated_at before update on public.plg_tables_order_guests\n for each row execute function public.handle_updated_at();\nexception when duplicate_object then null; end $$;\ndo $$ begin\n create trigger plg_tables_cancel_reasons_updated_at before update on public.plg_tables_cancel_reasons\n for each row execute function public.handle_updated_at();\nexception when duplicate_object then null; end $$;\n\n-- ---------------------------------------------------------------------------\n-- RLS \u2014 a conta ATIVA, nunca a uni\u00E3o das contas do usu\u00E1rio.\n-- Mesmo argumento (e mesma cicatriz) da 001: `user_tenant_ids()` honra s\u00F3 um\n-- claim do JWT e ignora a troca de workspace pelo header, ent\u00E3o responde com a\n-- UNI\u00C3O. Foi assim que Artorius desenhou as mesas do Papa L\u00E9guas.\n-- ---------------------------------------------------------------------------\n\n-- Escrito tabela a tabela, e n\u00E3o num `foreach` sobre um array de nomes.\n-- O la\u00E7o dizia a mesma coisa em menos linhas e escondia QUAIS tabelas ficam\n-- protegidas atr\u00E1s de um `execute format()` \u2014 invis\u00EDvel para quem l\u00EA o\n-- arquivo e para o `check-plugin-review`, que grada exatamente isto. Numa\n-- migra\u00E7\u00E3o de RLS, a repeti\u00E7\u00E3o \u00E9 a documenta\u00E7\u00E3o.\n\nalter table public.plg_tables_settings enable row level security;\ndrop policy if exists plg_tables_settings_select on public.plg_tables_settings;\ncreate policy plg_tables_settings_select on public.plg_tables_settings\n for select using (tenant_id = (select app.current_tenant_id()));\ndrop policy if exists plg_tables_settings_insert on public.plg_tables_settings;\ncreate policy plg_tables_settings_insert on public.plg_tables_settings\n for insert with check (tenant_id = (select app.current_tenant_id()));\ndrop policy if exists plg_tables_settings_update on public.plg_tables_settings;\ncreate policy plg_tables_settings_update on public.plg_tables_settings\n for update using (tenant_id = (select app.current_tenant_id()));\ndrop policy if exists plg_tables_settings_delete on public.plg_tables_settings;\ncreate policy plg_tables_settings_delete on public.plg_tables_settings\n for delete using (tenant_id = (select app.current_tenant_id()));\ngrant select, insert, update, delete on public.plg_tables_settings to authenticated;\n\nalter table public.plg_tables_order_guests enable row level security;\ndrop policy if exists plg_tables_order_guests_select on public.plg_tables_order_guests;\ncreate policy plg_tables_order_guests_select on public.plg_tables_order_guests\n for select using (tenant_id = (select app.current_tenant_id()));\ndrop policy if exists plg_tables_order_guests_insert on public.plg_tables_order_guests;\ncreate policy plg_tables_order_guests_insert on public.plg_tables_order_guests\n for insert with check (tenant_id = (select app.current_tenant_id()));\ndrop policy if exists plg_tables_order_guests_update on public.plg_tables_order_guests;\ncreate policy plg_tables_order_guests_update on public.plg_tables_order_guests\n for update using (tenant_id = (select app.current_tenant_id()));\ndrop policy if exists plg_tables_order_guests_delete on public.plg_tables_order_guests;\ncreate policy plg_tables_order_guests_delete on public.plg_tables_order_guests\n for delete using (tenant_id = (select app.current_tenant_id()));\ngrant select, insert, update, delete on public.plg_tables_order_guests to authenticated;\n\nalter table public.plg_tables_item_guests enable row level security;\ndrop policy if exists plg_tables_item_guests_select on public.plg_tables_item_guests;\ncreate policy plg_tables_item_guests_select on public.plg_tables_item_guests\n for select using (tenant_id = (select app.current_tenant_id()));\ndrop policy if exists plg_tables_item_guests_insert on public.plg_tables_item_guests;\ncreate policy plg_tables_item_guests_insert on public.plg_tables_item_guests\n for insert with check (tenant_id = (select app.current_tenant_id()));\ndrop policy if exists plg_tables_item_guests_update on public.plg_tables_item_guests;\ncreate policy plg_tables_item_guests_update on public.plg_tables_item_guests\n for update using (tenant_id = (select app.current_tenant_id()));\ndrop policy if exists plg_tables_item_guests_delete on public.plg_tables_item_guests;\ncreate policy plg_tables_item_guests_delete on public.plg_tables_item_guests\n for delete using (tenant_id = (select app.current_tenant_id()));\ngrant select, insert, update, delete on public.plg_tables_item_guests to authenticated;\n\nalter table public.plg_tables_cancel_reasons enable row level security;\ndrop policy if exists plg_tables_cancel_reasons_select on public.plg_tables_cancel_reasons;\ncreate policy plg_tables_cancel_reasons_select on public.plg_tables_cancel_reasons\n for select using (tenant_id = (select app.current_tenant_id()));\ndrop policy if exists plg_tables_cancel_reasons_insert on public.plg_tables_cancel_reasons;\ncreate policy plg_tables_cancel_reasons_insert on public.plg_tables_cancel_reasons\n for insert with check (tenant_id = (select app.current_tenant_id()));\ndrop policy if exists plg_tables_cancel_reasons_update on public.plg_tables_cancel_reasons;\ncreate policy plg_tables_cancel_reasons_update on public.plg_tables_cancel_reasons\n for update using (tenant_id = (select app.current_tenant_id()));\ndrop policy if exists plg_tables_cancel_reasons_delete on public.plg_tables_cancel_reasons;\ncreate policy plg_tables_cancel_reasons_delete on public.plg_tables_cancel_reasons\n for delete using (tenant_id = (select app.current_tenant_id()));\ngrant select, insert, update, delete on public.plg_tables_cancel_reasons to authenticated;\n\nalter table public.plg_tables_order_transfers enable row level security;\ndrop policy if exists plg_tables_order_transfers_select on public.plg_tables_order_transfers;\ncreate policy plg_tables_order_transfers_select on public.plg_tables_order_transfers\n for select using (tenant_id = (select app.current_tenant_id()));\ndrop policy if exists plg_tables_order_transfers_insert on public.plg_tables_order_transfers;\ncreate policy plg_tables_order_transfers_insert on public.plg_tables_order_transfers\n for insert with check (tenant_id = (select app.current_tenant_id()));\ndrop policy if exists plg_tables_order_transfers_update on public.plg_tables_order_transfers;\ncreate policy plg_tables_order_transfers_update on public.plg_tables_order_transfers\n for update using (tenant_id = (select app.current_tenant_id()));\ndrop policy if exists plg_tables_order_transfers_delete on public.plg_tables_order_transfers;\ncreate policy plg_tables_order_transfers_delete on public.plg_tables_order_transfers\n for delete using (tenant_id = (select app.current_tenant_id()));\ngrant select, insert, update, delete on public.plg_tables_order_transfers to authenticated;\n\n-- ---------------------------------------------------------------------------\n-- A conta, calculada NUM lugar s\u00F3\n-- ---------------------------------------------------------------------------\n--\n-- O painel de Opera\u00E7\u00E3o do V1 tem seis blocos que se contradizem na mesma tela\n-- (V1-046: \"Sa\u00EDdas R$ 4.552,41\" logo acima de \"Nenhuma sa\u00EDda registrada\"),\n-- porque cada bloco faz a pr\u00F3pria consulta. A comanda do V1 tem o mesmo defeito\n-- em escala menor: o rodap\u00E9 soma de um jeito e a fatura levanta de outro, e \u00E9\n-- da\u00ED que sai o Resumo Financeiro que n\u00E3o fecha (V1-044).\n--\n-- Aqui a soma \u00E9 uma fun\u00E7\u00E3o. O rodap\u00E9 l\u00EA o que ela gravou; a fatura levantada no\n-- fechamento l\u00EA a mesma linha. N\u00E3o h\u00E1 segundo c\u00E1lculo com que discordar.\n\ncreate or replace function public.comanda_effective_service_percent(p_order_id uuid, p_guest_id uuid)\nreturns numeric\nlanguage sql stable\nas $$\n select coalesce(\n (select g.service_charge_percent from public.plg_tables_order_guests g where g.id = p_guest_id),\n (select x.service_charge_percent from public.plg_tables_order_extensions x where x.order_id = p_order_id),\n (select s.service_charge_percent from public.plg_tables_settings s\n where s.tenant_id = (select o.tenant_id from public.orders o where o.id = p_order_id)),\n 0\n );\n$$;\n\ncreate or replace function public.comanda_recalc(p_order_id uuid)\nreturns void\nlanguage plpgsql\nas $$\ndeclare\n v_subtotal numeric := 0;\n v_service numeric := 0;\n v_discount numeric := 0;\nbegin\n -- Item cancelado sai da soma, mas N\u00C3O sai da comanda: ele continua na tela,\n -- riscado, porque \"o que foi cancelado\" \u00E9 a pergunta que o painel de turno\n -- responde e a \u00FAnica que o V1 responde bem (Top Itens Cancelados).\n select\n coalesce(sum(i.total), 0),\n coalesce(sum(i.total * public.comanda_effective_service_percent(p_order_id, ig.guest_id) / 100), 0)\n into v_subtotal, v_service\n from public.items i\n left join public.plg_tables_item_guests ig on ig.item_id = i.id\n where i.order_id = p_order_id\n and i.cancelled_at is null;\n\n select coalesce(o.discount, 0) into v_discount from public.orders o where o.id = p_order_id;\n\n update public.orders\n set subtotal = v_subtotal,\n tax = round(v_service, 2),\n total = v_subtotal - v_discount + round(v_service, 2)\n where id = p_order_id;\nend;\n$$;\n\ngrant execute on function public.comanda_effective_service_percent(uuid, uuid) to authenticated;\ngrant execute on function public.comanda_recalc(uuid) to authenticated;\n\n-- Cada participante com o que consumiu e o que deve \u2014 a leitura que no V1 s\u00F3\n-- existe no app do gar\u00E7om (`J\u00E1 pago / Saldo devedor`), e que a tela\n-- administrativa nunca oferece.\ncreate or replace view public.v_comanda_guests with (security_invoker = true) as\nselect\n g.id, g.tenant_id, g.order_id, g.seat_no, g.label,\n g.service_charge_percent as own_service_charge_percent,\n public.comanda_effective_service_percent(g.order_id, g.id) as service_charge_percent,\n coalesce(sum(i.total) filter (where i.cancelled_at is null), 0) as subtotal,\n round(coalesce(sum(i.total) filter (where i.cancelled_at is null), 0)\n * public.comanda_effective_service_percent(g.order_id, g.id) / 100, 2) as service_charge,\n coalesce(sum(i.total) filter (where i.cancelled_at is not null), 0) as cancelled_total,\n count(i.id) filter (where i.cancelled_at is null) as item_count\nfrom public.plg_tables_order_guests g\nleft join public.plg_tables_item_guests ig on ig.guest_id = g.id\nleft join public.items i on i.id = ig.item_id\ngroup by g.id, g.tenant_id, g.order_id, g.seat_no, g.label, g.service_charge_percent;\n\ngrant select on public.v_comanda_guests to authenticated;\n";
|
|
3
|
+
export declare const MIGRATIONS: Array<{
|
|
4
|
+
id: string;
|
|
5
|
+
sql: string;
|
|
6
|
+
}>;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,wBAAwB,40QAuJpC,CAAA;AAED,eAAO,MAAM,qBAAqB,83hBAkSjC,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAGzD,CAAA"}
|
package/dist/store.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type StoreApi } from 'zustand/vanilla';
|
|
2
2
|
import type { TablesDataProvider } from './data/types';
|
|
3
|
-
import type { RestaurantTable, TableSession, Zone, CreateTableInput, SeatGuestsInput, UpdateTableStatusInput, TableQuery, TablesSummary } from './types';
|
|
3
|
+
import type { RestaurantTable, TableSession, Zone, CreateTableInput, SeatGuestsInput, UpdateTableStatusInput, TableQuery, TablesSummary, TableOrder, TableMenuCategory, AddTableOrderLineInput, ComandaSettings, CancelReason, OrderTransfer, DiscountLineInput, CancelLineInput, TransferInput } from './types';
|
|
4
4
|
export interface TablesUIState {
|
|
5
5
|
tables: RestaurantTable[];
|
|
6
6
|
tablesLoading: boolean;
|
|
@@ -13,12 +13,51 @@ export interface TablesUIState {
|
|
|
13
13
|
summary: TablesSummary | null;
|
|
14
14
|
summaryLoading: boolean;
|
|
15
15
|
selectedTableId: string | null;
|
|
16
|
+
/** The open comanda of the SELECTED mesa. Null when it has none, or when the
|
|
17
|
+
* provider cannot read one. */
|
|
18
|
+
openOrder: TableOrder | null;
|
|
19
|
+
openOrderLoading: boolean;
|
|
20
|
+
/** The provider answers 'no comanda reader here'. The panel says so once
|
|
21
|
+
* instead of showing an empty comanda that looks like a lost order. */
|
|
22
|
+
comandaSupported: boolean;
|
|
23
|
+
/** The chips over the item picker. The ITEMS are not here: they are the
|
|
24
|
+
* picker's own list, read straight from the provider. */
|
|
25
|
+
menuCategories: TableMenuCategory[];
|
|
26
|
+
/** Qual participante está selecionado na barra da comanda. Null = a MESA,
|
|
27
|
+
* que é o padrão: a maioria das mesas não divide a conta, e obrigar a
|
|
28
|
+
* escolher uma pessoa antes de lançar uma cerveja seria um passo por item. */
|
|
29
|
+
activeGuestId: string | null;
|
|
30
|
+
/** A política da casa. Null enquanto não foi lida. */
|
|
31
|
+
settings: ComandaSettings | null;
|
|
32
|
+
cancelReasons: CancelReason[];
|
|
33
|
+
transfers: OrderTransfer[];
|
|
16
34
|
fetchTables(query?: TableQuery): Promise<void>;
|
|
17
35
|
fetchZones(): Promise<void>;
|
|
18
36
|
fetchActiveSessions(): Promise<void>;
|
|
19
37
|
fetchSessionHistory(tableId?: string): Promise<void>;
|
|
20
38
|
fetchSummary(): Promise<void>;
|
|
21
39
|
selectTable(id: string | null): void;
|
|
40
|
+
refreshAfterWrite(): Promise<void>;
|
|
41
|
+
fetchOpenOrder(tableId: string): Promise<void>;
|
|
42
|
+
fetchMenuCategories(): Promise<void>;
|
|
43
|
+
addOrderLine(input: AddTableOrderLineInput): Promise<void>;
|
|
44
|
+
setOrderLineQuantity(lineId: string, quantity: number): Promise<void>;
|
|
45
|
+
selectGuest(guestId: string | null): void;
|
|
46
|
+
fetchSettings(): Promise<void>;
|
|
47
|
+
saveSettings(patch: Partial<ComandaSettings>): Promise<void>;
|
|
48
|
+
addGuest(label?: string): Promise<void>;
|
|
49
|
+
removeGuest(guestId: string): Promise<void>;
|
|
50
|
+
setGuestServiceCharge(guestId: string, percent: number | null): Promise<void>;
|
|
51
|
+
setOrderServiceCharge(percent: number | null): Promise<void>;
|
|
52
|
+
discountLines(input: DiscountLineInput): Promise<void>;
|
|
53
|
+
fetchCancelReasons(): Promise<void>;
|
|
54
|
+
addCancelReason(label: string): Promise<void>;
|
|
55
|
+
updateCancelReason(id: string, patch: Partial<CancelReason>): Promise<void>;
|
|
56
|
+
deleteCancelReason(id: string): Promise<void>;
|
|
57
|
+
cancelLines(input: CancelLineInput): Promise<void>;
|
|
58
|
+
transfer(input: TransferInput): Promise<void>;
|
|
59
|
+
fetchTransfers(): Promise<void>;
|
|
60
|
+
setSessionGuests(guests: number): Promise<void>;
|
|
22
61
|
seatGuests(input: SeatGuestsInput): Promise<TableSession>;
|
|
23
62
|
closeSession(sessionId: string): Promise<void>;
|
|
24
63
|
updateTableStatus(input: UpdateTableStatusInput): Promise<void>;
|
package/dist/store.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAG5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACtD,OAAO,KAAK,EACV,eAAe,EAAE,YAAY,EAAE,IAAI,EACnC,gBAAgB,EAAE,eAAe,EAAE,sBAAsB,EACzD,UAAU,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAG5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACtD,OAAO,KAAK,EACV,eAAe,EAAE,YAAY,EAAE,IAAI,EACnC,gBAAgB,EAAE,eAAe,EAAE,sBAAsB,EACzD,UAAU,EAAE,aAAa,EACzB,UAAU,EAAE,iBAAiB,EAAE,sBAAsB,EACrD,eAAe,EAAE,YAAY,EAAE,aAAa,EAC5C,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAClD,MAAM,SAAS,CAAA;AAMhB,MAAM,WAAW,aAAa;IAE5B,MAAM,EAAE,eAAe,EAAE,CAAA;IACzB,aAAa,EAAE,OAAO,CAAA;IAEtB,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,YAAY,EAAE,OAAO,CAAA;IAErB,cAAc,EAAE,YAAY,EAAE,CAAA;IAC9B,eAAe,EAAE,OAAO,CAAA;IAExB,cAAc,EAAE,YAAY,EAAE,CAAA;IAC9B,cAAc,EAAE,OAAO,CAAA;IAEvB,OAAO,EAAE,aAAa,GAAG,IAAI,CAAA;IAC7B,cAAc,EAAE,OAAO,CAAA;IAEvB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAE9B;oCACgC;IAChC,SAAS,EAAE,UAAU,GAAG,IAAI,CAAA;I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AAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC/D,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC,CAAA;CAC/D;AAMD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,QAAQ,CAAC,aAAa,CAAC,CAyXvF"}
|
package/dist/types.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export interface RestaurantTable {
|
|
|
14
14
|
isActive: boolean;
|
|
15
15
|
currentSessionId?: string;
|
|
16
16
|
currentOrderId?: string;
|
|
17
|
+
/** The comanda's human number. The uuid is not a thing to show a waiter. */
|
|
18
|
+
currentOrderReference?: string;
|
|
17
19
|
currentGuests?: number;
|
|
18
20
|
currentWaiterName?: string;
|
|
19
21
|
currentElapsedMinutes?: number;
|
|
@@ -81,4 +83,140 @@ export interface TablesSummary {
|
|
|
81
83
|
occupiedSeats: number;
|
|
82
84
|
averageSessionMinutes: number;
|
|
83
85
|
}
|
|
86
|
+
export interface TableOrderLine {
|
|
87
|
+
id: string;
|
|
88
|
+
productId?: string;
|
|
89
|
+
name: string;
|
|
90
|
+
quantity: number;
|
|
91
|
+
unitPrice: number;
|
|
92
|
+
discount: number;
|
|
93
|
+
total: number;
|
|
94
|
+
/** Free text the kitchen reads ("sem cebola"). */
|
|
95
|
+
notes?: string;
|
|
96
|
+
/** De quem é a linha. Ausente = da mesa, que é o padrão e o caso comum. */
|
|
97
|
+
guestId?: string;
|
|
98
|
+
/** Cancelada quando e por quê. A linha CONTINUA na comanda, riscada: sai da
|
|
99
|
+
* soma e não sai da vista, porque "o que foi cancelado" é a pergunta que o
|
|
100
|
+
* painel de turno responde. */
|
|
101
|
+
cancelledAt?: string;
|
|
102
|
+
cancelReason?: string;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Um participante da comanda.
|
|
106
|
+
*
|
|
107
|
+
* É a peça de que caem as outras três: se o item pertence a um participante e
|
|
108
|
+
* não à mesa, transferir item é repontar o dono, transferir participante é
|
|
109
|
+
* levá-lo com o que consumiu, e a taxa por pessoa é um percentual na linha
|
|
110
|
+
* dele. O V1 tem as quatro como quatro funcionalidades soltas.
|
|
111
|
+
*/
|
|
112
|
+
export interface ComandaGuest {
|
|
113
|
+
id: string;
|
|
114
|
+
seatNo: number;
|
|
115
|
+
label?: string;
|
|
116
|
+
/** Nulo = herda a da mesa, que herda a da casa. */
|
|
117
|
+
ownServiceChargePercent?: number;
|
|
118
|
+
/** A que vale de fato, depois das duas quedas. */
|
|
119
|
+
serviceChargePercent: number;
|
|
120
|
+
subtotal: number;
|
|
121
|
+
serviceCharge: number;
|
|
122
|
+
cancelledTotal: number;
|
|
123
|
+
itemCount: number;
|
|
124
|
+
}
|
|
125
|
+
export interface CancelReason {
|
|
126
|
+
id: string;
|
|
127
|
+
label: string;
|
|
128
|
+
isActive: boolean;
|
|
129
|
+
sortOrder: number;
|
|
130
|
+
}
|
|
131
|
+
export type TransferKind = 'table' | 'guest' | 'items';
|
|
132
|
+
export interface OrderTransfer {
|
|
133
|
+
id: string;
|
|
134
|
+
kind: TransferKind;
|
|
135
|
+
fromTableName?: string;
|
|
136
|
+
toTableName?: string;
|
|
137
|
+
guestLabel?: string;
|
|
138
|
+
itemCount: number;
|
|
139
|
+
note?: string;
|
|
140
|
+
createdAt: string;
|
|
141
|
+
}
|
|
142
|
+
/** A política da casa. Até aqui era uma CONSTANTE no código do app. */
|
|
143
|
+
export interface ComandaSettings {
|
|
144
|
+
serviceChargePercent: number;
|
|
145
|
+
cancelRequiresPin: boolean;
|
|
146
|
+
operationalDayStart: string;
|
|
147
|
+
}
|
|
148
|
+
export interface TableOrder {
|
|
149
|
+
id: string;
|
|
150
|
+
/** Human-readable comanda number. Falls back to a short id when the pool
|
|
151
|
+
* numbers nothing. */
|
|
152
|
+
reference?: string;
|
|
153
|
+
status: string;
|
|
154
|
+
guests: number;
|
|
155
|
+
seatedAt: string;
|
|
156
|
+
notes?: string;
|
|
157
|
+
waiterId?: string;
|
|
158
|
+
waiterName?: string;
|
|
159
|
+
partyName?: string;
|
|
160
|
+
lines: TableOrderLine[];
|
|
161
|
+
/** Os participantes, com o que cada um consumiu. Vazio = a conta é da mesa. */
|
|
162
|
+
participants: ComandaGuest[];
|
|
163
|
+
/** A taxa desta mesa. Nulo = a da casa. */
|
|
164
|
+
serviceChargePercent?: number;
|
|
165
|
+
subtotal: number;
|
|
166
|
+
discount: number;
|
|
167
|
+
/** A taxa de serviço em dinheiro — `orders.tax`, gravada por `comanda_recalc`
|
|
168
|
+
* e NÃO recalculada na tela. Uma segunda conta é uma conta com que discordar. */
|
|
169
|
+
tax: number;
|
|
170
|
+
total: number;
|
|
171
|
+
/** Quanto já entrou e quanto falta. No V1 esta leitura só existe no app do
|
|
172
|
+
* garçom; quem quer saber o que ainda há a receber de uma mesa não tem onde
|
|
173
|
+
* olhar na tela administrativa. */
|
|
174
|
+
paid: number;
|
|
175
|
+
due: number;
|
|
176
|
+
currency: string;
|
|
177
|
+
}
|
|
178
|
+
/** How the cardapio is grouped — the chips over the item picker. */
|
|
179
|
+
export interface TableMenuCategory {
|
|
180
|
+
id: string;
|
|
181
|
+
name: string;
|
|
182
|
+
}
|
|
183
|
+
/** Something sellable that can go on a comanda. */
|
|
184
|
+
export interface TableMenuItem {
|
|
185
|
+
id: string;
|
|
186
|
+
name: string;
|
|
187
|
+
price: number;
|
|
188
|
+
categoryId?: string;
|
|
189
|
+
categoryName?: string;
|
|
190
|
+
imageUrl?: string;
|
|
191
|
+
}
|
|
192
|
+
export interface AddTableOrderLineInput {
|
|
193
|
+
productId?: string;
|
|
194
|
+
name: string;
|
|
195
|
+
quantity: number;
|
|
196
|
+
unitPrice: number;
|
|
197
|
+
notes?: string;
|
|
198
|
+
/** Lança na conta deste participante. Ausente = na da mesa. */
|
|
199
|
+
guestId?: string;
|
|
200
|
+
}
|
|
201
|
+
export interface DiscountLineInput {
|
|
202
|
+
lineIds: string[];
|
|
203
|
+
mode: 'percent' | 'amount';
|
|
204
|
+
value: number;
|
|
205
|
+
}
|
|
206
|
+
export interface CancelLineInput {
|
|
207
|
+
lineIds: string[];
|
|
208
|
+
reason: string;
|
|
209
|
+
}
|
|
210
|
+
export interface TransferInput {
|
|
211
|
+
kind: TransferKind;
|
|
212
|
+
/** `table`: para qual mesa vai a comanda inteira. */
|
|
213
|
+
toTableId?: string;
|
|
214
|
+
/** `guest`: qual participante se muda, e para qual comanda. */
|
|
215
|
+
guestId?: string;
|
|
216
|
+
toOrderId?: string;
|
|
217
|
+
/** `items`: quais linhas mudam de dono, e para quem. */
|
|
218
|
+
lineIds?: string[];
|
|
219
|
+
toGuestId?: string | null;
|
|
220
|
+
note?: string;
|
|
221
|
+
}
|
|
84
222
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,CAAA;AAC5E,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,WAAW,GAAG,KAAK,CAAA;AAMjE,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,WAAW,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,UAAU,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IAEjB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,iB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A;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,IAAI,EAAE,SAAS,GAAG,QAAQ,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ComandaGuest, RestaurantTable, TableOrder } from '../types';
|
|
3
|
+
/** O rótulo pelo qual o garçom chama esta pessoa. */
|
|
4
|
+
export declare function guestLabel(g: ComandaGuest): string;
|
|
5
|
+
/**
|
|
6
|
+
* Mesa · Pessoa 1 · Pessoa 2 · +
|
|
7
|
+
*
|
|
8
|
+
* `Mesa` fica sempre à esquerda e é o padrão. A maioria das mesas não divide a
|
|
9
|
+
* conta, e obrigar a escolher uma pessoa antes de lançar uma cerveja seria um
|
|
10
|
+
* passo a mais por item, a noite inteira — por isso "sem participante" não é um
|
|
11
|
+
* estado inválido, é o normal.
|
|
12
|
+
*/
|
|
13
|
+
export declare function ParticipantBar({ order }: {
|
|
14
|
+
order: TableOrder;
|
|
15
|
+
}): React.JSX.Element;
|
|
16
|
+
export declare function DiscountDialog({ order, onClose }: {
|
|
17
|
+
order: TableOrder;
|
|
18
|
+
onClose: () => void;
|
|
19
|
+
}): React.JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* Cancelar item COM motivo.
|
|
22
|
+
*
|
|
23
|
+
* O motivo é obrigatório, e não por burocracia: é ele que alimenta o ranking
|
|
24
|
+
* "Top Itens Cancelados" — a única tela do V1 que responde "o que a cozinha
|
|
25
|
+
* mais devolveu" com nome e dinheiro. Cancelamento sem motivo é prejuízo sem
|
|
26
|
+
* causa registrada.
|
|
27
|
+
*/
|
|
28
|
+
export declare function CancelDialog({ order, onClose }: {
|
|
29
|
+
order: TableOrder;
|
|
30
|
+
onClose: () => void;
|
|
31
|
+
}): React.JSX.Element;
|
|
32
|
+
export declare function TransferDialog({ order, tables, onClose }: {
|
|
33
|
+
order: TableOrder;
|
|
34
|
+
tables: RestaurantTable[];
|
|
35
|
+
onClose: () => void;
|
|
36
|
+
}): React.JSX.Element;
|
|
37
|
+
/**
|
|
38
|
+
* A taxa desta mesa e a de cada participante.
|
|
39
|
+
*
|
|
40
|
+
* Três níveis caindo um no outro (casa → mesa → participante) é a regra que o
|
|
41
|
+
* V1 escreve na tela — "Deixe em branco para usar a taxa geral (13%)" — e que
|
|
42
|
+
* aqui está declarada uma vez no formato de dado, em vez de reimplementada em
|
|
43
|
+
* cada diálogo. Campo vazio é a herança, e a tela diz de quem se herda.
|
|
44
|
+
*/
|
|
45
|
+
export declare function ServiceChargeDialog({ order, housePercent, onClose }: {
|
|
46
|
+
order: TableOrder;
|
|
47
|
+
housePercent: number;
|
|
48
|
+
onClose: () => void;
|
|
49
|
+
}): React.JSX.Element;
|
|
50
|
+
/** O que o V1 mostra e ninguém consegue reconstruir depois: lá a transferência
|
|
51
|
+
* reescreve o destino e não deixa rastro. */
|
|
52
|
+
export declare function TransferHistoryDialog({ onClose }: {
|
|
53
|
+
onClose: () => void;
|
|
54
|
+
}): React.JSX.Element;
|
|
55
|
+
export type ComandaVerb = 'discount' | 'cancel' | 'transfer' | 'history' | 'service';
|
|
56
|
+
/** Os cinco verbos, numa fita só. Nenhum deles é o botão primário: o primário
|
|
57
|
+
* da comanda é lançar item, e "fechar conta" é o único que termina a mesa —
|
|
58
|
+
* os dois ficam fora daqui de propósito. */
|
|
59
|
+
export declare function ComandaVerbs({ onPick, disabled }: {
|
|
60
|
+
onPick: (verb: ComandaVerb) => void;
|
|
61
|
+
disabled?: boolean;
|
|
62
|
+
}): React.JSX.Element;
|
|
63
|
+
//# sourceMappingURL=ComandaActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComandaActions.d.ts","sourceRoot":"","sources":["../../src/views/ComandaActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAiBzE,qDAAqD;AACrD,wBAAgB,UAAU,CAAC,CAAC,EAAE,YAAY,GAAG,MAAM,CAElD;AAMD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,UAAU,CAAA;CAAE,qBAmE9D;AAqDD,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,qBAkF5F;AAMD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,qBAwE1F;AAMD,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;IACzD,KAAK,EAAE,UAAU,CAAA;IACjB,MAAM,EAAE,eAAe,EAAE,CAAA;IACzB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,qBAyFA;AAMD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE;IACpE,KAAK,EAAE,UAAU,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,qBAiGA;AAYD;8CAC8C;AAC9C,wBAAgB,qBAAqB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,qBAyCzE;AAMD,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAA;AAEpF;;6CAE6C;AAC7C,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE;IACjD,MAAM,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAA;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,qBAkBA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComandaSettingsView.d.ts","sourceRoot":"","sources":["../../src/views/ComandaSettingsView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAmCzB,wBAAgB,mBAAmB,sBAkKlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloorPlanView.d.ts","sourceRoot":"","sources":["../../src/views/FloorPlanView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"FloorPlanView.d.ts","sourceRoot":"","sources":["../../src/views/FloorPlanView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAA;AAsHjD,wBAAgB,aAAa,sBA2I5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableRailPage.d.ts","sourceRoot":"","sources":["../../src/views/TableRailPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AA8XzB,wBAAgB,aAAa,6BA2T5B"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"status": "beta",
|
|
5
5
|
"dependencies": []
|
|
6
6
|
},
|
|
7
|
-
"version": "0.10.
|
|
7
|
+
"version": "0.10.4",
|
|
8
8
|
"description": "Fayz SDK — plugin-tables plugin",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"sideEffects": false,
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"sonner": "^2.0.7"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@fayz-ai/core": "^0.
|
|
31
|
+
"@fayz-ai/core": "^0.19.0",
|
|
32
32
|
"@fayz-ai/sdk": "^0.15.0",
|
|
33
|
-
"@fayz-ai/admin": "^0.
|
|
34
|
-
"@fayz-ai/ui": "^0.
|
|
33
|
+
"@fayz-ai/admin": "^0.19.0",
|
|
34
|
+
"@fayz-ai/ui": "^0.19.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/react": "^18.3.0",
|