Tons of UI and code cleanups, renamed many sql tables and fields, started adding created_at and updated_at fields

This commit is contained in:
root
2019-05-17 01:09:16 -04:00
parent 4b3c2c8c2a
commit fa08853640
72 changed files with 1625 additions and 3305 deletions

View File

@@ -1,32 +1,32 @@
<?php $sql = mysqli_query($mysqli,"SELECT * FROM client_notes WHERE client_id = $client_id ORDER BY client_note_id DESC"); ?>
<?php $sql = mysqli_query($mysqli,"SELECT * FROM notes WHERE client_id = $client_id ORDER BY note_id DESC"); ?>
<div class="card">
<div class="card-header">
<h6 class="float-left mt-1"><i class="fa fa-edit"></i> Notes</h6>
<button class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#addClientNoteModal"><i class="fa fa-plus"></i></button>
<button class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#addNoteModal"><i class="fa fa-plus"></i></button>
</div>
<div class="card-body">
<?php
while($row = mysqli_fetch_array($sql)){
$client_note_id = $row['client_note_id'];
$client_note_subject = $row['client_note_subject'];
$client_note_body = $row['client_note_body'];
$note_id = $row['note_id'];
$note_subject = $row['note_subject'];
$note_body = $row['note_body'];
?>
<div class="card mb-5">
<div class="card-header">
<?php echo $client_note_subject; ?>
<?php echo $note_subject; ?>
<div class="dropdown dropleft text-center float-right">
<button class="btn btn-secondary btn-sm" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-ellipsis-h"></i>
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#viewClientNoteModal<?php echo $client_note_id; ?>">View</a>
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#editClientNoteModal<?php echo $client_note_id; ?>">Edit</a>
<a class="dropdown-item" href="post.php?delete_client_note=<?php echo $client_note_id; ?>">Delete</a>
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#viewNoteModal<?php echo $note_id; ?>">View</a>
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#editNoteModal<?php echo $note_id; ?>">Edit</a>
<a class="dropdown-item" href="post.php?delete_note=<?php echo $note_id; ?>">Delete</a>
</div>
</div>
@@ -34,7 +34,7 @@
<div class="card-body">
<?php
$Parsedown = new Parsedown();
echo $Parsedown->text("$client_note_body");
echo $Parsedown->text("$note_body");
?>
</div>
<div class="card-footer">
@@ -43,8 +43,8 @@
</div>
<?php
include("view_client_note_modal.php");
include("edit_client_note_modal.php");
include("view_note_modal.php");
include("edit_note_modal.php");
}
@@ -52,4 +52,4 @@
</div>
</div>
<?php include("add_client_note_modal.php"); ?>
<?php include("add_note_modal.php"); ?>