MED-151: add profile view and working smoking dashboard card (#71)

* MED-151: add profile view and working smoking dashboard card

* update zod

* move some components to shared

* move some components to shared

* remove console.logs

* remove unused password form components

* only check null for variant

* use pathsconfig
This commit is contained in:
Helena
2025-09-04 12:17:54 +03:00
committed by GitHub
parent 152ec5f36b
commit 9122acc89f
74 changed files with 4081 additions and 3531 deletions

View File

@@ -0,0 +1,43 @@
ALTER TABLE medreport.account_params
ADD is_smoker boolean;
CREATE UNIQUE INDEX params_account_id_pkey ON medreport.account_params USING btree (account_id);
alter table medreport.account_params add constraint "params_account_id_pkey" UNIQUE using index "params_account_id_pkey";
alter policy "users can insert their params"
on "medreport"."account_params"
to authenticated
with check (
account_id in (
select id
from medreport.accounts
where primary_owner_user_id = auth.uid()
)
);
alter policy "users can read their params"
on "medreport"."account_params"
to authenticated
using (
account_id in (
select id
from medreport.accounts
where primary_owner_user_id = auth.uid()
)
);
create policy "users can update their params"
on "medreport"."account_params"
as PERMISSIVE
for UPDATE
to authenticated
using (
account_id in (
select id
from medreport.accounts
where primary_owner_user_id = auth.uid()
)
);