Add more default values for label preview

This commit is contained in:
Marcus Moore 2023-09-28 13:40:51 -07:00
parent ed77e8768c
commit eb2edb7475

View file

@ -7,8 +7,10 @@ use App\Models\AssetModel;
use App\Models\Category; use App\Models\Category;
use App\Models\Company; use App\Models\Company;
use App\Models\Labels\Label; use App\Models\Labels\Label;
use App\Models\Location;
use App\Models\Manufacturer; use App\Models\Manufacturer;
use App\Models\Setting; use App\Models\Setting;
use App\Models\Supplier;
use App\Models\User; use App\Models\User;
use App\View\Label as LabelView; use App\View\Label as LabelView;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
@ -33,18 +35,20 @@ class LabelsController extends Controller
$exampleAsset->name = 'JEN-867-5309'; $exampleAsset->name = 'JEN-867-5309';
$exampleAsset->asset_tag = 'TCA-00001'; $exampleAsset->asset_tag = 'TCA-00001';
$exampleAsset->serial = 'SN9876543210'; $exampleAsset->serial = 'SN9876543210';
$exampleAsset->asset_eol_date = '2025-01-01';
$exampleAsset->order_number = '12345';
$exampleAsset->purchase_date = '2023-01-01';
$exampleAsset->status_id = 1;
$exampleAsset->company = new Company(); $exampleAsset->company = new Company([
$exampleAsset->company->id = 999999; 'name' => 'Test Company Limited',
$exampleAsset->company->name = 'Test Company Limited'; 'phone' => '1-555-555-5555',
$exampleAsset->company->image = 'company-image-test.png'; 'email' => 'company@example.com',
]);
$exampleAsset->assignedto = new User(); $exampleAsset->setRelation('assignedTo', new User(['first_name' => 'Luke', 'last_name' => 'Skywalker']));
$exampleAsset->assignedto->id = 999999; $exampleAsset->defaultLoc = new Location(['name' => 'Building 1', 'phone' => '1-555-555-5555']);
$exampleAsset->assignedto->first_name = 'Test'; $exampleAsset->location = new Location(['name' => 'Building 2', 'phone' => '1-555-555-5555']);
$exampleAsset->assignedto->last_name = 'Person';
$exampleAsset->assignedto->username = 'Test.Person';
$exampleAsset->assignedto->employee_num = '0123456789';
$exampleAsset->model = new AssetModel(); $exampleAsset->model = new AssetModel();
$exampleAsset->model->id = 999999; $exampleAsset->model->id = 999999;
@ -53,6 +57,10 @@ class LabelsController extends Controller
$exampleAsset->model->manufacturer = new Manufacturer(); $exampleAsset->model->manufacturer = new Manufacturer();
$exampleAsset->model->manufacturer->id = 999999; $exampleAsset->model->manufacturer->id = 999999;
$exampleAsset->model->manufacturer->name = 'Test Manufacturing Inc.'; $exampleAsset->model->manufacturer->name = 'Test Manufacturing Inc.';
$exampleAsset->model->manufacturer->support_email = 'support@test.com';
$exampleAsset->model->manufacturer->support_phone = '1-555-555-5555';
$exampleAsset->model->manufacturer->support_url = 'https://example.com';
$exampleAsset->supplier = new Supplier(['name' => 'Test Company Limited']);
$exampleAsset->model->category = new Category(); $exampleAsset->model->category = new Category();
$exampleAsset->model->category->id = 999999; $exampleAsset->model->category->id = 999999;
$exampleAsset->model->category->name = 'Test Category'; $exampleAsset->model->category->name = 'Test Category';