<?php

namespace App\Services\AssetHistoryDescriptions;

class HistoryForLocation
{

	function description($status,$data,$asset,$comments=null)
    {	
        $locationSet = $status;
        $newLocationSet = $asset;
 	    if ($locationSet->status == 0)
            $oldStatus = 'Inactive';
        else
            $oldStatus = 'Active';
        if (request('status') == 0)
            $newStatus = 'Inactive';
        else
            $newStatus = 'Active';
        $descriptionString = '';
        
        if ($locationSet->status != request('status')) {
            $descriptionString .= __('history.AttributeUpdated', [
                                'attributeName' => 'Status',
                                'oldValue'      => $oldStatus,
                                'newValue'      => $newStatus,
                              ]);
        }
        return $descriptionString;
    }

}

