mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-14 01:24:06 -08:00
bb874012d9
Working mail from notification. Still requires testing/cleaning Add tests around checkout notification. This also removes the ability to check out an asset to a location|asset that requires acceptance/a Eula. For 4.1 we may think about how to support such a thing, but at present it seems to make sense to only alow such assets to be checked out to users, who can be responsible for the items.
53 lines
1.4 KiB
PHP
53 lines
1.4 KiB
PHP
<?php
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Category Factories
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Factories related exclusively to creating categories and the various states..
|
|
|
|
|
*/
|
|
|
|
|
|
$factory->define(App\Models\Category::class, function (Faker\Generator $faker) {
|
|
return [
|
|
'name' => $faker->text(20),
|
|
'category_type' => $faker->randomElement(['asset', 'accessory', 'component', 'consumable']),
|
|
'eula_text' => $faker->paragraph(),
|
|
'require_acceptance' => false,
|
|
'use_default_eula' => $faker->boolean(),
|
|
'checkin_email' => $faker->boolean()
|
|
];
|
|
});
|
|
|
|
$factory->state(App\Models\Category::class, 'asset-category', function ($faker) {
|
|
return [
|
|
'category_type' => 'asset',
|
|
];
|
|
});
|
|
|
|
$factory->state(App\Models\Category::class, 'accessory-category', function ($faker) {
|
|
return [
|
|
'category_type' => 'accessory',
|
|
];
|
|
});
|
|
|
|
$factory->state(App\Models\Category::class, 'component-category', function ($faker) {
|
|
return [
|
|
'category_type' => 'component',
|
|
];
|
|
});
|
|
|
|
$factory->state(App\Models\Category::class, 'consumable-category', function ($faker) {
|
|
return [
|
|
'category_type' => 'consumable',
|
|
];
|
|
});
|
|
|
|
$factory->state(App\Models\Category::class, 'requires-acceptance', function ($faker) {
|
|
return [
|
|
'require_acceptance' => true,
|
|
];
|
|
});
|