1
0

sale_notes_section.php 759 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace App;
  3. use App\Helpers\HtmlHelper;
  4. /**
  5. * @var Sale $sale
  6. */
  7. ?>
  8. <section class="mb-4" id="sale-notes-section">
  9. <div class="row mb-3">
  10. <div class="col">
  11. <h3><?=htmlspecialchars(__("Notes"))?></h3>
  12. </div>
  13. <div class="col-auto">
  14. <button type="button" class="btn btn-success" data-bs-toggle="modal" data-bs-target="#sale-note-modal" data-sale-number="<?=$sale->getNumber()?>">
  15. <i class="fa fa-fw fa-plus"></i>
  16. <?=htmlspecialchars(__("Add Note"))?>
  17. </button>
  18. </div>
  19. </div>
  20. <?php
  21. $notes = $sale->getNotes();
  22. if(empty($notes)) {
  23. HtmlHelper::renderInfoAlert(__("No notes to display."));
  24. }
  25. else {
  26. foreach($notes as $note) {
  27. View::include("components/comment_card", ["comment" => $note]);
  28. }
  29. }
  30. ?>
  31. </section>