diff options
author | Camil Staps | 2016-09-02 20:21:06 +0200 |
---|---|---|
committer | Camil Staps | 2016-09-02 20:21:06 +0200 |
commit | 4036eddde27be47ad72e419f38a737c8ec2a819b (patch) | |
tree | a4e8886766309a351fec0b515097c27cf59a0bf2 /include | |
parent | Minor but significant fixes (diff) |
Diffstat (limited to 'include')
-rw-r--r-- | include/assignments-view.php | 8 | ||||
-rw-r--r-- | include/home.php | 25 | ||||
-rw-r--r-- | include/offers-view.php | 62 |
3 files changed, 66 insertions, 29 deletions
diff --git a/include/assignments-view.php b/include/assignments-view.php index a155ef7..827aba5 100644 --- a/include/assignments-view.php +++ b/include/assignments-view.php @@ -25,7 +25,7 @@ $_assignment = new Assignment($_pdo, $_id); <div class="panel panel-default"> <div class="panel-heading">Details</div> <div class="panel-body table-responsive"> - <table class="table table-bordered" id="overview-assignments"> + <table class="table table-bordered"> <thead> <tr> <th>#</th> @@ -36,11 +36,7 @@ $_assignment = new Assignment($_pdo, $_id); </thead> <tbody> <?php - echo "<tr class='mix' - data-mixer-order-id='{$_assignment->id}' - data-mixer-order-offer='{$_assignment->getOffer()->id}' - data-mixer-order-time='{$_assignment->hours}' - data-mixer-order-price='{$_assignment->price_per_hour}'> + echo "<tr> <td class='col-min-width'>{$_assignment->id}</td> <td class='col-min-width'> <a href='".Constants::url_internal."/offers?id={$_assignment->getOffer()->id}'>#{$_assignment->getOffer()->id}</a> to diff --git a/include/home.php b/include/home.php index 05846cf..6b2e8a6 100644 --- a/include/home.php +++ b/include/home.php @@ -31,9 +31,7 @@ require('./header.php'); <div class="col-lg-12"> <h1 class="page-header">Welcome</h1> </div> - <!-- /.col-lg-12 --> </div> - <!-- /.row --> <div class="row"> <div class="col-lg-3 col-md-3 col-sm-6"> <?php @@ -47,7 +45,6 @@ require('./header.php'); </div> <div class="col-xs-9 text-right"> <div class="huge"><?=$count?></div> - <!--<div>Unaccepted offers</div>--> </div> </div> </div> @@ -72,7 +69,6 @@ require('./header.php'); </div> <div class="col-xs-9 text-right"> <div class="huge"><?=$count?></div> - <!--<div>Active offers</div>--> </div> </div> </div> @@ -97,7 +93,6 @@ require('./header.php'); </div> <div class="col-xs-9 text-right"> <div class="huge"><?=$count?></div> - <!--<div>Active offers</div>--> </div> </div> </div> @@ -130,7 +125,6 @@ require('./header.php'); </div> <div class="col-xs-9 text-right"> <div class="huge"><?=$count?></div> - <!--<div>Open invoices</div>--> </div> </div> </div> @@ -144,14 +138,12 @@ require('./header.php'); </div> </div> </div> - <!-- /.row --> <div class="row"> <div class="col-lg-12"> <div class="panel panel-default" id="panel-active-offers"> <div class="panel-heading"> <i class="fa fa-tasks fa-fw"></i> Currently active offers </div> - <!-- /.panel-heading --> <div class="panel-body"> <?php $offers = Offer::search($_pdo, ["`accepted`=1", "`start_date` <= CURDATE()", "`end_date` >= CURDATE()"]); @@ -188,16 +180,13 @@ require('./header.php'); } ?> </div> - <!-- /.panel-body --> </div> - <!-- /.panel --> </div> <div class="col-lg-6 col-md-6"> <div class="panel panel-default" id="panel-finished-offers"> <div class="panel-heading" title="Offers that have been finished but for which no invoice has been sent yet"> <i class="fa fa-clock-o fa-fw"></i> Finished offers </div> - <!-- /.panel-heading --> <div class="panel-body table-responsive"> <table class="table table-bordered table-striped"> <thead> @@ -224,9 +213,7 @@ require('./header.php'); </tbody> </table> </div> - <!-- /.panel-body --> </div> - <!-- /.panel --> </div> <div class="col-lg-6 col-md-6"> <div class="panel panel-default" id="panel-open-invoices"> @@ -284,19 +271,15 @@ require('./header.php'); </tbody> </table> </div> - <!-- /.panel-body --> </div> - <!-- /.panel --> </div> </div> - <!-- /.row --> <div class="row"> <div class="col-lg-12"> <div class="panel panel-default" id="panel-timeline"> <div class="panel-heading"> <i class="fa fa-clock-o fa-fw"></i> Timeline </div> - <!-- /.panel-heading --> <div class="panel-body"> <ul class="timeline"> <?php @@ -340,7 +323,8 @@ require('./header.php'); case 'payment_received': echo "<div class='timeline-badge success' title='{$item['description']}'><i class='fa fa-".Constants::fa_valuta."'></i></div>"; break; } echo "<div class='timeline-panel'>"; - echo "<div class='timeline-heading'><h4 class='timeline-title'>#{$item['id']} to {$item['contact']}: {$item['description']}</h4><p><small class='text-muted'><i class='fa fa-clock-o fa-fw'></i> ".BusinessAdmin::formatDate($item['time'],false,true,true)."</small></p></div>"; + echo "<div class='timeline-heading'><h4 class='timeline-title'>#"; + echo "<a href='offers?id={$item['id']}'>{$item['id']}</a> to {$item['contact']}: {$item['description']}</h4><p><small class='text-muted'><i class='fa fa-clock-o fa-fw'></i> ".BusinessAdmin::formatDate($item['time'],false,true,true)."</small></p></div>"; switch ($item['type']) { case 'start': echo "<div class='timeline-body'>{$item['assignments']}</div>"; break; default: echo "<div class='timeline-body'>{$item['assignments_header']}</div>"; @@ -360,13 +344,8 @@ require('./header.php'); ?> </ul> </div> - <!-- /.panel-body --> </div> - <!-- /.panel --> </div> </div> </div> - <!-- /#page-wrapper --> - </div> -<!-- /#wrapper --> diff --git a/include/offers-view.php b/include/offers-view.php index 908db94..930f112 100644 --- a/include/offers-view.php +++ b/include/offers-view.php @@ -21,6 +21,68 @@ require_once(__DIR__ . '/../login.php'); $_offer = new Offer($_pdo, $_id); ?> +<div class="col-lg-12"> + <div class="panel panel-default"> + <div class="panel-heading">Details</div> + <div class="panel-body table-responsive"> + <table class="table table-bordered"> + <thead> + <tr> + <th>Contact</th> + <th>Dates</th> + <th>Price</th> + </tr> + </thead> + <tbody> + <?php + echo "<tr> + <td class='col-min-width'> + <a href='".Constants::url_internal."/contacts?id={$_offer->getContact()->id}'>{$_offer->getContact()->name}</a> + (<a href='".Constants::url_internal."/clients?id={$_offer->getContact()->getClient()->id}'>{$_offer->getContact()->getClient()->name}</a>) + </td> + <td class='col-min-width'> + <table> + <tr> + <th style='padding-right:1em;'>From:</th> + <td><a href='#' class='editable' id='editable-offer-{$_offer->id}-start_date' data-type='text' data-pk='{$_offer->id}' data-url='".Constants::url_external."offers/edit'>".BusinessAdmin::formatDate($_offer->start_date,false,true)."</a></td> + </tr> + <tr> + <th style='padding-right:1em;'>To:</th> + <td><a href='#' class='editable' id='editable-offer-{$_offer->id}-end_date' data-type='text' data-pk='{$_offer->id}' data-url='".Constants::url_external."offers/edit'>".BusinessAdmin::formatDate($_offer->end_date,false,true)."</a></td> + </tr> + <tr> + <th style='padding-right:1em;'>Invoice:</th> + <td><a href='#' class='editable' id='editable-offer-{$_offer->id}-invoice_date' data-type='text' data-pk='{$_offer->id}' data-url='".Constants::url_external."offers/edit'>".BusinessAdmin::formatDate($_offer->invoice_date,false,true)."</a></td> + </tr> + <tr> + <th style='padding-right:1em;'>Payment received:</th> + <td><a href='#' class='editable' id='editable-offer-{$_offer->id}-payment_received' data-type='text' data-pk='{$_offer->id}' data-url='".Constants::url_external."offers/edit'>".BusinessAdmin::formatDate($_offer->getPaymentReceived(),false,true)."</a></td> + </tr> + </table> + </td> + <td class='col-min-width'> + <table> + <tr> + <th style='padding-right:1em;'>Subtotal:</th> + <td>".Constants::invoice_valuta."{$offer->calculate(Calculatable::SUBTOTAL)}</td> + </tr> + <tr> + <th style='padding-right:1em;'>VAT:</th> + <td>".Constants::invoice_valuta."{$offer->calculate(Calculatable::VAT)}</td> + <tr> + </tr> + <th style='padding-right:1em;'>Total:</th> + <td>".Constants::invoice_valuta."{$offer->calculate(Calculatable::TOTAL)}</td> + </tr> + </table> + </td> + </tr>"; + ?> + </tbody> + </table> + </div> + </div> +</div> <div class="col-lg-6"> <div class="panel panel-default"> <div class="panel-heading">Assignments</div> |