Skip to content

Commit

Permalink
login in Convertim now logs in even user on e-shop if phone number an…
Browse files Browse the repository at this point in the history
…d e-mail are same as in Convertim
  • Loading branch information
TomasLudvik committed Jan 16, 2025
1 parent 3ad0667 commit 5a43508
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/config/shopsys-routing/routing_front_cs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ front_stores:

front_complaint_detail:
path: /zakaznik/detail-reklamace

front_cart:
path: /kosik
3 changes: 3 additions & 0 deletions app/config/shopsys-routing/routing_front_en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ front_stores:

front_complaint_detail:
path: /customer/complaint-detail

front_cart:
path: /cart
3 changes: 3 additions & 0 deletions app/config/shopsys-routing/routing_front_sk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ front_stores:

front_complaint_detail:
path: /zakaznik/detail-reklamace

front_cart:
path: /kosik
5 changes: 5 additions & 0 deletions storefront/components/Pages/Cart/Convertim.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { useTransportsWithPaymentsAndStoresForConvertimQuery } from 'graphql/req
import useTranslation from 'next-translate/useTranslation';
import { useCallback } from 'react';
import { usePersistStore } from 'store/usePersistStore';
import { useLogout } from 'utils/auth/useLogout';
import { useFormatPrice } from 'utils/formatting/useFormatPrice';

type ConvertimProps = { cart?: TypeCartFragment | null; convertimProjectUuid: string };
Expand All @@ -26,6 +27,7 @@ export const Convertim: FC<ConvertimProps> = ({ cart, convertimProjectUuid }) =>
useTransportsWithPaymentsAndStoresForConvertimQuery({
variables: { cartUuid: cart?.uuid ?? null, displayInCartOnly: false },
});
const logout = useLogout();

const dayNames = [
t('Monday'),
Expand Down Expand Up @@ -79,6 +81,9 @@ export const Convertim: FC<ConvertimProps> = ({ cart, convertimProjectUuid }) =>
validateCustomZipTransport: (transportId: string, postalCode: string, setResult: () => void) => {
setResult();
},
afterLogout: () => {
logout();
},
}}
/>
);
Expand Down

0 comments on commit 5a43508

Please sign in to comment.