"add PartyEvent frontend module with mock data, API actions, UI components and routing configuration"

This commit is contained in:
louiscklaw
2025-06-15 16:13:09 +08:00
parent d987b0fe36
commit a88de2f17f
43 changed files with 4480 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
// src/pages/dashboard/party-event/details.tsx
import { useGetPartyEvent } from 'src/actions/party-event';
import { CONFIG } from 'src/global-config';
import { useParams } from 'src/routes/hooks';
import { PartyEventDetailsView } from 'src/sections/party-event/view';
// ----------------------------------------------------------------------
const metadata = { title: `PartyEvent details | Dashboard - ${CONFIG.appName}` };
export default function Page() {
const { id = '' } = useParams();
const { partyEvent, partyEventLoading, partyEventError } = useGetPartyEvent(id);
return (
<>
<title>{metadata.title}</title>
<PartyEventDetailsView
product={partyEvent}
loading={partyEventLoading}
error={partyEventError}
/>
</>
);
}

View File

@@ -0,0 +1,22 @@
import { useGetPartyEvent } from 'src/actions/party-event';
import { CONFIG } from 'src/global-config';
import { useParams } from 'src/routes/hooks';
import { PartyEventEditView } from 'src/sections/party-event/view';
// ----------------------------------------------------------------------
const metadata = { title: `PartyEvent edit | Dashboard - ${CONFIG.appName}` };
export default function Page() {
const { id = '' } = useParams();
const { partyEvent } = useGetPartyEvent(id);
return (
<>
<title>{metadata.title}</title>
<PartyEventEditView product={partyEvent} />
</>
);
}

View File

@@ -0,0 +1,18 @@
// src/pages/dashboard/party-event/list.tsx
//
import { CONFIG } from 'src/global-config';
import { PartyEventListView } from 'src/sections/party-event/view';
// ----------------------------------------------------------------------
const metadata = { title: `PartyEvent list | Dashboard - ${CONFIG.appName}` };
export default function Page() {
return (
<>
<title>{metadata.title}</title>
<PartyEventListView />
</>
);
}

View File

@@ -0,0 +1,16 @@
import { CONFIG } from 'src/global-config';
import { PartyEventCreateView } from 'src/sections/party-event/view';
// ----------------------------------------------------------------------
const metadata = { title: `Create a new party-event | Dashboard - ${CONFIG.appName}` };
export default function Page() {
return (
<>
<title>{metadata.title}</title>
<PartyEventCreateView />
</>
);
}

View File

@@ -0,0 +1,16 @@
import { CONFIG } from 'src/global-config';
import { CheckoutView } from 'src/sections/checkout/view';
// ----------------------------------------------------------------------
const metadata = { title: `Checkout - ${CONFIG.appName}` };
export default function Page() {
return (
<>
<title>{metadata.title}</title>
<CheckoutView />
</>
);
}

View File

@@ -0,0 +1,22 @@
import { useGetProduct } from 'src/actions/product';
import { CONFIG } from 'src/global-config';
import { useParams } from 'src/routes/hooks';
import { ProductShopDetailsView } from 'src/sections/product/view';
// ----------------------------------------------------------------------
const metadata = { title: `Product details - ${CONFIG.appName}` };
export default function Page() {
const { id = '' } = useParams();
const { product, productLoading, productError } = useGetProduct(id);
return (
<>
<title>{metadata.title}</title>
<ProductShopDetailsView product={product} loading={productLoading} error={productError} />
</>
);
}

View File

@@ -0,0 +1,5 @@
function Helloworld() {
return <>helloworld</>;
}
export default Helloworld;

View File

@@ -0,0 +1,19 @@
import { useGetProducts } from 'src/actions/product';
import { CONFIG } from 'src/global-config';
import { ProductShopView } from 'src/sections/product/view';
// ----------------------------------------------------------------------
const metadata = { title: `Product shop - ${CONFIG.appName}` };
export default function Page() {
const { products, productsLoading } = useGetProducts();
return (
<>
<title>{metadata.title}</title>
<ProductShopView products={products} loading={productsLoading} />
</>
);
}