From 96e7811fff23adbc5cc64a720ef11e0208b908d0 Mon Sep 17 00:00:00 2001 From: behnam Date: Fri, 1 Nov 2024 18:59:23 +0300 Subject: [PATCH] Add base vm for create invoice button --- src/app/components/button/button.tsx | 2 +- .../create-random-invoice.tsx | 13 +++++++++++ .../latest-invoices/latest-invoices.tsx | 4 +++- src/app/dashboard/layout.tsx | 17 +++++++++----- .../dashboard/module/dashboard-app-module.ts | 22 ++----------------- .../vm/create-random-invoice-button-vm.ts | 15 +++++++++++++ 6 files changed, 46 insertions(+), 27 deletions(-) create mode 100644 src/app/dashboard/components/client/create-random-invoice/create-random-invoice.tsx create mode 100644 src/app/dashboard/vm/create-random-invoice-button-vm.ts diff --git a/src/app/components/button/button.tsx b/src/app/components/button/button.tsx index 6d0c377..5245285 100644 --- a/src/app/components/button/button.tsx +++ b/src/app/components/button/button.tsx @@ -66,4 +66,4 @@ const ButtonUi = React.forwardRef( ) ButtonUi.displayName = "Button" -export { Button, buttonVariants } \ No newline at end of file +export { buttonVariants } \ No newline at end of file diff --git a/src/app/dashboard/components/client/create-random-invoice/create-random-invoice.tsx b/src/app/dashboard/components/client/create-random-invoice/create-random-invoice.tsx new file mode 100644 index 0000000..8a80645 --- /dev/null +++ b/src/app/dashboard/components/client/create-random-invoice/create-random-invoice.tsx @@ -0,0 +1,13 @@ +"use client" + +import Button from "@/app/components/button/button" +import CreateRandomInvoiceButtonVM from "@/app/dashboard/vm/create-random-invoice-button-vm" +import { useDI } from "@/bootstrap/di/di-context" +import { useRef } from "react" + +export default function CreateRandomInvoiceContainer() { + const di = useDI() + const vm = useRef(di.resolve(CreateRandomInvoiceButtonVM)) + + return