Merge branch 'develop' into feature/MED-129

This commit is contained in:
Danel Kungla
2025-09-24 15:00:27 +03:00
622 changed files with 19603 additions and 10824 deletions

View File

@@ -20,7 +20,7 @@ const HealthBenefitFields = () => {
return (
<div className="flex flex-col gap-3">
<FormField
name="occurance"
name="occurrence"
render={({ field }) => (
<FormItem>
<FormLabel>
@@ -30,20 +30,22 @@ const HealthBenefitFields = () => {
<Select {...field} onValueChange={field.onChange}>
<SelectTrigger>
<SelectValue
placeholder={<Trans i18nKey="common:formField:occurance" />}
placeholder={
<Trans i18nKey="common:formField:occurrence" />
}
/>
</SelectTrigger>
<SelectContent>
<SelectGroup>
<SelectItem value="yearly">
<Trans i18nKey="billing:occurance.yearly" />
<Trans i18nKey="billing:occurrence.yearly" />
</SelectItem>
<SelectItem value="quarterly">
<Trans i18nKey="billing:occurance.quarterly" />
<Trans i18nKey="billing:occurrence.quarterly" />
</SelectItem>
<SelectItem value="monthly">
<Trans i18nKey="billing:occurance.monthly" />
<Trans i18nKey="billing:occurrence.monthly" />
</SelectItem>
</SelectGroup>
</SelectContent>

View File

@@ -39,13 +39,13 @@ const HealthBenefitForm = ({
resolver: zodResolver(UpdateHealthBenefitSchema),
mode: 'onChange',
defaultValues: {
occurance: currentCompanyParams.benefit_occurance || 'yearly',
occurrence: currentCompanyParams.benefit_occurance || 'yearly',
amount: currentCompanyParams.benefit_amount || 0,
},
});
const isDirty = form.formState.isDirty;
const onSubmit = (data: { occurance: string; amount: number }) => {
const onSubmit = (data: { occurrence: string; amount: number }) => {
const promise = async () => {
setIsLoading(true);
try {
@@ -53,7 +53,7 @@ const HealthBenefitForm = ({
setCurrentCompanyParams((prev) => ({
...prev,
benefit_amount: data.amount,
benefit_occurance: data.occurance,
benefit_occurance: data.occurrence,
}));
} finally {
form.reset(data);
@@ -78,7 +78,7 @@ const HealthBenefitForm = ({
<h4>
<Trans
i18nKey="billing:pageTitle"
values={{ companyName: account.slug }}
values={{ companyName: account.name }}
/>
</h4>
<p className="text-muted-foreground text-sm">

View File

@@ -6,6 +6,7 @@ import dynamic from 'next/dynamic';
import { useParams } from 'next/navigation';
import { PlanPicker } from '@kit/billing-gateway/components';
import { billingConfig } from '@kit/shared/config';
import { useAppEvents } from '@kit/shared/events';
import {
Card,
@@ -16,8 +17,6 @@ import {
} from '@kit/ui/card';
import { Trans } from '@kit/ui/trans';
import { billingConfig } from '@kit/shared/config';
import { createTeamAccountCheckoutSession } from '../_lib/server/server-actions';
const EmbeddedCheckout = dynamic(

View File

@@ -6,7 +6,6 @@ import { PageBody } from '@kit/ui/page';
import { createI18nServerInstance } from '~/lib/i18n/i18n.server';
import { withI18n } from '~/lib/i18n/with-i18n';
import HealthBenefitForm from './_components/health-benefit-form';
interface TeamAccountBillingPageProps {

View File

@@ -5,10 +5,10 @@ import { BillingSessionStatus } from '@kit/billing-gateway/components';
import { billingConfig } from '@kit/shared/config';
import { getSupabaseServerClient } from '@kit/supabase/server-client';
import { withI18n } from '~/lib/i18n/with-i18n';
import { requireUserInServerComponent } from '~/lib/server/require-user-in-server-component';
import { EmbeddedCheckoutForm } from '../_components/embedded-checkout-form';
import { withI18n } from '~/lib/i18n/with-i18n';
interface SessionPageProps {
searchParams: Promise<{