diff --git a/.env.example b/.env.example index 994ea9a16..f0231e541 100644 --- a/.env.example +++ b/.env.example @@ -22,3 +22,7 @@ DATABASE_URL=postgres://user:password@localhost:5432/dbname #Sentry DSN SENTRY_DSN=https://examplePublicKey@o0.ingest.sentry.io/0 + + +SLACK_CLIENT_ID= +SLACK_CLIENT_SECRET= diff --git a/blt/urls.py b/blt/urls.py index 486185fb6..ab314b3c6 100644 --- a/blt/urls.py +++ b/blt/urls.py @@ -15,7 +15,7 @@ import comments.views from blt import settings -from company.views import ShowBughuntView +from company.views import ShowBughuntView, SlackCallbackView from website.api.views import ( ActivityLogViewSet, AuthApiViewset, @@ -237,6 +237,7 @@ re_path(r"^auth/github/connect/$", GithubConnect.as_view(), name="github_connect"), re_path(r"^auth/google/connect/$", GoogleConnect.as_view(), name="google_connect"), path("auth/github/url/", github_views.oauth2_login), + path("oauth/slack/callback/", SlackCallbackView.as_view(), name="slack_callback"), path("auth/google/url/", google_views.oauth2_login), path("auth/facebook/url/", facebook_views.oauth2_callback), path("socialaccounts/", SocialAccountListView.as_view(), name="social_account_list"), diff --git a/company/templates/company/add_slack_integration.html b/company/templates/company/add_slack_integration.html new file mode 100644 index 000000000..fd863d840 --- /dev/null +++ b/company/templates/company/add_slack_integration.html @@ -0,0 +1,88 @@ +{% extends "company/company_dashboard_base.html" %} +{% block title %} + Add Slack Integration +{% endblock title %} +{% block body %} +
Add Slack Integration
+Manage Integrations
++ Service Name: Daily Sizzle Timelogs Status +
++ Daily Update Time: {{ slack_integration.daily_update_time }} (UTC) +
++ Channel Name: #{{ slack_integration.default_channel_name }} +
+ {% endif %} + Edit + + {% else %} + No integrations found. +