Skip to content

Commit

Permalink
[MWPW-160931] Don't save unfinished agenda (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
qiyundai authored Oct 23, 2024
1 parent 3953e9d commit bef3aca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function onSubmit(component, props) {

let agenda = [];

if (agendaGroup) agenda = agendaGroup.getAgendas();
if (agendaGroup) agenda = agendaGroup.getCompleteAgenda();

const agendaInfo = {
showAgendaPostEvent,
Expand Down
4 changes: 2 additions & 2 deletions ecc/components/agenda-fieldset-group/agenda-fieldset-group.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ export default class AgendaFieldsetGroup extends LitElement {
this.agendaItems = this.agendaItems.map((agenda, i) => (i === index ? updatedAgenda : agenda));
}

getAgendas() {
return this.agendaItems.filter((o) => !(Object.keys(o).length === 0 && o.constructor === Object));
getCompleteAgenda() {
return this.agendaItems.filter((o) => (o.startTime && o.description));
}

hasOnlyEmptyAgendaLeft() {
Expand Down

0 comments on commit bef3aca

Please sign in to comment.