Skip to content

A free open source IT asset/license management system

Added new fields

sniped02904c9a3ed
diff --git a/app/Http/Livewire/Importer.php b/app/Http/Livewire/Importer.php
index 929844e3b7..72e751502f 100644
--- a/app/Http/Livewire/Importer.php
+++ b/app/Http/Livewire/Importer.php
@@ -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');