Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanvidrine committed Nov 8, 2024
1 parent 588052f commit be7751f
Show file tree
Hide file tree
Showing 6 changed files with 163 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ export default class DiscoursePostEventStatus extends Component {
@service discoursePostEventApi;
@service siteSettings;

get watchingInviteeStatus() {
return this.args.event.watchingInvitee?.status;
}

get eventButtons() {
return this.siteSettings.event_participation_buttons.split("|");
}
Expand All @@ -36,6 +32,10 @@ export default class DiscoursePostEventStatus extends Component {
return this.args.event.watchingInvitee && this.args.event.isPublic;
}

get watchingInviteeStatus() {
return this.args.event.watchingInvitee?.status;
}

@action
async leaveEvent() {
try {
Expand Down Expand Up @@ -107,9 +107,9 @@ export default class DiscoursePostEventStatus extends Component {
}

<template>
<div
<section
class={{concatClass
"event-status"
"event__section event-actions event-status"
(if
this.watchingInviteeStatus
(concat "status-" this.watchingInviteeStatus)
Expand Down Expand Up @@ -177,6 +177,6 @@ export default class DiscoursePostEventStatus extends Component {
{{/unless}}
{{/if}}
</PluginOutlet>
</div>
</section>
</template>
}
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
<GroupSelector
@fullWidthWrap={{true}}
@groupFinder={{this.groupFinder}}
@groupNames={{@model.event.raw_invitees}}
@groupNames={{@model.event.rawInvitees}}
@onChangeCallback={{this.setRawInvitees}}
@placeholderKey="topic.invite_private.group_name"
/>
Expand Down Expand Up @@ -232,7 +232,7 @@
<Input
class="custom-field-input"
@value={{readonly
(get @model.event.custom_fields allowedCustomField)
(get @model.event.customFields allowedCustomField)
}}
placeholder={{i18n
"discourse_post_event.builder_modal.custom_fields.placeholder"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export default class PostEventBuilder extends Component {
@action
setCustomField(field, e) {
this.event[field] = e.target.value;
this.event.customFields[field] = e.target.value;
}
@action
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export default class DiscoursePostEventEvent {
@tracked rawInvitees;
@tracked url;
@tracked timezone;
@tracked status;
@tracked post;
@tracked minimal;
@tracked canUpdateAttendance;
Expand Down
Loading

0 comments on commit be7751f

Please sign in to comment.