diff --git a/.env.development b/.env.development index 2cc0b56..ac3067a 100644 --- a/.env.development +++ b/.env.development @@ -34,6 +34,7 @@ MEDIPOST_PASSWORD=SRB48HZMV MEDIPOST_RECIPIENT=trvurgtst MEDIPOST_MESSAGE_SENDER=trvurgtst MEDIPOST_ENABLE_DISPATCH_ON_MONTONIO_CALLBACK=true +MEDIPOST_ENABLE_DELETE_RESPONSE_PRIVATE_MESSAGE_ON_READ=false #MEDIPOST_URL=https://medipost2.medisoft.ee:8443/Medipost/MedipostServlet #MEDIPOST_USER=medreport @@ -43,6 +44,7 @@ MEDIPOST_ENABLE_DISPATCH_ON_MONTONIO_CALLBACK=true #MEDIPOST_ENABLE_DISPATCH_ON_MONTONIO_CALLBACK=false # MEDUSA +COMPANY_BENEFITS_PAYMENT_SECRET_KEY=NzcwMzE2NmEtOThiMS0xMWYwLWI4NjYtMDMwZDQzMjFhMjExCg== MEDUSA_BACKEND_URL=http://localhost:9000 MEDUSA_BACKEND_PUBLIC_URL=http://localhost:9000 diff --git a/app/home/(user)/settings/_components/account-preferences-form.tsx b/app/home/(user)/settings/_components/account-preferences-form.tsx index 54aa472..7fbd6f5 100644 --- a/app/home/(user)/settings/_components/account-preferences-form.tsx +++ b/app/home/(user)/settings/_components/account-preferences-form.tsx @@ -2,8 +2,8 @@ import { zodResolver } from '@hookform/resolvers/zod'; import { useForm } from 'react-hook-form'; -import { Trans } from 'react-i18next'; +import { Trans } from '@kit/ui/trans'; import { useRevalidatePersonalAccountDataQuery } from '@kit/accounts/hooks/use-personal-account-data'; import type { AccountWithParams } from '@kit/accounts/types/accounts'; import { Button } from '@kit/ui/button'; diff --git a/app/home/(user)/settings/_components/account-settings-form.tsx b/app/home/(user)/settings/_components/account-settings-form.tsx index 2aaa91e..0ab1bdc 100644 --- a/app/home/(user)/settings/_components/account-settings-form.tsx +++ b/app/home/(user)/settings/_components/account-settings-form.tsx @@ -2,8 +2,8 @@ import { zodResolver } from '@hookform/resolvers/zod'; import { useForm } from 'react-hook-form'; -import { Trans } from 'react-i18next'; +import { Trans } from '@kit/ui/trans'; import { useRevalidatePersonalAccountDataQuery } from '@kit/accounts/hooks/use-personal-account-data'; import type { AccountWithParams } from '@kit/accounts/types/accounts'; import { Button } from '@kit/ui/button'; diff --git a/app/home/[account]/_lib/server/load-team-account-health-details.ts b/app/home/[account]/_lib/server/load-team-account-health-details.ts index 0d9136d..0827e0c 100644 --- a/app/home/[account]/_lib/server/load-team-account-health-details.ts +++ b/app/home/[account]/_lib/server/load-team-account-health-details.ts @@ -63,13 +63,13 @@ export const getAccountHealthDetailsFields = ( return [ { title: 'teams:healthDetails.women', - value: `${femalePercentage}% (${numberOfFemaleMembers})`, + value: `${femalePercentage.toFixed(0)}% (${numberOfFemaleMembers})`, Icon: User, iconBg: 'bg-success', }, { title: 'teams:healthDetails.men', - value: `${malePercentage}% (${numberOfMaleMembers})`, + value: `${malePercentage.toFixed(0)}% (${numberOfMaleMembers})`, Icon: User, iconBg: 'bg-success', }, diff --git a/lib/services/medipost/medipostPrivateMessage.service.ts b/lib/services/medipost/medipostPrivateMessage.service.ts index 8c27f84..12afeee 100644 --- a/lib/services/medipost/medipostPrivateMessage.service.ts +++ b/lib/services/medipost/medipostPrivateMessage.service.ts @@ -43,7 +43,9 @@ const USER = process.env.MEDIPOST_USER!; const PASSWORD = process.env.MEDIPOST_PASSWORD!; const RECIPIENT = process.env.MEDIPOST_RECIPIENT!; -const IS_ENABLED_DELETE_PRIVATE_MESSAGE = false as boolean; +const IS_ENABLED_DELETE_PRIVATE_MESSAGE = + process.env.MEDIPOST_ENABLE_DELETE_RESPONSE_PRIVATE_MESSAGE_ON_READ === + 'true'; export async function getLatestPrivateMessageListItem({ excludedMessageIds, @@ -436,6 +438,9 @@ export async function readPrivateMessageResponse({ medusaOrderId, orderStatus: 'PARTIAL_ANALYSIS_RESPONSE', }); + if (IS_ENABLED_DELETE_PRIVATE_MESSAGE) { + await deletePrivateMessage(privateMessageId); + } hasAnalysisResponse = true; hasPartialAnalysisResponse = true; } else if (status.isCompleted) { diff --git a/packages/features/medusa-storefront/src/lib/data/orders.ts b/packages/features/medusa-storefront/src/lib/data/orders.ts index 8a655cb..464a747 100644 --- a/packages/features/medusa-storefront/src/lib/data/orders.ts +++ b/packages/features/medusa-storefront/src/lib/data/orders.ts @@ -25,6 +25,7 @@ export const retrieveOrder = async (id: string, allowCache = true) => { headers, next, ...(allowCache ? { cache: 'force-cache' } : {}), + credentials: 'include', }) .then(({ order }) => order) .catch((err) => medusaError(err)); @@ -55,6 +56,7 @@ export const listOrders = async ( }, headers, next, + credentials: 'include', }) .then(({ orders }) => orders) .catch((err) => medusaError(err));