Skip to content

Commit

Permalink
chore: revert to feat architecture (#49)
Browse files Browse the repository at this point in the history
* chore: revert to feat architecture

* chore: revert to feat architecture
  • Loading branch information
eugbyte authored Oct 12, 2024
1 parent 218e40b commit eec79cf
Show file tree
Hide file tree
Showing 56 changed files with 30 additions and 48 deletions.
4 changes: 2 additions & 2 deletions src/storeonwheels.client/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Component, OnDestroy, OnInit } from "@angular/core";
import { FooterNavComponent } from "./libs/shared-module";
import { FooterNavComponent } from "~/app/shared/components";
import { RouterModule } from "@angular/router";
import {
HUB_CONNECTION,
MessageHubService,
hubConnection,
} from "./libs/map-module";
} from "~/app/shared/services";
import { ReactiveFormsModule } from "@angular/forms";

@Component({
Expand Down

This file was deleted.

2 changes: 0 additions & 2 deletions src/storeonwheels.client/src/app/libs/map-module/index.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/storeonwheels.client/src/app/libs/shared-module/index.ts

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ComponentFixture, TestBed } from "@angular/core/testing";
import BroadcastPageComponent from "./broadcast-page.component";
import axios from "axios";
import { HUB_CONNECTION, hubConnection } from "~/app/libs/map-module";
import { HUB_CONNECTION, hubConnection } from "~/app/shared/services";
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";

describe("BroadcastPageComponent", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,15 @@ import { Observable } from "rxjs";
import {
GeoPermissionInstructionComponent,
VendorFormComponent,
GeoPermission,
GeolocateService,
VendorService,
} from "~/app/libs/broadcast-module";
} from "./components";
import { GeoPermission, GeolocateService, VendorService } from "./services";
import {
MessageHubService,
SleepService,
WsState,
hubConnection,
} from "~/app/libs/map-module";
import {
GeoInfo,
Vendor,
VendorForm,
SleepService,
} from "~/app/libs/shared-module";
} from "~/app/shared/services";
import { GeoInfo, Vendor, VendorForm } from "~/app/shared/models";
import { toSignal } from "@angular/core/rxjs-interop";

@Component({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { CommonModule } from "@angular/common";
import { Component, Input } from "@angular/core";
import { MatButtonModule } from "@angular/material/button";
import { MatInputModule } from "@angular/material/input";
import { GeoPermission } from "~/app/libs/broadcast-module/services";
import { GeoPermission } from "~/app/pages/broadcast-page/services";

@Component({
selector: "app-geo-permission-instruction",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from "@angular/core/testing";
import { VendorFormComponent } from "./vendor-form.component";
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
import { VendorForm } from "~/app/libs/shared-module";
import { VendorForm } from "~/app/shared/models";
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";

describe("VendorFormComponent", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, Input, OnChanges, output } from "@angular/core";
import { VendorForm } from "~/app/libs/shared-module";
import { VendorForm } from "~/app/shared/models";
import { FormControl, FormGroup, ReactiveFormsModule } from "@angular/forms";
import { MatFormFieldModule } from "@angular/material/form-field";
import { MatInputModule } from "@angular/material/input";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ export class BaseGeolocateService {
throw new Error("browser does not supprt geolocation");
}

console.log({ enableHighAccuracy, timeout, maximumAge });

const promise = new Promise<GeolocationPositionError | null>((resolve) => {
const _onSuccess = (position: GeolocationPosition) => {
onSuccess(position);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from "@angular/core";
import { Vendor } from "~/app/libs/shared-module";
import { Vendor } from "~/app/shared/models";
import axios, { AxiosError, AxiosResponse } from "axios";

@Injectable({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
HUB_CONNECTION,
MessageHubService,
hubConnection,
} from "~/app/libs/map-module";
} from "~/app/shared/services";

describe("HealthcheckComponent", () => {
let component: HealthcheckPageComponent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, OnInit } from "@angular/core";
import { HubConnectionState } from "@microsoft/signalr";
import axios from "axios";
import { MessageHubService, hubConnection } from "~/app/libs/map-module";
import { MessageHubService, hubConnection } from "~/app/shared/services";

@Component({
selector: "app-healthcheck-page",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import {
ClickProps,
clickSubject as _clickSubject,
timedMapFactory,
} from "~/app/libs/map-module/services";
import { GeoInfo } from "~/app/libs/shared-module";
} from "~/app/pages/map-page/services";
import { GeoInfo } from "~/app/shared/models";
import { LngLat, Marker, Popup } from "mapbox-gl";
import { BehaviorSubject, Observable } from "rxjs";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ComponentFixture, TestBed } from "@angular/core/testing";
import { VendorTableComponent } from "./vendor-table.component";
import { Vendor } from "~/app/libs/shared-module";
import { Vendor } from "~/app/shared/models";
import { Observable, from } from "rxjs";

describe("VendorTableComponent", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import {
WritableSignal,
signal,
} from "@angular/core";
import { Vendor } from "~/app/libs/shared-module";
import { Vendor } from "~/app/shared/models";
import {
TimedMap,
CLICK_SUBJECT,
ClickProps,
clickSubject as _clickSubject,
timedMapFactory,
} from "~/app/libs/map-module/services";
} from "~/app/pages/map-page/services";
import { CommonModule } from "@angular/common";
import { BehaviorSubject, Observable } from "rxjs";
import { MatRow, MatTableModule } from "@angular/material/table";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import {
HUB_CONNECTION,
MessageHubService,
hubConnection,
VendorTableComponent,
} from "~/app/libs/map-module";
import { GeoInfo, Vendor } from "~/app/libs/shared-module";
} from "~/app/shared/services";
import { GeoInfo, Vendor } from "~/app/shared/models";
import { Observable, from } from "rxjs";
import { Mock } from "ts-mocks";
import { VendorTableComponent } from "./components";

describe("MapPageComponent", () => {
let component: MapPageComponent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import { CommonModule } from "@angular/common";
import { Component, OnInit } from "@angular/core";
import {
MapComponent,
VendorTableComponent,
MessageHubService,
} from "~/app/libs/map-module";
import { GeoInfo, Vendor } from "~/app/libs/shared-module";
import { MapComponent, VendorTableComponent } from "./components";
import { MessageHubService } from "~/app/shared/services";
import { GeoInfo, Vendor } from "~/app/shared/models";
import { Observable, map } from "rxjs";

@Component({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export * from "./message-hub/message-hub.service";
export * from "./message-hub/message-hub.provider";
export * from "./mapbox/mapbox.service";
export * from "./mapbox/mapbox.service.provider";
export * from "./timed-cache/ticker-cache.service";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { TestBed } from "@angular/core/testing";

import { TickerCache } from "./ticker-cache.service";
import { SleepService } from "~/app/libs/shared-module";
import { SleepService } from "~/app/shared/services";

describe("TimeoutCacheService", () => {
let cache: TickerCache<string, number>;
Expand Down
3 changes: 3 additions & 0 deletions src/storeonwheels.client/src/app/shared/services/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from "./message-hub/message-hub.service";
export * from "./message-hub/message-hub.provider";
export * from "./sleep/sleep.service";
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Inject, Injectable } from "@angular/core";
import { HubConnection, HubConnectionState } from "@microsoft/signalr";
import { GeoInfo } from "~/app/libs/shared-module";
import { GeoInfo } from "~/app/shared/models";
import { BehaviorSubject, Observable, Subject } from "rxjs";
import { HUB_CONNECTION, WsState } from "./message-hub.provider";

Expand Down

0 comments on commit eec79cf

Please sign in to comment.