-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
25 changed files
with
799 additions
and
382 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...import_process/fields-mapping-step/field-mapping-modal/field-mapping-modal.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
<p>field-mapping-modal works!</p> | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 44 additions & 2 deletions
46
...s/import_process/fields-mapping-step/field-mapping-modal/field-mapping-modal.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,52 @@ | ||
import { Component } from '@angular/core'; | ||
import { Component, Input, ViewChild } from '@angular/core'; | ||
import { FieldMappingService } from '@geonature/modules/imports/services/mappings/field-mapping.service'; | ||
import { ConfigService } from '@geonature/services/config.service'; | ||
import { ImportProcessService } from '../../import-process.service'; | ||
import { ImportDataService } from '@geonature/modules/imports/services/data.service'; | ||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; | ||
import { FormControl } from '@angular/forms'; | ||
|
||
@Component({ | ||
selector: 'pnx-field-mapping-modal', | ||
templateUrl: './field-mapping-modal.component.html', | ||
styleUrls: ['./field-mapping-modal.component.scss'] | ||
styleUrls: ['./field-mapping-modal.component.scss'], | ||
}) | ||
export class FieldMappingModalComponent { | ||
@Input() updateAvailable: boolean; | ||
@ViewChild('saveMappingModal') saveMappingModal; | ||
|
||
public modalCreateMappingForm = new FormControl(''); | ||
constructor( | ||
private _fm: FieldMappingService, | ||
private config: ConfigService, | ||
private _importProcessService: ImportProcessService, | ||
private _importDataService: ImportDataService, | ||
private _modalService: NgbModal | ||
) {} | ||
|
||
/** | ||
* Open the modal | ||
*/ | ||
open() { | ||
this._modalService.open(this.saveMappingModal, { size: 'lg' }); | ||
} | ||
|
||
updateMapping() { | ||
// this.spinner = true; | ||
let name = ''; | ||
// if (this.modalCreateMappingForm.value != this.fieldMappingForm.value.label) { | ||
// name = this.modalCreateMappingForm.value; | ||
// } | ||
// this._importDataService | ||
// .updateFieldMapping(this.fieldMappingForm.value.id, this.getFieldMappingValues(), name) | ||
// .pipe() | ||
// .subscribe( | ||
// () => { | ||
// this.processNextStep(); | ||
// }, | ||
// () => { | ||
// this.spinner = false; | ||
// } | ||
// ); | ||
} | ||
} |
Oops, something went wrong.