Skip to content

Commit

Permalink
confusing merge, might be broken
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanvidrine committed Nov 8, 2024
1 parent be7751f commit 96a1f3d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Component from "@glimmer/component";
import { hash } from "@ember/helper";
import { service } from "@ember/service";
import { modifier } from "ember-modifier";
import { eq, or } from "truth-helpers";

Check failure on line 5 in assets/javascripts/discourse/components/discourse-post-event/index.gjs

View workflow job for this annotation

GitHub Actions / ci / linting

'eq' is defined but never used

Check failure on line 5 in assets/javascripts/discourse/components/discourse-post-event/index.gjs

View workflow job for this annotation

GitHub Actions / ci / linting

'or' is defined but never used

Check failure on line 5 in assets/javascripts/discourse/components/discourse-post-event/index.gjs

View workflow job for this annotation

GitHub Actions / ci / linting

'eq' is defined but never used

Check failure on line 5 in assets/javascripts/discourse/components/discourse-post-event/index.gjs

View workflow job for this annotation

GitHub Actions / ci / linting

'or' is defined but never used
import PluginOutlet from "discourse/components/plugin-outlet";
import concatClass from "discourse/helpers/concat-class";
import replaceEmoji from "discourse/helpers/replace-emoji";
Expand Down Expand Up @@ -67,6 +68,10 @@ export default class DiscoursePostEvent extends Component {
return this.currentUser && this.args.event.can_act_on_discourse_post_event;
}

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

<template>
<div
class={{concatClass
Expand Down Expand Up @@ -108,12 +113,6 @@ export default class DiscoursePostEvent extends Component {
/>
</header>

{{#if @event.canUpdateAttendance}}
<section class="event__section event-actions">
<Status @event={{@event}} />
</section>
{{/if}}

<PluginOutlet
@name="discourse-post-event-info"
@outletArgs={{hash
Expand All @@ -122,11 +121,15 @@ export default class DiscoursePostEvent extends Component {
Url=(component Url url=@event.url)
Dates=(component Dates event=@event)
Invitees=(component Invitees event=@event)
Status=(component Status event=@event)
}}
>
<Url @url={{@event.url}} />
<Dates @event={{@event}} />
<Invitees @event={{@event}} />
{{#if @event.canUpdateAttendance}}
<Status @event={{@event}} />
{{/if}}
</PluginOutlet>
{{/if}}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Component from "@glimmer/component";
import { action } from "@ember/object";
import { service } from "@ember/service";
import DButton from "discourse/components/d-button";
import icon from "discourse-common/helpers/d-icon";
import i18n from "discourse-common/helpers/i18n";
import PostEventInvitees from "../modal/post-event-invitees";
import Invitee from "./invitee";
Expand Down Expand Up @@ -70,11 +71,21 @@ export default class DiscoursePostEventInvitees extends Component {
@action={{this.showAllInvitees}}
/>
</div>
<ul class="event-invitees-avatars">
{{#each @event.sampleInvitees as |invitee|}}
<Invitee @invitee={{invitee}} />
{{/each}}
</ul>
<div class="event-invitees-avatars-container">
{{icon "users"}}
<ul class="event-invitees-avatars">
{{#each @event.sampleInvitees as |invitee|}}
<Invitee @invitee={{invitee}} />
{{/each}}
</ul>
</div>
</section>
{{else}}
<section class="event__section event-invitees no-rsvp">
<p class="no-rsvp-description">{{i18n
"discourse_post_event.models.invitee.status.going_count.other"
count="0"
}}</p>
</section>
{{/if}}
{{/unless}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default class DiscoursePostEventStatus extends Component {
"event__section event-actions event-status"
(if
this.watchingInviteeStatus
(concat "status-" this.watchingInviteeStatus)
(concat "status-" this.args.watchingInviteeStatus)

Check failure on line 115 in assets/javascripts/discourse/components/discourse-post-event/status.gjs

View workflow job for this annotation

GitHub Actions / ci / linting

Component templates should avoid "this.args.watchingInviteeStatus" usage, try "@watchingInviteeStatus" instead.

Check failure on line 115 in assets/javascripts/discourse/components/discourse-post-event/status.gjs

View workflow job for this annotation

GitHub Actions / ci / linting

Component templates should avoid "this.args.watchingInviteeStatus" usage, try "@watchingInviteeStatus" instead.
)
}}
>
Expand Down

0 comments on commit 96a1f3d

Please sign in to comment.