Skip to content

Commit c1de4b7

Browse files
committed
format
1 parent b9a4a7f commit c1de4b7

35 files changed

+113
-51
lines changed

modules/common/src/data/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from "./items";
1+
export * from "./items";
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export * from "./converter"
2-
export * from "./firebase"
3-
export * from "./subscription"
1+
export * from "./converter";
2+
export * from "./firebase";
3+
export * from "./subscription";

modules/common/src/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export * from "./data";
2-
export * from "./firebase-utils"
2+
export * from "./firebase-utils";
33
export * from "./lib";
4-
export * from "./models"
5-
export * from "./repositories"
4+
export * from "./models";
5+
export * from "./repositories";

modules/common/src/lib/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export * from "./custom-loader"
2-
export * from "./custom-zod"
3-
export * from "./typeguard"
1+
export * from "./custom-loader";
2+
export * from "./custom-zod";
3+
export * from "./typeguard";

modules/common/src/models/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export * from "./global"
2-
export * from "./item"
3-
export * from "./order"
1+
export * from "./global";
2+
export * from "./item";
3+
export * from "./order";
+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export * from "./global"
2-
export * from "./item"
3-
export * from "./order"
4-
export * from "./type"
1+
export * from "./global";
2+
export * from "./item";
3+
export * from "./order";
4+
export * from "./type";

services/pos/app/components/atoms/ReadyBell.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { OrderEntity, WithId } from "@cafeore/common";
1+
import type { OrderEntity, WithId } from "@cafeore/common";
22
import { HiBell, HiBellAlert } from "react-icons/hi2";
33
import { cn } from "~/lib/utils";
44
import { Button } from "../ui/button";

services/pos/app/components/functional/useLatestOrderId.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { WithId, OrderEntity } from "@cafeore/common";
1+
import type { OrderEntity, WithId } from "@cafeore/common";
22
import { useMemo } from "react";
33

