mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Added new fields
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
c8279c0b99
commit
d02904c9a3
|
@ -236,6 +236,15 @@ class Importer extends Component
|
|||
'email' => trans('general.importer.checked_out_to_email'),
|
||||
'username' => trans('general.importer.checked_out_to_username'),
|
||||
'checkout_location' => trans('general.importer.checkout_location'),
|
||||
/**
|
||||
* These are here so users can import history, to replace the dinosaur that
|
||||
* was the history importer
|
||||
*/
|
||||
'last_checkin' => trans('admin/hardware/table.last_checkin_date'),
|
||||
'last_checkout' => trans('admin/hardware/table.checkout_date'),
|
||||
'expected_checkin' => trans('admin/hardware/form.expected_checkin'),
|
||||
'last_audit_date' => trans('general.last_audit'),
|
||||
'next_audit_date' => trans('general.next_audit_date'),
|
||||
];
|
||||
|
||||
$this->consumables_fields = [
|
||||
|
@ -379,6 +388,12 @@ class Importer extends Component
|
|||
'job title for user',
|
||||
'job title',
|
||||
],
|
||||
'full_name' =>
|
||||
[
|
||||
'full name',
|
||||
'fullname',
|
||||
trans('general.importer.checked_out_to_fullname')
|
||||
],
|
||||
'username' =>
|
||||
[
|
||||
'user name',
|
||||
|
@ -411,6 +426,7 @@ class Importer extends Component
|
|||
'telephone',
|
||||
'tel.',
|
||||
],
|
||||
|
||||
'serial' =>
|
||||
[
|
||||
'serial number',
|
||||
|
@ -455,6 +471,12 @@ class Importer extends Component
|
|||
[
|
||||
'Next Audit',
|
||||
],
|
||||
'last_checkout' =>
|
||||
[
|
||||
'Last Checkout',
|
||||
'Last Checkout Date',
|
||||
'Checkout Date',
|
||||
],
|
||||
'address2' =>
|
||||
[
|
||||
'Address 2',
|
||||
|
@ -523,8 +545,8 @@ class Importer extends Component
|
|||
// TODO: why don't we just do File::find($id)? This seems dumb.
|
||||
foreach($this->files as $file) {
|
||||
Log::debug("File id is: ".$file->id);
|
||||
if($id == $file->id) {
|
||||
if(Storage::delete('private_uploads/imports/'.$file->file_path)) {
|
||||
if ($id == $file->id) {
|
||||
if (Storage::delete('private_uploads/imports/'.$file->file_path)) {
|
||||
$file->delete();
|
||||
|
||||
$this->message = trans('admin/hardware/message.import.file_delete_success');
|
||||
|
|
Loading…
Reference in a new issue