feat(cms): enhance policy editor with fullscreen mode and date picking

Improve the policy content management experience by adding a dedicated fullscreen editing mode and a structured date picker for effective dates.
- Implement fullscreen toggle in `policies-block-editor.js` with corresponding CSS for an expanded workspace
- Add `date` field type to `sharedFields.js` and integrate it into `policiesConfig.js`
- Implement date parsing and formatting utilities in `editor-script.ejs` to handle "Effective Date" strings
- Update `policiesController.js` to use `updateOne` for more reliable document persistence and state reloading
- Add support for `ICON_OPTIONS` in the policy editor configuration
- Refine editor UI layout and overflow handling for better stability with long content strings
This commit is contained in:
Tống Thành Đạt
2026-04-22 12:02:00 +07:00
parent cdaddddfeb
commit a44d005c13
7 changed files with 620 additions and 25 deletions
+8
View File
@@ -32,6 +32,13 @@ const text = (key, label, options = {}) => ({
...options,
});
const date = (key, label, options = {}) => ({
key,
label,
type: "date",
...options,
});
const hidden = (key, options = {}) => ({
key,
type: "hidden",
@@ -169,6 +176,7 @@ const linkFields = (prefix = "Link") => [
module.exports = {
ICON_OPTIONS,
text,
date,
hidden,
textarea,
image,