mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Merge pull request #10883 from inietov/fixes/update_existing_value_import_develop
Fixes Importer always update existing values develop
This commit is contained in:
commit
8195a664a9
|
@ -60,8 +60,8 @@ class ItemImportRequest extends FormRequest
|
|||
}
|
||||
$importer->setCallbacks([$this, 'log'], [$this, 'progress'], [$this, 'errorCallback'])
|
||||
->setUserId(Auth::id())
|
||||
->setUpdating($this->has('import-update'))
|
||||
->setShouldNotify($this->has('send-welcome'))
|
||||
->setUpdating($this->get('import-update'))
|
||||
->setShouldNotify($this->get('send-welcome'))
|
||||
->setUsernameFormat('firstname.lastname')
|
||||
->setFieldMappings($fieldMappings);
|
||||
$importer->import();
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<label for="import-update">Update Existing Values?:</label>
|
||||
</div>
|
||||
<div class="col-md-7 col-xs-12">
|
||||
<input type="checkbox" class="iCheck minimal" name="import-update" v-model="options.update">
|
||||
<input type="checkbox" class="icheckbox_minimal" name="import-update" v-model="options.update">
|
||||
</div>
|
||||
</div><!-- /dynamic-form-row -->
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
<label for="send-welcome">Send Welcome Email for new Users?</label>
|
||||
</div>
|
||||
<div class="col-md-7 col-xs-12">
|
||||
<input type="checkbox" class="minimal" name="send-welcome" v-model="options.send_welcome">
|
||||
<input type="checkbox" class="icheckbox_minimal" name="send-welcome" v-model="options.send_welcome">
|
||||
</div>
|
||||
</div><!-- /dynamic-form-row -->
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
|||
<label for="run-backup">Backup before importing?</label>
|
||||
</div>
|
||||
<div class="col-md-7 col-xs-12">
|
||||
<input type="checkbox" class="minimal" name="run-backup" v-model="options.run_backup">
|
||||
<input type="checkbox" class="icheckbox_minimal" name="run-backup" v-model="options.run_backup">
|
||||
</div>
|
||||
</div><!-- /dynamic-form-row -->
|
||||
|
||||
|
@ -112,6 +112,8 @@
|
|||
options: {
|
||||
importType: this.file.import_type,
|
||||
update: false,
|
||||
send_welcome: false,
|
||||
run_backup: false,
|
||||
importTypes: [
|
||||
{ id: 'asset', text: 'Assets' },
|
||||
{ id: 'accessory', text: 'Accessories' },
|
||||
|
|
Loading…
Reference in a new issue