Skip to content

Commit

Permalink
Moved diff services to respective folder
Browse files Browse the repository at this point in the history
  • Loading branch information
jirkapok committed Mar 22, 2024
1 parent c07f907 commit bfe3fcb
Show file tree
Hide file tree
Showing 21 changed files with 85 additions and 87 deletions.
5 changes: 3 additions & 2 deletions projects/planner/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ import {DiveResultsDifferenceComponent} from './diff/diveresults/diff-diveresult
import {ProfileDifferenceChartComponent} from './diff/profilechart/diff-profilechart.component';
import {SurfaceIntervalComponent} from './surface-interval/surface-interval.component';
import {TestDataInjector} from './diff/testData/testDataInjector';
import {ProfileComparatorService} from './shared/profileComparatorService';
import {LoadTestDataComponent} from './diff/testData/loadtestdata/loadtestdata.component';
import {DiveResultsTableDifferenceComponent} from './diff/diveresults/table/diff-diveresults-table.component';
import { GasBlenderComponent } from './gas-blender/gas-blender.component';
Expand All @@ -100,7 +99,9 @@ import {GasConsumedDifferenceComponent} from './diff/gasconsumed/diff-gas-consum
import {
GasConsumedDifferenceTankComponent
} from './diff/gasconsumed/diff-gas-consumed/tank-chart/diff-gas-consumed-tank-chart.component';
import { GasesComparisonService } from './shared/gases-comparison.service';

import { ProfileComparatorService } from './shared/diff/profileComparatorService';
import { GasesComparisonService } from './shared/diff/gases-comparison.service';

