diff --git a/README.md b/README.md index 3ace0ef..f3cca27 100644 --- a/README.md +++ b/README.md @@ -106,10 +106,12 @@ To access admin pages follow these steps: 1. Customer adds analysis to cart in **B2B** storefront 2. Customer checks out from cart and is redirected to **Montonio** 3. Customer pays and is redirected back to **B2B** `GET B2B/home/cart/montonio-callback?order-token=$JWT` - - **Medusa** order is created and cart is emptied - - email is sent to customer - - B2B sends order XML as private message to Medipost. - When **Montonio** has confirmed payment, it will call **Medusa** webhook endpoint and **Medusa** will mark order payment as captured. + +- **Medusa** order is created and cart is emptied +- email is sent to customer +- B2B sends order XML as private message to Medipost. + +When **Montonio** has confirmed payment, it will call **Medusa** webhook endpoint and **Medusa** will mark order payment as captured. In background a job will call `POST B2B/api/job/sync-analysis-results` every n minutes and sync private messages with responses from **Medipost**. @@ -121,7 +123,7 @@ In local dev environment, you can import products from B2B to Medusa with this A - `POST /api/job/sync-analysis-groups-store` - Syncs required data of `analyses`, `analysis_elements` data from **B2B** to **Medusa** and creates relevant products and categories. - If product or category already exists, then it is not recreated. Old entries are not deleted either currently. + If product or category already exists, then it is not recreated. Old entries are not deleted either currently. ## Jobs diff --git a/app/auth/update-account/_components/update-account-form.tsx b/app/auth/update-account/_components/update-account-form.tsx index d286e88..58887f0 100644 --- a/app/auth/update-account/_components/update-account-form.tsx +++ b/app/auth/update-account/_components/update-account-form.tsx @@ -8,8 +8,6 @@ import { ExternalLink } from '@/public/assets/external-link'; import { zodResolver } from '@hookform/resolvers/zod'; import { useForm } from 'react-hook-form'; -import { onUpdateAccount } from '@kit/auth/actions/update-account-actions'; -import { UpdateAccountSchema } from '@kit/auth/schemas/update-account.schema'; import { Button } from '@kit/ui/button'; import { Checkbox } from '@kit/ui/checkbox'; import { @@ -23,6 +21,9 @@ import { import { Input } from '@kit/ui/input'; import { Trans } from '@kit/ui/trans'; +import { UpdateAccountSchema } from '../_lib/schemas/update-account.schema'; +import { onUpdateAccount } from '../_lib/server/update-account'; + export function UpdateAccountForm({ user }: { user: User }) { const form = useForm({ resolver: zodResolver(UpdateAccountSchema), @@ -30,16 +31,15 @@ export function UpdateAccountForm({ user }: { user: User }) { defaultValues: { firstName: '', lastName: '', - personalCode: user.user_metadata.personalCode ?? '', + personalCode: '', email: user.email, phone: '', city: '', - weight: user.user_metadata.weight ?? undefined, - height: user.user_metadata.height ?? undefined, + weight: 0, + height: 0, userConsent: false, }, }); - return (