diff --git a/components/card/card.js b/components/card/card.js index d660281..67de49e 100644 --- a/components/card/card.js +++ b/components/card/card.js @@ -31,7 +31,7 @@ export default function Card({item}) {
  • { item.number_in_stock > 0 - ? `${item.number_in_stock} pairs in stock` + ? `${item.number_in_stock} pair${item.number_in_stock > 1 ? 's':''} in stock` : 'Currently out of stock' }
  • diff --git a/db/sql/1-tables.sql b/db/sql/1-tables.sql index d221f38..ab5b34f 100644 --- a/db/sql/1-tables.sql +++ b/db/sql/1-tables.sql @@ -140,7 +140,7 @@ create table sos."delivery_hand_delivered" ( create table sos."order" ( order_uuid uuid primary key default uuid_generate_v4(), - order_number int not null serial unique, + order_number serial not null unique, order_start_time timestamptz not null default now(), order_user_uuid uuid references sos."user" (user_uuid), order_address_uuid uuid references sos."address" (address_uuid), diff --git a/db/sql/2-views.sql b/db/sql/2-views.sql index c5e79de..1250283 100644 --- a/db/sql/2-views.sql +++ b/db/sql/2-views.sql @@ -73,7 +73,6 @@ create or replace view sos.v_cart_price as select cart_uuid, cart_item_uuid, sum(item_price_cents * cart_item_count) / count(cart_item_uuid) as cart_item_price from sos.v_cart - where cart_uuid = '713edf11-22db-4ff1-b6b5-8ac7e2b9c99e' group by cart_uuid, cart_item_uuid ) carts group by cart_uuid;