Skip to content

Commit 600d3d9

Browse files
committed
Lint fixes
1 parent 67413d5 commit 600d3d9

108 files changed

Lines changed: 705 additions & 909 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/@seed/api/analysis/analysis.service.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,20 @@ import { OrganizationService } from '@seed/api'
88
import { ErrorService } from '@seed/services'
99
import { SnackBarService } from 'app/core/snack-bar/snack-bar.service'
1010
import { UserService } from '../user'
11-
import type { AnalysesMessage, Analysis, AnalysisCreateData, AnalysisResponse, AnalysisServiceType, AnalysisSummary, AnalysisView, AnalysisViews, ListAnalysesResponse, ListMessagesResponse, PropertyAnalysesResponse, View } from './analysis.types'
11+
import type {
12+
AnalysesMessage,
13+
Analysis,
14+
AnalysisCreateData,
15+
AnalysisResponse,
16+
AnalysisServiceType,
17+
AnalysisSummary,
18+
AnalysisView,
19+
AnalysisViews,
20+
ListAnalysesResponse,
21+
ListMessagesResponse,
22+
PropertyAnalysesResponse,
23+
View,
24+
} from './analysis.types'
1225

1326
@Injectable({ providedIn: 'root' })
1427
export class AnalysisService {

src/@seed/api/analysis/analysis.types.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,8 @@ export type BETTERConfig = {
135135

136136
export type AnalysisConfig = BETTERConfig | Record<string, unknown>
137137

138-
export type BSyncrModelTypes = 'Simple Linear Regression' | 'Three bsyncrOptionsParameter Linear Model Cooling' | 'Three Parameter Linear Model Heating' | 'Four Parameter Linear Model'
138+
export type BSyncrModelTypes =
139+
| 'Simple Linear Regression'
140+
| 'Three bsyncrOptionsParameter Linear Model Cooling'
141+
| 'Three Parameter Linear Model Heating'
142+
| 'Four Parameter Linear Model'

src/@seed/api/column-mapping-profile/column-mapping-profile.service.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ export class ColumnMappingProfileService {
6969
map((response) => {
7070
return response.data
7171
}),
72-
tap(() => { this._snackBar.success('Profile updated successfully') }),
72+
tap(() => {
73+
this._snackBar.success('Profile updated successfully')
74+
}),
7375
catchError((error: HttpErrorResponse) => {
7476
return this._errorService.handleError(error, 'Error updating profile')
7577
}),
@@ -91,7 +93,9 @@ export class ColumnMappingProfileService {
9193
create(orgId: number, profile: ColumnMappingProfile): Observable<ColumnMappingProfileUpdateResponse> {
9294
const url = `/api/v3/column_mapping_profiles/?organization_id=${orgId}`
9395
return this._httpClient.post<ColumnMappingProfileUpdateResponse>(url, { ...profile }).pipe(
94-
tap(() => { this._snackBar.success('Profile created successfully') }),
96+
tap(() => {
97+
this._snackBar.success('Profile created successfully')
98+
}),
9599
catchError((error: HttpErrorResponse) => {
96100
return this._errorService.handleError(error, 'Error creating profile')
97101
}),

src/@seed/api/cycle/cycle.service.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,13 @@ export class CycleService {
4747

4848
getCycle(orgId: number, cycleId: number): Observable<Cycle> {
4949
const url = `/api/v3/cycles/${cycleId}?organization_id=${orgId}`
50-
return this._httpClient
51-
.get<CycleResponse>(url)
52-
.pipe(
53-
take(1),
54-
map(({ cycles }) => cycles),
55-
catchError((error: HttpErrorResponse) => {
56-
return this._errorService.handleError(error, 'Error fetching cycles')
57-
}),
58-
)
50+
return this._httpClient.get<CycleResponse>(url).pipe(
51+
take(1),
52+
map(({ cycles }) => cycles),
53+
catchError((error: HttpErrorResponse) => {
54+
return this._errorService.handleError(error, 'Error fetching cycles')
55+
}),
56+
)
5957
}
6058

6159
post({ data, orgId }): Observable<CycleResponse | null> {

src/@seed/api/data-quality/data-quality.service.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,19 @@ export class DataQualityService {
8383

8484
startDataQualityCheckForImportFile(orgId: number, importFileId: number): Observable<FullProgressResponse> {
8585
const url = `/api/v3/import_files/${importFileId}/start_data_quality_checks/?organization_id=${orgId}`
86-
return this._httpClient.post<FullProgressResponse>(url, {})
87-
.pipe(
88-
catchError((error: HttpErrorResponse) => {
89-
return this._errorService.handleError(error, 'Error starting data quality checks for import file')
90-
}),
91-
)
86+
return this._httpClient.post<FullProgressResponse>(url, {}).pipe(
87+
catchError((error: HttpErrorResponse) => {
88+
return this._errorService.handleError(error, 'Error starting data quality checks for import file')
89+
}),
90+
)
9291
}
9392

94-
startDataQualityCheckForOrg(orgId: number, property_view_ids: number[], taxlot_view_ids: number[], goal_id: number): Observable<FullProgressResponse> {
93+
startDataQualityCheckForOrg(
94+
orgId: number,
95+
property_view_ids: number[],
96+
taxlot_view_ids: number[],
97+
goal_id: number,
98+
): Observable<FullProgressResponse> {
9599
const url = `/api/v3/data_quality_checks/${orgId}/start/`
96100
const data = {
97101
property_view_ids,

src/@seed/api/dataset/dataset.service.ts

Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,28 @@ export class DatasetService {
2222

2323
constructor() {
2424
// Refresh dataset count only when the organization ID changes
25-
this._userService.currentOrganizationId$.pipe(
26-
tap((orgId) => {
27-
this.orgId = orgId
28-
this.list(this.orgId)
29-
this.countDatasets(this.orgId)
30-
}),
31-
).subscribe()
25+
this._userService.currentOrganizationId$
26+
.pipe(
27+
tap((orgId) => {
28+
this.orgId = orgId
29+
this.list(this.orgId)
30+
this.countDatasets(this.orgId)
31+
}),
32+
)
33+
.subscribe()
3234
}
3335

3436
list(organizationId: number) {
3537
const url = `/api/v3/datasets/?organization_id=${organizationId}`
36-
this._httpClient.get<ListDatasetsResponse>(url).pipe(
37-
map(({ datasets }) => datasets),
38-
tap((datasets) => { this._datasets.next(datasets) }),
39-
).subscribe()
38+
this._httpClient
39+
.get<ListDatasetsResponse>(url)
40+
.pipe(
41+
map(({ datasets }) => datasets),
42+
tap((datasets) => {
43+
this._datasets.next(datasets)
44+
}),
45+
)
46+
.subscribe()
4047
}
4148

4249
get(orgId: number, datasetId: number): Observable<Dataset> {
@@ -52,7 +59,9 @@ export class DatasetService {
5259
create(orgId: number, name: string): Observable<Dataset> {
5360
const url = `/api/v3/datasets/?organization_id=${orgId}`
5461
return this._httpClient.post<Dataset>(url, { name }).pipe(
55-
tap((response) => { console.log('temp', response) }),
62+
tap((response) => {
63+
console.log('temp', response)
64+
}),
5665
tap(() => {
5766
this.countDatasets(orgId)
5867
this.list(orgId)
@@ -67,7 +76,9 @@ export class DatasetService {
6776
update(orgId: number, datasetId: number, name: string): Observable<Dataset> {
6877
const url = `/api/v3/datasets/${datasetId}/?organization_id=${orgId}`
6978
return this._httpClient.put<Dataset>(url, { dataset: name }).pipe(
70-
tap((response) => { console.log('temp', response) }),
79+
tap((response) => {
80+
console.log('temp', response)
81+
}),
7182
tap(() => {
7283
this.countDatasets(orgId)
7384
this.list(orgId)
@@ -94,19 +105,26 @@ export class DatasetService {
94105
}
95106

96107
countDatasets(orgId: number) {
97-
this._httpClient.get<CountDatasetsResponse>(`/api/v3/datasets/count/?organization_id=${orgId}`).pipe(
98-
map(({ datasets_count }) => datasets_count),
99-
tap((datasetsCount) => { this._datasetCount.next(datasetsCount) }),
100-
catchError((error: HttpErrorResponse) => {
101-
return this._errorService.handleError(error, 'Error fetching dataset count')
102-
}),
103-
).subscribe()
108+
this._httpClient
109+
.get<CountDatasetsResponse>(`/api/v3/datasets/count/?organization_id=${orgId}`)
110+
.pipe(
111+
map(({ datasets_count }) => datasets_count),
112+
tap((datasetsCount) => {
113+
this._datasetCount.next(datasetsCount)
114+
}),
115+
catchError((error: HttpErrorResponse) => {
116+
return this._errorService.handleError(error, 'Error fetching dataset count')
117+
}),
118+
)
119+
.subscribe()
104120
}
105121

106122
deleteFile(orgId: number, fileId: number) {
107123
const url = `/api/v3/import_files/${fileId}/?organization_id=${orgId}`
108124
return this._httpClient.delete(url).pipe(
109-
tap(() => { this._snackBar.success('File deleted successfully') }),
125+
tap(() => {
126+
this._snackBar.success('File deleted successfully')
127+
}),
110128
catchError((error: HttpErrorResponse) => {
111129
return this._errorService.handleError(error, 'Error deleting file')
112130
}),

src/@seed/api/geocode/geocode.service.ts

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@ export class GeocodeService {
1818
property_view_ids: type === 'taxlots' ? [] : viewIds,
1919
taxlot_view_ids: type === 'taxlots' ? viewIds : [],
2020
}
21-
return this._httpClient.post(url, data)
22-
.pipe(
23-
catchError((error: HttpErrorResponse) => {
24-
return this._errorService.handleError(error, 'Geocode Error')
25-
}),
26-
)
21+
return this._httpClient.post(url, data).pipe(
22+
catchError((error: HttpErrorResponse) => {
23+
return this._errorService.handleError(error, 'Geocode Error')
24+
}),
25+
)
2726
}
2827

2928
confidenceSummary(orgId: number, viewIds: number[], type: InventoryType): Observable<ConfidenceSummary> {
@@ -32,41 +31,37 @@ export class GeocodeService {
3231
property_view_ids: type === 'taxlots' ? [] : viewIds,
3332
taxlot_view_ids: type === 'taxlots' ? viewIds : [],
3433
}
35-
return this._httpClient.post<ConfidenceSummary>(url, data)
36-
.pipe(
37-
catchError((error: HttpErrorResponse) => {
38-
return this._errorService.handleError(error, 'Geocode Confidence Summary Error')
39-
}),
40-
)
34+
return this._httpClient.post<ConfidenceSummary>(url, data).pipe(
35+
catchError((error: HttpErrorResponse) => {
36+
return this._errorService.handleError(error, 'Geocode Confidence Summary Error')
37+
}),
38+
)
4139
}
4240

4341
checkApiKey(orgId: number): Observable<boolean> {
4442
const url = `/api/v3/organizations/${orgId}/geocode_api_key_exists/`
45-
return this._httpClient.get<boolean>(url)
46-
.pipe(
47-
catchError((error: HttpErrorResponse) => {
48-
return this._errorService.handleError(error, 'Geocode API Key Check Error')
49-
}),
50-
)
43+
return this._httpClient.get<boolean>(url).pipe(
44+
catchError((error: HttpErrorResponse) => {
45+
return this._errorService.handleError(error, 'Geocode API Key Check Error')
46+
}),
47+
)
5148
}
5249

5350
geocodingEnabled(orgId: number): Observable<boolean> {
5451
const url = `/api/v3/organizations/${orgId}/geocoding_enabled/`
55-
return this._httpClient.get<boolean>(url)
56-
.pipe(
57-
catchError((error: HttpErrorResponse) => {
58-
return this._errorService.handleError(error, 'Geocoding Enabled Check Error')
59-
}),
60-
)
52+
return this._httpClient.get<boolean>(url).pipe(
53+
catchError((error: HttpErrorResponse) => {
54+
return this._errorService.handleError(error, 'Geocoding Enabled Check Error')
55+
}),
56+
)
6157
}
6258

6359
geocodingColumns(orgId: number): Observable<GeocodingColumns> {
6460
const url = `/api/v3/organizations/${orgId}/geocoding_columns/`
65-
return this._httpClient.get<GeocodingColumns>(url)
66-
.pipe(
67-
catchError((error: HttpErrorResponse) => {
68-
return this._errorService.handleError(error, 'Geocoding Columns Error')
69-
}),
70-
)
61+
return this._httpClient.get<GeocodingColumns>(url).pipe(
62+
catchError((error: HttpErrorResponse) => {
63+
return this._errorService.handleError(error, 'Geocoding Columns Error')
64+
}),
65+
)
7166
}
7267
}

src/@seed/api/groups/groups.service.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,13 @@ export class GroupsService {
9595
)
9696
}
9797

98-
bulkUpdate(orgId: number, addGroupIds: number[], removeGroupIds: number[], viewIds: number[], type: 'property' | 'tax_lot'): Observable<unknown> {
98+
bulkUpdate(
99+
orgId: number,
100+
addGroupIds: number[],
101+
removeGroupIds: number[],
102+
viewIds: number[],
103+
type: 'property' | 'tax_lot',
104+
): Observable<unknown> {
99105
const url = `/api/v3/inventory_group_mappings/put/?organization_id=${orgId}`
100106
const data = {
101107
inventory_ids: viewIds,
@@ -104,7 +110,9 @@ export class GroupsService {
104110
inventory_type: type,
105111
}
106112
return this._httpClient.put(url, data).pipe(
107-
tap(() => { this.list(orgId) }),
113+
tap(() => {
114+
this.list(orgId)
115+
}),
108116
catchError((error: HttpErrorResponse) => {
109117
return this._errorService.handleError(error, 'Error updating groups')
110118
}),

src/@seed/api/inventory/inventory.service.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,9 @@ export class InventoryService {
331331
const url = `/api/v3/properties/move_properties_to/?organization_id=${orgId}`
332332
const data = { property_view_ids: viewIds, access_level_instance_id: aliId }
333333
return this._httpClient.post(url, data).pipe(
334-
tap(() => { this._snackBar.success('Properties moved successfully') }),
334+
tap(() => {
335+
this._snackBar.success('Properties moved successfully')
336+
}),
335337
catchError((error: HttpErrorResponse) => {
336338
return this._errorService.handleError(error, 'Error moving properties')
337339
}),

src/@seed/api/label/label.service.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ export class LabelService {
8181
create(label: Label): Observable<Label> {
8282
const url = `/api/v3/labels/?organization_id=${label.organization_id}`
8383
return this._httpClient.post<Label>(url, { ...label }).pipe(
84-
tap(() => { this._snackBar.success('Label Created') }),
84+
tap(() => {
85+
this._snackBar.success('Label Created')
86+
}),
8587
catchError((error: HttpErrorResponse) => {
8688
return this._errorService.handleError(error, `Error creating label: ${error.message}`)
8789
}),
@@ -127,7 +129,13 @@ export class LabelService {
127129
)
128130
}
129131

130-
updateLabelInventory(orgId: number, viewIds: number[], type: InventoryType, addLabelIds: number[], removeLabelIds: number[]): Observable<HttpResponse<null>> {
132+
updateLabelInventory(
133+
orgId: number,
134+
viewIds: number[],
135+
type: InventoryType,
136+
addLabelIds: number[],
137+
removeLabelIds: number[],
138+
): Observable<HttpResponse<null>> {
131139
const singularType: InventoryTypeSingular = type === 'taxlots' ? 'taxlot' : 'property'
132140
const url = `/api/v3/labels_${singularType}/?organization_id=${orgId}`
133141
const data = { inventory_ids: viewIds, add_label_ids: addLabelIds, remove_label_ids: removeLabelIds }

0 commit comments

Comments
 (0)