mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net> # Conflicts: # public/css/dist/all.css # public/css/dist/bootstrap-table.css # public/js/dist/bootstrap-table.js # public/mix-manifest.json
This commit is contained in:
commit
ca446ad7df
|
@ -40,10 +40,13 @@ class ActionlogController extends Controller
|
|||
public function getStoredEula($filename) : Response | BinaryFileResponse | RedirectResponse
|
||||
{
|
||||
$this->authorize('view', \App\Models\Asset::class);
|
||||
$file = config('app.private_uploads').'/eula-pdfs/'.$filename;
|
||||
|
||||
if (config('filesystems.default') == 's3_private') {
|
||||
return redirect()->away(Storage::disk('s3_private')->temporaryUrl('private_uploads/eula-pdfs/'.$filename, now()->addMinutes(5)));
|
||||
}
|
||||
|
||||
if (Storage::exists('private_uploads/eula-pdfs/'.$filename)) {
|
||||
return response()->download($file);
|
||||
return response()->download(config('app.private_uploads').'/eula-pdfs/'.$filename);
|
||||
}
|
||||
|
||||
return redirect()->back()->with('error', trans('general.file_does_not_exist'));
|
||||
|
|
|
@ -39,6 +39,7 @@ abstract class Importer
|
|||
* @var array
|
||||
*/
|
||||
private $defaultFieldMap = [
|
||||
'id' => 'id',
|
||||
'asset_tag' => 'asset tag',
|
||||
'activated' => 'activated',
|
||||
'category' => 'category',
|
||||
|
|
|
@ -456,14 +456,13 @@ class ItemImporter extends Importer
|
|||
{
|
||||
if (empty($asset_location)) {
|
||||
$this->log('No location given, so none created.');
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
$location = Location::where(['name' => $asset_location])->first();
|
||||
|
||||
if ($location) {
|
||||
$this->log('Location '.$asset_location.' already exists');
|
||||
|
||||
return $location->id;
|
||||
}
|
||||
// No matching locations in the collection, create a new one.
|
||||
|
|
|
@ -38,8 +38,16 @@ class LocationImporter extends ItemImporter
|
|||
{
|
||||
|
||||
$editingLocation = false;
|
||||
|
||||
$location = Location::where('name', '=', $this->findCsvMatch($row, 'name'))->first();
|
||||
|
||||
if ($this->findCsvMatch($row, 'id')!='') {
|
||||
// Override location if an ID was given
|
||||
\Log::debug('Finding location by ID: '.$this->findCsvMatch($row, 'id'));
|
||||
$location = Location::find($this->findCsvMatch($row, 'id'));
|
||||
}
|
||||
|
||||
|
||||
if ($location) {
|
||||
if (! $this->updating) {
|
||||
$this->log('A matching Location '.$this->item['name'].' already exists');
|
||||
|
@ -95,6 +103,7 @@ class LocationImporter extends ItemImporter
|
|||
|
||||
} else {
|
||||
Log::debug($location->getErrors());
|
||||
$this->logError($location, 'Location "'.$this->item['name'].'"');
|
||||
return $location->errors;
|
||||
}
|
||||
|
||||
|
|
|
@ -329,6 +329,7 @@ class Importer extends Component
|
|||
];
|
||||
|
||||
$this->locations_fields = [
|
||||
'id' => trans('general.id'),
|
||||
'name' => trans('general.item_name_var', ['item' => trans('general.location')]),
|
||||
'address' => trans('general.address'),
|
||||
'address2' => trans('general.importer.address2'),
|
||||
|
@ -400,7 +401,6 @@ class Importer extends Component
|
|||
'requestable',
|
||||
'Requestable',
|
||||
],
|
||||
|
||||
'gravatar' =>
|
||||
[
|
||||
'gravatar',
|
||||
|
|
8
package-lock.json
generated
8
package-lock.json
generated
|
@ -15,7 +15,7 @@
|
|||
"bootstrap-colorpicker": "^2.5.3",
|
||||
"bootstrap-datepicker": "^1.10.0",
|
||||
"bootstrap-less": "^3.3.8",
|
||||
"bootstrap-table": "1.23.5",
|
||||
"bootstrap-table": "1.24.0",
|
||||
"canvas-confetti": "^1.9.3",
|
||||
"chart.js": "^2.9.4",
|
||||
"clipboard": "^2.0.11",
|
||||
|
@ -3705,9 +3705,9 @@
|
|||
"license": "MIT"
|
||||
},
|
||||
"node_modules/bootstrap-table": {
|
||||
"version": "1.23.5",
|
||||
"resolved": "https://registry.npmjs.org/bootstrap-table/-/bootstrap-table-1.23.5.tgz",
|
||||
"integrity": "sha512-9WByoSpJvA73gi2YYIlX6IWR74oZtBmSixul/Th8FTBtBd/kZRpbKESGTjhA3BA3AYTnfyY8Iy1KeRWPlV2GWQ==",
|
||||
"version": "1.24.0",
|
||||
"resolved": "https://registry.npmjs.org/bootstrap-table/-/bootstrap-table-1.24.0.tgz",
|
||||
"integrity": "sha512-dyRf5PQwTgFHj9yjuPXa+GIf4JpuQhsgD1CJrOqhw40qI2gTb3mJfRdoBc7iF2bqzOl+k0RnbAlhSPbGe4VS+w==",
|
||||
"peerDependencies": {
|
||||
"jquery": "3"
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
"bootstrap-colorpicker": "^2.5.3",
|
||||
"bootstrap-datepicker": "^1.10.0",
|
||||
"bootstrap-less": "^3.3.8",
|
||||
"bootstrap-table": "1.23.5",
|
||||
"bootstrap-table": "1.24.0",
|
||||
"canvas-confetti": "^1.9.3",
|
||||
"chart.js": "^2.9.4",
|
||||
"clipboard": "^2.0.11",
|
||||
|
|
BIN
public/js/dist/bootstrap-table-en-US.min.js
vendored
BIN
public/js/dist/bootstrap-table-en-US.min.js
vendored
Binary file not shown.
BIN
public/js/dist/bootstrap-table-locale-all.min.js
vendored
BIN
public/js/dist/bootstrap-table-locale-all.min.js
vendored
Binary file not shown.
|
@ -43,7 +43,6 @@ class ImportTest extends TestCase
|
|||
]
|
||||
]
|
||||
]);
|
||||
\Log::error(print_r($results, true));
|
||||
$this->assertEquals($evil_string, $results->json()['files'][0]['first_row'][0]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue