Open LaraMerdol opened 9 months ago
The new structure of the custom folder:
/src
|-- app
| |-- custom
| | |-- analyses
| | |-- assets
| | |-- customization-service
| | |-- config
| | |-- database-tab
| | |-- map-tab
| | |-- object-tab
| | |-- customization.module.ts
Developers should add each component to the customization.module.ts after adding them.
For the analysis components inside the analyses folder collect the helper methods that are same for the each query component to one file called query-helper.ts
Developer guide for the developers; https://docs.google.com/document/d/1dIasoHNoGYy6klZOnmUMzOE7RvM-fN7DOcEf7w9jS70/edit?usp=sharing
Adding query component interface and modifying all analysis components as they implement that interface.
import { TableViewInput, TableFiltering, TableData } from '../../shared/table-view/table-view-types';
import { Subject } from 'rxjs';
import { GraphResponse } from 'src/app/visuall/db-service/data-types';
export interface QueryComponent<T> {
tableInput: TableViewInput;
tableFilled: Subject<boolean>;
tableResponse: T;
graphResponse: GraphResponse;
clearTableFilter: Subject<boolean>;
ngOnInit(): void;
prepareQuery(): void;
loadTable(skip: number, filter?: TableFiltering): void;
loadGraph(skip: number, filter?: TableFiltering): void;
filterGraphResponse(x: GraphResponse): GraphResponse;
fillTable(data: T[], totalDataCount: number | null): void;
getDataForQueryResult(e: any): void;
filterTable(filter: TableFiltering): void;
filterTableResponse(x: T[], filter: TableFiltering): T[];
}
The structure of the custom folder changed as;
/src
|-- app
| |-- custom
| | |-- analyses
| | |-- customization-service
| | |-- config
| | |-- operational-tabs
| | |-- customization.module.ts
For easier integration of new analyses into our project, we should restructure the repository to allow other developers to easily integrate their work.