const ANGULAR_MODULES = [
AppRoutingModule,
Expand Down
13 changes: 6 additions & 7 deletions projects/planner/src/app/diff/diff.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import {ComponentFixture, TestBed} from '@angular/core/testing';

import {DiffComponent} from './diff.component';
import {ProfileComparatorService} from '../shared/profileComparatorService';
import {DiveSchedules} from '../shared/dive.schedules';
import {UnitConversion} from '../shared/UnitConversion';
import {ReloadDispatcher} from '../shared/reloadDispatcher';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { DiffComponent } from './diff.component';
import { ProfileComparatorService } from '../shared/diff/profileComparatorService';
import { DiveSchedules } from '../shared/dive.schedules';
import { UnitConversion } from '../shared/UnitConversion';
import { ReloadDispatcher } from '../shared/reloadDispatcher';

describe('DiffComponent', () => {
let component: DiffComponent;
Expand Down
4 changes: 2 additions & 2 deletions projects/planner/src/app/diff/diff.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Component} from '@angular/core';
import {ProfileComparatorService} from '../shared/profileComparatorService';
import { Component } from '@angular/core';
import { ProfileComparatorService } from '../shared/diff/profileComparatorService';

@Component({
selector: 'app-diff',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import {ComponentFixture, TestBed} from '@angular/core/testing';

import {DiveResultsTableDifferenceComponent} from './diff-diveresults-table.component';
import {ViewSwitchService} from '../../../shared/viewSwitchService';
import {DiveSchedules} from '../../../shared/dive.schedules';
import {ReloadDispatcher} from '../../../shared/reloadDispatcher';
import {UnitConversion} from '../../../shared/UnitConversion';
import {ProfileComparatorService} from '../../../shared/profileComparatorService';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { DiveResultsTableDifferenceComponent } from './diff-diveresults-table.component';
import { ViewSwitchService } from '../../../shared/viewSwitchService';
import { DiveSchedules } from '../../../shared/dive.schedules';
import { ReloadDispatcher } from '../../../shared/reloadDispatcher';
import { UnitConversion } from '../../../shared/UnitConversion';
import { ProfileComparatorService } from '../../../shared/diff/profileComparatorService';

describe('DiveResultsTableDifferenceComponent', () => {
let component: DiveResultsTableDifferenceComponent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component } from '@angular/core';
import { ViewSwitchService } from '../../../shared/viewSwitchService';
import { UnitConversion } from '../../../shared/UnitConversion';
import { ProfileComparatorService } from '../../../shared/profileComparatorService';
import { ProfileComparatorService } from '../../../shared/diff/profileComparatorService';
import { DiveResults } from '../../../shared/diveresults';
import { formatNumber } from '@angular/common';
import { faArrowDown, faArrowUp, faMinus, IconDefinition } from '@fortawesome/free-solid-svg-icons';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { GasConsumedDifferenceComponent } from './diff-gas-consumed.component';
import { ProfileComparatorService } from '../../../shared/profileComparatorService';
import { ProfileComparatorService } from '../../../shared/diff/profileComparatorService';
import { DiveSchedules } from '../../../shared/dive.schedules';
import { UnitConversion } from '../../../shared/UnitConversion';
import { ReloadDispatcher } from '../../../shared/reloadDispatcher';
import { GasesComparisonService } from '../../../shared/gases-comparison.service';
import { GasesComparisonService } from '../../../shared/diff/gases-comparison.service';

describe('DiffGasConsumedComponent', () => {
let component: GasConsumedDifferenceComponent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Component } from '@angular/core';
import { faSlidersH } from '@fortawesome/free-solid-svg-icons';
import { GasesComparisonService, IMixedTanksForComparison } from '../../../shared/gases-comparison.service';
import { GasesComparisonService, IMixedTanksForComparison } from '../../../shared/diff/gases-comparison.service';

@Component({
selector: 'app-diff-gas-consumed',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { GasConsumedDifferenceTankComponent } from './diff-gas-consumed-tank-chart.component';
import {UnitConversion} from '../../../../shared/UnitConversion';
import {ProfileComparatorService} from '../../../../shared/profileComparatorService';
import {DiveSchedules} from '../../../../shared/dive.schedules';
import {ReloadDispatcher} from '../../../../shared/reloadDispatcher';
import { UnitConversion } from '../../../../shared/UnitConversion';
import { ProfileComparatorService } from '../../../../shared/diff/profileComparatorService';
import { DiveSchedules } from '../../../../shared/dive.schedules';
import { ReloadDispatcher } from '../../../../shared/reloadDispatcher';

describe('GasConsumedDifferenceTankComponent', () => {
let component: GasConsumedDifferenceTankComponent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {Component, Input, OnChanges, SimpleChanges} from '@angular/core';
import {UnitConversion} from '../../../../shared/UnitConversion';
import {IConsumedMix, StandardGases} from 'scuba-physics';
import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';
import { UnitConversion } from '../../../../shared/UnitConversion';
import { IConsumedMix, StandardGases } from 'scuba-physics';
import { faArrowLeft, faArrowRight, faMinus } from '@fortawesome/free-solid-svg-icons';
import {ProfileComparatorService} from '../../../../shared/profileComparatorService';
import { ProfileComparatorService } from '../../../../shared/diff/profileComparatorService';

@Component({
selector: 'app-diff-gas-consumed-tank-chart',
Expand Down Expand Up @@ -110,5 +110,6 @@ export class GasConsumedDifferenceTankComponent implements OnChanges{
}
}

// TODO why Math?
protected readonly Math = Math;
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { ProfileDifferenceChartComponent } from './diff-profilechart.component';
import {UnitConversion} from '../../shared/UnitConversion';
import {ResamplingService} from '../../shared/ResamplingService';
import {ProfileComparatorService} from '../../shared/profileComparatorService';
import {SelectedWaypoint} from '../../shared/selectedwaypointService';
import {DiveSchedules} from '../../shared/dive.schedules';
import {ReloadDispatcher} from '../../shared/reloadDispatcher';
import { UnitConversion } from '../../shared/UnitConversion';
import { ResamplingService } from '../../shared/ResamplingService';
import { ProfileComparatorService } from '../../shared/diff/profileComparatorService';
import { SelectedWaypoint } from '../../shared/selectedwaypointService';
import { DiveSchedules } from '../../shared/dive.schedules';
import { ReloadDispatcher } from '../../shared/reloadDispatcher';

describe('ProfileDifferenceChartComponent', () => {
let component: ProfileDifferenceChartComponent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import {Component, OnInit} from '@angular/core';
import {faChartArea} from '@fortawesome/free-solid-svg-icons';
import {ResamplingService} from '../../shared/ResamplingService';
import {UnitConversion} from '../../shared/UnitConversion';
import {SelectedWaypoint} from '../../shared/selectedwaypointService';
import {DiveResults} from '../../shared/diveresults';
import {WayPoint} from '../../shared/models';
import {DateFormats} from '../../shared/formaters';
import { Component, OnInit } from '@angular/core';
import { faChartArea } from '@fortawesome/free-solid-svg-icons';
import { ResamplingService } from '../../shared/ResamplingService';
import { UnitConversion } from '../../shared/UnitConversion';
import { SelectedWaypoint } from '../../shared/selectedwaypointService';
import { DiveResults } from '../../shared/diveresults';
import { WayPoint } from '../../shared/models';
import { DateFormats } from '../../shared/formaters';
import * as Plotly from 'plotly.js-basic-dist';
import {Streamed} from '../../shared/streamed';
import {ChartPlotter, ChartPlotterFactory} from '../../shared/chartPlotter';
import {ProfileComparatorService} from '../../shared/profileComparatorService';
import { Streamed } from '../../shared/streamed';
import { ChartPlotter, ChartPlotterFactory } from '../../shared/chartPlotter';
import { ProfileComparatorService } from '../../shared/diff/profileComparatorService';

@Component({
selector: 'app-diff-profilechart',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { DiffTabsButtonComponent } from './diff-tabs-button.component';
import {ProfileComparatorService} from '../../../shared/profileComparatorService';
import {DiveSchedules} from '../../../shared/dive.schedules';
import {UnitConversion} from '../../../shared/UnitConversion';
import {ReloadDispatcher} from '../../../shared/reloadDispatcher';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import { ProfileComparatorService } from '../../../shared/diff/profileComparatorService';
import { DiveSchedules } from '../../../shared/dive.schedules';
import { UnitConversion } from '../../../shared/UnitConversion';
import { ReloadDispatcher } from '../../../shared/reloadDispatcher';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

describe('DiffTabsButtonComponent', () => {
let component: DiffTabsButtonComponent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Component, Input } from '@angular/core';
import {
animate, keyframes, state, style, transition, trigger
} from '@angular/animations';
import { ProfileComparatorService } from '../../../shared/profileComparatorService';
import { ProfileComparatorService } from '../../../shared/diff/profileComparatorService';

@Component({
selector: 'app-diff-tabs-button',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import {ComponentFixture, TestBed} from '@angular/core/testing';
import { ComponentFixture, TestBed } from '@angular/core/testing';

import {LoadTestDataComponent} from './loadtestdata.component';
import {ProfileComparatorService} from '../../../shared/profileComparatorService';
import {TestDataInjector} from '../testDataInjector';
import {PreferencesStore} from '../../../shared/preferencesStore';
import {Preferences} from '../../../shared/preferences';
import {ViewSwitchService} from '../../../shared/viewSwitchService';
import {DiveSchedules} from '../../../shared/dive.schedules';
import {UnitConversion} from '../../../shared/UnitConversion';
import {ReloadDispatcher} from '../../../shared/reloadDispatcher';
import {ViewStates} from '../../../shared/viewStates';
import {PlannerService} from '../../../shared/planner.service';
import {WorkersFactoryCommon} from '../../../shared/serial.workers.factory';
import { LoadTestDataComponent } from './loadtestdata.component';
import { ProfileComparatorService } from '../../../shared/diff/profileComparatorService';
import { TestDataInjector } from '../testDataInjector';
import { PreferencesStore } from '../../../shared/preferencesStore';
import { Preferences } from '../../../shared/preferences';
import { ViewSwitchService } from '../../../shared/viewSwitchService';
import { DiveSchedules } from '../../../shared/dive.schedules';
import { UnitConversion } from '../../../shared/UnitConversion';
import { ReloadDispatcher } from '../../../shared/reloadDispatcher';
import { ViewStates } from '../../../shared/viewStates';
import { PlannerService } from '../../../shared/planner.service';
import { WorkersFactoryCommon } from '../../../shared/serial.workers.factory';

describe('LoadTestDataComponent', () => {
let component: LoadTestDataComponent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {WaypointsDifferenceComponent} from './diff-waypoints.component';
import {UnitConversion} from '../../shared/UnitConversion';
import {ProfileComparatorService} from '../../shared/profileComparatorService';
import {ProfileComparatorService} from '../../shared/diff/profileComparatorService';
import {DiveSchedules} from '../../shared/dive.schedules';
import {ReloadDispatcher} from '../../shared/reloadDispatcher';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component } from '@angular/core';
import { faTasks } from '@fortawesome/free-solid-svg-icons';
import { UnitConversion } from '../../shared/UnitConversion';
import { ProfileComparatorService } from '../../shared/profileComparatorService';
import { ProfileComparatorService } from '../../shared/diff/profileComparatorService';

@Component({
selector: 'app-diff-waypoints',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { TestBed } from '@angular/core/testing';
import { ProfileComparatorService } from './profileComparatorService';
import { DiveSchedules } from './dive.schedules';
import { UnitConversion } from './UnitConversion';
import { ReloadDispatcher } from './reloadDispatcher';
import { DiveSchedules } from '../dive.schedules';
import { UnitConversion } from '../UnitConversion';
import { ReloadDispatcher } from '../reloadDispatcher';
import { GasesComparisonService } from './gases-comparison.service';

describe('GasesComparisonService', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Injectable } from '@angular/core';
import { DiveSchedule, DiveSchedules } from './dive.schedules';
import { DiveResults } from './diveresults';
import { DiveSchedule, DiveSchedules } from '../dive.schedules';
import { DiveResults } from '../diveresults';
import { BehaviorSubject, Observable } from 'rxjs';
import { ConsumptionByMix, IConsumedMix } from 'scuba-physics';
import { ComparedWaypoint } from './ComparedWaypoint';
import { WayPoint } from './models';
import { ComparedWaypoint } from '../ComparedWaypoint';
import { WayPoint } from '../models';

@Injectable()
export class ProfileComparatorService {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { TestBed } from '@angular/core/testing';
import { ProfileComparatorService } from './profileComparatorService';
import { DiveSchedules } from './dive.schedules';
import { UnitConversion } from './UnitConversion';
import { ReloadDispatcher } from './reloadDispatcher';
import { WayPointsService } from './waypoints.service';
import { DiveSchedules } from '../dive.schedules';
import { UnitConversion } from '../UnitConversion';
import { ReloadDispatcher } from '../reloadDispatcher';
import { WayPointsService } from '../waypoints.service';
import { Segment, StandardGases } from 'scuba-physics';
import { ComparedWaypoint } from './ComparedWaypoint';
import { ComparedWaypoint } from '../ComparedWaypoint';

describe('WayPoints Difference Service', () => {
let sut: ProfileComparatorService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { inject, TestBed } from '@angular/core/testing';
import { DiveSchedules } from './dive.schedules';
import { DiveSchedules } from '../dive.schedules';
import { ProfileComparatorService } from './profileComparatorService';
import { ReloadDispatcher } from './reloadDispatcher';
import { UnitConversion } from './UnitConversion';
import { WayPoint } from './models';
import { ReloadDispatcher } from '../reloadDispatcher';
import { UnitConversion } from '../UnitConversion';
import { WayPoint } from '../models';
import { ConsumptionByMix, IConsumedMix, Segment, StandardGases, Tank } from 'scuba-physics';

describe('ProfileComparison service', () => {
Expand Down

0 comments on commit bfe3fcb

Please sign in to comment.