Skip to content

Commit

Permalink
code style
Browse files Browse the repository at this point in the history
  • Loading branch information
lsteinmann committed Jun 28, 2024
1 parent 33ee79a commit 61165c7
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ export class ConvertFieldDataModalComponent {

this.countAffected = findResult.totalCount;
this.affectedDocuments = findResult.documents.filter(document => this.isConvertible(document));

}

public getFieldLabelHTML(): string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export class DeleteFieldDataModalComponent {

this.countAffected = findResult.totalCount;
this.affectedDocuments = findResult.documents;

}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@ export class DeleteOutliersModalComponent {

public async initialize() {

this.foundDocuments = await this.datastore.find({
this.foundDocuments = (await this.datastore.find({
constraints: { ['outlierValues:contain']: this.outlierValue }
}, { includeResourcesWithoutValidParent: true }).then(res => res.documents);
}, { includeResourcesWithoutValidParent: true })).documents;
this.documentsToDelete = [];

}


Expand All @@ -60,6 +59,7 @@ export class DeleteOutliersModalComponent {
}

public async prepareDeleteAll() {

this.deleteAll = !this.deleteAll;

this.documentsToDelete = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,16 @@ export class DeleteResourceModalComponent {

public async initialize() {

const foundDocuments: Array<Document> = await this.datastore.find(
const foundDocuments: Array<Document> = (await this.datastore.find(
{ categories: ['UNCONFIGURED'] },
{ includeResourcesWithoutValidParent: true }
).then(res => res.documents);
)).documents;

this.affectedDocuments = foundDocuments.filter(document => {
return document.resource.category === this.document.resource.category;
});

this.countAffected = this.affectedDocuments.length;

}

public isDeletionAllowed(): boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Component } from '@angular/core';
import { NgbActiveModal, NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
import { equal, flatten, isArray, isObject, isString, set, Map } from 'tsfun';
import { CategoryForm, Datastore, Dimension, Document, Field, Hierarchy, Labels, OptionalRange, ProjectConfiguration,
Valuelist, ValuelistUtil, BaseField} from 'idai-field-core';
Valuelist, ValuelistUtil, BaseField } from 'idai-field-core';
import { FixingDataInProgressModalComponent } from './fixing-data-in-progress-modal.component';
import { AngularUtility } from '../../../../angular/angular-utility';

Expand Down Expand Up @@ -56,9 +56,9 @@ export class FixOutliersModalComponent {

this.projectDocument = await this.datastore.get('project');
this.valuelist = await this.getValuelist(this.document, this.field);
this.foundDocuments = await this.datastore.find({
this.foundDocuments = (await this.datastore.find({
constraints: { ['outlierValues:contain']: this.outlierValue }
}, { includeResourcesWithoutValidParent: true }).then(res => res.documents);
}, { includeResourcesWithoutValidParent: true })).documents;
this.documentsToChange = [];
}

Expand All @@ -69,6 +69,7 @@ export class FixOutliersModalComponent {
}

public async prepareReplaceAll() {

this.replaceAll = !this.replaceAll;

this.documentsToChange = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ export class SelectNewCategoryModalComponent {

public async initialize() {

const foundDocuments: Array<Document> = await this.datastore.find(
const foundDocuments: Array<Document> = (await this.datastore.find(
{ categories: ['UNCONFIGURED'] },
{ includeResourcesWithoutValidParent: true }
).then(res => res.documents);
)).documents;

this.affectedDocuments = foundDocuments.filter(document => {
return document.resource.category === this.document.resource.category;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export class SelectNewFieldModalComponent {

this.countAffected = findResult.totalCount;
this.affectedDocuments = findResult.documents;

}


Expand Down

0 comments on commit 61165c7

Please sign in to comment.