@fayz-ai/plugin-reservations 0.2.32 → 0.2.33

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/index.js CHANGED
@@ -3,6 +3,7 @@ export { DEFAULT_SETTINGS, createCoreReservationsProvider } from './chunk-CJIXUA
3
3
  import React from 'react';
4
4
  import { createStore } from 'zustand/vanilla';
5
5
  import { toast } from 'sonner';
6
+ export { MIGRATIONS as reservationsMigrations } from '#migrations/main';
6
7
 
7
8
  // src/data/mock.ts
8
9
  var TENANT = "mock-tenant";
@@ -417,426 +418,6 @@ var RESERVATION_STATUSES = [
417
418
  ];
418
419
  var CAPACITY_MODES = ["fixed_duration", "per_slot_duration", "no_duration"];
419
420
  var OCCASIONS = ["birthday", "date", "business", "wedding", "graduation", "other"];
420
-
421
- // src/migrations/index.ts
422
- var MIGRATION_001_RESERVATIONS = `-- plugin-reservations \u2014 a mesa guardada para mais tarde.
423
- --
424
- -- WHY THIS IS NOT THE AGENDA. \`plugin-agenda\` schedules a PERSON's time: a
425
- -- column per professional, services with durations, an assignee. A restaurant
426
- -- reservation has neither professional nor service \u2014 it spends the SEATS OF A
427
- -- ROOM inside a time window. resto-saas shipped \`createAgendaPlugin({
428
- -- bookingKind: 'reservation' })\` with the labels swapped, and the screen came
429
- -- out with nine staff columns over the word "Reservas". A booking kind cannot
430
- -- change which resource is scarce.
431
- --
432
- -- The V1 (~/dev/beautyplace/docs/v1-guide/restaurante/reservas) models this
433
- -- correctly and we keep its model \u2014 local \xD7 faixa \xD7 dia da semana, with
434
- -- exceptions that override the weekly grid \u2014 with three deliberate changes,
435
- -- each written where it happens below.
436
- --
437
- -- Idempotent.
438
-
439
- -- ---------------------------------------------------------------------------
440
- -- Policy \u2014 one row per tenant.
441
- -- ---------------------------------------------------------------------------
442
- create table if not exists public.plg_reservations_settings (
443
- tenant_id uuid primary key references public.tenants(id) on delete cascade,
444
- -- V1's three modes, same words. \`no_duration\` is the V1 default and the one
445
- -- its own legend explains best: "a capacidade \xE9 o teto de pessoas que pode
446
- -- iniciar dentro da faixa, sem rolagem entre faixas" \u2014 the reservation spends
447
- -- the slot it STARTS in.
448
- capacity_mode text not null default 'no_duration'
449
- check (capacity_mode in ('fixed_duration','per_slot_duration','no_duration')),
450
- default_duration_minutes integer not null default 120 check (default_duration_minutes > 0),
451
- -- CHANGE 2 of 3: the V1 asks for minimum notice in MINUTES (1440) and maximum
452
- -- in DAYS (90), in the same pair of fields. Both are hours/days here and the
453
- -- UI writes the equivalent out beside them.
454
- min_advance_hours integer not null default 24 check (min_advance_hours >= 0),
455
- max_advance_days integer not null default 90 check (max_advance_days > 0),
456
- auto_confirm boolean not null default false,
457
- require_phone boolean not null default true,
458
- require_email boolean not null default false,
459
- created_at timestamptz not null default now(),
460
- updated_at timestamptz not null default now()
461
- );
462
-
463
- -- ---------------------------------------------------------------------------
464
- -- The weekly grid \u2014 one row per zone \xD7 window \xD7 set of weekdays.
465
- -- ---------------------------------------------------------------------------
466
- create table if not exists public.plg_reservations_capacity_rules (
467
- id uuid primary key default gen_random_uuid(),
468
- tenant_id uuid not null references public.tenants(id) on delete cascade,
469
- -- CHANGE 1 of 3: capacity is per PRA\xC7A, not per a cadastro of its own.
470
- --
471
- -- The V1 splits these: capacity lives on \`service_locations\` (Cadastros \u2192
472
- -- Locais Operacionais) while the mesa lives on \`restaurant_sections\` (the
473
- -- Sal\xE3o screen). Two cadastros with similar names, and its own document says
474
- -- "nada na tela avisa" \u2014 whoever registered the pra\xE7as does not find those
475
- -- names when configuring the lota\xE7\xE3o. We already own zones with mesas inside
476
- -- them; a third cadastro would re-import the confusion and buy nothing.
477
- --
478
- -- Nullable = the house as a whole, for a restaurant with one room.
479
- zone_id uuid references public.plg_tables_zones(id) on delete cascade,
480
- capacity integer not null check (capacity > 0),
481
- start_time time not null,
482
- end_time time not null,
483
- -- 0=Sunday..6=Saturday, matching Date#getDay and plugin-menu's availability.
484
- weekdays smallint[] not null default '{0,1,2,3,4,5,6}',
485
- -- Only read in \`per_slot_duration\` mode; null falls back to the default.
486
- duration_minutes integer check (duration_minutes is null or duration_minutes > 0),
487
- is_active boolean not null default true,
488
- created_at timestamptz not null default now(),
489
- updated_at timestamptz not null default now(),
490
- check (end_time > start_time)
491
- );
492
-
493
- -- ---------------------------------------------------------------------------
494
- -- Exceptions \u2014 "Exce\xE7\xF5es sobrep\xF5em a grade semanal para o(s) dia(s) cobertos
495
- -- no mesmo local." (V1, literal). A row with capacity 0 closes the zone.
496
- -- ---------------------------------------------------------------------------
497
- create table if not exists public.plg_reservations_capacity_exceptions (
498
- id uuid primary key default gen_random_uuid(),
499
- tenant_id uuid not null references public.tenants(id) on delete cascade,
500
- zone_id uuid references public.plg_tables_zones(id) on delete cascade,
501
- starts_on date not null,
502
- ends_on date not null,
503
- -- Null start/end = the whole day. Zero capacity = closed.
504
- start_time time,
505
- end_time time,
506
- capacity integer not null default 0 check (capacity >= 0),
507
- reason text,
508
- created_at timestamptz not null default now(),
509
- updated_at timestamptz not null default now(),
510
- check (ends_on >= starts_on)
511
- );
512
-
513
- -- ---------------------------------------------------------------------------
514
- -- The reservations.
515
- -- ---------------------------------------------------------------------------
516
- create table if not exists public.plg_reservations (
517
- id uuid primary key default gen_random_uuid(),
518
- tenant_id uuid not null references public.tenants(id) on delete cascade,
519
- person_id uuid references public.people(id) on delete set null,
520
- -- Denormalised on purpose: a reservation taken over the phone from someone
521
- -- who is not a client yet still has a name and a number to call back.
522
- guest_name text not null,
523
- phone text,
524
- email text,
525
- zone_id uuid references public.plg_tables_zones(id) on delete set null,
526
- table_id uuid references public.plg_tables_tables(id) on delete set null,
527
- reserved_on date not null,
528
- start_time time not null,
529
- end_time time,
530
- party_size integer not null check (party_size > 0),
531
- occasion text,
532
- notes text,
533
- -- V1's five states, same words: Pendente \xB7 Confirmada \xB7 Acomodada \xB7
534
- -- N\xE3o compareceu \xB7 Cancelada.
535
- status text not null default 'pending'
536
- check (status in ('pending','confirmed','seated','no_show','cancelled')),
537
- -- CHANGE 3 of 3: \`seated\` opens the mesa.
538
- --
539
- -- In the V1, reservation and comanda are separate universes \u2014 marking
540
- -- Acomodada creates no comanda at all, and the night's money never knows a
541
- -- reservation happened. Here \`seated\` is the moment the party becomes a
542
- -- comanda, and this column is the join. Written by the app, not a trigger:
543
- -- opening a comanda is the tables plugin's job and it numbers the order.
544
- order_id uuid references public.orders(id) on delete set null,
545
- seated_at timestamptz,
546
- created_at timestamptz not null default now(),
547
- updated_at timestamptz not null default now()
548
- );
549
-
550
- create index if not exists plg_reservations_day_idx
551
- on public.plg_reservations (tenant_id, reserved_on, start_time);
552
- create index if not exists plg_reservations_zone_day_idx
553
- on public.plg_reservations (tenant_id, zone_id, reserved_on);
554
- create index if not exists plg_reservations_rules_zone_idx
555
- on public.plg_reservations_capacity_rules (tenant_id, zone_id);
556
- create index if not exists plg_reservations_exceptions_day_idx
557
- on public.plg_reservations_capacity_exceptions (tenant_id, starts_on, ends_on);
558
-
559
- do $$ begin
560
- create trigger plg_reservations_settings_updated_at before update on public.plg_reservations_settings
561
- for each row execute function public.handle_updated_at();
562
- exception when duplicate_object then null; end $$;
563
- do $$ begin
564
- create trigger plg_reservations_rules_updated_at before update on public.plg_reservations_capacity_rules
565
- for each row execute function public.handle_updated_at();
566
- exception when duplicate_object then null; end $$;
567
- do $$ begin
568
- create trigger plg_reservations_exceptions_updated_at before update on public.plg_reservations_capacity_exceptions
569
- for each row execute function public.handle_updated_at();
570
- exception when duplicate_object then null; end $$;
571
- do $$ begin
572
- create trigger plg_reservations_updated_at before update on public.plg_reservations
573
- for each row execute function public.handle_updated_at();
574
- exception when duplicate_object then null; end $$;
575
-
576
- -- ---------------------------------------------------------------------------
577
- -- RLS \u2014 the ACTIVE account, never the union.
578
- --
579
- -- \`user_tenant_ids()\` honours only a signed JWT claim; switching workspace
580
- -- happens through the \`x-fayz-tenant\` header, so it does not see the switch and
581
- -- answers with the UNION of the caller's accounts. plugin-tables learned this
582
- -- the hard way \u2014 Artorius drew Papa L\xE9guas' mesas. \`app.current_tenant_id()\`
583
- -- reads the header and validates it against app.memberships: it chooses among
584
- -- accounts you already belong to and can never widen.
585
- -- ---------------------------------------------------------------------------
586
- alter table public.plg_reservations_settings enable row level security;
587
- alter table public.plg_reservations_capacity_rules enable row level security;
588
- alter table public.plg_reservations_capacity_exceptions enable row level security;
589
- alter table public.plg_reservations enable row level security;
590
-
591
- do $$
592
- declare t text;
593
- begin
594
- foreach t in array array['plg_reservations_settings','plg_reservations_capacity_rules',
595
- 'plg_reservations_capacity_exceptions','plg_reservations'] loop
596
- execute format('drop policy if exists %I on public.%I', t || '_select', t);
597
- execute format('drop policy if exists %I on public.%I', t || '_insert', t);
598
- execute format('drop policy if exists %I on public.%I', t || '_update', t);
599
- execute format('drop policy if exists %I on public.%I', t || '_delete', t);
600
- execute format('create policy %I on public.%I for select using (tenant_id = (select app.current_tenant_id()))', t || '_select', t);
601
- execute format('create policy %I on public.%I for insert with check (tenant_id = (select app.current_tenant_id()))', t || '_insert', t);
602
- execute format('create policy %I on public.%I for update using (tenant_id = (select app.current_tenant_id()))', t || '_update', t);
603
- execute format('create policy %I on public.%I for delete using (tenant_id = (select app.current_tenant_id()))', t || '_delete', t);
604
- execute format('grant select, insert, update, delete on public.%I to authenticated', t);
605
- end loop;
606
- end $$;
607
-
608
- -- ---------------------------------------------------------------------------
609
- -- The reservation with the names already resolved. The list and the calendar
610
- -- read this, so nobody joins four tables in TypeScript to render a row.
611
- -- ---------------------------------------------------------------------------
612
- create or replace view public.v_reservations with (security_invoker = true) as
613
- select
614
- r.id, r.tenant_id, r.person_id, r.guest_name, r.phone, r.email,
615
- r.zone_id, z.name as zone_name, z.color as zone_color,
616
- r.table_id, t.number as table_number,
617
- r.reserved_on, r.start_time, r.end_time, r.party_size,
618
- r.occasion, r.notes, r.status, r.order_id, r.seated_at,
619
- o.reference_number as order_reference,
620
- r.created_at, r.updated_at
621
- from public.plg_reservations r
622
- left join public.plg_tables_zones z on z.id = r.zone_id
623
- left join public.plg_tables_tables t on t.id = r.table_id
624
- left join public.orders o on o.id = r.order_id;
625
-
626
- grant select on public.v_reservations to authenticated;
627
-
628
- -- ---------------------------------------------------------------------------
629
- -- The slots of one day, with what is left in each.
630
- --
631
- -- THIS IS THE FUNCTION THE V1 NEVER GOT RIGHT. With three rules covering all
632
- -- seven weekdays, its "Capacidade do dia" answered "Nenhuma grade configurada"
633
- -- on every date tested (V1-041), and its reservation form never called the
634
- -- availability function at all \u2014 the lota\xE7\xE3o check, if it existed, did not
635
- -- happen while anyone was deciding. Both are the reason this screen exists.
636
- --
637
- -- Returns one row per zone \xD7 window that applies to \`p_date\`, with the seats
638
- -- already spent by non-cancelled reservations STARTING inside that window \u2014
639
- -- which is what "sem rolagem entre faixas" means in the V1's own legend.
640
- --
641
- -- Exceptions OVERRIDE, they do not add: a zone with an exception covering the
642
- -- date returns the exception's windows and none of the weekly ones. A capacity
643
- -- of 0 therefore closes the zone for the day without deleting the grid.
644
- -- ---------------------------------------------------------------------------
645
- create or replace function public.reservations_day_capacity(p_date date)
646
- returns table (
647
- zone_id uuid,
648
- zone_name text,
649
- zone_color text,
650
- start_time time,
651
- end_time time,
652
- capacity integer,
653
- booked integer,
654
- remaining integer,
655
- is_exception boolean
656
- )
657
- language sql
658
- stable
659
- security invoker
660
- set search_path = public
661
- as $$
662
- with tenant as (select app.current_tenant_id() as id),
663
- -- Which zones had their day overridden. Checked per zone, so a holiday in the
664
- -- Varanda does not silence the grid of the Sal\xE3o.
665
- overridden as (
666
- select distinct e.zone_id
667
- from public.plg_reservations_capacity_exceptions e, tenant
668
- where e.tenant_id = tenant.id
669
- and p_date between e.starts_on and e.ends_on
670
- ),
671
- slots as (
672
- select e.zone_id, e.start_time, e.end_time, e.capacity, true as is_exception
673
- from public.plg_reservations_capacity_exceptions e, tenant
674
- where e.tenant_id = tenant.id
675
- and p_date between e.starts_on and e.ends_on
676
- and e.capacity > 0
677
- -- A whole-day exception still has to draw SOMETHING, so it borrows the
678
- -- house's widest window rather than a made-up one.
679
- and coalesce(e.start_time, time '00:00') < coalesce(e.end_time, time '23:59')
680
- union all
681
- select r.zone_id, r.start_time, r.end_time, r.capacity, false
682
- from public.plg_reservations_capacity_rules r, tenant
683
- where r.tenant_id = tenant.id
684
- and r.is_active
685
- -- extract(dow) is 0=Sunday..6=Saturday, the same axis \`weekdays\` uses.
686
- and extract(dow from p_date)::smallint = any (r.weekdays)
687
- and (r.zone_id is null or r.zone_id not in (select o.zone_id from overridden o where o.zone_id is not null))
688
- )
689
- select
690
- s.zone_id,
691
- z.name as zone_name,
692
- z.color as zone_color,
693
- coalesce(s.start_time, time '00:00') as start_time,
694
- coalesce(s.end_time, time '23:59') as end_time,
695
- s.capacity,
696
- coalesce(b.booked, 0)::integer as booked,
697
- greatest(s.capacity - coalesce(b.booked, 0), 0)::integer as remaining,
698
- s.is_exception
699
- from slots s
700
- left join public.plg_tables_zones z on z.id = s.zone_id
701
- left join lateral (
702
- select sum(v.party_size)::integer as booked
703
- from public.plg_reservations v, tenant
704
- where v.tenant_id = tenant.id
705
- and v.reserved_on = p_date
706
- and v.status <> 'cancelled'
707
- and (s.zone_id is null or v.zone_id is not distinct from s.zone_id)
708
- -- The reservation spends the window it STARTS in.
709
- and v.start_time >= coalesce(s.start_time, time '00:00')
710
- and v.start_time < coalesce(s.end_time, time '23:59')
711
- ) b on true
712
- order by coalesce(s.start_time, time '00:00'), z.name nulls first;
713
- $$;
714
-
715
- grant execute on function public.reservations_day_capacity(date) to authenticated;
716
- `;
717
- var MIGRATION_002_A_RESERVA_E_DE_UMA_CASA = `-- A reserva \xE9 de uma casa.
718
- --
719
- -- \`plg_reservations\`, \`plg_reservations_settings\` e
720
- -- \`plg_reservations_capacity_rules\` n\xE3o t\xEAm \`unit_id\`. O V1 tem, nas tr\xEAs:
721
- -- \`reservations.unit_id\`, \`reservation_settings.unit_id\`,
722
- -- \`reservation_capacity_rules.unit_id\`.
723
- --
724
- -- Uma reserva sem unidade aparece na agenda de todas as filiais, e a regra de
725
- -- capacidade de uma casa passa a limitar a outra \u2014 que \xE9 o pior dos dois, porque
726
- -- recusa cliente em sil\xEAncio.
727
- --
728
- -- A configura\xE7\xE3o \xE9 o caso mais claro: \`reservation_settings\` existe PARA ser
729
- -- por unidade. Sem a coluna, a casa que abre \xE0s 19h e a que abre \xE0s 12h t\xEAm de
730
- -- concordar num hor\xE1rio s\xF3.
731
- --
732
- -- Idempotente.
733
-
734
- DO $$
735
- DECLARE t text;
736
- BEGIN
737
- FOREACH t IN ARRAY ARRAY['plg_reservations', 'plg_reservations_settings',
738
- 'plg_reservations_capacity_rules',
739
- 'plg_reservations_capacity_exceptions'] LOOP
740
- IF to_regclass('public.' || t) IS NULL THEN CONTINUE; END IF;
741
- EXECUTE format('ALTER TABLE public.%I ADD COLUMN IF NOT EXISTS unit_id uuid', t);
742
- IF NOT EXISTS (SELECT 1 FROM pg_constraint WHERE conname = t || '_unit_fkey') THEN
743
- EXECUTE format('ALTER TABLE public.%I ADD CONSTRAINT %I FOREIGN KEY (tenant_id, unit_id) REFERENCES app.units(tenant_id, id) ON DELETE SET NULL', t, t || '_unit_fkey');
744
- END IF;
745
- EXECUTE format('COMMENT ON COLUMN public.%I.unit_id IS %L', t,
746
- 'A casa a que a reserva pertence. V1: reservations.unit_id / reservation_settings.unit_id / reservation_capacity_rules.unit_id (002).');
747
- END LOOP;
748
- END $$;
749
-
750
- -- "quais reservas desta casa, neste dia" \xE9 a consulta do ma\xEEtre, e ela roda a
751
- -- cada abertura de turno.
752
- DO $$ BEGIN
753
- IF EXISTS (SELECT 1 FROM pg_attribute a
754
- WHERE a.attrelid = 'public.plg_reservations'::regclass
755
- AND a.attname = 'starts_at' AND NOT a.attisdropped) THEN
756
- CREATE INDEX IF NOT EXISTS plg_reservations_unit_day_idx
757
- ON public.plg_reservations USING btree (tenant_id, unit_id, starts_at);
758
- END IF;
759
- END $$;
760
-
761
- -- Uma configura\xE7\xE3o por casa. Duas seriam duas respostas para "a que horas
762
- -- abrimos" \u2014 e a tela leria a primeira que viesse.
763
- CREATE UNIQUE INDEX IF NOT EXISTS plg_reservations_settings_unit_uidx
764
- ON public.plg_reservations_settings USING btree (tenant_id, unit_id)
765
- WHERE unit_id IS NOT NULL;
766
- `;
767
- var MIGRATION_003_QUEM_CHEGOU_JA_ESTA_NA_CASA_ANTES_DE_SENTAR = `-- Quem chegou j\xE1 est\xE1 na casa, antes de sentar.
768
- --
769
- -- A reserva tinha cinco estados e nenhum deles respondia \xE0 pergunta que o
770
- -- anfitri\xE3o faz a noite inteira: **essa gente j\xE1 est\xE1 aqui?** Entre \xABConfirmada\xBB
771
- -- (prometeu vir) e \xABAcomodada\xBB (est\xE1 na mesa) existe um terceiro fato \u2014 o grupo
772
- -- est\xE1 de p\xE9 na recep\xE7\xE3o esperando a mesa vagar \u2014, e sem ele o anfitri\xE3o marca
773
- -- a reserva como acomodada s\xF3 para tir\xE1-la da lista, o que abre uma comanda
774
- -- numa mesa que ningu\xE9m ocupou.
775
- --
776
- -- N\xC3O \xE9 porte: o V1 tamb\xE9m tem cinco estados
777
- -- (\`pending,confirmed,seated,no_show,cancelled\`, em
778
- -- \`20260622220606_*.sql\`) e nunca teve check-in. \xC9 desenho novo, pedido pelo
779
- -- founder para a tela de controle de entrada, onde reserva e fila de espera
780
- -- passam a conviver: chegar \xE9 o gesto que p\xF5e a reserva NA FILA, e sentar
781
- -- continua sendo o gesto que abre a comanda.
782
- --
783
- -- \`arrived\` entra ANTES de \`seated\` na ordem do CHECK para deixar a leitura do
784
- -- ciclo \xF3bvia para quem abrir esta tabela depois.
785
- --
786
- -- Idempotente.
787
-
788
- ALTER TABLE public.plg_reservations
789
- ADD COLUMN IF NOT EXISTS arrived_at timestamptz;
790
-
791
- -- O CHECK \xE9 reescrito, n\xE3o somado: um \`ADD CONSTRAINT\` com outro nome deixaria
792
- -- os dois valendo, e o antigo recusaria \`arrived\` de qualquer jeito \u2014 Postgres
793
- -- exige que TODOS passem.
794
- ALTER TABLE public.plg_reservations
795
- DROP CONSTRAINT IF EXISTS plg_reservations_status_check;
796
- ALTER TABLE public.plg_reservations
797
- ADD CONSTRAINT plg_reservations_status_check
798
- CHECK (status IN ('pending','confirmed','arrived','seated','no_show','cancelled'));
799
-
800
- COMMENT ON COLUMN public.plg_reservations.arrived_at IS
801
- 'Quando o grupo se apresentou na recep\xE7\xE3o. Chegar N\xC3O abre comanda: quem abre \xE9 o seat.';
802
-
803
- -- A VISTA precisa carregar a coluna nova, sen\xE3o o motor existe e a tela n\xE3o o
804
- -- enxerga: \`v_reservations\` lista coluna a coluna (n\xE3o \xE9 \`r.*\`), e toda leitura
805
- -- do plugin passa por ela. Sem esta parte, \`arrived_at\` seria gravado e nunca
806
- -- lido \u2014 o defeito de "ler de A e escrever em B", que s\xF3 aparece na tela.
807
- --
808
- -- \`security_invoker=true\` \xE9 repetido de prop\xF3sito: um \`CREATE OR REPLACE\` sem
809
- -- ele devolveria a vista para o dono e a RLS deixaria de recortar por conta.
810
- --
811
- -- E \`arrived_at\` vai no FIM da lista, n\xE3o ao lado de \`seated_at\` onde ele
812
- -- faria sentido para quem l\xEA: \`CREATE OR REPLACE VIEW\` s\xF3 sabe ACRESCENTAR
813
- -- coluna no fim \u2014 p\xF4-la no meio renomeia as seguintes e o Postgres recusa
814
- -- (\xABuse ALTER VIEW ... RENAME COLUMN\xBB). Trocar por DROP + CREATE derrubaria
815
- -- as permiss\xF5es junto.
816
- CREATE OR REPLACE VIEW public.v_reservations
817
- WITH (security_invoker = true) AS
818
- SELECT r.id, r.tenant_id, r.person_id, r.guest_name, r.phone, r.email,
819
- r.zone_id, z.name AS zone_name, z.color AS zone_color,
820
- r.table_id, t.number AS table_number,
821
- r.reserved_on, r.start_time, r.end_time, r.party_size,
822
- r.occasion, r.notes, r.status, r.order_id, r.seated_at,
823
- o.reference_number AS order_reference,
824
- r.created_at, r.updated_at,
825
- r.arrived_at
826
- FROM public.plg_reservations r
827
- LEFT JOIN public.plg_tables_zones z ON z.id = r.zone_id
828
- LEFT JOIN public.plg_tables_tables t ON t.id = r.table_id
829
- LEFT JOIN public.orders o ON o.id = r.order_id;
830
-
831
- GRANT SELECT ON public.v_reservations TO authenticated;
832
- `;
833
- var MIGRATIONS = [
834
- { id: "001_reservations", sql: MIGRATION_001_RESERVATIONS },
835
- { id: "002_a_reserva_e_de_uma_casa", sql: MIGRATION_002_A_RESERVA_E_DE_UMA_CASA },
836
- { id: "003_quem_chegou_ja_esta_na_casa_antes_de_sentar", sql: MIGRATION_003_QUEM_CHEGOU_JA_ESTA_NA_CASA_ANTES_DE_SENTAR }
837
- ];
838
-
839
- // src/index.ts
840
421
  var ReservationsPage = React.lazy(() => import('./ReservationsPage-SLC7HM7R.js').then((m) => ({ default: m.ReservationsPage })));
841
422
  var ReservationsSettingsPage = React.lazy(() => import('./ReservationsPage-SLC7HM7R.js').then((m) => ({ default: m.ReservationsSettingsPage })));
842
423
  var DEFAULT_LABELS = {
@@ -984,6 +565,6 @@ function createReservationsPlugin(options) {
984
565
  };
985
566
  }
986
567
 
987
- export { CAPACITY_MODES, OCCASIONS, RESERVATION_STATUSES, createMockReservationsProvider, createReservationsPlugin, MIGRATIONS as reservationsMigrations };
568
+ export { CAPACITY_MODES, OCCASIONS, RESERVATION_STATUSES, createMockReservationsProvider, createReservationsPlugin };
988
569
  //# sourceMappingURL=index.js.map
989
570
  //# sourceMappingURL=index.js.map