-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7510 from fjordllc/feature/add-bell-notification-…
…for-inquiry お問い合わせがあったら管理者に通知する
- Loading branch information
Showing
12 changed files
with
78 additions
and
32 deletions.
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
class InquiryNotifier | ||
NOTIFICATION_SENDER_NAME = 'pjord' | ||
|
||
def call(payload) | ||
inquiry = payload[:inquiry] | ||
return if inquiry.nil? | ||
|
||
sender = User.find_by(login_name: NOTIFICATION_SENDER_NAME) | ||
User.admins.each do |receiver| | ||
ActivityDelivery.with(inquiry:, receiver:, sender:).notify(:came_inquiry) | ||
end | ||
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
|
@@ -1405,7 +1405,7 @@ paginataion-jirou: | |
|
||
pjord: | ||
login_name: pjord | ||
email: | ||
email: [email protected] | ||
crypted_password: $2a$10$n/xv4/1luueN6plzm2OyDezWlZFyGHjQEf4hwAW1r3k.lCm0frPK. # testtest | ||
salt: zW3kQ9ubsxQQtzzzs4ap | ||
name: ピヨルド | ||
|
@@ -1418,7 +1418,7 @@ pjord: | |
course: course1 | ||
company: company1 | ||
admin: true | ||
mentor: false | ||
mentor: true | ||
unsubscribe_email_token: Xw-T0PjrO2LTkCx1C8KA9w | ||
updated_at: "2024-03-09 00:00:30" | ||
created_at: "2024-03-05 00:00:30" | ||
|
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 |
---|---|---|
|
@@ -1018,3 +1018,21 @@ harikirio: #必修でないプラクティスも修了しているユーザー | |
created_at: "2020-01-01 00:00:12" | ||
sent_student_followup_message: true | ||
last_activity_at: "2020-01-01 00:00:12" | ||
|
||
pjord: | ||
login_name: pjord | ||
email: [email protected] | ||
crypted_password: $2a$10$n/xv4/1luueN6plzm2OyDezWlZFyGHjQEf4hwAW1r3k.lCm0frPK. # testtest | ||
salt: zW3kQ9ubsxQQtzzzs4ap | ||
name: ピヨルド | ||
name_kana: ピヨルド | ||
company: company1 | ||
description: "管理者のピヨルドです。バイキングの末裔です。" | ||
course: course1 | ||
job: office_worker | ||
os: 回答なし | ||
admin: true | ||
adviser: true | ||
updated_at: "2014-01-01 00:00:01" | ||
created_at: "2014-01-01 00:00:01" | ||
last_activity_at: "2014-01-01 00:00:01" |
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