Notification & Integrations refactoring (#346)
* Integrations Refactoring - WIP * integrations list & edit - WIP * Fix integration store binding issue * integrations refactor - WIP * Form integration - WIP * Form integration Edit - WIP * Integration Refactor - Slack - WIP * Integration Refactor - Discord - WIP * Integration Refactor - Webhook - WIP * Integration Refactor - Send Submission Confirmation - WIP * Integration Refactor - Backend handler - WIP * Form Integration Status field * Integration Refactor - Backend SubmissionConfirmation - WIP * IntegrationMigration Command * skip confirmation email test case * Small refactoring * FormIntegration status active/inactive * formIntegrationData to integrationData * Rename file name with Integration suffix for integration realted files * Loader on form integrations * WIP * form integration test case * WIP * Added Integration card - working on refactoring * change location for IntegrationCard and update package file * Form Integration Create/Edit in single Modal * Remove integration extra pages * crisp_help_page_slug for integration json * integration logic as collapse * UI improvements * WIP * Trying to debug vue devtools * WIP for integrations * getIntegrationHandler change namespace name * useForm for integration fields + validation structure * Integration Test case & apply validation rules * Apply useform changes to integration other files * validation rules for FormNotificationsMessageActions fields * Zapier integration as coming soon * Update FormCleaner * set default settings for confirmation integration * WIP * Finish validation for all integrations * Updated purify, added integration formatData * Fix testcase * Ran pint; working on integration errors * Handle integration events * command for Delete Old Integration Events * Display Past Events in Modal * on Integration event create with status error send email to form creator * Polish styling * Minor improvements * Finish badge and integration status * Fix tests and add an integration event test * Lint --------- Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
54
resources/data/forms/integrations.json
Normal file
54
resources/data/forms/integrations.json
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"email": {
|
||||
"name": "Email Notification",
|
||||
"icon": "heroicons:envelope-20-solid",
|
||||
"section_name": "Notifications",
|
||||
"file_name": "EmailIntegration",
|
||||
"is_pro": false,
|
||||
"crisp_help_page_slug": "can-i-receive-notifications-on-form-submissions-134svqv"
|
||||
},
|
||||
"submission_confirmation": {
|
||||
"name": "Submission Confirmation",
|
||||
"icon": "heroicons:paper-airplane-20-solid",
|
||||
"section_name": "Notifications",
|
||||
"file_name": "SubmissionConfirmationIntegration",
|
||||
"is_pro": true
|
||||
},
|
||||
"slack": {
|
||||
"name": "Slack Notification",
|
||||
"icon": "mdi:slack",
|
||||
"section_name": "Notifications",
|
||||
"file_name": "SlackIntegration",
|
||||
"is_pro": false
|
||||
},
|
||||
"discord": {
|
||||
"name": "Discord Notification",
|
||||
"icon": "ic:baseline-discord",
|
||||
"section_name": "Notifications",
|
||||
"file_name": "DiscordIntegration",
|
||||
"is_pro": true
|
||||
},
|
||||
"webhook": {
|
||||
"name": "Webhook Notification",
|
||||
"icon": "material-symbols:webhook",
|
||||
"section_name": "Notifications",
|
||||
"file_name": "WebhookIntegration",
|
||||
"is_pro": false
|
||||
},
|
||||
"zapier": {
|
||||
"name": "Zapier Integration",
|
||||
"icon": "logos:zapier",
|
||||
"section_name": "Notifications",
|
||||
"file_name": "ZapierIntegration",
|
||||
"is_pro": true,
|
||||
"coming_soon": true
|
||||
},
|
||||
"google_sheets": {
|
||||
"name": "Google Sheets",
|
||||
"icon": "mdi:google-spreadsheet",
|
||||
"section_name": "Databases",
|
||||
"file_name": "GoogleSheetsIntegration",
|
||||
"is_pro": true,
|
||||
"coming_soon": true
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
@component('mail::message', ['noBranding' => $noBranding])
|
||||
|
||||
{!! $form->notification_body !!}
|
||||
{!! $integrationData->notification_body !!}
|
||||
|
||||
@if($form->editable_submissions)
|
||||
@component('mail::button', ['url' => $form->share_url.'?submission_id='.$submission_id])
|
||||
@@ -8,7 +8,7 @@
|
||||
@endcomponent
|
||||
@endif
|
||||
|
||||
@if($form->notifications_include_submission)
|
||||
@if($integrationData->notifications_include_submission)
|
||||
As a reminder, here are your answers:
|
||||
|
||||
@foreach($fields as $field)
|
||||
@@ -18,9 +18,9 @@ As a reminder, here are your answers:
|
||||
|
||||
**{{$field['name']}}**
|
||||
@if($field['type'] == 'files')
|
||||
<br/>
|
||||
<br />
|
||||
@foreach($field['email_data'] as $link)
|
||||
<a href="{{$link['signed_url']}}">{{$link['label']}}</a> <br/>
|
||||
<a href="{{$link['signed_url']}}">{{$link['label']}}</a> <br />
|
||||
@endforeach
|
||||
@else
|
||||
{!! is_array($field['value'])?implode(',',$field['value']):$field['value']!!}
|
||||
@@ -31,4 +31,4 @@ As a reminder, here are your answers:
|
||||
|
||||
<p style="text-align:center"><small>You are receiving this email because you answered the form: <a href="{{front_url("forms/".$form->slug)}}">"{{$form->title}}"</a>.</small></p>
|
||||
|
||||
@endcomponent
|
||||
@endcomponent
|
||||
@@ -0,0 +1,13 @@
|
||||
@component('mail::message')
|
||||
|
||||
Hello,
|
||||
|
||||
We tried to trigger a **{{$integration_name}}** for your form "{{$form->title}}", but it failed. Here is the error that we got:
|
||||
|
||||
@component('mail::panel')
|
||||
{{$error}}
|
||||
@endcomponent
|
||||
|
||||
Contact us via the website live chat if you need any help.
|
||||
|
||||
@endcomponent
|
||||
Reference in New Issue
Block a user