Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Show name and emails of speakers in session notify modal #5427

Closed
wants to merge 11 commits into from
Closed

fix: Show name and emails of speakers in session notify modal #5427

wants to merge 11 commits into from

Conversation

divyamtayal
Copy link
Member

@divyamtayal divyamtayal commented Oct 30, 2020

Fixes #5309

Short description of what this resolves:

Show Speaker Name and Speaker Email

Changes proposed in this pull request:

  • Added Name and Email field in speaker Notification
  • Added CC field (Still need to be implemented)

Checklist

  • I have read the Contribution & Best practices Guide.
  • My branch is up-to-date with the Upstream development branch.
  • The acceptance, integration, unit tests and linter pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Before
Screenshot from 2020-10-30 10-43-56

After
Screenshot from 2020-10-30 10-44-46

@vercel
Copy link

vercel bot commented Oct 30, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/eventyay/open-event-frontend/d2ogqrn5j
✅ Preview: https://open-event-frontend-git-speak-notif-5309.eventyay.now.sh

@divyamtayal
Copy link
Member Author

@mariobehling @iamareebjamal Please let me know to make any changes till now and I want to know is this route implemeted
Screenshot from 2020-10-30 10-48-44
bcz I am not able to see in server documentation.
If you could tell me how to add email to request so that they can also be notified.

@divyamtayal divyamtayal changed the title Show Email Address Show Name and Email Address Oct 30, 2020
@codecov
Copy link

codecov bot commented Oct 30, 2020

Codecov Report

Merging #5427 into development will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #5427      +/-   ##
===============================================
- Coverage        23.23%   23.22%   -0.02%     
===============================================
  Files              493      493              
  Lines             5169     5172       +3     
  Branches            38       38              
===============================================
  Hits              1201     1201              
- Misses            3963     3966       +3     
  Partials             5        5              
Impacted Files Coverage Δ
app/components/modals/session-notify-modal.js 5.55% <0.00%> (-0.51%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e0fd0a3...9c2dbf5. Read the comment docs.

@iamareebjamal
Copy link
Member

No effect without server changes

@divyamtayal
Copy link
Member Author

No effect without server changes

So what should I do now bcz rest part is done I suppose?

@mariobehling
Copy link
Member

Thank you! Please change as follows:

  • Create a box same a "CC" box above CC box
  • Show names and email addresses in the box as follows in the example: Mario Behling [email protected], Hong Phuc Dang [email protected]
  • Names/Emails are not editable of course

@iamareebjamal
Copy link
Member

@daretobedifferent18 Create a PR on server to accept CC emails

@divyamtayal
Copy link
Member Author

Thank you! Please change as follows:

* [ ]  Create a box same a "CC" box above CC box

* [ ]  Show names and email addresses in the box as follows in the example: Mario Behling [[email protected]](mailto:[email protected]), Hong Phuc Dang [[email protected]](mailto:[email protected])

* [ ]  Names/Emails are not editable of course

and what should be the label name for it?

@divyamtayal
Copy link
Member Author

divyamtayal commented Oct 30, 2020

@daretobedifferent18 Create a PR on server to accept CC emails

@iamareebjamal So now I have to work on open-event-server also?
because if that's the case I need to start exploring the server project as well

@divyamtayal
Copy link
Member Author

Screenshot from 2020-10-30 22-05-15

@iamareebjamal
Copy link
Member

Yes this issue constitutes work in both server and frontend. As there is no point of CC box if it doesn't work. You can either work on it or wait for the server part to be completed by someone before this PR is merged. Simply, merging of the PR is blocked on server part being done

@divyamtayal
Copy link
Member Author

Yes this issue constitutes work in both server and frontend. As there is no point of CC box if it doesn't work. You can either work on it or wait for the server part to be completed by someone before this PR is merged. Simply, merging of the PR is blocked on server part being done

Ok so meanwhile I can explore server project and for this issue frontend part is done so can I now work on other frontend issue?

@iamareebjamal
Copy link
Member

You can do either of those

@divyamtayal
Copy link
Member Author

You can do either of those

ok and do I have to make any changes now in this issue @mariobehling @iamareebjamal

@iamareebjamal iamareebjamal changed the title Show Name and Email Address fix: Show name and emails of speakers in session notify modal Oct 30, 2020
@auto-label auto-label bot added the fix label Oct 30, 2020
@@ -42,7 +43,7 @@ export default class SessionNotifyModal extends ModalBase {
}
this.mails = await mailPromise;
const session = this.store.peekRecord('session', this.sessionId, { backgroundReload: false });
this.speakers = session.speakers.map(speaker => `${speaker.name} ${speaker.email}`).join(', ');
this.speakerEmails = session.speakers.map(speaker => `${speaker.name} ${speaker.email}`).join(', ');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See how computed properties are created

@divyamtayal
Copy link
Member Author

@iamareebjamal Is this the correct way of declaring computed property? it is working fine with this.

@@ -13,6 +13,12 @@ export default class SessionNotifyModal extends ModalBase {
@tracked saving = false;
@tracked subject = '';
@tracked message = '';
@tracked cc = '';

speakerEmails = computed(function(){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You didn't list the dependencies of the computed function

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have done it. You can please see the changes made.

@lgtm-com
Copy link

lgtm-com bot commented Nov 2, 2020

This pull request introduces 1 alert when merging 4c4bf22 into e0fd0a3 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

@divyamtayal
Copy link
Member Author

divyamtayal commented Nov 2, 2020

@iamareebjamal I have added computed property for speakerEmails in session-notify-modal.js file so now you can check these changes

@divyamtayal
Copy link
Member Author

divyamtayal commented Nov 2, 2020

@iamareebjamal I don't know why but on the top it is coming that the this Pr is merging from unknown repository. What should I do. The branch is there in my repo

Should I close this and make again PR?

@@ -35,6 +36,12 @@ export default class SessionNotifyModal extends ModalBase {
return mail;
}

@computed('sessionId')
get speakerEmails() {
const session = this.store.peekRecord('session', this.sessionId, { backgroundReload: false });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why backgroundReload: false?

Copy link
Member Author

@divyamtayal divyamtayal Nov 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bcz I thought otherwise there will be reloading that will be visible but we can do it without specifying backgroundReload: false and can do it with default behaviour.

const session =  this.store.peekRecord('session', this.sessionId); 

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, please use this instead

@divyamtayal
Copy link
Member Author

@iamareebjamal please let me know what to do and also about the fact that should I create new PR and close this one bcz branch is not showing up at the top.
Its showing unknown repository

@iamareebjamal
Copy link
Member

No, continue in the same PR

@divyamtayal
Copy link
Member Author

divyamtayal commented Nov 2, 2020

No, continue in the same PR

@iamareebjamal ok so will commiting more changes will reflect in this PR? bcz what I think is this PR is no more connected with the branch, I don't know why
Although I have contacted github support and they are saying either you have delete the current PR and make new one or they can restore but then PR made after the problem occured will be having same problem, so in that case PR that I have made after #5447 will be having same problem.
So pls let me know what to do

@iamareebjamal
Copy link
Member

Just make changes using github UI then.

@divyamtayal
Copy link
Member Author

divyamtayal commented Nov 3, 2020

@iamareebjamal I am not able to
Screenshot from 2020-11-03 07-51-50
Either you can do that or if there is any other option pls let me know

@iamareebjamal
Copy link
Member

OK, leave the PR for now as the CC part is remaining anyway

@sachinchauhan2889
Copy link
Contributor

@iamareebjamal sir, you can close this. Issue has been solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Speaker Notification: Show Email address
4 participants