From 2894a5e479e552f544fae30b3308f3e298b58111 Mon Sep 17 00:00:00 2001 From: Summayya Date: Thu, 19 Aug 2021 17:22:01 +0530 Subject: [PATCH] fix: change date format --- .../attendee_registration.js | 12 ++++-- .../doctype/schedule/schedule.js | 12 ++++-- .../doctype/speaker/speaker.js | 12 ++++-- .../event_management/doctype/talk/talk.json | 8 ++-- .../previous_talk/previous_talk.html | 2 +- .../schedule_section/schedule_section.html | 37 ++++++++++--------- 6 files changed, 51 insertions(+), 32 deletions(-) diff --git a/community/event_management/doctype/attendee_registration/attendee_registration.js b/community/event_management/doctype/attendee_registration/attendee_registration.js index e1b17c5a..7b934f0b 100644 --- a/community/event_management/doctype/attendee_registration/attendee_registration.js +++ b/community/event_management/doctype/attendee_registration/attendee_registration.js @@ -2,7 +2,13 @@ // For license information, please see license.txt frappe.ui.form.on('Attendee Registration', { - // refresh: function(frm) { - - // } + onload: function (frm) { + frm.set_query('user', function (doc) { + return { + filters: { + "ignore_user_type": 1, + } + }; + }); + } }); diff --git a/community/event_management/doctype/schedule/schedule.js b/community/event_management/doctype/schedule/schedule.js index 137c448d..61c1528a 100644 --- a/community/event_management/doctype/schedule/schedule.js +++ b/community/event_management/doctype/schedule/schedule.js @@ -2,7 +2,13 @@ // For license information, please see license.txt frappe.ui.form.on('Schedule', { - // refresh: function(frm) { - - // } + onload: function (frm) { + frm.set_query('talk', function (doc) { + return { + filters: { + "status": "Approved", + } + }; + }); + } }); diff --git a/community/event_management/doctype/speaker/speaker.js b/community/event_management/doctype/speaker/speaker.js index 1b1da984..8e32bd50 100644 --- a/community/event_management/doctype/speaker/speaker.js +++ b/community/event_management/doctype/speaker/speaker.js @@ -2,7 +2,13 @@ // For license information, please see license.txt frappe.ui.form.on('Speaker', { - // refresh: function(frm) { - - // } + onload: function (frm) { + frm.set_query('user', function (doc) { + return { + filters: { + "ignore_user_type": 1, + } + }; + }); + } }); diff --git a/community/event_management/doctype/talk/talk.json b/community/event_management/doctype/talk/talk.json index 8ed35d0c..9ecbbaab 100644 --- a/community/event_management/doctype/talk/talk.json +++ b/community/event_management/doctype/talk/talk.json @@ -7,13 +7,13 @@ "engine": "InnoDB", "field_order": [ "event", + "speaker", "topic", "title", "about", "attachment", "url", "thumbnail", - "speaker", "name_of_the_speaker", "status" ], @@ -51,7 +51,7 @@ }, { "fieldname": "about", - "fieldtype": "Data", + "fieldtype": "Text", "label": "About" }, { @@ -71,12 +71,12 @@ "fieldtype": "Select", "in_list_view": 1, "label": "Status", - "options": "Applied\nPending\nApproved\nRejected" + "options": "Applied\nPending\nApproved\nRejected\nPrevious Talk" } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2021-08-19 15:20:07.750884", + "modified": "2021-08-19 16:44:58.181528", "modified_by": "Administrator", "module": "Event Management", "name": "Talk", diff --git a/community/event_management/web_template/previous_talk/previous_talk.html b/community/event_management/web_template/previous_talk/previous_talk.html index d49195df..729f9ed2 100644 --- a/community/event_management/web_template/previous_talk/previous_talk.html +++ b/community/event_management/web_template/previous_talk/previous_talk.html @@ -2,7 +2,7 @@
{{title}}
{% for video in talk_details %} - {% set video_details = frappe.get_doc('Previous Content', video.previous_content, filters={ + {% set video_details = frappe.get_doc('Talk', video.previous_content, filters={ 'event': event }) %}
diff --git a/community/event_management/web_template/schedule_section/schedule_section.html b/community/event_management/web_template/schedule_section/schedule_section.html index 9181f21f..0e51d1cc 100644 --- a/community/event_management/web_template/schedule_section/schedule_section.html +++ b/community/event_management/web_template/schedule_section/schedule_section.html @@ -1,21 +1,20 @@ -{% set schedule_docs = frappe.get_all("Schedule", fields =["speaker", "slot"], filters={ +{% set schedule_docs = frappe.get_all("Schedule", fields =["talk", "slot"], filters={ 'event': event },) %} {% set slot_data = {} %} {% for schedule in schedule_docs %} -{% set speaker = frappe.get_doc("Speaker Registration", schedule.speaker) %} +{% set talk = frappe.get_doc("Talk", schedule.talk) %} +{% set speaker = frappe.get_doc("Speaker", talk.speaker) %} {% set slot = frappe.get_doc("Slot", schedule.slot) %} {% set slot_data = slot_data.setdefault(slot.date, []).append({ "slot": slot.name|string, "start_time": slot.start_time, "end_time": slot.end_time, -"speaker": speaker.name, "picture": speaker.picture, -"about": speaker.about, -"title": speaker.title, +"about": talk.about, +"title": talk.title, "full_name": speaker.full_name, -"email": speaker.email }) %} {% endfor %} @@ -31,7 +30,7 @@
@@ -42,8 +41,8 @@ {% for day in slot_data %} {% set outer_loop = loop %}
-
{{day}}
+
{{frappe.utils.format_date(day, "dd MMMM, YYYY")}}
{% for slot in slot_data[day] %}
@@ -58,21 +57,23 @@ {{ frappe.format(slot.start_time, {'fieldtype': 'Time'})}} - {{ frappe.format(slot.end_time, {'fieldtype': 'Time'}) }}
- + +
+
+

{{slot.about}}

+
+
+ {% endfor %}
-
-

{{slot.about}}

-
-
- {% endfor %}
+ {% endfor %}
- {% endfor %} - \ No newline at end of file