@extends('layouts.supervisor') @section('title', 'Review Penawaran Harga - Supervisor') @section('content')
{{ session('statusMessage') }}
Beri range harga yang sesuai untuk penawaran customer
Total Penawaran
{{ $inquiries->total() }}
Menunggu Review
{{ $inquiries->count() }}
Status
Aktif
| Produk & Customer | Permintaan | Harga Base | Aksi |
|---|---|---|---|
|
{{ $inquiry->product->product_title ?? 'N/A' }}
{{ $inquiry->name }}
{{ $inquiry->email }}
{{ $inquiry->phone }}
|
@php
$raw = $inquiry->message ?? '';
$lines = preg_split("/(\r\n|\n|\r)/", $raw);
$type = null; $addons = []; $hasAddonsLine = false;
if (!empty($lines)) {
$first = $lines[0] ?? '';
$second = $lines[1] ?? '';
if (substr($first, 0, 14) === '[REQUEST_TYPE]') { $type = trim(substr($first, 14)); }
if (substr($second, 0, 8) === '[ADDONS]') {
$hasAddonsLine = true;
$matches = [];
if (preg_match('/^\[ADDONS\]\s*(\[[\s\S]*\])$/', $second, $matches)) {
$decoded = json_decode($matches[1], true);
if (is_array($decoded)) { $addons = $decoded; }
}
}
}
$startIdx = 0; if ($type) { $startIdx++; } if ($hasAddonsLine) { $startIdx++; }
if (!empty($lines) && isset($lines[$startIdx]) && trim($lines[$startIdx]) === '') { $startIdx++; }
$plain = implode("\n", array_slice($lines, $startIdx));
$badgeText = $type === 'custom_addon' ? 'Custom Add-on' : ($type === 'custom_new' ? 'Custom Baru' : ($type ? 'Katalog' : null));
$badgeCls = $type === 'custom_addon' ? 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900/40 dark:text-yellow-200' : ($type === 'custom_new' ? 'bg-red-100 text-red-800 dark:bg-red-900/40 dark:text-red-200' : 'bg-blue-100 text-blue-800 dark:bg-blue-900/40 dark:text-blue-200');
@endphp
@if($badgeText)
{{ $badgeText }}
@endif
@if(!empty($addons))
Spesifikasi:
@endif
@foreach(array_slice($addons, 0, 2) as $addon)
• {{ is_array($addon) ? ($addon['name'] ?? '-') : '-' }}: {{ is_array($addon) ? ($addon['value'] ?? '-') : '-' }}
@endforeach
@if(count($addons) > 2)
+{{ count($addons) - 2 }} lagi
@endif
|
Rp {{ number_format($inquiry->product->product_prices ?? 0, 0, ',', '.') }}
|
Tidak ada penawaran yang perlu di-review saat ini