Skip to content

Commit 624d183

Browse files
authored
Merge pull request #104 from imbus/feature/predefined-filter-seeder-update
predefinedfilter update
2 parents 275b916 + d017f80 commit 624d183

File tree

7 files changed

+218
-126
lines changed

7 files changed

+218
-126
lines changed

.env.testing-performance

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ MAIL_TLS_VERIFY_PEER=true
7373
# --------------------------------------------
7474
IMAGE_LIB=gd
7575

76-
7776
# --------------------------------------------
7877
# OPTIONAL: BACKUP SETTINGS
7978
# --------------------------------------------

PredefinedFilter::truncate();

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
= [
2+
[
3+
"id" => 1,
4+
"name" => "Asset Tag UI Copy",
5+
],
6+
[
7+
"id" => 2,
8+
"name" => "Test Name Filter",
9+
],
10+
[
11+
"id" => 3,
12+
"name" => "Asset TAG Like 123",
13+
],
14+
[
15+
"id" => 4,
16+
"name" => "Model filter",
17+
],
18+
[
19+
"id" => 5,
20+
"name" => "Serial filter",
21+
],
22+
[
23+
"id" => 6,
24+
"name" => "Status filter",
25+
],
26+
[
27+
"id" => 7,
28+
"name" => "Supplier filter",
29+
],
30+
[
31+
"id" => 8,
32+
"name" => "Company filter",
33+
],
34+
[
35+
"id" => 9,
36+
"name" => "RTD-Location filter",
37+
],
38+
[
39+
"id" => 10,
40+
"name" => "Custom Field Ram",
41+
],
42+
[
43+
"id" => 11,
44+
"name" => "Purchased Between",
45+
],
46+
[
47+
"id" => 12,
48+
"name" => "Combo contains: Model AND CustomField_RAM",
49+
],
50+
[
51+
"id" => 13,
52+
"name" => "Combo contains: Model AND Manufacturer",
53+
],
54+
[
55+
"id" => 14,
56+
"name" => "Combo contains: Model NOT Manufacturer",
57+
],
58+
[
59+
"id" => 15,
60+
"name" => "Assigned To Location contains name",
61+
],
62+
[
63+
"id" => 16,
64+
"name" => "ShouldNotBeVisibleForUserFilter",
65+
],
66+
]
67+

database/seeders/CustomFieldProfilesSeeder.php

Whitespace-only changes.

database/seeders/DatabaseSeeder.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ public function run()
2121
{
2222
Model::unguard();
2323

24-
// Only create default settings if they do not exist in the db.
2524
if (! Setting::first()) {
26-
// factory(Setting::class)->create();
2725
$this->call(SettingsSeeder::class);
2826
}
2927

@@ -39,16 +37,22 @@ public function run()
3937
$this->call(DepreciationSeeder::class);
4038
$this->call(StatuslabelSeeder::class);
4139
$this->call(AccessorySeeder::class);
42-
$this->call(CustomFieldSeeder::class);
40+
41+
$dataset = env('TEST_DATASET', 'default');
42+
43+
if ($dataset === 'huge+custom') {
44+
$this->call(CustomFieldsStandaloneSeeder::class);
45+
} else {
46+
$this->call(CustomFieldSeeder::class);
47+
}
48+
4349
$this->call(AssetSeeder::class);
4450
$this->call(LicenseSeeder::class);
4551
$this->call(ComponentSeeder::class);
4652
$this->call(ConsumableSeeder::class);
4753
$this->call(ActionlogSeeder::class);
4854
$this->call(PredefinedFilterSeeder::class);
4955
$this->call(PredefinedFilterPermissionSeeder::class);
50-
$this->call(CustomFieldsStandaloneSeeder::class);
51-
5256

5357
Artisan::call('snipeit:sync-asset-locations', ['--output' => 'all']);
5458
$output = Artisan::output();
@@ -60,4 +64,4 @@ public function run()
6064
DB::table('maintenances')->truncate();
6165
DB::table('requested_assets')->truncate();
6266
}
63-
}
67+
}

0 commit comments

Comments
 (0)