diff --git a/apps/backoffice/src/app/dashboard/_components/modal-delete-item.tsx b/apps/backoffice/src/app/dashboard/_components/modal-delete-item.tsx new file mode 100644 index 0000000..212da7b --- /dev/null +++ b/apps/backoffice/src/app/dashboard/_components/modal-delete-item.tsx @@ -0,0 +1,60 @@ +import { Button } from '@imphnen-frontend-service/ui/atoms'; +import { Modal } from '@imphnen-frontend-service/ui/molecules'; + +interface IModalDeleteItem { + isOpen: boolean; + onClose: () => void; + onDeleteItem: () => void; +} + +const ModalDeleteItem = ({ + isOpen, + onClose, + onDeleteItem, +}: IModalDeleteItem) => { + return ( + + + Delete item? +
+

+ Delete Item +

+

+ Apakah kamu yakin untuk menghapus item ini? +

+
+
+ + + + +
+ ); +}; + +export default ModalDeleteItem; diff --git a/apps/backoffice/src/app/dashboard/page.tsx b/apps/backoffice/src/app/dashboard/page.tsx index 2567e8c..8f89cda 100644 --- a/apps/backoffice/src/app/dashboard/page.tsx +++ b/apps/backoffice/src/app/dashboard/page.tsx @@ -6,139 +6,156 @@ import { UserSwitchOutlined, } from '@ant-design/icons'; import { Button } from '@imphnen-frontend-service/ui/atoms'; -import { FC, ReactElement } from 'react'; +import { FC, Fragment, ReactElement, useState } from 'react'; +import ModalDeleteItem from './_components/modal-delete-item'; export const Components: FC = (): ReactElement => { + const [showModalDeleteItem, setShowModalDeleteItem] = useState(false); + return ( -
- {/* Dashboard Header */} -
-

Dashboard

-
+ +
+ {/* Dashboard Header */} +
+

Dashboard

+
-
-
- {/* Summary Section */} -
-

- Summary -

-
- {/* Participants */} -
-
- -
-
-

1000

-

Participants

-
-
- - {/* Roll and Reroll */} -
-
- -
-
-

1000

-

- Roll and Reroll -

-
-
- - {/* Redeem */} -
-
- -
-
-

1000

-

Redeem

-
-
- - {/* Inactive Users */} -
-
- -
-
-

1000

-

Inactive Users

-
-
-
-
- - {/* Gacha Items Section */} -
-
-

- Gacha Items +
+
+ {/* Summary Section */} +
+

+ Summary

- -
+
+ {/* Participants */} +
+
+ +
+
+

1000

+

Participants

+
+
- {/* Gacha Items List */} -
- {[1, 2, 3, 4, 5, 6].map((item) => ( -
-
-
-

- Lanyard IMPHNEN -

-
- Prize {item} - Chance Rate: (0.1%) + {/* Roll and Reroll */} +
+
+ +
+
+

1000

+

+ Roll and Reroll +

+
+
+ + {/* Redeem */} +
+
+ +
+
+

1000

+

Redeem

+
+
+ + {/* Inactive Users */} +
+
+ +
+
+

1000

+

+ Inactive Users +

+
+
+
+

+ + {/* Gacha Items Section */} +
+
+

+ Gacha Items +

+ +
+ + {/* Gacha Items List */} +
+ {[1, 2, 3, 4, 5, 6].map((item) => ( +
+
+
+

+ Lanyard IMPHNEN +

+
+ Prize {item} + Chance Rate: (0.1%) +
+
+
+ +
-
- - -
+ + {/* Lebih baik gunakan gambar yang sudah di-clip dengan size height: 78px daripada hard-code object-position dan margin */} + Lanyard IMPHNEN
+ ))} +
+
+
- {/* Lebih baik gunakan gambar yang sudah di-clip dengan size height: 78px daripada hard-code object-position dan margin */} - Lanyard IMPHNEN -
- ))} - - + {/* Right-side illustration */} + +
- {/* Right-side illustration */} - - -
+ {/* Modal Delete Item */} + setShowModalDeleteItem(false)} + onDeleteItem={() => { + console.log('Item deleted'); + }} + /> + ); };