44
/**

services/pos/app/components/functional/useOrderStat.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
import { documentSub, masterStateConverter, MasterStateEntity } from "@cafeore/common";
1+
import {
2+
MasterStateEntity,
3+
documentSub,
4+
masterStateConverter,
5+
} from "@cafeore/common";
26
import useSWRSubscription from "swr/subscription";
37

48
/**

services/pos/app/components/functional/useOrderState.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { WithId, ItemEntity, OrderEntity } from "@cafeore/common";
1+
import { type ItemEntity, OrderEntity, type WithId } from "@cafeore/common";
22
import { useReducer } from "react";
33

44
type BaseAction<TypeName extends string> = { type: TypeName };

services/pos/app/components/functional/useSyncCahiserOrder.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { OrderEntity } from "@cafeore/common";
1+
import type { OrderEntity } from "@cafeore/common";
22
import { useEffect } from "react";
33

44
export const useSyncCahiserOrder = (

services/pos/app/components/molecules/InputComment.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import type { OrderEntity, WithId } from "@cafeore/common";
12
import { useState } from "react";
23
import { Input } from "../ui/input";
3-
import { WithId, OrderEntity } from "@cafeore/common";
44

55
type props = {
66
order: WithId<OrderEntity>;

services/pos/app/components/molecules/RealtimeElapsedTime.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import type { OrderEntity, WithId } from "@cafeore/common";
12
import dayjs from "dayjs";
23
import { cn } from "~/lib/utils";
34
import { useCurrentTime } from "../functional/useCurrentTime";
4-
import { WithId, OrderEntity } from "@cafeore/common";
55

66
export const RealtimeElapsedTime = ({
77
order,

services/pos/app/components/organisms/ChargeView.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import type { OrderEntity } from "@cafeore/common";
12
import { useMemo } from "react";
23
import { Input } from "../ui/input";
3-
import { OrderEntity } from "@cafeore/common";
44

55
type props = {
66
order: OrderEntity;

services/pos/app/components/organisms/DiscountInput.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { OrderEntity, type WithId } from "@cafeore/common";
12
import { CheckCircledIcon, CrossCircledIcon } from "@radix-ui/react-icons";
23
import {
34
type ComponentPropsWithoutRef,
@@ -9,7 +10,6 @@ import {
910
import { cn } from "~/lib/utils";
1011
import { useFocusRef } from "../functional/useFocusRef";
1112
import { ThreeDigitsInput } from "../molecules/ThreeDigitsInput";
12-
import { WithId, OrderEntity } from "@cafeore/common";
1313

1414
const findByOrderId = (
1515
orders: WithId<OrderEntity>[] | undefined,

services/pos/app/components/organisms/ItemAssign.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
import { type ItemEntity, type WithId, type2label } from "@cafeore/common";
12
import { Cross2Icon, Pencil2Icon } from "@radix-ui/react-icons";
23
import { memo, useCallback, useEffect, useMemo, useState } from "react";
34
import { cn } from "~/lib/utils";
45
import { useFocusRef } from "../functional/useFocusRef";
56
import { Input } from "../ui/input";
6-
import { WithId, ItemEntity, type2label } from "@cafeore/common";
77

88
type props = {
99
item: WithId<ItemEntity>;

services/pos/app/components/organisms/ItemButtons.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { WithId, ItemEntity, key2item } from "@cafeore/common";
1+
import { type ItemEntity, type WithId, key2item } from "@cafeore/common";
22
import { Button } from "../ui/button";
33

44
type props = {

services/pos/app/components/organisms/OrderAlertDialog.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { type OrderEntity, type2label } from "@cafeore/common";
12
import { type ComponentPropsWithoutRef, forwardRef } from "react";
23
import {
34
AlertDialog,
@@ -9,7 +10,6 @@ import {
910
AlertDialogHeader,
1011
AlertDialogTitle,
1112
} from "../ui/alert-dialog";
12-
import { OrderEntity, type2label } from "@cafeore/common";
1313

1414
// TODO: 表示内容が整ってないので、きれいにする
1515
/**

services/pos/app/components/organisms/OrderItemEdit.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1+
import {
2+
type ItemEntity,
3+
type OrderEntity,
4+
type WithId,
5+
keyEventHandler,
6+
} from "@cafeore/common";
17
import { memo, useCallback, useEffect, useState } from "react";
28
import { ItemAssign } from "./ItemAssign";
3-
import { OrderEntity, WithId, ItemEntity, keyEventHandler } from "@cafeore/common";
49

510
type props = {
611
order: OrderEntity;

services/pos/app/components/organisms/OrderReceivedInput.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import type { OrderEntity } from "@cafeore/common";
12
import { CrossCircledIcon } from "@radix-ui/react-icons";
23
import { memo, useMemo } from "react";
34
import { AttractiveInput } from "../molecules/AttractiveInput";
4-
import { OrderEntity } from "@cafeore/common";
55

66
type props = {
77
order: OrderEntity;

services/pos/app/components/organisms/SubmitSection.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import type { OrderEntity } from "@cafeore/common";
12
import { useEffect, useMemo, useRef } from "react";
23
import { Button } from "../ui/button";
3-
import { OrderEntity } from "@cafeore/common";
44

55
type props = {
66
submitOrder: () => void;

services/pos/app/components/pages/CashierV2.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { ItemEntity, OrderEntity, WithId } from "@cafeore/common";
12
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
23
import bellTwice from "~/assets/bell_twice.mp3";
34
import { Switch } from "~/components/ui/switch";
@@ -18,7 +19,6 @@ import { OrderItemEdit } from "../organisms/OrderItemEdit";
1819
import { OrderReceivedInput } from "../organisms/OrderReceivedInput";
1920
import { SubmitSection } from "../organisms/SubmitSection";
2021
import { Label } from "../ui/label";
21-
import { WithId, ItemEntity, OrderEntity } from "@cafeore/common";
2222

2323
type props = {
2424
items: WithId<ItemEntity>[] | undefined;

services/pos/app/label/print-util.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ItemEntity, OrderEntity } from "@cafeore/common";
1+
import type { ItemEntity, OrderEntity } from "@cafeore/common";
22
import { useRawPrinter } from "./printer";
33

44
export const usePrinter = () => {

services/pos/app/routes/_header._index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { prodDB, converter, itemSchema } from "@cafeore/common";
1+
import { converter, itemSchema, prodDB } from "@cafeore/common";
22
import { type MetaFunction, useLoaderData } from "@remix-run/react";
33
import { collection, getDocs } from "firebase/firestore";
44
import { Button } from "~/components/ui/button";

services/pos/app/routes/_header.cashier-button.tsx

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
import { itemSource, collectionSub, orderConverter, OrderEntity, WithId, ItemEntity, stringToJSONSchema, orderSchema, orderRepository } from "@cafeore/common";
1+
import {
2+
type ItemEntity,
3+
OrderEntity,
4+
type WithId,
5+
collectionSub,
6+
itemSource,
7+
orderConverter,
8+
orderRepository,
9+
orderSchema,
10+
stringToJSONSchema,
11+
} from "@cafeore/common";
212
import { parseWithZod } from "@conform-to/zod";
313
import { AlertDialogCancel } from "@radix-ui/react-alert-dialog";
414
import { TrashIcon } from "@radix-ui/react-icons";

services/pos/app/routes/_header.cashier.tsx

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
import { itemSource, OrderEntity, stringToJSONSchema, orderSchema, orderRepository, cashierRepository } from "@cafeore/common";
1+
import {
2+
OrderEntity,
3+
cashierRepository,
4+
itemSource,
5+
orderRepository,
6+
orderSchema,
7+
stringToJSONSchema,
8+
} from "@cafeore/common";
29
import { parseWithZod } from "@conform-to/zod";
310
import {
411
type ClientActionFunction,

services/pos/app/routes/_header.dashboard.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
import { collectionSub, orderConverter, itemSource, ITEM_MASTER, OrderEntity } from "@cafeore/common";
1+
import {
2+
ITEM_MASTER,
3+
type OrderEntity,
4+
collectionSub,
5+
itemSource,
6+
orderConverter,
7+
} from "@cafeore/common";
28
import type { MetaFunction } from "@remix-run/react";
39
import dayjs from "dayjs";
410
import { orderBy } from "firebase/firestore";

services/pos/app/routes/_header.master.tsx

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1-
import { OrderEntity, OrderStatType, collectionSub, orderConverter, id2abbr, stringToJSONSchema, orderSchema, orderRepository, orderStatTypes, MasterStateEntity, masterRepository } from "@cafeore/common";
1+
import {
2+
MasterStateEntity,
3+
OrderEntity,
4+
type OrderStatType,
5+
collectionSub,
6+
id2abbr,
7+
masterRepository,
8+
orderConverter,
9+
orderRepository,
10+
orderSchema,
11+
orderStatTypes,
12+
stringToJSONSchema,
13+
} from "@cafeore/common";
214
import { parseWithZod } from "@conform-to/zod";
315
import {
416
type ClientActionFunction,

services/pos/app/routes/_header.serve.tsx

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
import { OrderEntity, collectionSub, orderConverter, id2abbr, stringToJSONSchema, orderSchema, orderRepository } from "@cafeore/common";
1+
import {
2+
OrderEntity,
3+
collectionSub,
4+
id2abbr,
5+
orderConverter,
6+
orderRepository,
7+
orderSchema,
8+
stringToJSONSchema,
9+
} from "@cafeore/common";
210
import { parseWithZod } from "@conform-to/zod";
311
import {
412
type ClientActionFunction,

services/pos/app/routes/cashier-mini.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
import { documentSub, cashierStateConverter, orderConverter } from "@cafeore/common";
1+
import {
2+
cashierStateConverter,
3+
documentSub,
4+
orderConverter,
5+
} from "@cafeore/common";
26
import type { MetaFunction } from "@remix-run/react";
37
import { useEffect, useMemo, useRef, useState } from "react";
48
import useSWRSubscription from "swr/subscription";

services/pos/app/routes/items/actions/addItem.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { itemSchema, ItemEntity, itemRepository } from "@cafeore/common";
1+
import { ItemEntity, itemRepository, itemSchema } from "@cafeore/common";
22
import { parseWithZod } from "@conform-to/zod";
33
import { type ClientActionFunction, json } from "@remix-run/react";
44
import { sendSlackMessage } from "~/lib/webhook";

services/pos/app/routes/items/route.tsx

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
import {
2+
type ItemEntity,
3+
type ItemType,
4+
collectionSub,
5+
itemConverter,
6+
itemSchema,
7+
itemtypes,
8+
type2label,
9+
} from "@cafeore/common";
110
import { useForm } from "@conform-to/react";
211
import { parseWithZod } from "@conform-to/zod";
312
import {
@@ -14,7 +23,6 @@ import { Input } from "~/components/ui/input";
1423
import { Label } from "~/components/ui/label";
1524
import { RadioGroup, RadioGroupItem } from "~/components/ui/radio-group";
1625
import type { addItem } from "./actions/addItem";
17-
import { collectionSub, itemConverter, itemSchema, ItemType, ItemEntity, itemtypes, type2label } from "@cafeore/common";
1826

1927
export { action as clientAction } from "./action";
2028

services/pos/app/routes/orders/actions/updateOrder.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { orderRepository } from "@cafeore/common";
22
import type { ClientActionFunctionArgs } from "@remix-run/react";
33

4-
54
export const updateOrder = async ({ request }: ClientActionFunctionArgs) => {
65
const formData = await request.formData();
76
console.log("save(update)のテスト");

services/pos/app/routes/orders/route.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
import { orderRepository, useClientLoaderData, type2label } from "@cafeore/common";
1+
import {
2+
orderRepository,
3+
type2label,
4+
useClientLoaderData,
5+
} from "@cafeore/common";
26
import { Form, type MetaFunction } from "@remix-run/react";
37
import { Button } from "~/components/ui/button";
48
import { Input } from "~/components/ui/input";

services/pos/package.json

+1-6
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,5 @@
6666
"engines": {
6767
"node": ">=20.0.0"
6868
},
69-
"trustedDependencies": [
70-
"@biomejs/biome",
71-
"esbuild",
72-
"protobufjs",
73-
"re2"
74-
]
69+
"trustedDependencies": ["@biomejs/biome", "esbuild", "protobufjs", "re2"]
7570
}

0 commit comments

Comments
 (0)