Compare commits
141 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 47c7061af5 | |||
| 3799ab87ed | |||
| 6232a1f941 | |||
| f5ce580593 | |||
| 3afa5f7cda | |||
| 17b271918f | |||
| 3922569d7f | |||
| 3a302fe2d7 | |||
| 249f86bb21 | |||
| 0951a756cc | |||
| fc644925ea | |||
| 59c0b63ad0 | |||
| c0f8b3773c | |||
| fd210c6439 | |||
| f7e23cf7c8 | |||
| 387351d7ed | |||
| 6438d30afc | |||
| b4e1d37b16 | |||
| 8ac57d0121 | |||
| d3b51715dc | |||
| b215924b1a | |||
| 25d3d66880 | |||
| 189574377a | |||
| 341ddec9d8 | |||
| abcce78944 | |||
| 22e13cd4d2 | |||
| 5c105b52b6 | |||
| f757da1a98 | |||
| c1f8db37d9 | |||
| cfc215a013 | |||
| 4215a3257b | |||
| 1f247ff541 | |||
| 2fc46746e2 | |||
| e185dc68af | |||
| 54000ff69f | |||
| f6a38e848a | |||
| 7e8d670f81 | |||
| 287b150b7f | |||
| b379656d55 | |||
| 2e11a983c8 | |||
| a9753eb646 | |||
| 707c4db881 | |||
| d1de34394e | |||
| e5719441bc | |||
| 7153013fb0 | |||
| 55500f77fb | |||
| 2b826c3adc | |||
| cd193ce8bb | |||
| cb50142ba3 | |||
| 81aaed92ce | |||
| 4bc551db82 | |||
| 471d665408 | |||
| 068308ef56 | |||
| 1e65c7bf9a | |||
| ae567c08db | |||
| 0d25a4868a | |||
| 13586be6b0 | |||
| 44c649c3c8 | |||
| 1a7bfb75fa | |||
| 2b803a6a6c | |||
| 92e4bdc02e | |||
| 4d3d19ca2b | |||
| 9c06912efd | |||
| c5893b4445 | |||
| b90933bb8b | |||
| fe9a90854d | |||
| 3b012f2827 | |||
| e31dadc99a | |||
| 5519e2d4ae | |||
| 6285a8b5b2 | |||
| a3139c6fc6 | |||
| 389ba9059f | |||
| c0e50be03e | |||
| 447833c996 | |||
| 809e310565 | |||
| 38dd03b5ad | |||
| 68f6385eba | |||
| bd376a4992 | |||
| 97f65ceac0 | |||
| 9e39abcc32 | |||
| 5cd2857d5d | |||
| 585fcfb7d4 | |||
| d9135a8aac | |||
| 081a64223a | |||
| a4eeff01f0 | |||
| eedbe468ac | |||
| 463d9513e2 | |||
| ed4aa7dec2 | |||
| d6bbe15a76 | |||
| ea0a0a4a69 | |||
| 34442362ca | |||
| b846bb20c6 | |||
| ab3f5f4f4d | |||
| ea63ced2bd | |||
| 6bd49bfb72 | |||
| b80d3ce50d | |||
| c069829b33 | |||
| 665a113ed8 | |||
| aa7091d962 | |||
| ceff6a9617 | |||
| c01850fc73 | |||
| 4c04dc7b84 | |||
| c0103cd878 | |||
| 1f1d9d5461 | |||
| c776fa4f7b | |||
| dc91d10395 | |||
| 4df10ad26c | |||
| 668a88bc86 | |||
| d6e0012818 | |||
| 1d5fb52bfc | |||
| 8efb02a0ee | |||
| dea42db18b | |||
| 78d5d3947f | |||
| a1f5e11517 | |||
| 99ad096a8a | |||
| 65b4ffeed9 | |||
| 0dac88816a | |||
| f7626404b7 | |||
| 78f4b08398 | |||
| 160fd1c86a | |||
| 6ce01487c5 | |||
| b46cbac911 | |||
| e9c3d6bfb7 | |||
| 9e9a5b7a53 | |||
| e7fe91c9d4 | |||
| 6d130326aa | |||
| 02db0f9f9d | |||
| e0668b7507 | |||
| 1376f246dc | |||
| 113c55d905 | |||
| 9cc25bcfd0 | |||
| 81d3f78263 | |||
| 66596b0b09 | |||
| 7455b1019a | |||
| 37df934e97 | |||
| 6517a95d45 | |||
| 4b84a0c916 | |||
| 0f0a61e477 | |||
| f64382aa00 | |||
| 1743417ec9 | |||
| c61bed52c8 |
@@ -773,6 +773,33 @@
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "BlueHatbRit",
|
||||
"name": "Elliot Blackburn",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/1068477?v=4",
|
||||
"profile": "http://www.elliotblackburn.com",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "TonisOrmisson",
|
||||
"name": "Tõnis Ormisson",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/6357451?v=4",
|
||||
"profile": "http://andmemasin.eu",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "thakilla",
|
||||
"name": "Nicolai Essig",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/449411?v=4",
|
||||
"profile": "http://www.nicolai-essig.de",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+2
-1
@@ -97,7 +97,8 @@ LOGIN_LOCKOUT_DURATION=60
|
||||
# --------------------------------------------
|
||||
# OPTIONAL: MISC
|
||||
# --------------------------------------------
|
||||
APP_LOG=single
|
||||
APP_LOG=daily
|
||||
APP_LOG_MAX_FILES=10
|
||||
APP_LOCKED=false
|
||||
FILESYSTEM_DISK=local
|
||||
APP_TRUSTED_PROXIES=192.168.1.1,10.0.0.1
|
||||
|
||||
@@ -27,6 +27,7 @@ public/uploads/logo.png
|
||||
public/uploads/logo.svg
|
||||
public/uploads/models/*
|
||||
public/uploads/suppliers/*
|
||||
public/uploads/accessories/*
|
||||
public/uploads/users/*
|
||||
storage/app/private_uploads/users/*
|
||||
storage/debugbar/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[](https://travis-ci.org/snipe/snipe-it) [](http://waffle.io/snipe/snipe-it) []() [](https://crowdin.com/project/snipe-it) [](https://gitter.im/snipe/snipe-it?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [](https://hub.docker.com/r/snipe/snipe-it/) [](https://twitter.com/snipeyhead) [](https://zenhub.io) [](https://www.codacy.com/app/snipe/snipe-it?utm_source=github.com&utm_medium=referral&utm_content=snipe/snipe-it&utm_campaign=Badge_Grade)
|
||||
[](#contributors)
|
||||
[](https://travis-ci.org/snipe/snipe-it) [](http://waffle.io/snipe/snipe-it) []() [](https://crowdin.com/project/snipe-it) [](https://gitter.im/snipe/snipe-it?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [](https://hub.docker.com/r/snipe/snipe-it/) [](https://twitter.com/snipeyhead) [](https://zenhub.io) [](https://www.codacy.com/app/snipe/snipe-it?utm_source=github.com&utm_medium=referral&utm_content=snipe/snipe-it&utm_campaign=Badge_Grade)
|
||||
[](#contributors)
|
||||
|
||||
|
||||
## Snipe-IT - Open Source Asset Management System
|
||||
@@ -67,7 +67,8 @@ Thanks goes to all of these wonderful people ([emoji key](https://github.com/ken
|
||||
| [<img src="https://avatars0.githubusercontent.com/u/8341172?v=3" width="110px;"/><br /><sub>Jay Richards</sub>](http://www.cordeos.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=technogenus "Code") | [<img src="https://avatars2.githubusercontent.com/u/7295127?v=3" width="110px;"/><br /><sub>Alexander Innes</sub>](https://necurity.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=leostat "Code") | [<img src="https://avatars2.githubusercontent.com/u/334485?v=3" width="110px;"/><br /><sub>Danny Garcia</sub>](https://buzzedword.codes)<br />[💻](https://github.com/snipe/snipe-it/commits?author=buzzedword "Code") | [<img src="https://avatars2.githubusercontent.com/u/366855?v=3" width="110px;"/><br /><sub>archpoint</sub>](https://github.com/archpoint)<br />[💻](https://github.com/snipe/snipe-it/commits?author=archpoint "Code") | [<img src="https://avatars1.githubusercontent.com/u/67991?v=3" width="110px;"/><br /><sub>Jake McGraw</sub>](http://www.jakemcgraw.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jakemcgraw "Code") | [<img src="https://avatars1.githubusercontent.com/u/1714374?v=3" width="110px;"/><br /><sub>FleischKarussel</sub>](https://github.com/FleischKarussel)<br />[📖](https://github.com/snipe/snipe-it/commits?author=FleischKarussel "Documentation") | [<img src="https://avatars3.githubusercontent.com/u/319644?v=3" width="110px;"/><br /><sub>Dylan Yi</sub>](https://github.com/feeva)<br />[💻](https://github.com/snipe/snipe-it/commits?author=feeva "Code") |
|
||||
| [<img src="https://avatars2.githubusercontent.com/u/857740?v=3" width="110px;"/><br /><sub>Gil Rutkowski</sub>](http://FlashingCursor.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=flashingcursor "Code") | [<img src="https://avatars3.githubusercontent.com/u/129360?v=3" width="110px;"/><br /><sub>Desmond Morris</sub>](http://www.desmondmorris.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=desmondmorris "Code") | [<img src="https://avatars2.githubusercontent.com/u/52936?v=3" width="110px;"/><br /><sub>Nick Peelman</sub>](http://peelman.us)<br />[💻](https://github.com/snipe/snipe-it/commits?author=peelman "Code") | [<img src="https://avatars0.githubusercontent.com/u/53161?v=3" width="110px;"/><br /><sub>Abraham Vegh</sub>](https://abrahamvegh.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=abrahamvegh "Code") | [<img src="https://avatars0.githubusercontent.com/u/2818680?v=3" width="110px;"/><br /><sub>Mohamed Rashid</sub>](https://github.com/rashivkp)<br />[📖](https://github.com/snipe/snipe-it/commits?author=rashivkp "Documentation") | [<img src="https://avatars3.githubusercontent.com/u/1509456?v=3" width="110px;"/><br /><sub>Kasey</sub>](http://hinchk.github.io)<br />[💻](https://github.com/snipe/snipe-it/commits?author=HinchK "Code") | [<img src="https://avatars2.githubusercontent.com/u/10522541?v=3" width="110px;"/><br /><sub>Brett</sub>](https://github.com/BrettFagerlund)<br />[⚠️](https://github.com/snipe/snipe-it/commits?author=BrettFagerlund "Tests") |
|
||||
| [<img src="https://avatars2.githubusercontent.com/u/16108587?v=3" width="110px;"/><br /><sub>Jason Spriggs</sub>](http://jasonspriggs.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jasonspriggs "Code") | [<img src="https://avatars2.githubusercontent.com/u/1134568?v=3" width="110px;"/><br /><sub>Nate Felton</sub>](http://n8felton.wordpress.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=n8felton "Code") | [<img src="https://avatars2.githubusercontent.com/u/14036694?v=3" width="110px;"/><br /><sub>Manasses Ferreira</sub>](http://homepages.dcc.ufmg.br/~manassesferreira)<br />[💻](https://github.com/snipe/snipe-it/commits?author=manassesferreira "Code") | [<img src="https://avatars0.githubusercontent.com/u/15913949?v=3" width="110px;"/><br /><sub>Steve</sub>](https://github.com/steveelwood)<br />[⚠️](https://github.com/snipe/snipe-it/commits?author=steveelwood "Tests") | [<img src="https://avatars1.githubusercontent.com/u/3361683?v=3" width="110px;"/><br /><sub>matc</sub>](http://twitter.com/matc)<br />[⚠️](https://github.com/snipe/snipe-it/commits?author=matc "Tests") | [<img src="https://avatars3.githubusercontent.com/u/7405702?v=3" width="110px;"/><br /><sub>Cole R. Davis</sub>](http://www.davisracingteam.com)<br />[⚠️](https://github.com/snipe/snipe-it/commits?author=VanillaNinjaD "Tests") | [<img src="https://avatars2.githubusercontent.com/u/10167681?v=3" width="110px;"/><br /><sub>gibsonjoshua55</sub>](https://github.com/gibsonjoshua55)<br />[💻](https://github.com/snipe/snipe-it/commits?author=gibsonjoshua55 "Code") |
|
||||
| [<img src="https://avatars2.githubusercontent.com/u/2809241?v=4" width="110px;"/><br /><sub>Robin Temme</sub>](https://github.com/zwerch)<br />[💻](https://github.com/snipe/snipe-it/commits?author=zwerch "Code") | [<img src="https://avatars0.githubusercontent.com/u/6961695?v=4" width="110px;"/><br /><sub>Iman</sub>](https://github.com/imanghafoori1)<br />[💻](https://github.com/snipe/snipe-it/commits?author=imanghafoori1 "Code") | [<img src="https://avatars1.githubusercontent.com/u/6551003?v=4" width="110px;"/><br /><sub>Richard Hofman</sub>](https://github.com/richardhofman6)<br />[💻](https://github.com/snipe/snipe-it/commits?author=richardhofman6 "Code") | [<img src="https://avatars0.githubusercontent.com/u/3697569?v=4" width="110px;"/><br /><sub>gizzmojr</sub>](https://github.com/gizzmojr)<br />[💻](https://github.com/snipe/snipe-it/commits?author=gizzmojr "Code") | [<img src="https://avatars3.githubusercontent.com/u/404729?v=4" width="110px;"/><br /><sub>Jenny Li</sub>](https://github.com/imjennyli)<br />[📖](https://github.com/snipe/snipe-it/commits?author=imjennyli "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/869227?v=4" width="110px;"/><br /><sub>Geoff Young</sub>](https://github.com/GeoffYoung)<br />[💻](https://github.com/snipe/snipe-it/commits?author=GeoffYoung "Code") |
|
||||
| [<img src="https://avatars2.githubusercontent.com/u/2809241?v=4" width="110px;"/><br /><sub>Robin Temme</sub>](https://github.com/zwerch)<br />[💻](https://github.com/snipe/snipe-it/commits?author=zwerch "Code") | [<img src="https://avatars0.githubusercontent.com/u/6961695?v=4" width="110px;"/><br /><sub>Iman</sub>](https://github.com/imanghafoori1)<br />[💻](https://github.com/snipe/snipe-it/commits?author=imanghafoori1 "Code") | [<img src="https://avatars1.githubusercontent.com/u/6551003?v=4" width="110px;"/><br /><sub>Richard Hofman</sub>](https://github.com/richardhofman6)<br />[💻](https://github.com/snipe/snipe-it/commits?author=richardhofman6 "Code") | [<img src="https://avatars0.githubusercontent.com/u/3697569?v=4" width="110px;"/><br /><sub>gizzmojr</sub>](https://github.com/gizzmojr)<br />[💻](https://github.com/snipe/snipe-it/commits?author=gizzmojr "Code") | [<img src="https://avatars3.githubusercontent.com/u/404729?v=4" width="110px;"/><br /><sub>Jenny Li</sub>](https://github.com/imjennyli)<br />[📖](https://github.com/snipe/snipe-it/commits?author=imjennyli "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/869227?v=4" width="110px;"/><br /><sub>Geoff Young</sub>](https://github.com/GeoffYoung)<br />[💻](https://github.com/snipe/snipe-it/commits?author=GeoffYoung "Code") | [<img src="https://avatars3.githubusercontent.com/u/1068477?v=4" width="110px;"/><br /><sub>Elliot Blackburn</sub>](http://www.elliotblackburn.com)<br />[📖](https://github.com/snipe/snipe-it/commits?author=BlueHatbRit "Documentation") |
|
||||
| [<img src="https://avatars1.githubusercontent.com/u/6357451?v=4" width="110px;"/><br /><sub>Tõnis Ormisson</sub>](http://andmemasin.eu)<br />[💻](https://github.com/snipe/snipe-it/commits?author=TonisOrmisson "Code") | [<img src="https://avatars0.githubusercontent.com/u/449411?v=4" width="110px;"/><br /><sub>Nicolai Essig</sub>](http://www.nicolai-essig.de)<br />[💻](https://github.com/snipe/snipe-it/commits?author=thakilla "Code") |
|
||||
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
||||
|
||||
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
|
||||
|
||||
@@ -70,7 +70,7 @@ class LdapSync extends Command
|
||||
$results = Ldap::findLdapUsers();
|
||||
|
||||
// Retrieve locations with a mapped OU, and sort them from the shallowest to deepest OU (see #3993)
|
||||
$ldap_ou_locations = Location::whereNotNull('ldap_ou')->get()->toArray();
|
||||
$ldap_ou_locations = Location::where('ldap_ou', '!=', '')->get()->toArray();
|
||||
$ldap_ou_lengths = array();
|
||||
|
||||
foreach ($ldap_ou_locations as $location) {
|
||||
|
||||
@@ -16,7 +16,8 @@ class RecryptFromMcrypt extends Command
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'snipeit:legacy-recrypt';
|
||||
protected $signature = 'snipeit:legacy-recrypt
|
||||
{--force : Force a re-crypt of encrypted data from MCRYPT.}';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
@@ -48,6 +49,7 @@ class RecryptFromMcrypt extends Command
|
||||
// If not, we can try to use the current APP_KEY if looks like it's old
|
||||
$legacy_key = env('LEGACY_APP_KEY');
|
||||
$key_parts = explode(':', $legacy_key);
|
||||
$legacy_cipher = env('LEGACY_CIPHER');
|
||||
$errors = array();
|
||||
|
||||
if (!$legacy_key) {
|
||||
@@ -60,6 +62,7 @@ class RecryptFromMcrypt extends Command
|
||||
if (strlen($legacy_key) == 32) {
|
||||
$legacy_length_check = true;
|
||||
} elseif (array_key_exists('1', $key_parts) && (strlen($key_parts[1])==44)) {
|
||||
$legacy_key = base64_decode($key_parts[1],true);
|
||||
$legacy_length_check = true;
|
||||
} else {
|
||||
$legacy_length_check = false;
|
||||
@@ -79,7 +82,9 @@ class RecryptFromMcrypt extends Command
|
||||
$this->error('================================!!!! WARNING !!!!================================');
|
||||
$this->comment("This tool will attempt to decrypt your old Snipe-IT (mcrypt, now deprecated) encrypted data and re-encrypt it using OpenSSL. \n\nYou should only continue if you have backed up any and all old APP_KEYs and have backed up your data.");
|
||||
|
||||
if ($this->confirm("Are you SURE you wish to continue?")) {
|
||||
$force = ($this->option('force')) ? true : false;
|
||||
|
||||
if ($force || ($this->confirm("Are you SURE you wish to continue?"))) {
|
||||
|
||||
$backup_file = 'backups/env-backups/'.'app_key-'.date('Y-m-d-gis');
|
||||
|
||||
@@ -91,13 +96,21 @@ class RecryptFromMcrypt extends Command
|
||||
}
|
||||
|
||||
|
||||
$mcrypter = new McryptEncrypter($legacy_key);
|
||||
if ($legacy_cipher){
|
||||
$mcrypter = new McryptEncrypter($legacy_key,$legacy_cipher);
|
||||
}else{
|
||||
$mcrypter = new McryptEncrypter($legacy_key);
|
||||
}
|
||||
$settings = Setting::getSettings();
|
||||
|
||||
if ($settings->ldap_password=='') {
|
||||
if ($settings->ldap_pword=='') {
|
||||
$this->comment('INFO: No LDAP password found. Skipping... ');
|
||||
} else {
|
||||
$decrypted_ldap_pword = $mcrypter->decrypt($settings->ldap_pword);
|
||||
$settings->ldap_pword = \Crypt::encrypt($decrypted_ldap_pword);
|
||||
$settings->save();
|
||||
}
|
||||
|
||||
/** @var CustomField[] $custom_fields */
|
||||
$custom_fields = CustomField::where('field_encrypted','=', 1)->get();
|
||||
$this->comment('INFO: Retrieving encrypted custom fields...');
|
||||
|
||||
@@ -110,32 +123,22 @@ class RecryptFromMcrypt extends Command
|
||||
|
||||
|
||||
// Get all assets with a value in any of the fields that were encrypted
|
||||
/** @var Asset[] $assets */
|
||||
$assets = $query->get();
|
||||
|
||||
$bar = $this->output->createProgressBar(count($assets));
|
||||
|
||||
foreach ($custom_fields as $encrypted_field) {
|
||||
|
||||
// Try to decrypt the payload using the legacy app key
|
||||
try {
|
||||
$decrypted_field = $mcrypter->decrypt($encrypted_field);
|
||||
$this->comment($decrypted_field);
|
||||
} catch (\Exception $e) {
|
||||
$errors[] = ' - ERROR: Could not decrypt field ['.$encrypted_field->name.']: '.$e->getMessage();
|
||||
}
|
||||
$bar->advance();
|
||||
}
|
||||
|
||||
|
||||
foreach ($assets as $asset) {
|
||||
foreach ($custom_fields as $encrypted_field) {
|
||||
$columnName = $encrypted_field->db_column;
|
||||
|
||||
// Make sure the value isn't null
|
||||
if ($asset->{$encrypted_field}!='') {
|
||||
if ($asset->{$columnName}!='') {
|
||||
// Try to decrypt the payload using the legacy app key
|
||||
try {
|
||||
$decrypted_field = $mcrypter->decrypt($asset->{$encrypted_field});
|
||||
$asset->{$encrypted_field} = \Crypt::encrypt($decrypted_field);
|
||||
$decrypted_field = $mcrypter->decrypt($asset->{$columnName});
|
||||
$asset->{$columnName} = \Crypt::encrypt($decrypted_field);
|
||||
$this->comment($decrypted_field);
|
||||
} catch (\Exception $e) {
|
||||
$errors[] = ' - ERROR: Could not decrypt field ['.$encrypted_field->name.']: '.$e->getMessage();
|
||||
|
||||
@@ -7,6 +7,6 @@ class CheckoutNotAllowed extends Exception
|
||||
{
|
||||
public function __toString()
|
||||
{
|
||||
"A checkout is not allowed under these circumstances";
|
||||
return "A checkout is not allowed under these circumstances";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,8 @@ use Illuminate\Http\Request;
|
||||
use Slack;
|
||||
use Str;
|
||||
use View;
|
||||
use Image;
|
||||
use App\Http\Requests\ImageUploadRequest;
|
||||
|
||||
/** This controller handles all actions related to Accessories for
|
||||
* the Snipe-IT Asset Management application.
|
||||
@@ -57,6 +59,7 @@ class AccessoriesController extends Controller
|
||||
->with('item', new Accessory)
|
||||
->with('category_list', Helper::categoryList('accessory'))
|
||||
->with('company_list', Helper::companyList())
|
||||
->with('supplier_list', Helper::suppliersList())
|
||||
->with('location_list', Helper::locationsList())
|
||||
->with('manufacturer_list', Helper::manufacturerList());
|
||||
}
|
||||
@@ -68,7 +71,7 @@ class AccessoriesController extends Controller
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @return Redirect
|
||||
*/
|
||||
public function store(Request $request)
|
||||
public function store(ImageUploadRequest $request)
|
||||
{
|
||||
$this->authorize(Accessory::class);
|
||||
// create a new model instance
|
||||
@@ -87,6 +90,28 @@ class AccessoriesController extends Controller
|
||||
$accessory->purchase_cost = Helper::ParseFloat(request('purchase_cost'));
|
||||
$accessory->qty = request('qty');
|
||||
$accessory->user_id = Auth::user()->id;
|
||||
$accessory->supplier_id = request('supplier_id');
|
||||
|
||||
if ($request->hasFile('image')) {
|
||||
|
||||
if (!config('app.lock_passwords')) {
|
||||
$image = $request->file('image');
|
||||
$ext = $image->getClientOriginalExtension();
|
||||
$file_name = "accessory-".str_random(18).'.'.$ext;
|
||||
$path = public_path('/uploads/accessories');
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(null, 250, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path.'/'.$file_name);
|
||||
} else {
|
||||
$image->move($path, $file_name);
|
||||
}
|
||||
$accessory->image = $file_name;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Was the accessory created?
|
||||
if ($accessory->save()) {
|
||||
@@ -116,6 +141,7 @@ class AccessoriesController extends Controller
|
||||
->with('category_list', Helper::categoryList('accessory'))
|
||||
->with('company_list', Helper::companyList())
|
||||
->with('location_list', Helper::locationsList())
|
||||
->with('supplier_list', Helper::suppliersList())
|
||||
->with('manufacturer_list', Helper::manufacturerList());
|
||||
}
|
||||
|
||||
@@ -127,7 +153,7 @@ class AccessoriesController extends Controller
|
||||
* @param int $accessoryId
|
||||
* @return Redirect
|
||||
*/
|
||||
public function update(Request $request, $accessoryId = null)
|
||||
public function update(ImageUploadRequest $request, $accessoryId = null)
|
||||
{
|
||||
if (is_null($accessory = Accessory::find($accessoryId))) {
|
||||
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.does_not_exist'));
|
||||
@@ -144,11 +170,38 @@ class AccessoriesController extends Controller
|
||||
$accessory->manufacturer_id = request('manufacturer_id');
|
||||
$accessory->order_number = request('order_number');
|
||||
$accessory->model_number = request('model_number');
|
||||
$accessory->purchase_date = request('purchase_date');
|
||||
$accessory->purchase_cost = request('purchase_cost');
|
||||
$accessory->purchase_date = request('purchase_date');
|
||||
$accessory->purchase_cost = request('purchase_cost');
|
||||
$accessory->qty = request('qty');
|
||||
$accessory->supplier_id = request('supplier_id');
|
||||
|
||||
// Was the accessory updated?
|
||||
if ($request->hasFile('image')) {
|
||||
|
||||
if (!config('app.lock_passwords')) {
|
||||
|
||||
|
||||
$image = $request->file('image');
|
||||
$ext = $image->getClientOriginalExtension();
|
||||
$file_name = "accessory-".str_random(18).'.'.$ext;
|
||||
$path = public_path('/uploads/accessories');
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(null, 250, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path.'/'.$file_name);
|
||||
} else {
|
||||
$image->move($path, $file_name);
|
||||
}
|
||||
if (($accessory->image) && (file_exists($path.'/'.$accessory->image))) {
|
||||
unlink($path.'/'.$accessory->image);
|
||||
}
|
||||
|
||||
$accessory->image = $file_name;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Was the accessory updated?
|
||||
if ($accessory->save()) {
|
||||
return redirect()->route('accessories.index')->with('success', trans('admin/accessories/message.update.success'));
|
||||
}
|
||||
@@ -197,11 +250,7 @@ class AccessoriesController extends Controller
|
||||
if (isset($accessory->id)) {
|
||||
return view('accessories/view', compact('accessory'));
|
||||
}
|
||||
// Prepare the error message
|
||||
$error = trans('admin/accessories/message.does_not_exist', compact('id'));
|
||||
|
||||
// Redirect to the user management page
|
||||
return redirect()->route('accessories')->with('error', $error);
|
||||
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.does_not_exist', compact('id')));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -38,6 +38,10 @@ class AccessoriesController extends Controller
|
||||
$accessories->where('manufacturer_id','=',$request->input('manufacturer_id'));
|
||||
}
|
||||
|
||||
if ($request->has('supplier_id')) {
|
||||
$accessories->where('supplier_id','=',$request->input('supplier_id'));
|
||||
}
|
||||
|
||||
$offset = $request->input('offset', 0);
|
||||
$limit = $request->input('limit', 50);
|
||||
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
|
||||
|
||||
@@ -86,19 +86,19 @@ class AssetsController extends Controller
|
||||
$assets = Company::scopeCompanyables(Asset::select('assets.*'))->with(
|
||||
'assetloc', 'assetstatus', 'defaultLoc', 'assetlog', 'company',
|
||||
'model.category', 'model.manufacturer', 'model.fieldset','supplier');
|
||||
// If we should search on everything
|
||||
if (($request->has('search')) && (count($filter) == 0)) {
|
||||
|
||||
|
||||
if (count($filter) > 0) {
|
||||
$assets->ByFilter($filter);
|
||||
} elseif ($request->has('search')) {
|
||||
$assets->TextSearch($request->input('search'));
|
||||
// otherwise loop through the filters and search strictly on them
|
||||
} else {
|
||||
if (count($filter) > 0) {
|
||||
$assets->ByFilter($filter);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// These are used by the API to query against specific ID numbers
|
||||
if ($request->has('status_id')) {
|
||||
$assets->where('status_id', '=', $request->input('status_id'));
|
||||
$assets->where('assets.status_id', '=', $request->input('status_id'));
|
||||
}
|
||||
|
||||
if ($request->has('model_id')) {
|
||||
@@ -125,6 +125,10 @@ class AssetsController extends Controller
|
||||
$assets->ByManufacturer($request->input('manufacturer_id'));
|
||||
}
|
||||
|
||||
if ($request->has('depreciation_id')) {
|
||||
$assets->ByDepreciationId($request->input('depreciation_id'));
|
||||
}
|
||||
|
||||
$request->has('order_number') ? $assets = $assets->where('assets.order_number', '=', e($request->get('order_number'))) : '';
|
||||
|
||||
$offset = request('offset', 0);
|
||||
@@ -133,36 +137,76 @@ class AssetsController extends Controller
|
||||
|
||||
|
||||
// This is used by the sidenav, mostly
|
||||
|
||||
// We switched from using query scopes here because of a Laravel bug
|
||||
// related to fulltext searches on complex queries.
|
||||
// I am sad. :(
|
||||
switch ($request->input('status')) {
|
||||
case 'Deleted':
|
||||
$assets->withTrashed()->Deleted();
|
||||
break;
|
||||
case 'Pending':
|
||||
$assets->Pending();
|
||||
$assets->join('status_labels AS status_alias',function ($join) {
|
||||
$join->on('status_alias.id', "=", "assets.status_id")
|
||||
->where('status_alias.deployable','=',0)
|
||||
->where('status_alias.pending','=',1)
|
||||
->where('status_alias.archived', '=', 0);
|
||||
});
|
||||
break;
|
||||
case 'RTD':
|
||||
$assets->RTD();
|
||||
$assets->whereNull('assets.assigned_to')
|
||||
->join('status_labels AS status_alias',function ($join) {
|
||||
$join->on('status_alias.id', "=", "assets.status_id")
|
||||
->where('status_alias.deployable','=',1)
|
||||
->where('status_alias.pending','=',0)
|
||||
->where('status_alias.archived', '=', 0);
|
||||
});
|
||||
break;
|
||||
case 'Undeployable':
|
||||
$assets->Undeployable();
|
||||
break;
|
||||
case 'Archived':
|
||||
$assets->Archived();
|
||||
$assets->join('status_labels AS status_alias',function ($join) {
|
||||
$join->on('status_alias.id', "=", "assets.status_id")
|
||||
->where('status_alias.deployable','=',0)
|
||||
->where('status_alias.pending','=',0)
|
||||
->where('status_alias.archived', '=', 1);
|
||||
});
|
||||
break;
|
||||
case 'Requestable':
|
||||
$assets->RequestableAssets();
|
||||
$assets->where('assets.requestable', '=', 1)
|
||||
->join('status_labels AS status_alias',function ($join) {
|
||||
$join->on('status_alias.id', "=", "assets.status_id")
|
||||
->where('status_alias.deployable','=',1)
|
||||
->where('status_alias.pending','=',0)
|
||||
->where('status_alias.archived', '=', 0);
|
||||
});
|
||||
|
||||
break;
|
||||
case 'Deployed':
|
||||
$assets->Deployed();
|
||||
// more sad, horrible workarounds for laravel bugs when doing full text searches
|
||||
$assets->where('assets.assigned_to', '>', '0');
|
||||
break;
|
||||
default:
|
||||
// terrible workaround for complex-query Laravel bug in fulltext
|
||||
$assets->join('status_labels AS status_alias',function ($join) {
|
||||
$join->on('status_alias.id', "=", "assets.status_id")
|
||||
->where('status_alias.archived', '=', 0);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// This is kinda gross, but we need to do this because the Bootstrap Tables
|
||||
// API passes custom field ordering as custom_fields.fieldname, and we have to strip
|
||||
// that out to let the default sorter below order them correctly on the assets table.
|
||||
$sort_override = str_replace('custom_fields.','', $request->input('sort')) ;
|
||||
|
||||
// This handles all of the pivot sorting (versus the assets.* fields in the allowed_columns array)
|
||||
$column_sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'assets.created_at';
|
||||
|
||||
switch ($request->input('sort')) {
|
||||
// This handles all of the pivot sorting (versus the assets.* fields
|
||||
// in the allowed_columns array)
|
||||
$column_sort = in_array($sort_override, $allowed_columns) ? $sort_override : 'assets.created_at';
|
||||
|
||||
|
||||
switch ($sort_override) {
|
||||
case 'model':
|
||||
$assets->OrderModels($order);
|
||||
break;
|
||||
@@ -413,16 +457,28 @@ class AssetsController extends Controller
|
||||
|
||||
$this->authorize('checkout', $asset);
|
||||
|
||||
$error_payload = [];
|
||||
$error_payload['asset'] = [
|
||||
'id' => $asset->id,
|
||||
'asset_tag' => $asset->asset_tag,
|
||||
];
|
||||
if ($request->has('user_id')) {
|
||||
$target = User::find($request->input('user_id'));
|
||||
$error_payload['target_id'] = $request->input('user_id');
|
||||
$error_payload['target_type'] = User::class;
|
||||
// Don't let the user check an asset out to itself
|
||||
} elseif ($request->has('asset_id')) {
|
||||
$target = Asset::find($request->input('asset_id'));
|
||||
$target = Asset::where('id','!=',$asset_id)->find($request->input('asset_id'));
|
||||
$error_payload['target_id'] = $request->input('asset_id');
|
||||
$error_payload['target_type'] = Asset::class;
|
||||
} elseif ($request->has('location_id')) {
|
||||
$target = Location::find($request->input('location_id'));
|
||||
$error_payload['target_id'] = $request->input('location_id');
|
||||
$error_payload['target_type'] = Location::class;
|
||||
}
|
||||
|
||||
if (!isset($target)) {
|
||||
return response()->json(Helper::formatStandardApiResponse('error', ['asset'=> e($asset->asset_tag)], 'No valid checkout target specified for asset '.e($asset->asset_tag).'.'));
|
||||
return response()->json(Helper::formatStandardApiResponse('error', $error_payload, 'No valid checkout target specified for asset '.e($asset->asset_tag).'.'));
|
||||
}
|
||||
|
||||
$checkout_at = request('checkout_at', date("Y-m-d H:i:s"));
|
||||
@@ -481,6 +537,9 @@ class AssetsController extends Controller
|
||||
$data['item_tag'] = $asset->asset_tag;
|
||||
$data['item_serial'] = $asset->serial;
|
||||
$data['note'] = $logaction->note;
|
||||
$data['manufacturer_name'] = $asset->model->manufacturer->name;
|
||||
$data['model_name'] = $asset->model->name;
|
||||
$data['model_number'] = $asset->model->model_number;
|
||||
|
||||
if ((($asset->checkin_email()=='1')) && (isset($user)) && (!config('app.lock_passwords'))) {
|
||||
Mail::send('emails.checkin-asset', $data, function ($m) use ($user) {
|
||||
|
||||
@@ -20,7 +20,7 @@ class CategoriesController extends Controller
|
||||
public function index(Request $request)
|
||||
{
|
||||
$this->authorize('view', Category::class);
|
||||
$allowed_columns = ['id', 'name','category_type','use_default_eula','eula_text', 'require_acceptance','checkin_email'];
|
||||
$allowed_columns = ['id', 'name','category_type','use_default_eula','eula_text', 'require_acceptance','checkin_email', 'assets_count', 'accessories_count', 'consumables_count', 'components_count'];
|
||||
|
||||
$categories = Category::select(['id', 'created_at', 'updated_at', 'name','category_type','use_default_eula','eula_text', 'require_acceptance','checkin_email'])
|
||||
->withCount('assets', 'accessories', 'consumables', 'components');
|
||||
@@ -32,7 +32,7 @@ class CategoriesController extends Controller
|
||||
$offset = $request->input('offset', 0);
|
||||
$limit = $request->input('limit', 50);
|
||||
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
|
||||
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'created_at';
|
||||
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'assets_count';
|
||||
$categories->orderBy($sort, $order);
|
||||
|
||||
$total = $categories->count();
|
||||
|
||||
@@ -7,6 +7,7 @@ use App\Http\Controllers\Controller;
|
||||
use App\Models\Ldap;
|
||||
use Validator;
|
||||
use App\Models\Setting;
|
||||
use Mail;
|
||||
|
||||
class SettingsController extends Controller
|
||||
{
|
||||
@@ -160,4 +161,31 @@ class SettingsController extends Controller
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the email configuration
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v3.0]
|
||||
* @return Redirect
|
||||
*/
|
||||
public function ajaxTestEmail()
|
||||
{
|
||||
if (!config('app.lock_passwords')) {
|
||||
try {
|
||||
Mail::send('emails.test', [], function ($m) {
|
||||
$m->to(config('mail.from.address'), config('mail.from.name'));
|
||||
$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));
|
||||
$m->subject(trans('mail.test_email'));
|
||||
});
|
||||
return response()->json(['message' => 'Mail sent to '.config('mail.from.address')], 200);
|
||||
} catch (Exception $e) {
|
||||
return response()->json(['message' => $e->getMessage()], 500);
|
||||
}
|
||||
}
|
||||
return response()->json(['message' => 'Mail would have been sent, but this application is in demo mode! '], 200);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ class StatuslabelsController extends Controller
|
||||
public function index(Request $request)
|
||||
{
|
||||
$this->authorize('view', Statuslabel::class);
|
||||
$allowed_columns = ['id','name','created_at'];
|
||||
$allowed_columns = ['id','name','created_at', 'assets_count'];
|
||||
|
||||
$statuslabels = Statuslabel::withCount('assets');
|
||||
|
||||
@@ -137,8 +137,14 @@ class StatuslabelsController extends Controller
|
||||
$this->authorize('delete', Statuslabel::class);
|
||||
$statuslabel = Statuslabel::findOrFail($id);
|
||||
$this->authorize('delete', $statuslabel);
|
||||
$statuslabel->delete();
|
||||
return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/statuslabels/message.delete.success')));
|
||||
|
||||
// Check that there are no assets associated
|
||||
if ($statuslabel->assets()->count() == 0) {
|
||||
$statuslabel->delete();
|
||||
return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/statuslabels/message.delete.success')));
|
||||
}
|
||||
|
||||
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/statuslabels/message.assoc_assets')));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -20,11 +20,11 @@ class SuppliersController extends Controller
|
||||
public function index(Request $request)
|
||||
{
|
||||
$this->authorize('view', Supplier::class);
|
||||
$allowed_columns = ['id','name','address','phone','contact','fax','email'];
|
||||
$allowed_columns = ['id','name','address','phone','contact','fax','email','image','assets_count','licenses_count', 'accessories_count'];
|
||||
|
||||
$suppliers = Supplier::select(
|
||||
array('id','name','address','address2','city','state','country','fax', 'phone','email','contact','created_at','updated_at','deleted_at')
|
||||
)->withCount('assets')->withCount('licenses')->whereNull('deleted_at');
|
||||
)->withCount('assets')->withCount('licenses')->withCount('accessories')->whereNull('deleted_at');
|
||||
|
||||
|
||||
if ($request->has('search')) {
|
||||
@@ -113,8 +113,22 @@ class SuppliersController extends Controller
|
||||
public function destroy($id)
|
||||
{
|
||||
$this->authorize('delete', Supplier::class);
|
||||
$supplier = Supplier::findOrFail($id);
|
||||
$supplier = Supplier::with('asset_maintenances', 'assets', 'licenses')->withCount('asset_maintenances','assets', 'licenses')->findOrFail($id);
|
||||
$this->authorize('delete', $supplier);
|
||||
|
||||
|
||||
if ($supplier->assets_count > 0) {
|
||||
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/suppliers/message.delete.assoc_assets', ['asset_count' => (int) $supplier->assets_count])));
|
||||
}
|
||||
|
||||
if ($supplier->asset_maintenances_count > 0) {
|
||||
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/suppliers/message.delete.assoc_maintenances', ['asset_maintenances_count' => $supplier->asset_maintenances_count])));
|
||||
}
|
||||
|
||||
if ($supplier->licenses_count > 0) {
|
||||
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/suppliers/message.delete.assoc_licenses', ['licenses_count' => (int) $supplier->licenses_count])));
|
||||
}
|
||||
|
||||
$supplier->delete();
|
||||
return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/suppliers/message.delete.success')));
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ class UsersController extends Controller
|
||||
'users.two_factor_enrolled',
|
||||
'users.jobtitle',
|
||||
'users.email',
|
||||
'users.phone',
|
||||
'users.username',
|
||||
'users.location_id',
|
||||
'users.manager_id',
|
||||
@@ -57,7 +58,6 @@ class UsersController extends Controller
|
||||
$users = $users->GetDeleted();
|
||||
}
|
||||
|
||||
|
||||
if ($request->has('company_id')) {
|
||||
$users = $users->where('company_id', '=', $request->input('company_id'));
|
||||
}
|
||||
@@ -65,6 +65,10 @@ class UsersController extends Controller
|
||||
if ($request->has('location_id')) {
|
||||
$users = $users->where('location_id', '=', $request->input('location_id'));
|
||||
}
|
||||
|
||||
if ($request->has('group_id')) {
|
||||
$users = $users->ByGroup($request->has('group_id'));
|
||||
}
|
||||
|
||||
if ($request->has('department_id')) {
|
||||
$users = $users->where('department_id','=',$request->input('department_id'));
|
||||
@@ -89,7 +93,8 @@ class UsersController extends Controller
|
||||
[
|
||||
'last_name','first_name','email','jobtitle','username','employee_num',
|
||||
'assets','accessories', 'consumables','licenses','groups','activated','created_at',
|
||||
'two_factor_enrolled','two_factor_optin','last_login'
|
||||
'two_factor_enrolled','two_factor_optin','last_login', 'assets_count', 'licenses_count',
|
||||
'consumables_count', 'accessories_count', 'phone'
|
||||
];
|
||||
|
||||
$sort = in_array($request->get('sort'), $allowed_columns) ? $request->get('sort') : 'first_name';
|
||||
|
||||
@@ -376,13 +376,16 @@ class AssetModelsController extends Controller
|
||||
*/
|
||||
public function postBulkEdit(Request $request)
|
||||
{
|
||||
|
||||
$models_raw_array = Input::get('ids');
|
||||
$models = AssetModel::whereIn('id', $models_raw_array)->get();
|
||||
$nochange = ['NC' => 'No Change'];
|
||||
$fieldset_list = $nochange + Helper::customFieldsetList();
|
||||
$depreciation_list = $nochange + Helper::depreciationList();
|
||||
$category_list = $nochange + Helper::categoryList('asset');
|
||||
$manufacturer_list = $nochange + Helper::manufacturerList();
|
||||
|
||||
if (is_array($models_raw_array)) {
|
||||
$models = AssetModel::whereIn('id', $models_raw_array)->get();
|
||||
$nochange = ['NC' => 'No Change'];
|
||||
$fieldset_list = $nochange + Helper::customFieldsetList();
|
||||
$depreciation_list = $nochange + Helper::depreciationList();
|
||||
$category_list = $nochange + Helper::categoryList('asset');
|
||||
$manufacturer_list = $nochange + Helper::manufacturerList();
|
||||
|
||||
|
||||
return view('models/bulk-edit', compact('models'))
|
||||
@@ -390,6 +393,10 @@ class AssetModelsController extends Controller
|
||||
->with('category_list', $category_list)
|
||||
->with('fieldset_list', $fieldset_list)
|
||||
->with('depreciation_list', $depreciation_list);
|
||||
}
|
||||
|
||||
return redirect()->route('models.index')
|
||||
->with('error', 'You must select at least one model to edit.');
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -458,7 +458,7 @@ class AssetsController extends Controller
|
||||
if (request('assigned_user')) {
|
||||
$target = User::find(request('assigned_user'));
|
||||
} elseif (request('assigned_asset')) {
|
||||
$target = Asset::find(request('assigned_asset'));
|
||||
$target = Asset::where('id','!=',$assetId)->find(request('assigned_asset'));
|
||||
} elseif (request('assigned_location')) {
|
||||
$target = Location::find(request('assigned_location'));
|
||||
}
|
||||
@@ -558,6 +558,9 @@ class AssetsController extends Controller
|
||||
$data['item_tag'] = $asset->asset_tag;
|
||||
$data['item_serial'] = $asset->serial;
|
||||
$data['note'] = $logaction->note;
|
||||
$data['manufacturer_name'] = $asset->model->manufacturer->name;
|
||||
$data['model_name'] = $asset->model->name;
|
||||
$data['model_number'] = $asset->model->model_number;
|
||||
|
||||
if ((($asset->checkin_email()=='1')) && (isset($user)) && (!empty($user->email)) && (!config('app.lock_passwords'))) {
|
||||
Mail::send('emails.checkin-asset', $data, function ($m) use ($user) {
|
||||
@@ -634,7 +637,7 @@ class AssetsController extends Controller
|
||||
$settings = Setting::getSettings();
|
||||
|
||||
if ($settings->qr_code == '1') {
|
||||
$asset = Asset::find($assetId);
|
||||
$asset = Asset::withTrashed()->find($assetId);
|
||||
$size = Helper::barcodeDimensions($settings->barcode_type);
|
||||
$qr_file = public_path().'/uploads/barcodes/qr-'.str_slug($asset->asset_tag).'-'.str_slug($asset->id).'.png';
|
||||
|
||||
@@ -672,8 +675,11 @@ class AssetsController extends Controller
|
||||
$header = ['Content-type' => 'image/png'];
|
||||
return response()->file($barcode_file, $header);
|
||||
} else {
|
||||
// Calculate barcode width in pixel based on label width (inch)
|
||||
$barcode_width = ($settings->labels_width - $settings->labels_display_sgutter) * 96.000000000001;
|
||||
|
||||
$barcode = new \Com\Tecnick\Barcode\Barcode();
|
||||
$barcode_obj = $barcode->getBarcodeObj($settings->alt_barcode,$asset->asset_tag,300,50);
|
||||
$barcode_obj = $barcode->getBarcodeObj($settings->alt_barcode,$asset->asset_tag,($barcode_width < 300 ? $barcode_width : 300),50);
|
||||
|
||||
file_put_contents($barcode_file, $barcode_obj->getPngData());
|
||||
return response($barcode_obj->getPngData())->header('Content-type', 'image/png');
|
||||
@@ -1176,6 +1182,9 @@ class AssetsController extends Controller
|
||||
$user = User::find(e(Input::get('assigned_to')));
|
||||
$admin = Auth::user();
|
||||
|
||||
if (!is_array(Input::get('selected_assets'))) {
|
||||
return redirect()->route('hardware/bulkcheckout')->withInput()->with('error', trans('admin/hardware/message.checkout.no_assets_selected'));
|
||||
}
|
||||
$asset_ids = array_filter(Input::get('selected_assets'));
|
||||
|
||||
if ((Input::has('checkout_at')) && (Input::get('checkout_at')!= date("Y-m-d"))) {
|
||||
|
||||
@@ -194,7 +194,7 @@ class ConsumablesController extends Controller
|
||||
if (isset($consumable->id)) {
|
||||
return view('consumables/view', compact('consumable'));
|
||||
}
|
||||
return redirect()->route('consumables')->with('error', trans('admin/consumables/message.does_not_exist', compact('id')));
|
||||
return redirect()->route('consumables.index')->with('error', trans('admin/consumables/message.does_not_exist', compact('id')));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -209,7 +209,7 @@ class ConsumablesController extends Controller
|
||||
public function getCheckout($consumableId)
|
||||
{
|
||||
if (is_null($consumable = Consumable::find($consumableId))) {
|
||||
return redirect()->route('consumables.index')->with('error', trans('admin/consumables/message.not_found'));
|
||||
return redirect()->route('consumables.index')->with('error', trans('admin/consumables/message.does_not_exist'));
|
||||
}
|
||||
$this->authorize('checkout', $consumable);
|
||||
return view('consumables/checkout', compact('consumable'))->with('users_list', Helper::usersList());
|
||||
|
||||
@@ -155,5 +155,24 @@ class DepreciationsController extends Controller
|
||||
return redirect()->route('depreciations.index')->with('success', trans('admin/depreciations/message.delete.success'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a view that displays a form to display depreciation listing
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net]
|
||||
* @see DepreciationsController::postEdit()
|
||||
* @param int $depreciationId
|
||||
* @since [v1.0]
|
||||
* @return \Illuminate\Contracts\View\View
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
if (is_null($depreciation = Depreciation::find($id))) {
|
||||
// Redirect to the blogs management page
|
||||
return redirect()->route('depreciations.index')->with('error', trans('admin/depreciations/message.does_not_exist'));
|
||||
}
|
||||
|
||||
return view('depreciations/view', compact('depreciation'));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -87,10 +87,15 @@ class GroupsController extends Controller
|
||||
public function edit($id = null)
|
||||
{
|
||||
$group = Group::find($id);
|
||||
$permissions = config('permissions');
|
||||
$groupPermissions = $group->decodePermissions();
|
||||
$selected_array = Helper::selectedPermissionsArray($permissions, $groupPermissions);
|
||||
return view('groups.edit', compact('group', 'permissions', 'selected_array', 'groupPermissions'));
|
||||
|
||||
if ($group) {
|
||||
$permissions = config('permissions');
|
||||
$groupPermissions = $group->decodePermissions();
|
||||
$selected_array = Helper::selectedPermissionsArray($permissions, $groupPermissions);
|
||||
return view('groups.edit', compact('group', 'permissions', 'selected_array', 'groupPermissions'));
|
||||
}
|
||||
|
||||
return redirect()->route('groups.index')->with('error', trans('admin/groups/message.group_not_found', compact('id')));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -142,4 +147,24 @@ class GroupsController extends Controller
|
||||
return redirect()->route('groups.index')->with('error', trans('general.feature_disabled'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a view that invokes the ajax tables which actually contains
|
||||
* the content for the group detail page.
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @param int $locationId
|
||||
* @since [v4.0.11]
|
||||
* @return \Illuminate\Contracts\View\View
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
$group = Group::find($id);
|
||||
|
||||
if ($group) {
|
||||
return view('groups/view', compact('group'));
|
||||
}
|
||||
|
||||
return redirect()->route('groups.index')->with('error', trans('admin/groups/message.group_not_found', compact('id')));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -187,6 +187,7 @@ class LicensesController extends Controller
|
||||
$license->termination_date = $request->input('termination_date');
|
||||
$license->seats = e($request->input('seats'));
|
||||
$license->manufacturer_id = $request->input('manufacturer_id');
|
||||
$license->supplier_id = $request->input('supplier_id');
|
||||
|
||||
if ($license->save()) {
|
||||
return redirect()->route('licenses.show', ['license' => $licenseId])->with('success', trans('admin/licenses/message.update.success'));
|
||||
@@ -440,17 +441,15 @@ class LicensesController extends Controller
|
||||
public function show($licenseId = null)
|
||||
{
|
||||
|
||||
$license = License::find($licenseId);
|
||||
$license = $license->load('assignedusers', 'licenseSeats.user', 'licenseSeats.asset');
|
||||
$license = License::with('assignedusers', 'licenseSeats.user', 'licenseSeats.asset')->find($licenseId);
|
||||
|
||||
if (isset($license->id)) {
|
||||
$license = $license->load('assignedusers', 'licenseSeats.user', 'licenseSeats.asset');
|
||||
if ($license) {
|
||||
$this->authorize('view', $license);
|
||||
return view('licenses/view', compact('license'));
|
||||
}
|
||||
$error = trans('admin/licenses/message.does_not_exist', compact('id'));
|
||||
return redirect()->route('licenses.index')->with('error', $error);
|
||||
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.does_not_exist', compact('id')));
|
||||
}
|
||||
|
||||
|
||||
public function getClone($licenseId = null)
|
||||
{
|
||||
|
||||
@@ -21,6 +21,7 @@ use App\Models\User;
|
||||
use App\Http\Requests\SetupUserRequest;
|
||||
use App\Http\Requests\ImageUploadRequest;
|
||||
use App\Http\Requests\SettingsLdapRequest;
|
||||
use App\Helpers\Helper;
|
||||
|
||||
/**
|
||||
* This controller handles all actions related to Settings for
|
||||
@@ -136,28 +137,6 @@ class SettingsController extends Controller
|
||||
->with('section', 'Pre-Flight Check');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the email configuration
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v3.0]
|
||||
* @return Redirect
|
||||
*/
|
||||
public function ajaxTestEmail()
|
||||
{
|
||||
|
||||
try {
|
||||
Mail::send('emails.test', [], function ($m) {
|
||||
$m->to(config('mail.from.address'), config('mail.from.name'));
|
||||
$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));
|
||||
$m->subject(trans('mail.test_email'));
|
||||
});
|
||||
return 'success';
|
||||
} catch (Exception $e) {
|
||||
return 'error';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the first admin user from Setup.
|
||||
@@ -391,6 +370,7 @@ class SettingsController extends Controller
|
||||
|
||||
$setting->brand = $request->input('brand', '1');
|
||||
$setting->header_color = $request->input('header_color');
|
||||
$setting->show_url_in_emails = $request->input('show_url_in_emails', '0');
|
||||
|
||||
|
||||
// Only allow the site name and CSS to be changed if lock_passwords is false
|
||||
@@ -846,6 +826,7 @@ class SettingsController extends Controller
|
||||
$setting->is_ad = $request->input('is_ad', '0');
|
||||
$setting->ldap_tls = $request->input('ldap_tls', '0');
|
||||
$setting->ldap_pw_sync = $request->input('ldap_pw_sync', '0');
|
||||
$setting->custom_forgot_pass_url = $request->input('custom_forgot_pass_url');
|
||||
|
||||
if ($setting->save()) {
|
||||
return redirect()->route('settings.index')
|
||||
@@ -1023,4 +1004,28 @@ class SettingsController extends Controller
|
||||
public function api() {
|
||||
return view('settings.api');
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Test the email configuration
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v3.0]
|
||||
* @return Redirect
|
||||
*/
|
||||
public function ajaxTestEmail()
|
||||
{
|
||||
try {
|
||||
Mail::send('emails.test', [], function ($m) {
|
||||
$m->to(config('mail.from.address'), config('mail.from.name'));
|
||||
$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));
|
||||
$m->subject(trans('mail.test_email'));
|
||||
});
|
||||
return response()->json(Helper::formatStandardApiResponse('success', null, 'Maiol sent!'));
|
||||
} catch (Exception $e) {
|
||||
return response()->json(Helper::formatStandardApiResponse('success', null, $e->getMessage()));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,17 +200,15 @@ class StatuslabelsController extends Controller
|
||||
{
|
||||
// Check if the Statuslabel exists
|
||||
if (is_null($statuslabel = Statuslabel::find($statuslabelId))) {
|
||||
// Redirect to the blogs management page
|
||||
return redirect()->route('statuslabels.index')->with('error', trans('admin/statuslabels/message.not_found'));
|
||||
}
|
||||
|
||||
|
||||
if ($statuslabel->has_assets() == 0) {
|
||||
// Check that there are no assets associated
|
||||
if ($statuslabel->assets()->count() == 0) {
|
||||
$statuslabel->delete();
|
||||
// Redirect to the statuslabels management page
|
||||
return redirect()->route('statuslabels.index')->with('success', trans('admin/statuslabels/message.delete.success'));
|
||||
}
|
||||
// Redirect to the asset management page
|
||||
|
||||
return redirect()->route('statuslabels.index')->with('error', trans('admin/statuslabels/message.assoc_assets'));
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ use Str;
|
||||
use View;
|
||||
use Auth;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Requests\ImageUploadRequest;
|
||||
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
|
||||
@@ -56,7 +57,7 @@ class SuppliersController extends Controller
|
||||
* @param Request $request
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function store(Request $request)
|
||||
public function store(ImageUploadRequest $request)
|
||||
{
|
||||
// Create a new supplier
|
||||
$supplier = new Supplier;
|
||||
@@ -135,7 +136,7 @@ class SuppliersController extends Controller
|
||||
* @param int $supplierId
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function update($supplierId = null, Request $request)
|
||||
public function update($supplierId = null, ImageUploadRequest $request)
|
||||
{
|
||||
// Check if the supplier exists
|
||||
if (is_null($supplier = Supplier::find($supplierId))) {
|
||||
@@ -158,18 +159,17 @@ class SuppliersController extends Controller
|
||||
$supplier->url = $supplier->addhttp(request('url'));
|
||||
$supplier->notes = request('notes');
|
||||
|
||||
|
||||
if (Input::file('image')) {
|
||||
$image = $request->file('image');
|
||||
$file_name = str_random(25).".".$image->getClientOriginalExtension();
|
||||
$file_name = 'suppliers-'.str_random(25).".".$image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/suppliers/'.$file_name);
|
||||
Image::make($image->getRealPath())->resize(300, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
$supplier->image = $file_name;
|
||||
}
|
||||
|
||||
if (request('image_delete') == 1 && $request->file('image') == "") {
|
||||
} elseif (request('image_delete') == 1) {
|
||||
$supplier->image = null;
|
||||
}
|
||||
|
||||
@@ -189,23 +189,29 @@ class SuppliersController extends Controller
|
||||
*/
|
||||
public function destroy($supplierId)
|
||||
{
|
||||
// Check if the supplier exists
|
||||
if (is_null($supplier = Supplier::find($supplierId))) {
|
||||
// Redirect to the suppliers page
|
||||
if (is_null($supplier = Supplier::with('asset_maintenances', 'assets', 'licenses')->withCount('asset_maintenances','assets','licenses')->find($supplierId))) {
|
||||
return redirect()->route('suppliers.index')->with('error', trans('admin/suppliers/message.not_found'));
|
||||
}
|
||||
|
||||
if ($supplier->num_assets() == 0) {
|
||||
// Delete the supplier
|
||||
$supplier->delete();
|
||||
// Redirect to the suppliers management page
|
||||
return redirect()->route('suppliers.index')->with(
|
||||
'success',
|
||||
trans('admin/suppliers/message.delete.success')
|
||||
);
|
||||
|
||||
if ($supplier->assets_count > 0) {
|
||||
return redirect()->route('suppliers.index')->with('error', trans('admin/suppliers/message.delete.assoc_assets', ['asset_count' => (int) $supplier->assets_count]));
|
||||
}
|
||||
// Redirect to the asset management page
|
||||
return redirect()->route('suppliers.index')->with('error', trans('admin/suppliers/message.assoc_users'));
|
||||
|
||||
if ($supplier->asset_maintenances_count > 0) {
|
||||
return redirect()->route('suppliers.index')->with('error', trans('admin/suppliers/message.delete.assoc_maintenances', ['asset_maintenances_count' => $supplier->asset_maintenances_count]));
|
||||
}
|
||||
|
||||
if ($supplier->licenses_count > 0) {
|
||||
return redirect()->route('suppliers.index')->with('error', trans('admin/suppliers/message.delete.assoc_licenses', ['licenses_count' => (int) $supplier->licenses_count]));
|
||||
}
|
||||
|
||||
$supplier->delete();
|
||||
return redirect()->route('suppliers.index')->with('success',
|
||||
trans('admin/suppliers/message.delete.success')
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,10 +23,13 @@ class AssetCheckoutRequest extends Request
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
$rules = [
|
||||
"assigned_user" => 'required_without_all:assigned_asset,assigned_location',
|
||||
"assigned_asset" => 'required_without_all:assigned_user,assigned_location',
|
||||
"assigned_asset" => 'required_without_all:assigned_user,assigned_location|different:'.$this->id,
|
||||
"assigned_location" => 'required_without_all:assigned_user,assigned_asset',
|
||||
];
|
||||
|
||||
|
||||
return $rules;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ class AccessoriesTransformer
|
||||
'name' => e($accessory->name),
|
||||
'company' => ($accessory->company) ? ['id' => $accessory->company->id,'name'=> e($accessory->company->name)] : null,
|
||||
'manufacturer' => ($accessory->manufacturer) ? ['id' => $accessory->manufacturer->id,'name'=> e($accessory->manufacturer->name)] : null,
|
||||
'supplier' => ($accessory->supplier) ? ['id' => $accessory->supplier->id,'name'=> e($accessory->supplier->name)] : null,
|
||||
'model_number' => ($accessory->model_number) ? e($accessory->model_number) : null,
|
||||
'category' => ($accessory->category) ? ['id' => $accessory->category->id,'name'=> e($accessory->category->name)] : null,
|
||||
'location' => ($accessory->location) ? ['id' => $accessory->location->id,'name'=> e($accessory->location->name)] : null,
|
||||
@@ -35,6 +36,7 @@ class AccessoriesTransformer
|
||||
'order_number' => ($accessory->order_number) ? e($accessory->order_number) : null,
|
||||
'min_qty' => ($accessory->min_amt) ? (int) $accessory->min_amt : null,
|
||||
'remaining_qty' => $accessory->numRemaining(),
|
||||
'image' => ($accessory->image) ? url('/').'/uploads/accessories/'.e($accessory->image) : null,
|
||||
'created_at' => Helper::getFormattedDateObject($accessory->created_at, 'datetime'),
|
||||
'updated_at' => Helper::getFormattedDateObject($accessory->updated_at, 'datetime'),
|
||||
|
||||
|
||||
@@ -54,9 +54,9 @@ class AssetsTransformer
|
||||
'id' => (int) $asset->company->id,
|
||||
'name'=> e($asset->company->name)
|
||||
] : null,
|
||||
'location' => ($asset->assetloc) ? [
|
||||
'id' => (int) $asset->assetloc->id,
|
||||
'name'=> e($asset->assetloc->name)
|
||||
'location' => ($asset->assetLoc) ? [
|
||||
'id' => (int) $asset->assetLoc->id,
|
||||
'name'=> e($asset->assetLoc->name)
|
||||
] : null,
|
||||
'rtd_location' => ($asset->defaultLoc) ? [
|
||||
'id' => (int) $asset->defaultLoc->id,
|
||||
|
||||
@@ -39,7 +39,7 @@ class CategoriesTransformer
|
||||
|
||||
$permissions_array['available_actions'] = [
|
||||
'update' => Gate::allows('update', Category::class) ? true : false,
|
||||
'delete' => Gate::allows('delete', Category::class) ? true : false,
|
||||
'delete' => (Gate::allows('delete', Category::class) && ($category->assets_count == 0) && ($category->accessories_count == 0) && ($category->consumables_count == 0) && ($category->components_count == 0)) ? true : false,
|
||||
];
|
||||
|
||||
$array += $permissions_array;
|
||||
|
||||
@@ -26,6 +26,7 @@ class StatuslabelsTransformer
|
||||
'type' => $statuslabel->getStatuslabelType(),
|
||||
'color' => ($statuslabel->color) ? e($statuslabel->color) : null,
|
||||
'show_in_nav' => ($statuslabel->show_in_nav=='1') ? true : false,
|
||||
'assets_count' => (int) $statuslabel->assets_count,
|
||||
'notes' => e($statuslabel->notes),
|
||||
'created_at' => Helper::getFormattedDateObject($statuslabel->created_at, 'datetime'),
|
||||
'updated_at' => Helper::getFormattedDateObject($statuslabel->updated_at, 'datetime'),
|
||||
@@ -33,7 +34,7 @@ class StatuslabelsTransformer
|
||||
|
||||
$permissions_array['available_actions'] = [
|
||||
'update' => Gate::allows('update', Statuslabel::class) ? true : false,
|
||||
'delete' => Gate::allows('delete', Statuslabel::class) ? true : false,
|
||||
'delete' => (Gate::allows('delete', Statuslabel::class) && ($statuslabel->assets_count == 0)) ? true : false,
|
||||
];
|
||||
$array += $permissions_array;
|
||||
|
||||
|
||||
@@ -36,8 +36,9 @@ class SuppliersTransformer
|
||||
'email' => ($supplier->email) ? e($supplier->email) : null,
|
||||
'contact' => ($supplier->contact) ? e($supplier->contact) : null,
|
||||
'assets_count' => (int) $supplier->assets_count,
|
||||
'accessories_count' => (int) $supplier->accessories_count,
|
||||
'licenses_count' => (int) $supplier->licenses_count,
|
||||
'image' => ($supplier->image) ? e($supplier->image) : null,
|
||||
'image' => ($supplier->image) ? url('/').'/uploads/suppliers/'.e($supplier->image) : null,
|
||||
'notes' => ($supplier->notes) ? e($supplier->notes) : null,
|
||||
'created_at' => Helper::getFormattedDateObject($supplier->created_at, 'datetime'),
|
||||
'updated_at' => Helper::getFormattedDateObject($supplier->updated_at, 'datetime'),
|
||||
@@ -46,7 +47,7 @@ class SuppliersTransformer
|
||||
|
||||
$permissions_array['available_actions'] = [
|
||||
'update' => Gate::allows('update', Supplier::class) ? true : false,
|
||||
'delete' => Gate::allows('delete', Supplier::class) ? true : false,
|
||||
'delete' => (Gate::allows('delete', Supplier::class) && ($supplier->assets_count == 0) && ($supplier->licenses_count == 0) && ($supplier->accessories_count == 0)) ? true : false,
|
||||
];
|
||||
|
||||
$array += $permissions_array;
|
||||
|
||||
@@ -33,6 +33,7 @@ class UsersTransformer
|
||||
'name'=> e($user->manager->username)
|
||||
] : null,
|
||||
'jobtitle' => ($user->jobtitle) ? e($user->jobtitle) : null,
|
||||
'phone' => ($user->phone) ? e($user->phone) : null,
|
||||
'email' => e($user->email),
|
||||
'department' => ($user->department) ? [
|
||||
'id' => (int) $user->department->id,
|
||||
@@ -58,7 +59,7 @@ class UsersTransformer
|
||||
|
||||
$permissions_array['available_actions'] = [
|
||||
'update' => (Gate::allows('update', User::class) && ($user->deleted_at=='')) ? true : false,
|
||||
'delete' => (Gate::allows('delete', User::class) && ($user->deleted_at=='')) ? true : false,
|
||||
'delete' => (Gate::allows('delete', User::class) && ($user->deleted_at=='') && ($user->assets_count == 0) && ($user->licenses_count == 0) && ($user->accessories_count == 0) && ($user->consumables_count == 0)) ? true : false,
|
||||
'clone' => (Gate::allows('create', User::class) && ($user->deleted_at=='')) ,
|
||||
'restore' => (Gate::allows('create', User::class) && ($user->deleted_at!='')) ? true : false,
|
||||
];
|
||||
|
||||
@@ -23,14 +23,18 @@ class AssetImporter extends ItemImporter
|
||||
// ItemImporter handles the general fetching.
|
||||
parent::handle($row);
|
||||
|
||||
foreach ($this->customFields as $customField) {
|
||||
$customFieldValue = $this->array_smart_custom_field_fetch($row, $customField);
|
||||
if ($customFieldValue) {
|
||||
$this->item['custom_fields'][$customField->db_column_name()] = $customFieldValue;
|
||||
$this->log('Custom Field '. $customField->name.': '.$customFieldValue);
|
||||
if ($this->customFields) {
|
||||
|
||||
foreach ($this->customFields as $customField) {
|
||||
$customFieldValue = $this->array_smart_custom_field_fetch($row, $customField);
|
||||
if ($customFieldValue) {
|
||||
$this->item['custom_fields'][$customField->db_column_name()] = $customFieldValue;
|
||||
$this->log('Custom Field '. $customField->name.': '.$customFieldValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->createAssetIfNotExists($row);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ class Accessory extends SnipeModel
|
||||
use Loggable, Presentable;
|
||||
use SoftDeletes;
|
||||
|
||||
protected $dates = ['deleted_at', 'purchase_date'];
|
||||
protected $dates = ['deleted_at'];
|
||||
protected $table = 'accessories';
|
||||
protected $casts = [
|
||||
'requestable' => 'boolean'
|
||||
@@ -61,10 +61,19 @@ class Accessory extends SnipeModel
|
||||
'purchase_date',
|
||||
'model_number',
|
||||
'manufacturer_id',
|
||||
'supplier_id',
|
||||
'image',
|
||||
'qty',
|
||||
'requestable'
|
||||
];
|
||||
|
||||
|
||||
public function supplier()
|
||||
{
|
||||
return $this->belongsTo('\App\Models\Supplier', 'supplier_id');
|
||||
}
|
||||
|
||||
|
||||
public function setRequestableAttribute($value)
|
||||
{
|
||||
if ($value == '') {
|
||||
|
||||
+38
-25
@@ -781,14 +781,11 @@ class Asset extends Depreciable
|
||||
$query->where('locations.name', 'LIKE', '%'.$search.'%');
|
||||
});
|
||||
})->orWhere(function ($query) use ($search) {
|
||||
|
||||
$query->whereHas('assignedTo', function ($query) use ($search) {
|
||||
$query->where('users.first_name', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('users.last_name', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('users.username', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('locations.name', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('assigned_assets.name', 'LIKE', '%'.$search.'%');
|
||||
});
|
||||
})->orWhere('assets.name', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('assets.asset_tag', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('assets.serial', 'LIKE', '%'.$search.'%')
|
||||
@@ -815,48 +812,50 @@ class Asset extends Depreciable
|
||||
{
|
||||
return $query->where(function ($query) use ($filter) {
|
||||
foreach ($filter as $key => $search_val) {
|
||||
|
||||
if ($key =='asset_tag') {
|
||||
|
||||
$fieldname = str_replace('custom_fields.','', $key) ;
|
||||
|
||||
if ($fieldname =='asset_tag') {
|
||||
$query->where('assets.asset_tag', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
|
||||
if ($key =='name') {
|
||||
if ($fieldname =='name') {
|
||||
$query->where('assets.name', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
|
||||
if ($key =='product_key') {
|
||||
if ($fieldname =='product_key') {
|
||||
$query->where('assets.serial', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
|
||||
if ($key =='purchase_date') {
|
||||
if ($fieldname =='purchase_date') {
|
||||
$query->where('assets.purchase_date', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
|
||||
if ($key =='purchase_cost') {
|
||||
if ($fieldname =='purchase_cost') {
|
||||
$query->where('assets.purchase_cost', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
|
||||
if ($key =='notes') {
|
||||
if ($fieldname =='notes') {
|
||||
$query->where('assets.notes', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
|
||||
if ($key =='order_number') {
|
||||
if ($fieldname =='order_number') {
|
||||
$query->where('assets.order_number', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
|
||||
if ($key =='status_label') {
|
||||
if ($fieldname =='status_label') {
|
||||
$query->whereHas('assetstatus', function ($query) use ($search_val) {
|
||||
$query->where('status_labels.name', 'LIKE', '%' . $search_val . '%');
|
||||
});
|
||||
}
|
||||
|
||||
if ($key =='location') {
|
||||
if ($fieldname =='location') {
|
||||
$query->whereHas('defaultLoc', function ($query) use ($search_val) {
|
||||
$query->where('locations.name', 'LIKE', '%' . $search_val . '%');
|
||||
});
|
||||
}
|
||||
|
||||
if ($key =='checkedout_to') {
|
||||
if ($fieldname =='checkedout_to') {
|
||||
$query->whereHas('assigneduser', function ($query) use ($search_val) {
|
||||
$query->where(function ($query) use ($search_val) {
|
||||
$query->where('users.first_name', 'LIKE', '%' . $search_val . '%')
|
||||
@@ -866,7 +865,7 @@ class Asset extends Depreciable
|
||||
}
|
||||
|
||||
|
||||
if ($key =='manufacturer') {
|
||||
if ($fieldname =='manufacturer') {
|
||||
$query->whereHas('model', function ($query) use ($search_val) {
|
||||
$query->whereHas('manufacturer', function ($query) use ($search_val) {
|
||||
$query->where(function ($query) use ($search_val) {
|
||||
@@ -876,7 +875,7 @@ class Asset extends Depreciable
|
||||
});
|
||||
}
|
||||
|
||||
if ($key =='category') {
|
||||
if ($fieldname =='category') {
|
||||
$query->whereHas('model', function ($query) use ($search_val) {
|
||||
$query->whereHas('category', function ($query) use ($search_val) {
|
||||
$query->where(function ($query) use ($search_val) {
|
||||
@@ -888,7 +887,7 @@ class Asset extends Depreciable
|
||||
});
|
||||
}
|
||||
|
||||
if ($key =='model') {
|
||||
if ($fieldname =='model') {
|
||||
$query->where(function ($query) use ($search_val) {
|
||||
$query->whereHas('model', function ($query) use ($search_val) {
|
||||
$query->where('models.name', 'LIKE', '%' . $search_val . '%');
|
||||
@@ -896,7 +895,7 @@ class Asset extends Depreciable
|
||||
});
|
||||
}
|
||||
|
||||
if ($key =='model_number') {
|
||||
if ($fieldname =='model_number') {
|
||||
$query->where(function ($query) use ($search_val) {
|
||||
$query->whereHas('model', function ($query) use ($search_val) {
|
||||
$query->where('models.model_number', 'LIKE', '%' . $search_val . '%');
|
||||
@@ -905,7 +904,7 @@ class Asset extends Depreciable
|
||||
}
|
||||
|
||||
|
||||
if ($key =='company') {
|
||||
if ($fieldname =='company') {
|
||||
$query->where(function ($query) use ($search_val) {
|
||||
$query->whereHas('company', function ($query) use ($search_val) {
|
||||
$query->where('companies.name', 'LIKE', '%' . $search_val . '%');
|
||||
@@ -914,11 +913,9 @@ class Asset extends Depreciable
|
||||
}
|
||||
}
|
||||
|
||||
foreach (CustomField::all() as $field) {
|
||||
if (array_key_exists('custom_fields.'.$field->db_column_name(), $filter)) {
|
||||
$query->orWhere($field->db_column_name(), 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
}
|
||||
|
||||
$query->orWhere('assets.'.$fieldname, 'LIKE', '%' . $search_val . '%');
|
||||
|
||||
|
||||
});
|
||||
|
||||
@@ -1063,7 +1060,7 @@ class Asset extends Depreciable
|
||||
*/
|
||||
public function scopeOrderLocation($query, $order)
|
||||
{
|
||||
return $query->join('locations', 'locations.id', '=', 'assets.rtd_location_id')->orderBy('locations.name', $order);
|
||||
return $query->leftJoin('locations', 'locations.id', '=', 'assets.rtd_location_id')->orderBy('locations.name', $order);
|
||||
}
|
||||
|
||||
|
||||
@@ -1106,4 +1103,20 @@ class Asset extends Depreciable
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Query builder scope to search on location ID
|
||||
*
|
||||
* @param \Illuminate\Database\Query\Builder $query Query builder instance
|
||||
* @param text $search Search term
|
||||
*
|
||||
* @return \Illuminate\Database\Query\Builder Modified query builder
|
||||
*/
|
||||
public function scopeByDepreciationId($query, $search)
|
||||
{
|
||||
return $query->join('models', 'assets.model_id', '=', 'models.id')
|
||||
->join('depreciations', 'models.depreciation_id', '=', 'depreciations.id')->where('models.depreciation_id', '=', $search);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class AssetMaintenance extends Model implements ICompanyableChild
|
||||
'title' => 'required|max:100',
|
||||
'is_warranty' => 'boolean',
|
||||
'start_date' => 'required|date_format:"Y-m-d"',
|
||||
'completion_date' => 'date_format:"Y-m-d"',
|
||||
'completion_date' => 'nullable|date_format:"Y-m-d"',
|
||||
'notes' => 'string|nullable',
|
||||
'cost' => 'numeric|nullable'
|
||||
];
|
||||
|
||||
+3
-8
@@ -77,23 +77,18 @@ class Ldap extends Model
|
||||
$connection = Ldap::connectToLdap();
|
||||
$ldap_username_field = $settings->ldap_username_field;
|
||||
$baseDn = $settings->ldap_basedn;
|
||||
$userDn = $ldap_username_field.'='.$username.','.$settings->ldap_basedn;
|
||||
|
||||
if ($settings->is_ad =='1') {
|
||||
// Check if they are using the userprincipalname for the username field.
|
||||
// Check if they are using the userprincipalname for the username field.
|
||||
// If they are, we can skip building the UPN to authenticate against AD
|
||||
if ($ldap_username_field=='userprincipalname') {
|
||||
$userDn = $username;
|
||||
} else {
|
||||
// In case they haven't added an AD domain
|
||||
if ($settings->ad_domain == '') {
|
||||
$userDn = $username.'@'.$settings->email_domain;
|
||||
} else {
|
||||
$userDn = $username.'@'.$settings->ad_domain;
|
||||
}
|
||||
$userDn = ($settings->ad_domain != '') ? $username.'@'.$settings->ad_domain : $username.'@'.$settings->email_domain;
|
||||
}
|
||||
|
||||
} else {
|
||||
$userDn = $ldap_username_field.'='.$username.','.$settings->ldap_basedn;
|
||||
}
|
||||
|
||||
\Log::debug('Attempting to login using distinguished name:'.$userDn);
|
||||
|
||||
@@ -54,7 +54,7 @@ class Location extends SnipeModel
|
||||
|
||||
public function assets()
|
||||
{
|
||||
return $this->hasManyThrough('\App\Models\Asset', '\App\Models\User', 'location_id', 'assigned_to', 'id');
|
||||
return $this->hasManyThrough('\App\Models\Asset', '\App\Models\User', 'location_id', 'assigned_to', 'id')->where("assets.assigned_type",User::class);
|
||||
}
|
||||
|
||||
public function locationAssets()
|
||||
|
||||
@@ -38,6 +38,7 @@ class Setting extends Model
|
||||
"pwd_secure_min" => "numeric|required|min:5",
|
||||
"audit_warning_days" => "numeric|nullable",
|
||||
"audit_interval" => "numeric|nullable",
|
||||
"custom_forgot_pass_url" => "url|nullable",
|
||||
];
|
||||
|
||||
protected $fillable = ['site_name','email_domain','email_format','username_format'];
|
||||
|
||||
+21
-10
@@ -29,16 +29,6 @@ class Statuslabel extends SnipeModel
|
||||
|
||||
protected $fillable = ['name', 'deployable', 'pending', 'archived'];
|
||||
|
||||
/**
|
||||
* Show count of assets with status label
|
||||
*
|
||||
* @todo Remove this. It's dumb.
|
||||
* @return \Illuminate\Support\Collection
|
||||
*/
|
||||
public function has_assets()
|
||||
{
|
||||
return $this->hasMany('\App\Models\Asset', 'status_id')->count();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get assets with associated status label
|
||||
@@ -64,6 +54,27 @@ class Statuslabel extends SnipeModel
|
||||
}
|
||||
}
|
||||
|
||||
public function scopePending()
|
||||
{
|
||||
return $this->where('pending', '=', 1)
|
||||
->where('archived', '=', 0)
|
||||
->where('deployable', '=', 0);
|
||||
}
|
||||
|
||||
public function scopeArchived()
|
||||
{
|
||||
return $this->where('pending', '=', 0)
|
||||
->where('archived', '=', 1)
|
||||
->where('deployable', '=', 0);
|
||||
}
|
||||
|
||||
public function scopeDeployable()
|
||||
{
|
||||
return $this->where('pending', '=', 0)
|
||||
->where('archived', '=', 0)
|
||||
->where('deployable', '=', 1);
|
||||
}
|
||||
|
||||
|
||||
public static function getStatuslabelTypesForDB($type)
|
||||
{
|
||||
|
||||
@@ -68,6 +68,11 @@ class Supplier extends SnipeModel
|
||||
return $this->hasMany('\App\Models\Asset', 'supplier_id');
|
||||
}
|
||||
|
||||
public function accessories()
|
||||
{
|
||||
return $this->hasMany('\App\Models\Accessory', 'supplier_id');
|
||||
}
|
||||
|
||||
public function asset_maintenances()
|
||||
{
|
||||
return $this->hasMany('\App\Models\AssetMaintenance', 'supplier_id');
|
||||
|
||||
@@ -378,6 +378,14 @@ class User extends SnipeModel implements AuthenticatableContract, CanResetPasswo
|
||||
return json_decode($this->permissions, true);
|
||||
}
|
||||
|
||||
|
||||
public function scopeByGroup($query, $id) {
|
||||
return $query->whereHas('groups', function ($query) use ($id) {
|
||||
$query->where('id', '=', $id);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Query builder scope to search on text
|
||||
*
|
||||
@@ -395,6 +403,7 @@ class User extends SnipeModel implements AuthenticatableContract, CanResetPasswo
|
||||
->orWhere('users.email', 'LIKE', "%$search%")
|
||||
->orWhere('users.username', 'LIKE', "%$search%")
|
||||
->orWhere('users.notes', 'LIKE', "%$search%")
|
||||
->orWhere('users.phone', 'LIKE', "%$search%")
|
||||
->orWhere('users.jobtitle', 'LIKE', "%$search%")
|
||||
->orWhere('users.employee_num', 'LIKE', "%$search%")
|
||||
->orWhere(function ($query) use ($search) {
|
||||
|
||||
@@ -99,6 +99,9 @@ class CheckoutNotification extends Notification
|
||||
'item_serial' => $item->serial,
|
||||
'require_acceptance' => method_exists($item, 'requireAcceptance') ? $item->requireAcceptance() : '',
|
||||
'log_id' => $this->params['log_id'],
|
||||
'manufacturer_name' => $item->model->manufacturer->name,
|
||||
'model_name' => $item->model->name,
|
||||
'model_number' => $item->model->model_number,
|
||||
];
|
||||
|
||||
if ((method_exists($item, 'requireAcceptance') && ($item->requireAcceptance() == '1'))
|
||||
|
||||
@@ -31,6 +31,14 @@ class AccessoryPresenter extends Presenter
|
||||
"switchable" => true,
|
||||
"title" => trans('general.id'),
|
||||
"visible" => false
|
||||
],[
|
||||
"field" => "image",
|
||||
"searchable" => false,
|
||||
"sortable" => true,
|
||||
"switchable" => true,
|
||||
"title" => trans('admin/hardware/table.image'),
|
||||
"visible" => true,
|
||||
"formatter" => "imageFormatter"
|
||||
], [
|
||||
"field" => "company",
|
||||
"searchable" => true,
|
||||
@@ -63,6 +71,14 @@ class AccessoryPresenter extends Presenter
|
||||
"sortable" => true,
|
||||
"title" => trans('general.manufacturer'),
|
||||
"formatter" => "manufacturersLinkObjFormatter",
|
||||
], [
|
||||
"field" => "supplier",
|
||||
"searchable" => true,
|
||||
"sortable" => true,
|
||||
"switchable" => true,
|
||||
"title" => trans('general.supplier'),
|
||||
"visible" => false,
|
||||
"formatter" => "suppliersLinkObjFormatter"
|
||||
], [
|
||||
"field" => "location",
|
||||
"searchable" => true,
|
||||
@@ -96,6 +112,7 @@ class AccessoryPresenter extends Presenter
|
||||
"searchable" => true,
|
||||
"sortable" => true,
|
||||
"title" => trans('general.purchase_cost'),
|
||||
"footerFormatter" => 'sumFormatter',
|
||||
], [
|
||||
"field" => "order_number",
|
||||
"searchable" => true,
|
||||
|
||||
@@ -112,7 +112,7 @@ class AssetPresenter extends Presenter
|
||||
"sortable" => true,
|
||||
"title" => trans('admin/hardware/table.location'),
|
||||
"visible" => true,
|
||||
"formatter" => "locationsLinkObjFormatter"
|
||||
"formatter" => "deployedLocationFormatter"
|
||||
], [
|
||||
"field" => "manufacturer",
|
||||
"searchable" => true,
|
||||
@@ -139,6 +139,7 @@ class AssetPresenter extends Presenter
|
||||
"searchable" => true,
|
||||
"sortable" => true,
|
||||
"title" => trans('general.purchase_cost'),
|
||||
"footerFormatter" => 'sumFormatter',
|
||||
], [
|
||||
"field" => "order_number",
|
||||
"searchable" => true,
|
||||
|
||||
@@ -41,25 +41,25 @@ class CategoryPresenter extends Presenter
|
||||
], [
|
||||
"field" => "assets_count",
|
||||
"searchable" => false,
|
||||
"sortable" => false,
|
||||
"sortable" => true,
|
||||
"title" => trans('general.assets'),
|
||||
"visible" => true
|
||||
], [
|
||||
"field" => "accessories_count",
|
||||
"searchable" => false,
|
||||
"sortable" => false,
|
||||
"sortable" => true,
|
||||
"title" => trans('general.accessories'),
|
||||
"visible" => true
|
||||
], [
|
||||
"field" => "consumables_count",
|
||||
"searchable" => false,
|
||||
"sortable" => false,
|
||||
"sortable" => true,
|
||||
"title" => trans('general.consumables'),
|
||||
"visible" => true
|
||||
], [
|
||||
"field" => "components_count",
|
||||
"searchable" => false,
|
||||
"sortable" => false,
|
||||
"sortable" => true,
|
||||
"title" => trans('general.components'),
|
||||
"visible" => true
|
||||
], [
|
||||
@@ -72,7 +72,7 @@ class CategoryPresenter extends Presenter
|
||||
], [
|
||||
"field" => "require_acceptance",
|
||||
"searchable" => false,
|
||||
"sortable" => false,
|
||||
"sortable" => true,
|
||||
"title" => trans('admin/categories/table.require_acceptance'),
|
||||
"visible" => true,
|
||||
"formatter" => 'trueFalseFormatter',
|
||||
|
||||
@@ -85,6 +85,7 @@ class ComponentPresenter extends Presenter
|
||||
"sortable" => true,
|
||||
"title" => trans('general.purchase_cost'),
|
||||
"visible" => true,
|
||||
"footerFormatter" => 'sumFormatter',
|
||||
],
|
||||
];
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@ class ConsumablePresenter extends Presenter
|
||||
"sortable" => true,
|
||||
"title" => trans('general.purchase_cost'),
|
||||
"visible" => true,
|
||||
"footerFormatter" => 'sumFormatter',
|
||||
],[
|
||||
"field" => "change",
|
||||
"searchable" => false,
|
||||
|
||||
@@ -98,6 +98,7 @@ class LicensePresenter extends Presenter
|
||||
"sortable" => true,
|
||||
"visible" => false,
|
||||
"title" => trans('general.purchase_cost'),
|
||||
"footerFormatter" => 'sumFormatter',
|
||||
], [
|
||||
"field" => "purchase_order",
|
||||
"searchable" => true,
|
||||
|
||||
@@ -69,6 +69,14 @@ class UserPresenter extends Presenter
|
||||
"visible" => true,
|
||||
"formatter" => "emailFormatter"
|
||||
],
|
||||
[
|
||||
"field" => "phone",
|
||||
"searchable" => true,
|
||||
"sortable" => true,
|
||||
"switchable" => true,
|
||||
"title" => trans('admin/users/table.phone'),
|
||||
"visible" => true,
|
||||
],
|
||||
[
|
||||
"field" => "username",
|
||||
"searchable" => true,
|
||||
@@ -115,7 +123,7 @@ class UserPresenter extends Presenter
|
||||
[
|
||||
"field" => "assets_count",
|
||||
"searchable" => false,
|
||||
"sortable" => false,
|
||||
"sortable" => true,
|
||||
"switchable" => true,
|
||||
"title" => ' <span class="hidden-md hidden-lg">Assets</span>'
|
||||
.'<span class="hidden-xs"><i class="fa fa-barcode fa-lg"></i></span>',
|
||||
@@ -124,7 +132,7 @@ class UserPresenter extends Presenter
|
||||
[
|
||||
"field" => "licenses_count",
|
||||
"searchable" => false,
|
||||
"sortable" => false,
|
||||
"sortable" => true,
|
||||
"switchable" => true,
|
||||
"title" => ' <span class="hidden-md hidden-lg">Licenses</span>'
|
||||
.'<span class="hidden-xs"><i class="fa fa-floppy-o fa-lg"></i></span>',
|
||||
@@ -133,7 +141,7 @@ class UserPresenter extends Presenter
|
||||
[
|
||||
"field" => "consumables_count",
|
||||
"searchable" => false,
|
||||
"sortable" => false,
|
||||
"sortable" => true,
|
||||
"switchable" => true,
|
||||
"title" => ' <span class="hidden-md hidden-lg">Consumables</span>'
|
||||
.'<span class="hidden-xs"><i class="fa fa-tint fa-lg"></i></span>',
|
||||
@@ -142,7 +150,7 @@ class UserPresenter extends Presenter
|
||||
[
|
||||
"field" => "accessories_count",
|
||||
"searchable" => false,
|
||||
"sortable" => false,
|
||||
"sortable" => true,
|
||||
"switchable" => true,
|
||||
"title" => ' <span class="hidden-md hidden-lg">Accessories</span>'
|
||||
.'<span class="hidden-xs"><i class="fa fa-keyboard-o fa-lg"></i></span>',
|
||||
|
||||
@@ -98,8 +98,8 @@ class AppServiceProvider extends ServiceProvider
|
||||
if (config('app.debug')) {
|
||||
$log_level = 'debug';
|
||||
} else {
|
||||
if (config('log-level')) {
|
||||
$log_level = config('log-level');
|
||||
if (config('app.log_level')) {
|
||||
$log_level = config('app.log_level');
|
||||
} else {
|
||||
$log_level = 'error';
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
{"version":3,"file":"css/AdminLTE.css","sources":[],"mappings":";;;;;;A","sourceRoot":""}
|
||||
{"version":3,"file":"css/AdminLTE.css","sources":[],"mappings":";;;;;;","sourceRoot":""}
|
||||
+2
-2
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
{"version":3,"file":"css/app.css","sources":[],"mappings":";;;;;;;;A","sourceRoot":""}
|
||||
{"version":3,"file":"css/app.css","sources":[],"mappings":";;;;;;;;","sourceRoot":""}
|
||||
File diff suppressed because one or more lines are too long
+21
-10
@@ -1,12 +1,23 @@
|
||||
{
|
||||
"/vue.js": "/vue.js",
|
||||
"/css/AdminLTE.css": "/css/AdminLTE.css",
|
||||
"/css/app.css": "/css/app.css",
|
||||
"/css/overrides.css": "/css/overrides.css",
|
||||
"/vue.js.map": "/vue.js.map",
|
||||
"/css/AdminLTE.css.map": "/css/AdminLTE.css.map",
|
||||
"/css/app.css.map": "/css/app.css.map",
|
||||
"/css/overrides.css.map": "/css/overrides.css.map",
|
||||
"/public/css/dist/all.css": "/public/css/dist/all.css",
|
||||
"/public/js/dist/all.js": "/public/js/dist/all.js"
|
||||
"/build/vue.js": "/build/vue.js",
|
||||
"/mix.js": "/mix.js",
|
||||
"/build/app.css": "/build/app.535d8af1016a2377e449920c617f0197.css",
|
||||
"/build/AdminLTE.css": "/build/AdminLTE.3d8a2b2e33baa060b1b324363ad5e1c2.css",
|
||||
"/build/overrides.css": "/build/overrides.617623c6a96be3e0cbd11c5d4039ec10.css",
|
||||
"/css/all.css": "/css/all.css",
|
||||
"/js/all.js": "/js/all.js",
|
||||
"/css/app.css": "/css/app.css",
|
||||
"/css/dist/all.css": "/css/dist/all.css",
|
||||
"/js/dist/all.js": "/js/dist/all.js",
|
||||
"/css/AdminLTE.css": "/css/AdminLTE.css",
|
||||
"/css/overrides.css": "/css/overrides.css",
|
||||
"/css/skin-blue.css": "/css/skin-blue.css",
|
||||
"/vue.js": "/vue.js",
|
||||
"/vue.js.map": "/vue.js.map",
|
||||
"/mix.js.map": "/mix.js.map",
|
||||
"/css/AdminLTE.css.map": "/css/AdminLTE.css.map",
|
||||
"/css/app.css.map": "/css/app.css.map",
|
||||
"/css/overrides.css.map": "/css/overrides.css.map",
|
||||
"public/css/dist/all.css": "public/css/dist/all.css",
|
||||
"public/js/dist/all.js": "public/js/dist/all.js"
|
||||
}
|
||||
+63
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -19,7 +19,7 @@
|
||||
"javiereguiluz/easyslugger": "^1.0",
|
||||
"jenssegers/rollbar": "^1.5",
|
||||
"laravel/framework": "5.4.*",
|
||||
"laravel/passport": "^1.0",
|
||||
"laravel/passport": "^3.0",
|
||||
"laravel/tinker": "^1.0",
|
||||
"laravelcollective/html": "^5.3",
|
||||
"league/csv": "^8.1",
|
||||
|
||||
Generated
+274
-265
File diff suppressed because it is too large
Load Diff
+35
-2
@@ -121,8 +121,41 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'log' => env('APP_LOG', 'single'),
|
||||
'log-level' => env('APP_LOG_LEVEL', 'error'),
|
||||
'log' => env('APP_LOG', 'daily'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Logging Max Files
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the daily log mode, Laravel will only retain 5
|
||||
| days of log files by default.
|
||||
|
|
||||
| To change this, set the APP_LOG_MAX_FILES option in your .env.
|
||||
|
|
||||
*/
|
||||
|
||||
'log_max_files' => env('APP_LOG_MAX_FILES', 5),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Logging Detail
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By default, Laravel writes all log levels to storage. However, in your
|
||||
| production environment, you may wish to configure the minimum severity that
|
||||
| should be logged by editing your APP_LOG_LEVEL env config.
|
||||
|
|
||||
| Laravel will log all levels greater than or equal to the specified severity.
|
||||
| For example, a default log_level of error will log error, critical, alert,
|
||||
| and emergency messages.
|
||||
|
|
||||
| APP_LOG_LEVEL options are:
|
||||
| "debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"
|
||||
|
|
||||
*/
|
||||
|
||||
'log_level' => env('APP_LOG_LEVEL', 'error'),
|
||||
|
||||
|
||||
/*
|
||||
|
||||
+1
-4
@@ -132,12 +132,9 @@ return [
|
||||
|
||||
'sendmail' => '/usr/sbin/sendmail -bs',
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'markdown' => [
|
||||
'theme' => 'default',
|
||||
|
||||
'paths' => [
|
||||
resource_path('views/vendor/mail'),
|
||||
],
|
||||
|
||||
+1
-1
@@ -109,7 +109,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'cookie' => env('COOKIE_NAME', 'sl53_session'),
|
||||
'cookie' => env('COOKIE_NAME', 'snipeitv4_session'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
return array (
|
||||
'app_version' => 'v4.0.10',
|
||||
'build_version' => '235',
|
||||
'hash_version' => 'gcbe008d',
|
||||
'full_hash' => 'v4.0.10-235-gcbe008d',
|
||||
'app_version' => 'v4.0.14',
|
||||
'build_version' => '339',
|
||||
'hash_version' => 'g17b2719',
|
||||
'full_hash' => 'v4.0.14-339-g17b2719',
|
||||
);
|
||||
|
||||
@@ -24,7 +24,8 @@ $factory->state(App\Models\Accessory::class, 'apple-bt-keyboard', function ($fak
|
||||
'category_id' => 8,
|
||||
'manufacturer_id' => 1,
|
||||
'qty' => 10,
|
||||
'min_amt' => 2
|
||||
'min_amt' => 2,
|
||||
'supplier_id' => rand(1,5)
|
||||
];
|
||||
|
||||
});
|
||||
@@ -36,7 +37,8 @@ $factory->state(App\Models\Accessory::class, 'apple-usb-keyboard', function ($fa
|
||||
'category_id' => 8,
|
||||
'manufacturer_id' => 1,
|
||||
'qty' => 15,
|
||||
'min_amt' => 2
|
||||
'min_amt' => 2,
|
||||
'supplier_id' => rand(1,5)
|
||||
];
|
||||
|
||||
});
|
||||
@@ -48,7 +50,8 @@ $factory->state(App\Models\Accessory::class, 'apple-mouse', function ($faker) {
|
||||
'category_id' => 9,
|
||||
'manufacturer_id' => 1,
|
||||
'qty' => 13,
|
||||
'min_amt' => 2
|
||||
'min_amt' => 2,
|
||||
'supplier_id' => rand(1,5)
|
||||
];
|
||||
|
||||
});
|
||||
@@ -56,7 +59,7 @@ $factory->state(App\Models\Accessory::class, 'apple-mouse', function ($faker) {
|
||||
$factory->state(App\Models\Accessory::class, 'microsoft-mouse', function ($faker) {
|
||||
|
||||
return [
|
||||
'name' => 'Sculpt Comfort Mouse\'',
|
||||
'name' => 'Sculpt Comfort Mouse',
|
||||
'category_id' => 9,
|
||||
'manufacturer_id' => 2,
|
||||
'qty' => 13,
|
||||
|
||||
@@ -14,6 +14,17 @@ $factory->define(Actionlog::class, function (Faker\Generator $faker) {
|
||||
});
|
||||
|
||||
|
||||
$factory->defineAs(App\Models\Actionlog::class, 'asset-upload', function ($faker) {
|
||||
$asset = factory(App\Models\Asset::class)->create();
|
||||
return [
|
||||
'item_type' => get_class($asset),
|
||||
'item_id' => 1,
|
||||
'user_id' => 1,
|
||||
'filename' => $faker->word,
|
||||
'action_type' => 'uploaded'
|
||||
];
|
||||
});
|
||||
|
||||
|
||||
$factory->defineAs(Actionlog::class, 'asset-checkout-user', function (Faker\Generator $faker) {
|
||||
$target = User::inRandomOrder()->first();
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddDisplayUrlToSettings extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->boolean('show_url_in_emails')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->dropColumn('show_url_in_emails');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddCustomForgotPasswordUrl extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->string('custom_forgot_pass_url')->nullable()->default(null);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('settings', function (Blueprint $table) {
|
||||
$table->dropColumn('custom_forgot_pass_url');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddImageAndSupplierToAccessories extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('accessories', function (Blueprint $table) {
|
||||
$table->string('image')->nullable()->default(null);
|
||||
$table->integer('supplier_id')->nullable()->default(null);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('accessories', function (Blueprint $table) {
|
||||
$table->dropColumn('image');
|
||||
$table->dropColumn('supplier_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddLocationIndicesToAssets extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('assets', function (Blueprint $table) {
|
||||
$table->index('rtd_location_id');
|
||||
$table->index(['assigned_type','assigned_to']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('assets', function (Blueprint $table) {
|
||||
//
|
||||
$table->dropIndex(['rtd_location_id']);
|
||||
$table->dropIndex(['assigned_type','assigned_to']);
|
||||
});
|
||||
}
|
||||
}
|
||||
Vendored
+7
-5
File diff suppressed because one or more lines are too long
Vendored
+26
-26
File diff suppressed because one or more lines are too long
Executable
+1
@@ -0,0 +1 @@
|
||||
!.gitignore
|
||||
Executable
@@ -18,8 +18,7 @@
|
||||
data-toggle="modal" - required for Bootstrap Modals
|
||||
data-target="#createModal" - fixed ID for the modal, do not change
|
||||
data-dependency="user" - which Snipe-IT model you're going to be creating.
|
||||
data-select="assigned_to" - What is the *ID* of the select-dropdown that you're going to be adding to, if the modal-create was a
|
||||
success? Be on the lookout for duplicate ID's, it will confuse this library!
|
||||
data-select="assigned_to" - What is the *ID* of the select-dropdown that you're going to be adding to, if the modal-create was a success? Be on the lookout for duplicate ID's, it will confuse this library!
|
||||
class="btn btn-sm btn-default" - makes it look button-ey, feel free to change :)
|
||||
*/
|
||||
|
||||
@@ -37,8 +36,6 @@
|
||||
var link = $(event.relatedTarget);
|
||||
model = link.data("dependency");
|
||||
select = link.data("select");
|
||||
// console.warn("Uh, href is: "+link.attr('href'));
|
||||
// console.dir(link);
|
||||
$('#createModal').load(link.attr('href'),function () {
|
||||
//do we need to re-select2 this, after load? Probably.
|
||||
$('#createModal').find('select.select2').select2();
|
||||
@@ -47,11 +44,9 @@
|
||||
|
||||
|
||||
$('#createModal').on('click','#modal-save', function () {
|
||||
console.warn("MODAL SAVE CALLED FOR MODAL!");
|
||||
var data = {};
|
||||
console.warn("We are about to SAVE!!! for model: "+model+" and select ID: "+select);
|
||||
$('.modal-body input:visible').each(function (index, elem) {
|
||||
console.warn("["+index+"]: "+elem.id+" = "+$(elem).val());
|
||||
var bits = elem.id.split("-");
|
||||
if (bits[0] === "modal") {
|
||||
data[bits[1]] = $(elem).val();
|
||||
@@ -64,11 +59,11 @@
|
||||
});
|
||||
|
||||
data._token = Laravel.csrfToken;
|
||||
console.log(data);
|
||||
//console.log(data);
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: "/api/v1/" + model + "s",
|
||||
url: "../api/v1/" + model + "s",
|
||||
headers: {
|
||||
"X-Requested-With": 'XMLHttpRequest',
|
||||
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr('content')
|
||||
@@ -100,15 +95,15 @@
|
||||
// this code adds the newly created object to that select
|
||||
var selector = document.getElementById(select);
|
||||
if(!selector) {
|
||||
console.error("Could not find original <select> element with an id of: "+select);
|
||||
// console.error("Could not find original <select> element with an id of: "+select);
|
||||
return false;
|
||||
}
|
||||
//console.log(document.getElementById(select));
|
||||
console.dir(selector);
|
||||
// console.dir(selector);
|
||||
selector.options[selector.length] = new Option(name, id);
|
||||
selector.selectedIndex = selector.length - 1;
|
||||
$(selector).trigger("change");
|
||||
if(fetchCustomFields) {
|
||||
if(window.fetchCustomFields) {
|
||||
fetchCustomFields();
|
||||
}
|
||||
|
||||
@@ -124,4 +119,4 @@
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'about_accessories_title' => 'About Accessories',
|
||||
'about_accessories_text' => 'Accessories are anything you issue to users but that do not have a serial number (or you do not care about tracking them uniquely). For example, computer mice or keyboards.',
|
||||
'accessory_category' => 'Accessory Category',
|
||||
'accessory_name' => 'Accessory Name',
|
||||
'about_accessories_title' => 'Oor Toebehore',
|
||||
'about_accessories_text' => 'Toebehore is enigiets wat jy aan gebruikers uitreik, maar dit het nie \'n reeksnommer (of jy gee nie om om hulle unieke te volg nie). Byvoorbeeld, rekenaarmuise of sleutelborde.',
|
||||
'accessory_category' => 'Toebehore Kategorie',
|
||||
'accessory_name' => 'Toebehore Naam',
|
||||
'checkout' => 'Checkout Accessory',
|
||||
'checkin' => 'Checkin Accessory',
|
||||
'create' => 'Create Accessory',
|
||||
'edit' => 'Edit Accessory',
|
||||
'eula_text' => 'Category EULA',
|
||||
'eula_text_help' => 'This field allows you to customize your EULAs for specific types of assets. If you only have one EULA for all of your assets, you can check the box below to use the primary default.',
|
||||
'require_acceptance' => 'Require users to confirm acceptance of assets in this category.',
|
||||
'no_default_eula' => 'No primary default EULA found. Add one in Settings.',
|
||||
'total' => 'Total',
|
||||
'remaining' => 'Avail',
|
||||
'update' => 'Update Accessory',
|
||||
'use_default_eula' => 'Use the <a href="#" data-toggle="modal" data-target="#eulaModal">primary default EULA</a> instead.',
|
||||
'use_default_eula_disabled' => '<del>Use the primary default EULA instead.</del> No primary default EULA is set. Please add one in Settings.',
|
||||
'create' => 'Skep bykomstighede',
|
||||
'edit' => 'Wysig bykomstighede',
|
||||
'eula_text' => 'Kategorie EULA',
|
||||
'eula_text_help' => 'Hierdie veld laat u toe om u EULA\'s vir spesifieke soorte bates aan te pas. As u slegs een EULA vir al u bates het, kan u die onderstaande boks selekteer om die primêre standaard te gebruik.',
|
||||
'require_acceptance' => 'Vereis gebruikers om die aanvaarding van bates in hierdie kategorie te bevestig.',
|
||||
'no_default_eula' => 'Geen primêre standaard EULA gevind nie. Voeg een by Instellings.',
|
||||
'total' => 'totale',
|
||||
'remaining' => 'opgelewer',
|
||||
'update' => 'Opdatering bywerk',
|
||||
'use_default_eula' => 'Gebruik eerder die <a href="#" data-toggle="modal" data-target="#eulaModal">primary standaard EULA</a>.',
|
||||
'use_default_eula_disabled' => '<del>Gebruik die primêre standaardverlof in plaas daarvan.</del> Geen primêre standaard EULA is ingestel nie. Voeg asseblief een by Instellings.',
|
||||
|
||||
);
|
||||
|
||||
@@ -2,35 +2,35 @@
|
||||
|
||||
return array(
|
||||
|
||||
'does_not_exist' => 'The accessory does not exist.',
|
||||
'assoc_users' => 'This accessory currently has :count items checked out to users. Please check in the accessories and and try again. ',
|
||||
'does_not_exist' => 'Die accessoire bestaan nie.',
|
||||
'assoc_users' => 'Hierdie bykomstige het tans: tel items wat uitgekontroleer is aan gebruikers. Kontroleer asseblief die bykomstighede en en probeer weer.',
|
||||
|
||||
'create' => array(
|
||||
'error' => 'The accessory was not created, please try again.',
|
||||
'success' => 'The accessory was successfully created.'
|
||||
'error' => 'Die bykomstigheid is nie geskep nie, probeer asseblief weer.',
|
||||
'success' => 'Die bykomstigheid is suksesvol geskep.'
|
||||
),
|
||||
|
||||
'update' => array(
|
||||
'error' => 'The accessory was not updated, please try again',
|
||||
'success' => 'The accessory was updated successfully.'
|
||||
'error' => 'Die bykomstigheid is nie opgedateer nie, probeer asseblief weer',
|
||||
'success' => 'Die bykomstigheid is suksesvol opgedateer.'
|
||||
),
|
||||
|
||||
'delete' => array(
|
||||
'confirm' => 'Are you sure you wish to delete this accessory?',
|
||||
'error' => 'There was an issue deleting the accessory. Please try again.',
|
||||
'success' => 'The accessory was deleted successfully.'
|
||||
'confirm' => 'Is jy seker jy wil hierdie toebehore uitvee?',
|
||||
'error' => 'Daar was \'n probleem met die verwydering van die bykomstigheid. Probeer asseblief weer.',
|
||||
'success' => 'Die bykomstigheid is suksesvol verwyder.'
|
||||
),
|
||||
|
||||
'checkout' => array(
|
||||
'error' => 'Accessory was not checked out, please try again',
|
||||
'success' => 'Accessory checked out successfully.',
|
||||
'user_does_not_exist' => 'That user is invalid. Please try again.'
|
||||
'error' => 'Toebehore is nie nagegaan nie, probeer asseblief weer',
|
||||
'success' => 'Toebehore suksesvol nagegaan.',
|
||||
'user_does_not_exist' => 'Die gebruiker is ongeldig. Probeer asseblief weer.'
|
||||
),
|
||||
|
||||
'checkin' => array(
|
||||
'error' => 'Accessory was not checked in, please try again',
|
||||
'success' => 'Accessory checked in successfully.',
|
||||
'user_does_not_exist' => 'That user is invalid. Please try again.'
|
||||
'error' => 'Toebehore is nie nagegaan nie, probeer asseblief weer',
|
||||
'success' => 'Toebehore is suksesvol nagegaan.',
|
||||
'user_does_not_exist' => 'Die gebruiker is ongeldig. Probeer asseblief weer.'
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'dl_csv' => 'Download CSV',
|
||||
'dl_csv' => 'Laai CSV af',
|
||||
'eula_text' => 'EULA',
|
||||
'id' => 'ID',
|
||||
'require_acceptance' => 'Acceptance',
|
||||
'title' => 'Accessory Name',
|
||||
'require_acceptance' => 'aanvaarding',
|
||||
'title' => 'Toebehore Naam',
|
||||
|
||||
|
||||
);
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'asset_maintenance_type' => 'Maintenance Type',
|
||||
'title' => 'Title',
|
||||
'start_date' => 'Started',
|
||||
'completion_date' => 'Completed',
|
||||
'cost' => 'Cost',
|
||||
'is_warranty' => 'Warranty Improvement',
|
||||
'asset_maintenance_time' => 'Days',
|
||||
'notes' => 'Notes',
|
||||
'update' => 'Update',
|
||||
'create' => 'Create'
|
||||
'asset_maintenance_type' => 'Onderhoudstipe',
|
||||
'title' => 'Titel',
|
||||
'start_date' => 'begin',
|
||||
'completion_date' => 'voltooi',
|
||||
'cost' => 'koste',
|
||||
'is_warranty' => 'Garantieverbetering',
|
||||
'asset_maintenance_time' => 'dae',
|
||||
'notes' => 'notas',
|
||||
'update' => 'Opdateer',
|
||||
'create' => 'Skep'
|
||||
];
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
return [
|
||||
'asset_maintenances' => 'Asset Maintenances',
|
||||
'edit' => 'Edit Asset Maintenance',
|
||||
'delete' => 'Delete Asset Maintenance',
|
||||
'view' => 'View Asset Maintenance Details',
|
||||
'repair' => 'Repair',
|
||||
'maintenance' => 'Maintenance',
|
||||
'upgrade' => 'Upgrade'
|
||||
'edit' => 'Wysig bateonderhoud',
|
||||
'delete' => 'Verwyder Bate Onderhoud',
|
||||
'view' => 'Bekyk Bate Onderhoud Besonderhede',
|
||||
'repair' => 'herstel',
|
||||
'maintenance' => 'onderhoud',
|
||||
'upgrade' => 'opgradering'
|
||||
];
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'not_found' => 'Asset Maintenance you were looking for was not found!',
|
||||
'not_found' => 'Bate-instandhouding waarna jy gesoek is, is nie gevind nie!',
|
||||
'delete' => [
|
||||
'confirm' => 'Are you sure you wish to delete this asset maintenance?',
|
||||
'error' => 'There was an issue deleting the asset maintenance. Please try again.',
|
||||
'success' => 'The asset maintenance was deleted successfully.'
|
||||
'confirm' => 'Is jy seker jy wil hierdie bate instandhouding uitvee?',
|
||||
'error' => 'Daar was \'n probleem met die verwydering van die bate-instandhouding. Probeer asseblief weer.',
|
||||
'success' => 'Die bate-instandhouding is suksesvol verwyder.'
|
||||
],
|
||||
'create' => [
|
||||
'error' => 'Asset Maintenance was not created, please try again.',
|
||||
'success' => 'Asset Maintenance created successfully.'
|
||||
'error' => 'Asset Maintenance is nie geskep nie, probeer asseblief weer.',
|
||||
'success' => 'Bate Onderhoud geskep suksesvol.'
|
||||
],
|
||||
'edit' => [
|
||||
'error' => 'Asset Maintenance was not edited, please try again.',
|
||||
'success' => 'Asset Maintenance edited successfully.'
|
||||
'error' => 'Bateonderhoud is nie geredigeer nie, probeer asseblief weer.',
|
||||
'success' => 'Bate Onderhoud suksesvol geredigeer.'
|
||||
],
|
||||
'asset_maintenance_incomplete' => 'Not Completed Yet',
|
||||
'warranty' => 'Warranty',
|
||||
'not_warranty' => 'Not Warranty',
|
||||
'asset_maintenance_incomplete' => 'Nog nie voltooi nie',
|
||||
'warranty' => 'waarborg',
|
||||
'not_warranty' => 'Nie waarborg nie',
|
||||
];
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'title' => 'Asset Maintenance',
|
||||
'asset_name' => 'Asset Name',
|
||||
'is_warranty' => 'Warranty',
|
||||
'dl_csv' => 'Download CSV'
|
||||
'title' => 'Bate Onderhoud',
|
||||
'asset_name' => 'Bate Naam',
|
||||
'is_warranty' => 'waarborg',
|
||||
'dl_csv' => 'Laai CSV af'
|
||||
];
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'about_categories_title' => 'About Categories',
|
||||
'about_categories' => 'Categories help you organize your items. Some example categories might be "Desktops", "Laptops", "Mobile Phones", "Tablets", and so on, but you can use categories any way that makes sense for you.',
|
||||
'asset_categories' => 'Asset Categories',
|
||||
'category_name' => 'Category Name',
|
||||
'checkin_email' => 'Send email to user on checkin.',
|
||||
'clone' => 'Clone Category',
|
||||
'create' => 'Create Category',
|
||||
'edit' => 'Edit Category',
|
||||
'eula_text' => 'Category EULA',
|
||||
'eula_text_help' => 'This field allows you to customize your EULAs for specific types of assets. If you only have one EULA for all of your assets, you can check the box below to use the primary default.',
|
||||
'name' => 'Category Name',
|
||||
'require_acceptance' => 'Require users to confirm acceptance of assets in this category.',
|
||||
'required_acceptance' => 'This user will be emailed with a link to confirm acceptance of this item.',
|
||||
'required_eula' => 'This user will be emailed a copy of the EULA',
|
||||
'no_default_eula' => 'No primary default EULA found. Add one in Settings.',
|
||||
'update' => 'Update Category',
|
||||
'use_default_eula' => 'Use the <a href="#" data-toggle="modal" data-target="#eulaModal">primary default EULA</a> instead.',
|
||||
'use_default_eula_disabled' => '<del>Use the primary default EULA instead.</del> No primary default EULA is set. Please add one in Settings.',
|
||||
'about_categories_title' => 'Oor Kategorieë',
|
||||
'about_categories' => 'Kategorieë help jou om jou items te organiseer. Sommige voorbeeldkategorieë kan wees "Desktops", "Laptops", "Mobile Phones", "Tablets", ensovoorts, maar jy kan kategorieë gebruik wat vir jou sin maak.',
|
||||
'asset_categories' => 'Bate kategorieë',
|
||||
'category_name' => 'Kategorie Naam',
|
||||
'checkin_email' => 'Stuur e-pos aan gebruiker op inskrywing.',
|
||||
'clone' => 'Klone Kategorie',
|
||||
'create' => 'Skep Kategorie',
|
||||
'edit' => 'Wysig Kategorie',
|
||||
'eula_text' => 'Kategorie EULA',
|
||||
'eula_text_help' => 'Hierdie veld laat u toe om u EULA\'s vir spesifieke soorte bates aan te pas. As u slegs een EULA vir al u bates het, kan u die onderstaande boks selekteer om die primêre standaard te gebruik.',
|
||||
'name' => 'Kategorie Naam',
|
||||
'require_acceptance' => 'Vereis gebruikers om die aanvaarding van bates in hierdie kategorie te bevestig.',
|
||||
'required_acceptance' => 'Hierdie gebruiker sal per e-pos met \'n skakel gestuur word om die aanvaarding van hierdie item te bevestig.',
|
||||
'required_eula' => 'Hierdie gebruiker sal \'n afskrif van die EULA ontvang',
|
||||
'no_default_eula' => 'Geen primêre standaard EULA gevind nie. Voeg een by Instellings.',
|
||||
'update' => 'Opdateer kategorie',
|
||||
'use_default_eula' => 'Gebruik eerder die <a href="#" data-toggle="modal" data-target="#eulaModal">primary standaard EULA</a>.',
|
||||
'use_default_eula_disabled' => '<del>Gebruik die primêre standaardverlof in plaas daarvan.</del> Geen primêre standaard EULA is ingestel nie. Voeg asseblief een by Instellings.',
|
||||
|
||||
);
|
||||
|
||||
@@ -2,24 +2,24 @@
|
||||
|
||||
return array(
|
||||
|
||||
'does_not_exist' => 'Category does not exist.',
|
||||
'assoc_models' => 'This category is currently associated with at least one model and cannot be deleted. Please update your models to no longer reference this category and try again. ',
|
||||
'assoc_items' => 'This category is currently associated with at least one :asset_type and cannot be deleted. Please update your :asset_type to no longer reference this category and try again. ',
|
||||
'does_not_exist' => 'Kategorie bestaan nie.',
|
||||
'assoc_models' => 'Hierdie kategorie is tans gekoppel aan ten minste een model en kan nie uitgevee word nie. Dateer asseblief jou modelle op om nie meer hierdie kategorie te verwys nie en probeer weer.',
|
||||
'assoc_items' => 'Hierdie kategorie word tans geassosieer met ten minste een: asset_type en kan nie uitgevee word nie. Werk asseblief jou: bat_type op om nie meer hierdie kategorie te verwys nie en probeer weer.',
|
||||
|
||||
'create' => array(
|
||||
'error' => 'Category was not created, please try again.',
|
||||
'success' => 'Category created successfully.'
|
||||
'error' => 'Kategorie is nie geskep nie, probeer asseblief weer.',
|
||||
'success' => 'Kategorie geskep suksesvol.'
|
||||
),
|
||||
|
||||
'update' => array(
|
||||
'error' => 'Category was not updated, please try again',
|
||||
'success' => 'Category updated successfully.'
|
||||
'error' => 'Kategorie is nie opgedateer nie, probeer asseblief weer',
|
||||
'success' => 'Kategorie suksesvol opgedateer.'
|
||||
),
|
||||
|
||||
'delete' => array(
|
||||
'confirm' => 'Are you sure you wish to delete this category?',
|
||||
'error' => 'There was an issue deleting the category. Please try again.',
|
||||
'success' => 'The category was deleted successfully.'
|
||||
'confirm' => 'Is jy seker jy wil hierdie kategorie uitvee?',
|
||||
'error' => 'Daar was \'n probleem met die verwydering van die kategorie. Probeer asseblief weer.',
|
||||
'success' => 'Die kategorie is suksesvol verwyder.'
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
return array(
|
||||
'eula_text' => 'EULA',
|
||||
'id' => 'ID',
|
||||
'parent' => 'Parent',
|
||||
'require_acceptance' => 'Acceptance',
|
||||
'title' => 'Asset Category Name',
|
||||
'parent' => 'Ouer',
|
||||
'require_acceptance' => 'aanvaarding',
|
||||
'title' => 'Bate Kategorie Naam',
|
||||
|
||||
);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
return [
|
||||
'about_companies_title' => 'About Companies',
|
||||
'about_companies_text' => 'Companies can be used as a simple identifier field, or can be used to limit visibility of assets, users, etc if full company support is enabled in your Admin settings.',
|
||||
'select_company' => 'Select Company',
|
||||
'about_companies_title' => 'Oor Maatskappye',
|
||||
'about_companies_text' => 'Maatskappye kan gebruik word as \'n eenvoudige identifikasie veld, of kan gebruik word om sigbaarheid van bates, gebruikers, ens beperk as volle maatskappy ondersteuning geaktiveer is in jou Admin instellings.',
|
||||
'select_company' => 'Kies Maatskappy',
|
||||
];
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<?php
|
||||
return array(
|
||||
'does_not_exist' => 'Company does not exist.',
|
||||
'assoc_users' => 'This company is currently associated with at least one model and cannot be deleted. Please update your models to no longer reference this company and try again. ',
|
||||
'does_not_exist' => 'Maatskappy bestaan nie.',
|
||||
'assoc_users' => 'Hierdie maatskappy is tans geassosieer met ten minste een model en kan nie verwyder word nie. Dateer asseblief jou modelle op om nie meer hierdie maatskappy te verwys nie en probeer weer.',
|
||||
'create' => array(
|
||||
'error' => 'Company was not created, please try again.',
|
||||
'success' => 'Company created successfully.'
|
||||
'error' => 'Maatskappy is nie geskep nie, probeer asseblief weer.',
|
||||
'success' => 'Maatskappy geskep suksesvol.'
|
||||
),
|
||||
'update' => array(
|
||||
'error' => 'Company was not updated, please try again',
|
||||
'success' => 'Company updated successfully.'
|
||||
'error' => 'Maatskappy is nie opgedateer nie, probeer asseblief weer',
|
||||
'success' => 'Maatskappy suksesvol opgedateer.'
|
||||
),
|
||||
'delete' => array(
|
||||
'confirm' => 'Are you sure you wish to delete this company?',
|
||||
'error' => 'There was an issue deleting the company. Please try again.',
|
||||
'success' => 'The Company was deleted successfully.'
|
||||
'confirm' => 'Is jy seker jy wil hierdie maatskappy uitvee?',
|
||||
'error' => 'Daar was \'n probleem met die verwydering van die maatskappy. Probeer asseblief weer.',
|
||||
'success' => 'Die maatskappy is suksesvol verwyder.'
|
||||
)
|
||||
);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
return array(
|
||||
'companies' => 'Companies',
|
||||
'create' => 'Create Company',
|
||||
'title' => 'Company',
|
||||
'companies' => 'maatskappye',
|
||||
'create' => 'Skep maatskappy',
|
||||
'title' => 'maatskappy',
|
||||
'update' => 'Update Company',
|
||||
'name' => 'Company Name',
|
||||
'name' => 'maatskappynaam',
|
||||
'id' => 'ID',
|
||||
);
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'about_components_title' => 'About Components',
|
||||
'about_components_text' => 'Components are items that are part of an asset, for example HDD, RAM, etc.',
|
||||
'component_name' => 'Component Name',
|
||||
'checkin' => 'Checkin Component',
|
||||
'checkout' => 'Checkout Component',
|
||||
'cost' => 'Purchase Cost',
|
||||
'create' => 'Create Component',
|
||||
'edit' => 'Edit Component',
|
||||
'date' => 'Purchase Date',
|
||||
'order' => 'Order Number',
|
||||
'remaining' => 'Remaining',
|
||||
'total' => 'Total',
|
||||
'update' => 'Update Component',
|
||||
'about_components_title' => 'Oor komponente',
|
||||
'about_components_text' => 'Komponente is items wat deel van \'n bate is, byvoorbeeld HDD, RAM, ens.',
|
||||
'component_name' => 'Komponentnaam',
|
||||
'checkin' => 'Checkin-komponent',
|
||||
'checkout' => 'Afhandelingskomponent',
|
||||
'cost' => 'Aankoopskoste',
|
||||
'create' => 'Skep komponent',
|
||||
'edit' => 'Wysig komponent',
|
||||
'date' => 'Aankoop datum',
|
||||
'order' => 'Bestellingnommer',
|
||||
'remaining' => 'oorblywende',
|
||||
'total' => 'totale',
|
||||
'update' => 'Opdateer komponent',
|
||||
);
|
||||
|
||||
@@ -2,34 +2,34 @@
|
||||
|
||||
return array(
|
||||
|
||||
'does_not_exist' => 'Component does not exist.',
|
||||
'does_not_exist' => 'Komponent bestaan nie.',
|
||||
|
||||
'create' => array(
|
||||
'error' => 'Component was not created, please try again.',
|
||||
'success' => 'Component created successfully.'
|
||||
'error' => 'Komponent is nie geskep nie, probeer asseblief weer.',
|
||||
'success' => 'Komponent geskep suksesvol.'
|
||||
),
|
||||
|
||||
'update' => array(
|
||||
'error' => 'Component was not updated, please try again',
|
||||
'success' => 'Component updated successfully.'
|
||||
'error' => 'Komponent is nie opgedateer nie, probeer asseblief weer',
|
||||
'success' => 'Komponent suksesvol opgedateer.'
|
||||
),
|
||||
|
||||
'delete' => array(
|
||||
'confirm' => 'Are you sure you wish to delete this component?',
|
||||
'error' => 'There was an issue deleting the component. Please try again.',
|
||||
'success' => 'The component was deleted successfully.'
|
||||
'confirm' => 'Is jy seker jy wil hierdie komponent uitvee?',
|
||||
'error' => 'Daar was \'n probleem met die verwydering van die komponent. Probeer asseblief weer.',
|
||||
'success' => 'Die komponent is suksesvol verwyder.'
|
||||
),
|
||||
|
||||
'checkout' => array(
|
||||
'error' => 'Component was not checked out, please try again',
|
||||
'success' => 'Component checked out successfully.',
|
||||
'user_does_not_exist' => 'That user is invalid. Please try again.'
|
||||
'error' => 'Komponent is nie nagegaan nie, probeer asseblief weer',
|
||||
'success' => 'Komponent is suksesvol nagegaan.',
|
||||
'user_does_not_exist' => 'Die gebruiker is ongeldig. Probeer asseblief weer.'
|
||||
),
|
||||
|
||||
'checkin' => array(
|
||||
'error' => 'Component was not checked in, please try again',
|
||||
'success' => 'Component checked in successfully.',
|
||||
'user_does_not_exist' => 'That user is invalid. Please try again.'
|
||||
'error' => 'Komponent is nie nagegaan nie, probeer asseblief weer',
|
||||
'success' => 'Komponent is suksesvol nagegaan.',
|
||||
'user_does_not_exist' => 'Die gebruiker is ongeldig. Probeer asseblief weer.'
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'title' => 'Component Name',
|
||||
'title' => 'Komponentnaam',
|
||||
);
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
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.',
|
||||
'checkout' => 'Checkout Consumable to User',
|
||||
'consumable_name' => 'Consumable Name',
|
||||
'create' => 'Create Consumable',
|
||||
'about_consumables_title' => 'Oor Verbruiksgoedere',
|
||||
'about_consumables_text' => 'Verbruiksgoedere word enigiets aangekoop wat oor tyd gebruik sal word. Byvoorbeeld, drukker ink of kopieermapier.',
|
||||
'checkout' => 'Afhandeling Verbruiker na Gebruiker',
|
||||
'consumable_name' => 'Verbruikbare Naam',
|
||||
'create' => 'Skep Verbruik',
|
||||
'item_no' => 'Item No.',
|
||||
'remaining' => 'Remaining',
|
||||
'total' => 'Total',
|
||||
'update' => 'Update Consumable',
|
||||
'remaining' => 'oorblywende',
|
||||
'total' => 'totale',
|
||||
'update' => 'Verbruik Verbruik',
|
||||
);
|
||||
|
||||
@@ -2,34 +2,34 @@
|
||||
|
||||
return array(
|
||||
|
||||
'does_not_exist' => 'Consumable does not exist.',
|
||||
'does_not_exist' => 'Verbruiksgoedere bestaan nie.',
|
||||
|
||||
'create' => array(
|
||||
'error' => 'Consumable was not created, please try again.',
|
||||
'success' => 'Consumable created successfully.'
|
||||
'error' => 'Verbruiksgoedere is nie geskep nie, probeer asseblief weer.',
|
||||
'success' => 'Verbruiker geskep suksesvol.'
|
||||
),
|
||||
|
||||
'update' => array(
|
||||
'error' => 'Consumable was not updated, please try again',
|
||||
'success' => 'Consumable updated successfully.'
|
||||
'error' => 'Verbruiksgoedere is nie opgedateer nie, probeer asseblief weer',
|
||||
'success' => 'Verbruiksgoedere suksesvol opgedateer.'
|
||||
),
|
||||
|
||||
'delete' => array(
|
||||
'confirm' => 'Are you sure you wish to delete this consumable?',
|
||||
'error' => 'There was an issue deleting the consumable. Please try again.',
|
||||
'success' => 'The consumable was deleted successfully.'
|
||||
'confirm' => 'Is jy seker jy wil hierdie verbruiksgoed uitvee?',
|
||||
'error' => 'Daar was \'n probleem met die verwydering van die verbruik. Probeer asseblief weer.',
|
||||
'success' => 'Die verbruiksgoed is suksesvol verwyder.'
|
||||
),
|
||||
|
||||
'checkout' => array(
|
||||
'error' => 'Consumable was not checked out, please try again',
|
||||
'success' => 'Consumable checked out successfully.',
|
||||
'user_does_not_exist' => 'That user is invalid. Please try again.'
|
||||
'error' => 'Verbruiksgoedere is nie nagegaan nie, probeer asseblief weer',
|
||||
'success' => 'Verbruiksgoedere is suksesvol nagegaan.',
|
||||
'user_does_not_exist' => 'Die gebruiker is ongeldig. Probeer asseblief weer.'
|
||||
),
|
||||
|
||||
'checkin' => array(
|
||||
'error' => 'Consumable was not checked in, please try again',
|
||||
'success' => 'Consumable checked in successfully.',
|
||||
'user_does_not_exist' => 'That user is invalid. Please try again.'
|
||||
'error' => 'Verbruiksgoedere is nie nagegaan nie, probeer asseblief weer',
|
||||
'success' => 'Verbruiker word suksesvol nagegaan.',
|
||||
'user_does_not_exist' => 'Die gebruiker is ongeldig. Probeer asseblief weer.'
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'title' => 'Consumable Name',
|
||||
'title' => 'Verbruikbare Naam',
|
||||
);
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
<?php
|
||||
|
||||
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.',
|
||||
'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',
|
||||
'custom_fields' => 'Aangepaste velde',
|
||||
'field' => 'veld',
|
||||
'about_fieldsets_title' => 'Oor Fieldsets',
|
||||
'about_fieldsets_text' => 'Veldstelle stel jou in staat om groepe van persoonlike velde te skep wat gereeld hergebruik word vir spesifieke tipe bates.',
|
||||
'custom_format' => 'Gepasmaakte formaat ...',
|
||||
'encrypt_field' => 'Enkripteer die waarde van hierdie veld in die databasis',
|
||||
'encrypt_field_help' => 'WAARSKUWING: Om \'n veld te enkripteer, maak dit onondersoekbaar.',
|
||||
'encrypted' => 'encrypted',
|
||||
'fieldset' => 'fieldset',
|
||||
'qty_fields' => 'Aantal velde',
|
||||
'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_element' => 'Form Element',
|
||||
'field_element_short' => 'Element',
|
||||
'field_format' => 'Format',
|
||||
'field_custom_format' => 'Custom Format',
|
||||
'required' => 'Required',
|
||||
'fieldset_name' => 'Veldsetnaam',
|
||||
'field_name' => 'Veldnaam',
|
||||
'field_values' => 'Veldwaardes',
|
||||
'field_values_help' => 'Voeg selekteer opsies by, een per reël. Blanke lyne behalwe die eerste reël sal geïgnoreer word.',
|
||||
'field_element' => 'Vorm Element',
|
||||
'field_element_short' => 'element',
|
||||
'field_format' => 'formaat',
|
||||
'field_custom_format' => 'Gepasmaakte formaat',
|
||||
'required' => 'vereis',
|
||||
'req' => 'Req.',
|
||||
'used_by_models' => 'Used By Models',
|
||||
'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',
|
||||
'used_by_models' => 'Gebruik deur modelle',
|
||||
'order' => 'Orde',
|
||||
'create_fieldset' => 'Nuwe Fieldset',
|
||||
'create_field' => 'Nuwe aangepaste veld',
|
||||
'value_encrypted' => 'Die waarde van hierdie veld is geïnkripteer in die databasis. Slegs admingebruikers sal die gedecodeerde waarde kan sien',
|
||||
);
|
||||
|
||||
@@ -3,48 +3,48 @@
|
||||
return array(
|
||||
|
||||
'field' => array(
|
||||
'invalid' => 'That field does not exist.',
|
||||
'already_added' => 'Field already added',
|
||||
'invalid' => 'Daardie veld bestaan nie.',
|
||||
'already_added' => 'Veld reeds bygevoeg',
|
||||
|
||||
'create' => array(
|
||||
'error' => 'Field was not created, please try again.',
|
||||
'success' => 'Field created successfully.',
|
||||
'assoc_success' => 'Field successfully added to fieldset.'
|
||||
'error' => 'Veld is nie geskep nie, probeer asseblief weer.',
|
||||
'success' => 'Veld geskep suksesvol.',
|
||||
'assoc_success' => 'Veld suksesvol bygevoeg tot veldtog.'
|
||||
),
|
||||
|
||||
'update' => array(
|
||||
'error' => 'Field was not updated, please try again',
|
||||
'success' => 'Field updated successfully.'
|
||||
'error' => 'Veld is nie opgedateer nie, probeer asseblief weer',
|
||||
'success' => 'Veld suksesvol opgedateer.'
|
||||
),
|
||||
|
||||
'delete' => array(
|
||||
'confirm' => 'Are you sure you wish to delete this field?',
|
||||
'error' => 'There was an issue deleting the field. Please try again.',
|
||||
'success' => 'The field was deleted successfully.',
|
||||
'in_use' => 'Field is still in use.',
|
||||
'confirm' => 'Is jy seker jy wil hierdie veld uitvee?',
|
||||
'error' => 'Daar was \'n probleem met die verwydering van die veld. Probeer asseblief weer.',
|
||||
'success' => 'Die veld is suksesvol verwyder.',
|
||||
'in_use' => 'Veld is nog steeds in gebruik.',
|
||||
)
|
||||
|
||||
),
|
||||
|
||||
'fieldset' => array(
|
||||
|
||||
'does_not_exist' => 'Fieldset does not exist',
|
||||
'does_not_exist' => 'Veldset bestaan nie',
|
||||
|
||||
'create' => array(
|
||||
'error' => 'Fieldset was not created, please try again.',
|
||||
'success' => 'Fieldset created successfully.'
|
||||
'error' => 'Veldtipe is nie geskep nie, probeer asseblief weer.',
|
||||
'success' => 'Veldtipe suksesvol geskep.'
|
||||
),
|
||||
|
||||
'update' => array(
|
||||
'error' => 'Fieldset was not updated, please try again',
|
||||
'success' => 'Fieldset updated successfully.'
|
||||
'error' => 'Fieldset is nie opgedateer nie, probeer asseblief weer',
|
||||
'success' => 'Veldset suksesvol opgedateer.'
|
||||
),
|
||||
|
||||
'delete' => array(
|
||||
'confirm' => 'Are you sure you wish to delete this fieldset?',
|
||||
'error' => 'There was an issue deleting the fieldset. Please try again.',
|
||||
'success' => 'The fieldset was deleted successfully.',
|
||||
'in_use' => 'Fieldset is still in use.',
|
||||
'confirm' => 'Is jy seker jy wil hierdie veldtog uitvee?',
|
||||
'error' => 'Daar was \'n probleem met die verwydering van die veldtog. Probeer asseblief weer.',
|
||||
'success' => 'Die veldtog is suksesvol verwyder.',
|
||||
'in_use' => 'Veldset is nog steeds in gebruik.',
|
||||
)
|
||||
|
||||
),
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
|
||||
return array(
|
||||
|
||||
'does_not_exist' => 'Department does not exist.',
|
||||
'assoc_users' => 'This department is currently associated with at least one user and cannot be deleted. Please update your users to no longer reference this department and try again. ',
|
||||
'does_not_exist' => 'Departement bestaan nie.',
|
||||
'assoc_users' => 'Hierdie afdeling word tans geassosieer met minstens een gebruiker en kan nie verwyder word nie. Dateer asseblief u gebruikers op om nie meer hierdie departement te verwys nie en probeer weer.',
|
||||
'create' => array(
|
||||
'error' => 'Department was not created, please try again.',
|
||||
'success' => 'Department created successfully.'
|
||||
'error' => 'Departement is nie geskep nie, probeer asseblief weer.',
|
||||
'success' => 'Departement geskep suksesvol.'
|
||||
),
|
||||
'update' => array(
|
||||
'error' => 'Department was not updated, please try again',
|
||||
'success' => 'Department updated successfully.'
|
||||
'error' => 'Departement is nie opgedateer nie, probeer asseblief weer',
|
||||
'success' => 'Departement suksesvol opgedateer.'
|
||||
),
|
||||
'delete' => array(
|
||||
'confirm' => 'Are you sure you wish to delete this department?',
|
||||
'error' => 'There was an issue deleting the department. Please try again.',
|
||||
'success' => 'The department was deleted successfully.'
|
||||
'confirm' => 'Is jy seker jy wil hierdie departement uitvee?',
|
||||
'error' => 'Daar is \'n probleem met die verwydering van die departement. Probeer asseblief weer.',
|
||||
'success' => 'Die departement is suksesvol geskrap.'
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
return array(
|
||||
|
||||
'id' => 'ID',
|
||||
'name' => 'Department Name',
|
||||
'manager' => 'Manager',
|
||||
'location' => 'Location',
|
||||
'create' => 'Create Department',
|
||||
'update' => 'Update Department',
|
||||
'name' => 'Departement Naam',
|
||||
'manager' => 'Bestuurder',
|
||||
'location' => 'plek',
|
||||
'create' => 'Skep Departement',
|
||||
'update' => 'Update Departement',
|
||||
);
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'about_asset_depreciations' => 'About Asset Depreciations',
|
||||
'about_depreciations' => 'You can set up asset depreciations to depreciate assets based on straight-line depreciation.',
|
||||
'asset_depreciations' => 'Asset Depreciations',
|
||||
'create' => 'Create Depreciation',
|
||||
'depreciation_name' => 'Depreciation Name',
|
||||
'number_of_months' => 'Number of Months',
|
||||
'update' => 'Update Depreciation',
|
||||
'about_asset_depreciations' => 'Oor bate afskrywing',
|
||||
'about_depreciations' => 'U kan bate-afskrywings opstel om bates te deprecieer gebaseer op reguit-waardevermindering.',
|
||||
'asset_depreciations' => 'Bate afskrywing',
|
||||
'create' => 'Skep waardevermindering',
|
||||
'depreciation_name' => 'Waardevermindering Naam',
|
||||
'number_of_months' => 'Aantal maande',
|
||||
'update' => 'Werk waardevermindering op',
|
||||
|
||||
);
|
||||
|
||||
@@ -2,24 +2,24 @@
|
||||
|
||||
return array(
|
||||
|
||||
'does_not_exist' => 'Depreciation class does not exist.',
|
||||
'assoc_users' => 'This depreciation is currently associated with one or more models and cannot be deleted. Please delete the models, and then try deleting again. ',
|
||||
'does_not_exist' => 'Waardeverminderingsklas bestaan nie.',
|
||||
'assoc_users' => 'Hierdie waardevermindering word tans geassosieer met een of meer modelle en kan nie uitgevee word nie. Skrap asseblief die modelle, en probeer dan weer uitvee.',
|
||||
|
||||
|
||||
'create' => array(
|
||||
'error' => 'Depreciation class was not created, please try again. :(',
|
||||
'success' => 'Depreciation class created successfully. :)'
|
||||
'error' => 'Waardeverminderingsklas is nie geskep nie, probeer asseblief weer. :(',
|
||||
'success' => 'Depresiasieklas geskep suksesvol. :)'
|
||||
),
|
||||
|
||||
'update' => array(
|
||||
'error' => 'Depreciation class was not updated, please try again',
|
||||
'success' => 'Depreciation class updated successfully.'
|
||||
'error' => 'Waardeverminderingsklas is nie opgedateer nie, probeer asseblief weer',
|
||||
'success' => 'Waardeverminderingsklas suksesvol opgedateer.'
|
||||
),
|
||||
|
||||
'delete' => array(
|
||||
'confirm' => 'Are you sure you wish to delete this depreciation class?',
|
||||
'error' => 'There was an issue deleting the depreciation class. Please try again.',
|
||||
'success' => 'The depreciation class was deleted successfully.'
|
||||
'confirm' => 'Is jy seker jy wil hierdie depresiasieklas verwyder?',
|
||||
'error' => 'Daar was \'n probleem met die verwydering van die waardeverminderingsklas. Probeer asseblief weer.',
|
||||
'success' => 'Die waardeverminderingsklas is suksesvol verwyder.'
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user