Merge branch 'develop' into feature/MED-129
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user