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

Added support for Google Chat notifications #14191

Merged
merged 16 commits into from
Feb 5, 2024

Conversation

Godmartinz
Copy link
Collaborator

@Godmartinz Godmartinz commented Jan 30, 2024

Description

This adds notifications for check ins and check outs for google chat.
Integrations Settings:
image
Check in/Out Notifications are clickable and will link you to the user checking out or the asset being checked in.
image
image
image
image

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • [x ] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • PHP version:
  • MySQL version
  • Webserver version
  • OS version

Checklist:

Copy link

what-the-diff bot commented Jan 30, 2024

PR Summary

  • Integration of Google Chat as a Communication Channel
    There are additions made to the livewire settings form and individual notification classes, which allow the integration of Google Chat as an additional communication channel. Team members can receive real-time notifications through Google Chat, improving the communication efficiency.

  • Webhook Testing Functionality
    There is also a new functionality added to allow testing webhooks. This feature helps ensure the proper operation of webhooks, ensuring uninterrupted flow of automatic updates and messages.

  • Customization of Webhook Settings
    For the slack settings form, depending on the selected webhook, there are options to customize several details like the webhook channel and bot name, further personalizing the user experience.

  • Improvements to User Notifications
    Changes in the language files aim to improve the clarity of user notifications. The 'Checkout to' text has been changed to 'Checked out to', providing clear information about the asset status.

  • Introduction of New Package
    To support the new Google Chat integration, a new package called "laravel-notification-channels/google-chat" has been added in composer.json. This package aids sending notifications to the Google Chat channel.

  • Additional Configuration Options
    Lastly, there are new options added in the slack settings form and mail configuration for webhook selection and message templates, facilitating better user customization.

@Godmartinz
Copy link
Collaborator Author

@mauro-miatello soon to be! 🙂

Copy link
Collaborator

@marcusmoore marcusmoore left a comment

Choose a reason for hiding this comment

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

I couldn't get the Test Google Integration to pop up. I think the @if check in the component's blade file on line 128 needs to be updated to remove the $webhook_channel != null check. I removed it locally to test and was able to get the test notification to work 👍🏾

I made a couple comments but I'm going to come back to do a full review tomorrow.

(loving the additional channels you're implementing)

resources/lang/en-US/admin/hardware/form.php Outdated Show resolved Hide resolved
composer.json Outdated Show resolved Hide resolved
@Godmartinz
Copy link
Collaborator Author

I couldn't get the Test Google Integration to pop up. I think the @if check in the component's blade file on line 128 needs to be updated to remove the $webhook_channel != null check. I removed it locally to test and was able to get the test notification to work 👍🏾

The $webhook_channel != null check is there for Slack and the General webhook. I ended up applying a fix via the mount() and update() methods. 👍

Copy link
Collaborator

@marcusmoore marcusmoore left a comment

Choose a reason for hiding this comment

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

One more minor thing and this is good to go.

It's not necessary but if you wanted to improve overall readability there is some duplication in the webhook test methods that can be extracted to methods. Again, not holding this up from being merged.

composer.lock Outdated Show resolved Hide resolved
Copy link
Collaborator

@marcusmoore marcusmoore left a comment

Choose a reason for hiding this comment

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

Looks good! Good stuff with the notification channels 💪🏾

@snipe snipe merged commit 650aa25 into snipe:develop Feb 5, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants