Skip to content

Commit

Permalink
adds the rest of the fields for Remote
Browse files Browse the repository at this point in the history
  • Loading branch information
Godmartinz committed Dec 6, 2022
1 parent 36901d2 commit bbd04f8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions app/Importer/Importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ abstract class Importer
'manager_first_name' => 'manager first name',
'manager_last_name' => 'manager last name',
'min_amt' => 'minimum quantity',
'remote' => 'remote',
];
/**
* Map of item fields->csv names
Expand Down Expand Up @@ -288,6 +289,7 @@ protected function createOrFetchUser($row)
'department_id' => '',
'username' => $this->findCsvMatch($row, 'username'),
'activated' => $this->fetchHumanBoolean($this->findCsvMatch($row, 'activated')),
'remote' => $this->fetchHumanBoolean(($this->findCsvMatch($row, 'remote'))),
];

// Maybe we're lucky and the user already exists.
Expand Down
2 changes: 1 addition & 1 deletion app/Importer/UserImporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function createUserIfNotExists(array $row)
$this->item['employee_num'] = $this->findCsvMatch($row, 'employee_num');
$this->item['department_id'] = $this->createOrFetchDepartment($this->findCsvMatch($row, 'department'));
$this->item['manager_id'] = $this->fetchManager($this->findCsvMatch($row, 'manager_first_name'), $this->findCsvMatch($row, 'manager_last_name'));
$this->item['remote'] = $this->findCsvMatch($row, 'remote');
$this->item['remote'] =($this->fetchHumanBoolean($this->findCsvMatch($row, 'remote')) ==1 ) ? '1' : 0;

$user_department = $this->findCsvMatch($row, 'department');
if ($this->shouldUpdateField($user_department)) {
Expand Down
3 changes: 3 additions & 0 deletions public/js/build/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,9 @@ var baseUrl = $('meta[name="baseUrl"]').attr('content');
}, {
id: 'zip',
text: 'ZIP'
}, {
id: 'remote',
text: 'Remote'
}],
customFields: this.customFields
},
Expand Down
3 changes: 3 additions & 0 deletions public/js/dist/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -59555,6 +59555,9 @@ var baseUrl = $('meta[name="baseUrl"]').attr('content');
}, {
id: 'zip',
text: 'ZIP'
}, {
id: 'remote',
text: 'Remote'
}],
customFields: this.customFields
},
Expand Down
4 changes: 2 additions & 2 deletions public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"/js/build/app.js": "/js/build/app.js?id=598b7e88aba2349085422a0986bf1d9e",
"/js/build/app.js": "/js/build/app.js?id=f05cc05b9000ba73e1949bcf137d4301",
"/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=f677207c6cf9678eb539abecb408c374",
"/css/build/overrides.css": "/css/build/overrides.css?id=f3e3228f6820fe6e5c520627f796af35",
"/css/build/app.css": "/css/build/app.css?id=2a56df3a1a81da8eb5d8893e076620b5",
Expand Down Expand Up @@ -34,7 +34,7 @@
"/css/dist/bootstrap-table.css": "/css/dist/bootstrap-table.css?id=ee4896df8b8f008ce73a9a0c2549aefd",
"/js/build/vendor.js": "/js/build/vendor.js?id=47ecbb4bb3b0e02315f391caadbdf971",
"/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=14d9a2affec7b066d20fcba2e6e67ad2",
"/js/dist/all.js": "/js/dist/all.js?id=c281e69bed1a5a386e8cbc611b9bf781",
"/js/dist/all.js": "/js/dist/all.js?id=4f9355ac85d380301f6f62e55b1a6e5e",
"/css/dist/skins/skin-green.min.css": "/css/dist/skins/skin-green.min.css?id=0a82a6ae6bb4e58fe62d162c4fb50397",
"/css/dist/skins/skin-green-dark.min.css": "/css/dist/skins/skin-green-dark.min.css?id=c0d21166315b7c2cdd4819fa4a5e4d1e",
"/css/dist/skins/skin-black.min.css": "/css/dist/skins/skin-black.min.css?id=76482123f6c70e866d6b971ba91de7bb",
Expand Down

0 comments on commit bbd04f8

Please sign in to comment.