@homefile/components-v2 2.24.22 → 2.24.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ import { formatCurrency, formatDateWithAt } from '../../utils';
6
6
  export const AssignableReceiptCard = ({ isChecked, itemQuantity = 1, onChange, purchaseDate = new Date(), origin = '', total = '0', }) => {
7
7
  const date = formatDateWithAt({ date: purchaseDate });
8
8
  const totalFormatted = formatCurrency({ value: total });
9
- const totalItems = itemQuantity > 1
9
+ const totalItems = Number(itemQuantity) > 1
10
10
  ? `${itemQuantity} ${t('receipts.items')}`
11
11
  : `${itemQuantity} ${t('receipts.item')}`;
12
12
  return (_jsxs(Flex, { bg: "lightBlue.2", gap: "4", borderTop: "1px solid", borderColor: "lightBlue.2", children: [_jsx(Checkbox, { isChecked: isChecked, onChange: onChange }), _jsx(Stack, { w: "100%", p: "base", bg: isChecked ? 'lightGreen.1' : 'neutral.white', spacing: "1", children: _jsxs(Flex, { align: "center", gap: "base", children: [_jsx(Image, { src: getReceiptOrigin(origin), w: "auto", h: ["40px", "69px"], fit: "contain" }), _jsxs(Stack, { w: "100%", spacing: "1", children: [_jsx(Text, { fontSize: "xxs", children: date }), _jsx(Text, { textTransform: "capitalize", children: `${origin} ${t('receipts.receipt')}` }), _jsxs(Flex, { align: "baseline", justify: "flex-end", gap: "4", children: [_jsx(Text, { fontSize: "xs", fontFamily: "secondary", textTransform: "uppercase", children: totalItems }), _jsx(Text, { children: totalFormatted })] })] })] }) })] }));
@@ -11,7 +11,7 @@ export declare const useDisplayReceipts: ({ receipts }: UseDisplayReceiptsI) =>
11
11
  cashier?: string;
12
12
  createAt?: Date;
13
13
  home?: string | null;
14
- itemQuantity: number;
14
+ itemQuantity: number | string;
15
15
  name?: string;
16
16
  paymentMethod: string;
17
17
  purchaseDate?: Date;
@@ -14,7 +14,7 @@ export interface ReceiptDetailsDBI {
14
14
  cashier?: string;
15
15
  createAt?: Date;
16
16
  home?: string | null;
17
- itemQuantity: number;
17
+ itemQuantity: number | string;
18
18
  name?: string;
19
19
  paymentMethod: string;
20
20
  purchaseDate?: Date;
@@ -11,7 +11,7 @@ export declare const GridReceiptComponent: {
11
11
  cashier?: string;
12
12
  createAt?: Date;
13
13
  home?: string | null;
14
- itemQuantity: number;
14
+ itemQuantity: number | string;
15
15
  name?: string;
16
16
  paymentMethod: string;
17
17
  purchaseDate?: Date;
@@ -11,7 +11,7 @@ export declare const ItemReceiptComponent: {
11
11
  cashier?: string;
12
12
  createAt?: Date;
13
13
  home?: string | null;
14
- itemQuantity: number;
14
+ itemQuantity: number | string;
15
15
  name?: string;
16
16
  paymentMethod: string;
17
17
  purchaseDate?: Date;
@@ -11,7 +11,7 @@ export declare const ListReceiptComponent: {
11
11
  cashier?: string;
12
12
  createAt?: Date;
13
13
  home?: string | null;
14
- itemQuantity: number;
14
+ itemQuantity: number | string;
15
15
  name?: string;
16
16
  paymentMethod: string;
17
17
  purchaseDate?: Date;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homefile/components-v2",
3
- "version": "2.24.22",
3
+ "version": "2.24.23",
4
4
  "author": "Homefile",
5
5
  "license": "UNLICENSED",
6
6
  "typings": "dist/index.d.ts",
@@ -15,7 +15,7 @@ export const AssignableReceiptCard = ({
15
15
  const date = formatDateWithAt({ date: purchaseDate })
16
16
  const totalFormatted = formatCurrency({ value: total })
17
17
  const totalItems =
18
- itemQuantity > 1
18
+ Number(itemQuantity) > 1
19
19
  ? `${itemQuantity} ${t('receipts.items')}`
20
20
  : `${itemQuantity} ${t('receipts.item')}`
21
21
  return (
@@ -17,7 +17,7 @@ export interface ReceiptDetailsDBI {
17
17
  cashier?: string
18
18
  createAt?: Date
19
19
  home?: string | null
20
- itemQuantity: number
20
+ itemQuantity: number | string
21
21
  name?: string
22
22
  paymentMethod: string
23
23
  purchaseDate?: Date