feat: implement plan upgrade logic with prorated pricing and MercadoPago integration
This commit is contained in:
@@ -17,6 +17,7 @@ import useContainerHeight from "@core/app/hooks/ContainerHeight";
|
||||
import { ScrollToTop } from "@core/app/components/ScrollTop";
|
||||
import PendingRepeatsCard from "@core/app/components/PendingRepeatsCard/PendingRepeatsCard";
|
||||
import HeaderConfProvider from "@core/app/components/HeaderConfProvider/HeaderConfProvider";
|
||||
import EvangelizeBanner from "@components/EvangelizeBanner/EvangelizeBanner";
|
||||
import { Button, Tabs, Tab, Box } from "@mui/material";
|
||||
import { ThemeProvider } from "@emotion/react";
|
||||
import turnosXpressTheme from "@core/app/theme/turnosXpress";
|
||||
@@ -53,7 +54,15 @@ function a11yProps(index: number) {
|
||||
};
|
||||
}
|
||||
|
||||
const AppointmentList = ({ appointments, containerHeight, emptyMessage, goTo, isProfessionalView }: { appointments: any, containerHeight: any, emptyMessage: string, goTo: any, isProfessionalView: boolean }) => {
|
||||
type AppointmentListProps = {
|
||||
appointments: AppointmentEventByClient[];
|
||||
containerHeight: string;
|
||||
emptyMessage: string;
|
||||
goTo: (path: string) => void;
|
||||
isProfessionalView: boolean;
|
||||
};
|
||||
|
||||
const AppointmentList = ({ appointments, containerHeight, emptyMessage, goTo, isProfessionalView }: AppointmentListProps) => {
|
||||
if (appointments.length === 0) {
|
||||
return <ExploreCategories containerHeight={containerHeight} message={emptyMessage} />;
|
||||
}
|
||||
@@ -223,11 +232,13 @@ export default function MyAppointmentsPage() {
|
||||
setTabValue(1);
|
||||
}
|
||||
})
|
||||
.catch((error: Error | any) => {
|
||||
if (error.format) {
|
||||
.catch((error: unknown) => {
|
||||
if (error && typeof error === "object" && "format" in error && typeof error.format === "function") {
|
||||
alert.showError(error.format());
|
||||
} else {
|
||||
} else if (error instanceof Error) {
|
||||
alert.showError(error.message);
|
||||
} else {
|
||||
alert.showError("No pudimos cargar tus turnos.");
|
||||
}
|
||||
console.error(error);
|
||||
})
|
||||
@@ -282,6 +293,8 @@ export default function MyAppointmentsPage() {
|
||||
Mis Turnos
|
||||
</h1>
|
||||
|
||||
<EvangelizeBanner />
|
||||
|
||||
<Box sx={{ width: "100%", mt: 4 }}>
|
||||
{collaboratorAppointments.length > 0 ? (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user