feat(admin): implement unified submission and newsletter management

Introduce a centralized system to manage all website form submissions and newsletter subscriptions.
- Add `Submission` and `NewsletterSubscription` models with MongoDB schema validation
- Implement `submissionController` and `newsletterSubscriptionController` for CRUD operations and filtering
- Create a unified admin UI for reviewing submissions across different sources (home, request, contact, partnership, newsletter)
- Add database migration scripts for creating collections and indexes
- Refactor partnership inquiry forms to use a fixed field structure
- Update admin navigation and server CORS settings to support PATCH requests
This commit is contained in:
Tống Thành Đạt
2026-04-24 17:11:23 +07:00
parent caf38e8750
commit f6f2e0e03b
18 changed files with 1534 additions and 54 deletions
+13 -4
View File
@@ -55,11 +55,20 @@
<%- include("partials/templates", { editorUi }) %>
<script type="application/json" id="partnershipsPageBootstrapJson"><%- JSON.stringify({
data,
backendUrl,
editorConfig,
editorUi,
}) %></script>
<script>
window.partnershipsPageData = <%- JSON.stringify(data) %>;
window.partnershipsBackendUrl = <%- JSON.stringify(backendUrl) %>;
window.partnershipsEditorConfig = <%- JSON.stringify(editorConfig) %>;
window.partnershipsEditorUi = <%- JSON.stringify(editorUi) %>;
const partnershipsPageBootstrap = JSON.parse(
document.getElementById("partnershipsPageBootstrapJson").textContent || "{}",
);
window.partnershipsPageData = partnershipsPageBootstrap.data;
window.partnershipsBackendUrl = partnershipsPageBootstrap.backendUrl;
window.partnershipsEditorConfig = partnershipsPageBootstrap.editorConfig;
window.partnershipsEditorUi = partnershipsPageBootstrap.editorUi;
</script>
<%- include("partials/editor-script") %>