Skip to content

Commit

Permalink
Merge pull request #14 from ocornel/feature/styling
Browse files Browse the repository at this point in the history
Feature/styling
  • Loading branch information
ocornel authored Feb 7, 2021
2 parents 90bc74d + 0497398 commit 25ec5c3
Show file tree
Hide file tree
Showing 35 changed files with 1,525 additions and 134 deletions.
5 changes: 5 additions & 0 deletions app/Http/Controllers/CreditController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ public function index($status_filter=null)
return $credit->cleared == true;
})->values();;
break;
case HC::CREDITS_OVERPAID:
$credits = Credit::all()->filter(function ($credit) {
return $credit->amount_due < 0;
})->values();;
break;
default:
$credits = Credit::all();
}
Expand Down
10 changes: 7 additions & 3 deletions app/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ public function __construct()
$this->middleware('auth');
}

public const WIDGET_U5 = 'Clients Under 5';
public const WIDGET_O5 = 'Clients Over 5';
public const WIDGET_U5 = 'Under 5';
public const WIDGET_O5 = 'Over 5';
public const PATIENTS_WITH_DEBT = 'With Outstanding Debts';

public const WIDGET_OUTSTANDING = 'Total Outstanding Debts';
public const WIDGET_CLEARED = 'Total Cleared Debts';
public const WIDGET_CLEARED = 'Cleared Debt';
public const CREDITS_OVERPAID = 'Overpaid Debt';

public const WIDGET_DUE = 'Debts Due Soon';
public const WIDGET_DEBT_TREND = 'Debts Trend';

Expand Down
11 changes: 8 additions & 3 deletions app/Http/Controllers/PatientController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ public function __construct()
*
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Http\Response|\Illuminate\View\View
*/
public function index($age_filter=null)
public function index($filter=null)
{
switch ($age_filter) {
switch ($filter) {
case HC::WIDGET_O5:
$patients = Patient::all()->filter(function ($patient) {
return $patient->years >= 5;
Expand All @@ -36,11 +36,16 @@ public function index($age_filter=null)
return $patient->years < 5;
})->values();;
break;
case HC::PATIENTS_WITH_DEBT:
$patients = Patient::all()->filter(function ($patient) {
return $patient->credit_due > 0;
})->values();;
break;
default:
$patients = Patient::all();
}
$context = [
'age_filter' =>$age_filter,
'list_filter' =>$filter,
'patients' => $patients
];
return view('patient.index', $context);
Expand Down
1 change: 1 addition & 0 deletions app/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

class Utils extends Model
{
const SUPER_ADMIN_ID = 1;
public static function safe_divide($numerator, $denominator, $decimals=2){
if ($numerator == 0 or $denominator == 0){
return round(0,$decimals);
Expand Down
1 change: 1 addition & 0 deletions database/seeds/UsersTableSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public function run()
{
if ($this->command) $this->command->info('Creating Default Users');
User::create([
'id'=>\App\Utils::SUPER_ADMIN_ID,
'name' => 'System Admin',
'email' => "[email protected]",
'password' => bcrypt('Sy5@dm!n')
Expand Down
654 changes: 654 additions & 0 deletions public/blank.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public/css/application.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public/css/demo.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions public/css/elephant.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public/css/landing-page.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

67 changes: 57 additions & 10 deletions public/css/styles.css
Original file line number Diff line number Diff line change
@@ -1,14 +1,61 @@

:root {
--5c-default-font-size: 14px;
--5c-blue: #56C8F3;
--5c-dark-blue: #0D325B;
--5c-dark-grey: #111111;
--5c-light-grey: #434343;
--5c-faint-grey: #EEEEEE;
--5c-danger-red: #EE1122;
--h: 50;
--theme-green: #8cc347;
--theme-dark-blue: #050180;
--theme-light-blue: #2e96b9;
--theme-red: #fe0302;
--theme-default-font-size: 14px;
}

* {
font-size: var(--5c-default-font-size);
font-size: var(--theme-default-font-size);
}
.navbar-default .navbar-header {
background-color: var(--theme-green);
}
.navbar-default .navbar-collapse, .navbar-default .navbar-form {
border-color: var(--theme-green);
}
.layout-header {
background-color: var(--theme-green);
}
.navbar-default {
background-color: var(--theme-green);
border-color: var(--theme-green);
}
.navbar-default .navbar-search {
background-color: var(--theme-green);
color: #fff;
}
.navbar-default .sidenav-toggler.collapsed {
background-color: var(--theme-light-blue);
}
.sidenav-heading {
color: var(--theme-light-blue);
font-size: 14px;
}
.masthead {
background-color: white;
color: var(--theme-dark-blue);
}
.masthead-heading, .masthead-lead {
color: var(--theme-dark-blue);
}
@media (max-width: 770px) {
.navbar-brand-logo {
height: 50px;
}
}
@media (min-width: 800px) {
.navbar-brand-logo {
height: 92px;
}
}
.card-header {
color: var(--theme-dark-blue);
font-weight: 500;
}
.btn-inactive {
background-color: #777777;
border-color: #777777;
color: #fff;
}
20 changes: 20 additions & 0 deletions public/css/vendor.min.css

Large diffs are not rendered by default.

Binary file added public/img/no-ppic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 25ec5c3

Please sign in to comment.