fixed bugs
This commit is contained in:
@@ -120,7 +120,6 @@ class BylawApiController extends Controller
|
||||
|
||||
$formatted = $this->formatBylaw($bylaw);
|
||||
|
||||
// --- FETCH NOTE EXACTLY LIKE ART CONTROLLER ---
|
||||
$formatted['note'] = \App\Models\BylawNote::select('id', 'note', 'color_code', 'created_at')
|
||||
->where('user_id', auth()->user()->id)
|
||||
->where('bylaw_document_id', $bylaw->id)
|
||||
@@ -353,7 +352,6 @@ class BylawApiController extends Controller
|
||||
$itemNodes = $nodesByDoc->get((int)$item->id, collect());
|
||||
$formatted = $this->formatBylaw($item, $itemNodes);
|
||||
|
||||
// --- FETCH NOTE EXACTLY LIKE ART CONTROLLER ---
|
||||
$formatted['note'] = \App\Models\BylawNote::select('id', 'note', 'color_code', 'created_at')
|
||||
->where('user_id', auth()->user()->id)
|
||||
->where('bylaw_document_id', $item->id)
|
||||
@@ -417,7 +415,7 @@ class BylawApiController extends Controller
|
||||
'execution_date' => $item->execution_date,
|
||||
'bylaw_type' => $item->bylaw_type,
|
||||
'global_status' => $item->global_status,
|
||||
'pdf_file_url' => $isLocked ? null : ($item->pdf_file_path ? asset('storage/' . $item->pdf_file_path) : null),
|
||||
'pdf_file_url' => $isLocked ? null : ($item->pdf_file_path ? asset(str_replace('storage/storage/', 'storage/', 'storage/' . $item->pdf_file_path)) : null),
|
||||
'description' => $isLocked ? null : $nodeContentAsDescription,
|
||||
'debug_node_count' => collect($itemNodes)->count(),
|
||||
'is_locked' => $isLocked,
|
||||
|
||||
Reference in New Issue
Block a user