Deploy on 2026-06-05 17:47:27
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<div class="page-header">
|
||||
<h1><?= $contact ? 'Edit' : 'Add' ?> Contact</h1>
|
||||
<h1><?= $contact ? 'تعديل' : 'إضافة' ?> جهة اتصال</h1>
|
||||
</div>
|
||||
|
||||
<div class="glass-panel" style="max-width: 600px;">
|
||||
@@ -10,30 +10,30 @@
|
||||
<input type="hidden" name="_csrf" value="<?= $this->session->getCsrfToken() ?>">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label">Name *</label>
|
||||
<label class="form-label">الاسم *</label>
|
||||
<input type="text" name="name" class="form-control" required value="<?= $contact ? $this->escape($contact['name']) : '' ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label class="form-label">Email</label>
|
||||
<label class="form-label">البريد الإلكتروني</label>
|
||||
<input type="email" name="email" class="form-control" value="<?= $contact ? $this->escape($contact['email'] ?? '') : '' ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label">Phone</label>
|
||||
<label class="form-label">رقم الهاتف</label>
|
||||
<input type="text" name="phone" class="form-control" value="<?= $contact ? $this->escape($contact['phone'] ?? '') : '' ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label">Position / Title</label>
|
||||
<input type="text" name="position" class="form-control" placeholder="e.g. Partner, Director" value="<?= $contact ? $this->escape($contact['position'] ?? '') : '' ?>">
|
||||
<label class="form-label">المسمى الوظيفي</label>
|
||||
<input type="text" name="position" class="form-control" placeholder="مثال: شريك، مدير استثمار" value="<?= $contact ? $this->escape($contact['position'] ?? '') : '' ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label">Organization</label>
|
||||
<label class="form-label">المنظمة / الجهة</label>
|
||||
<select name="organization_id" class="form-control">
|
||||
<option value="">No Organization</option>
|
||||
<option value="">مستقل (بدون منظمة)</option>
|
||||
<?php foreach ($organizations as $org): ?>
|
||||
<option value="<?= $org['id'] ?>" <?= ($selectedOrgId == $org['id']) ? 'selected' : '' ?>><?= $this->escape($org['name']) ?></option>
|
||||
<?php endforeach; ?>
|
||||
@@ -41,13 +41,13 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label">Notes</label>
|
||||
<label class="form-label">ملاحظات</label>
|
||||
<textarea name="notes" class="form-control" rows="3"><?= $contact ? $this->escape($contact['notes'] ?? '') : '' ?></textarea>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; gap: 12px; margin-top: 10px;">
|
||||
<button type="submit" class="btn btn-primary"><?= $contact ? 'Update' : 'Create' ?> Contact</button>
|
||||
<a href="/admin/contacts" class="btn btn-secondary">Cancel</a>
|
||||
<button type="submit" class="btn btn-primary"><?= $contact ? 'تحديث' : 'إضافة' ?> جهة اتصال</button>
|
||||
<a href="/admin/contacts" class="btn btn-secondary">إلغاء</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<div class="page-header">
|
||||
<div>
|
||||
<h1>Contacts</h1>
|
||||
<p>Manage your network of investor contacts and interactions</p>
|
||||
<h1>جهات الاتصال</h1>
|
||||
<p>إدارة شبكة جهات الاتصال والتفاعلات مع المستثمرين والشركاء</p>
|
||||
</div>
|
||||
<a href="/admin/contacts/create" class="btn btn-primary">+ Add Contact</a>
|
||||
<a href="/admin/contacts/create" class="btn btn-primary">+ إضافة جهة اتصال</a>
|
||||
</div>
|
||||
|
||||
<?php if ($flashSuccess = $this->session->getFlash('success')): ?>
|
||||
@@ -12,8 +12,8 @@
|
||||
|
||||
<div class="filters-bar">
|
||||
<form method="GET" class="filters-form">
|
||||
<input type="text" name="search" class="form-control" placeholder="Search contacts..." value="<?= $this->escape($search) ?>">
|
||||
<button type="submit" class="btn btn-secondary">Search</button>
|
||||
<input type="text" name="search" class="form-control" placeholder="البحث عن جهات الاتصال..." value="<?= $this->escape($search) ?>">
|
||||
<button type="submit" class="btn btn-secondary">بحث</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -21,17 +21,17 @@
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Position</th>
|
||||
<th>Organization</th>
|
||||
<th>Email</th>
|
||||
<th>Interactions</th>
|
||||
<th>Actions</th>
|
||||
<th>الاسم</th>
|
||||
<th>المسمى الوظيفي</th>
|
||||
<th>المنظمة / الجهة</th>
|
||||
<th>البريد الإلكتروني</th>
|
||||
<th>التفاعلات</th>
|
||||
<th>الإجراءات</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (empty($contacts)): ?>
|
||||
<tr><td colspan="6" style="text-align: center; padding: 40px; color: var(--text-muted);">No contacts yet.</td></tr>
|
||||
<tr><td colspan="6" style="text-align: center; padding: 40px; color: var(--text-muted);">لا توجد جهات اتصال حالياً.</td></tr>
|
||||
<?php else: ?>
|
||||
<?php foreach ($contacts as $contact): ?>
|
||||
<tr>
|
||||
@@ -41,8 +41,8 @@
|
||||
<td><?= $contact['email'] ? $this->escape($contact['email']) : '-' ?></td>
|
||||
<td><?= $contact['interaction_count'] ?? 0 ?></td>
|
||||
<td>
|
||||
<a href="/admin/contacts/<?= $contact['id'] ?>" class="btn btn-sm btn-secondary">View</a>
|
||||
<a href="/admin/contacts/<?= $contact['id'] ?>/edit" class="btn btn-sm btn-secondary">Edit</a>
|
||||
<a href="/admin/contacts/<?= $contact['id'] ?>" class="btn btn-sm btn-secondary">عرض</a>
|
||||
<a href="/admin/contacts/<?= $contact['id'] ?>/edit" class="btn btn-sm btn-secondary">تعديل</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
<style>
|
||||
.data-table { width: 100%; border-collapse: collapse; }
|
||||
.data-table th, .data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.05); }
|
||||
.data-table th, .data-table td { padding: 12px 16px; text-align: right; border-bottom: 1px solid rgba(255,255,255,0.05); }
|
||||
.data-table th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); font-weight: 600; }
|
||||
.data-table tr:hover { background: rgba(255,255,255,0.02); }
|
||||
</style>
|
||||
@@ -1,10 +1,10 @@
|
||||
<div class="page-header">
|
||||
<div>
|
||||
<h1><?= $this->escape($contact['name']) ?></h1>
|
||||
<p><?= $contact['position'] ? $this->escape($contact['position']) . ' • ' : '' ?><?= $contact['org_name'] ? $this->escape($contact['org_name']) : 'Independent' ?></p>
|
||||
<p><?= $contact['position'] ? $this->escape($contact['position']) . ' • ' : '' ?><?= $contact['org_name'] ? $this->escape($contact['org_name']) : 'مستقل' ?></p>
|
||||
</div>
|
||||
<div style="display: flex; gap: 10px;">
|
||||
<a href="/admin/contacts/<?= $contact['id'] ?>/edit" class="btn btn-secondary">Edit</a>
|
||||
<a href="/admin/contacts/<?= $contact['id'] ?>/edit" class="btn btn-secondary">تعديل</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -14,58 +14,67 @@
|
||||
|
||||
<div class="detail-grid">
|
||||
<div class="glass-panel">
|
||||
<h3 style="margin-bottom: 20px;">Contact Details</h3>
|
||||
<h3 style="margin-bottom: 20px;">تفاصيل جهة الاتصال</h3>
|
||||
<div class="detail-row">
|
||||
<span class="detail-label">Email</span>
|
||||
<span class="detail-label">البريد الإلكتروني</span>
|
||||
<span><?= $contact['email'] ? $this->escape($contact['email']) : '-' ?></span>
|
||||
</div>
|
||||
<div class="detail-row">
|
||||
<span class="detail-label">Phone</span>
|
||||
<span class="detail-label">رقم الهاتف</span>
|
||||
<span><?= $contact['phone'] ? $this->escape($contact['phone']) : '-' ?></span>
|
||||
</div>
|
||||
<div class="detail-row">
|
||||
<span class="detail-label">Position</span>
|
||||
<span class="detail-label">المسمى الوظيفي</span>
|
||||
<span><?= $this->escape($contact['position'] ?? '-') ?></span>
|
||||
</div>
|
||||
<div class="detail-row">
|
||||
<span class="detail-label">Organization</span>
|
||||
<span class="detail-label">المنظمة / الجهة</span>
|
||||
<span><?= $contact['org_id'] ? '<a href="/admin/organizations/' . $contact['org_id'] . '">' . $this->escape($contact['org_name']) . '</a>' : '-' ?></span>
|
||||
</div>
|
||||
<div class="detail-row" style="flex-direction: column; align-items: flex-start;">
|
||||
<span class="detail-label">Notes</span>
|
||||
<p style="margin-top: 8px; line-height: 1.6;"><?= $this->escape($contact['notes'] ?? 'No notes') ?></p>
|
||||
<span class="detail-label">ملاحظات</span>
|
||||
<p style="margin-top: 8px; line-height: 1.6;"><?= $this->escape($contact['notes'] ?? 'لا توجد ملاحظات') ?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<!-- Interactions -->
|
||||
<div class="glass-panel" style="margin-bottom: 20px;">
|
||||
<h3 style="margin-bottom: 16px;">Interactions (<?= count($interactions) ?>)</h3>
|
||||
<h3 style="margin-bottom: 16px;">التفاعلات (<?= count($interactions) ?>)</h3>
|
||||
|
||||
<form action="/admin/contacts/<?= $contact['id'] ?>/interaction" method="POST" style="display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px;">
|
||||
<input type="hidden" name="_csrf" value="<?= $this->session->getCsrfToken() ?>">
|
||||
<div class="form-row" style="display: flex; gap: 10px;">
|
||||
<select name="type" class="form-control" style="flex: 0 0 120px;">
|
||||
<option value="note">Note</option>
|
||||
<option value="email">Email</option>
|
||||
<option value="call">Call</option>
|
||||
<option value="meeting">Meeting</option>
|
||||
<option value="note">ملاحظة</option>
|
||||
<option value="email">بريد إلكتروني</option>
|
||||
<option value="call">مكالمة هاتفية</option>
|
||||
<option value="meeting">اجتماع</option>
|
||||
</select>
|
||||
<input type="text" name="notes" class="form-control" placeholder="Add interaction note..." required>
|
||||
<button type="submit" class="btn btn-primary">Log</button>
|
||||
<input type="text" name="notes" class="form-control" placeholder="إضافة تفاصيل التفاعل..." required>
|
||||
<button type="submit" class="btn btn-primary">تسجيل</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php if (empty($interactions)): ?>
|
||||
<p style="color: var(--text-muted);">No interactions logged yet.</p>
|
||||
<p style="color: var(--text-muted);">لم يتم تسجيل أي تفاعلات بعد.</p>
|
||||
<?php else: ?>
|
||||
<?php foreach ($interactions as $interaction): ?>
|
||||
<?php
|
||||
$interTrans = [
|
||||
'note' => 'ملاحظة',
|
||||
'email' => 'بريد إلكتروني',
|
||||
'call' => 'مكالمة هاتفية',
|
||||
'meeting' => 'اجتماع'
|
||||
];
|
||||
$transType = $interTrans[$interaction['type']] ?? $interaction['type'];
|
||||
?>
|
||||
<div class="list-item">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center;">
|
||||
<span class="badge" style="background: rgba(56, 189, 248, 0.2); color: #38bdf8;"><?= $this->escape($interaction['type']) ?></span>
|
||||
<small style="color: var(--text-muted);"><?= date('M j, g:i a', strtotime($interaction['created_at'])) ?></small>
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; flex-direction: row-reverse;">
|
||||
<span class="badge" style="background: rgba(56, 189, 248, 0.2); color: #38bdf8;"><?= $this->escape($transType) ?></span>
|
||||
<small style="color: var(--text-muted);"><?= date('Y-m-d H:i', strtotime($interaction['created_at'])) ?></small>
|
||||
</div>
|
||||
<p style="margin-top: 8px; line-height: 1.5;"><?= $this->escape($interaction['notes']) ?></p>
|
||||
<p style="margin-top: 8px; line-height: 1.5; text-align: right;"><?= $this->escape($interaction['notes']) ?></p>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
Reference in New Issue
Block a user