From 832c2cf8b48a0e4fe97932123b2a076ca50559bb Mon Sep 17 00:00:00 2001 From: vishwajeet-13 Date: Fri, 8 May 2026 12:40:23 +0530 Subject: [PATCH 1/6] feat: add meta image field in event category doctype --- buzz/events/doctype/event_category/event_category.json | 8 +++++++- buzz/events/doctype/event_category/event_category.py | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) 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 From ed0e8c9eec6467f6e23e0784173cfb13df9192f3 Mon Sep 17 00:00:00 2001 From: Rahul Agrawal <12agrawalrahul@gmail.com> Date: Mon, 11 May 2026 08:29:47 +0530 Subject: [PATCH 2/6] feat: add section break in event proposal --- buzz/api/forms.py | 13 ++++- .../event_proposal/event_proposal.json | 11 +--- dashboard/src/pages/EventProposalForm.vue | 55 ++++++++++++++++--- 3 files changed, 61 insertions(+), 18 deletions(-) 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/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/pages/EventProposalForm.vue b/dashboard/src/pages/EventProposalForm.vue index 3c3f4432..7f4182b2 100644 --- a/dashboard/src/pages/EventProposalForm.vue +++ b/dashboard/src/pages/EventProposalForm.vue @@ -37,14 +37,29 @@ -
- +
+
+
+ +
+
@@ -96,6 +111,30 @@ const rendered_success_message = computed(() => { return marked(msg); }); +const field_sections = computed(() => { + const fields = form_data.value?.form_fields || []; + const sections = []; + let current_section = [[]]; + for (const field of fields) { + if (field.fieldtype === "Section Break") { + if (current_section.some((col) => col.length)) { + sections.push(current_section); + } + current_section = [[]]; + continue; + } + if (field.fieldtype === "Column Break") { + current_section.push([]); + continue; + } + current_section[current_section.length - 1].push(field); + } + if (current_section.some((col) => col.length)) { + sections.push(current_section); + } + return sections; +}); + const form_data_resource = createResource({ url: "buzz.api.forms.get_event_proposal_form_data", auto: true, From a76e3d1f74934b34ee97e770e3096cb0036d187d Mon Sep 17 00:00:00 2001 From: vishwajeet-13 Date: Tue, 12 May 2026 12:51:11 +0530 Subject: [PATCH 3/6] fix: remove height from banner and added max-height in image --- dashboard/src/components/EventDetailsHeader.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 @@
From e424221d494e40696b90549121528c0d4edc711f Mon Sep 17 00:00:00 2001 From: vishwajeet-13 Date: Tue, 12 May 2026 23:02:37 +0530 Subject: [PATCH 4/6] fix: logo if user is guest --- buzz/api/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/buzz/api/__init__.py b/buzz/api/__init__.py index 06e636e3..047a03f1 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.db.get_single_value("Website Settings", "banner_image"), + } user = frappe.get_cached_doc("User", frappe.session.user) From 959ebe14d412b71177b40de2be2d1223011f3acc Mon Sep 17 00:00:00 2001 From: vishwajeet-13 Date: Tue, 12 May 2026 23:11:17 +0530 Subject: [PATCH 5/6] chore: use get_cached_value --- buzz/api/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buzz/api/__init__.py b/buzz/api/__init__.py index 047a03f1..7762bd07 100644 --- a/buzz/api/__init__.py +++ b/buzz/api/__init__.py @@ -985,7 +985,7 @@ def get_user_info() -> dict: if frappe.session.user == "Guest": return { "is_logged_in": False, - "brand_image": frappe.db.get_single_value("Website Settings", "banner_image"), + "brand_image": frappe.get_cached_value("Website Settings", "banner_image"), } user = frappe.get_cached_doc("User", frappe.session.user) From 96347a6321c2411b1cc132e925fbcc31c0d57290 Mon Sep 17 00:00:00 2001 From: vishwajeet-13 Date: Wed, 13 May 2026 00:32:29 +0530 Subject: [PATCH 6/6] fix: doctype name for single doctype --- buzz/api/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buzz/api/__init__.py b/buzz/api/__init__.py index 7762bd07..2e657fd1 100644 --- a/buzz/api/__init__.py +++ b/buzz/api/__init__.py @@ -985,7 +985,7 @@ def get_user_info() -> dict: if frappe.session.user == "Guest": return { "is_logged_in": False, - "brand_image": frappe.get_cached_value("Website Settings", "banner_image"), + "brand_image": frappe.get_cached_value("Website Settings", "Website Settings", "banner_image"), } user = frappe.get_cached_doc("User", frappe.session.user)