stage #1

Merged
ThaMunsta merged 351 commits from stage into main 2025-11-10 14:37:21 +00:00
3 changed files with 682 additions and 696 deletions
Showing only changes of commit 1d98eb5160 - Show all commits
+9 -9
View File
@@ -109,7 +109,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
<input type="hidden" name="leads" value="<?php echo $leads_filter; ?>">
<input type="hidden" name="archived" value="<?php echo $archived; ?>">
<div class="row">
<div class="col-md-4">
<div class="col-md-5">
<div class="form-group">
<div class="input-group">
<input type="search" class="form-control" name="q" value="<?php if (isset($q)) { echo stripslashes(nullable_htmlentities($q)); } ?>" placeholder="Search <?php if($leads_filter == 0){ echo "clients"; } else { echo "leads"; } ?>" autofocus>
@@ -120,21 +120,21 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
</div>
</div>
</div>
<div class="col-md-8">
<div class="col-md-7">
<div class="btn-toolbar form-group float-right">
<div class="btn-group mr-2">
<a href="?leads=0" class="btn btn-<?php if ($leads_filter == 0){ echo "primary"; } else { echo "default"; } ?>"><i class="fa fa-fw fa-user-friends mr-2"></i>Clients</a>
<a href="?leads=1" class="btn btn-<?php if ($leads_filter == 1){ echo "primary"; } else { echo "default"; } ?>"><i class="fa fa-fw fa-bullhorn mr-2"></i>Leads</a>
<a href="?leads=0" class="btn btn-<?php if ($leads_filter == 0){ echo "primary"; } else { echo "default"; } ?>" title="Clients"><i class="fa fa-fw fa-user-friends"></i><span class="d-none d-sm-inline ml-2">Clients</span></a>
<a href="?leads=1" class="btn btn-<?php if ($leads_filter == 1){ echo "primary"; } else { echo "default"; } ?>"><i class="fa fa-fw fa-bullhorn"></i><span class="d-none d-sm-inline ml-2">Leads</span></a>
</div>
<div class="btn-group">
<a href="?<?php echo $url_query_strings_sort ?>&archived=<?php if($archived == 1){ echo 0; } else { echo 1; } ?>"
class="btn btn-<?php if ($archived == 1) { echo "primary"; } else { echo "default"; } ?>">
<i class="fa fa-fw fa-archive mr-2"></i>Archived
<i class="fa fa-fw fa-archive"></i><span class="d-none d-sm-inline ml-2">Archived</span>
</a>
<div class="dropdown ml-2" id="bulkActionButton" hidden>
<button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">
<i class="fas fa-fw fa-layer-group mr-2"></i>Bulk Action (<span id="selectedCount">0</span>)
<i class="fas fa-fw fa-layer-group"></i><span class="d-none d-sm-inline ml-2">Action</span> (<span id="selectedCount">0</span>)
</button>
<div class="dropdown-menu">
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkEditHourlyRateModal">
@@ -334,7 +334,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
if (empty($location_address) && empty($location_city) && empty($location_state) && empty($location_zip)) {
$location_address_display = "-";
} else {
$location_address_display = "<i class='fa fa-fw fa-map-marker-alt text-secondary mr-2'></i>$location_address<br><i class='fa fa-fw mr-2'></i>$location_city $location_state $location_zip<br><i class='fa fa-fw mr-2'></i><small>$location_country</small>";
$location_address_display = "<div class='media'><i class='fa fa-fw fa-map-marker-alt text-secondary mt-1 mr-2'></i><div class='media-body'>$location_address<div>$location_city $location_state $location_zip</div><div><small>$location_country</small></div></div></div>";
}
$contact_id = intval($row['contact_id']);
$contact_name = nullable_htmlentities($row['contact_name']);
@@ -510,8 +510,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
</div>
</td>
<td><?php echo $location_address_display; ?></td>
<td>
<td class="text-nowrap"><?php echo $location_address_display; ?></td>
<td class="text-nowrap">
<?php
if (empty($contact_name) && empty($contact_phone) && empty($contact_mobile) && empty($client_email)) {
echo "-";
+57 -71
View File
@@ -161,61 +161,23 @@ if (isset($_GET['project_id'])) {
?>
<!-- Breadcrumbs-->
<ol class="breadcrumb d-print-none">
<!-- Breadcrumbs-->
<ol class="breadcrumb d-print-none">
<li class="breadcrumb-item">
<a href="projects.php">Projects</a>
</li>
<li class="breadcrumb-item active">Project Details</li>
</ol>
</ol>
<!-- Project Header -->
<div class="card card-body">
<div class="row">
<div class="col-sm-3">
<div class="media">
<i class="fa fa-fw fa-2x fa-project-diagram text-secondary mr-3"></i>
<div class="media-body">
<h3 class="mb-0"><?php echo "$project_prefix$project_number$project_status_display<br><small>$project_name</small>"; ?></h3>
<div><small class="text-secondary"><?php echo $project_description; ?></small></div>
</div>
</div>
</div>
<div class="col-sm-3">
<div><?php echo $client_name_display; ?></div>
<div><?php echo $project_manager_display; ?></div>
<div class='text-secondary'><i class='fa fa-fw fa-clock mr-2'></i><?php echo $project_due; ?></div>
<div><?php echo $project_completed_date_display; ?></div>
<!-- Time tracking -->
<?php if ($ticket_total_reply_time) { ?>
<div>
<i class="far fa-fw fa-clock text-secondary mr-2"></i>Total time worked: <?php echo $ticket_total_reply_time; ?>
</div>
<?php } ?>
</div>
<div class="col-sm-3">
<?php if ($ticket_count) { ?>
<div class="progress" style="height: 20px;">
<i class="fa fas fa-fw fa-life-ring mr-2"></i>
<div class="progress-bar bg-primary" style="width: <?php echo $tickets_closed_percent; ?>%;"><?php echo $closed_ticket_count; ?> / <?php echo $ticket_count; ?></div>
</div>
<?php } ?>
<?php if ($task_count) { ?>
<div class="progress mt-2" style="height: 20px;">
<i class="fa fas fa-fw fa-tasks mr-2"></i>
<div class="progress-bar bg-secondary" style="width: <?php echo $tasks_completed_percent; ?>%;"><?php echo $completed_task_count; ?> / <?php echo $task_count; ?></div>
</div>
<?php } ?>
<?php if ($ticket_collaborators) { ?>
<div class=mt-1>
<i class="fas fa-fw fa-users mr-2 text-secondary"></i><?php echo $ticket_collaborators; ?>
</div>
<?php } ?>
</div>
<div class="col-sm-3">
<div class="btn-group float-right d-print-none">
<!-- Project Header -->
<div class="card">
<div class="card-header">
<h5 class="card-title">
<i class="fas fa-project-diagram text-secondary mr-2"></i>
<span class="h4"><?= "$project_prefix$project_number$project_status_display" ?></span>
</h5>
<div class="card-tools d-print-none">
<div class="btn-group">
<?php if (empty($project_completed_at)) { ?>
<div class="dropdown mr-2">
<button class="btn btn-primary btn-sm" type="button" id="dropdownMenuButton" data-toggle="dropdown">
@@ -277,9 +239,48 @@ if (isset($_GET['project_id'])) {
</div>
</div>
</div>
</div>
<div class="card-group mb-3">
<div class="card card-body">
<h5 class="mb-0"><?= $project_name ?></h5>
<div><small class="text-secondary"><?php echo $project_description; ?></small></div>
</div>
<div class="card card-body">
<div><?php echo $client_name_display; ?></div>
<div><?php echo $project_manager_display; ?></div>
<div class='text-secondary'><i class='fa fa-fw fa-clock mr-2'></i><?php echo $project_due; ?></div>
<div><?php echo $project_completed_date_display; ?></div>
<!-- Time tracking -->
<?php if ($ticket_total_reply_time) { ?>
<div>
<i class="far fa-fw fa-clock text-secondary mr-2"></i>Total time worked: <?php echo $ticket_total_reply_time; ?>
</div>
<?php } ?>
</div>
<div class="row">
<div class="card card-body">
<?php if ($ticket_count) { ?>
<div class="progress" style="height: 20px;">
<i class="fa fas fa-fw fa-life-ring mr-2"></i>
<div class="progress-bar bg-primary" style="width: <?php echo $tickets_closed_percent; ?>%;"><?php echo $closed_ticket_count; ?> / <?php echo $ticket_count; ?></div>
</div>
<?php } ?>
<?php if ($task_count) { ?>
<div class="progress mt-2" style="height: 20px;">
<i class="fa fas fa-fw fa-tasks mr-2"></i>
<div class="progress-bar bg-secondary" style="width: <?php echo $tasks_completed_percent; ?>%;"><?php echo $completed_task_count; ?> / <?php echo $task_count; ?></div>
</div>
<?php } ?>
<?php if ($ticket_collaborators) { ?>
<div class=mt-1>
<i class="fas fa-fw fa-users mr-2 text-secondary"></i><?php echo $ticket_collaborators; ?>
</div>
<?php } ?>
</div>
</div>
<div class="row">
<div class="col-md-9">
<!-- Tickets card -->
@@ -424,20 +425,6 @@ if (isset($_GET['project_id'])) {
$client_id = intval($row['client_id']);
$client_name = nullable_htmlentities($row['client_name']);
$contact_name = nullable_htmlentities($row['contact_name']);
$contact_email = nullable_htmlentities($row['contact_email']);
$contact_archived_at = nullable_htmlentities($row['contact_archived_at']);
if (empty($contact_archived_at)) {
$contact_archived_display = "";
} else {
$contact_archived_display = "Archived - ";
}
if (empty($contact_name)) {
$contact_display = "-";
} else {
$contact_display = "$contact_archived_display$contact_name<br><small class='text-secondary'>$contact_email</small>";
}
// Get who last updated the ticket - to be shown in the last Response column
$ticket_reply_type = "Client"; // Default to client for unreplied tickets
$ticket_reply_by_display = ""; // Default none
@@ -551,13 +538,13 @@ if (isset($_GET['project_id'])) {
</div> <!-- End col-3 -->
</div> <!-- End row -->
</div> <!-- End row -->
<?php
<?php
require_once "modals/project_link_ticket_modal.php";
require_once "modals/project_link_closed_ticket_modal.php";
require_once "modals/ticket_add_modal.php";
require_once "modals/project_link_ticket_modal.php";
require_once "modals/project_link_closed_ticket_modal.php";
require_once "modals/ticket_add_modal.php";
}
@@ -566,5 +553,4 @@ require_once "../includes/footer.php";
?>
<script src="../js/bulk_actions.js"></script>
<script src="../js/pretty_content.js"></script>
+1 -1
View File
@@ -4,7 +4,7 @@
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
<div class="table-responsive-sm">
<table class="table table-striped table-borderless table-hover table-sm">
<table class="table table-striped table-borderless table-hover">
<thead class="text-dark <?php if (!$num_rows[0]) { echo "d-none"; } ?> text-nowrap">
<tr>