diff --git a/app/Http/Controllers/Hauling/Hauling.php b/app/Http/Controllers/Hauling/Hauling.php
index 3f3601b..421b86e 100644
--- a/app/Http/Controllers/Hauling/Hauling.php
+++ b/app/Http/Controllers/Hauling/Hauling.php
@@ -30,8 +30,8 @@ class Hauling extends Controller
*/
public function displayFormResults(Request $request) {
$this->validate($request, [
- 'name1' => 'required',
- 'name2' => 'required',
+ 'pickup' => 'required',
+ 'destination' => 'required',
'collateral' => 'required',
'size' => 'required',
]);
@@ -40,14 +40,18 @@ class Hauling extends Controller
$collateral = $request->collateral;
$time = '1 week';
$duration = '3 days';
+ $pickup = $request->pickup;
+ $destination = $request->destination;
$hHelper = new HaulingHelper;
- $jumps = $hHelper->JumpsBetweenSystems($request->name1, $request->name2);
+ $jumps = $hHelper->JumpsBetweenSystems($pickup, $destination);
- if($size > 0 && $size <= 57500) {
+ if($size > 0 && $size <= 8000) {
+ $cost = $jumps* 600000;
+ } else if($size > 8000 && $size <= 57500) {
$cost = $jumps * 750000;
- } else if($size > 57500 && $size < 800000) {
+ } else if($size > 57500 && $size <= 800000) {
$cost = $jumps * 1000000;
} else {
$cost = -1;
@@ -58,7 +62,9 @@ class Hauling extends Controller
->with('collateral', $collateral)
->with('size', $size)
->with('time', $time)
- ->with('duration', $duration);
+ ->with('duration', $duration)
+ ->with('pickup', $pickup)
+ ->with('destination', $destination);
}
/**
diff --git a/database/migrations/2019_09_26_051702_create_solar_systems_table.php b/database/migrations/2019_09_26_051702_create_solar_systems_table.php
index d3c4bab..5d3d862 100644
--- a/database/migrations/2019_09_26_051702_create_solar_systems_table.php
+++ b/database/migrations/2019_09_26_051702_create_solar_systems_table.php
@@ -17,6 +17,7 @@ class CreateSolarSystemsTable extends Migration
Schema::create('solar_systems', function (Blueprint $table) {
$table->string('name');
$table->string('solar_system_id')->unique();
+ $table->float('security_status', 3, 2);
});
}
}
diff --git a/database/seeds/SolarSystemSeeder.php b/database/seeds/SolarSystemSeeder.php
index 0d8e7dc..90f1cab 100644
--- a/database/seeds/SolarSystemSeeder.php
+++ b/database/seeds/SolarSystemSeeder.php
@@ -39,6 +39,7 @@ class SolarSystemSeeder extends Seeder
SolarSystem::insert([
'name' => $info->name,
'solar_system_id' => $system,
+ 'security_status' => $info->security_status,
]);
}
}
diff --git a/resources/views/hauling/display/form.blade.php b/resources/views/hauling/display/form.blade.php
index 022175e..7999aed 100644
--- a/resources/views/hauling/display/form.blade.php
+++ b/resources/views/hauling/display/form.blade.php
@@ -1,16 +1,50 @@
-@if(Auth::check())
-@extends('layouts.navbars.loggedin')
-@else
-@extends('layouts.navbars.loggedout')
-@endif
-
+@extends('layouts.b4')
+@section('content')
+
| Route | +{{ $pickup }} >> {{ $destination }} | +
|---|---|
| Warps | +{{ $jumps }} | +
| Volume | +{{ $size }} | +
| Collateral | +{{ $collateral }} ISK | +
| Service Type | +Highsec | +
|---|---|
| Issue To | +United Hauling | +
| Price | +{{ $price }} | +
| Container Policy | +Containers allowed. | +
| Expiration | +{{ $time }} | +
| Days To Complete | +{{ $duration }} | +