"add PartyEvent frontend module with mock data, API actions, UI components and routing configuration"
This commit is contained in:
@@ -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}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
22
03_source/frontend/src/pages/dashboard/party-event/edit.tsx
Normal file
22
03_source/frontend/src/pages/dashboard/party-event/edit.tsx
Normal 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} />
|
||||
</>
|
||||
);
|
||||
}
|
18
03_source/frontend/src/pages/dashboard/party-event/list.tsx
Normal file
18
03_source/frontend/src/pages/dashboard/party-event/list.tsx
Normal 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 />
|
||||
</>
|
||||
);
|
||||
}
|
16
03_source/frontend/src/pages/dashboard/party-event/new.tsx
Normal file
16
03_source/frontend/src/pages/dashboard/party-event/new.tsx
Normal 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 />
|
||||
</>
|
||||
);
|
||||
}
|
16
03_source/frontend/src/pages/party-event/checkout.tsx
Normal file
16
03_source/frontend/src/pages/party-event/checkout.tsx
Normal 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 />
|
||||
</>
|
||||
);
|
||||
}
|
22
03_source/frontend/src/pages/party-event/details.tsx
Normal file
22
03_source/frontend/src/pages/party-event/details.tsx
Normal 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} />
|
||||
</>
|
||||
);
|
||||
}
|
5
03_source/frontend/src/pages/party-event/helloworld.tsx
Normal file
5
03_source/frontend/src/pages/party-event/helloworld.tsx
Normal file
@@ -0,0 +1,5 @@
|
||||
function Helloworld() {
|
||||
return <>helloworld</>;
|
||||
}
|
||||
|
||||
export default Helloworld;
|
19
03_source/frontend/src/pages/party-event/list.tsx
Normal file
19
03_source/frontend/src/pages/party-event/list.tsx
Normal 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} />
|
||||
</>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user