Apply previous changes: slack webhooks, date range issue, 12h am/pm format, today preifl, api-keys

This commit is contained in:
JhumanJ
2022-09-21 17:23:37 +02:00
parent 341ee04268
commit 18ed28da2e
19 changed files with 305 additions and 132 deletions

View File

@@ -37,6 +37,7 @@ class Form extends Model
'notification_subject',
'notification_body',
'notifications_include_submission',
'slack_webhook_url',
// integrations
'webhook_url',
@@ -94,6 +95,7 @@ class Form extends Model
protected $hidden = [
'workspace_id',
'notifies',
'slack_webhook_url',
'webhook_url',
'send_submission_confirmation',
'redirect_url',
@@ -223,4 +225,9 @@ class Form extends Model
{
return FormFactory::new();
}
public function getNotifiesSlackAttribute()
{
return !empty($this->slack_webhook_url);
}
}

View File

@@ -4,7 +4,6 @@ namespace App\Models;
use App\Http\Controllers\SubscriptionController;
use App\Models\Forms\Form;
use App\Models\Workspace;
use App\Notifications\ResetPassword;
use App\Notifications\VerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
@@ -13,7 +12,6 @@ use Illuminate\Foundation\Auth\User as Authenticatable;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Notifications\Notifiable;
use Laravel\Cashier\Billable;
use Rickycezar\Impersonate\Models\Impersonate;
use Tymon\JWTAuth\Contracts\JWTSubject;
class User extends Authenticatable implements JWTSubject //, MustVerifyEmail
@@ -205,5 +203,5 @@ class User extends Authenticatable implements JWTSubject //, MustVerifyEmail
});
});
}
}