diff --git a/src/api/index.ts b/src/api/index.ts
index b47acd8..46ffda7 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -35,6 +35,7 @@ export const ApiId = {
店舗一覧取得: id++,
店舗新規登録: id++,
デポジット情報取得: id++,
+ デポジット異動履歴一覧取得: id++,
デポジットチャージ: id++,
店舗設定: id++,
店舗QR設定取得: id++,
diff --git a/src/api/shop.ts b/src/api/shop.ts
index ffe9439..c7f1da1 100644
--- a/src/api/shop.ts
+++ b/src/api/shop.ts
@@ -25,6 +25,13 @@ export type QRサービス券取得設定 = {
shop_no: number;
discount_ticket_code: number;
};
+export type デポジット異動履歴 = {
+ transfer_datetime: Date;
+ transfer_reason: string | null;
+ transfer_amount: number;
+ before_amount: number;
+ after_amount: number;
+};
// -------店舗一覧取得---------------
export type 店舗一覧取得Request = {
@@ -78,6 +85,23 @@ export const デポジット情報取得 = async (param: デポジット情報
});
return res;
};
+// -------デポジット異動履歴一覧取得---------------
+export type デポジット異動履歴一覧取得Request = {};
+export type デポジット異動履歴一覧取得Response = {
+ data: {
+ list: デポジット異動履歴[];
+ };
+} & APICommonResponse;
+export const デポジット異動履歴一覧取得 = async (
+ param: デポジット異動履歴一覧取得Request
+) => {
+ const res = await request<デポジット異動履歴一覧取得Response>({
+ url: getUrl(ApiId.デポジット異動履歴一覧取得),
+ method: HttpMethod.GET,
+ data: new URLSearchParams(param),
+ });
+ return res;
+};
// -------デポジットチャージ---------------
export type デポジットチャージRequest = {
diff --git a/src/api/url.ts b/src/api/url.ts
index 5f8e73a..384236f 100644
--- a/src/api/url.ts
+++ b/src/api/url.ts
@@ -30,6 +30,7 @@ const urls = {
[A.店舗一覧取得]: "shop/list",
[A.店舗新規登録]: "shop/register",
[A.デポジット情報取得]: "shop/deposit",
+ [A.デポジット異動履歴一覧取得]: "shop/deposit/transfer/list",
[A.デポジットチャージ]: "shop/deposit/charge",
[A.店舗設定]: "shop/config",
[A.店舗設定]: "shop/config",
diff --git a/src/auth/route.ts b/src/auth/route.ts
index 7101365..dcd1b92 100644
--- a/src/auth/route.ts
+++ b/src/auth/route.ts
@@ -33,7 +33,7 @@ const 認可別許可ルート: {
...共通ルート,
...認証後共通ルート,
P.サービス券発行用QRコード,
- P.サービス券利用履歴,
+ P.利用履歴,
P.QRサービス券承認,
],
};
diff --git a/src/layouts/dashbord/navigator.tsx b/src/layouts/dashbord/navigator.tsx
index bb314ff..8e35961 100644
--- a/src/layouts/dashbord/navigator.tsx
+++ b/src/layouts/dashbord/navigator.tsx
@@ -147,7 +147,7 @@ export default function Navigator(props: DrawerProps) {
{
label: "利用履歴",
icon: ,
- id: PageID.サービス券利用履歴,
+ id: PageID.利用履歴,
},
],
},
diff --git a/src/pages/dashboard/qr-service/サービス券利用履歴.tsx b/src/pages/dashboard/qr-service/サービス券利用履歴.tsx
deleted file mode 100644
index c7a6265..0000000
--- a/src/pages/dashboard/qr-service/サービス券利用履歴.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-export default function サービス券利用履歴() {
- return null;
-}
diff --git a/src/pages/dashboard/qr-service/利用履歴一覧/SearchBox.tsx b/src/pages/dashboard/qr-service/利用履歴一覧/SearchBox.tsx
new file mode 100644
index 0000000..ad66a57
--- /dev/null
+++ b/src/pages/dashboard/qr-service/利用履歴一覧/SearchBox.tsx
@@ -0,0 +1,60 @@
+import { Dictionary } from "@types";
+import { デポジット異動履歴, デポジット異動履歴一覧取得 } from "api/shop";
+import { FormProvider } from "components/hook-form";
+import useAPICall from "hooks/useAPICall";
+import useSearchConditionContext from "hooks/useSearchConditionContext";
+import { UseTableReturn } from "hooks/useTable";
+import { isEqual } from "lodash";
+import { useEffect, useState } from "react";
+import { useForm } from "react-hook-form";
+
+type FormProps = {};
+
+type CommonProps = {
+ table: UseTableReturn<デポジット異動履歴>;
+};
+export default function SearchBox({ table }: CommonProps) {
+ const [lastSendSearchCondition, setLastSendSearchCondition] =
+ useState