diff --git a/buzz/api/__init__.py b/buzz/api/__init__.py index 06e636e3..2e657fd1 100644 --- a/buzz/api/__init__.py +++ b/buzz/api/__init__.py @@ -983,7 +983,10 @@ def create_cancellation_request(booking_id: str, ticket_ids: list | None = None) @frappe.whitelist(allow_guest=True) # nosemgrep: frappe-semgrep-rules.rules.security.guest-whitelisted-method def get_user_info() -> dict: if frappe.session.user == "Guest": - return {"is_logged_in": False} + return { + "is_logged_in": False, + "brand_image": frappe.get_cached_value("Website Settings", "Website Settings", "banner_image"), + } user = frappe.get_cached_doc("User", frappe.session.user) diff --git a/buzz/api/forms.py b/buzz/api/forms.py index d04c3268..8eb95ff6 100644 --- a/buzz/api/forms.py +++ b/buzz/api/forms.py @@ -8,6 +8,7 @@ from frappe.utils.data import cstr, sbool LAYOUT_FIELDTYPES = set(display_fieldtypes) +LAYOUT_BREAK_FIELDTYPES = {"Column Break", "Section Break"} EVENT_PROPOSAL_EXCLUDE_FIELDS = DEFAULT_FIELDS | { "naming_series", @@ -49,13 +50,21 @@ def _get_dial_codes() -> list: return codes -def get_form_fields(doctype: str, exclude_fields: set) -> list: +def get_form_fields(doctype: str, exclude_fields: set, with_layout_breaks: bool = False) -> list: meta = frappe.get_meta(doctype) fields = [] for df in meta.fields: if df.fieldname in exclude_fields: continue if df.fieldtype in LAYOUT_FIELDTYPES: + if with_layout_breaks and df.fieldtype in LAYOUT_BREAK_FIELDTYPES: + fields.append( + { + "fieldname": df.fieldname, + "fieldtype": df.fieldtype, + "label": df.label or "", + } + ) continue if df.hidden: continue @@ -306,7 +315,7 @@ def validate_event_proposal_settings(): @frappe.whitelist(allow_guest=True) # nosemgrep: frappe-semgrep-rules.rules.security.guest-whitelisted-method def get_event_proposal_form_data() -> dict: settings = validate_event_proposal_settings() - form_fields = get_form_fields("Event Proposal", EVENT_PROPOSAL_EXCLUDE_FIELDS) + form_fields = get_form_fields("Event Proposal", EVENT_PROPOSAL_EXCLUDE_FIELDS, with_layout_breaks=True) return { "form_fields": form_fields, diff --git a/buzz/events/doctype/event_category/event_category.json b/buzz/events/doctype/event_category/event_category.json index 7e67675c..ea4b4080 100644 --- a/buzz/events/doctype/event_category/event_category.json +++ b/buzz/events/doctype/event_category/event_category.json @@ -11,6 +11,7 @@ "description", "column_break_mrmh", "banner_image", + "meta_image", "icon_svg" ], "fields": [ @@ -45,6 +46,11 @@ "fieldname": "description", "fieldtype": "Small Text", "label": "Description" + }, + { + "fieldname": "meta_image", + "fieldtype": "Attach Image", + "label": "Meta Image" } ], "grid_page_length": 50, @@ -56,7 +62,7 @@ "link_fieldname": "event_category" } ], - "modified": "2026-01-07 14:41:57.312742", + "modified": "2026-05-08 12:38:57.139602", "modified_by": "Administrator", "module": "Events", "name": "Event Category", diff --git a/buzz/events/doctype/event_category/event_category.py b/buzz/events/doctype/event_category/event_category.py index 25543ebe..9f69ccfe 100644 --- a/buzz/events/doctype/event_category/event_category.py +++ b/buzz/events/doctype/event_category/event_category.py @@ -18,6 +18,7 @@ class EventCategory(Document): description: DF.SmallText | None enabled: DF.Check icon_svg: DF.Code | None + meta_image: DF.AttachImage | None slug: DF.Data | None # end: auto-generated types diff --git a/buzz/proposals/doctype/event_proposal/event_proposal.json b/buzz/proposals/doctype/event_proposal/event_proposal.json index 97e6d722..b91b1eb1 100644 --- a/buzz/proposals/doctype/event_proposal/event_proposal.json +++ b/buzz/proposals/doctype/event_proposal/event_proposal.json @@ -7,10 +7,10 @@ "engine": "InnoDB", "field_order": [ "title", - "category", "free_webinar", - "medium", "column_break_bixo", + "category", + "medium", "status", "naming_series", "section_break_psfj", @@ -21,7 +21,6 @@ "end_time", "section_break_zajc", "short_description", - "column_break_yxbj", "about", "host_tab", "host", @@ -128,10 +127,6 @@ "label": "About the event", "reqd": 1 }, - { - "fieldname": "column_break_yxbj", - "fieldtype": "Column Break" - }, { "fieldname": "short_description", "fieldtype": "Small Text", @@ -178,7 +173,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2025-12-11 11:36:40.618179", + "modified": "2026-05-11 07:52:43.388259", "modified_by": "Administrator", "module": "Proposals", "name": "Event Proposal", diff --git a/dashboard/src/components/EventDetailsHeader.vue b/dashboard/src/components/EventDetailsHeader.vue index b6e5d28d..67e3815a 100644 --- a/dashboard/src/components/EventDetailsHeader.vue +++ b/dashboard/src/components/EventDetailsHeader.vue @@ -4,12 +4,12 @@