Merge branch 'Development' of https://code-repo.d4science.org/MaDgiK-CITE/argos into Development
This commit is contained in:
commit
59cba483b6
|
@ -1355,7 +1355,8 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
|
|||
}
|
||||
|
||||
reloadDateset(datasetId: string) {
|
||||
this.router.navigate(['/datasets', 'edit', datasetId]);
|
||||
let url = this.router.createUrlTree(['/datasets', 'edit', datasetId]).toString();
|
||||
this.location.go(url);
|
||||
}
|
||||
|
||||
backToDmp(id: string) {
|
||||
|
|
|
@ -48,7 +48,7 @@ export class FormProgressIndicationComponent extends BaseComponent implements On
|
|||
this.total = this.countFormControlsRequiredFieldsForTotal(this.formGroup);
|
||||
} else if (this.isDatasetEditor) {
|
||||
this.progressSoFar = this.countFormControlsValidForProgress(this.formGroup) + this.countFormControlsWithValueForProgress(this.formGroup);
|
||||
this.total = this.countFormControlsRequiredFieldsForTotal(this.formGroup) + this.CountFormControlDepthLengthFotTotal(this.formGroup);
|
||||
this.total = this.countFormControlsRequiredFieldsForTotal(this.formGroup, true) + this.CountFormControlDepthLengthFotTotal(this.formGroup);
|
||||
} else {
|
||||
this.progressSoFar = this.countFormControlsWithValueForProgress(this.formGroup);
|
||||
this.total = this.CountFormControlDepthLengthFotTotal(this.formGroup);
|
||||
|
@ -169,14 +169,14 @@ export class FormProgressIndicationComponent extends BaseComponent implements On
|
|||
return valueCurrent;
|
||||
}
|
||||
|
||||
countFormControlsRequiredFieldsForTotal(formControl: AbstractControl): number {
|
||||
countFormControlsRequiredFieldsForTotal(formControl: AbstractControl, checkVisibility = false): number {
|
||||
let valueCurrent = 0;
|
||||
if (formControl instanceof FormControl) {
|
||||
if (this.controlRequired(formControl) && this.controlEnabled(formControl)) {
|
||||
valueCurrent++;
|
||||
}
|
||||
} else if (formControl instanceof FormGroup) {
|
||||
if(!formControl.get('id')?.value || this.visibilityRulesService.checkElementVisibility(formControl.get('id').value)) {
|
||||
if(!checkVisibility || (!formControl.get('id')?.value || this.visibilityRulesService.checkElementVisibility(formControl.get('id').value))) {
|
||||
Object.keys(formControl.controls).forEach(item => {
|
||||
const control = formControl.get(item);
|
||||
valueCurrent = valueCurrent + this.countFormControlsRequiredFieldsForTotal(control);
|
||||
|
|
|
@ -57,6 +57,7 @@ export class TableOfContents extends BaseComponent implements OnInit, OnChanges
|
|||
@Input() selectedFieldsetId:string;
|
||||
|
||||
private _tocentrySelected:ToCEntry = null;
|
||||
private isSelecting: boolean = false;
|
||||
private _intersectionObserver: IntersectionObserver;
|
||||
private _actOnObservation: boolean = true;
|
||||
public hiddenEntries:string[] = [];
|
||||
|
@ -442,8 +443,14 @@ export class TableOfContents extends BaseComponent implements OnInit, OnChanges
|
|||
}
|
||||
|
||||
onToCentrySelected(entry: ToCEntry = null, execute: boolean = true){
|
||||
this.tocentrySelected = entry;
|
||||
this.entrySelected.emit({entry: entry, execute: execute});
|
||||
if(!this.isSelecting) {
|
||||
this.isSelecting = true;
|
||||
this.tocentrySelected = entry;
|
||||
this.entrySelected.emit({entry: entry, execute: execute});
|
||||
setTimeout(() => {
|
||||
this.isSelecting = false;
|
||||
}, 200);
|
||||
}
|
||||
}
|
||||
|
||||
private _findTocEntryById(id: string, tocentries: ToCEntry[]): ToCEntry{
|
||||
|
@ -496,6 +503,7 @@ export class TableOfContents extends BaseComponent implements OnInit, OnChanges
|
|||
return this.tocentries.some(e => this.internalTable.invalidChildsVisible(e));
|
||||
}
|
||||
|
||||
protected readonly console = console;
|
||||
}
|
||||
|
||||
export interface LinkToScroll {
|
||||
|
|
Loading…
Reference in New Issue