mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 06:20:21 +00:00
Merge branch 'production' of bitbucket.org:studiotem/jandl-taskmanager-app into production
# Conflicts: # be/routes/web.php
This commit is contained in:
commit
2e279ea2f1
13 files changed
+140
-25
No files matched your search
@@ -10,4 +10,34 @@ Deadline do: {{($subtask->deadline) ?: $subtask->mastertask->deadline}} <br> <br
|
||||
<br>
|
||||
|
||||
Odkaz na Task: {{ url( env( 'APP_URL_FE' ) . '/#/app/dashboard/tasks?subtask=' . $subtask->id) }} <br><br>
|
||||
Popis: {!!($subtask->description) ?: $subtask->mastertask->description !!} <br>
|
||||
|
||||
@php
|
||||
|
||||
$description = ($subtask->description) ?: $subtask->mastertask->description;
|
||||
|
||||
// Define regular expressions for Windows and Mac SMB links
|
||||
$pattern_windows = '/smb:\/\/serverjl[^ ]*/';
|
||||
$pattern_mac = '/\\\\serverjl\\\\[^ ]*/';
|
||||
|
||||
// Define the callback function to replace links
|
||||
function replace_smb_links($matches) {
|
||||
$link = $matches[0];
|
||||
if (strpos($link, 'smb://serverjl') === 0) {
|
||||
// Windows link
|
||||
$windows_link = str_replace('smb://serverjl', '\\\\serverjl\\', $link);
|
||||
return "<br>Windows: $windows_link <br> Mac: $link <br>";
|
||||
} elseif (strpos($link, '\\\\serverjl\\') === 0) {
|
||||
// Mac link
|
||||
$mac_link = str_replace('\\\\serverjl\\', 'smb://serverjl', $link);
|
||||
return "<br>Windows: $link <br> Mac: $mac_link <br>";
|
||||
}
|
||||
return $link; // In case no pattern matches, return the original link
|
||||
}
|
||||
|
||||
// Replace SMB links using the callback function
|
||||
$description = preg_replace_callback($pattern_windows, 'replace_smb_links', $description);
|
||||
$description = preg_replace_callback($pattern_mac, 'replace_smb_links', $description);
|
||||
|
||||
@endphp
|
||||
|
||||
Popis: {!!$description!!} <br>
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use App\Mail\NewTask;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
/*
|
||||
@@ -17,6 +18,15 @@ Route::get('/', function () {
|
||||
return view('welcome');
|
||||
});
|
||||
|
||||
Route::get('/send-email', function () {
|
||||
$subtask = \App\Models\SubTask::with('mastertask')->find(1622);
|
||||
|
||||
Mail::to('feher@studiotem.com')->send(new NewTask($subtask));
|
||||
|
||||
return 'Email has been sent';
|
||||
});
|
||||
|
||||
|
||||
Route::prefix('be')->group(function () {
|
||||
Route::get('/unauthenticated', function () {
|
||||
return response()->json([
|
||||
|
||||
Reference in new issue
Block a user