-
Notifications
You must be signed in to change notification settings - Fork 3
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
[File d'attente] Envoi de l'alerte #382
Merged
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
082150e
add notification
jjf21 7977a62
add tests
jjf21 a2848c1
cleaning
jjf21 ffe688b
rubocop
jjf21 e680f3c
add flipflap
jjf21 6a80006
rubocop
jjf21 d076db3
clean
jjf21 da5fd49
add tests
jjf21 b0bdbe8
clean
jjf21 7763d08
rubocop
jjf21 2f02a69
Merge branch 'master' into file-attente
cc38811
fix tests
jjf21 9a5fdda
add confirmation link
jjf21 c6e7ccb
removes repetitive specs
jjf21 600ef9f
add tests
jjf21 3b227a2
fix tests
jjf21 c18e66f
change method change_creneau to Creneaux#new
jjf21 d5758dc
Typo + Refactor controller
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
class TwilioSenderJob < ApplicationJob | ||
def perform(status, rdv, user) | ||
TwilioTextMessenger.new(status, rdv, user).send_sms | ||
def perform(status, rdv, user, options = {}) | ||
TwilioTextMessenger.new(status, rdv, user, options).send_sms | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
class FileAttenteMailer < ApplicationMailer | ||
def send_notification(rdv, user) | ||
def send_notification(rdv, user, creneau_starts_at) | ||
@rdv = rdv | ||
@creneau_starts_at = creneau_starts_at | ||
mail(to: user.email, subject: "Un créneau vient de se liberer !") | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.row | ||
- if @state | ||
h2 Un créneau s'est libéré | ||
p.mb-5 Un créneau s'est liberé le #{l(@starts_at, format: :human)}. Vous pouvez prendre ce creneau si vous souhaitez avancer votre RDV à cette date ou vous pouvez conserver la date initiale. | ||
.col.text-center | ||
h4 Nouveau rendez-vous proposé | ||
p= l(@starts_at, format: :human).capitalize | ||
= link_to 'Changer de créneau', "?starts_at=#{@starts_at.to_s}&confirmed=true", class:"btn btn-primary" | ||
|
||
.col-sm-12.mt-3.text-center | ||
p.text-muted | ||
| Si ce créneau ne vous convient pas, votre RDV restera le #{l(@rdv.starts_at, format: :human)} | ||
- elsif @state.nil? | ||
h2.mb-4 Votre RDV a bien été modifié | ||
.mx-auto | ||
= render partial: 'rdv', locals: { rdv: @rdv, hide_file_attente_infos: true } | ||
- elsif @state == false | ||
h2 Créneau indisponible | ||
p.mb-5 Désolé le RDV a déjà été réattribué. Vous recevrez d'autres propositions si un créneau se libère. | ||
.mx-auto | ||
= render partial: 'rdv', locals: { rdv: @rdv, hide_file_attente_infos: true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est pas un creneaux#new ?