Skip to content

Commit

Permalink
fix: description for workshops and presentations
Browse files Browse the repository at this point in the history
  • Loading branch information
AlirezaYousefpourM committed Nov 28, 2023
1 parent 76125ee commit 86c0108
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion frontend/src/pages/my-account/MyAccount.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const MyAccount = () => {
isWorkshop={type === 'Workshops'}
purchaseState={type === 'Cart' ? 1 : 2}
title={item.name}
description={Helper.omitLongString(item.desc, 100)}
description={item.desc}
level={item.level}
startDate={item.start_date}
endDate={item.end_date}
Expand All @@ -77,6 +77,7 @@ const MyAccount = () => {
prerequisites={item.prerequisites}
syllabus={item.syllabus}
capacity={item.capacity}
remainingCapacity={item.remaining_capacity}
isFull={item.isFull}
addToCalendarLink={item.addToCalendarLink}
onClickAddToCart={() => {}}
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/pages/workshops/WorkshopsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ export default function WorkshopsPage() {
key={index}
isWorkshop={item.isWorkshop}
title={item.name}
description={item.desc && Helper.omitLongString(item.desc, 50)}
description={item.desc}
remainingCapacity={item.remaining_capacity}
purchaseState={0}
presenterName={item.presenters.join(', ')}
startDate={new Date(item.start_date).toLocaleString()}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/pages/workshops/useWorkshopsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export default function useWorkshopsPage() {
item['isWorkshop'] = !('presenters' in workshop);
item['capacity'] = workshop.capacity;
item['cost'] = workshop.cost;
item['remaining_capacity'] = workshop.remaining_capacity
return item;
})
.filter((e) => e != null);
Expand Down

0 comments on commit 86c0108

Please sign in to comment.