323 lines
17 KiB
PHP
323 lines
17 KiB
PHP
@extends('layouts.masterbeta')
|
|
|
|
@section('title', 'Cick ERP - ' . $operator->name)
|
|
|
|
@section('breadcrumbs')
|
|
<a href="{{ url('/') }}" class="text-secondary text-decoration-none"><i class="bi bi-house me-2"></i></a>
|
|
<i class="bi bi-chevron-right text-secondary me-2" style="font-size: 0.8rem;"></i>
|
|
<a href="{{ route('mnos.index') }}" class="text-secondary text-decoration-none me-2" style="font-size: 0.95rem;">MNO Partners</a>
|
|
<i class="bi bi-chevron-right text-secondary me-2" style="font-size: 0.8rem;"></i>
|
|
<span class="fw-bold" style="font-size: 0.95rem;">{{ $operator->name }}</span>
|
|
@endsection
|
|
|
|
@section('content')
|
|
<!-- Header Section -->
|
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
<div class="d-flex align-items-center">
|
|
<div class="avatar-circle bg-primary bg-opacity-10 text-primary fw-bold me-3 fs-4" style="width: 55px; height: 55px; border-radius: 50%; display: flex; align-items: center; justify-content: center;">
|
|
{{ strtoupper(substr($operator->name, 0, 2)) }}
|
|
</div>
|
|
<div>
|
|
<h3 class="fw-bold mb-1">{{ $operator->name }}</h3>
|
|
<p class="text-secondary mb-0" style="font-size: 0.9rem;">
|
|
<i class="bi bi-geo-alt me-1"></i> {{ $operator->country }} •
|
|
<span class="badge {{ $operator->connection_status == 'Active' ? 'bg-success' : 'bg-danger' }} ms-1">
|
|
{{ $operator->connection_status ?? 'Inactive' }}
|
|
</span>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<button class="btn btn-primary btn-sm fw-bold btn-edit-operator" data-id="{{ $operator->id }}">
|
|
<i class="bi bi-pencil me-1"></i> Edit MNO
|
|
</button>
|
|
<a href="{{ route('mnos.index') }}" class="btn btn-outline-secondary btn-sm fw-bold">
|
|
<i class="bi bi-arrow-left me-1"></i> Back to List
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Overview Metrics Row -->
|
|
<div class="row g-4 mb-4">
|
|
<div class="col-xl-4 col-md-6">
|
|
<div class="content-card p-3 h-100 border-start border-4 border-primary">
|
|
<div class="text-secondary fw-bold mb-1" style="font-size: 0.75rem; letter-spacing: 0.5px;">CONNECTION TYPE</div>
|
|
<h5 class="fw-bold mb-0 text-dark">{{ $operator->connection_type ?? 'Standard Link' }}</h5>
|
|
</div>
|
|
</div>
|
|
<div class="col-xl-4 col-md-6">
|
|
<div class="content-card p-3 h-100 border-start border-4 border-success">
|
|
<div class="text-secondary fw-bold mb-1" style="font-size: 0.75rem; letter-spacing: 0.5px;">BUYING RATE</div>
|
|
<h5 class="fw-bold mb-0 text-dark">{{ $operator->buying_rate ? number_format($operator->buying_rate, 4) : '0.0000' }}</h5>
|
|
</div>
|
|
</div>
|
|
<div class="col-xl-4 col-md-6">
|
|
<div class="content-card p-3 h-100 border-start border-4 border-warning">
|
|
<div class="text-secondary fw-bold mb-1" style="font-size: 0.75rem; letter-spacing: 0.5px;">PAYMENT TERMS</div>
|
|
<h5 class="fw-bold mb-0 text-dark">{{ $operator->payment_terms ?? 'N/A' }}</h5>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Detailed Attributes Grid -->
|
|
<div class="row g-4">
|
|
<!-- Left Column: Carrier & Technical Meta -->
|
|
<div class="col-lg-8">
|
|
<div class="content-card p-4 mb-4">
|
|
<h5 class="fw-bold mb-3 text-secondary" style="font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px;">
|
|
<i class="bi bi-info-circle me-2 text-primary"></i> Carrier & Technical Configuration
|
|
</h5>
|
|
<hr class="text-muted opacity-25">
|
|
<div class="row g-3">
|
|
|
|
<div class="col-md-6">
|
|
<span class="text-muted small d-block">Operating Country</span>
|
|
<strong class="text-dark">{{ $operator->country }}</strong>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<span class="text-muted small d-block">Rate Type</span>
|
|
<strong class="text-dark">{{ $operator->rate_type ?? 'N/A' }}</strong>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<span class="text-muted small d-block">Account Manager</span>
|
|
<strong class="text-dark">{{ $operator->mno_account_manager ?? 'N/A' }}</strong>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<span class="text-muted small d-block">Direct Business</span>
|
|
<strong class="text-dark">{{ $operator->direct_business ?? 'YES' }}</strong>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Contract Details -->
|
|
<div class="content-card p-4 mb-4">
|
|
<h5 class="fw-bold mb-3 text-secondary" style="font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px;">
|
|
<i class="bi bi-file-earmark-text me-2 text-primary"></i> Contract Details
|
|
</h5>
|
|
<hr class="text-muted opacity-25">
|
|
<div class="row g-3">
|
|
<div class="col-md-4">
|
|
<span class="text-muted small d-block">Contract Type</span>
|
|
<strong class="text-dark">{{ $operator->contract_type ?? 'N/A' }}</strong>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<span class="text-muted small d-block">Contract Validity</span>
|
|
<strong class="text-dark">{{ $operator->contract_validity ?? 'N/A' }}</strong>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<span class="text-muted small d-block">Auto Renew</span>
|
|
@if(is_null($operator->contract_auto_renew))
|
|
<strong class="text-dark">N/A</strong>
|
|
@elseif($operator->contract_auto_renew)
|
|
<span class="badge bg-success bg-opacity-10 text-success border border-success">Yes</span>
|
|
@else
|
|
<span class="badge bg-danger bg-opacity-10 text-danger border border-danger mb-1">No</span>
|
|
<div class="text-muted" style="font-size: 0.75rem;">
|
|
Renewal Date: <strong class="text-dark">{{ $operator->next_renewal_date ? $operator->next_renewal_date->format('d M Y') : 'Not Set' }}</strong>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Provisioned Services Badges -->
|
|
<div class="content-card p-4">
|
|
<h5 class="fw-bold mb-3 text-secondary" style="font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px;">
|
|
<i class="bi bi-layers me-2 text-primary"></i> Provisioned Services
|
|
</h5>
|
|
<hr class="text-muted opacity-25">
|
|
<div class="d-flex flex-wrap gap-2">
|
|
@if(is_array($operator->services) && count($operator->services) > 0)
|
|
@foreach($operator->services as $service)
|
|
<span class="badge bg-light text-primary border px-3 py-2" style="font-size: 0.85rem;">
|
|
<i class="bi bi-check-circle-fill me-1 text-success"></i> {{ is_numeric($service) ? App\Models\Service::find($service)->name ?? 'Service #'.$service : $service }}
|
|
</span>
|
|
@endforeach
|
|
@else
|
|
<span class="text-muted small">No specific services provisioned.</span>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Right Column: Contacts & Support Channels -->
|
|
<div class="col-lg-4">
|
|
<div class="content-card p-4 mb-4">
|
|
<h5 class="fw-bold mb-3 text-secondary" style="font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px;">
|
|
<i class="bi bi-headset me-2 text-primary"></i> Support Contacts
|
|
</h5>
|
|
<hr class="text-muted opacity-25">
|
|
|
|
<div class="mb-3">
|
|
<span class="text-muted small d-block">Contact Person</span>
|
|
<strong class="text-dark">{{ $operator->contact_person ?? 'N/A' }}</strong>
|
|
</div>
|
|
<div class="mb-3">
|
|
<span class="text-muted small d-block">Direct Phone</span>
|
|
<strong class="text-dark">{{ $operator->contact_person_phone ?? 'N/A' }}</strong>
|
|
</div>
|
|
<div class="mb-3">
|
|
<span class="text-muted small d-block">Technical Support Lead</span>
|
|
<strong class="text-dark">{{ $operator->technical_support_person ?? 'N/A' }}</strong>
|
|
</div>
|
|
<div class="mb-3">
|
|
<span class="text-muted small d-block">Support MS Team</span>
|
|
<strong class="text-dark">{{ $operator->support_skype ?? 'N/A' }}</strong>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<span class="text-muted small d-block mb-1">Support Emails</span>
|
|
<div class="d-flex flex-wrap gap-1">
|
|
@if(is_array($operator->support_emails) && count($operator->support_emails) > 0)
|
|
@foreach($operator->support_emails as $email)
|
|
<span class="badge bg-secondary bg-opacity-10 text-dark border" style="font-size: 0.75rem;">{{ $email }}</span>
|
|
@endforeach
|
|
@else
|
|
<span class="text-muted small">None listed</span>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<span class="text-muted small d-block mb-1">Finance Emails</span>
|
|
<div class="d-flex flex-wrap gap-1">
|
|
@if(is_array($operator->finance_emails) && count($operator->finance_emails) > 0)
|
|
@foreach($operator->finance_emails as $email)
|
|
<span class="badge bg-secondary bg-opacity-10 text-dark border" style="font-size: 0.75rem;">{{ $email }}</span>
|
|
@endforeach
|
|
@else
|
|
<span class="text-muted small">None listed</span>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div> <!-- Close Support Contacts content-card -->
|
|
</div> <!-- Close Right Column (col-lg-4) -->
|
|
</div> <!-- Close the main row (row g-4) -->
|
|
<!-- Connections & Interconnect Details Section -->
|
|
<div class="content-card p-4 mb-4">
|
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
|
<h5 class="fw-bold mb-0 text-secondary" style="font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px;">
|
|
<i class="bi bi-shield-lock me-2 text-primary"></i> Connection Endpoints (VPN / Whitelisted IPs & Domains)
|
|
</h5>
|
|
<button type="button" class="btn btn-sm text-white fw-bold" style="background-color: #5c4df0;" data-bs-toggle="modal" data-bs-target="#addConnectionModal">
|
|
<i class="bi bi-plus-lg me-1"></i> Add Connection Detail
|
|
</button>
|
|
</div>
|
|
<hr class="text-muted opacity-25">
|
|
|
|
<div class="table-responsive">
|
|
<table class="table table-custom align-middle mb-0">
|
|
<thead>
|
|
<tr>
|
|
<th>Mode</th>
|
|
<th>Identifier (IP / Domain / VPN)</th>
|
|
<th>Port</th>
|
|
<th>Status</th>
|
|
<th>Notes</th>
|
|
<th class="text-end">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse($operator->connectionDetails as $conn)
|
|
<tr>
|
|
<td>
|
|
<span class="badge bg-secondary bg-opacity-10 text-dark border">{{ $conn->connection_mode }}</span>
|
|
@if($conn->vpn_file_path)
|
|
<a href="{{ asset('storage/' . $conn->vpn_file_path) }}" target="_blank" class="d-block mt-1" style="font-size: 0.75rem;">
|
|
<i class="bi bi-paperclip"></i> View Form
|
|
</a>
|
|
@endif
|
|
</td>
|
|
<td><code>{{ $conn->identifier }}</code></td>
|
|
<td>{{ $conn->port ?? 'N/A' }}</td>
|
|
<td>
|
|
<span class="badge {{ $conn->status == 'Active' ? 'bg-success' : 'bg-warning' }} bg-opacity-10 text-success px-2 py-1">
|
|
{{ $conn->status }}
|
|
</span>
|
|
</td>
|
|
<td>{{ $conn->notes ?? '-' }}</td>
|
|
<td class="text-end">
|
|
<form action="{{ route('mnos.connections.destroy', $conn->id) }}" method="POST" class="d-inline">
|
|
@csrf
|
|
@method('DELETE')
|
|
<button type="submit" class="btn btn-sm btn-light text-danger" onclick="return confirm('Delete this connection detail?')">
|
|
<i class="bi bi-trash"></i>
|
|
</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="6" class="text-center text-secondary py-4">No specific VPN or IP whitelisting rules added yet.</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<!-- Documents Section -->
|
|
<div class="content-card p-4 mb-4">
|
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
|
<h5 class="fw-bold mb-0 text-secondary" style="font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px;">
|
|
<i class="bi bi-folder me-2 text-primary"></i> Operator Documents
|
|
</h5>
|
|
<button type="button" class="btn btn-sm text-white fw-bold" style="background-color: #5c4df0;" data-bs-toggle="modal" data-bs-target="#addDocumentModal">
|
|
<i class="bi bi-cloud-upload me-1"></i> Upload Documents
|
|
</button>
|
|
</div>
|
|
<hr class="text-muted opacity-25">
|
|
|
|
<div class="table-responsive">
|
|
<table class="table table-custom align-middle mb-0">
|
|
<thead>
|
|
<tr>
|
|
<th>Document Name</th>
|
|
<th>File Type</th>
|
|
<th>Uploaded On</th>
|
|
<th class="text-end">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse($operator->documents as $doc)
|
|
<tr>
|
|
<td class="fw-bold">{{ $doc->name }}</td>
|
|
<td><span class="badge bg-light text-dark border">{{ strtoupper(pathinfo($doc->file_path, PATHINFO_EXTENSION)) }}</span></td>
|
|
<td>{{ $doc->created_at->format('d M Y') }}</td>
|
|
<td class="text-end">
|
|
<a href="{{ asset('storage/' . $doc->file_path) }}" target="_blank" class="btn btn-sm btn-light text-primary me-2">
|
|
<i class="bi bi-eye"></i> View
|
|
</a>
|
|
<form action="{{ route('mnos.documents.destroy', $doc->id) }}" method="POST" class="d-inline">
|
|
@csrf
|
|
@method('DELETE')
|
|
<button type="submit" class="btn btn-sm btn-light text-danger" onclick="return confirm('Delete this document?')">
|
|
<i class="bi bi-trash"></i>
|
|
</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="4" class="text-center text-secondary py-4">No documents uploaded yet.</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@endsection
|
|
@push('modals')
|
|
@include('network_operators.partials.modals')
|
|
@endpush
|
|
@push('scripts')
|
|
<script>
|
|
const baseUrl = "{{ url('/') }}";
|
|
const operatorId = "{{ $operator->id }}";
|
|
</script>
|
|
<script src="{{ asset('public/assets/js/mno-show.js') }}"></script>
|
|
|
|
|
|
@endpush |