improve mobile view for my orders
remove otp requirement from doctor
This commit is contained in:
@@ -6,7 +6,7 @@ import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { Table, TableBody } from '@kit/ui/shadcn/table';
|
||||
|
||||
import MobileCartRow from './mobile-cart-row';
|
||||
import MobileTableRow from './mobile-table-row';
|
||||
|
||||
const MobileCartItems = ({
|
||||
item,
|
||||
@@ -24,12 +24,12 @@ const MobileCartItems = ({
|
||||
return (
|
||||
<Table className="border-separate rounded-lg border p-2">
|
||||
<TableBody>
|
||||
<MobileCartRow
|
||||
<MobileTableRow
|
||||
titleKey={productColumnLabelKey}
|
||||
value={item.product_title}
|
||||
/>
|
||||
<MobileCartRow titleKey="cart:table.time" value={item.quantity} />
|
||||
<MobileCartRow
|
||||
<MobileTableRow titleKey="cart:table.time" value={item.quantity} />
|
||||
<MobileTableRow
|
||||
titleKey="cart:table.price"
|
||||
value={formatCurrency({
|
||||
value: item.unit_price,
|
||||
@@ -37,7 +37,7 @@ const MobileCartItems = ({
|
||||
locale: language,
|
||||
})}
|
||||
/>
|
||||
<MobileCartRow
|
||||
<MobileTableRow
|
||||
titleKey="cart:table.total"
|
||||
value={
|
||||
item.total &&
|
||||
|
||||
@@ -8,7 +8,7 @@ import { Button } from '@kit/ui/shadcn/button';
|
||||
import { Table, TableBody, TableCell, TableRow } from '@kit/ui/shadcn/table';
|
||||
|
||||
import CartItemDelete from './cart-item-delete';
|
||||
import MobileCartRow from './mobile-cart-row';
|
||||
import MobileTableRow from './mobile-table-row';
|
||||
import { EnrichedCartItem } from './types';
|
||||
|
||||
const MobileCartServiceItems = ({
|
||||
@@ -31,20 +31,20 @@ const MobileCartServiceItems = ({
|
||||
return (
|
||||
<Table className="border-separate rounded-lg border p-2">
|
||||
<TableBody>
|
||||
<MobileCartRow
|
||||
<MobileTableRow
|
||||
titleKey={productColumnLabelKey}
|
||||
value={item.product_title}
|
||||
/>
|
||||
<MobileCartRow
|
||||
<MobileTableRow
|
||||
titleKey="cart:table.time"
|
||||
value={formatDateAndTime(item.reservation.startTime.toString())}
|
||||
/>
|
||||
<MobileCartRow
|
||||
<MobileTableRow
|
||||
titleKey="cart:table.location"
|
||||
value={item.reservation.location?.address ?? '-'}
|
||||
/>
|
||||
<MobileCartRow titleKey="cart:table.quantity" value={item.quantity} />
|
||||
<MobileCartRow
|
||||
<MobileTableRow titleKey="cart:table.quantity" value={item.quantity} />
|
||||
<MobileTableRow
|
||||
titleKey="cart:table.price"
|
||||
value={formatCurrency({
|
||||
value: item.unit_price,
|
||||
@@ -52,7 +52,7 @@ const MobileCartServiceItems = ({
|
||||
locale: language,
|
||||
})}
|
||||
/>
|
||||
<MobileCartRow
|
||||
<MobileTableRow
|
||||
titleKey="cart:table.total"
|
||||
value={
|
||||
item.total &&
|
||||
|
||||
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
import { Trans } from '@kit/ui/makerkit/trans';
|
||||
import { TableCell, TableHead, TableRow } from '@kit/ui/shadcn/table';
|
||||
|
||||
const MobileCartRow = ({
|
||||
const MobleTableRow = ({
|
||||
titleKey,
|
||||
value,
|
||||
}: {
|
||||
@@ -16,14 +16,9 @@ const MobileCartRow = ({
|
||||
</TableHead>
|
||||
|
||||
<TableCell className="p-0 text-right">
|
||||
<p
|
||||
className="txt-medium-plus text-ui-fg-base"
|
||||
data-testid="product-title"
|
||||
>
|
||||
{value}
|
||||
</p>
|
||||
<p className="txt-medium-plus text-ui-fg-base">{value}</p>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
);
|
||||
|
||||
export default MobileCartRow;
|
||||
export default MobleTableRow;
|
||||
Reference in New Issue
Block a user