CMS: Banners & Pages
Source: pharmanet-admin/src/pages/CMS/CMS.jsx
Tabs
| Tab |
Route |
Component |
Description |
| Banners |
/cms/banners |
Banners |
Homepage banner carousel management |
| Static Pages |
/cms/pages |
StaticPages |
About, Privacy, Terms content management |
Banners
Components
| Component |
File |
Description |
Banners |
components/cms/Banners.jsx |
Banner grid with management |
BannerCard |
components/cms/BannerCard.jsx |
Individual banner display |
BannerFormModal |
components/cms/BannerFormModal.jsx |
Create/edit with image upload |
Banner Fields
| Field |
Type |
Description |
title |
String |
Display title |
imageUrl |
String |
Uploaded image |
linkUrl |
String? |
Click-through URL |
linkType |
String |
url, product, category, promotion |
sortOrder |
Int |
Display order |
isActive |
Bool |
Active toggle |
position |
String |
home_main, home_sidebar |
promotionId |
String? |
FK to promotions |
Static Pages
Components
| Component |
File |
Description |
StaticPages |
components/cms/StaticPages.jsx |
Pages list |
PageEditor |
components/cms/PageEditor.jsx |
WYSIWYG editor with react-quill |
Page Fields
| Field |
Type |
Description |
title |
String |
Page title |
slug |
String |
URL-friendly identifier |
content |
Text |
HTML content (via react-quill) |
isActive |
Bool |
Published status |
Service
Source: pharmanet-admin/src/services/cms.js
| Function |
Description |
getBanners() |
List all banners |
createBanner(payload) |
Create with image upload |
updateBanner(id, payload) |
Update with image upload |
deleteBanner(id) |
Delete banner |
reorderBanners(order) |
Bulk sort order update |
getPages() |
List static pages |
getPageById(id) |
Single page |
updatePage(id, data) |
Edit page content |