Compare commits
87 Commits
v3.5.0-bet
...
v3.5.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f30631efb6 | ||
|
|
f156ec58b6 | ||
|
|
f9a06a183e | ||
|
|
da0b6d4d90 | ||
|
|
40befa7b37 | ||
|
|
66585bcc40 | ||
|
|
d57135c81b | ||
|
|
f976f440ef | ||
|
|
0728a991a8 | ||
|
|
33a0c2087a | ||
|
|
59ce46dce7 | ||
|
|
2dbd1089f5 | ||
|
|
85f3cc1762 | ||
|
|
1793461642 | ||
|
|
d24c4b1152 | ||
|
|
30f0f6f527 | ||
|
|
b839741069 | ||
|
|
d7434797ec | ||
|
|
85af8e46e3 | ||
|
|
0a0006c68c | ||
|
|
e85241af6a | ||
|
|
219ef23126 | ||
|
|
31898d0f85 | ||
|
|
1e82058f4d | ||
|
|
b3329135df | ||
|
|
2350c1c15c | ||
|
|
8f4e016c01 | ||
|
|
8e60767c00 | ||
|
|
2e0a7abbe9 | ||
|
|
4b6ba6cb30 | ||
|
|
fe5e813970 | ||
|
|
d6f7e03431 | ||
|
|
87f50dfd10 | ||
|
|
85ddb9cfff | ||
|
|
c6338d6a8b | ||
|
|
b92d26f3c4 | ||
|
|
2a95a95e00 | ||
|
|
b41883c125 | ||
|
|
0a218a37d0 | ||
|
|
7ca7877740 | ||
|
|
1394424760 | ||
|
|
fc07753a5c | ||
|
|
7bbe85801e | ||
|
|
8774927b91 | ||
|
|
8cb4954f8a | ||
|
|
48b52a0ccc | ||
|
|
9ecb0e6ca1 | ||
|
|
9091385182 | ||
|
|
b90c0de822 | ||
|
|
ee2522571c | ||
|
|
d3a13bcd45 | ||
|
|
67f199b09d | ||
|
|
f1c458185d | ||
|
|
ed22ec4b36 | ||
|
|
fa72e64b98 | ||
|
|
2a8ab06ca3 | ||
|
|
61d07bdc7c | ||
|
|
3061ce2983 | ||
|
|
e9f3d622f5 | ||
|
|
1e3244b2b3 | ||
|
|
a92bfe8ade | ||
|
|
c42dfadd17 | ||
|
|
0a391de09f | ||
|
|
b6cc7e7c14 | ||
|
|
819ca2921b | ||
|
|
7d272e3c96 | ||
|
|
40f00665b3 | ||
|
|
03ee6b8f91 | ||
|
|
937192f7ce | ||
|
|
ce1f62b9be | ||
|
|
3208522dd1 | ||
|
|
c3cd329604 | ||
|
|
2ba4986396 | ||
|
|
8ba19632cf | ||
|
|
caf6a10227 | ||
|
|
580091269d | ||
|
|
bcc6ca5180 | ||
|
|
7fdd4fbe98 | ||
|
|
aecef2618f | ||
|
|
bd5e6d8551 | ||
|
|
1e4e9dd3d7 | ||
|
|
2ab91fed01 | ||
|
|
5b0220ac1e | ||
|
|
aa92b93bd1 | ||
|
|
d3d36315d3 | ||
|
|
04898c49b2 | ||
|
|
eeff305b02 |
@@ -31,6 +31,8 @@ MAIL_PASSWORD=YOURPASSWORD
|
||||
MAIL_ENCRYPTION=null
|
||||
MAIL_FROM_ADDR=you@example.com
|
||||
MAIL_FROM_NAME='Snipe-IT'
|
||||
MAIL_REPLYTO_ADDR=you@example.com
|
||||
MAIL_REPLYTO_NAME='Snipe-IT'
|
||||
|
||||
|
||||
# --------------------------------------------
|
||||
|
||||
@@ -322,7 +322,9 @@ class ObjectImportCommand extends Command
|
||||
|
||||
$asset_model_name = $this->array_smart_fetch($row, "model name");
|
||||
$asset_modelno = $this->array_smart_fetch($row, "model number");
|
||||
if (empty($asset_model_name)) {
|
||||
if ((empty($asset_model_name)) && (!empty($asset_modelno))) {
|
||||
$asset_model_name = $asset_modelno;
|
||||
} elseif ((empty($asset_model_name)) && (empty($asset_modelno))) {
|
||||
$asset_model_name ='Unknown';
|
||||
}
|
||||
if (empty($asset_modelno)) {
|
||||
@@ -856,6 +858,7 @@ class ObjectImportCommand extends Command
|
||||
if (!$this->option('testrun')) {
|
||||
|
||||
if ($asset->save()) {
|
||||
$asset->logCreate('Imported using csv importer');
|
||||
$this->log('Asset ' . $item["item_name"] . ' with serial number ' . $asset_serial . ' was created');
|
||||
} else {
|
||||
$this->jsonError('Asset', $asset->getErrors());
|
||||
@@ -941,6 +944,7 @@ class ObjectImportCommand extends Command
|
||||
|
||||
if (!$this->option('testrun')) {
|
||||
if ($accessory->save()) {
|
||||
$accessory->logCreate('Imported using CSV Importer');
|
||||
$this->log('Accessory ' . $item["item_name"] . ' was created');
|
||||
// $this->comment('Accessory ' . $item["item_name"] . ' was created');
|
||||
|
||||
@@ -1025,6 +1029,7 @@ class ObjectImportCommand extends Command
|
||||
if (!$this->option("testrun")) {
|
||||
// dd($consumable);
|
||||
if ($consumable->save()) {
|
||||
$consumable->logCreate('Imported using CSV Importer');
|
||||
$this->log("Consumable " . $item["item_name"] . ' was created');
|
||||
// $this->comment("Consumable " . $item["item_name"] . ' was created');
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ class SendExpirationAlerts extends Command
|
||||
$asset_data['email_content'] .= '<td><a href="'.config('app.url').'/hardware/'.e($asset->id).'/view">';
|
||||
$asset_data['email_content'] .= $asset->showAssetName().'</a></td><td>'.e($asset->asset_tag).'</td>';
|
||||
$asset_data['email_content'] .= '<td>'.e($asset->warrantee_expires()).'</td>';
|
||||
$asset_data['email_content'] .= '<td>'.$difference.' days</td>';
|
||||
$asset_data['email_content'] .= '<td>'.$difference.' '.trans('mail.days').'</td>';
|
||||
$asset_data['email_content'] .= '<td>'.($asset->supplier ? e($asset->supplier->name) : '').'</td>';
|
||||
$asset_data['email_content'] .= '<td>'.($asset->assigneduser ? e($asset->assigneduser->fullName()) : '').'</td>';
|
||||
$asset_data['email_content'] .= '</tr>';
|
||||
@@ -100,17 +100,21 @@ class SendExpirationAlerts extends Command
|
||||
|
||||
|
||||
if (count($expiring_assets) > 0) {
|
||||
$this->info('Report sent to '.Setting::getSettings()->alert_email);
|
||||
\Mail::send('emails.expiring-assets-report', $asset_data, function ($m) {
|
||||
$m->to(explode(',', Setting::getSettings()->alert_email), Setting::getSettings()->site_name);
|
||||
$m->subject('Expiring Assets Report');
|
||||
$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));
|
||||
$m->subject(trans('mail.Expiring_Assets_Report'));
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
if (count($expiring_licenses) > 0) {
|
||||
$this->info('Report sent to '.Setting::getSettings()->alert_email);
|
||||
\Mail::send('emails.expiring-licenses-report', $license_data, function ($m) {
|
||||
$m->to(explode(',', Setting::getSettings()->alert_email), Setting::getSettings()->site_name);
|
||||
$m->subject('Expiring Licenses Report');
|
||||
$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));
|
||||
$m->subject(trans('mail.Expiring_Licenses_Report'));
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -50,7 +50,8 @@ class SendInventoryAlerts extends Command
|
||||
if (count($data['data']) > 0) {
|
||||
\Mail::send('emails.low-inventory', $data, function ($m) {
|
||||
$m->to(explode(',', Setting::getSettings()->alert_email), Setting::getSettings()->site_name);
|
||||
$m->subject('Low Inventory Report');
|
||||
$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));
|
||||
$m->subject(trans('mail.Low_Inventory_Report'));
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -20,15 +20,17 @@ use App\Models\Asset;
|
||||
use Crypt;
|
||||
use Illuminate\Contracts\Encryption\DecryptException;
|
||||
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
class Helper
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* Simple helper to invoke the markdown parser
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v2.0]
|
||||
* @return String
|
||||
*/
|
||||
public static function parseEscapedMarkedown($str) {
|
||||
$Parsedown = new \Parsedown();
|
||||
|
||||
@@ -38,17 +40,17 @@ class Helper
|
||||
}
|
||||
|
||||
|
||||
// This doesn't do anything yet
|
||||
public static function parseEmailList($emails)
|
||||
{
|
||||
$emails_array = explode(',', $emails);
|
||||
return array_walk($emails_array, 'trim_value');
|
||||
}
|
||||
|
||||
/**
|
||||
* The importer has formatted number strings since v3,
|
||||
* so the value might be a string, or an integer.
|
||||
* If it's a number, format it as a string.
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v2.0]
|
||||
* @return String
|
||||
*/
|
||||
public static function formatCurrencyOutput($cost)
|
||||
{
|
||||
// The importer has formatted number strings since v3, so the value might be a string, or an integer.
|
||||
// If it's a number, format it as a string
|
||||
if (is_numeric($cost)) {
|
||||
return number_format($cost, 2, '.', '');
|
||||
}
|
||||
@@ -56,13 +58,15 @@ class Helper
|
||||
return $cost;
|
||||
}
|
||||
|
||||
// This doesn't do anything yet
|
||||
public static function trim_value(&$value)
|
||||
{
|
||||
return trim($value);
|
||||
}
|
||||
|
||||
// Static colors for pie charts
|
||||
/**
|
||||
* Static colors for pie charts.
|
||||
* This is inelegant, and could be refactored later.
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v3.3]
|
||||
* @return Array
|
||||
*/
|
||||
public static function chartColors()
|
||||
{
|
||||
$colors = [
|
||||
@@ -80,8 +84,15 @@ class Helper
|
||||
return $colors;
|
||||
}
|
||||
|
||||
// Static background (highlight) colors for pie charts
|
||||
// This is not currently used, but might be in the near future.
|
||||
|
||||
/**
|
||||
* Static background (highlight) colors for pie charts
|
||||
* This is inelegant, and could be refactored later.
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v3.2]
|
||||
* @return Array
|
||||
*/
|
||||
public static function chartBackgroundColors()
|
||||
{
|
||||
$colors = [
|
||||
@@ -100,10 +111,15 @@ class Helper
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Format currency using comma for thousands until local info is property used.
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v2.7]
|
||||
* @return String
|
||||
*/
|
||||
public static function ParseFloat($floatString)
|
||||
{
|
||||
// use comma for thousands until local info is property used
|
||||
$LocaleInfo = localeconv();
|
||||
$floatString = str_replace(",", "", $floatString);
|
||||
$floatString = str_replace($LocaleInfo["decimal_point"], ".", $floatString);
|
||||
@@ -111,6 +127,13 @@ class Helper
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the list of models in an array to make a dropdown menu
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v2.5]
|
||||
* @return Array
|
||||
*/
|
||||
public static function modelList()
|
||||
{
|
||||
$models = AssetModel::with('manufacturer')->get();
|
||||
@@ -121,6 +144,13 @@ class Helper
|
||||
return $model_array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of companies in an array to make a dropdown menu
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v2.5]
|
||||
* @return Array
|
||||
*/
|
||||
public static function companyList()
|
||||
{
|
||||
$company_list = array('0' => trans('general.select_company')) + DB::table('companies')
|
||||
@@ -130,6 +160,13 @@ class Helper
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the list of categories in an array to make a dropdown menu
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v2.5]
|
||||
* @return Array
|
||||
*/
|
||||
public static function categoryList($category_type = null)
|
||||
{
|
||||
$categories = Category::orderBy('name', 'asc')
|
||||
@@ -141,6 +178,13 @@ class Helper
|
||||
return $category_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of suppliers in an array to make a dropdown menu
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v2.5]
|
||||
* @return Array
|
||||
*/
|
||||
public static function suppliersList()
|
||||
{
|
||||
$supplier_list = array('' => trans('general.select_supplier')) + Supplier::orderBy('name', 'asc')
|
||||
@@ -149,6 +193,14 @@ class Helper
|
||||
return $supplier_list;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the list of status labels in an array to make a dropdown menu
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v2.5]
|
||||
* @return Array
|
||||
*/
|
||||
public static function statusLabelList()
|
||||
{
|
||||
$statuslabel_list = array('' => trans('general.select_statuslabel')) + Statuslabel::orderBy('name', 'asc')
|
||||
@@ -156,6 +208,14 @@ class Helper
|
||||
return $statuslabel_list;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the list of locations in an array to make a dropdown menu
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v2.5]
|
||||
* @return Array
|
||||
*/
|
||||
public static function locationsList()
|
||||
{
|
||||
$location_list = array('' => trans('general.select_location')) + Location::orderBy('name', 'asc')
|
||||
@@ -163,6 +223,14 @@ class Helper
|
||||
return $location_list;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the list of manufacturers in an array to make a dropdown menu
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v2.5]
|
||||
* @return Array
|
||||
*/
|
||||
public static function manufacturerList()
|
||||
{
|
||||
$manufacturer_list = array('' => trans('general.select_manufacturer')) +
|
||||
@@ -171,12 +239,26 @@ class Helper
|
||||
return $manufacturer_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of status label types in an array to make a dropdown menu
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v2.5]
|
||||
* @return Array
|
||||
*/
|
||||
public static function statusTypeList()
|
||||
{
|
||||
$statuslabel_types = array('' => trans('admin/hardware/form.select_statustype')) + array('undeployable' => trans('admin/hardware/general.undeployable')) + array('pending' => trans('admin/hardware/general.pending')) + array('archived' => trans('admin/hardware/general.archived')) + array('deployable' => trans('admin/hardware/general.deployable'));
|
||||
return $statuslabel_types;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of managers in an array to make a dropdown menu
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v2.5]
|
||||
* @return Array
|
||||
*/
|
||||
public static function managerList()
|
||||
{
|
||||
$manager_list = array('' => trans('general.select_user')) +
|
||||
@@ -188,6 +270,13 @@ class Helper
|
||||
return $manager_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of depreciations in an array to make a dropdown menu
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v2.5]
|
||||
* @return Array
|
||||
*/
|
||||
public static function depreciationList()
|
||||
{
|
||||
$depreciation_list = ['' => 'Do Not Depreciate'] + Depreciation::orderBy('name', 'asc')
|
||||
@@ -195,16 +284,30 @@ class Helper
|
||||
return $depreciation_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of category types in an array to make a dropdown menu
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v2.5]
|
||||
* @return Array
|
||||
*/
|
||||
public static function categoryTypeList()
|
||||
{
|
||||
$category_types = array('' => '','accessory' => 'Accessory', 'asset' => 'Asset', 'consumable' => 'Consumable','component' => 'Component');
|
||||
return $category_types;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of users in an array to make a dropdown menu
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v2.5]
|
||||
* @return Array
|
||||
*/
|
||||
public static function usersList()
|
||||
{
|
||||
$users_list = array( '' => trans('general.select_user')) +
|
||||
User::where('deleted_at', '=', null)
|
||||
Company::scopeCompanyables(User::where('deleted_at', '=', null))
|
||||
->where('show_in_list','=',1)
|
||||
->orderBy('last_name', 'asc')
|
||||
->orderBy('first_name', 'asc')->get()
|
||||
@@ -213,6 +316,13 @@ class Helper
|
||||
return $users_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of assets in an array to make a dropdown menu
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v2.5]
|
||||
* @return Array
|
||||
*/
|
||||
public static function assetsList()
|
||||
{
|
||||
$assets_list = array('' => trans('general.select_asset')) + Asset::orderBy('name', 'asc')
|
||||
@@ -221,20 +331,40 @@ class Helper
|
||||
return $assets_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the detailed list of assets in an array to make a dropdown menu
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v2.5]
|
||||
* @return Array
|
||||
*/
|
||||
public static function detailedAssetList()
|
||||
{
|
||||
|
||||
$assets = array('' => trans('general.select_asset')) + Company::scopeCompanyables(Asset::all(), 'assets.company_id')->lists('detailed_name', 'id')->toArray();
|
||||
$assets = array('' => trans('general.select_asset')) + Company::scopeCompanyables(Asset::with('assignedUser', 'model'), 'assets.company_id')->get()->lists('detailed_name', 'id')->toArray();
|
||||
return $assets;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the list of custom fields in an array to make a dropdown menu
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v2.5]
|
||||
* @return Array
|
||||
*/
|
||||
public static function customFieldsetList()
|
||||
{
|
||||
$customfields = array('' => trans('admin/models/general.no_custom_field')) + CustomFieldset::pluck('name', 'id')->toArray();
|
||||
return $customfields;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of custom field formats in an array to make a dropdown menu
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v3.4]
|
||||
* @return Array
|
||||
*/
|
||||
public static function predefined_formats()
|
||||
{
|
||||
$keys=array_keys(CustomField::$PredefinedFormats);
|
||||
@@ -242,6 +372,13 @@ class Helper
|
||||
return $stuff+["" => trans('admin/custom_fields/general.custom_format')];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of barcode dimensions
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v3.3]
|
||||
* @return Array
|
||||
*/
|
||||
public static function barcodeDimensions($barcode_type = 'QRCODE')
|
||||
{
|
||||
if ($barcode_type == 'C128') {
|
||||
@@ -257,6 +394,13 @@ class Helper
|
||||
return $size;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a random string
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v3.0]
|
||||
* @return Array
|
||||
*/
|
||||
public static function generateRandomString($length = 10)
|
||||
{
|
||||
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
@@ -268,10 +412,15 @@ class Helper
|
||||
return $randomString;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This nasty little method gets the low inventory info for the
|
||||
* alert dropdown
|
||||
**/
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v3.0]
|
||||
* @return Array
|
||||
*/
|
||||
public static function checkLowInventory()
|
||||
{
|
||||
$consumables = Consumable::with('users')->whereNotNull('min_amt')->get();
|
||||
@@ -352,9 +501,16 @@ class Helper
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if the file is an image, so we can show a preview
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v3.0]
|
||||
* @param File $file
|
||||
* @return String | Boolean
|
||||
*/
|
||||
public static function checkUploadIsImage($file)
|
||||
{
|
||||
// Check if the file is an image, so we can show a preview
|
||||
$finfo = @finfo_open(FILEINFO_MIME_TYPE); // return mime type ala mimetype extension
|
||||
$filetype = @finfo_file($finfo, $file);
|
||||
finfo_close($finfo);
|
||||
@@ -478,6 +634,18 @@ class Helper
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gracefully handle decrypting the legacy data (encrypted via mcrypt) and use the new
|
||||
* decryption method instead.
|
||||
*
|
||||
* This is not currently used, but will be.
|
||||
*
|
||||
* @author A. Gianotto
|
||||
* @since 3.6
|
||||
* @param CustomField $field
|
||||
* @param String $string
|
||||
* @return string
|
||||
*/
|
||||
public static function gracefulDecrypt(CustomField $field, $string) {
|
||||
|
||||
if ($field->isFieldDecryptable($string)) {
|
||||
@@ -495,4 +663,26 @@ class Helper
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Strip HTML out of returned JSON. This is pretty gross, and I'd like to find a better way
|
||||
* to handle this, but the REST API will solve some of these problems anyway.
|
||||
*
|
||||
* This is not currently used, but will be.
|
||||
*
|
||||
* @author A. Gianotto
|
||||
* @since 3.4
|
||||
* @param $array array
|
||||
* @return Array
|
||||
*/
|
||||
public static function stripTagsFromJSON(Array $array) {
|
||||
|
||||
foreach ($array as $key => $value) {
|
||||
$clean_value = strip_tags($value);
|
||||
$clean_array[$key] = $clean_value;
|
||||
}
|
||||
return $clean_array;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ class AccessoriesController extends Controller
|
||||
if (e(Input::get('purchase_cost')) == '0.00') {
|
||||
$accessory->purchase_cost = null;
|
||||
} else {
|
||||
$accessory->purchase_cost = e(Input::get('purchase_cost'));
|
||||
$accessory->purchase_cost = Helper::ParseFloat(e(Input::get('purchase_cost')));
|
||||
}
|
||||
|
||||
$accessory->qty = e(Input::get('qty'));
|
||||
@@ -100,6 +100,7 @@ class AccessoriesController extends Controller
|
||||
|
||||
// Was the accessory created?
|
||||
if ($accessory->save()) {
|
||||
$accessory->logCreate();
|
||||
// Redirect to the new accessory page
|
||||
return redirect()->to("admin/accessories")->with('success', trans('admin/accessories/message.create.success'));
|
||||
}
|
||||
@@ -365,7 +366,8 @@ class AccessoriesController extends Controller
|
||||
|
||||
Mail::send('emails.accept-accessory', $data, function ($m) use ($user) {
|
||||
$m->to($user->email, $user->first_name . ' ' . $user->last_name);
|
||||
$m->subject('Confirm accessory delivery');
|
||||
$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));
|
||||
$m->subject(trans('mail.Confirm_accessory_delivery'));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -483,7 +485,8 @@ class AccessoriesController extends Controller
|
||||
|
||||
Mail::send('emails.checkin-asset', $data, function ($m) use ($user) {
|
||||
$m->to($user->email, $user->first_name . ' ' . $user->last_name);
|
||||
$m->subject('Confirm Accessory Checkin');
|
||||
$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));
|
||||
$m->subject(trans('mail.Confirm_Accessory_Checkin'));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ class AssetMaintenancesController extends Controller
|
||||
'completion_date' => $maintenance->completion_date,
|
||||
'user_id' => ($maintenance->admin) ? (string)link_to('/admin/users/'.$maintenance->admin->id.'/view', $maintenance->admin->fullName()) : '',
|
||||
'actions' => $actions,
|
||||
'companyName' => ($maintenance->asset) ? $maintenance->asset->company->name : ''
|
||||
'companyName' => ($maintenance->asset->company) ? $maintenance->asset->company->name : ''
|
||||
);
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ class AssetMaintenancesController extends Controller
|
||||
if (e(Input::get('cost')) == '') {
|
||||
$assetMaintenance->cost = '';
|
||||
} else {
|
||||
$assetMaintenance->cost = e(Input::get('cost'));
|
||||
$assetMaintenance->cost = Helper::ParseFloat(e(Input::get('cost')));
|
||||
}
|
||||
|
||||
if (e(Input::get('notes')) == '') {
|
||||
@@ -363,7 +363,7 @@ class AssetMaintenancesController extends Controller
|
||||
if (e(Input::get('cost')) == '') {
|
||||
$assetMaintenance->cost = '';
|
||||
} else {
|
||||
$assetMaintenance->cost = e(Input::get('cost'));
|
||||
$assetMaintenance->cost = Helper::ParseFloat(e(Input::get('cost')));
|
||||
}
|
||||
|
||||
if (e(Input::get('notes')) == '') {
|
||||
|
||||
@@ -141,7 +141,7 @@ class AssetModelsController extends Controller
|
||||
$model = new AssetModel;
|
||||
|
||||
$settings=Input::all();
|
||||
$settings['eol']=0;
|
||||
$settings['eol']= null;
|
||||
|
||||
$model->name=e(Input::get('name'));
|
||||
$model->manufacturer_id = e(Input::get('manufacturer_id'));
|
||||
@@ -149,7 +149,7 @@ class AssetModelsController extends Controller
|
||||
$model->modelno = e(Input::get('modelno'));
|
||||
$model->user_id = Auth::user()->id;
|
||||
$model->note = e(Input::get('note'));
|
||||
$model->eol=0;
|
||||
$model->eol= null;
|
||||
|
||||
if (Input::get('fieldset_id')=='') {
|
||||
$model->fieldset_id = null;
|
||||
@@ -217,7 +217,7 @@ class AssetModelsController extends Controller
|
||||
}
|
||||
|
||||
if (e(Input::get('eol')) == '') {
|
||||
$model->eol = 0;
|
||||
$model->eol = null;
|
||||
} else {
|
||||
$model->eol = e(Input::get('eol'));
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ class AssetsController extends Controller
|
||||
if (e(Input::get('purchase_cost')) == '') {
|
||||
$asset->purchase_cost = null;
|
||||
} else {
|
||||
$asset->purchase_cost = (e(Input::get('purchase_cost')));
|
||||
$asset->purchase_cost = Helper::ParseFloat(e(Input::get('purchase_cost')));
|
||||
}
|
||||
|
||||
if (e(Input::get('purchase_date')) == '') {
|
||||
@@ -231,7 +231,7 @@ class AssetsController extends Controller
|
||||
$directory= public_path('uploads/assets/');
|
||||
// Check if the uploads directory exists. If not, try to create it.
|
||||
if (!file_exists($directory)) {
|
||||
mkdir($directory, 0755);
|
||||
mkdir($directory, 0755, true);
|
||||
}
|
||||
$path = public_path('uploads/assets/'.$file_name);
|
||||
try {
|
||||
@@ -264,10 +264,10 @@ class AssetsController extends Controller
|
||||
|
||||
// Was the asset created?
|
||||
if ($asset->save()) {
|
||||
|
||||
$asset->logCreate();
|
||||
if (Input::get('assigned_to')!='') {
|
||||
$user = User::find(e(Input::get('assigned_to')));
|
||||
$asset->checkOutToUser($user, Auth::user(), date('Y-m-d h:i:s'), '', 'Checked out on asset creation', e(Input::get('name')));
|
||||
$asset->checkOutToUser($user, Auth::user(), date('Y-m-d H:i:s'), '', 'Checked out on asset creation', e(Input::get('name')));
|
||||
}
|
||||
// Redirect to the asset listing page
|
||||
\Session::flash('success', trans('admin/hardware/message.create.success'));
|
||||
@@ -288,7 +288,7 @@ class AssetsController extends Controller
|
||||
*/
|
||||
public function getEdit($assetId = null)
|
||||
{
|
||||
|
||||
|
||||
// Check if the asset exists
|
||||
if (!$asset = Asset::find($assetId)) {
|
||||
// Redirect to the asset management page
|
||||
@@ -354,7 +354,7 @@ class AssetsController extends Controller
|
||||
}
|
||||
|
||||
if ($request->has('purchase_cost')) {
|
||||
$asset->purchase_cost = e(Helper::formatCurrencyOutput($request->input('purchase_cost')));
|
||||
$asset->purchase_cost = Helper::ParseFloat(e($request->input('purchase_cost')));
|
||||
} else {
|
||||
$asset->purchase_cost = null;
|
||||
}
|
||||
@@ -407,7 +407,7 @@ class AssetsController extends Controller
|
||||
$directory= public_path('uploads/assets/');
|
||||
// Check if the uploads directory exists. If not, try to create it.
|
||||
if (!file_exists($directory)) {
|
||||
mkdir($directory, 0755);
|
||||
mkdir($directory, 0755, true);
|
||||
}
|
||||
|
||||
$file_name = str_random(25).".".$extension;
|
||||
@@ -686,7 +686,8 @@ class AssetsController extends Controller
|
||||
if ((($asset->checkin_email()=='1')) && ($user) && (!config('app.lock_passwords'))) {
|
||||
Mail::send('emails.checkin-asset', $data, function ($m) use ($user) {
|
||||
$m->to($user->email, $user->first_name . ' ' . $user->last_name);
|
||||
$m->subject('Confirm Asset Checkin');
|
||||
$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));
|
||||
$m->subject(trans('mail.Confirm_Asset_Checkin'));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -839,7 +840,7 @@ class AssetsController extends Controller
|
||||
|
||||
// Check if the uploads directory exists. If not, try to create it.
|
||||
if (!file_exists($path)) {
|
||||
mkdir($path, 0755);
|
||||
mkdir($path, 0755, true);
|
||||
}
|
||||
if ($handle = opendir($path)) {
|
||||
|
||||
@@ -1086,6 +1087,8 @@ class AssetsController extends Controller
|
||||
$results = $csv->fetchAssoc();
|
||||
$item = array();
|
||||
$status = array();
|
||||
$status['error'] = array();
|
||||
$status['success'] = array();
|
||||
|
||||
|
||||
foreach($results as $row) {
|
||||
@@ -1105,75 +1108,79 @@ class AssetsController extends Controller
|
||||
$item[$asset_tag][$batch_counter]['name'] = Helper::array_smart_fetch($row, "name");
|
||||
$item[$asset_tag][$batch_counter]['email'] = Helper::array_smart_fetch($row, "email");
|
||||
|
||||
$asset = Asset::where('asset_tag','=',$asset_tag)->first();
|
||||
$item[$asset_tag][$batch_counter]['asset_id'] = $asset->id;
|
||||
if ($asset = Asset::where('asset_tag','=',$asset_tag)->first()) {
|
||||
|
||||
$base_username = User::generateFormattedNameFromFullName(Setting::getSettings()->username_format,$item[$asset_tag][$batch_counter]['name']);
|
||||
$user = User::where('username','=',$base_username['username']);
|
||||
$user_query = ' on username '.$base_username['username'];
|
||||
$item[$asset_tag][$batch_counter]['asset_id'] = $asset->id;
|
||||
|
||||
if ($request->input('match_firstnamelastname')=='1') {
|
||||
$firstnamedotlastname = User::generateFormattedNameFromFullName('firstname.lastname',$item[$asset_tag][$batch_counter]['name']);
|
||||
$item[$asset_tag][$batch_counter]['username'][] = $firstnamedotlastname['username'];
|
||||
$user->orWhere('username','=',$firstnamedotlastname['username']);
|
||||
$user_query .= ', or on username '.$firstnamedotlastname['username'];
|
||||
}
|
||||
$base_username = User::generateFormattedNameFromFullName(Setting::getSettings()->username_format,$item[$asset_tag][$batch_counter]['name']);
|
||||
$user = User::where('username','=',$base_username['username']);
|
||||
$user_query = ' on username '.$base_username['username'];
|
||||
|
||||
if ($request->input('match_flastname')=='1') {
|
||||
$flastname = User::generateFormattedNameFromFullName('filastname',$item[$asset_tag][$batch_counter]['name']);
|
||||
$item[$asset_tag][$batch_counter]['username'][] = $flastname['username'];
|
||||
$user->orWhere('username','=',$flastname['username']);
|
||||
$user_query .= ', or on username '.$flastname['username'];
|
||||
}
|
||||
if ($request->input('match_firstname')=='1') {
|
||||
$firstname = User::generateFormattedNameFromFullName('firstname',$item[$asset_tag][$batch_counter]['name']);
|
||||
$item[$asset_tag][$batch_counter]['username'][] = $firstname['username'];
|
||||
$user->orWhere('username','=',$firstname['username']);
|
||||
$user_query .= ', or on username '.$firstname['username'];
|
||||
}
|
||||
if ($request->input('match_email')=='1') {
|
||||
if ($item[$asset_tag][$batch_counter]['email']=='') {
|
||||
$item[$asset_tag][$batch_counter]['username'][] = $user_email = User::generateEmailFromFullName($item[$asset_tag][$batch_counter]['name']);
|
||||
$user->orWhere('username','=',$user_email);
|
||||
$user_query .= ', or on username '.$user_email;
|
||||
if ($request->input('match_firstnamelastname')=='1') {
|
||||
$firstnamedotlastname = User::generateFormattedNameFromFullName('firstname.lastname',$item[$asset_tag][$batch_counter]['name']);
|
||||
$item[$asset_tag][$batch_counter]['username'][] = $firstnamedotlastname['username'];
|
||||
$user->orWhere('username','=',$firstnamedotlastname['username']);
|
||||
$user_query .= ', or on username '.$firstnamedotlastname['username'];
|
||||
}
|
||||
}
|
||||
|
||||
// A matching user was found
|
||||
if ($user = $user->first()) {
|
||||
$item[$asset_tag][$batch_counter]['checkedout_to'] = $user->id;
|
||||
|
||||
$status['success'][] = 'Found user '.Helper::array_smart_fetch($row, "name").$user_query;
|
||||
|
||||
if ($asset) {
|
||||
if ($request->input('match_flastname')=='1') {
|
||||
$flastname = User::generateFormattedNameFromFullName('filastname',$item[$asset_tag][$batch_counter]['name']);
|
||||
$item[$asset_tag][$batch_counter]['username'][] = $flastname['username'];
|
||||
$user->orWhere('username','=',$flastname['username']);
|
||||
$user_query .= ', or on username '.$flastname['username'];
|
||||
}
|
||||
if ($request->input('match_firstname')=='1') {
|
||||
$firstname = User::generateFormattedNameFromFullName('firstname',$item[$asset_tag][$batch_counter]['name']);
|
||||
$item[$asset_tag][$batch_counter]['username'][] = $firstname['username'];
|
||||
$user->orWhere('username','=',$firstname['username']);
|
||||
$user_query .= ', or on username '.$firstname['username'];
|
||||
}
|
||||
if ($request->input('match_email')=='1') {
|
||||
if ($item[$asset_tag][$batch_counter]['email']=='') {
|
||||
$item[$asset_tag][$batch_counter]['username'][] = $user_email = User::generateEmailFromFullName($item[$asset_tag][$batch_counter]['name']);
|
||||
$user->orWhere('username','=',$user_email);
|
||||
$user_query .= ', or on username '.$user_email;
|
||||
}
|
||||
}
|
||||
|
||||
// A matching user was found
|
||||
if ($user = $user->first()) {
|
||||
$item[$asset_tag][$batch_counter]['checkedout_to'] = $user->id;
|
||||
$item[$asset_tag][$batch_counter]['user_id'] = $user->id;
|
||||
|
||||
Actionlog::firstOrCreate(array(
|
||||
'item_id' => $asset->id,
|
||||
'item_type' => Asset::class,
|
||||
'user_id' => Auth::user()->id,
|
||||
'note' => 'Checkout imported by '.Auth::user()->fullName().' from history importer',
|
||||
'target_id' => $item[$asset_tag][$batch_counter]['user_id'],
|
||||
'target_type' => User::class,
|
||||
'created_at' => $item[$asset_tag][$batch_counter]['checkout_date'],
|
||||
'action_type' => 'checkout'
|
||||
'item_id' => $asset->id,
|
||||
'item_type' => Asset::class,
|
||||
'user_id' => Auth::user()->id,
|
||||
'note' => 'Checkout imported by '.Auth::user()->fullName().' from history importer',
|
||||
'target_id' => $item[$asset_tag][$batch_counter]['user_id'],
|
||||
'target_type' => User::class,
|
||||
'created_at' => $item[$asset_tag][$batch_counter]['checkout_date'],
|
||||
'action_type' => 'checkout',
|
||||
)
|
||||
);
|
||||
|
||||
$asset->assigned_to = $user->id;
|
||||
$asset->save();
|
||||
|
||||
if ($asset->save()) {
|
||||
$status['success'][]['asset'][$asset_tag]['msg'] = 'Asset successfully matched for '.Helper::array_smart_fetch($row, "name").$user_query.' on '.$item[$asset_tag][$batch_counter]['checkout_date'];
|
||||
} else {
|
||||
$status['error'][]['asset'][$asset_tag]['msg'] = 'Asset and user was matched but could not be saved.';
|
||||
}
|
||||
|
||||
} else {
|
||||
$status['error'][] = 'Asset does not exist so no checkin log was created.';
|
||||
$item[$asset_tag][$batch_counter]['checkedout_to'] = null;
|
||||
$status['error'][]['user'][Helper::array_smart_fetch($row, "name")]['msg'] = 'User does not exist so no checkin log was created.';
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
$item[$asset_tag][$batch_counter]['checkedout_to'] = null;
|
||||
$status['error'][] = 'No matching user for '.Helper::array_smart_fetch($row, "name");
|
||||
$item[$asset_tag][$batch_counter]['asset_id'] = null;
|
||||
$status['error'][]['asset'][$asset_tag]['msg'] = 'Asset does not exist so no match was attempted.';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1184,7 +1191,7 @@ class AssetsController extends Controller
|
||||
$next = $x + 1;
|
||||
|
||||
// Only do this if a matching user was found
|
||||
if ($asset_batch[$x]['checkedout_to']!='') {
|
||||
if ((array_key_exists('checkedout_to',$asset_batch[$x])) && ($asset_batch[$x]['checkedout_to']!='')) {
|
||||
|
||||
if (($total_in_batch > 1) && ($x < $total_in_batch) && (array_key_exists($next,$asset_batch))) {
|
||||
$checkin_date = Carbon::parse($asset_batch[$next]['checkout_date'])->subDay(1)->format('Y-m-d H:i:s');
|
||||
@@ -1417,7 +1424,7 @@ class AssetsController extends Controller
|
||||
|
||||
return View::make('hardware/labels')->with('assets', $assets)->with('settings', $settings)->with('count', $count)->with('settings', $settings);
|
||||
|
||||
|
||||
|
||||
|
||||
} elseif (Input::get('bulk_actions')=='delete') {
|
||||
|
||||
@@ -1485,7 +1492,7 @@ class AssetsController extends Controller
|
||||
}
|
||||
|
||||
if (Input::has('purchase_cost')) {
|
||||
$update_array['purchase_cost'] = e(Input::get('purchase_cost'));
|
||||
$update_array['purchase_cost'] = Helper::ParseFloat(e(Input::get('purchase_cost')));
|
||||
}
|
||||
|
||||
if (Input::has('supplier_id')) {
|
||||
@@ -1581,7 +1588,7 @@ class AssetsController extends Controller
|
||||
|
||||
foreach ($assets as $asset) {
|
||||
//echo '<li>'.$asset;
|
||||
$update_array['deleted_at'] = date('Y-m-d h:i:s');
|
||||
$update_array['deleted_at'] = date('Y-m-d H:i:s');
|
||||
$update_array['assigned_to'] = null;
|
||||
|
||||
if (DB::table('assets')
|
||||
@@ -1833,7 +1840,13 @@ class AssetsController extends Controller
|
||||
}
|
||||
|
||||
}
|
||||
$rows[]=$row;
|
||||
|
||||
if (($request->has('report')) && ($request->get('report')=='true')) {
|
||||
$rows[]= Helper::stripTagsFromJSON($row);
|
||||
} else {
|
||||
$rows[]= $row;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$data = array('total'=>$assetCount, 'rows'=>$rows);
|
||||
@@ -1847,12 +1860,12 @@ class AssetsController extends Controller
|
||||
$users_list = Helper::usersList();
|
||||
// Filter out assets that are not deployable.
|
||||
$assets = Asset::RTD()->get();
|
||||
|
||||
|
||||
$assets_list = Company::scopeCompanyables($assets, 'assets.company_id')->lists('detailed_name', 'id')->toArray();
|
||||
|
||||
|
||||
return View::make('hardware/bulk-checkout')->with('users_list', $users_list)->with('assets_list', $assets_list);
|
||||
}
|
||||
|
||||
|
||||
public function postBulkCheckout(Request $request)
|
||||
{
|
||||
|
||||
@@ -1862,31 +1875,31 @@ class AssetsController extends Controller
|
||||
|
||||
$user = User::find(e(Input::get('assigned_to')));
|
||||
$admin = Auth::user();
|
||||
|
||||
|
||||
$asset_ids = array_filter(Input::get('selected_assets'));
|
||||
|
||||
|
||||
if ((Input::has('checkout_at')) && (Input::get('checkout_at')!= date("Y-m-d"))) {
|
||||
$checkout_at = e(Input::get('checkout_at'));
|
||||
} else {
|
||||
$checkout_at = date("Y-m-d H:i:s");
|
||||
}
|
||||
|
||||
|
||||
if (Input::has('expected_checkin')) {
|
||||
$expected_checkin = e(Input::get('expected_checkin'));
|
||||
} else {
|
||||
$expected_checkin = '';
|
||||
}
|
||||
|
||||
|
||||
$has_errors = false;
|
||||
$errors = [];
|
||||
DB::transaction(function() use ($user, $admin, $checkout_at, $expected_checkin, $errors, $asset_ids)
|
||||
{
|
||||
{
|
||||
foreach($asset_ids as $asset_id)
|
||||
{
|
||||
$asset = Asset::find($asset_id);
|
||||
|
||||
|
||||
$error = $asset->checkOutToUser($user, $admin, $checkout_at, $expected_checkin, e(Input::get('note')), null);
|
||||
|
||||
|
||||
if($error)
|
||||
{
|
||||
$has_errors = true;
|
||||
@@ -1894,12 +1907,12 @@ class AssetsController extends Controller
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if (!$errors) {
|
||||
// Redirect to the new asset page
|
||||
return redirect()->to("hardware")->with('success', trans('admin/hardware/message.checkout.success'));
|
||||
}
|
||||
|
||||
|
||||
// Redirect to the asset management page with error
|
||||
return redirect()->to("hardware/bulk-checkout")->with('error', trans('admin/hardware/message.checkout.error'))->withErrors($errors);
|
||||
}
|
||||
|
||||
@@ -37,4 +37,13 @@ class PasswordController extends Controller
|
||||
{
|
||||
$this->middleware('guest');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the e-mail subject line to be used for the reset link email.
|
||||
* Overriding method "getEmailSubject()" from trait "use ResetsPasswords"
|
||||
* @return string
|
||||
*/
|
||||
public function getEmailSubject(){
|
||||
return property_exists($this, 'subject') ? $this->subject : \Lang::get('mail.reset_link');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ class ComponentsController extends Controller
|
||||
if (e(Input::get('purchase_cost')) == '0.00') {
|
||||
$component->purchase_cost = null;
|
||||
} else {
|
||||
$component->purchase_cost = e(Input::get('purchase_cost'));
|
||||
$component->purchase_cost = Helper::ParseFloat(e(Input::get('purchase_cost')));
|
||||
}
|
||||
|
||||
$component->total_qty = e(Input::get('total_qty'));
|
||||
@@ -107,6 +107,7 @@ class ComponentsController extends Controller
|
||||
|
||||
// Was the component created?
|
||||
if ($component->save()) {
|
||||
$component->logCreate();
|
||||
// Redirect to the new component page
|
||||
return redirect()->to("admin/components")->with('success', trans('admin/components/message.create.success'));
|
||||
}
|
||||
@@ -183,7 +184,7 @@ class ComponentsController extends Controller
|
||||
if (e(Input::get('purchase_cost')) == '0.00') {
|
||||
$component->purchase_cost = null;
|
||||
} else {
|
||||
$component->purchase_cost = e(Input::get('purchase_cost'));
|
||||
$component->purchase_cost = Helper::ParseFloat(e(Input::get('purchase_cost')));
|
||||
}
|
||||
|
||||
$component->total_qty = e(Input::get('total_qty'));
|
||||
@@ -345,7 +346,7 @@ class ComponentsController extends Controller
|
||||
$component->assets()->attach($component->id, array(
|
||||
'component_id' => $component->id,
|
||||
'user_id' => $admin_user->id,
|
||||
'created_at' => date('Y-m-d h:i:s'),
|
||||
'created_at' => date('Y-m-d H:i:s'),
|
||||
'assigned_qty' => e(Input::get('assigned_qty')),
|
||||
'asset_id' => $asset_id));
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ class ConsumablesController extends Controller
|
||||
if (e(Input::get('purchase_cost')) == '0.00') {
|
||||
$consumable->purchase_cost = null;
|
||||
} else {
|
||||
$consumable->purchase_cost = e(Input::get('purchase_cost'));
|
||||
$consumable->purchase_cost = Helper::ParseFloat(e(Input::get('purchase_cost')));
|
||||
}
|
||||
|
||||
$consumable->qty = e(Input::get('qty'));
|
||||
@@ -105,6 +105,7 @@ class ConsumablesController extends Controller
|
||||
|
||||
// Was the consumable created?
|
||||
if ($consumable->save()) {
|
||||
$consumable->logCreate();
|
||||
// Redirect to the new consumable page
|
||||
return redirect()->to("admin/consumables")->with('success', trans('admin/consumables/message.create.success'));
|
||||
}
|
||||
@@ -182,10 +183,10 @@ class ConsumablesController extends Controller
|
||||
if (e(Input::get('purchase_cost')) == '0.00') {
|
||||
$consumable->purchase_cost = null;
|
||||
} else {
|
||||
$consumable->purchase_cost = e(Input::get('purchase_cost'));
|
||||
$consumable->purchase_cost = Helper::ParseFloat(e(Input::get('purchase_cost')));
|
||||
}
|
||||
|
||||
$consumable->qty = e(Input::get('qty'));
|
||||
$consumable->qty = Helper::ParseFloat(e(Input::get('qty')));
|
||||
|
||||
if ($consumable->save()) {
|
||||
return redirect()->to("admin/consumables")->with('success', trans('admin/consumables/message.update.success'));
|
||||
@@ -365,7 +366,8 @@ class ConsumablesController extends Controller
|
||||
|
||||
Mail::send('emails.accept-asset', $data, function ($m) use ($user) {
|
||||
$m->to($user->email, $user->first_name . ' ' . $user->last_name);
|
||||
$m->subject('Confirm consumable delivery');
|
||||
$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));
|
||||
$m->subject(trans('mail.Confirm_consumable_delivery'));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -30,12 +30,6 @@ class DashboardController extends Controller
|
||||
// Show the page
|
||||
if (Auth::user()->hasAccess('admin')) {
|
||||
|
||||
$recent_activity = Actionlog::latest()
|
||||
->with('item')
|
||||
->take(20)
|
||||
->get();
|
||||
|
||||
|
||||
$asset_stats['total'] = Asset::Hardware()->count();
|
||||
|
||||
$asset_stats['rtd']['total'] = Asset::Hardware()->RTD()->count();
|
||||
@@ -82,7 +76,7 @@ class DashboardController extends Controller
|
||||
}
|
||||
|
||||
|
||||
return View::make('dashboard')->with('asset_stats', $asset_stats)->with('recent_activity', $recent_activity);
|
||||
return View::make('dashboard')->with('asset_stats', $asset_stats);
|
||||
} else {
|
||||
// Redirect to the profile page
|
||||
return redirect()->route('view-assets');
|
||||
|
||||
@@ -87,17 +87,13 @@ class LicensesController extends Controller
|
||||
public function postCreate()
|
||||
{
|
||||
|
||||
|
||||
// get the POST data
|
||||
$new = Input::all();
|
||||
|
||||
// create a new model instance
|
||||
$license = new License();
|
||||
|
||||
if (e(Input::get('purchase_cost')) == '') {
|
||||
$license->purchase_cost = null;
|
||||
} else {
|
||||
$license->purchase_cost = e(Input::get('purchase_cost'));
|
||||
$license->purchase_cost = Helper::ParseFloat(e(Input::get('purchase_cost')));
|
||||
}
|
||||
|
||||
if (e(Input::get('supplier_id')) == '') {
|
||||
@@ -159,7 +155,7 @@ class LicensesController extends Controller
|
||||
|
||||
// Was the license created?
|
||||
if ($license->save()) {
|
||||
|
||||
$license->logCreate();
|
||||
$insertedId = $license->id;
|
||||
// Save the license seat data
|
||||
DB::transaction(function () use (&$insertedId, &$license) {
|
||||
@@ -289,10 +285,9 @@ class LicensesController extends Controller
|
||||
}
|
||||
|
||||
if (e(Input::get('purchase_cost')) == '') {
|
||||
$license->purchase_cost = null;
|
||||
$license->purchase_cost = null;
|
||||
} else {
|
||||
$license->purchase_cost = e(Input::get('purchase_cost'));
|
||||
//$license->purchase_cost = e(Input::get('purchase_cost'));
|
||||
$license->purchase_cost = Helper::ParseFloat(e(Input::get('purchase_cost')));
|
||||
}
|
||||
|
||||
if (e(Input::get('maintained')) == '') {
|
||||
@@ -979,7 +974,7 @@ class LicensesController extends Controller
|
||||
|
||||
if (Gate::allows('licenses.create')) {
|
||||
$actions .= '<a href="' . route('clone/license', $license->id)
|
||||
. '" class="btn btn-info btn-sm" style="margin-right:5px;" title="Clone asset"><i class="fa fa-files-o"></i></a>';
|
||||
. '" class="btn btn-info btn-sm" style="margin-right:5px;" title="Clone license"><i class="fa fa-files-o"></i></a>';
|
||||
}
|
||||
if (Gate::allows('licenses.edit')) {
|
||||
$actions .= '<a href="' . route('update/license', $license->id)
|
||||
|
||||
@@ -33,12 +33,12 @@ class ReportsController extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Returns a view that displays the accessories report.
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v1.0]
|
||||
* @return View
|
||||
*/
|
||||
* Returns a view that displays the accessories report.
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v1.0]
|
||||
* @return View
|
||||
*/
|
||||
public function getAccessoryReport()
|
||||
{
|
||||
$accessories = Accessory::orderBy('created_at', 'DESC')->with('company')->get();
|
||||
@@ -47,14 +47,14 @@ class ReportsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Exports the accessories to CSV
|
||||
*
|
||||
* @deprecated Server-side exports have been replaced by datatables export since v2.
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @see ManufacturersController::getDatatable() method that generates the JSON response
|
||||
* @since [v1.0]
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
* Exports the accessories to CSV
|
||||
*
|
||||
* @deprecated Server-side exports have been replaced by datatables export since v2.
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @see ManufacturersController::getDatatable() method that generates the JSON response
|
||||
* @since [v1.0]
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function exportAccessoryReport()
|
||||
{
|
||||
$accessories = Accessory::orderBy('created_at', 'DESC')->get();
|
||||
@@ -89,53 +89,41 @@ class ReportsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display asset report.
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v1.0]
|
||||
* @return View
|
||||
*/
|
||||
* Display asset report view.
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v1.0]
|
||||
* @return View
|
||||
*/
|
||||
public function getAssetsReport()
|
||||
{
|
||||
$settings = \App\Models\Setting::first();
|
||||
// Grab all the assets
|
||||
$assets = Asset::with(
|
||||
'model',
|
||||
'assigneduser.userLoc',
|
||||
'assetstatus',
|
||||
'defaultLoc',
|
||||
'assetlog',
|
||||
'supplier',
|
||||
'model.manufacturer',
|
||||
'company'
|
||||
)
|
||||
->orderBy('created_at', 'DESC')
|
||||
->get();
|
||||
|
||||
return View::make('reports/asset', compact('assets'))->with('settings', $settings);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Exports the assets to CSV
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v1.0]
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
* Exports the assets to CSV
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v1.0]
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function exportAssetReport()
|
||||
{
|
||||
|
||||
\Debugbar::disable();
|
||||
\Debugbar::disable();
|
||||
|
||||
$response = new StreamedResponse(function(){
|
||||
$customfields = CustomField::get();
|
||||
|
||||
$response = new StreamedResponse(function() use ($customfields) {
|
||||
// Open output stream
|
||||
$handle = fopen('php://output', 'w');
|
||||
|
||||
Asset::with('assigneduser', 'assetloc','defaultLoc','assigneduser.userloc','model','supplier','assetstatus','model.manufacturer')->orderBy('created_at', 'DESC')->chunk(500, function($assets) use($handle) {
|
||||
|
||||
//BOM
|
||||
fputs($handle, chr(0xEF) . chr(0xBB) . chr(0xBF));
|
||||
fputcsv($handle, [
|
||||
Asset::with('assigneduser', 'assetloc','defaultLoc','assigneduser.userloc','model','supplier','assetstatus','model.manufacturer')->orderBy('created_at', 'DESC')->chunk(500, function($assets) use($handle, $customfields) {
|
||||
$headers=[
|
||||
trans('general.company'),
|
||||
trans('admin/hardware/table.asset_tag'),
|
||||
trans('admin/hardware/form.manufacturer'),
|
||||
trans('admin/hardware/form.model'),
|
||||
@@ -148,13 +136,19 @@ class ReportsController extends Controller
|
||||
trans('admin/hardware/form.order'),
|
||||
trans('admin/hardware/form.supplier'),
|
||||
trans('admin/hardware/table.checkoutto'),
|
||||
trans('admin/hardware/table.checkout_date'),
|
||||
trans('admin/hardware/table.location'),
|
||||
trans('general.notes'),
|
||||
]);
|
||||
];
|
||||
foreach($customfields as $field) {
|
||||
$headers[]=$field->name;
|
||||
}
|
||||
fputcsv($handle, $headers);
|
||||
|
||||
foreach ($assets as $asset) {
|
||||
// Add a new row with data
|
||||
fputcsv($handle, [
|
||||
$values=[
|
||||
($asset->company) ? $asset->company->name : '',
|
||||
$asset->asset_tag,
|
||||
($asset->model->manufacturer) ? $asset->model->manufacturer->name : '',
|
||||
($asset->model) ? $asset->model->name : '',
|
||||
@@ -167,10 +161,15 @@ class ReportsController extends Controller
|
||||
($asset->order_number) ? e($asset->order_number) : '',
|
||||
($asset->supplier) ? e($asset->supplier->name) : '',
|
||||
($asset->assigneduser) ? e($asset->assigneduser->fullName()) : '',
|
||||
($asset->last_checkout!='') ? e($asset->last_checkout) : '',
|
||||
($asset->assigneduser && $asset->assigneduser->userloc!='') ?
|
||||
e($asset->assigneduser->userloc->name) : ( ($asset->defaultLoc!='') ? e($asset->defaultLoc->name) : ''),
|
||||
($asset->notes) ? e($asset->notes) : '',
|
||||
]);
|
||||
];
|
||||
foreach($customfields as $field) {
|
||||
$values[]=$asset->{$field->db_column_name()};
|
||||
}
|
||||
fputcsv($handle, $values);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -186,36 +185,36 @@ class ReportsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Show depreciation report for assets.
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v1.0]
|
||||
* @return View
|
||||
*/
|
||||
* Show depreciation report for assets.
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v1.0]
|
||||
* @return View
|
||||
*/
|
||||
public function getDeprecationReport()
|
||||
{
|
||||
|
||||
// Grab all the assets
|
||||
$assets = Asset::with('model', 'assigneduser', 'assetstatus', 'defaultLoc', 'assetlog', 'company')
|
||||
->orderBy('created_at', 'DESC')->get();
|
||||
->orderBy('created_at', 'DESC')->get();
|
||||
|
||||
return View::make('reports/depreciation', compact('assets'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Exports the depreciations to CSV
|
||||
*
|
||||
* @deprecated Server-side exports have been replaced by datatables export since v2.
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v1.0]
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
* Exports the depreciations to CSV
|
||||
*
|
||||
* @deprecated Server-side exports have been replaced by datatables export since v2.
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v1.0]
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function exportDeprecationReport()
|
||||
{
|
||||
|
||||
// Grab all the assets
|
||||
$assets = Asset::with('model', 'assigneduser', 'assetstatus', 'defaultLoc', 'assetlog')
|
||||
->orderBy('created_at', 'DESC')->get();
|
||||
->orderBy('created_at', 'DESC')->get();
|
||||
|
||||
$csv = \League\Csv\Writer::createFromFileObject(new \SplTempFileObject());
|
||||
$csv->setOutputBOM(Reader::BOM_UTF16_BE);
|
||||
@@ -284,23 +283,22 @@ class ReportsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays activity report.
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v1.0]
|
||||
* @return View
|
||||
*/
|
||||
* Displays activity report.
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v1.0]
|
||||
* @return View
|
||||
*/
|
||||
public function getActivityReport()
|
||||
{
|
||||
$log_actions = Actionlog::orderBy('created_at', 'DESC')
|
||||
->with('item')
|
||||
->orderBy('created_at', 'DESC')
|
||||
->get();
|
||||
->with('item')
|
||||
->orderBy('created_at', 'DESC')
|
||||
->get();
|
||||
|
||||
return View::make('reports/activity', compact('log_actions'));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns Activity Report JSON.
|
||||
*
|
||||
@@ -310,7 +308,7 @@ class ReportsController extends Controller
|
||||
*/
|
||||
public function getActivityReportDataTable()
|
||||
{
|
||||
$activitylogs = Actionlog::orderBy('created_at', 'DESC');
|
||||
$activitylogs = Company::scopeCompanyables(Actionlog::with('item', 'user', 'target'))->orderBy('created_at', 'DESC');
|
||||
|
||||
if (Input::has('search')) {
|
||||
$activity = $activity->TextSearch(e(Input::get('search')));
|
||||
@@ -329,16 +327,16 @@ class ReportsController extends Controller
|
||||
}
|
||||
|
||||
|
||||
$allowed_columns = ['name','min_amt','order_number','purchase_date','purchase_cost','companyName','category'];
|
||||
$allowed_columns = ['created_at'];
|
||||
$order = Input::get('order') === 'asc' ? 'asc' : 'desc';
|
||||
$sort = in_array(Input::get('sort'), $allowed_columns) ? e(Input::get('sort')) : 'created_at';
|
||||
|
||||
|
||||
$activityCount = $activitylogs->count();
|
||||
$activitylogs = $activitylogs->skip($offset)->take($limit)->get();
|
||||
// dd("Offset:" . $offset . " Limit " . $limit);
|
||||
$activitylogs = $activitylogs->offset($offset)->limit($limit)->get();
|
||||
|
||||
$rows = array();
|
||||
|
||||
foreach ($activitylogs as $activity) {
|
||||
|
||||
if ($activity->itemType() == "asset") {
|
||||
@@ -356,24 +354,43 @@ class ReportsController extends Controller
|
||||
}
|
||||
|
||||
if (($activity->item) && ($activity->itemType()=="asset")) {
|
||||
$actvity_item = '<a href="'.route('view/hardware', $activity->item_id).'">'.e($activity->item->asset_tag).' - '. e($activity->item->showAssetName()).'</a>';
|
||||
$activity_item = '<a href="'.route('view/hardware', $activity->item_id).'">'.e($activity->item->asset_tag).' - '. e($activity->item->showAssetName()).'</a>';
|
||||
$item_type = 'asset';
|
||||
} elseif ($activity->item) {
|
||||
$actvity_item = '<a href="'.route('view/'. $activity->itemType(), $activity->item_id).'">'.e($activity->item->name).'</a>';
|
||||
} elseif ($activity->item()) {
|
||||
$activity_item = '<a href="'.route('view/'. $activity->itemType(), $activity->item_id).'">'.e($activity->item->name).'</a>';
|
||||
$item_type = $activity->itemType();
|
||||
} else {
|
||||
$activity_item = "unkonwn";
|
||||
$item_type = "null";
|
||||
}
|
||||
|
||||
|
||||
if (($activity->userasassetlog) && ($activity->action_type=="uploaded") && ($activity->itemType()=="user")) {
|
||||
$activity_target = '<a href="'.route('view/user', $activity->target_id).'">'.$activity->userasassetlog->fullName().'</a>';
|
||||
} elseif (($activity->item) && ($activity->target instanceof \App\Models\Asset)) {
|
||||
$activity_target = '<a href="'.route('view/hardware', $activity->target_id).'">'.$activity->target->showAssetName().'</a>';
|
||||
} elseif (($activity->item) && ($activity->target instanceof \App\Models\User)) {
|
||||
$activity_target = '<a href="'.route('view/user', $activity->target_id).'">'.$activity->target->fullName().'</a>';
|
||||
if (($activity->user) && ($activity->action_type=="uploaded") && ($activity->itemType()=="user")) {
|
||||
$activity_target = '<a href="'.route('view/user', $activity->target_id).'">'.$activity->user->fullName().'</a>';
|
||||
} elseif ($activity->target_type === "App\Models\Asset") {
|
||||
if($activity->target) {
|
||||
$activity_target = '<a href="'.route('view/hardware', $activity->target_id).'">'.$activity->target->showAssetName().'</a>';
|
||||
} else {
|
||||
$activity_target = "";
|
||||
}
|
||||
} elseif ( $activity->target_type === "App\Models\User") {
|
||||
if($activity->target) {
|
||||
$activity_target = '<a href="'.route('view/user', $activity->target_id).'">'.$activity->target->fullName().'</a>';
|
||||
} else {
|
||||
$activity_target = '';
|
||||
}
|
||||
} elseif ($activity->action_type=='requested') {
|
||||
$activity_target = '<a href="'.route('view/user', $activity->user_id).'">'.$activity->user->fullName().'</a>';
|
||||
if ($activity->user) {
|
||||
$activity_target = '<a href="'.route('view/user', $activity->user_id).'">'.$activity->user->fullName().'</a>';
|
||||
} else {
|
||||
$activity_target = '';
|
||||
}
|
||||
} else {
|
||||
$activity_target = $activity->target;
|
||||
if($activity->target) {
|
||||
$activity_target = $activity->target->id;
|
||||
} else {
|
||||
$activity_target = "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -381,9 +398,9 @@ class ReportsController extends Controller
|
||||
'icon' => $activity_icons,
|
||||
'created_at' => date("M d, Y g:iA", strtotime($activity->created_at)),
|
||||
'action_type' => strtolower(trans('general.'.str_replace(' ','_',$activity->action_type))),
|
||||
'admin' => $activity->user ? (string) link_to('/admin/users/'.$activity->user_id.'/view', $activity->user->fullName()) : 'Deleted Admin',
|
||||
'admin' => $activity->user ? (string) link_to('/admin/users/'.$activity->user_id.'/view', $activity->user->fullName()) : '',
|
||||
'target' => $activity_target,
|
||||
'item' => $actvity_item,
|
||||
'item' => $activity_item,
|
||||
'item_type' => $item_type,
|
||||
'note' => e($activity->note),
|
||||
|
||||
@@ -406,21 +423,21 @@ class ReportsController extends Controller
|
||||
public function getLicenseReport()
|
||||
{
|
||||
|
||||
$licenses = License::orderBy('created_at', 'DESC')
|
||||
->with('company')
|
||||
->get();
|
||||
$licenses = License::with('depreciation')->orderBy('created_at', 'DESC')
|
||||
->with('company')
|
||||
->get();
|
||||
|
||||
return View::make('reports/licenses', compact('licenses'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Exports the licenses to CSV
|
||||
*
|
||||
* @deprecated Server-side exports have been replaced by datatables export since v2.
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v1.0]
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
* Exports the licenses to CSV
|
||||
*
|
||||
* @deprecated Server-side exports have been replaced by datatables export since v2.
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v1.0]
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function exportLicenseReport()
|
||||
{
|
||||
$licenses = License::orderBy('created_at', 'DESC')->get();
|
||||
@@ -433,6 +450,7 @@ class ReportsController extends Controller
|
||||
trans('admin/licenses/form.remaining_seats'),
|
||||
trans('admin/licenses/form.expiration'),
|
||||
trans('admin/licenses/form.date'),
|
||||
trans('admin/licenses/form.depreciation'),
|
||||
trans('admin/licenses/form.cost')
|
||||
];
|
||||
|
||||
@@ -448,6 +466,7 @@ class ReportsController extends Controller
|
||||
$row[] = $license->remaincount();
|
||||
$row[] = $license->expiration_date;
|
||||
$row[] = $license->purchase_date;
|
||||
$row[] = ($license->depreciation!='') ? '' : e($license->depreciation->name);
|
||||
$row[] = '"' . Helper::formatCurrencyOutput($license->purchase_cost) . '"';
|
||||
|
||||
$rows[] = implode($row, ',');
|
||||
@@ -462,13 +481,13 @@ class ReportsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a form that allows the user to generate a custom CSV report.
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @see ReportsController::postCustomReport() method that generates the CSV
|
||||
* @since [v1.0]
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
* Returns a form that allows the user to generate a custom CSV report.
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @see ReportsController::postCustomReport() method that generates the CSV
|
||||
* @since [v1.0]
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function getCustomReport()
|
||||
{
|
||||
$customfields = CustomField::get();
|
||||
@@ -491,10 +510,10 @@ class ReportsController extends Controller
|
||||
$rows = [ ];
|
||||
$header = [ ];
|
||||
|
||||
if (e(Input::get('company_name')) == '1') {
|
||||
if (e(Input::get('company')) == '1') {
|
||||
$header[] = 'Company Name';
|
||||
}
|
||||
|
||||
|
||||
if (e(Input::get('asset_name')) == '1') {
|
||||
$header[] = 'Asset Name';
|
||||
}
|
||||
@@ -560,9 +579,9 @@ class ReportsController extends Controller
|
||||
|
||||
foreach ($assets as $asset) {
|
||||
$row = [ ];
|
||||
|
||||
if (e(Input::get('company_name')) == '1') {
|
||||
$row[] = is_null($asset->company) ? '' : e($asset->company->name);
|
||||
|
||||
if (e(Input::get('company')) == '1') {
|
||||
$row[] = is_null($asset->company) ? '' : '"'.$asset->company->name.'"';
|
||||
}
|
||||
|
||||
if (e(Input::get('asset_name')) == '1') {
|
||||
@@ -609,15 +628,13 @@ class ReportsController extends Controller
|
||||
$row[] = '';
|
||||
}
|
||||
}
|
||||
|
||||
if (e(Input::get('location')) == '1') {
|
||||
$show_loc = '';
|
||||
if (( $asset->assigned_to > 0 ) && ( $asset->assigneduser->location_id !='' )) {
|
||||
$location = Location::find($asset->assigneduser->location_id);
|
||||
if ($location) {
|
||||
$show_loc .= '"' .e($location->name). '"';
|
||||
} else {
|
||||
$show_loc .= 'User location '.$asset->assigneduser->location_id.' is invalid';
|
||||
}
|
||||
|
||||
|
||||
if (($asset->assigned_to > 0) && ($asset->assigneduser) && ($asset->assigneduser->location)) {
|
||||
$show_loc .= '"' .e($asset->assigneduser->location->name). '"';
|
||||
} elseif ($asset->rtd_location_id!='') {
|
||||
$location = Location::find($asset->rtd_location_id);
|
||||
if ($location) {
|
||||
@@ -630,19 +647,19 @@ class ReportsController extends Controller
|
||||
$row[] = $show_loc;
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (e(Input::get('assigned_to')) == '1') {
|
||||
if ($asset->assigned_to > 0) {
|
||||
$user = User::find($asset->assigned_to);
|
||||
$row[] = '"' .e($user->fullName()). '"';
|
||||
if ($asset->assigneduser) {
|
||||
$row[] = '"' .e($asset->assigneduser->fullName()). '"';
|
||||
} else {
|
||||
$row[] = ''; // Empty string if unassigned
|
||||
}
|
||||
}
|
||||
|
||||
if (e(Input::get('username')) == '1') {
|
||||
if ($asset->assigned_to > 0) {
|
||||
$user = User::find($asset->assigned_to);
|
||||
$row[] = '"' .e($user->username). '"';
|
||||
if ($asset->assigneduser) {
|
||||
$row[] = '"' .e($asset->assigneduser->username). '"';
|
||||
} else {
|
||||
$row[] = ''; // Empty string if unassigned
|
||||
}
|
||||
@@ -678,7 +695,7 @@ class ReportsController extends Controller
|
||||
foreach ($customfields as $customfield) {
|
||||
$column_name = $customfield->db_column_name();
|
||||
if (e(Input::get($customfield->db_column_name())) == '1') {
|
||||
$row[] = $asset->$column_name;
|
||||
$row[] = str_replace(",", "\,", $asset->$column_name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -691,7 +708,7 @@ class ReportsController extends Controller
|
||||
$csv = implode($rows, "\n");
|
||||
$response = Response::make($csv, 200);
|
||||
$response->header('Content-Type', 'text/csv');
|
||||
$response->header('Content-disposition', 'attachment;filename=report.csv');
|
||||
$response->header('Content-disposition', 'attachment;filename='.date('Y-m-d-His').'-custom-asset-report.csv');
|
||||
|
||||
return $response;
|
||||
} else {
|
||||
@@ -699,6 +716,7 @@ class ReportsController extends Controller
|
||||
->with('error', trans('admin/reports/message.error'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getImprovementsReport
|
||||
@@ -711,8 +729,8 @@ class ReportsController extends Controller
|
||||
{
|
||||
// Grab all the improvements
|
||||
$assetMaintenances = AssetMaintenance::with('asset', 'supplier', 'asset.company')
|
||||
->orderBy('created_at', 'DESC')
|
||||
->get();
|
||||
->orderBy('created_at', 'DESC')
|
||||
->get();
|
||||
|
||||
return View::make('reports/asset_maintenances', compact('assetMaintenances'));
|
||||
|
||||
@@ -729,12 +747,13 @@ class ReportsController extends Controller
|
||||
{
|
||||
// Grab all the improvements
|
||||
$assetMaintenances = AssetMaintenance::with('asset', 'supplier')
|
||||
->orderBy('created_at', 'DESC')
|
||||
->get();
|
||||
->orderBy('created_at', 'DESC')
|
||||
->get();
|
||||
|
||||
$rows = [ ];
|
||||
|
||||
$header = [
|
||||
trans('admin/hardware/table.asset_tag'),
|
||||
trans('admin/asset_maintenances/table.asset_name'),
|
||||
trans('admin/asset_maintenances/table.supplier_name'),
|
||||
trans('admin/asset_maintenances/form.asset_maintenance_type'),
|
||||
@@ -750,6 +769,7 @@ class ReportsController extends Controller
|
||||
|
||||
foreach ($assetMaintenances as $assetMaintenance) {
|
||||
$row = [ ];
|
||||
$row[] = str_replace(',', '', e($assetMaintenance->asset->asset_tag));
|
||||
$row[] = str_replace(',', '', e($assetMaintenance->asset->name));
|
||||
$row[] = str_replace(',', '', e($assetMaintenance->supplier->name));
|
||||
$row[] = e($assetMaintenance->improvement_type);
|
||||
@@ -758,7 +778,7 @@ class ReportsController extends Controller
|
||||
$row[] = e($assetMaintenance->completion_date);
|
||||
if (is_null($assetMaintenance->asset_maintenance_time)) {
|
||||
$improvementTime = intval(Carbon::now()
|
||||
->diffInDays(Carbon::parse($assetMaintenance->start_date)));
|
||||
->diffInDays(Carbon::parse($assetMaintenance->start_date)));
|
||||
} else {
|
||||
$improvementTime = intval($assetMaintenance->asset_maintenance_time);
|
||||
}
|
||||
@@ -802,7 +822,7 @@ class ReportsController extends Controller
|
||||
|
||||
// Grab all the improvements
|
||||
$assetsForReport = Actionlog::whereIn('id', $this->getAssetsNotAcceptedYet())
|
||||
->get();
|
||||
->get();
|
||||
|
||||
$rows = [ ];
|
||||
|
||||
@@ -849,10 +869,10 @@ class ReportsController extends Controller
|
||||
protected function getCheckedOutAssetsRequiringAcceptance($modelsInCategoriesThatRequireAcceptance)
|
||||
{
|
||||
$assets = Asset::deployed()
|
||||
->inModelList($modelsInCategoriesThatRequireAcceptance)
|
||||
->select('id')
|
||||
->get()
|
||||
->toArray();
|
||||
->inModelList($modelsInCategoriesThatRequireAcceptance)
|
||||
->select('id')
|
||||
->get()
|
||||
->toArray();
|
||||
|
||||
return array_pluck($assets, 'id');
|
||||
}
|
||||
@@ -869,9 +889,9 @@ class ReportsController extends Controller
|
||||
{
|
||||
|
||||
return array_pluck(Model::inCategory($assetCategoriesRequiringAcceptance)
|
||||
->select('id')
|
||||
->get()
|
||||
->toArray(), 'id');
|
||||
->select('id')
|
||||
->get()
|
||||
->toArray(), 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -885,9 +905,9 @@ class ReportsController extends Controller
|
||||
{
|
||||
|
||||
return array_pluck(Category::requiresAcceptance()
|
||||
->select('id')
|
||||
->get()
|
||||
->toArray(), 'id');
|
||||
->select('id')
|
||||
->get()
|
||||
->toArray(), 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -52,29 +52,18 @@ class SettingsController extends Controller
|
||||
|
||||
$protocol = array_key_exists('HTTPS', $_SERVER) && ( $_SERVER['HTTPS'] == "on") ? 'https://' : 'http://';
|
||||
|
||||
|
||||
$pageURL = $protocol;
|
||||
if ($_SERVER["SERVER_PORT"] != "80") {
|
||||
$main_page = $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"];
|
||||
$pageURL .= $main_page.$_SERVER["REQUEST_URI"];
|
||||
} else {
|
||||
$main_page = $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
|
||||
$pageURL .= $main_page;
|
||||
$host = $_SERVER['SERVER_NAME'];
|
||||
if (($protocol === 'http://' && $_SERVER['SERVER_PORT'] != '80') || ($protocol === 'https://' && $_SERVER['SERVER_PORT'] != '443')) {
|
||||
$host .= ':' . $_SERVER['SERVER_PORT'];
|
||||
}
|
||||
$pageURL = $protocol . $host . $_SERVER['REQUEST_URI'];
|
||||
|
||||
$start_settings['env_location'] = $pageURL.'../.env';
|
||||
$start_settings['url_valid'] = (config('app.url').'/setup' === $pageURL);
|
||||
|
||||
$start_settings['url_config'] = config('app.url');
|
||||
$start_settings['real_url'] = $pageURL;
|
||||
|
||||
if (config('app.url').'/setup'!=$pageURL) {
|
||||
$start_settings['url_valid']= false;
|
||||
} else {
|
||||
$start_settings['url_valid']= true;
|
||||
}
|
||||
|
||||
$start_settings['url_config']= config('app.url');
|
||||
$start_settings['real_url']= $pageURL;
|
||||
|
||||
$exposed_env = @file_get_contents($main_page.'/.env');
|
||||
$exposed_env = @file_get_contents($protocol . $host.'/.env');
|
||||
|
||||
if ($exposed_env) {
|
||||
$start_settings['env_exposed'] = true;
|
||||
@@ -147,7 +136,8 @@ class SettingsController extends Controller
|
||||
try {
|
||||
Mail::send('emails.test', [], function ($m) {
|
||||
$m->to(config('mail.from.address'), config('mail.from.name'));
|
||||
$m->subject('Test Email from Snipe-IT');
|
||||
$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));
|
||||
$m->subject(trans('mail.test_email'));
|
||||
});
|
||||
return 'success';
|
||||
} catch (Exception $e) {
|
||||
@@ -199,7 +189,8 @@ class SettingsController extends Controller
|
||||
if (Input::get('email_creds')=='1') {
|
||||
Mail::send(['text' => 'emails.firstadmin'], $data, function ($m) use ($data) {
|
||||
$m->to($data['email'], $data['first_name']);
|
||||
$m->subject('Your Snipe-IT credentials');
|
||||
$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));
|
||||
$m->subject(trans('mail.your_credentials'));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ use App\Models\Setting;
|
||||
use App\Models\Statuslabel;
|
||||
use App\Http\Requests\SaveUserRequest;
|
||||
use App\Http\Requests\UpdateUserRequest;
|
||||
use Symfony\Component\HttpFoundation\StreamedResponse;
|
||||
use App\Models\User;
|
||||
use App\Models\Ldap;
|
||||
use Auth;
|
||||
@@ -81,6 +82,7 @@ class UsersController extends Controller
|
||||
|
||||
$permissions = config('permissions');
|
||||
$userPermissions = Helper::selectedPermissionsArray($permissions, Input::old('permissions', array()));
|
||||
$permissions = $this->filterDisplayable($permissions);
|
||||
|
||||
$location_list = Helper::locationsList();
|
||||
$manager_list = Helper::managerList();
|
||||
@@ -157,7 +159,8 @@ class UsersController extends Controller
|
||||
|
||||
Mail::send('emails.send-login', $data, function ($m) use ($user) {
|
||||
$m->to($user->email, $user->first_name . ' ' . $user->last_name);
|
||||
$m->subject('Welcome ' . $user->first_name);
|
||||
$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));
|
||||
$m->subject(trans('mail.welcome', ['name' => $user->first_name]));
|
||||
});
|
||||
}
|
||||
return redirect::route('users')->with('success', trans('admin/users/message.success.create'));
|
||||
@@ -209,7 +212,8 @@ class UsersController extends Controller
|
||||
|
||||
Mail::send('emails.send-login', $data, function ($m) use ($user) {
|
||||
$m->to($user->email, $user->first_name . ' ' . $user->last_name);
|
||||
$m->subject('Welcome ' . $user->first_name);
|
||||
$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));
|
||||
$m->subject(trans('mail.welcome', ['name' => $user->first_name]));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -231,6 +235,17 @@ class UsersController extends Controller
|
||||
* @param int $id
|
||||
* @return View
|
||||
*/
|
||||
|
||||
private function filterDisplayable($permissions) {
|
||||
$output = null;
|
||||
foreach($permissions as $key=>$permission) {
|
||||
$output[$key] = array_filter($permission, function($p) {
|
||||
return $p['display'] === true;
|
||||
});
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
public function getEdit($id = null)
|
||||
{
|
||||
try {
|
||||
@@ -247,7 +262,7 @@ class UsersController extends Controller
|
||||
$userGroups = $user->groups()->pluck('name', 'id');
|
||||
$user->permissions = $user->decodePermissions();
|
||||
$userPermissions = Helper::selectedPermissionsArray($permissions, $user->permissions);
|
||||
|
||||
$permissions = $this->filterDisplayable($permissions);
|
||||
$location_list = Helper::locationsList();
|
||||
$company_list = Helper::companyList();
|
||||
$manager_list = Helper::managerList();
|
||||
@@ -280,7 +295,6 @@ class UsersController extends Controller
|
||||
// permissions here before we update the user.
|
||||
$permissions = $request->input('permissions', array());
|
||||
app('request')->request->set('permissions', $permissions);
|
||||
|
||||
// Only update the email address if locking is set to false
|
||||
if (config('app.lock_passwords')) {
|
||||
return redirect()->route('users')->with('error', 'Denied! You cannot update user information on the demo.');
|
||||
@@ -331,7 +345,6 @@ class UsersController extends Controller
|
||||
$user->notes = e($request->input('notes'));
|
||||
$user->permissions = json_encode($request->input('permission'));
|
||||
|
||||
|
||||
if ($user->manager_id == "") {
|
||||
$user->manager_id = null;
|
||||
}
|
||||
@@ -533,7 +546,7 @@ class UsersController extends Controller
|
||||
$logaction->item_id = $license->id;
|
||||
$logaction->item_type = License::class;
|
||||
$logaction->target_id = $license->assigned_to;
|
||||
$logaction->target_type = User::class;
|
||||
$logaction->target_type = User::class;
|
||||
$logaction->user_id = Auth::user()->id;
|
||||
$logaction->note = 'Bulk checkin license and delete user';
|
||||
$logaction->logaction('checkin from');
|
||||
@@ -812,7 +825,7 @@ class UsersController extends Controller
|
||||
'phone' => trim(e($row[5])),
|
||||
'jobtitle' => trim(e($row[6])),
|
||||
'employee_num' => trim(e($row[7])),
|
||||
//'company_id' => Company::getIdForUser($row[8]),
|
||||
'company_id' => Company::getIdForUser($row[8]),
|
||||
'permissions' => '{"user":1}',
|
||||
'notes' => 'Imported user'
|
||||
);
|
||||
@@ -832,7 +845,8 @@ class UsersController extends Controller
|
||||
if ($newuser['email']) {
|
||||
Mail::send('emails.send-login', $data, function ($m) use ($newuser) {
|
||||
$m->to($newuser['email'], $newuser['first_name'] . ' ' . $newuser['last_name']);
|
||||
$m->subject('Welcome ' . $newuser['first_name']);
|
||||
$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));
|
||||
$m->subject(trans('mail.welcome', ['name' => $newuser['first_name']]));
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1025,7 +1039,7 @@ class UsersController extends Controller
|
||||
$logaction->user_id = Auth::user()->id;
|
||||
$logaction->note = e(Input::get('notes'));
|
||||
$logaction->target_id = null;
|
||||
$logaction->created_at = date("Y-m-d h:i:s");
|
||||
$logaction->created_at = date("Y-m-d H:i:s");
|
||||
$logaction->filename = $filename;
|
||||
$logaction->action_type = 'uploaded';
|
||||
$logaction->save();
|
||||
@@ -1265,4 +1279,89 @@ class UsersController extends Controller
|
||||
$assets = Asset::where('assigned_to', '=', $userId)->with('model')->get();
|
||||
return response()->json($assets);
|
||||
}
|
||||
|
||||
/**
|
||||
* Exports users to CSV
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v3.5]
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function getExportUserCsv()
|
||||
{
|
||||
|
||||
\Debugbar::disable();
|
||||
|
||||
|
||||
$response = new StreamedResponse(function() {
|
||||
// Open output stream
|
||||
$handle = fopen('php://output', 'w');
|
||||
|
||||
User::with('assets', 'accessories', 'consumables', 'licenses', 'manager', 'groups', 'userloc', 'company','throttle')->orderBy('created_at', 'DESC')->chunk(500, function($users) use($handle) {
|
||||
$headers=[
|
||||
// strtolower to prevent Excel from trying to open it as a SYLK file
|
||||
strtolower(trans('general.id')),
|
||||
trans('admin/companies/table.title'),
|
||||
trans('admin/users/table.title'),
|
||||
trans('admin/users/table.employee_num'),
|
||||
trans('admin/users/table.name'),
|
||||
trans('admin/users/table.username'),
|
||||
trans('admin/users/table.email'),
|
||||
trans('admin/users/table.manager'),
|
||||
trans('admin/users/table.location'),
|
||||
trans('general.assets'),
|
||||
trans('general.licenses'),
|
||||
trans('general.accessories'),
|
||||
trans('general.consumables'),
|
||||
trans('admin/users/table.groups'),
|
||||
trans('general.notes'),
|
||||
trans('admin/users/table.activated'),
|
||||
trans('general.created_at')
|
||||
];
|
||||
|
||||
fputcsv($handle, $headers);
|
||||
|
||||
foreach ($users as $user) {
|
||||
$user_groups = '';
|
||||
|
||||
foreach ($user->groups as $user_group) {
|
||||
$user_groups .= $user_group->name.', ';
|
||||
}
|
||||
|
||||
// Add a new row with data
|
||||
$values = [
|
||||
$user->id,
|
||||
($user->company) ? $user->company->name : '',
|
||||
$user->jobtitle,
|
||||
$user->employee_num,
|
||||
$user->fullName(),
|
||||
$user->username,
|
||||
$user->email,
|
||||
($user->manager) ? $user->manager->fullName() : '',
|
||||
($user->location) ? $user->location->name : '',
|
||||
$user->assets->count(),
|
||||
$user->licenses->count(),
|
||||
$user->accessories->count(),
|
||||
$user->consumables->count(),
|
||||
$user_groups,
|
||||
$user->notes,
|
||||
($user->activated=='1') ? trans('general.yes') : trans('general.no'),
|
||||
$user->created_at,
|
||||
|
||||
];
|
||||
|
||||
fputcsv($handle, $values);
|
||||
}
|
||||
});
|
||||
|
||||
// Close the output stream
|
||||
fclose($handle);
|
||||
}, 200, [
|
||||
'Content-Type' => 'text/csv',
|
||||
'Content-Disposition' => 'attachment; filename="users-'.date('Y-m-d-his').'.csv"',
|
||||
]);
|
||||
|
||||
return $response;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,16 @@ class ViewAssetsController extends Controller
|
||||
public function getIndex()
|
||||
{
|
||||
|
||||
$user = User::with('assets', 'assets.model', 'consumables', 'accessories', 'licenses', 'userloc')->withTrashed()->find(Auth::user()->id);
|
||||
$user = User::with(
|
||||
'assets',
|
||||
'assets.model',
|
||||
'consumables',
|
||||
'accessories',
|
||||
'licenses',
|
||||
'userloc',
|
||||
'userlog'
|
||||
)->withTrashed()->find(Auth::user()->id);
|
||||
|
||||
|
||||
$userlog = $user->userlog->load('item', 'user', 'target');
|
||||
|
||||
@@ -76,7 +85,7 @@ class ViewAssetsController extends Controller
|
||||
{
|
||||
$item = null;
|
||||
$fullItemType = 'App\\Models\\' . studly_case($itemType);
|
||||
if($itemType == "asset_model") {
|
||||
if ($itemType == "asset_model") {
|
||||
$itemType = "model";
|
||||
}
|
||||
$item = call_user_func(array($fullItemType, 'find'), $itemId);
|
||||
@@ -86,7 +95,7 @@ class ViewAssetsController extends Controller
|
||||
$logaction = new Actionlog();
|
||||
$logaction->item_id = $data['asset_id'] = $item->id;
|
||||
$logaction->item_type = $fullItemType;
|
||||
$logaction->created_at = $data['requested_date'] = date("Y-m-d h:i:s");
|
||||
$logaction->created_at = $data['requested_date'] = date("Y-m-d H:i:s");
|
||||
if ($user->location_id) {
|
||||
$logaction->location_id = $user->location_id;
|
||||
}
|
||||
@@ -126,7 +135,8 @@ class ViewAssetsController extends Controller
|
||||
if (($settings->alert_email!='') && ($settings->alerts_enabled=='1') && (!config('app.lock_passwords'))) {
|
||||
Mail::send('emails.asset-canceled', $data, function ($m) use ($user, $settings) {
|
||||
$m->to(explode(',', $settings->alert_email), $settings->site_name);
|
||||
$m->subject('Item Request Canceled');
|
||||
$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));
|
||||
$m->subject(trans('mail.Item_Request_Canceled'));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -159,7 +169,8 @@ class ViewAssetsController extends Controller
|
||||
if (($settings->alert_email!='') && ($settings->alerts_enabled=='1') && (!config('app.lock_passwords'))) {
|
||||
Mail::send('emails.asset-requested', $data, function ($m) use ($user, $settings) {
|
||||
$m->to(explode(',', $settings->alert_email), $settings->site_name);
|
||||
$m->subject('Item Requested');
|
||||
$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));
|
||||
$m->subject(trans('mail.Item_Requested'));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -205,7 +216,7 @@ class ViewAssetsController extends Controller
|
||||
$logaction = new Actionlog();
|
||||
$logaction->item_id = $data['asset_id'] = $asset->id;
|
||||
$logaction->item_type = Asset::class;
|
||||
$logaction->created_at = $data['requested_date'] = date("Y-m-d h:i:s");
|
||||
$logaction->created_at = $data['requested_date'] = date("Y-m-d H:i:s");
|
||||
$data['asset_type'] = 'hardware';
|
||||
if ($user->location_id) {
|
||||
$logaction->location_id = $user->location_id;
|
||||
@@ -222,7 +233,8 @@ class ViewAssetsController extends Controller
|
||||
if (($settings->alert_email!='') && ($settings->alerts_enabled=='1') && (!config('app.lock_passwords'))) {
|
||||
Mail::send('emails.asset-requested', $data, function ($m) use ($user, $settings) {
|
||||
$m->to(explode(',', $settings->alert_email), $settings->site_name);
|
||||
$m->subject('Asset Requested');
|
||||
$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));
|
||||
$m->subject(trans('mail.asset_requested'));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -311,7 +323,7 @@ class ViewAssetsController extends Controller
|
||||
// Redirect to the asset management page
|
||||
return redirect()->to('account/view-assets')->with('error', trans('admin/hardware/message.does_not_exist'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($findlog->accepted_id!='') {
|
||||
// Redirect to the asset management page
|
||||
@@ -353,7 +365,7 @@ class ViewAssetsController extends Controller
|
||||
|
||||
$logaction->note = e(Input::get('note'));
|
||||
$logaction->user_id = $user->id;
|
||||
$logaction->accepted_at = date("Y-m-d h:i:s");
|
||||
$logaction->accepted_at = date("Y-m-d H:i:s");
|
||||
$log = $logaction->logaction($logaction_msg);
|
||||
|
||||
$update_checkout = DB::table('action_logs')
|
||||
|
||||
@@ -354,19 +354,19 @@ Route::group(
|
||||
]);
|
||||
|
||||
# Asset Model Management
|
||||
Route::group([ 'prefix' => 'models', 'middleware' => 'auth' ], function () {
|
||||
Route::group([ 'prefix' => 'models', 'middleware' => ['auth'] ], function () {
|
||||
|
||||
Route::get('/', [ 'as' => 'models', 'uses' => 'AssetModelsController@getIndex' ]);
|
||||
Route::get('create', [ 'as' => 'create/model', 'uses' => 'AssetModelsController@getCreate' ]);
|
||||
Route::get('create', [ 'as' => 'create/model', 'uses' => 'AssetModelsController@getCreate', 'middleware' => ['authorize:superuser'] ]);
|
||||
Route::post('create', 'AssetModelsController@postCreate');
|
||||
Route::get('{modelId}/edit', [ 'as' => 'update/model', 'uses' => 'AssetModelsController@getEdit' ]);
|
||||
Route::post('{modelId}/edit', 'AssetModelsController@postEdit');
|
||||
Route::get('{modelId}/edit', [ 'as' => 'update/model', 'uses' => 'AssetModelsController@getEdit' , 'middleware' => ['authorize:superuser']]);
|
||||
Route::post('{modelId}/edit', [ 'uses' => 'AssetModelsController@postEdit', 'middleware' => ['authorize:superuser']]);
|
||||
Route::get('{modelId}/clone', [ 'as' => 'clone/model', 'uses' => 'AssetModelsController@getClone' ]);
|
||||
Route::post('{modelId}/clone', 'AssetModelsController@postCreate');
|
||||
Route::get('{modelId}/delete', [ 'as' => 'delete/model', 'uses' => 'AssetModelsController@getDelete' ]);
|
||||
Route::get('{modelId}/delete', [ 'as' => 'delete/model', 'uses' => 'AssetModelsController@getDelete', 'middleware' => ['authorize:superuser'] ]);
|
||||
Route::get('{modelId}/view', [ 'as' => 'view/model', 'uses' => 'AssetModelsController@getView' ]);
|
||||
Route::get('{modelID}/restore', [ 'as' => 'restore/model', 'uses' => 'AssetModelsController@getRestore' ]);
|
||||
Route::get('{modelID}/restore', [ 'as' => 'restore/model', 'uses' => 'AssetModelsController@getRestore', 'middleware' => ['authorize:superuser'] ]);
|
||||
Route::get('{modelId}/custom_fields', ['as' => 'custom_fields/model','uses' => 'AssetModelsController@getCustomFields']);
|
||||
Route::get('/', [ 'as' => 'models', 'uses' => 'AssetModelsController@getIndex' ,'middleware' => ['authorize:superuser'] ]);
|
||||
});
|
||||
|
||||
Route::get('/', [
|
||||
@@ -730,7 +730,7 @@ Route::group([ 'prefix' => 'admin','middleware' => ['web','auth']], function ()
|
||||
[ 'as' => 'update/location', 'uses' => 'LocationsController@getEdit' ]
|
||||
);
|
||||
Route::post('{locationId}/edit', 'LocationsController@postEdit');
|
||||
Route::get('{locationId}/view', 'LocationsController@getView');
|
||||
Route::get('{locationId}/view', [ 'as' => 'view/location', 'uses' => 'LocationsController@getView' ]);
|
||||
Route::get(
|
||||
'{locationId}/delete',
|
||||
[ 'as' => 'delete/location', 'uses' => 'LocationsController@getDelete' ]
|
||||
@@ -774,6 +774,7 @@ Route::group([ 'prefix' => 'admin','middleware' => ['web','auth']], function ()
|
||||
Route::post('create', [ 'uses' => 'UsersController@postCreate', 'middleware' => ['authorize:users.edit'] ]);
|
||||
Route::get('import', [ 'as' => 'import/user', 'uses' => 'UsersController@getImport', 'middleware' => ['authorize:users.edit'] ]);
|
||||
Route::post('import', [ 'uses' => 'UsersController@postImport', 'middleware' => ['authorize:users.edit'] ]);
|
||||
Route::get('export', [ 'uses' => 'UsersController@getExportUserCsv', 'middleware' => ['authorize:users.view'] ]);
|
||||
Route::get('{userId}/edit', [ 'as' => 'update/user', 'uses' => 'UsersController@getEdit', 'middleware' => ['authorize:users.edit'] ]);
|
||||
Route::post('{userId}/edit', [ 'uses' => 'UsersController@postEdit', 'middleware' => ['authorize:users.edit'] ]);
|
||||
Route::get('{userId}/clone', [ 'as' => 'clone/user', 'uses' => 'UsersController@getClone', 'middleware' => ['authorize:users.edit'] ]);
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
/**
|
||||
* Model for the Actionlog (the table that keeps a historical log of
|
||||
@@ -12,10 +13,9 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
*
|
||||
* @version v1.0
|
||||
*/
|
||||
class Actionlog extends Model implements ICompanyableChild
|
||||
class Actionlog extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
use CompanyableChildTrait;
|
||||
|
||||
protected $dates = [ 'deleted_at' ];
|
||||
|
||||
@@ -23,11 +23,23 @@ class Actionlog extends Model implements ICompanyableChild
|
||||
public $timestamps = true;
|
||||
protected $fillable = [ 'created_at', 'item_type','user_id','item_id','action_type','note','target_id', 'target_type' ];
|
||||
|
||||
public function getCompanyableParents()
|
||||
// Overridden from Builder to automatically add the company
|
||||
public static function boot()
|
||||
{
|
||||
return [ 'accessorylog', 'assetlog', 'licenselog', 'consumablelog' ];
|
||||
parent::boot();
|
||||
static::creating( function (Actionlog $actionlog) {
|
||||
// If the admin is a superadmin, let's see if the target instead has a company.
|
||||
if (Auth::user() && Auth::user()->isSuperUser()) {
|
||||
if ($actionlog->target) {
|
||||
$actionlog->company_id = $actionlog->target->company_id;
|
||||
} else if ($actionlog->item) {
|
||||
$actionlog->company_id = $actionlog->item->company_id;
|
||||
}
|
||||
} else if (Auth::user() && Auth::user()->company) {
|
||||
$actionlog->company_id = Auth::user()->company_id;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Eloquent Relationships below
|
||||
public function item()
|
||||
{
|
||||
|
||||
@@ -152,7 +152,8 @@ class Asset extends Depreciable
|
||||
|
||||
\Mail::send('emails.accept-asset', $data, function ($m) use ($user) {
|
||||
$m->to($user->email, $user->first_name . ' ' . $user->last_name);
|
||||
$m->subject('Confirm asset delivery');
|
||||
$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));
|
||||
$m->subject(trans('mail.Confirm_asset_delivery'));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -577,12 +578,12 @@ public function checkin_email()
|
||||
public function scopeAssetsByLocation($query, $location)
|
||||
{
|
||||
return $query->where(function ($query) use ($location) {
|
||||
|
||||
|
||||
$query->whereHas('assigneduser', function ($query) use ($location) {
|
||||
|
||||
|
||||
$query->where('users.location_id', '=', $location->id);
|
||||
})->orWhere(function ($query) use ($location) {
|
||||
|
||||
|
||||
$query->where('assets.rtd_location_id', '=', $location->id);
|
||||
$query->whereNull('assets.assigned_to');
|
||||
});
|
||||
|
||||
@@ -136,7 +136,8 @@ final class Company extends Model
|
||||
|
||||
public static function scopeCompanyables($query, $column = 'company_id')
|
||||
{
|
||||
if (!static::isFullMultipleCompanySupportEnabled() || (Auth::check() && Auth::user()->isSuperUser())) {
|
||||
// If not logged in and hitting this, assume we are on the command line and don't scope?'
|
||||
if (!static::isFullMultipleCompanySupportEnabled() || (Auth::check() && Auth::user()->isSuperUser()) || (!Auth::check())) {
|
||||
return $query;
|
||||
} else {
|
||||
return static::scopeCompanyablesDirectly($query, $column);
|
||||
@@ -176,4 +177,27 @@ final class Company extends Model
|
||||
return e($company->name);
|
||||
}
|
||||
}
|
||||
|
||||
public function users() {
|
||||
return $this->hasMany(User::class);
|
||||
}
|
||||
|
||||
public function assets() {
|
||||
return $this->hasMany(Asset::class);
|
||||
}
|
||||
|
||||
public function licenses() {
|
||||
return $this->hasMany(License::class);
|
||||
}
|
||||
public function accessories() {
|
||||
return $this->hasMany(Accessory::class);
|
||||
}
|
||||
|
||||
public function consumables() {
|
||||
return $this->hasMany(Consumable::class);
|
||||
}
|
||||
|
||||
public function components() {
|
||||
return $this->hasMany(Component::class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,6 +214,7 @@ class License extends Depreciable
|
||||
->orWhere('serial', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('notes', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('order_number', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('purchase_order', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('purchase_date', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('purchase_cost', 'LIKE', '%'.$search.'%');
|
||||
});
|
||||
|
||||
@@ -81,6 +81,33 @@ trait Loggable
|
||||
return $log;
|
||||
}
|
||||
|
||||
/**
|
||||
* @author Daniel Meltzer <parallelgrapefruit@gmail.com
|
||||
* @since [v3.5]
|
||||
* @return \App\Models\Actionlog
|
||||
*/
|
||||
public function logCreate($note = null)
|
||||
{
|
||||
$user_id = -1;
|
||||
if (Auth::user()) {
|
||||
$user_id = Auth::user()->id;
|
||||
}
|
||||
$log = new Actionlog;
|
||||
if (static::class == LicenseSeat::class) {
|
||||
$log->item_type = License::class;
|
||||
$log->item_id = $this->license_id;
|
||||
} else {
|
||||
$log->item_type = static::class;
|
||||
$log->item_id = $this->id;
|
||||
}
|
||||
$log->location_id = null;
|
||||
$log->note = $note;
|
||||
$log->user_id = $user_id;
|
||||
$log->logaction('created');
|
||||
$log->save();
|
||||
return $log;
|
||||
}
|
||||
|
||||
/**
|
||||
* @author Daniel Meltzer <parallelgrapefruit@gmail.com
|
||||
* @since [v3.4]
|
||||
|
||||
@@ -261,6 +261,12 @@ class AuthServiceProvider extends ServiceProvider
|
||||
}
|
||||
});
|
||||
|
||||
$gate->define('components.checkout', function ($user) {
|
||||
if (($user->hasAccess('components.checkout')) || ($user->hasAccess('admin'))) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
// Checks for some level of management
|
||||
$gate->define('components.manage', function ($user) {
|
||||
if (($user->hasAccess('components.edit')) || ($user->hasAccess('components.delete')) || ($user->hasAccess('components.checkout')) || ($user->hasAccess('admin'))) {
|
||||
|
||||
0
config/app.php
Normal file → Executable file
0
config/app.php
Normal file → Executable file
0
config/database.php
Normal file → Executable file
0
config/database.php
Normal file → Executable file
24
config/mail.php
Normal file → Executable file
24
config/mail.php
Normal file → Executable file
@@ -3,6 +3,12 @@
|
||||
return [
|
||||
|
||||
/*
|
||||
| ***************************************************************************
|
||||
| DO NOT MAKE CHANGES DIRECTLY TO THIS FILE.
|
||||
|
|
||||
| Instead use your .env file to set your application configuration settings.
|
||||
| See https://snipe-it.readme.io/docs/configuration for more info.
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Mail Driver
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -11,6 +17,7 @@ return [
|
||||
| sending of e-mail. You may specify which one you're using throughout
|
||||
| your application here. By default, Laravel is setup for SMTP mail.
|
||||
|
|
||||
|
|
||||
| Supported: "smtp", "mail", "sendmail", "mailgun", "mandrill", "ses", "log"
|
||||
|
|
||||
*/
|
||||
@@ -56,6 +63,23 @@ return [
|
||||
|
||||
'from' => ['address' => env('MAIL_FROM_ADDR', null), 'name' => env('MAIL_FROM_NAME', null)],
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Global "Reply-To" Address
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may wish for all e-mails sent by your application to have a different "Reply-to"
|
||||
| address than the "From" address. If this is left blank, the application will use
|
||||
| your MAIL_FROM information.
|
||||
|
|
||||
*/
|
||||
|
||||
'reply_to' => [
|
||||
'address' => env('MAIL_REPLYTO_ADDR', env('MAIL_FROM_ADDR', null)),
|
||||
'name' => env('MAIL_REPLYTO_NAME', env('MAIL_FROM_NAME', null))
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| E-Mail Encryption Protocol
|
||||
|
||||
@@ -106,7 +106,7 @@ return array(
|
||||
'display' => true,
|
||||
),
|
||||
array(
|
||||
'permission' => 'accessory.create',
|
||||
'permission' => 'accessories.create',
|
||||
'label' => 'Create ',
|
||||
'note' => '',
|
||||
'display' => true,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
return array (
|
||||
'app_version' => 'v3.5-beta',
|
||||
'hash_version' => 'v3.5-29-g6dc143d',
|
||||
'app_version' => 'v3.5.0',
|
||||
'hash_version' => 'v3.5.0-30-gf9a06a1',
|
||||
);
|
||||
|
||||
@@ -25,6 +25,7 @@ $factory->defineAs(App\Models\Asset::class, 'asset', function (Faker\Generator $
|
||||
'order_number' => $faker->numberBetween(1000000,50000000),
|
||||
'supplier_id' => $faker->numberBetween(1,5),
|
||||
'requestable' => $faker->numberBetween(0,1),
|
||||
'company_id' => \App\Models\Company::inRandomOrder()->first()->id
|
||||
];
|
||||
});
|
||||
|
||||
@@ -96,6 +97,7 @@ $factory->defineAs(App\Models\Component::class, 'component', function (Faker\Gen
|
||||
'category_id' => $faker->numberBetween(21,25),
|
||||
'total_qty' => $faker->numberBetween(3, 10),
|
||||
'min_amt' => $faker->numberBetween($min = 1, $max = 2),
|
||||
'company_id' => \App\Models\Company::inRandomOrder()->first()->id
|
||||
];
|
||||
});
|
||||
|
||||
@@ -113,6 +115,7 @@ $factory->defineAs(App\Models\Accessory::class, 'accessory', function (Faker\Gen
|
||||
'qty' => $faker->numberBetween(5, 10),
|
||||
'location_id' => $faker->numberBetween(1,5),
|
||||
'min_amt' => $faker->numberBetween($min = 1, $max = 2),
|
||||
'company_id' => \App\Models\Company::inRandomOrder()->first()->id
|
||||
];
|
||||
});
|
||||
|
||||
@@ -138,6 +141,7 @@ $factory->defineAs(App\Models\Consumable::class, 'consumable', function (Faker\G
|
||||
'company_id' => $faker->numberBetween(1, 10),
|
||||
'qty' => $faker->numberBetween(5, 10),
|
||||
'min_amt' => $faker->numberBetween($min = 1, $max = 2),
|
||||
'company_id' => \App\Models\Company::inRandomOrder()->first()->id
|
||||
|
||||
];
|
||||
});
|
||||
@@ -251,6 +255,7 @@ $factory->defineAs(App\Models\License::class, 'license', function (Faker\Generat
|
||||
'purchase_date' => $faker->dateTime(),
|
||||
'purchase_cost' => $faker->randomFloat(2),
|
||||
'notes' => $faker->sentence,
|
||||
'company_id' => \App\Models\Company::inRandomOrder()->first()->id
|
||||
];
|
||||
});
|
||||
|
||||
@@ -265,19 +270,82 @@ $factory->defineAs(App\Models\LicenseSeat::class, 'license-seat', function (Fake
|
||||
});
|
||||
|
||||
$factory->defineAs(App\Models\Actionlog::class, 'asset-checkout', function (Faker\Generator $faker) {
|
||||
$company = \App\Models\Company::has('users')->has('assets')->inRandomOrder()->first();
|
||||
return [
|
||||
'user_id' => 1,
|
||||
'user_id' => $company->users()->inRandomOrder()->first()->id,
|
||||
'action_type' => 'checkout',
|
||||
'item_id' => $faker->numberBetween(1, 10),
|
||||
'target_id' => 1,
|
||||
'item_id' => $company->assets()->inRandomOrder()->first()->id,
|
||||
'target_id' => $company->users()->inRandomOrder()->first()->id,
|
||||
'target_type' => 'App\\Models\\User',
|
||||
'created_at' => $faker->dateTime(),
|
||||
'item_type' => 'App\\Models\\Asset',
|
||||
'note' => $faker->sentence,
|
||||
'user_id' => '1',
|
||||
'company_id' => $company->id
|
||||
];
|
||||
});
|
||||
|
||||
$factory->defineAs(App\Models\Actionlog::class, 'license-checkout-asset', function (Faker\Generator $faker) {
|
||||
$company = \App\Models\Company::has('users')->has('licenses')->inRandomOrder()->first();
|
||||
|
||||
return [
|
||||
'user_id' => $company->users()->inRandomOrder()->first()->id,
|
||||
'action_type' => 'checkout',
|
||||
'item_id' => $company->licenses()->whereNotNull('company_id')->inRandomOrder()->first()->id,
|
||||
'target_id' => $company->assets()->inRandomOrder()->first()->id,
|
||||
'target_type' => 'App\\Models\\Asset',
|
||||
'created_at' => $faker->dateTime(),
|
||||
'item_type' => 'App\\Models\\License',
|
||||
'note' => $faker->sentence,
|
||||
'company_id' => $company->id
|
||||
];
|
||||
});
|
||||
|
||||
$factory->defineAs(App\Models\Actionlog::class, 'accessory-checkout', function (Faker\Generator $faker) {
|
||||
$company = \App\Models\Company::has('users')->has('accessories')->inRandomOrder()->first();
|
||||
return [
|
||||
'user_id' => $company->users()->inRandomOrder()->first()->id,
|
||||
'action_type' => 'checkout',
|
||||
'item_id' => $company->accessories()->whereNotNull('company_id')->inRandomOrder()->first()->id,
|
||||
'target_id' => $company->users()->inRandomOrder()->first()->id,
|
||||
'target_type' => 'App\\Models\\User',
|
||||
'created_at' => $faker->dateTime(),
|
||||
'item_type' => 'App\\Models\\Accessory',
|
||||
'note' => $faker->sentence,
|
||||
'company_id' => $company->id
|
||||
];
|
||||
});
|
||||
|
||||
$factory->defineAs(App\Models\Actionlog::class, 'consumable-checkout', function (Faker\Generator $faker) {
|
||||
$company = \App\Models\Company::has('users')->has('consumables')->inRandomOrder()->first();
|
||||
|
||||
return [
|
||||
'user_id' => $company->users()->inRandomOrder()->first()->id,
|
||||
'action_type' => 'checkout',
|
||||
'item_id' => $company->consumables()->whereNotNull('company_id')->inRandomOrder()->first()->id,
|
||||
'target_id' => $company->users()->inRandomOrder()->first()->id,
|
||||
'target_type' => 'App\\Models\\User',
|
||||
'created_at' => $faker->dateTime(),
|
||||
'item_type' => 'App\\Models\\Consumable',
|
||||
'note' => $faker->sentence,
|
||||
'company_id' => $company->id
|
||||
];
|
||||
});
|
||||
|
||||
$factory->defineAs(App\Models\Actionlog::class, 'component-checkout', function (Faker\Generator $faker) {
|
||||
$company = \App\Models\Company::has('users')->has('components')->inRandomOrder()->first();
|
||||
|
||||
return [
|
||||
'user_id' => $company->users()->inRandomOrder()->first()->id,
|
||||
'action_type' => 'checkout',
|
||||
'item_id' => $company->components()->whereNotNull('company_id')->inRandomOrder()->first()->id,
|
||||
'target_id' => $company->users()->inRandomOrder()->first()->id,
|
||||
'target_type' => 'App\\Models\\User',
|
||||
'created_at' => $faker->dateTime(),
|
||||
'item_type' => 'App\\Models\\Component',
|
||||
'note' => $faker->sentence,
|
||||
'company_id' => $company->id
|
||||
];
|
||||
});
|
||||
|
||||
$factory->defineAs(App\Models\CustomField::class, 'customfield-ip', function (Faker\Generator $faker) {
|
||||
return [
|
||||
@@ -295,5 +363,6 @@ $factory->defineAs(App\Models\User::class, 'valid-user', function (Faker\Generat
|
||||
'email' => $faker->safeEmail,
|
||||
'password' => $faker->password,
|
||||
'username' => $faker->username,
|
||||
'company_id' => \App\Models\Company::inRandomOrder()->first()->id
|
||||
];
|
||||
});
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class FixModelnoInConsumablesToString extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('consumables', function ($table) {
|
||||
$table->string('model_no')->nullable()->default(null)->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('consumables', function ($table) {
|
||||
$table->integer('model_no')->nullable()->default(null)->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Actionlog;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class AddCompanyToLogs extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('action_logs', function (Blueprint $table) {
|
||||
//
|
||||
$table->integer('company_id')->nullable()->default(null);
|
||||
});
|
||||
|
||||
$logs = Actionlog::with('item')->get();
|
||||
foreach ($logs as $log) {
|
||||
if($log->item) {
|
||||
$log->company_id = $log->item->company_id;
|
||||
$log->save();
|
||||
} else {
|
||||
var_dump($log);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('action_logs', function (Blueprint $table) {
|
||||
//
|
||||
$table->dropColumn('company_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class FixOrderNumberToVarchar extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('consumables', function ($table) {
|
||||
$table->string('order_number')->nullable()->default(null)->change();
|
||||
});
|
||||
|
||||
Schema::table('components', function ($table) {
|
||||
$table->string('order_number')->nullable()->default(null)->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('consumables', function ($table) {
|
||||
$table->integer('order_number')->nullable()->default(null)->change();
|
||||
});
|
||||
|
||||
Schema::table('components', function ($table) {
|
||||
$table->integer('order_number')->nullable()->default(null)->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class FixOrderNumberInComponentsToString extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('components', function ($table) {
|
||||
$table->string('order_number')->nullable()->default(null)->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('components', function ($table) {
|
||||
$table->integer('order_number')->nullable()->default(null)->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,10 @@ class ActionlogSeeder extends Seeder
|
||||
public function run()
|
||||
{
|
||||
Actionlog::truncate();
|
||||
factory(Actionlog::class, 'asset-checkout',5)->create();
|
||||
factory(Actionlog::class, 'asset-checkout',25)->create();
|
||||
factory(Actionlog::class, 'accessory-checkout',15)->create();
|
||||
factory(Actionlog::class, 'consumable-checkout', 15)->create();
|
||||
factory(Actionlog::class, 'component-checkout', 15)->create();
|
||||
factory(Actionlog::class, 'license-checkout-asset', 15)->create();
|
||||
}
|
||||
}
|
||||
|
||||
19
database/seeds/CompanySeeder.php
Normal file
19
database/seeds/CompanySeeder.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Company;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class CompanySeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
//
|
||||
Company::truncate();
|
||||
factory(Company::class, 'company', 4)->create();
|
||||
}
|
||||
}
|
||||
@@ -14,9 +14,12 @@ class DatabaseSeeder extends Seeder
|
||||
{
|
||||
Model::unguard();
|
||||
|
||||
$this->call(CompanySeeder::class);
|
||||
$this->call(UserSeeder::class);
|
||||
$this->call(AssetModelSeeder::class);
|
||||
$this->call(AccessorySeeder::class);
|
||||
$this->call(AssetSeeder::class);
|
||||
$this->call(ComponentSeeder::class);
|
||||
$this->call(ConsumableSeeder::class);
|
||||
$this->call(StatuslabelSeeder::class);
|
||||
$this->call(SupplierSeeder::class);
|
||||
@@ -27,7 +30,6 @@ class DatabaseSeeder extends Seeder
|
||||
$this->call(ManufacturerSeeder::class);
|
||||
$this->call(LocationSeeder::class);
|
||||
$this->call(CustomFieldSeeder::class);
|
||||
$this->call(ComponentSeeder::class);
|
||||
|
||||
Model::reguard();
|
||||
}
|
||||
|
||||
18
database/seeds/UserSeeder.php
Normal file
18
database/seeds/UserSeeder.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class UserSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
// Don't truncate the user column, that might suck.
|
||||
factory(User::class, 'valid-user', 10)->create();
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,8 @@ MAIL_ENV_FROM_NAME=Brady Wetherington
|
||||
MAIL_ENV_ENCRYPTION=tcp
|
||||
MAIL_ENV_USERNAME=uberbrady@gmail.com
|
||||
MAIL_ENV_PASSWORD=N7AqLufTZMULWHWYwJ0ZCw
|
||||
MAIL_ENV_REPLYTO_ADDR=you@example.com
|
||||
MAIL_ENV_REPLYTO_NAME='Snipe-IT'
|
||||
|
||||
#SNIPE-IT Variables
|
||||
APP_ENV=develop
|
||||
|
||||
@@ -3,13 +3,14 @@
|
||||
return array(
|
||||
'about_consumables_title' => 'حول المواد الاستهلاكية',
|
||||
'about_consumables_text' => 'المواد الاستهلاكية هي الأشياء المشتراة والتي ستستخدم مع مرور الوقت. على سبيل المثال، حبر الطابعة أو ورق الناسخة.',
|
||||
'consumable_name' => 'اسم المادة الإستهلاكية',
|
||||
'cost' => 'تكلفة الشراء',
|
||||
'create' => 'إنشاء مادة إستهلاكية',
|
||||
'date' => 'تاريخ الشراء',
|
||||
'item_no' => 'رقم القطعة.',
|
||||
'order' => 'رقم طلب الشراء',
|
||||
'remaining' => 'المتبقية',
|
||||
'total' => 'المجموع',
|
||||
'checkout' => 'Checkout Consumable to User',
|
||||
'consumable_name' => 'اسم المادة الإستهلاكية',
|
||||
'cost' => 'تكلفة الشراء',
|
||||
'create' => 'إنشاء مادة إستهلاكية',
|
||||
'date' => 'تاريخ الشراء',
|
||||
'item_no' => 'رقم القطعة.',
|
||||
'order' => 'رقم طلب الشراء',
|
||||
'remaining' => 'المتبقية',
|
||||
'total' => 'المجموع',
|
||||
'update' => 'تحديث المادة الإستهلاكية',
|
||||
);
|
||||
|
||||
@@ -6,15 +6,16 @@ return array(
|
||||
'about_fieldsets_title' => 'حول مجموعة الحقول',
|
||||
'about_fieldsets_text' => 'مجموعات-الحقول تسمح لك بإنشاء مجموعات من الحقول اللتي يمكن إعادة إستخدامها مع أنواع موديل محدد.',
|
||||
'custom_format' => 'Custom format...',
|
||||
'encrypt_field' => 'Encrypt the value of this field in the database',
|
||||
'encrypt_field' => 'Encrypt the value of this field in the database for each asset. The decrypted value of this field will only be viewable by admins.',
|
||||
'encrypt_field_help' => 'WARNING: Encrypting a field makes it unsearchable.',
|
||||
'encrypted' => 'Encrypted',
|
||||
'fieldset' => 'مجموعة-حقول',
|
||||
'qty_fields' => 'الحقول الكمية',
|
||||
'fieldsets' => 'مجموعات-الحقول',
|
||||
'fieldset_name' => 'إسم مجموعة-الحقل',
|
||||
'field_name' => 'إسم الحقل',
|
||||
'field_values' => 'Field Values',
|
||||
'field_values_help' => 'Add selectable options, one per line. Blank lines other than the first line will be ignored.',
|
||||
'field_values_help' => 'Add selectable options, one per line. Blank lines other than the first line will be ignored. Separate values and labels by pipes on each line (optional).',
|
||||
'field_element' => 'عنصر النموذج',
|
||||
'field_element_short' => 'عنصر',
|
||||
'field_format' => 'صيغة',
|
||||
@@ -25,4 +26,5 @@ return array(
|
||||
'order' => 'Order',
|
||||
'create_fieldset' => 'مجموعة-حقول جديدة',
|
||||
'create_field' => 'حقل جديد مخصص',
|
||||
'value_encrypted' => 'The value of this field is encrypted in the database. Only admin users will be able to view the decrypted value',
|
||||
);
|
||||
|
||||
@@ -12,7 +12,8 @@ return array(
|
||||
'edit' => 'Edit Asset',
|
||||
'filetype_info' => 'Allowed filetypes are png, gif, jpg, jpeg, doc, docx, pdf, txt, zip, and rar.',
|
||||
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.<br/> <a href="/hardware/models/:model_id/restore">Click here to restore the model</a>.',
|
||||
'requestable' => 'Requestable',
|
||||
'requestable' => 'Requestable',
|
||||
'requested' => 'Requested',
|
||||
'restore' => 'Restore Asset',
|
||||
'pending' => 'Pending',
|
||||
'undeployable' => 'Undeployable',
|
||||
|
||||
@@ -37,9 +37,11 @@ return array(
|
||||
),
|
||||
|
||||
'import' => array(
|
||||
'error' => 'Some items did not import correctly.',
|
||||
'errorDetail' => 'The following Items were not imported because of errors.',
|
||||
'success' => "Your file has been imported",
|
||||
'error' => 'Some items did not import correctly.',
|
||||
'errorDetail' => 'The following Items were not imported because of errors.',
|
||||
'success' => "Your file has been imported",
|
||||
'file_delete_success' => "Your file has been been successfully deleted",
|
||||
'file_delete_error' => "The file was unable to be deleted",
|
||||
),
|
||||
|
||||
|
||||
@@ -67,6 +69,7 @@ return array(
|
||||
'requests' => array(
|
||||
'error' => 'Asset was not requested, please try again',
|
||||
'success' => 'Asset requested successfully.',
|
||||
'canceled' => 'Checkout request successfully canceled'
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
@@ -23,7 +23,7 @@ return array(
|
||||
'error' => 'File(s) not uploaded. Please try again.',
|
||||
'success' => 'File(s) successfully uploaded.',
|
||||
'nofiles' => 'You did not select any files for upload, or the file you are trying to upload is too large',
|
||||
'invalidfiles' => 'One or more of your files is too large or is a filetype that is not allowed. Allowed filetypes are png, gif, jpg, doc, docx, pdf, and txt.',
|
||||
'invalidfiles' => 'One or more of your files is too large or is a filetype that is not allowed. Allowed filetypes are png, gif, jpg, doc, docx, pdf, txt, zip, rar, and rtf.',
|
||||
),
|
||||
|
||||
'update' => array(
|
||||
|
||||
@@ -4,6 +4,7 @@ return array(
|
||||
|
||||
'deleted' => 'This model has been deleted. <a href="/hardware/models/:model_id/restore">Click here to restore it</a>.',
|
||||
'restore' => 'Restore Model',
|
||||
'requestable' => 'Users may request this model',
|
||||
'show_mac_address' => 'Show MAC address field in assets in this model',
|
||||
'view_deleted' => 'View Deleted',
|
||||
'view_models' => 'View Models',
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
'consumables' => 'Consumables',
|
||||
'country' => 'الدولة',
|
||||
'create' => 'إضافة',
|
||||
'created' => 'Item Created',
|
||||
'created_asset' => 'الأصول المضافة',
|
||||
'created_at' => 'أنشئت في',
|
||||
'currency' => '$', // this is deprecated
|
||||
@@ -127,6 +128,7 @@
|
||||
'remove_company' => 'Remove Company Association',
|
||||
'reports' => 'التقارير',
|
||||
'requested' => 'Requested',
|
||||
'request_canceled' => 'Request Canceled',
|
||||
'save' => 'حفظ',
|
||||
'select' => 'Select',
|
||||
'search' => 'Search',
|
||||
@@ -151,6 +153,8 @@
|
||||
'suppliers' => 'الموردون',
|
||||
'total_assets' => 'إجمالي الأصول',
|
||||
'total_licenses' => 'إجمالي الرخص',
|
||||
'total_accessories' => 'total accessories',
|
||||
'total_consumables' => 'total consumables',
|
||||
'type' => 'Type',
|
||||
'undeployable' => 'غير قابلة للتوزيع',
|
||||
'unknown_admin' => 'إداري غير معروف',
|
||||
|
||||
74
resources/lang/ar/mail.php
Normal file
74
resources/lang/ar/mail.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'a_user_canceled' => 'A user has canceled an item request on the website',
|
||||
'a_user_requested' => 'A user has requested an item on the website',
|
||||
'accessory_name' => 'Accessory Name:',
|
||||
'additional_notes' => 'Additional Notes:',
|
||||
'admin_has_created' => 'An administrator has created an account for you on the :web website.',
|
||||
'asset' => 'Asset:',
|
||||
'asset_name' => 'Asset Name:',
|
||||
'asset_requested' => 'Asset requested',
|
||||
'asset_tag' => 'Asset Tag:',
|
||||
'assets_warrantee_expiring' => '{1} asset with warrantee expiring in the next 60 days.|[2,Inf] assets with warrantees
|
||||
expiring in the next 60 days.',
|
||||
'assigned_to' => 'Assigned To',
|
||||
'best_regards' => 'Best regards,',
|
||||
'canceled' => 'Canceled:',
|
||||
'checkin_date' => 'Checkin Date:',
|
||||
'checkout_date' => 'Checkout Date:',
|
||||
'click_to_confirm' => 'Please click on the following link to confirm your :web account:',
|
||||
'click_on_the_link_accessory' => 'Please click on the link at the bottom to confirm that you have received the accessory.',
|
||||
'click_on_the_link_asset' => 'Please click on the link at the bottom to confirm that you have received the asset.',
|
||||
'Confirm_Asset_Checkin' => 'Confirm Asset Checkin.',
|
||||
'Confirm_Accessory_Checkin' => 'Confirm Accessory Checkin.',
|
||||
'Confirm_accessory_delivery' => 'Confirm accessory delivery.',
|
||||
'Confirm_asset_delivery' => 'Confirm asset delivery.',
|
||||
'Confirm_consumable_delivery' => 'Confirm consumable delivery.',
|
||||
'current_QTY' => 'Current QTY',
|
||||
'Days' => 'Days',
|
||||
'days' => 'Days',
|
||||
'expecting_checkin_date' => 'Expected Checkin Date:',
|
||||
'expires' => 'Expires',
|
||||
'Expiring_Assets_Report' => 'Expiring Assets Report.',
|
||||
'Expiring_Licenses_Report' => 'Expiring Licenses Report.',
|
||||
'hello' => 'Hello',
|
||||
'hi' => 'Hi',
|
||||
'i_have_read' => 'I have read and agree to the terms of use, and have received this item.',
|
||||
'item' => 'Item:',
|
||||
'items_below_minimum' => '{1} item that is below minimum inventory or will soon be low.|[2,Inf] items that are below minimum
|
||||
inventory or will soon be low.',
|
||||
'Item_Request_Canceled' => 'Item Request Canceled',
|
||||
'Item_Requested' => 'Item Requested',
|
||||
'licenses_expiring' => '{1} license expiring next 60 days.|[2,Inf] licenses expiring next 60 days.',
|
||||
'link_to_update_password' => 'Please click on the following link to update your :web password:',
|
||||
'login_first_admin' => 'Login to your new Snipe-IT installation using the credentials below:',
|
||||
'login' => 'Login:',
|
||||
'Low_Inventory_Report' => 'Low Inventory Report',
|
||||
'min_QTY' => 'Min QTY',
|
||||
'name' => 'Name',
|
||||
'new_item_checked' => 'A new item has been checked out under your name, details are below.',
|
||||
'password' => 'Password:',
|
||||
'password_reset' => 'Password Reset',
|
||||
|
||||
'read_the_terms' => 'Please read the terms of use below.',
|
||||
'read_the_terms_and_click' => 'Please read the terms of use below, and click on the link at the bottom to confirm that you read
|
||||
and agree to the terms of use, and have received the asset.',
|
||||
'requested' => 'Requested:',
|
||||
'reset_link' => 'Your Password Reset Link',
|
||||
'reset_password' => 'Click here to reset your password:',
|
||||
'serial' => 'Serial:',
|
||||
'supplier' => 'Supplier',
|
||||
'tag' => 'Tag',
|
||||
'test_email' => 'Test Email from Snipe-IT',
|
||||
'test_mail_text' => 'This is a test from the Snipe-IT Asset Management System. If you got this, mail is working :)',
|
||||
'the_following_item' => 'The following item has been checked in: ',
|
||||
'There_are' => '{1} There is|[2,Inf] There are',
|
||||
'to_reset' => 'To reset your :web password, complete this form:',
|
||||
'type' => 'Type',
|
||||
'user' => 'User:',
|
||||
'username' => 'Username:',
|
||||
'welcome' => 'Welcome :name',
|
||||
'welcome_to' => 'Welcome to :web!',
|
||||
'your_credentials' => 'Your Snipe-IT credentials',
|
||||
);
|
||||
@@ -3,13 +3,14 @@
|
||||
return array(
|
||||
'about_consumables_title' => 'Относно консумативите',
|
||||
'about_consumables_text' => 'Консумативите са всички неща, купувани във времето. Например тонер за принтер или хартия.',
|
||||
'consumable_name' => 'Консуматив',
|
||||
'cost' => 'Стойност на закупуване',
|
||||
'create' => 'Създаване на консуматив',
|
||||
'date' => 'Дата на закупуване',
|
||||
'item_no' => 'Item No.',
|
||||
'order' => 'Номер на поръчка',
|
||||
'remaining' => 'Остава',
|
||||
'total' => 'Oбщо',
|
||||
'checkout' => 'Checkout Consumable to User',
|
||||
'consumable_name' => 'Консуматив',
|
||||
'cost' => 'Стойност на закупуване',
|
||||
'create' => 'Създаване на консуматив',
|
||||
'date' => 'Дата на закупуване',
|
||||
'item_no' => 'Item No.',
|
||||
'order' => 'Номер на поръчка',
|
||||
'remaining' => 'Остава',
|
||||
'total' => 'Oбщо',
|
||||
'update' => 'Обновяване на консуматив',
|
||||
);
|
||||
|
||||
@@ -4,17 +4,18 @@ return array(
|
||||
'custom_fields' => 'Потребителски полета',
|
||||
'field' => 'Поле',
|
||||
'about_fieldsets_title' => 'About Fieldsets',
|
||||
'about_fieldsets_text' => 'Fieldsets allow you to create groups of custom fields that are frequently re-used used for specific asset model types.',
|
||||
'about_fieldsets_text' => 'Fieldsets allow you to create groups of custom fields that are frequently re-used for specific asset model types.',
|
||||
'custom_format' => 'Custom format...',
|
||||
'encrypt_field' => 'Encrypt the value of this field in the database',
|
||||
'encrypt_field' => 'Encrypt the value of this field in the database for each asset. The decrypted value of this field will only be viewable by admins.',
|
||||
'encrypt_field_help' => 'WARNING: Encrypting a field makes it unsearchable.',
|
||||
'encrypted' => 'Encrypted',
|
||||
'fieldset' => 'Fieldset',
|
||||
'qty_fields' => 'Qty Fields',
|
||||
'fieldsets' => 'Fieldsets',
|
||||
'fieldset_name' => 'Fieldset Name',
|
||||
'field_name' => 'Field Name',
|
||||
'field_values' => 'Field Values',
|
||||
'field_values_help' => 'Add selectable options, one per line. Blank lines other than the first line will be ignored.',
|
||||
'field_values_help' => 'Add selectable options, one per line. Blank lines other than the first line will be ignored. Separate values and labels by pipes on each line (optional).',
|
||||
'field_element' => 'Form Element',
|
||||
'field_element_short' => 'Element',
|
||||
'field_format' => 'Format',
|
||||
@@ -25,4 +26,5 @@ return array(
|
||||
'order' => 'Order',
|
||||
'create_fieldset' => 'New Fieldset',
|
||||
'create_field' => 'New Custom Field',
|
||||
'value_encrypted' => 'The value of this field is encrypted in the database. Only admin users will be able to view the decrypted value',
|
||||
);
|
||||
|
||||
@@ -12,7 +12,8 @@ return array(
|
||||
'edit' => 'Редакция на актив',
|
||||
'filetype_info' => 'Позволените типове файлове са png, gif, jpg, jpeg, doc, docx, pdf, txt, zip, и rar.',
|
||||
'model_deleted' => 'Моделът актив беше изтрит.Необходимо е да възстановите моделът, преди да възстановите актива.<br/> <a href="/hardware/models/:model_id/restore">Възстановяване на модел</a>.',
|
||||
'requestable' => 'Може да бъде изискван',
|
||||
'requestable' => 'Може да бъде изискван',
|
||||
'requested' => 'Requested',
|
||||
'restore' => 'Възстановяване на актив',
|
||||
'pending' => 'Предстоящ',
|
||||
'undeployable' => 'Не може да бъде предоставян',
|
||||
|
||||
@@ -36,9 +36,11 @@ return array(
|
||||
),
|
||||
|
||||
'import' => array(
|
||||
'error' => 'Some items did not import correctly.',
|
||||
'errorDetail' => 'The following Items were not imported because of errors.',
|
||||
'success' => "Your file has been imported",
|
||||
'error' => 'Some items did not import correctly.',
|
||||
'errorDetail' => 'The following Items were not imported because of errors.',
|
||||
'success' => "Your file has been imported",
|
||||
'file_delete_success' => "Your file has been been successfully deleted",
|
||||
'file_delete_error' => "The file was unable to be deleted",
|
||||
),
|
||||
|
||||
|
||||
@@ -66,6 +68,7 @@ return array(
|
||||
'requests' => array(
|
||||
'error' => 'Активът не беше изискан. Моля опитайте отново.',
|
||||
'success' => 'Активът изискан успешно.',
|
||||
'canceled' => 'Checkout request successfully canceled'
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
@@ -23,7 +23,7 @@ return array(
|
||||
'error' => 'Файлът (файловете) не е качен. Моля, опитайте отново.',
|
||||
'success' => 'Файлът (файловете) е качен.',
|
||||
'nofiles' => 'Не сте избрали файл за качване или файлът, който се опитвате да качите е твърде голям',
|
||||
'invalidfiles' => 'Един или повече файлове са твърде големи или с неразрешен тип. Разрешените типове файлове са png, gif, jpg, doc, docx, pdf, и txt.',
|
||||
'invalidfiles' => 'One or more of your files is too large or is a filetype that is not allowed. Allowed filetypes are png, gif, jpg, doc, docx, pdf, txt, zip, rar, and rtf.',
|
||||
),
|
||||
|
||||
'update' => array(
|
||||
|
||||
@@ -4,6 +4,7 @@ return array(
|
||||
|
||||
'deleted' => 'Моделът беше изтрит. <a href="/hardware/models/:model_id/restore">Възстановяване</a>.',
|
||||
'restore' => 'Възстановяване на модел',
|
||||
'requestable' => 'Users may request this model',
|
||||
'show_mac_address' => 'Визуализиране на поле за MAC адрес в активите за този модел',
|
||||
'view_deleted' => 'Преглед на изтритите',
|
||||
'view_models' => 'Преглед на моделите',
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
'consumables' => 'Консумативи',
|
||||
'country' => 'Държава',
|
||||
'create' => 'Създаване на нов',
|
||||
'created' => 'Item Created',
|
||||
'created_asset' => 'създадени активи',
|
||||
'created_at' => 'Създаден на',
|
||||
'currency' => '$', // this is deprecated
|
||||
@@ -127,6 +128,7 @@
|
||||
'remove_company' => 'Премахване на асоциация към компания',
|
||||
'reports' => 'Справки',
|
||||
'requested' => 'Изискан',
|
||||
'request_canceled' => 'Request Canceled',
|
||||
'save' => 'Запис',
|
||||
'select' => 'Избор',
|
||||
'search' => 'Търсене',
|
||||
@@ -151,6 +153,8 @@
|
||||
'suppliers' => 'Доставчици',
|
||||
'total_assets' => 'общо активи',
|
||||
'total_licenses' => 'общо лицензи',
|
||||
'total_accessories' => 'total accessories',
|
||||
'total_consumables' => 'total consumables',
|
||||
'type' => 'Тип',
|
||||
'undeployable' => 'Не може да бъде предоставян',
|
||||
'unknown_admin' => 'Непознат администратор',
|
||||
|
||||
74
resources/lang/bg/mail.php
Normal file
74
resources/lang/bg/mail.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'a_user_canceled' => 'A user has canceled an item request on the website',
|
||||
'a_user_requested' => 'A user has requested an item on the website',
|
||||
'accessory_name' => 'Accessory Name:',
|
||||
'additional_notes' => 'Additional Notes:',
|
||||
'admin_has_created' => 'An administrator has created an account for you on the :web website.',
|
||||
'asset' => 'Asset:',
|
||||
'asset_name' => 'Asset Name:',
|
||||
'asset_requested' => 'Asset requested',
|
||||
'asset_tag' => 'Asset Tag:',
|
||||
'assets_warrantee_expiring' => '{1} asset with warrantee expiring in the next 60 days.|[2,Inf] assets with warrantees
|
||||
expiring in the next 60 days.',
|
||||
'assigned_to' => 'Assigned To',
|
||||
'best_regards' => 'Best regards,',
|
||||
'canceled' => 'Canceled:',
|
||||
'checkin_date' => 'Checkin Date:',
|
||||
'checkout_date' => 'Checkout Date:',
|
||||
'click_to_confirm' => 'Please click on the following link to confirm your :web account:',
|
||||
'click_on_the_link_accessory' => 'Please click on the link at the bottom to confirm that you have received the accessory.',
|
||||
'click_on_the_link_asset' => 'Please click on the link at the bottom to confirm that you have received the asset.',
|
||||
'Confirm_Asset_Checkin' => 'Confirm Asset Checkin.',
|
||||
'Confirm_Accessory_Checkin' => 'Confirm Accessory Checkin.',
|
||||
'Confirm_accessory_delivery' => 'Confirm accessory delivery.',
|
||||
'Confirm_asset_delivery' => 'Confirm asset delivery.',
|
||||
'Confirm_consumable_delivery' => 'Confirm consumable delivery.',
|
||||
'current_QTY' => 'Current QTY',
|
||||
'Days' => 'Days',
|
||||
'days' => 'Days',
|
||||
'expecting_checkin_date' => 'Expected Checkin Date:',
|
||||
'expires' => 'Expires',
|
||||
'Expiring_Assets_Report' => 'Expiring Assets Report.',
|
||||
'Expiring_Licenses_Report' => 'Expiring Licenses Report.',
|
||||
'hello' => 'Hello',
|
||||
'hi' => 'Hi',
|
||||
'i_have_read' => 'I have read and agree to the terms of use, and have received this item.',
|
||||
'item' => 'Item:',
|
||||
'items_below_minimum' => '{1} item that is below minimum inventory or will soon be low.|[2,Inf] items that are below minimum
|
||||
inventory or will soon be low.',
|
||||
'Item_Request_Canceled' => 'Item Request Canceled',
|
||||
'Item_Requested' => 'Item Requested',
|
||||
'licenses_expiring' => '{1} license expiring next 60 days.|[2,Inf] licenses expiring next 60 days.',
|
||||
'link_to_update_password' => 'Please click on the following link to update your :web password:',
|
||||
'login_first_admin' => 'Login to your new Snipe-IT installation using the credentials below:',
|
||||
'login' => 'Login:',
|
||||
'Low_Inventory_Report' => 'Low Inventory Report',
|
||||
'min_QTY' => 'Min QTY',
|
||||
'name' => 'Name',
|
||||
'new_item_checked' => 'A new item has been checked out under your name, details are below.',
|
||||
'password' => 'Password:',
|
||||
'password_reset' => 'Password Reset',
|
||||
|
||||
'read_the_terms' => 'Please read the terms of use below.',
|
||||
'read_the_terms_and_click' => 'Please read the terms of use below, and click on the link at the bottom to confirm that you read
|
||||
and agree to the terms of use, and have received the asset.',
|
||||
'requested' => 'Requested:',
|
||||
'reset_link' => 'Your Password Reset Link',
|
||||
'reset_password' => 'Click here to reset your password:',
|
||||
'serial' => 'Serial:',
|
||||
'supplier' => 'Supplier',
|
||||
'tag' => 'Tag',
|
||||
'test_email' => 'Test Email from Snipe-IT',
|
||||
'test_mail_text' => 'This is a test from the Snipe-IT Asset Management System. If you got this, mail is working :)',
|
||||
'the_following_item' => 'The following item has been checked in: ',
|
||||
'There_are' => '{1} There is|[2,Inf] There are',
|
||||
'to_reset' => 'To reset your :web password, complete this form:',
|
||||
'type' => 'Type',
|
||||
'user' => 'User:',
|
||||
'username' => 'Username:',
|
||||
'welcome' => 'Welcome :name',
|
||||
'welcome_to' => 'Welcome to :web!',
|
||||
'your_credentials' => 'Your Snipe-IT credentials',
|
||||
);
|
||||
@@ -3,13 +3,14 @@
|
||||
return array(
|
||||
'about_consumables_title' => 'O spotřebním materiálu',
|
||||
'about_consumables_text' => 'Spotřební materiál jsou takové položky, které jsou v čase spotřebovávány, jako např. toner, inkoust či papír do tiskáren.',
|
||||
'consumable_name' => 'Název sp. materiálu',
|
||||
'cost' => 'Náklady',
|
||||
'create' => 'Vytvořit sp. materiál',
|
||||
'date' => 'Datum pořízení',
|
||||
'item_no' => 'Položka č.',
|
||||
'order' => 'Číslo objednávky',
|
||||
'remaining' => 'Zbývá',
|
||||
'total' => 'Celkem',
|
||||
'checkout' => 'Checkout Consumable to User',
|
||||
'consumable_name' => 'Název sp. materiálu',
|
||||
'cost' => 'Náklady',
|
||||
'create' => 'Vytvořit sp. materiál',
|
||||
'date' => 'Datum pořízení',
|
||||
'item_no' => 'Položka č.',
|
||||
'order' => 'Číslo objednávky',
|
||||
'remaining' => 'Zbývá',
|
||||
'total' => 'Celkem',
|
||||
'update' => 'Upravit sp. materiál',
|
||||
);
|
||||
|
||||
@@ -6,15 +6,16 @@ return array(
|
||||
'about_fieldsets_title' => 'O sadách polí',
|
||||
'about_fieldsets_text' => 'Sady polí Vám umožňují vytvořit si vlastní hodnoty, které chcete evidovat u modelů majetku.',
|
||||
'custom_format' => 'Custom format...',
|
||||
'encrypt_field' => 'Encrypt the value of this field in the database',
|
||||
'encrypt_field' => 'Encrypt the value of this field in the database for each asset. The decrypted value of this field will only be viewable by admins.',
|
||||
'encrypt_field_help' => 'WARNING: Encrypting a field makes it unsearchable.',
|
||||
'encrypted' => 'Encrypted',
|
||||
'fieldset' => 'Sada',
|
||||
'qty_fields' => 'Počet',
|
||||
'fieldsets' => 'Sady',
|
||||
'fieldset_name' => 'Název sady',
|
||||
'field_name' => 'Název pole',
|
||||
'field_values' => 'Field Values',
|
||||
'field_values_help' => 'Add selectable options, one per line. Blank lines other than the first line will be ignored.',
|
||||
'field_values_help' => 'Add selectable options, one per line. Blank lines other than the first line will be ignored. Separate values and labels by pipes on each line (optional).',
|
||||
'field_element' => 'Typ pole',
|
||||
'field_element_short' => 'Typ',
|
||||
'field_format' => 'Formát',
|
||||
@@ -25,4 +26,5 @@ return array(
|
||||
'order' => 'Pořadí',
|
||||
'create_fieldset' => 'Nová sada',
|
||||
'create_field' => 'Nové vlastní pole',
|
||||
'value_encrypted' => 'The value of this field is encrypted in the database. Only admin users will be able to view the decrypted value',
|
||||
);
|
||||
|
||||
@@ -12,7 +12,8 @@ return array(
|
||||
'edit' => 'Upravit majetek',
|
||||
'filetype_info' => 'Povolené soubory jsou png, gif, jpg, jpeg, doc, docx, pdf, txt, zip, a rar.',
|
||||
'model_deleted' => 'Tento model majetku byl odstraněn. Přejete-li si obnovit zařízení, <a href="/hardware/models/:model_id/restore">klepněte zde</a><br/> a obnovte nejdříve jeho model.',
|
||||
'requestable' => 'Lze vyžádat',
|
||||
'requestable' => 'Lze vyžádat',
|
||||
'requested' => 'Requested',
|
||||
'restore' => 'Obnovit zařízení',
|
||||
'pending' => 'Čekající',
|
||||
'undeployable' => 'Nepřiřaditelné',
|
||||
|
||||
@@ -37,9 +37,11 @@ return array(
|
||||
),
|
||||
|
||||
'import' => array(
|
||||
'error' => 'Some items did not import correctly.',
|
||||
'errorDetail' => 'The following Items were not imported because of errors.',
|
||||
'success' => "Your file has been imported",
|
||||
'error' => 'Some items did not import correctly.',
|
||||
'errorDetail' => 'The following Items were not imported because of errors.',
|
||||
'success' => "Your file has been imported",
|
||||
'file_delete_success' => "Your file has been been successfully deleted",
|
||||
'file_delete_error' => "The file was unable to be deleted",
|
||||
),
|
||||
|
||||
|
||||
@@ -67,6 +69,7 @@ return array(
|
||||
'requests' => array(
|
||||
'error' => 'Majetek nebyl vyžádán, zkuste to prosím znovu',
|
||||
'success' => 'Vyžádání majetku proběhlo v pořádku.',
|
||||
'canceled' => 'Checkout request successfully canceled'
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
@@ -23,7 +23,7 @@ return array(
|
||||
'error' => 'Soubor(y) se nepodařilo nahrát. Prosím zkuste to znovu.',
|
||||
'success' => 'File(s) successfully uploaded.',
|
||||
'nofiles' => 'You did not select any files for upload, or the file you are trying to upload is too large',
|
||||
'invalidfiles' => 'One or more of your files is too large or is a filetype that is not allowed. Allowed filetypes are png, gif, jpg, doc, docx, pdf, and txt.',
|
||||
'invalidfiles' => 'One or more of your files is too large or is a filetype that is not allowed. Allowed filetypes are png, gif, jpg, doc, docx, pdf, txt, zip, rar, and rtf.',
|
||||
),
|
||||
|
||||
'update' => array(
|
||||
|
||||
@@ -4,6 +4,7 @@ return array(
|
||||
|
||||
'deleted' => 'Model byl vymazán. <a href="/hardware/models/:model_id/restore">Klikněte sem pro jeho obnovení</a>.',
|
||||
'restore' => 'Obnovení Modelu',
|
||||
'requestable' => 'Users may request this model',
|
||||
'show_mac_address' => 'Zobrazovat pole MAC adresa u zařízení tohoto druhu',
|
||||
'view_deleted' => 'Zobrazit smazané',
|
||||
'view_models' => 'Zobrazit Modely',
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
'consumables' => 'Spotřební materiál',
|
||||
'country' => 'Země',
|
||||
'create' => 'Vytvořit nové',
|
||||
'created' => 'Item Created',
|
||||
'created_asset' => 'vytvořit majetek',
|
||||
'created_at' => 'Vytvořeno',
|
||||
'currency' => 'Kč', // this is deprecated
|
||||
@@ -127,6 +128,7 @@
|
||||
'remove_company' => 'Remove Company Association',
|
||||
'reports' => 'Reporty',
|
||||
'requested' => 'Požadováno',
|
||||
'request_canceled' => 'Request Canceled',
|
||||
'save' => 'Uložit',
|
||||
'select' => 'Zvolit',
|
||||
'search' => 'Hledat',
|
||||
@@ -151,6 +153,8 @@
|
||||
'suppliers' => 'Dodavatelé',
|
||||
'total_assets' => 'celkem zařízení',
|
||||
'total_licenses' => 'celkem licencí',
|
||||
'total_accessories' => 'total accessories',
|
||||
'total_consumables' => 'total consumables',
|
||||
'type' => 'Typ',
|
||||
'undeployable' => 'Ne-přiřaditelné',
|
||||
'unknown_admin' => 'Neznámy správce',
|
||||
|
||||
74
resources/lang/cs/mail.php
Normal file
74
resources/lang/cs/mail.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'a_user_canceled' => 'A user has canceled an item request on the website',
|
||||
'a_user_requested' => 'A user has requested an item on the website',
|
||||
'accessory_name' => 'Accessory Name:',
|
||||
'additional_notes' => 'Additional Notes:',
|
||||
'admin_has_created' => 'An administrator has created an account for you on the :web website.',
|
||||
'asset' => 'Asset:',
|
||||
'asset_name' => 'Asset Name:',
|
||||
'asset_requested' => 'Asset requested',
|
||||
'asset_tag' => 'Asset Tag:',
|
||||
'assets_warrantee_expiring' => '{1} asset with warrantee expiring in the next 60 days.|[2,Inf] assets with warrantees
|
||||
expiring in the next 60 days.',
|
||||
'assigned_to' => 'Assigned To',
|
||||
'best_regards' => 'Best regards,',
|
||||
'canceled' => 'Canceled:',
|
||||
'checkin_date' => 'Checkin Date:',
|
||||
'checkout_date' => 'Checkout Date:',
|
||||
'click_to_confirm' => 'Please click on the following link to confirm your :web account:',
|
||||
'click_on_the_link_accessory' => 'Please click on the link at the bottom to confirm that you have received the accessory.',
|
||||
'click_on_the_link_asset' => 'Please click on the link at the bottom to confirm that you have received the asset.',
|
||||
'Confirm_Asset_Checkin' => 'Confirm Asset Checkin.',
|
||||
'Confirm_Accessory_Checkin' => 'Confirm Accessory Checkin.',
|
||||
'Confirm_accessory_delivery' => 'Confirm accessory delivery.',
|
||||
'Confirm_asset_delivery' => 'Confirm asset delivery.',
|
||||
'Confirm_consumable_delivery' => 'Confirm consumable delivery.',
|
||||
'current_QTY' => 'Current QTY',
|
||||
'Days' => 'Days',
|
||||
'days' => 'Days',
|
||||
'expecting_checkin_date' => 'Expected Checkin Date:',
|
||||
'expires' => 'Expires',
|
||||
'Expiring_Assets_Report' => 'Expiring Assets Report.',
|
||||
'Expiring_Licenses_Report' => 'Expiring Licenses Report.',
|
||||
'hello' => 'Hello',
|
||||
'hi' => 'Hi',
|
||||
'i_have_read' => 'I have read and agree to the terms of use, and have received this item.',
|
||||
'item' => 'Item:',
|
||||
'items_below_minimum' => '{1} item that is below minimum inventory or will soon be low.|[2,Inf] items that are below minimum
|
||||
inventory or will soon be low.',
|
||||
'Item_Request_Canceled' => 'Item Request Canceled',
|
||||
'Item_Requested' => 'Item Requested',
|
||||
'licenses_expiring' => '{1} license expiring next 60 days.|[2,Inf] licenses expiring next 60 days.',
|
||||
'link_to_update_password' => 'Please click on the following link to update your :web password:',
|
||||
'login_first_admin' => 'Login to your new Snipe-IT installation using the credentials below:',
|
||||
'login' => 'Login:',
|
||||
'Low_Inventory_Report' => 'Low Inventory Report',
|
||||
'min_QTY' => 'Min QTY',
|
||||
'name' => 'Name',
|
||||
'new_item_checked' => 'A new item has been checked out under your name, details are below.',
|
||||
'password' => 'Password:',
|
||||
'password_reset' => 'Password Reset',
|
||||
|
||||
'read_the_terms' => 'Please read the terms of use below.',
|
||||
'read_the_terms_and_click' => 'Please read the terms of use below, and click on the link at the bottom to confirm that you read
|
||||
and agree to the terms of use, and have received the asset.',
|
||||
'requested' => 'Requested:',
|
||||
'reset_link' => 'Your Password Reset Link',
|
||||
'reset_password' => 'Click here to reset your password:',
|
||||
'serial' => 'Serial:',
|
||||
'supplier' => 'Supplier',
|
||||
'tag' => 'Tag',
|
||||
'test_email' => 'Test Email from Snipe-IT',
|
||||
'test_mail_text' => 'This is a test from the Snipe-IT Asset Management System. If you got this, mail is working :)',
|
||||
'the_following_item' => 'The following item has been checked in: ',
|
||||
'There_are' => '{1} There is|[2,Inf] There are',
|
||||
'to_reset' => 'To reset your :web password, complete this form:',
|
||||
'type' => 'Type',
|
||||
'user' => 'User:',
|
||||
'username' => 'Username:',
|
||||
'welcome' => 'Welcome :name',
|
||||
'welcome_to' => 'Welcome to :web!',
|
||||
'your_credentials' => 'Your Snipe-IT credentials',
|
||||
);
|
||||
@@ -3,13 +3,14 @@
|
||||
return array(
|
||||
'about_consumables_title' => 'About Consumables',
|
||||
'about_consumables_text' => 'Consumables are anything purchased that will be used up over time. For example, printer ink or copier paper.',
|
||||
'consumable_name' => 'Consumable Name',
|
||||
'cost' => 'Purchase Cost',
|
||||
'create' => 'Create Consumable',
|
||||
'date' => 'Purchase Date',
|
||||
'item_no' => 'Item No.',
|
||||
'order' => 'Order Number',
|
||||
'remaining' => 'Remaining',
|
||||
'total' => 'Total',
|
||||
'checkout' => 'Checkout Consumable to User',
|
||||
'consumable_name' => 'Consumable Name',
|
||||
'cost' => 'Purchase Cost',
|
||||
'create' => 'Create Consumable',
|
||||
'date' => 'Purchase Date',
|
||||
'item_no' => 'Item No.',
|
||||
'order' => 'Order Number',
|
||||
'remaining' => 'Remaining',
|
||||
'total' => 'Total',
|
||||
'update' => 'Update Consumable',
|
||||
);
|
||||
|
||||
@@ -4,17 +4,18 @@ return array(
|
||||
'custom_fields' => 'Custom Fields',
|
||||
'field' => 'Field',
|
||||
'about_fieldsets_title' => 'About Fieldsets',
|
||||
'about_fieldsets_text' => 'Fieldsets allow you to create groups of custom fields that are frequently re-used used for specific asset model types.',
|
||||
'about_fieldsets_text' => 'Fieldsets allow you to create groups of custom fields that are frequently re-used for specific asset model types.',
|
||||
'custom_format' => 'Custom format...',
|
||||
'encrypt_field' => 'Encrypt the value of this field in the database',
|
||||
'encrypt_field' => 'Encrypt the value of this field in the database for each asset. The decrypted value of this field will only be viewable by admins.',
|
||||
'encrypt_field_help' => 'WARNING: Encrypting a field makes it unsearchable.',
|
||||
'encrypted' => 'Encrypted',
|
||||
'fieldset' => 'Fieldset',
|
||||
'qty_fields' => 'Qty Fields',
|
||||
'fieldsets' => 'Fieldsets',
|
||||
'fieldset_name' => 'Fieldset Name',
|
||||
'field_name' => 'Field Name',
|
||||
'field_values' => 'Field Values',
|
||||
'field_values_help' => 'Add selectable options, one per line. Blank lines other than the first line will be ignored.',
|
||||
'field_values_help' => 'Add selectable options, one per line. Blank lines other than the first line will be ignored. Separate values and labels by pipes on each line (optional).',
|
||||
'field_element' => 'Form Element',
|
||||
'field_element_short' => 'Element',
|
||||
'field_format' => 'Format',
|
||||
@@ -25,4 +26,5 @@ return array(
|
||||
'order' => 'Order',
|
||||
'create_fieldset' => 'New Fieldset',
|
||||
'create_field' => 'New Custom Field',
|
||||
'value_encrypted' => 'The value of this field is encrypted in the database. Only admin users will be able to view the decrypted value',
|
||||
);
|
||||
|
||||
@@ -12,7 +12,8 @@ return array(
|
||||
'edit' => 'Edit Asset',
|
||||
'filetype_info' => 'Allowed filetypes are png, gif, jpg, jpeg, doc, docx, pdf, txt, zip, and rar.',
|
||||
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.<br/> <a href="/hardware/models/:model_id/restore">Click here to restore the model</a>.',
|
||||
'requestable' => 'Requestable',
|
||||
'requestable' => 'Requestable',
|
||||
'requested' => 'Requested',
|
||||
'restore' => 'Restore Asset',
|
||||
'pending' => 'Pending',
|
||||
'undeployable' => 'Undeployable',
|
||||
|
||||
@@ -37,9 +37,11 @@ return array(
|
||||
),
|
||||
|
||||
'import' => array(
|
||||
'error' => 'Some items did not import correctly.',
|
||||
'errorDetail' => 'The following Items were not imported because of errors.',
|
||||
'success' => "Your file has been imported",
|
||||
'error' => 'Some items did not import correctly.',
|
||||
'errorDetail' => 'The following Items were not imported because of errors.',
|
||||
'success' => "Your file has been imported",
|
||||
'file_delete_success' => "Your file has been been successfully deleted",
|
||||
'file_delete_error' => "The file was unable to be deleted",
|
||||
),
|
||||
|
||||
|
||||
@@ -67,6 +69,7 @@ return array(
|
||||
'requests' => array(
|
||||
'error' => 'Asset was not requested, please try again',
|
||||
'success' => 'Asset requested successfully.',
|
||||
'canceled' => 'Checkout request successfully canceled'
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
@@ -23,7 +23,7 @@ return array(
|
||||
'error' => 'File(s) not uploaded. Please try again.',
|
||||
'success' => 'File(s) successfully uploaded.',
|
||||
'nofiles' => 'You did not select any files for upload, or the file you are trying to upload is too large',
|
||||
'invalidfiles' => 'One or more of your files is too large or is a filetype that is not allowed. Allowed filetypes are png, gif, jpg, doc, docx, pdf, and txt.',
|
||||
'invalidfiles' => 'One or more of your files is too large or is a filetype that is not allowed. Allowed filetypes are png, gif, jpg, doc, docx, pdf, txt, zip, rar, and rtf.',
|
||||
),
|
||||
|
||||
'update' => array(
|
||||
|
||||
@@ -4,6 +4,7 @@ return array(
|
||||
|
||||
'deleted' => 'This model has been deleted. <a href="/hardware/models/:model_id/restore">Click here to restore it</a>.',
|
||||
'restore' => 'Restore Model',
|
||||
'requestable' => 'Users may request this model',
|
||||
'show_mac_address' => 'Show MAC address field in assets in this model',
|
||||
'view_deleted' => 'View Deleted',
|
||||
'view_models' => 'View Models',
|
||||
|
||||
@@ -11,7 +11,7 @@ return array(
|
||||
'title' => 'Asset Models',
|
||||
'update' => 'Update Asset Model',
|
||||
'view' => 'View Asset Model',
|
||||
'update' => 'Update Model',
|
||||
'update' => 'Update Asset Model',
|
||||
'clone' => 'Clone Model',
|
||||
'edit' => 'Edit Model',
|
||||
);
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
'consumables' => 'Consumables',
|
||||
'country' => 'Land',
|
||||
'create' => 'Opret ny',
|
||||
'created' => 'Item Created',
|
||||
'created_asset' => 'skabte aktiver',
|
||||
'created_at' => 'Skabt den',
|
||||
'currency' => '$', // this is deprecated
|
||||
@@ -127,6 +128,7 @@
|
||||
'remove_company' => 'Fjern association med selskab',
|
||||
'reports' => 'Rapporter',
|
||||
'requested' => 'Requested',
|
||||
'request_canceled' => 'Request Canceled',
|
||||
'save' => 'Gem',
|
||||
'select' => 'Select',
|
||||
'search' => 'Search',
|
||||
@@ -151,6 +153,8 @@
|
||||
'suppliers' => 'Leverandører',
|
||||
'total_assets' => 'totale aktiver',
|
||||
'total_licenses' => 'totale licenser',
|
||||
'total_accessories' => 'total accessories',
|
||||
'total_consumables' => 'total consumables',
|
||||
'type' => 'Type',
|
||||
'undeployable' => 'Ikke implementerbar',
|
||||
'unknown_admin' => 'Ukendt Admin',
|
||||
|
||||
74
resources/lang/da/mail.php
Normal file
74
resources/lang/da/mail.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'a_user_canceled' => 'A user has canceled an item request on the website',
|
||||
'a_user_requested' => 'A user has requested an item on the website',
|
||||
'accessory_name' => 'Accessory Name:',
|
||||
'additional_notes' => 'Additional Notes:',
|
||||
'admin_has_created' => 'An administrator has created an account for you on the :web website.',
|
||||
'asset' => 'Asset:',
|
||||
'asset_name' => 'Asset Name:',
|
||||
'asset_requested' => 'Asset requested',
|
||||
'asset_tag' => 'Asset Tag:',
|
||||
'assets_warrantee_expiring' => '{1} asset with warrantee expiring in the next 60 days.|[2,Inf] assets with warrantees
|
||||
expiring in the next 60 days.',
|
||||
'assigned_to' => 'Assigned To',
|
||||
'best_regards' => 'Best regards,',
|
||||
'canceled' => 'Canceled:',
|
||||
'checkin_date' => 'Checkin Date:',
|
||||
'checkout_date' => 'Checkout Date:',
|
||||
'click_to_confirm' => 'Please click on the following link to confirm your :web account:',
|
||||
'click_on_the_link_accessory' => 'Please click on the link at the bottom to confirm that you have received the accessory.',
|
||||
'click_on_the_link_asset' => 'Please click on the link at the bottom to confirm that you have received the asset.',
|
||||
'Confirm_Asset_Checkin' => 'Confirm Asset Checkin.',
|
||||
'Confirm_Accessory_Checkin' => 'Confirm Accessory Checkin.',
|
||||
'Confirm_accessory_delivery' => 'Confirm accessory delivery.',
|
||||
'Confirm_asset_delivery' => 'Confirm asset delivery.',
|
||||
'Confirm_consumable_delivery' => 'Confirm consumable delivery.',
|
||||
'current_QTY' => 'Current QTY',
|
||||
'Days' => 'Days',
|
||||
'days' => 'Days',
|
||||
'expecting_checkin_date' => 'Expected Checkin Date:',
|
||||
'expires' => 'Expires',
|
||||
'Expiring_Assets_Report' => 'Expiring Assets Report.',
|
||||
'Expiring_Licenses_Report' => 'Expiring Licenses Report.',
|
||||
'hello' => 'Hello',
|
||||
'hi' => 'Hi',
|
||||
'i_have_read' => 'I have read and agree to the terms of use, and have received this item.',
|
||||
'item' => 'Item:',
|
||||
'items_below_minimum' => '{1} item that is below minimum inventory or will soon be low.|[2,Inf] items that are below minimum
|
||||
inventory or will soon be low.',
|
||||
'Item_Request_Canceled' => 'Item Request Canceled',
|
||||
'Item_Requested' => 'Item Requested',
|
||||
'licenses_expiring' => '{1} license expiring next 60 days.|[2,Inf] licenses expiring next 60 days.',
|
||||
'link_to_update_password' => 'Please click on the following link to update your :web password:',
|
||||
'login_first_admin' => 'Login to your new Snipe-IT installation using the credentials below:',
|
||||
'login' => 'Login:',
|
||||
'Low_Inventory_Report' => 'Low Inventory Report',
|
||||
'min_QTY' => 'Min QTY',
|
||||
'name' => 'Name',
|
||||
'new_item_checked' => 'A new item has been checked out under your name, details are below.',
|
||||
'password' => 'Password:',
|
||||
'password_reset' => 'Password Reset',
|
||||
|
||||
'read_the_terms' => 'Please read the terms of use below.',
|
||||
'read_the_terms_and_click' => 'Please read the terms of use below, and click on the link at the bottom to confirm that you read
|
||||
and agree to the terms of use, and have received the asset.',
|
||||
'requested' => 'Requested:',
|
||||
'reset_link' => 'Your Password Reset Link',
|
||||
'reset_password' => 'Click here to reset your password:',
|
||||
'serial' => 'Serial:',
|
||||
'supplier' => 'Supplier',
|
||||
'tag' => 'Tag',
|
||||
'test_email' => 'Test Email from Snipe-IT',
|
||||
'test_mail_text' => 'This is a test from the Snipe-IT Asset Management System. If you got this, mail is working :)',
|
||||
'the_following_item' => 'The following item has been checked in: ',
|
||||
'There_are' => '{1} There is|[2,Inf] There are',
|
||||
'to_reset' => 'To reset your :web password, complete this form:',
|
||||
'type' => 'Type',
|
||||
'user' => 'User:',
|
||||
'username' => 'Username:',
|
||||
'welcome' => 'Welcome :name',
|
||||
'welcome_to' => 'Welcome to :web!',
|
||||
'your_credentials' => 'Your Snipe-IT credentials',
|
||||
);
|
||||
@@ -3,13 +3,14 @@
|
||||
return array(
|
||||
'about_consumables_title' => 'Details Verbrauchsmaterialien',
|
||||
'about_consumables_text' => 'Verbrauchsmaterialien sind alle Dinge, die gekauft und mit der Zeit aufgebraucht werden, wie z.B. Druckerpatronen oder Kopierpapier.',
|
||||
'consumable_name' => 'Name des Verbrauchsmaterials',
|
||||
'cost' => 'Einkaufspreis',
|
||||
'create' => 'Verbrauchsmaterial erstellen',
|
||||
'date' => 'Kaufdatum',
|
||||
'item_no' => 'Artikel Nr.',
|
||||
'order' => 'Bestellnummer',
|
||||
'remaining' => 'übrig',
|
||||
'total' => 'Gesamt',
|
||||
'checkout' => 'Verbrauchsmaterial für Benutzer ausbuchen',
|
||||
'consumable_name' => 'Name des Verbrauchsmaterials',
|
||||
'cost' => 'Einkaufspreis',
|
||||
'create' => 'Verbrauchsmaterial erstellen',
|
||||
'date' => 'Kaufdatum',
|
||||
'item_no' => 'Artikel Nr.',
|
||||
'order' => 'Bestellnummer',
|
||||
'remaining' => 'übrig',
|
||||
'total' => 'Gesamt',
|
||||
'update' => 'Verbrauchsmaterial überarbeiten',
|
||||
);
|
||||
|
||||
@@ -5,16 +5,17 @@ return array(
|
||||
'field' => 'Feld',
|
||||
'about_fieldsets_title' => 'Über Feldsätze',
|
||||
'about_fieldsets_text' => 'Feldsätze erlauben es Gruppen aus benutzerdefinierten Feldern zu erstellen, welche regelmäßig für spezifische Modelltypen benutzt werden.',
|
||||
'custom_format' => 'Custom format...',
|
||||
'encrypt_field' => 'Encrypt the value of this field in the database',
|
||||
'encrypt_field_help' => 'WARNING: Encrypting a field makes it unsearchable.',
|
||||
'custom_format' => 'Benutzerdefiniertes Format...',
|
||||
'encrypt_field' => 'Den Wert dieses Feldes in der Datenbank verschlüsseln',
|
||||
'encrypt_field_help' => 'Warnung: Ein verschlüsseltes Feld kann nicht durchsucht werden.',
|
||||
'encrypted' => 'Verschlüsselt',
|
||||
'fieldset' => 'Feldsatz',
|
||||
'qty_fields' => 'Anzahl Felder',
|
||||
'fieldsets' => 'Feldsätze',
|
||||
'fieldset_name' => 'Feldsatzname',
|
||||
'field_name' => 'Feldname',
|
||||
'field_values' => 'Field Values',
|
||||
'field_values_help' => 'Add selectable options, one per line. Blank lines other than the first line will be ignored.',
|
||||
'field_values' => 'Feldwerte',
|
||||
'field_values_help' => 'Füge wählbare Optionen hinzu, eine pro Zeile. Leere Zeilen außer der ersten Zeile werden ignoriert.',
|
||||
'field_element' => 'Formularelement',
|
||||
'field_element_short' => 'Element',
|
||||
'field_format' => 'Format',
|
||||
@@ -25,4 +26,5 @@ return array(
|
||||
'order' => 'Reihenfolge',
|
||||
'create_fieldset' => 'Neuer Feldsatz',
|
||||
'create_field' => 'Neues benutzerdefiniertes Feld',
|
||||
'value_encrypted' => 'Der Wert dieses Feldes ist in der Datenbank verschlüsselt. Nur Benutzer mit Administratorrechten können den entschlüsselten Wert anzeigen',
|
||||
);
|
||||
|
||||
@@ -12,7 +12,8 @@ return array(
|
||||
'edit' => 'Asset editieren',
|
||||
'filetype_info' => 'Erlaubte Dateitypen sind png, gif, jpg, jpeg, doc, docx, pdf, txt, zip, oder rar.',
|
||||
'model_deleted' => 'Dieses Asset wurde gelöscht. Sie müssen das Modell Wiederherstellen bevor Sie das Asset Wiederherstellen können <br/><a href="/hardware/models/:model_id/restore">klicken Sie hier um das Modell wiederherzustellen</a>.',
|
||||
'requestable' => 'Anforderbar',
|
||||
'requestable' => 'Anforderbar',
|
||||
'requested' => 'Angefordert',
|
||||
'restore' => 'Asset wiederherstellen',
|
||||
'pending' => 'Ausstehend',
|
||||
'undeployable' => 'nicht einsetzbar',
|
||||
|
||||
@@ -37,9 +37,11 @@ return array(
|
||||
),
|
||||
|
||||
'import' => array(
|
||||
'error' => 'Some items did not import correctly.',
|
||||
'errorDetail' => 'The following Items were not imported because of errors.',
|
||||
'success' => "Your file has been imported",
|
||||
'error' => 'Einige Elemente wurden nicht korrekt importiert.',
|
||||
'errorDetail' => 'Die folgenden Elemente wurden aufgrund von Fehlern nicht importiert.',
|
||||
'success' => "Ihre Datei wurde importiert",
|
||||
'file_delete_success' => "Die Datei wurde erfolgreich gelöscht",
|
||||
'file_delete_error' => "Die Datei konnte nicht gelöscht werden",
|
||||
),
|
||||
|
||||
|
||||
@@ -53,7 +55,7 @@ return array(
|
||||
'error' => 'Asset konnte nicht herausgegeben werden. Bitte versuchen Sie es erneut',
|
||||
'success' => 'Asset wurde erfolgreich herausgegeben.',
|
||||
'user_does_not_exist' => 'Dieser Benutzer existiert nicht. Bitte versuchen Sie es erneut.',
|
||||
'not_available' => 'That asset is not available for checkout!'
|
||||
'not_available' => 'Dieses Asset kann nicht herausgegeben werden!'
|
||||
),
|
||||
|
||||
'checkin' => array(
|
||||
@@ -67,6 +69,7 @@ return array(
|
||||
'requests' => array(
|
||||
'error' => 'Das Asset wurde nicht angefordert, bitte versuchen Sie es erneut',
|
||||
'success' => 'Asset erfolgreich angefordert.',
|
||||
'canceled' => 'Herausgeben erfolgreich abgebrochen'
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
@@ -23,7 +23,7 @@ return array(
|
||||
'error' => 'Datei(en) wurden nicht hochgeladen. Bitte versuchen Sie es noch einmal.',
|
||||
'success' => 'Datei(en) erfolgreich hochgeladen.',
|
||||
'nofiles' => 'Es wurde keine Datei für den Upload ausgewählt, oder die Datei ist zu groß',
|
||||
'invalidfiles' => 'Eine oder mehrere Ihrer Datei(en) sind zu groß oder ein Dateityp ist nicht erlaubt. Erlaubte Dateitypen sind png, gif, jpg, doc, docx, pdf, and txt.',
|
||||
'invalidfiles' => 'Eine oder mehrere Dateien sind zu groß oder haben einen falschen Dateityp. Erlaubte Dateitypen sind png, gif, jpg, doc, docx, pdf, txt, zip, rar, und rtf.',
|
||||
),
|
||||
|
||||
'update' => array(
|
||||
|
||||
@@ -4,6 +4,7 @@ return array(
|
||||
|
||||
'deleted' => 'Dieses Modell wurde gelöscht.<a href="/hardware/models/:model_id/restore">klicken Sie hier um es Wiederzuherstellen</a>.',
|
||||
'restore' => 'Modell wiederherstellen',
|
||||
'requestable' => 'Benutzer können dieses Modell anfordern',
|
||||
'show_mac_address' => 'MAC Adressen Feld anzeigen für Assets mit diesses Modell',
|
||||
'view_deleted' => 'Gelöschte anzeigen',
|
||||
'view_models' => 'Modelle anzeigen',
|
||||
|
||||
@@ -11,7 +11,7 @@ return array(
|
||||
'title' => 'Asset Modelle',
|
||||
'update' => 'Asset Modell aktualisieren',
|
||||
'view' => 'Asset Modell ansehen',
|
||||
'update' => 'Modell aktualisieren',
|
||||
'update' => 'Asset Modell aktualisieren',
|
||||
'clone' => 'Modell duplizieren',
|
||||
'edit' => 'Modell bearbeiten',
|
||||
);
|
||||
|
||||
@@ -16,7 +16,7 @@ return array(
|
||||
'backups' => 'Sicherungen',
|
||||
'barcode_settings' => 'Barcode Einstellungen',
|
||||
'confirm_purge' => 'Bereinigung bestätigen',
|
||||
'confirm_purge_help' => 'Geben Sie das Wort "Löschen" in das untere Feld ein um die gelöschten Einträge zu bereinigen. Dies kann nicht rückgängig gemacht werden.',
|
||||
'confirm_purge_help' => 'Geben Sie das Wort "DELETE" in das untere Feld ein um die gelöschten Einträge zu bereinigen. Dies kann nicht rückgängig gemacht werden.',
|
||||
'custom_css' => 'Eigenes CSS',
|
||||
'custom_css_help' => 'Füge eigenes CSS hinzu. Benutze keine <style></style> tags.',
|
||||
'default_currency' => 'Standard Währung',
|
||||
@@ -51,8 +51,8 @@ return array(
|
||||
'ldap_pword' => 'LDAP Bind Passwort',
|
||||
'ldap_basedn' => 'Basis Bind DN',
|
||||
'ldap_filter' => 'LDAP Filter',
|
||||
'ldap_pw_sync' => 'LDAP Password Sync',
|
||||
'ldap_pw_sync_help' => 'Uncheck this box if you do not wish to keep LDAP passwords synced with local passwords. Disabling this means that your users may not be able to login if your LDAP server is unreachable for some reason.',
|
||||
'ldap_pw_sync' => 'LDAP Passwörter synchronisieren',
|
||||
'ldap_pw_sync_help' => 'Deaktivieren Sie diese Option, wenn Sie nicht möchten, dass LDAP-Passwörter mit lokalen Passwörtern synchronisiert werden. Wenn Sie dies deaktivieren, kann es sein, dass Benutzer sich möglicherweise nicht anmelden können falls der LDAP-Server aus irgendeinem Grund nicht erreichbar ist.',
|
||||
'ldap_username_field' => 'Benutzername',
|
||||
'ldap_lname_field' => 'Familienname',
|
||||
'ldap_fname_field' => 'LDAP Vorname',
|
||||
|
||||
@@ -4,13 +4,13 @@ return array(
|
||||
'about' => 'Info Statusbezeichnung',
|
||||
'archived' => 'Archiviert',
|
||||
'create' => 'Statusbezeichnung erstellen',
|
||||
'color' => 'Chart Color',
|
||||
'color' => 'Diagrammfarbe',
|
||||
'deployable' => 'Einsetzbar',
|
||||
'info' => 'Status Label werden eingesetzt um diverse Stati Ihrer Assets zu beschreiben. Diese können zB. in Reparatur sein, Gestohlen oder Verlohren worden sein. Sie können neue Status Labels für Einsetzbare, Unerledigte und Archivierte Assets erstellen.',
|
||||
'name' => 'Statusname',
|
||||
'pending' => 'Unerledigt',
|
||||
'status_type' => 'Statustyp',
|
||||
'show_in_nav' => 'Show in side nav',
|
||||
'show_in_nav' => 'Im seitlichen Navigationsbereich zeigen',
|
||||
'title' => 'Statusbezeichnungen',
|
||||
'undeployable' => 'nicht Einsetzbar',
|
||||
'update' => 'Statusbezeichnung bearbeiten',
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
'consumables' => 'Verbrauchsmaterialien',
|
||||
'country' => 'Land',
|
||||
'create' => 'Create Location',
|
||||
'created' => 'Item Created',
|
||||
'created_asset' => 'Asset angelegt',
|
||||
'created_at' => 'Erstellt am',
|
||||
'currency' => '€', // this is deprecated
|
||||
@@ -76,7 +77,7 @@
|
||||
'image_delete' => 'Bild löschen',
|
||||
'image_upload' => 'Bild hinzufügen',
|
||||
'import' => 'Import',
|
||||
'import-history' => 'Import History',
|
||||
'import-history' => 'Import Verlauf',
|
||||
'asset_maintenance' => 'Asset Wartung',
|
||||
'asset_maintenance_report' => 'Asset Wartungsbericht',
|
||||
'asset_maintenances' => 'Asset Wartungen',
|
||||
@@ -127,6 +128,7 @@
|
||||
'remove_company' => 'Firmenzuordnung entfernen',
|
||||
'reports' => 'Berichte',
|
||||
'requested' => 'Angefragt',
|
||||
'request_canceled' => 'Anfrage abgebrochen',
|
||||
'save' => 'Speichern',
|
||||
'select' => 'auswählen',
|
||||
'search' => 'Suche',
|
||||
@@ -151,6 +153,8 @@
|
||||
'suppliers' => 'Lieferanten',
|
||||
'total_assets' => 'Gesamte Assets',
|
||||
'total_licenses' => 'Lizenzen insgesamt',
|
||||
'total_accessories' => 'gesamtes Zubehör',
|
||||
'total_consumables' => 'gesamtes Verbrauchsmaterial',
|
||||
'type' => 'Typ',
|
||||
'undeployable' => 'Nicht herausgebbar',
|
||||
'unknown_admin' => 'Unbekannter Administrator',
|
||||
|
||||
71
resources/lang/de/mail.php
Normal file
71
resources/lang/de/mail.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'a_user_canceled' => 'Eine Geräte Anfrage auf der Webseite wurde vom Benutzer abgebrochen',
|
||||
'a_user_requested' => 'Ein Benutzer hat ein Gerät auf der Webseite angefordert',
|
||||
'accessory_name' => 'Zubehör Name:',
|
||||
'additional_notes' => 'Zusätzliche Bemerkungen:',
|
||||
'admin_has_created' => 'Ein Administrator hat auf der :web Webseite ein Konto für Sie erstellt.',
|
||||
'asset' => 'Asset:',
|
||||
'asset_name' => 'Gegenstands Name:',
|
||||
'asset_requested' => 'Gegenstand angefordert',
|
||||
'asset_tag' => 'Gegenstands Etikett:',
|
||||
'assets_warrantee_expiring' => '{1} Gegenstand dessen Garantie in den nächsten 60 Tagen abläuft. | [2, Inf] Gegenstände mit Garantien, die in den nächsten 60 Tagen ablaufen.',
|
||||
'assigned_to' => 'Zugewiesen an',
|
||||
'best_regards' => 'Grüße,',
|
||||
'canceled' => 'Abgebrochen:',
|
||||
'checkin_date' => 'Eingecheckt am:',
|
||||
'checkout_date' => 'Ausgecheckt am:',
|
||||
'click_to_confirm' => 'Bitte klicken Sie zum Bestätigen Ihres :web Kontos auf den folgenden Link:',
|
||||
'click_on_the_link_accessory' => 'Bitte klicken Sie auf den Link weiter unten, um den Erhalt des Zubehörs zu bestätigen.',
|
||||
'click_on_the_link_asset' => 'Bitte klicken Sie auf den Link weiter unten, um den Erhalt des Gegenstands zu bestätigen.',
|
||||
'Confirm_Asset_Checkin' => 'Gegenstand Einchecken bestätigen.',
|
||||
'Confirm_Accessory_Checkin' => 'Zubehör Einchecken bestätigen.',
|
||||
'Confirm_accessory_delivery' => 'Zubehör Zustellung bestätigen.',
|
||||
'Confirm_asset_delivery' => 'Gegenstands Lieferung bestätigen.',
|
||||
'Confirm_consumable_delivery' => 'Verbrauchsmaterial Lieferung bestätigen.',
|
||||
'current_QTY' => 'Aktuelle Menge',
|
||||
'Days' => 'Tage',
|
||||
'days' => 'Tage',
|
||||
'expecting_checkin_date' => 'Erwartetes Eincheck Datum:',
|
||||
'expires' => 'Ablaufdatum',
|
||||
'Expiring_Assets_Report' => 'Bericht über Ablaufende Gegenstände.',
|
||||
'Expiring_Licenses_Report' => 'Bericht über ablaufende Lizenzen.',
|
||||
'hello' => 'Hallo',
|
||||
'hi' => 'Hallo',
|
||||
'i_have_read' => 'Ich habe die Nutzungsbedingungen gelesen und stimme diesen zu, und ich habe diesen Gegenstand erhalten.',
|
||||
'item' => 'Gegenstand:',
|
||||
'items_below_minimum' => '{1} Gegenstand, der unter dem dem Mindestbestand ist oder es bald sein wird. | [2, Inf] Gegenstände, die unter dem Mindestbestand sind oder es bald sein werden.',
|
||||
'Item_Request_Canceled' => 'Gegenstands Anfrage abgebrochen',
|
||||
'Item_Requested' => 'Gegenstand angefortdert',
|
||||
'licenses_expiring' => '{1} Lizenz läuft in den nächsten 60 Tagen ab. | [2, Inf] Lizenzen laufen in den nächsten 60 Tagen ab.',
|
||||
'link_to_update_password' => 'Klicken Sie bitte auf den folgenden Link zum Aktualisieren Ihres :web Passworts:',
|
||||
'login_first_admin' => 'Melden Sie sich zu Ihrer neuen Snipe-IT-Installation mithilfe der unten stehenden Anmeldeinformationen an:',
|
||||
'login' => 'Benutzername:',
|
||||
'Low_Inventory_Report' => 'Bericht über niedrige Lagerbestände',
|
||||
'min_QTY' => 'Mindestmenge',
|
||||
'name' => 'Name',
|
||||
'new_item_checked' => 'Ein neuer Gegenstand wurde unter Ihrem Namen ausgecheckt. Details folgen.',
|
||||
'password' => 'Passwort:',
|
||||
'password_reset' => 'Passwort zurücksetzen',
|
||||
|
||||
'read_the_terms' => 'Bitte lesen Sie die nachfolgenden Nutzungsbedingungen.',
|
||||
'read_the_terms_and_click' => 'Bitte lesen Sie die Nutzungsbedingungen und klicken Sie auf den Link unten, um zu bestätigen, dass Sie diese gelesen und die Nutzungsbedingungen und den Gegenstand erhalten haben.',
|
||||
'requested' => 'Angefordert:',
|
||||
'reset_link' => 'Ihr Link zum Zurücksetzen des Kennworts',
|
||||
'reset_password' => 'Klicken Sie hier, um Ihr Passwort zurückzusetzen:',
|
||||
'serial' => 'Seriennummer:',
|
||||
'supplier' => 'Lieferant',
|
||||
'tag' => 'Kennzeichnung',
|
||||
'test_email' => 'Test E-Mail von Snipe-IT',
|
||||
'test_mail_text' => 'Dies ist ein Test von Snipe-IT-Asset-Management-System. Wenn du dies erhalten hast funktioniert das Senden von Mails :)',
|
||||
'the_following_item' => 'Der folgende Gegenstand wurde eingecheckt: ',
|
||||
'There_are' => 'Da ist {1} | [2, Inf] Da sind',
|
||||
'to_reset' => 'Zum zurücksetzen Ihres :web Passwortes füllen Sie dies Formular aus:',
|
||||
'type' => 'Typ',
|
||||
'user' => 'Benutzer:',
|
||||
'username' => 'Benutzername:',
|
||||
'welcome' => 'Wilkommen, :name',
|
||||
'welcome_to' => 'Willkommen bei: Web!',
|
||||
'your_credentials' => 'Ihre Snipe-IT Anmeldedaten',
|
||||
);
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
return array(
|
||||
|
||||
'does_not_exist' => 'The accessory does not exist.',
|
||||
'does_not_exist' => 'Το εξάρτημα δεν υπάρχει.',
|
||||
'assoc_users' => 'This accessory currently has :count items checked out to users. Please check in the accessories and and try again. ',
|
||||
|
||||
'create' => array(
|
||||
|
||||
@@ -3,13 +3,14 @@
|
||||
return array(
|
||||
'about_consumables_title' => 'About Consumables',
|
||||
'about_consumables_text' => 'Consumables are anything purchased that will be used up over time. For example, printer ink or copier paper.',
|
||||
'consumable_name' => 'Consumable Name',
|
||||
'cost' => 'Purchase Cost',
|
||||
'create' => 'Create Consumable',
|
||||
'date' => 'Purchase Date',
|
||||
'item_no' => 'Item No.',
|
||||
'order' => 'Order Number',
|
||||
'remaining' => 'Remaining',
|
||||
'total' => 'Total',
|
||||
'checkout' => 'Checkout Consumable to User',
|
||||
'consumable_name' => 'Consumable Name',
|
||||
'cost' => 'Purchase Cost',
|
||||
'create' => 'Create Consumable',
|
||||
'date' => 'Purchase Date',
|
||||
'item_no' => 'Item No.',
|
||||
'order' => 'Order Number',
|
||||
'remaining' => 'Remaining',
|
||||
'total' => 'Total',
|
||||
'update' => 'Update Consumable',
|
||||
);
|
||||
|
||||
@@ -4,17 +4,18 @@ return array(
|
||||
'custom_fields' => 'Custom Fields',
|
||||
'field' => 'Field',
|
||||
'about_fieldsets_title' => 'About Fieldsets',
|
||||
'about_fieldsets_text' => 'Fieldsets allow you to create groups of custom fields that are frequently re-used used for specific asset model types.',
|
||||
'about_fieldsets_text' => 'Fieldsets allow you to create groups of custom fields that are frequently re-used for specific asset model types.',
|
||||
'custom_format' => 'Custom format...',
|
||||
'encrypt_field' => 'Encrypt the value of this field in the database',
|
||||
'encrypt_field' => 'Encrypt the value of this field in the database for each asset. The decrypted value of this field will only be viewable by admins.',
|
||||
'encrypt_field_help' => 'WARNING: Encrypting a field makes it unsearchable.',
|
||||
'encrypted' => 'Encrypted',
|
||||
'fieldset' => 'Fieldset',
|
||||
'qty_fields' => 'Qty Fields',
|
||||
'fieldsets' => 'Fieldsets',
|
||||
'fieldset_name' => 'Fieldset Name',
|
||||
'field_name' => 'Field Name',
|
||||
'field_values' => 'Field Values',
|
||||
'field_values_help' => 'Add selectable options, one per line. Blank lines other than the first line will be ignored.',
|
||||
'field_values_help' => 'Add selectable options, one per line. Blank lines other than the first line will be ignored. Separate values and labels by pipes on each line (optional).',
|
||||
'field_element' => 'Form Element',
|
||||
'field_element_short' => 'Element',
|
||||
'field_format' => 'Format',
|
||||
@@ -25,4 +26,5 @@ return array(
|
||||
'order' => 'Order',
|
||||
'create_fieldset' => 'New Fieldset',
|
||||
'create_field' => 'New Custom Field',
|
||||
'value_encrypted' => 'The value of this field is encrypted in the database. Only admin users will be able to view the decrypted value',
|
||||
);
|
||||
|
||||
@@ -12,7 +12,8 @@ return array(
|
||||
'edit' => 'Edit Asset',
|
||||
'filetype_info' => 'Allowed filetypes are png, gif, jpg, jpeg, doc, docx, pdf, txt, zip, and rar.',
|
||||
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.<br/> <a href="/hardware/models/:model_id/restore">Click here to restore the model</a>.',
|
||||
'requestable' => 'Requestable',
|
||||
'requestable' => 'Requestable',
|
||||
'requested' => 'Requested',
|
||||
'restore' => 'Restore Asset',
|
||||
'pending' => 'Pending',
|
||||
'undeployable' => 'Undeployable',
|
||||
|
||||
@@ -37,9 +37,11 @@ return array(
|
||||
),
|
||||
|
||||
'import' => array(
|
||||
'error' => 'Some items did not import correctly.',
|
||||
'errorDetail' => 'The following Items were not imported because of errors.',
|
||||
'success' => "Your file has been imported",
|
||||
'error' => 'Some items did not import correctly.',
|
||||
'errorDetail' => 'The following Items were not imported because of errors.',
|
||||
'success' => "Your file has been imported",
|
||||
'file_delete_success' => "Your file has been been successfully deleted",
|
||||
'file_delete_error' => "The file was unable to be deleted",
|
||||
),
|
||||
|
||||
|
||||
@@ -67,6 +69,7 @@ return array(
|
||||
'requests' => array(
|
||||
'error' => 'Asset was not requested, please try again',
|
||||
'success' => 'Asset requested successfully.',
|
||||
'canceled' => 'Checkout request successfully canceled'
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
@@ -23,7 +23,7 @@ return array(
|
||||
'error' => 'File(s) not uploaded. Please try again.',
|
||||
'success' => 'File(s) successfully uploaded.',
|
||||
'nofiles' => 'You did not select any files for upload, or the file you are trying to upload is too large',
|
||||
'invalidfiles' => 'One or more of your files is too large or is a filetype that is not allowed. Allowed filetypes are png, gif, jpg, doc, docx, pdf, and txt.',
|
||||
'invalidfiles' => 'One or more of your files is too large or is a filetype that is not allowed. Allowed filetypes are png, gif, jpg, doc, docx, pdf, txt, zip, rar, and rtf.',
|
||||
),
|
||||
|
||||
'update' => array(
|
||||
|
||||
@@ -4,6 +4,7 @@ return array(
|
||||
|
||||
'deleted' => 'This model has been deleted. <a href="/hardware/models/:model_id/restore">Click here to restore it</a>.',
|
||||
'restore' => 'Restore Model',
|
||||
'requestable' => 'Users may request this model',
|
||||
'show_mac_address' => 'Show MAC address field in assets in this model',
|
||||
'view_deleted' => 'View Deleted',
|
||||
'view_models' => 'View Models',
|
||||
|
||||
@@ -11,7 +11,7 @@ return array(
|
||||
'title' => 'Asset Models',
|
||||
'update' => 'Update Asset Model',
|
||||
'view' => 'View Asset Model',
|
||||
'update' => 'Update Model',
|
||||
'update' => 'Update Asset Model',
|
||||
'clone' => 'Clone Model',
|
||||
'edit' => 'Edit Model',
|
||||
);
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
'consumables' => 'Consumables',
|
||||
'country' => 'Country',
|
||||
'create' => 'Create New',
|
||||
'created' => 'Item Created',
|
||||
'created_asset' => 'created asset',
|
||||
'created_at' => 'Created at',
|
||||
'currency' => '$', // this is deprecated
|
||||
@@ -127,6 +128,7 @@
|
||||
'remove_company' => 'Remove Company Association',
|
||||
'reports' => 'Reports',
|
||||
'requested' => 'Requested',
|
||||
'request_canceled' => 'Request Canceled',
|
||||
'save' => 'Save',
|
||||
'select' => 'Select',
|
||||
'search' => 'Search',
|
||||
@@ -151,6 +153,8 @@
|
||||
'suppliers' => 'Suppliers',
|
||||
'total_assets' => 'total assets',
|
||||
'total_licenses' => 'total licenses',
|
||||
'total_accessories' => 'total accessories',
|
||||
'total_consumables' => 'total consumables',
|
||||
'type' => 'Type',
|
||||
'undeployable' => 'Un-deployable',
|
||||
'unknown_admin' => 'Unknown Admin',
|
||||
|
||||
74
resources/lang/el/mail.php
Normal file
74
resources/lang/el/mail.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'a_user_canceled' => 'A user has canceled an item request on the website',
|
||||
'a_user_requested' => 'A user has requested an item on the website',
|
||||
'accessory_name' => 'Accessory Name:',
|
||||
'additional_notes' => 'Additional Notes:',
|
||||
'admin_has_created' => 'An administrator has created an account for you on the :web website.',
|
||||
'asset' => 'Asset:',
|
||||
'asset_name' => 'Asset Name:',
|
||||
'asset_requested' => 'Asset requested',
|
||||
'asset_tag' => 'Asset Tag:',
|
||||
'assets_warrantee_expiring' => '{1} asset with warrantee expiring in the next 60 days.|[2,Inf] assets with warrantees
|
||||
expiring in the next 60 days.',
|
||||
'assigned_to' => 'Assigned To',
|
||||
'best_regards' => 'Best regards,',
|
||||
'canceled' => 'Canceled:',
|
||||
'checkin_date' => 'Checkin Date:',
|
||||
'checkout_date' => 'Checkout Date:',
|
||||
'click_to_confirm' => 'Please click on the following link to confirm your :web account:',
|
||||
'click_on_the_link_accessory' => 'Please click on the link at the bottom to confirm that you have received the accessory.',
|
||||
'click_on_the_link_asset' => 'Please click on the link at the bottom to confirm that you have received the asset.',
|
||||
'Confirm_Asset_Checkin' => 'Confirm Asset Checkin.',
|
||||
'Confirm_Accessory_Checkin' => 'Confirm Accessory Checkin.',
|
||||
'Confirm_accessory_delivery' => 'Confirm accessory delivery.',
|
||||
'Confirm_asset_delivery' => 'Confirm asset delivery.',
|
||||
'Confirm_consumable_delivery' => 'Confirm consumable delivery.',
|
||||
'current_QTY' => 'Current QTY',
|
||||
'Days' => 'Days',
|
||||
'days' => 'Days',
|
||||
'expecting_checkin_date' => 'Expected Checkin Date:',
|
||||
'expires' => 'Expires',
|
||||
'Expiring_Assets_Report' => 'Expiring Assets Report.',
|
||||
'Expiring_Licenses_Report' => 'Expiring Licenses Report.',
|
||||
'hello' => 'Hello',
|
||||
'hi' => 'Hi',
|
||||
'i_have_read' => 'I have read and agree to the terms of use, and have received this item.',
|
||||
'item' => 'Item:',
|
||||
'items_below_minimum' => '{1} item that is below minimum inventory or will soon be low.|[2,Inf] items that are below minimum
|
||||
inventory or will soon be low.',
|
||||
'Item_Request_Canceled' => 'Item Request Canceled',
|
||||
'Item_Requested' => 'Item Requested',
|
||||
'licenses_expiring' => '{1} license expiring next 60 days.|[2,Inf] licenses expiring next 60 days.',
|
||||
'link_to_update_password' => 'Please click on the following link to update your :web password:',
|
||||
'login_first_admin' => 'Login to your new Snipe-IT installation using the credentials below:',
|
||||
'login' => 'Login:',
|
||||
'Low_Inventory_Report' => 'Low Inventory Report',
|
||||
'min_QTY' => 'Min QTY',
|
||||
'name' => 'Name',
|
||||
'new_item_checked' => 'A new item has been checked out under your name, details are below.',
|
||||
'password' => 'Password:',
|
||||
'password_reset' => 'Password Reset',
|
||||
|
||||
'read_the_terms' => 'Please read the terms of use below.',
|
||||
'read_the_terms_and_click' => 'Please read the terms of use below, and click on the link at the bottom to confirm that you read
|
||||
and agree to the terms of use, and have received the asset.',
|
||||
'requested' => 'Requested:',
|
||||
'reset_link' => 'Your Password Reset Link',
|
||||
'reset_password' => 'Click here to reset your password:',
|
||||
'serial' => 'Serial:',
|
||||
'supplier' => 'Supplier',
|
||||
'tag' => 'Tag',
|
||||
'test_email' => 'Test Email from Snipe-IT',
|
||||
'test_mail_text' => 'This is a test from the Snipe-IT Asset Management System. If you got this, mail is working :)',
|
||||
'the_following_item' => 'The following item has been checked in: ',
|
||||
'There_are' => '{1} There is|[2,Inf] There are',
|
||||
'to_reset' => 'To reset your :web password, complete this form:',
|
||||
'type' => 'Type',
|
||||
'user' => 'User:',
|
||||
'username' => 'Username:',
|
||||
'welcome' => 'Welcome :name',
|
||||
'welcome_to' => 'Welcome to :web!',
|
||||
'your_credentials' => 'Your Snipe-IT credentials',
|
||||
);
|
||||
@@ -3,13 +3,14 @@
|
||||
return array(
|
||||
'about_consumables_title' => 'About Consumables',
|
||||
'about_consumables_text' => 'Consumables are anything purchased that will be used up over time. For example, printer ink or copier paper.',
|
||||
'consumable_name' => 'Consumable Name',
|
||||
'cost' => 'Purchase Cost',
|
||||
'create' => 'Create Consumable',
|
||||
'date' => 'Purchase Date',
|
||||
'item_no' => 'Item No.',
|
||||
'order' => 'Order Number',
|
||||
'remaining' => 'Remaining',
|
||||
'total' => 'Total',
|
||||
'checkout' => 'Checkout Consumable to User',
|
||||
'consumable_name' => 'Consumable Name',
|
||||
'cost' => 'Purchase Cost',
|
||||
'create' => 'Create Consumable',
|
||||
'date' => 'Purchase Date',
|
||||
'item_no' => 'Item No.',
|
||||
'order' => 'Order Number',
|
||||
'remaining' => 'Remaining',
|
||||
'total' => 'Total',
|
||||
'update' => 'Update Consumable',
|
||||
);
|
||||
|
||||
@@ -8,6 +8,7 @@ return array(
|
||||
'custom_format' => 'Custom format...',
|
||||
'encrypt_field' => 'Encrypt the value of this field in the database',
|
||||
'encrypt_field_help' => 'WARNING: Encrypting a field makes it unsearchable.',
|
||||
'encrypted' => 'Encrypted',
|
||||
'fieldset' => 'Fieldset',
|
||||
'qty_fields' => 'Qty Fields',
|
||||
'fieldsets' => 'Fieldsets',
|
||||
@@ -25,4 +26,5 @@ return array(
|
||||
'order' => 'Order',
|
||||
'create_fieldset' => 'New Fieldset',
|
||||
'create_field' => 'New Custom Field',
|
||||
'value_encrypted' => 'The value of this field is encrypted in the database. Only admin users will be able to view the decrypted value',
|
||||
);
|
||||
|
||||
@@ -12,7 +12,8 @@ return array(
|
||||
'edit' => 'Edit Asset',
|
||||
'filetype_info' => 'Allowed filetypes are png, gif, jpg, jpeg, doc, docx, pdf, txt, zip, and rar.',
|
||||
'model_deleted' => 'This Assets model has been deleted. You must restore the model before you can restore the Asset.<br/> <a href="/hardware/models/:model_id/restore">Click here to restore the model</a>.',
|
||||
'requestable' => 'Requestable',
|
||||
'requestable' => 'Requestable',
|
||||
'requested' => 'Requested',
|
||||
'restore' => 'Restore Asset',
|
||||
'pending' => 'Pending',
|
||||
'undeployable' => 'Undeployable',
|
||||
|
||||
@@ -37,9 +37,11 @@ return array(
|
||||
),
|
||||
|
||||
'import' => array(
|
||||
'error' => 'Some items did not import correctly.',
|
||||
'errorDetail' => 'The following Items were not imported because of errors.',
|
||||
'success' => "Your file has been imported",
|
||||
'error' => 'Some items did not import correctly.',
|
||||
'errorDetail' => 'The following Items were not imported because of errors.',
|
||||
'success' => "Your file has been imported",
|
||||
'file_delete_success' => "Your file has been been successfully deleted",
|
||||
'file_delete_error' => "The file was unable to be deleted",
|
||||
),
|
||||
|
||||
|
||||
@@ -67,6 +69,7 @@ return array(
|
||||
'requests' => array(
|
||||
'error' => 'Asset was not requested, please try again',
|
||||
'success' => 'Asset requested successfully.',
|
||||
'canceled' => 'Checkout request successfully canceled'
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
@@ -23,7 +23,7 @@ return array(
|
||||
'error' => 'File(s) not uploaded. Please try again.',
|
||||
'success' => 'File(s) successfully uploaded.',
|
||||
'nofiles' => 'You did not select any files for upload, or the file you are trying to upload is too large',
|
||||
'invalidfiles' => 'One or more of your files is too large or is a filetype that is not allowed. Allowed filetypes are png, gif, jpg, doc, docx, pdf, and txt.',
|
||||
'invalidfiles' => 'One or more of your files is too large or is a filetype that is not allowed. Allowed filetypes are png, gif, jpg, doc, docx, pdf, txt, zip, rar, and rtf.',
|
||||
),
|
||||
|
||||
'update' => array(
|
||||
|
||||
@@ -4,6 +4,7 @@ return array(
|
||||
|
||||
'deleted' => 'This model has been deleted. <a href="/hardware/models/:model_id/restore">Click here to restore it</a>.',
|
||||
'restore' => 'Restore Model',
|
||||
'requestable' => 'Users may request this model',
|
||||
'show_mac_address' => 'Show MAC address field in assets in this model',
|
||||
'view_deleted' => 'View Deleted',
|
||||
'view_models' => 'View Models',
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user