Skip to content

Commit

Permalink
remove unused checks add show not authorized text for non super users
Browse files Browse the repository at this point in the history
  • Loading branch information
yesyash committed Aug 18, 2024
1 parent 4c86a14 commit 56bf942
Showing 1 changed file with 42 additions and 65 deletions.
107 changes: 42 additions & 65 deletions app/templates/intro.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,79 +7,56 @@
</div>
{{else}}
{{#if this.login.userData.roles.super_user}}
{{#if this.isRejected}}
<div class="rejection-message">
<p>Unfortunately, at this time, your application is not approved.</p>
<p>{{this.rejectionNote}}</p>
</div>
{{else}}
<ApplicantIntro
@data={{this.model}}
@isLoading={{this.login.isLoading}}
@isSuperUser={{this.login.userData.roles.super_user}}
/>
<ApplicantIntro
@data={{this.model}}
@isLoading={{this.login.isLoading}}
@isSuperUser={{this.login.userData.roles.super_user}}
/>

<div class="superuser-feedback">
<label for="superuserFeedback" class="superuser-feedback__label">
Your remarks:
</label>
<textarea
id="superuserFeedback"
class="superuser-feedback__textarea"
placeholder="Enter your remarks"
{{on "change" this.updateRemarks}}
></textarea>
</div>
<div class="superuser-feedback">
<label for="superuserFeedback" class="superuser-feedback__label">
Your remarks:
</label>
<textarea
id="superuserFeedback"
class="superuser-feedback__textarea"
placeholder="Enter your remarks"
{{on "change" this.updateRemarks}}
></textarea>
</div>

<div class="action-buttons">
<button
type="button"
class="approve-button"
{{on
"click"
(fn this.approveRejectAction this.statusTypes.accepted)
}}
>Accept</button>
<div class="action-buttons">
<button
type="button"
class="approve-button"
{{on "click" (fn this.approveRejectAction this.statusTypes.accepted)}}
>Accept</button>

<button
type="button"
class="reject-button"
{{on "click" (fn this.approveRejectAction this.statusTypes.rejected)}}
>Reject</button>
</div>

{{#if this.model.inviteLink}}
<div>
<p>Congratulations. You've been approved to join our Discord server
using this link:</p>
<a
href="{{this.model.inviteLink}}"
target="_blank"
rel="noopener noreferrer"
>{{this.model.inviteLink}}</a>
<button
type="button"
class="reject-button"
{{on
"click"
(fn this.approveRejectAction this.statusTypes.rejected)
}}
>Reject</button>
class="copy-button"
{{on "click" (fn this.copyToClipboard this.model.inviteLink)}}
>Copy Link</button>
</div>

{{#if this.model.inviteLink}}
<div>
<p>Congratulations. You've been approved to join our Discord server
using this link:</p>
<a
href="{{this.model.inviteLink}}"
target="_blank"
rel="noopener noreferrer"
>{{this.model.inviteLink}}</a>
<button
type="button"
class="copy-button"
{{on "click" (fn this.copyToClipboard this.model.inviteLink)}}
>Copy Link</button>
</div>
{{/if}}
{{/if}}
{{else}}
{{#if this.isRejected}}
<div class="rejection-message">
<p>Unfortunately, at this time, your application is not approved.</p>
<p>{{this.rejectionNote}}</p>
</div>
{{else}}
<div class="under-review-message">
<p>Superusers are reviewing your application. Please check again after
a few days.</p>
</div>
{{/if}}
<div>You're not authorized to view this page.</div>
{{/if}}
{{/if}}
</section>

0 comments on commit 56bf942

Please sign in to comment.