fix: change date format

This commit is contained in:
Summayya
2021-08-19 17:22:01 +05:30
parent ad0913500c
commit 2894a5e479
6 changed files with 51 additions and 32 deletions

View File

@@ -2,7 +2,7 @@
<div class="course-home-headings">{{title}}</div>
<div class="speaker-cards-parent">
{% 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
}) %}
<div class="common-card-style talk-card">

View File

@@ -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 @@
<div class="small-title chapter-title" data-target="#apps-sites-and-bench"
data-toggle="collapse" aria-expanded="false">
<img class="chapter-icon" src="/assets/community/icons/chevron-right.svg" />
{{day}}
{{frappe.utils.format_date(day, "dd MMMM, YYYY")}}
</div>
<div class="card-divider"></div>
</div>
@@ -42,8 +41,8 @@
{% for day in slot_data %}
{% set outer_loop = loop %}
<div class="course-details-outline">
<div class="course-home-headings">{{day}}</div>
<div class="coure-outline">
<div class="course-home-headings">{{frappe.utils.format_date(day, "dd MMMM, YYYY")}}</div>
{% for slot in slot_data[day] %}
<div class="schedule-container">
<div class="schedule-inner-container">
@@ -58,21 +57,23 @@
{{ frappe.format(slot.start_time, {'fieldtype': 'Time'})}} - {{
frappe.format(slot.end_time, {'fieldtype': 'Time'}) }}
</div>
<div class="chapter-title small-title" data-toggle="collapse" data-target="#slot-{{loop.index}}-{{outer_loop.index}}" aria-expanded="false" aria-controls="collapseExample">
<img class="chapter-icon" src="/assets/community/icons/chevron-right.svg">
</div>
<div class="chapter-title small-title" data-toggle="collapse"
data-target="#slot-{{loop.index}}-{{outer_loop.index}}" aria-expanded="false"
aria-controls="collapseExample">
<img class="chapter-icon" src="/assets/community/icons/chevron-right.svg">
</div>
</div>
<div class="collapse" id="slot-{{loop.index}}-{{outer_loop.index}}">
<p class="schedule-info">{{slot.about}}</p>
</div>
<div class="card-divider"></div>
{% endfor %}
</div>
<div class="collapse" id="slot-{{loop.index}}-{{outer_loop.index}}">
<p class="schedule-info">{{slot.about}}</p>
</div>
<div class="card-divider"></div>
{% endfor %}
</div>
{% endfor %}
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</div>