Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dce7c0c451 |
@@ -142,7 +142,7 @@ class AcceptanceController extends Controller
|
||||
'item_name' => $item->display_name, // this handles licenses seats, which don't have a 'name' field
|
||||
'item_model' => $item->model?->name,
|
||||
'item_serial' => $item->serial,
|
||||
'item_status' => $item->assetstatus?->name,
|
||||
'item_status' => $item->statuslabel?->name,
|
||||
'eula' => $item->getEula(),
|
||||
'note' => $request->input('note'),
|
||||
'check_out_date' => Helper::getFormattedDateObject($acceptance->created_at, 'datetime', false),
|
||||
|
||||
@@ -155,7 +155,7 @@ class AssetsController extends Controller
|
||||
->with(
|
||||
'model',
|
||||
'location',
|
||||
'assetstatus',
|
||||
'statuslabel',
|
||||
'company',
|
||||
'defaultLoc',
|
||||
'assignedTo',
|
||||
@@ -476,7 +476,7 @@ class AssetsController extends Controller
|
||||
public function showByTag(Request $request, $tag): JsonResponse|array
|
||||
{
|
||||
$this->authorize('index', Asset::class);
|
||||
$assets = Asset::where('asset_tag', $tag)->with('assetstatus')->with('assignedTo');
|
||||
$assets = Asset::where('asset_tag', $tag)->with('statuslabel')->with('assignedTo');
|
||||
|
||||
// Check if they've passed ?deleted=true
|
||||
if ($request->input('deleted', 'false') == 'true') {
|
||||
@@ -516,7 +516,7 @@ class AssetsController extends Controller
|
||||
{
|
||||
$this->authorize('index', Asset::class);
|
||||
$assets = Asset::where('serial', $serial)->with([
|
||||
'assetstatus',
|
||||
'statuslabel',
|
||||
'assignedTo',
|
||||
'company',
|
||||
'defaultLoc',
|
||||
@@ -560,7 +560,7 @@ class AssetsController extends Controller
|
||||
*/
|
||||
public function show(Request $request, $id): JsonResponse|array
|
||||
{
|
||||
if ($asset = Asset::with('assetstatus')
|
||||
if ($asset = Asset::with('statuslabel')
|
||||
->with('assignedTo')->withTrashed()
|
||||
->withCount('checkins as checkins_count', 'checkouts as checkouts_count', 'userRequests as user_requests_count')->find($id)
|
||||
) {
|
||||
@@ -600,14 +600,14 @@ class AssetsController extends Controller
|
||||
'assets.assigned_to',
|
||||
'assets.assigned_type',
|
||||
'assets.status_id',
|
||||
])->with('model', 'assetstatus', 'assignedTo')
|
||||
])->with('model', 'statuslabel', 'assignedTo')
|
||||
->NotArchived();
|
||||
|
||||
if ((Setting::getSettings()->full_multiple_companies_support == '1') && ($request->filled('companyId'))) {
|
||||
$assets->where('assets.company_id', $request->input('companyId'));
|
||||
}
|
||||
|
||||
if ($request->filled('assetStatusType') && $request->input('assetStatusType') === 'RTD') {
|
||||
if ($request->filled('statuslabelType') && $request->input('statuslabelType') === 'RTD') {
|
||||
$assets = $assets->RTD();
|
||||
}
|
||||
|
||||
@@ -628,8 +628,8 @@ class AssetsController extends Controller
|
||||
$asset->use_text .= ' → '.$asset->assigned->display_name;
|
||||
}
|
||||
|
||||
if ($asset->assetstatus->getStatuslabelType() == 'pending') {
|
||||
$asset->use_text .= '('.$asset->assetstatus->getStatuslabelType().')';
|
||||
if ($asset->statuslabel->getStatuslabelType() == 'pending') {
|
||||
$asset->use_text .= '('.$asset->statuslabel->getStatuslabelType().')';
|
||||
}
|
||||
|
||||
$asset->use_image = ($asset->getImageUrl()) ? $asset->getImageUrl() : null;
|
||||
@@ -1147,8 +1147,8 @@ class AssetsController extends Controller
|
||||
'id' => $asset->id,
|
||||
'asset_tag' => $asset->asset_tag,
|
||||
'note' => e($request->input('note')),
|
||||
'status_label' => e($asset->assetstatus?->display_name),
|
||||
'status_type' => $asset->assetstatus?->getStatuslabelType(),
|
||||
'status_label' => e($asset->statuslabel?->display_name),
|
||||
'status_type' => $asset->statuslabel?->getStatuslabelType(),
|
||||
'next_audit_date' => Helper::getFormattedDateObject($asset->next_audit_date),
|
||||
];
|
||||
|
||||
@@ -1255,7 +1255,7 @@ class AssetsController extends Controller
|
||||
$assets = Asset::select('assets.*')
|
||||
->with(
|
||||
'location',
|
||||
'assetstatus',
|
||||
'statuslabel',
|
||||
'assetlog',
|
||||
'company',
|
||||
'assignedTo',
|
||||
|
||||
@@ -311,7 +311,7 @@ class LocationsController extends Controller
|
||||
{
|
||||
$this->authorize('view', Asset::class);
|
||||
$this->authorize('view', $location);
|
||||
$assets = Asset::where('location_id', '=', $location->id)->with('model', 'model.category', 'assetstatus', 'location', 'company', 'defaultLoc');
|
||||
$assets = Asset::where('location_id', '=', $location->id)->with('model', 'model.category', 'statuslabel', 'location', 'company', 'defaultLoc');
|
||||
$assets = $assets->get();
|
||||
|
||||
return (new AssetsTransformer)->transformAssets($assets, $assets->count(), $request);
|
||||
@@ -321,7 +321,7 @@ class LocationsController extends Controller
|
||||
{
|
||||
$this->authorize('view', Asset::class);
|
||||
$this->authorize('view', $location);
|
||||
$assets = Asset::where('assigned_to', '=', $location->id)->where('assigned_type', '=', Location::class)->with('model', 'model.category', 'assetstatus', 'location', 'company', 'defaultLoc');
|
||||
$assets = Asset::where('assigned_to', '=', $location->id)->where('assigned_type', '=', Location::class)->with('model', 'model.category', 'statuslabel', 'location', 'company', 'defaultLoc');
|
||||
$assets = $assets->get();
|
||||
|
||||
return (new AssetsTransformer)->transformAssets($assets, $assets->count(), $request);
|
||||
|
||||
@@ -38,7 +38,7 @@ class MaintenancesController extends Controller
|
||||
$this->authorize('view', Asset::class);
|
||||
|
||||
$maintenances = Maintenance::select('maintenances.*')
|
||||
->with('asset', 'asset.model', 'asset.location', 'asset.defaultLoc', 'supplier', 'asset.company', 'asset.assetstatus', 'adminuser', 'asset.assignedTo');
|
||||
->with('asset', 'asset.model', 'asset.location', 'asset.defaultLoc', 'supplier', 'asset.company', 'asset.statuslabel', 'adminuser', 'asset.assignedTo');
|
||||
|
||||
// This invokes the Searchable model trait scopeTextSearch and will handle input by search or by advanced search filter
|
||||
if ($request->filled('filter') || $request->filled('search')) {
|
||||
|
||||
@@ -407,7 +407,7 @@ class BulkAssetsController extends Controller
|
||||
// Otherwise we need to make sure the status type is still a deployable one.
|
||||
|
||||
$unassigned = $asset->assigned_to == '';
|
||||
$deployable = $updated_status->deployable == '1' && $asset->assetstatus?->deployable == '1';
|
||||
$deployable = $updated_status->deployable == '1' && $asset->statuslabel?->deployable == '1';
|
||||
$pending = $updated_status->pending === 1;
|
||||
|
||||
if ($unassigned || $deployable || $pending) {
|
||||
|
||||
@@ -141,7 +141,7 @@ class ReportsController extends Controller
|
||||
{
|
||||
$this->authorize('reports.view');
|
||||
// Grab all the assets
|
||||
$assets = Asset::with('model', 'assignedTo', 'assetstatus', 'defaultLoc', 'assetlog')
|
||||
$assets = Asset::with('model', 'assignedTo', 'statuslabel', 'defaultLoc', 'assetlog')
|
||||
->orderBy('created_at', 'DESC')->get();
|
||||
|
||||
$csv = Writer::createFromFileObject(new \SplTempFileObject);
|
||||
@@ -675,7 +675,7 @@ class ReportsController extends Controller
|
||||
}
|
||||
|
||||
$assets = Asset::select('assets.*')->with(
|
||||
'location', 'assetstatus', 'company', 'defaultLoc', 'assignedTo',
|
||||
'location', 'statuslabel', 'company', 'defaultLoc', 'assignedTo',
|
||||
'model.category', 'model.manufacturer', 'supplier');
|
||||
|
||||
if ($request->filled('by_location_id')) {
|
||||
@@ -1022,7 +1022,7 @@ class ReportsController extends Controller
|
||||
}
|
||||
|
||||
if ($request->filled('status')) {
|
||||
$row[] = ($asset->assetstatus) ? $asset->assetstatus->name.' ('.$asset->present()->statusMeta.')' : '';
|
||||
$row[] = ($asset->statuslabel) ? $asset->statuslabel->name.' ('.$asset->present()->statusMeta.')' : '';
|
||||
}
|
||||
|
||||
if ($request->filled('checkout_date')) {
|
||||
|
||||
@@ -151,7 +151,7 @@ class ViewAssetsController extends Controller
|
||||
'requests',
|
||||
'assets' => function ($q) {
|
||||
$q->where('requestable', 1)
|
||||
->whereHas('assetstatus', fn ($s) => $s->where('archived', 0)
|
||||
->whereHas('statuslabel', fn ($s) => $s->where('archived', 0)
|
||||
->where(fn ($s) => $s->where('deployable', 1)->orWhere('pending', 1)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -45,10 +45,16 @@ class AssetsTransformer
|
||||
'model_number' => (($asset->model) && ($asset->model->model_number)) ? e($asset->model->model_number) : null,
|
||||
'eol' => (($asset->asset_eol_date != '') && ($asset->purchase_date != '')) ? (int) Carbon::parse($asset->asset_eol_date)->diffInMonths($asset->purchase_date, true).' months' : null,
|
||||
'asset_eol_date' => ($asset->asset_eol_date != '') ? Helper::getFormattedDateObject($asset->asset_eol_date, 'date') : null,
|
||||
'status_label' => ($asset->assetstatus) ? [
|
||||
'id' => (int) $asset->assetstatus->id,
|
||||
'name' => e($asset->assetstatus->name),
|
||||
'status_type' => e($asset->assetstatus->getStatuslabelType()),
|
||||
'status_label' => ($asset->statuslabel) ? [
|
||||
'id' => (int) $asset->statuslabel->id,
|
||||
'name' => e($asset->statuslabel->name),
|
||||
'status_type' => e($asset->statuslabel->getStatuslabelType()),
|
||||
'status_meta' => e($asset->present()->statusMeta),
|
||||
] : null, // legacy - this will be renamed soon - use statuslabel below
|
||||
'statuslabel' => ($asset->statuslabel) ? [
|
||||
'id' => (int) $asset->statuslabel->id,
|
||||
'name' => e($asset->statuslabel->name),
|
||||
'status_type' => e($asset->statuslabel->getStatuslabelType()),
|
||||
'status_meta' => e($asset->present()->statusMeta),
|
||||
] : null,
|
||||
'category' => (($asset->model) && ($asset->model->category)) ? [
|
||||
@@ -250,7 +256,7 @@ class AssetsTransformer
|
||||
'model_number' => (($asset->model) && ($asset->model->model_number)) ? e($asset->model->model_number) : null,
|
||||
'expected_checkin' => Helper::getFormattedDateObject($asset->expected_checkin, 'date'),
|
||||
'location' => ($asset->location) ? e($asset->location->name) : null,
|
||||
'status' => ($asset->assetstatus) ? $asset->present()->statusMeta : null,
|
||||
'status' => ($asset->statuslabel) ? $asset->present()->statusMeta : null,
|
||||
'assigned_to_self' => ($asset->assigned_to == auth()->id()),
|
||||
];
|
||||
|
||||
|
||||
@@ -88,8 +88,8 @@ class DepreciationReportTransformer
|
||||
'model' => ($asset->model) ? e($asset->model->name) : null,
|
||||
'model_number' => (($asset->model) && ($asset->model->model_number)) ? e($asset->model->model_number) : null,
|
||||
'eol' => ($asset->purchase_date != '') ? Helper::getFormattedDateObject($asset->present()->eol_date(), 'date') : null,
|
||||
'status_label' => ($asset->assetstatus) ? e($asset->assetstatus->name) : null,
|
||||
'status' => ($asset->assetstatus) ? e($asset->present()->statusMeta) : null,
|
||||
'status_label' => ($asset->statuslabel) ? e($asset->statuslabel->name) : null,
|
||||
'status' => ($asset->statuslabel) ? e($asset->present()->statusMeta) : null,
|
||||
'category' => (($asset->model) && ($asset->model->category)) ? e($asset->model->category->name) : null,
|
||||
'manufacturer' => (($asset->model) && ($asset->model->manufacturer)) ? e($asset->model->manufacturer->name) : null,
|
||||
'supplier' => ($asset->supplier) ? e($asset->supplier->name) : null,
|
||||
|
||||
@@ -17,6 +17,7 @@ class MaintenancesTransformer
|
||||
foreach ($maintenances as $assetmaintenance) {
|
||||
$array[] = self::transformMaintenance($assetmaintenance);
|
||||
}
|
||||
|
||||
return (new DatatablesTransformer)->transformDatatables($array, $total);
|
||||
}
|
||||
|
||||
@@ -39,10 +40,10 @@ class MaintenancesTransformer
|
||||
'name' => ($assetmaintenance->asset->model->name) ? e($assetmaintenance->asset->model->name) : null,
|
||||
'model_number' => ($assetmaintenance->asset->model->model_number) ? e($assetmaintenance->asset->model->model_number) : null,
|
||||
] : null,
|
||||
'status_label' => (($assetmaintenance->asset) && ($assetmaintenance->asset->assetstatus)) ? [
|
||||
'id' => (int) $assetmaintenance->asset->assetstatus->id,
|
||||
'name' => e($assetmaintenance->asset->assetstatus->name),
|
||||
'status_type' => e($assetmaintenance->asset->assetstatus->getStatuslabelType()),
|
||||
'status_label' => (($assetmaintenance->asset) && ($assetmaintenance->asset->statuslabel)) ? [
|
||||
'id' => (int) $assetmaintenance->asset->statuslabel->id,
|
||||
'name' => e($assetmaintenance->asset->statuslabel->name),
|
||||
'status_type' => e($assetmaintenance->asset->statuslabel->getStatuslabelType()),
|
||||
'status_meta' => e($assetmaintenance->asset->present()->statusMeta),
|
||||
] : null,
|
||||
'assigned_to' => (new AssetsTransformer)->transformAssignedTo($assetmaintenance->asset),
|
||||
@@ -103,6 +104,7 @@ class MaintenancesTransformer
|
||||
foreach ($maintenances as $assetmaintenance) {
|
||||
$array[] = self::transformMaintenanceForReport($assetmaintenance);
|
||||
}
|
||||
|
||||
return (new DatatablesTransformer)->transformDatatables($array, $total);
|
||||
}
|
||||
|
||||
@@ -113,10 +115,10 @@ class MaintenancesTransformer
|
||||
'asset_name' => ($assetmaintenance->asset->name) ? e($assetmaintenance->asset->name) : null,
|
||||
'asset_tag' => ($assetmaintenance->asset->asset_tag) ? e($assetmaintenance->asset->asset_tag) : null,
|
||||
'serial' => ($assetmaintenance->asset?->serial) ? e($assetmaintenance->asset->serial) : null,
|
||||
'image' => ($assetmaintenance->image != '') ? Storage::disk('public')->url('maintenances/' . e($assetmaintenance->image)) : null,
|
||||
'image' => ($assetmaintenance->image != '') ? Storage::disk('public')->url('maintenances/'.e($assetmaintenance->image)) : null,
|
||||
'model' => ($assetmaintenance->asset?->model?->name) ? e($assetmaintenance->asset?->model?->name) : null,
|
||||
'model_number' => ($assetmaintenance->asset?->model?->model_number) ? e($assetmaintenance->asset?->model?->model_number) : null,
|
||||
'status_label' => ($assetmaintenance->asset?->assetstatus) ? e($assetmaintenance->asset?->assetstatus?->display_name) : null,
|
||||
'status_label' => ($assetmaintenance->asset?->statuslabel) ? e($assetmaintenance->asset?->statuslabel?->display_name) : null,
|
||||
'assigned_to' => ($assetmaintenance->asset?->assigned) ? e($assetmaintenance->asset?->assigned?->display_name) : null,
|
||||
'company' => ($assetmaintenance->asset?->company?->name) ? e($assetmaintenance->asset->company->name) : null,
|
||||
'name' => ($assetmaintenance->name) ? e($assetmaintenance->name) : null,
|
||||
@@ -136,7 +138,7 @@ class MaintenancesTransformer
|
||||
'is_warranty' => (bool) $assetmaintenance->is_warranty,
|
||||
|
||||
];
|
||||
|
||||
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ class CheckinAssetMail extends BaseMailable
|
||||
*/
|
||||
public function content(): Content
|
||||
{
|
||||
$this->item->load('assetstatus');
|
||||
$this->item->load('statuslabel');
|
||||
$fields = [];
|
||||
|
||||
// Check if the item has custom fields associated with it
|
||||
@@ -68,7 +68,7 @@ class CheckinAssetMail extends BaseMailable
|
||||
markdown: 'mail.markdown.checkin-asset',
|
||||
with: [
|
||||
'item' => $this->item,
|
||||
'status' => $this->item->assetstatus?->name,
|
||||
'status' => $this->item->statuslabel?->name,
|
||||
'admin' => $this->admin,
|
||||
'note' => $this->note,
|
||||
'target' => $this->target,
|
||||
|
||||
@@ -71,7 +71,7 @@ class CheckoutAssetMail extends BaseMailable
|
||||
*/
|
||||
public function content(): Content
|
||||
{
|
||||
$this->item->load('assetstatus');
|
||||
$this->item->load('statuslabel');
|
||||
$eula = method_exists($this->item, 'getEula') ? $this->item->getEula() : '';
|
||||
$req_accept = $this->requiresAcceptance();
|
||||
$fields = [];
|
||||
@@ -97,7 +97,7 @@ class CheckoutAssetMail extends BaseMailable
|
||||
with: [
|
||||
'item' => $this->item,
|
||||
'admin' => $this->admin,
|
||||
'status' => $this->item->assetstatus?->name,
|
||||
'status' => $this->item->statuslabel?->name,
|
||||
'note' => $this->note,
|
||||
'target' => $name,
|
||||
'fields' => $fields,
|
||||
@@ -143,7 +143,7 @@ class CheckoutAssetMail extends BaseMailable
|
||||
return trans_choice('mail.new_item_checked_with_acceptance', 1);
|
||||
}
|
||||
|
||||
if ($this->firstTimeSending && !$this->requiresAcceptance()) {
|
||||
if ($this->firstTimeSending && ! $this->requiresAcceptance()) {
|
||||
return trans_choice('mail.new_item_checked', 1);
|
||||
}
|
||||
|
||||
|
||||
+13
-13
@@ -206,7 +206,7 @@ class Asset extends Depreciable
|
||||
* @var array
|
||||
*/
|
||||
protected $searchableRelations = [
|
||||
'assetstatus' => ['name'],
|
||||
'statuslabel' => ['name'],
|
||||
'supplier' => ['name'],
|
||||
'company' => ['name'],
|
||||
'defaultLoc' => ['name'],
|
||||
@@ -456,8 +456,8 @@ class Asset extends Depreciable
|
||||
if ((! $this->assigned_to) && (! $this->deleted_at)) {
|
||||
|
||||
// The asset status is not archived and is deployable
|
||||
if (($this->assetstatus) && ($this->assetstatus->archived == '0')
|
||||
&& ($this->assetstatus->deployable == '1')
|
||||
if (($this->statuslabel) && ($this->statuslabel->archived == '0')
|
||||
&& ($this->statuslabel->deployable == '1')
|
||||
) {
|
||||
return true;
|
||||
|
||||
@@ -473,8 +473,8 @@ class Asset extends Depreciable
|
||||
{
|
||||
|
||||
// This asset is currently assigned to anyone and is not deleted...
|
||||
if (($this->assigned_to != '') && ($this->assetstatus) && ($this->assetstatus->archived == '0')
|
||||
&& ($this->assetstatus->deployable == '1')
|
||||
if (($this->assigned_to != '') && ($this->statuslabel) && ($this->statuslabel->archived == '0')
|
||||
&& ($this->statuslabel->deployable == '1')
|
||||
) {
|
||||
return true;
|
||||
|
||||
@@ -978,7 +978,7 @@ class Asset extends Depreciable
|
||||
*
|
||||
* @return Relation
|
||||
*/
|
||||
public function assetstatus()
|
||||
public function statuslabel()
|
||||
{
|
||||
return $this->belongsTo(Statuslabel::class, 'status_id');
|
||||
}
|
||||
@@ -1416,7 +1416,7 @@ class Asset extends Depreciable
|
||||
public function scopePending($query)
|
||||
{
|
||||
return $query->whereHas(
|
||||
'assetstatus', function ($query) {
|
||||
'statuslabel', function ($query) {
|
||||
$query->where('deployable', '=', 0)
|
||||
->where('pending', '=', 1)
|
||||
->where('archived', '=', 0);
|
||||
@@ -1473,7 +1473,7 @@ class Asset extends Depreciable
|
||||
{
|
||||
return $query->whereNull('assets.assigned_to')
|
||||
->whereHas(
|
||||
'assetstatus', function ($query) {
|
||||
'statuslabel', function ($query) {
|
||||
$query->where('deployable', '=', 1)
|
||||
->where('pending', '=', 0)
|
||||
->where('archived', '=', 0);
|
||||
@@ -1490,7 +1490,7 @@ class Asset extends Depreciable
|
||||
public function scopeUndeployable($query)
|
||||
{
|
||||
return $query->whereHas(
|
||||
'assetstatus', function ($query) {
|
||||
'statuslabel', function ($query) {
|
||||
$query->where('deployable', '=', 0)
|
||||
->where('pending', '=', 0)
|
||||
->where('archived', '=', 0);
|
||||
@@ -1507,7 +1507,7 @@ class Asset extends Depreciable
|
||||
public function scopeNotArchived($query)
|
||||
{
|
||||
return $query->whereHas(
|
||||
'assetstatus', function ($query) {
|
||||
'statuslabel', function ($query) {
|
||||
$query->where('archived', '=', 0);
|
||||
}
|
||||
);
|
||||
@@ -1676,7 +1676,7 @@ class Asset extends Depreciable
|
||||
|
||||
if (Setting::getSettings()->show_archived_in_list != 1) {
|
||||
return $query->whereHas(
|
||||
'assetstatus', function ($query) {
|
||||
'statuslabel', function ($query) {
|
||||
$query->where('archived', '=', 0);
|
||||
}
|
||||
);
|
||||
@@ -1695,7 +1695,7 @@ class Asset extends Depreciable
|
||||
public function scopeArchived($query)
|
||||
{
|
||||
return $query->whereHas(
|
||||
'assetstatus', function ($query) {
|
||||
'statuslabel', function ($query) {
|
||||
$query->where('deployable', '=', 0)
|
||||
->where('pending', '=', 0)
|
||||
->where('archived', '=', 1);
|
||||
@@ -1726,7 +1726,7 @@ class Asset extends Depreciable
|
||||
|
||||
return Company::scopeCompanyables($query->where($table.'.requestable', '=', 1))
|
||||
->whereHas(
|
||||
'assetstatus', function ($query) {
|
||||
'statuslabel', function ($query) {
|
||||
$query->where(
|
||||
function ($query) {
|
||||
$query->where('deployable', '=', 1)
|
||||
|
||||
@@ -172,7 +172,7 @@ class Location extends SnipeModel
|
||||
{
|
||||
return $this->hasMany(Asset::class, 'location_id')
|
||||
->whereHas(
|
||||
'assetstatus', function ($query) {
|
||||
'statuslabel', function ($query) {
|
||||
$query->where('status_labels.deployable', '=', 1)
|
||||
->orWhere('status_labels.pending', '=', 1)
|
||||
->orWhere('status_labels.archived', '=', 0);
|
||||
|
||||
@@ -92,7 +92,7 @@ class Maintenance extends SnipeModel implements ICompanyableChild
|
||||
'asset' => ['name', 'asset_tag', 'serial'],
|
||||
'asset.model' => ['name', 'model_number'],
|
||||
'asset.supplier' => ['name'],
|
||||
'asset.assetstatus' => ['name'],
|
||||
'asset.statuslabel' => ['name'],
|
||||
'supplier' => ['name'],
|
||||
'adminuser' => ['first_name', 'last_name', 'display_name'],
|
||||
];
|
||||
|
||||
@@ -80,7 +80,7 @@ class CheckinAssetNotification extends Notification
|
||||
|
||||
$fields = [
|
||||
trans('general.administrator') => '<'.$admin->present()->viewUrl().'|'.$admin->display_name.'>',
|
||||
trans('general.status') => $item->assetstatus?->name,
|
||||
trans('general.status') => $item->statuslabel?->name,
|
||||
trans('general.location') => ($item->location) ? $item->location->name : '',
|
||||
];
|
||||
|
||||
@@ -118,7 +118,7 @@ class CheckinAssetNotification extends Notification
|
||||
->fact(htmlspecialchars_decode($item->display_name), '', 'activityText')
|
||||
->fact(trans('mail.checked_into'), ($item->location) ? $item->location->name : '')
|
||||
->fact(trans('general.administrator'), $admin->display_name)
|
||||
->fact(trans('admin/hardware/form.status'), $item->assetstatus?->name)
|
||||
->fact(trans('admin/hardware/form.status'), $item->statuslabel?->name)
|
||||
->fact(trans('mail.notes'), $note ?: '');
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ class CheckinAssetNotification extends Notification
|
||||
trans('mail.asset') => htmlspecialchars_decode($item->display_name),
|
||||
trans('mail.checked_into') => ($item->location) ? $item->location->name : '',
|
||||
trans('general.administrator') => $admin->display_name,
|
||||
trans('admin/hardware/form.status') => $item->assetstatus?->name,
|
||||
trans('admin/hardware/form.status') => $item->statuslabel?->name,
|
||||
trans('mail.notes') => $note ?: '',
|
||||
];
|
||||
|
||||
@@ -153,7 +153,7 @@ class CheckinAssetNotification extends Notification
|
||||
KeyValue::create(
|
||||
trans('mail.checked_into') ?: '',
|
||||
($item->location) ? $item->location->name : '',
|
||||
trans('admin/hardware/form.status').': '.$item->assetstatus?->name,
|
||||
trans('admin/hardware/form.status').': '.$item->statuslabel?->name,
|
||||
)
|
||||
->onClick(route('hardware.show', $item->id))
|
||||
)
|
||||
|
||||
@@ -92,7 +92,7 @@ class AssetPresenter extends Presenter
|
||||
'visible' => true,
|
||||
'formatter' => 'categoriesLinkObjFormatter',
|
||||
], [
|
||||
'field' => 'status_label',
|
||||
'field' => 'statuslabel',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'title' => trans('admin/hardware/table.status'),
|
||||
@@ -486,8 +486,8 @@ class AssetPresenter extends Presenter
|
||||
$imageAlt = $this->model->name;
|
||||
}
|
||||
if (! empty($imagePath)) {
|
||||
$url = Storage::disk('public')->url(app('assets_upload_path') . e($imagePath));
|
||||
$imagePath = '<img src="' . $url . '" height="50" width="50" alt="' . e($imageAlt) . '">';
|
||||
$url = Storage::disk('public')->url(app('assets_upload_path').e($imagePath));
|
||||
$imagePath = '<img src="'.$url.'" height="50" width="50" alt="'.e($imageAlt).'">';
|
||||
}
|
||||
|
||||
return $imagePath;
|
||||
@@ -507,7 +507,7 @@ class AssetPresenter extends Presenter
|
||||
$imagePath = $this->model->image;
|
||||
}
|
||||
if (! empty($imagePath)) {
|
||||
return Storage::disk('public')->url(app('assets_upload_path') . e($imagePath));
|
||||
return Storage::disk('public')->url(app('assets_upload_path').e($imagePath));
|
||||
}
|
||||
|
||||
return $imagePath;
|
||||
@@ -596,7 +596,7 @@ class AssetPresenter extends Presenter
|
||||
return 'deployed';
|
||||
}
|
||||
|
||||
return $this->model->assetstatus->getStatuslabelType();
|
||||
return $this->model->statuslabel->getStatuslabelType();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -610,7 +610,7 @@ class AssetPresenter extends Presenter
|
||||
return trans('general.deployed');
|
||||
}
|
||||
|
||||
return $this->model->assetstatus->name;
|
||||
return $this->model->statuslabel->name;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -630,14 +630,14 @@ class AssetPresenter extends Presenter
|
||||
public function fullStatusText()
|
||||
{
|
||||
// Make sure the status is valid
|
||||
if ($this->assetstatus) {
|
||||
if ($this->statuslabel) {
|
||||
|
||||
// If the status is assigned to someone or something...
|
||||
if ($this->model->assigned) {
|
||||
|
||||
// If it's assigned and not set to the default "ready to deploy" status
|
||||
if ($this->assetstatus->name != trans('general.ready_to_deploy')) {
|
||||
return trans('general.deployed').' ('.$this->model->assetstatus->name.')';
|
||||
if ($this->statuslabel->name != trans('general.ready_to_deploy')) {
|
||||
return trans('general.deployed').' ('.$this->model->statuslabel->name.')';
|
||||
}
|
||||
|
||||
// If it's assigned to the default "ready to deploy" status, just
|
||||
@@ -647,7 +647,7 @@ class AssetPresenter extends Presenter
|
||||
}
|
||||
|
||||
// Return just the status name
|
||||
return $this->model->assetstatus->name;
|
||||
return $this->model->statuslabel->name;
|
||||
}
|
||||
|
||||
// This status doesn't seem valid - either data has been manually edited or
|
||||
|
||||
@@ -233,7 +233,7 @@ class DepreciationReportPresenter extends Presenter
|
||||
$imagePath = $this->model->image;
|
||||
}
|
||||
if (! empty($imagePath)) {
|
||||
return Storage::disk('public')->url(app('assets_upload_path') . e($imagePath));
|
||||
return Storage::disk('public')->url(app('assets_upload_path').e($imagePath));
|
||||
}
|
||||
|
||||
return $imagePath;
|
||||
@@ -328,7 +328,7 @@ class DepreciationReportPresenter extends Presenter
|
||||
return 'deployed';
|
||||
}
|
||||
|
||||
return $this->model->assetstatus->getStatuslabelType();
|
||||
return $this->model->statuslabel->getStatuslabelType();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -342,7 +342,7 @@ class DepreciationReportPresenter extends Presenter
|
||||
return trans('general.deployed');
|
||||
}
|
||||
|
||||
return $this->model->assetstatus->name;
|
||||
return $this->model->statuslabel->name;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -362,14 +362,14 @@ class DepreciationReportPresenter extends Presenter
|
||||
public function fullStatusText()
|
||||
{
|
||||
// Make sure the status is valid
|
||||
if ($this->assetstatus) {
|
||||
if ($this->statuslabel) {
|
||||
|
||||
// If the status is assigned to someone or something...
|
||||
if ($this->model->assigned) {
|
||||
|
||||
// If it's assigned and not set to the default "ready to deploy" status
|
||||
if ($this->assetstatus->name != trans('general.ready_to_deploy')) {
|
||||
return trans('general.deployed').' ('.$this->model->assetstatus->name.')';
|
||||
if ($this->statuslabel->name != trans('general.ready_to_deploy')) {
|
||||
return trans('general.deployed').' ('.$this->model->statuslabel->name.')';
|
||||
}
|
||||
|
||||
// If it's assigned to the default "ready to deploy" status, just
|
||||
@@ -379,7 +379,7 @@ class DepreciationReportPresenter extends Presenter
|
||||
}
|
||||
|
||||
// Return just the status name
|
||||
return $this->model->assetstatus->name;
|
||||
return $this->model->statuslabel->name;
|
||||
}
|
||||
|
||||
// This status doesn't seem valid - either data has been manually edited or
|
||||
|
||||
File diff suppressed because one or more lines are too long
Vendored
+4
-4
@@ -52317,7 +52317,7 @@ $(function () {
|
||||
var data = {
|
||||
search: params.term,
|
||||
page: params.page || 1,
|
||||
assetStatusType: link.data("asset-status-type"),
|
||||
statuslabelType: link.data("asset-status-type"),
|
||||
companyId: link.data("company-id")
|
||||
};
|
||||
return data;
|
||||
@@ -52377,9 +52377,9 @@ $(function () {
|
||||
if (e.params.args.originalEvent) isMouseUp = e.params.args.originalEvent.type == "mouseup";
|
||||
if (value && !noForceAjax && !isMouseUp) {
|
||||
var endpoint = element.data("endpoint");
|
||||
var assetStatusType = element.data("asset-status-type");
|
||||
var statuslabelType = element.data("asset-status-type");
|
||||
$.ajax({
|
||||
url: baseUrl + 'api/v1/' + endpoint + '/selectlist?search=' + value + '&page=1' + (assetStatusType ? '&assetStatusType=' + assetStatusType : ''),
|
||||
url: baseUrl + 'api/v1/' + endpoint + '/selectlist?search=' + value + '&page=1' + (statuslabelType ? '&statuslabelType=' + statuslabelType : ''),
|
||||
dataType: 'json',
|
||||
headers: {
|
||||
"X-Requested-With": 'XMLHttpRequest',
|
||||
@@ -52872,7 +52872,7 @@ $(function () {
|
||||
var data = {
|
||||
search: params.term,
|
||||
page: params.page || 1,
|
||||
assetStatusType: link.data("asset-status-type")
|
||||
statuslabelType: link.data("asset-status-type")
|
||||
};
|
||||
return data;
|
||||
},
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"/js/dist/all.js": "/js/dist/all.js?id=4176097fd869edd2d6cb18a71ccb4ff6",
|
||||
"/js/dist/all.js": "/js/dist/all.js?id=5bc41dc9796db17cb4c2683113106a79",
|
||||
"/css/build/overrides.css": "/css/build/overrides.css?id=c173dd71d56c1089bf560a849586d93e",
|
||||
"/css/build/app.css": "/css/build/app.css?id=63ef76491d01db361ad53cf1c8c7114f",
|
||||
"/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=ee0ed88465dd878588ed044eefb67723",
|
||||
|
||||
@@ -209,7 +209,7 @@ $(function () {
|
||||
var data = {
|
||||
search: params.term,
|
||||
page: params.page || 1,
|
||||
assetStatusType: link.data("asset-status-type"),
|
||||
statuslabelType: link.data("asset-status-type"),
|
||||
companyId: link.data("company-id"),
|
||||
};
|
||||
return data;
|
||||
@@ -282,9 +282,9 @@ $(function () {
|
||||
|
||||
if(value && !noForceAjax && !isMouseUp) {
|
||||
var endpoint = element.data("endpoint");
|
||||
var assetStatusType = element.data("asset-status-type");
|
||||
var statuslabelType = element.data("asset-status-type");
|
||||
$.ajax({
|
||||
url: baseUrl + 'api/v1/' + endpoint + '/selectlist?search='+value+'&page=1' + (assetStatusType ? '&assetStatusType='+assetStatusType : ''),
|
||||
url: baseUrl + 'api/v1/' + endpoint + '/selectlist?search=' + value + '&page=1' + (statuslabelType ? '&statuslabelType=' + statuslabelType : ''),
|
||||
dataType: 'json',
|
||||
headers: {
|
||||
"X-Requested-With": 'XMLHttpRequest',
|
||||
|
||||
@@ -70,7 +70,7 @@ $(function () {
|
||||
var data = {
|
||||
search: params.term,
|
||||
page: params.page || 1,
|
||||
assetStatusType: link.data("asset-status-type"),
|
||||
statuslabelType: link.data("asset-status-type"),
|
||||
};
|
||||
return data;
|
||||
},
|
||||
|
||||
@@ -540,7 +540,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<x-icon type="circle-solid" class="text-blue" />
|
||||
{{ $asset->assetstatus?->name }}
|
||||
{{ $asset->statuslabel?->name }}
|
||||
<label class="label label-default">{{ trans('general.deployed') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@@ -2,25 +2,25 @@
|
||||
'infoObject',
|
||||
])
|
||||
|
||||
@if (($infoObject) && ($infoObject->assetstatus))
|
||||
@if (($infoObject) && ($infoObject->statuslabel))
|
||||
|
||||
@if (($infoObject->assignedTo) && ($infoObject->deleted_at==''))
|
||||
<x-icon type="circle-solid" class="text-blue"/>
|
||||
{{ $infoObject->assetstatus->name }}
|
||||
{{ $infoObject->statuslabel->name }}
|
||||
<label class="label label-default">{{ trans('general.deployed') }}</label>
|
||||
<x-icon type="long-arrow-right"/>
|
||||
<x-icon type="{{ $infoObject->assignedType() }}" class="fa-fw"/>
|
||||
{!! $infoObject->assignedTo->present()->nameUrl() !!}
|
||||
@else
|
||||
@if (($infoObject->assetstatus) && ($infoObject->assetstatus->deployable=='1'))
|
||||
@if (($infoObject->statuslabel) && ($infoObject->statuslabel->deployable=='1'))
|
||||
<x-icon type="circle-solid" class="text-green"/>
|
||||
@elseif (($infoObject->assetstatus) && ($infoObject->assetstatus->pending=='1'))
|
||||
@elseif (($infoObject->statuslabel) && ($infoObject->statuslabel->pending=='1'))
|
||||
<x-icon type="circle-solid" class="text-orange"/>
|
||||
@else
|
||||
<x-icon type="x" class="text-red"/>
|
||||
@endif
|
||||
<a href="{{ route('statuslabels.show', $infoObject->assetstatus->id) }}">
|
||||
{{ $infoObject->assetstatus->name }}</a>
|
||||
<a href="{{ route('statuslabels.show', $infoObject->statuslabel->id) }}">
|
||||
{{ $infoObject->statuslabel->name }}</a>
|
||||
<label class="label label-default">{{ $infoObject->present()->statusMeta }}</label>
|
||||
|
||||
@endif
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
|
||||
@foreach ($assets as $asset)
|
||||
@php
|
||||
if($snipeSettings->show_archived_in_list != 1 && $asset->assetstatus?->archived == 1){
|
||||
if($snipeSettings->show_archived_in_list != 1 && $asset->statuslabel?->archived == 1){
|
||||
continue;
|
||||
}
|
||||
@endphp
|
||||
@@ -227,7 +227,7 @@
|
||||
|
||||
@foreach ($assignedAssets as $asset)
|
||||
@php
|
||||
if($snipeSettings->show_archived_in_list != 1 && $asset->assetstatus?->archived == 1){
|
||||
if($snipeSettings->show_archived_in_list != 1 && $asset->statuslabel?->archived == 1){
|
||||
continue;
|
||||
}
|
||||
@endphp
|
||||
|
||||
@@ -50,8 +50,8 @@
|
||||
@if ((isset($asset->model?->model_number)))
|
||||
| **{{ trans('general.model_no') }}** | {{ $asset->model->model_number }} |
|
||||
@endif
|
||||
@if (isset($asset->assetstatus))
|
||||
| **{{ trans('general.status') }}** | {{ $asset->assetstatus->name }} |
|
||||
@if (isset($asset->statuslabel))
|
||||
| **{{ trans('general.status') }}** | {{ $asset->statuslabel->name }} |
|
||||
@endif
|
||||
@if($asset->fields)
|
||||
@foreach($asset->fields as $field)
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
@if ((isset($item->name)) && ($item->name!=''))
|
||||
| **{{ trans('mail.asset_name') }}** | {{ $item->name }} |
|
||||
@endif
|
||||
@if (isset($item->assetstatus))
|
||||
| **{{ trans('general.status') }}** | {{ $item->assetstatus->name }}
|
||||
@if (isset($item->statuslabel))
|
||||
| **{{ trans('general.status') }}** | {{ $item->statuslabel->name }}
|
||||
@endif
|
||||
@if ($item->assignedTo)
|
||||
| **{{ trans('general.checked_out_to') }}** | {!! $item->assignedTo->present()->nameUrl() !!} ({{ $item->present()->statusMeta }})
|
||||
|
||||
@@ -340,7 +340,7 @@
|
||||
<option value="model.category.name">{{trans('admin/categories/general.category_name')}}</option>
|
||||
</optgroup>
|
||||
<optgroup label="{{trans('general.status')}}">
|
||||
<option value="assetstatus.name">{{trans('admin/statuslabels/table.name')}}</option>
|
||||
<option value="statuslabel.name">{{trans('admin/statuslabels/table.name')}}</option>
|
||||
</optgroup>
|
||||
<optgroup label="{{trans('general.supplier')}}">
|
||||
<option value="supplier.name">{{trans('admin/suppliers/table.name')}}</option>
|
||||
|
||||
@@ -80,7 +80,7 @@ class StoreAssetTest extends TestCase
|
||||
$this->assertEquals('1', $asset->requestable);
|
||||
$this->assertTrue($asset->defaultLoc->is($rtdLocation));
|
||||
$this->assertEquals('1234567890', $asset->serial);
|
||||
$this->assertTrue($asset->assetstatus->is($status));
|
||||
$this->assertTrue($asset->statuslabel->is($status));
|
||||
$this->assertTrue($asset->supplier->is($supplier));
|
||||
$this->assertEquals(10, $asset->warranty_months);
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ class UpdateAssetTest extends TestCase
|
||||
$this->assertEquals('1', $updatedAsset->requestable);
|
||||
$this->assertTrue($updatedAsset->defaultLoc->is($rtdLocation));
|
||||
$this->assertEquals('1234567890', $updatedAsset->serial);
|
||||
$this->assertTrue($updatedAsset->assetstatus->is($status));
|
||||
$this->assertTrue($updatedAsset->statuslabel->is($status));
|
||||
$this->assertTrue($updatedAsset->supplier->is($supplier));
|
||||
$this->assertEquals(10, $updatedAsset->warranty_months);
|
||||
// $this->assertEquals('2023-09-03 00:00:00', $updatedAsset->last_audit_date->format('Y-m-d H:i:s'));
|
||||
|
||||
@@ -192,7 +192,7 @@ class AssetCheckoutTest extends TestCase
|
||||
$asset->refresh();
|
||||
$this->assertTrue($asset->assignedTo()->is($target));
|
||||
$this->assertEquals('Changed Name', $asset->name);
|
||||
$this->assertTrue($asset->assetstatus->is($newStatus));
|
||||
$this->assertTrue($asset->statuslabel->is($newStatus));
|
||||
$this->assertEquals('2024-04-01 00:00:00', $asset->last_checkout);
|
||||
$this->assertEquals('2024-04-08 00:00:00', (string) $asset->expected_checkin);
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ class AssetCheckoutTest extends TestCase
|
||||
$this->assertTrue($asset->assignedTo()->is($target));
|
||||
$this->assertTrue($asset->location->is($expectedLocation));
|
||||
$this->assertEquals('Changed Name', $asset->name);
|
||||
$this->assertTrue($asset->assetstatus->is($newStatus));
|
||||
$this->assertTrue($asset->statuslabel->is($newStatus));
|
||||
$this->assertEquals('2024-03-18 00:00:00', $asset->last_checkout);
|
||||
$this->assertEquals('2024-03-28 00:00:00', (string) $asset->expected_checkin);
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ class ImportAssetsTest extends ImportDataTestCase implements TestsPermissionsReq
|
||||
]);
|
||||
|
||||
$newAsset = Asset::query()
|
||||
->with(['location', 'supplier', 'company', 'assignedAssets', 'defaultLoc', 'assetStatus', 'model.category', 'model.manufacturer'])
|
||||
->with(['location', 'supplier', 'company', 'assignedAssets', 'defaultLoc', 'statuslabel', 'model.category', 'model.manufacturer'])
|
||||
->where('serial', $row['serialNumber'])
|
||||
->sole();
|
||||
|
||||
@@ -112,7 +112,7 @@ class ImportAssetsTest extends ImportDataTestCase implements TestsPermissionsReq
|
||||
$this->assertEquals('', $newAsset->image);
|
||||
$this->assertNull($newAsset->user_id);
|
||||
$this->assertEquals(1, $newAsset->physical);
|
||||
$this->assertEquals($row['status'], $newAsset->assetStatus->name);
|
||||
$this->assertEquals($row['status'], $newAsset->statuslabel->name);
|
||||
$this->assertEquals(0, $newAsset->archived);
|
||||
$this->assertEquals($row['warrantyInMonths'], $newAsset->warranty_months);
|
||||
$this->assertNull($newAsset->deprecate);
|
||||
@@ -296,11 +296,11 @@ class ImportAssetsTest extends ImportDataTestCase implements TestsPermissionsReq
|
||||
$this->importFileResponse(['import' => $import->id])->assertOk();
|
||||
|
||||
$newAsset = Asset::query()
|
||||
->with(['assetStatus'])
|
||||
->with(['statuslabel'])
|
||||
->where('serial', $importFileBuilder->firstRow()['serialNumber'])
|
||||
->sole();
|
||||
|
||||
$this->assertEquals('Ready to Deploy', $newAsset->assetStatus->name);
|
||||
$this->assertEquals('Ready to Deploy', $newAsset->statuslabel->name);
|
||||
$this->assertNull($newAsset->purchase_date);
|
||||
$this->assertNull($newAsset->purchase_cost);
|
||||
}
|
||||
@@ -385,7 +385,7 @@ class ImportAssetsTest extends ImportDataTestCase implements TestsPermissionsReq
|
||||
$this->importFileResponse(['import' => $import->id, 'import-update' => true])->assertOk();
|
||||
|
||||
$updatedAsset = Asset::query()
|
||||
->with(['location', 'supplier', 'company', 'defaultLoc', 'assetStatus', 'model.category', 'model.manufacturer'])
|
||||
->with(['location', 'supplier', 'company', 'defaultLoc', 'statuslabel', 'model.category', 'model.manufacturer'])
|
||||
->find($asset->id);
|
||||
|
||||
$assignee = User::query()->find($updatedAsset->assigned_to, ['id', 'first_name', 'last_name', 'email', 'username']);
|
||||
@@ -409,7 +409,7 @@ class ImportAssetsTest extends ImportDataTestCase implements TestsPermissionsReq
|
||||
$this->assertEquals($row['modelNumber'], $updatedAsset->model->model_number);
|
||||
$this->assertEquals($row['purchaseDate'], $updatedAsset->purchase_date->toDateString());
|
||||
$this->assertEquals($row['purchaseCost'], $updatedAsset->purchase_cost);
|
||||
$this->assertEquals($row['status'], $updatedAsset->assetStatus->name);
|
||||
$this->assertEquals($row['status'], $updatedAsset->statuslabel->name);
|
||||
$this->assertEquals($row['warrantyInMonths'], $updatedAsset->warranty_months);
|
||||
$this->assertEquals($row['supplierName'], $updatedAsset->supplier->name);
|
||||
$this->assertEquals($row['location'], $updatedAsset->defaultLoc->name);
|
||||
@@ -482,7 +482,7 @@ class ImportAssetsTest extends ImportDataTestCase implements TestsPermissionsReq
|
||||
])->assertOk();
|
||||
|
||||
$asset = Asset::query()
|
||||
->with(['location', 'supplier', 'company', 'assignedAssets', 'defaultLoc', 'assetStatus', 'model.category', 'model.manufacturer'])
|
||||
->with(['location', 'supplier', 'company', 'assignedAssets', 'defaultLoc', 'statuslabel', 'model.category', 'model.manufacturer'])
|
||||
->where('serial', $row['assigneeUsername'])
|
||||
->sole();
|
||||
|
||||
@@ -500,7 +500,7 @@ class ImportAssetsTest extends ImportDataTestCase implements TestsPermissionsReq
|
||||
$this->assertEquals($row['itemName'], $asset->model->model_number);
|
||||
$this->assertEquals($row['supplierName'], $asset->purchase_date->toDateString());
|
||||
$this->assertEquals($row['companyName'], $asset->purchase_cost);
|
||||
$this->assertEquals($row['manufacturerName'], $asset->assetStatus->name);
|
||||
$this->assertEquals($row['manufacturerName'], $asset->statuslabel->name);
|
||||
$this->assertEquals($row['status'], $asset->warranty_months);
|
||||
$this->assertEquals($row['assigneeFullName'], $asset->supplier->name);
|
||||
$this->assertEquals($row['category'], $asset->defaultLoc->name);
|
||||
|
||||
Reference in New Issue
Block a user