[fix] Bug with bounding boxes in database, DBseeder and dropzone.
This commit is contained in:
parent
a4f48d04a4
commit
4dfedb75b3
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
namespace App\Jobs;
|
namespace App\Jobs;
|
||||||
|
|
||||||
use App\Enums\Status;
|
|
||||||
use App\Models\Project;
|
use App\Models\Project;
|
||||||
use App\Models\ProjectDownload;
|
use App\Models\ProjectDownload;
|
||||||
use Illuminate\Bus\Batchable;
|
use Illuminate\Bus\Batchable;
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ class DownloadManager extends Component
|
||||||
{
|
{
|
||||||
use WithPagination;
|
use WithPagination;
|
||||||
|
|
||||||
public $project;
|
public Project $project;
|
||||||
|
|
||||||
public $formData;
|
public $formData;
|
||||||
|
|
||||||
|
|
@ -88,6 +88,7 @@ public function placeholder()
|
||||||
|
|
||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
|
|
||||||
$query = $this->project->downloads()->orderBy('name', 'desc');
|
$query = $this->project->downloads()->orderBy('name', 'desc');
|
||||||
$query = $this->applySearch($query);
|
$query = $this->applySearch($query);
|
||||||
$downloads = $query->paginate(10, pageName: 'downloadPage');
|
$downloads = $query->paginate(10, pageName: 'downloadPage');
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,6 @@ public function up(): void
|
||||||
*/
|
*/
|
||||||
public function down(): void
|
public function down(): void
|
||||||
{
|
{
|
||||||
Schema::dropIfExists('reports');
|
Schema::dropIfExists('project_reports');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,6 @@ public function up(): void
|
||||||
*/
|
*/
|
||||||
public function down(): void
|
public function down(): void
|
||||||
{
|
{
|
||||||
Schema::dropIfExists('password_resets');
|
Schema::dropIfExists('password_reset_tokens');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -45,27 +45,6 @@ private function createChembaProject()
|
||||||
'updated_at' => '2021-01-01 00:00:00',
|
'updated_at' => '2021-01-01 00:00:00',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$chembaProject->boundingBoxes()->createMany([
|
|
||||||
[
|
|
||||||
'name' => 'Chemba West',
|
|
||||||
'top_left_latitude' => 34.9460,
|
|
||||||
'top_left_longitude' => -17.3516,
|
|
||||||
'bottom_right_latitude' => 34.9380,
|
|
||||||
'bottom_right_longitude' => -17.2917,
|
|
||||||
'created_at' => '2021-01-01 00:00:00',
|
|
||||||
'updated_at' => '2021-01-01 00:00:00',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'Chemba East',
|
|
||||||
'top_left_latitude' => 34.8830,
|
|
||||||
'top_left_longitude' => -17.3516,
|
|
||||||
'bottom_right_latitude' => 34.9380,
|
|
||||||
'bottom_right_longitude' => -17.2917,
|
|
||||||
'created_at' => '2021-01-01 00:00:00',
|
|
||||||
'updated_at' => '2021-01-01 00:00:00',
|
|
||||||
],
|
|
||||||
]);
|
|
||||||
|
|
||||||
foreach ($chembaProject->getMergedTiffList() as $mergedTiff) {
|
foreach ($chembaProject->getMergedTiffList() as $mergedTiff) {
|
||||||
$download = $chembaProject->downloads()->create([
|
$download = $chembaProject->downloads()->create([
|
||||||
'name' => basename($mergedTiff),
|
'name' => basename($mergedTiff),
|
||||||
|
|
@ -151,27 +130,6 @@ private function createXinavaneProject()
|
||||||
'updated_at' => '2021-01-01 00:00:00',
|
'updated_at' => '2021-01-01 00:00:00',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$project->boundingBoxes()->createMany([
|
|
||||||
[
|
|
||||||
'name' => 'Xinavane West',
|
|
||||||
'top_left_latitude' => 32.6213,
|
|
||||||
'top_left_longitude' => -25.0647,
|
|
||||||
'bottom_right_latitude' => 32.6284,
|
|
||||||
'bottom_right_longitude' => -25.0570,
|
|
||||||
'created_at' => '2021-01-01 00:00:00',
|
|
||||||
'updated_at' => '2021-01-01 00:00:00',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'Xinavane East',
|
|
||||||
'top_left_latitude' => 32.6790,
|
|
||||||
'top_left_longitude' => -25.0333,
|
|
||||||
'bottom_right_latitude' => 32.7453,
|
|
||||||
'bottom_right_longitude' => -25.0235,
|
|
||||||
'created_at' => '2021-01-01 00:00:00',
|
|
||||||
'updated_at' => '2021-01-01 00:00:00',
|
|
||||||
],
|
|
||||||
]);
|
|
||||||
|
|
||||||
$project->emailRecipients()->createMany([
|
$project->emailRecipients()->createMany([
|
||||||
[
|
[
|
||||||
'name' => 'Martin Folkerts',
|
'name' => 'Martin Folkerts',
|
||||||
|
|
@ -245,17 +203,6 @@ private function createKakiraProject()
|
||||||
'updated_at' => '2021-01-01 00:00:00',
|
'updated_at' => '2021-01-01 00:00:00',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$project->boundingBoxes()->createMany([
|
|
||||||
[
|
|
||||||
'name' => 'kakira_demo',
|
|
||||||
'top_left_latitude' => 33.289993827426535,
|
|
||||||
'top_left_longitude' => 0.491981861534345,
|
|
||||||
'bottom_right_latitude' => 33.32572075441914,
|
|
||||||
'bottom_right_longitude' => 0.5144195937114393,
|
|
||||||
'created_at' => '2021-01-01 00:00:00',
|
|
||||||
'updated_at' => '2021-01-01 00:00:00',
|
|
||||||
],
|
|
||||||
]);
|
|
||||||
|
|
||||||
$project->emailRecipients()->createMany([
|
$project->emailRecipients()->createMany([
|
||||||
[
|
[
|
||||||
|
|
|
||||||
6
laravel_app/package-lock.json
generated
6
laravel_app/package-lock.json
generated
|
|
@ -728,9 +728,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/caniuse-lite": {
|
"node_modules/caniuse-lite": {
|
||||||
"version": "1.0.30001547",
|
"version": "1.0.30001621",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001547.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001621.tgz",
|
||||||
"integrity": "sha512-W7CrtIModMAxobGhz8iXmDfuJiiKg1WADMO/9x7/CLNin5cpSbuBjooyoIUVB5eyCc36QuTVlkVa1iB2S5+/eA==",
|
"integrity": "sha512-+NLXZiviFFKX0fk8Piwv3PfLPGtRqJeq2TiNoUff/qB5KJgwecJTvCXDpmlyP/eCI/GUEmp/h/y5j0yckiiZrA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 lg
|
||||||
Name
|
Name
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||||
Year-Week
|
File
|
||||||
</th>
|
</th>
|
||||||
<th scope="col"
|
<th scope="col"
|
||||||
class="px-3 py-3.5 text-right text-sm font-semibold text-gray-900 sm:pr-8 lg:pr-8">
|
class="px-3 py-3.5 text-right text-sm font-semibold text-gray-900 sm:pr-8 lg:pr-8">
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ class="px-3 py-3.5 text-right pr-4 sm:pr-8 lg:pr-8 text-sm font-semibold text-gr
|
||||||
{{ $downloads->links('livewire.pagination') }}
|
{{ $downloads->links('livewire.pagination') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div wire:loading class="absolute inset-0 bg-white opacity-75"></div>
|
{{-- <div wire:loading class="absolute inset-0 bg-white opacity-75"></div>--}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
uuid: @js($uuid),
|
uuid: @js($uuid),
|
||||||
multiple: @js($multiple),
|
multiple: @js($multiple),
|
||||||
})"
|
})"
|
||||||
@dragenter.prevent.document="onDragenter($event)"
|
@dragenter.prevent="onDragenter($event)"
|
||||||
@dragleave.prevent="onDragleave($event)"
|
@dragleave.prevent="onDragleave($event)"
|
||||||
@dragover.prevent="onDragover($event)"
|
@dragover.prevent="onDragover($event)"
|
||||||
@drop.prevent="onDrop"
|
@drop.prevent="onDrop"
|
||||||
|
|
@ -157,13 +157,22 @@ class="hidden"
|
||||||
multiple ? _this.uploadMultiple(...args) : _this.upload(...args)
|
multiple ? _this.uploadMultiple(...args) : _this.upload(...args)
|
||||||
},
|
},
|
||||||
onDragenter() {
|
onDragenter() {
|
||||||
this.isDragging = true
|
if(!this.isDragging){
|
||||||
|
this.isDragging = true;
|
||||||
|
console.log('ondragenter:',uuid,'->',this.isDragging);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onDragleave() {
|
onDragleave() {
|
||||||
this.isDragging = false
|
if(this.isDragging) {
|
||||||
|
this.isDragging = false;
|
||||||
|
console.log('ondragleave: ',uuid,'->', this.isDragging);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onDragover() {
|
onDragover() {
|
||||||
this.isDragging = true
|
if(!this.isDragging) {
|
||||||
|
this.isDragging = true;
|
||||||
|
console.log('ondragover: ',uuid,'->',this.isDragging);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
removeUpload(tmpFilename) {
|
removeUpload(tmpFilename) {
|
||||||
// Dispatch an event to remove the temporarily uploaded file
|
// Dispatch an event to remove the temporarily uploaded file
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue