Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
alinleonard committed Jan 21, 2019
1 parent d67a499 commit 65039f8
Show file tree
Hide file tree
Showing 16 changed files with 42 additions and 78 deletions.
2 changes: 1 addition & 1 deletion src/app/fleet-manage/fleet-manage.module.ts
Expand Up @@ -14,7 +14,7 @@ import { ToasterModule } from 'angular2-toaster';
ThemeModule,
HttpClientModule,
FleetManageRoutingModule,
ToasterModule.forRoot(),
ToasterModule.forRoot()
],
providers: [ToastrComponent],
declarations: [
Expand Down
2 changes: 1 addition & 1 deletion src/app/fleet-manage/pages-menu.ts
Expand Up @@ -26,7 +26,7 @@ export const MENU_ITEMS: NbMenuItem[] = [
{
title: 'Vehicle Renewals',
link: '/fleet-manage/reminders/renewal/list'
},
}
]
},
{
Expand Down
22 changes: 11 additions & 11 deletions src/app/fleet-manage/pages/reminders/reminders-router.module.ts
@@ -1,25 +1,25 @@
import { NgModule } from "@angular/core";
import { RouterModule, Routes } from "@angular/router";
import { RemindersComponent } from "./reminders.component";
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { RemindersComponent } from './reminders.component';

import { RenewalAddComponent } from "./renewal-add/renewal-add.component";
import { RenewalListComponent } from "./renewal-list/renewal-list.component";
import { ServiceAddComponent } from "./service-add/service-add.component";
import { ServiceListComponent } from "./service-list/service-list.component";
import { RenewalAddComponent } from './renewal-add/renewal-add.component';
import { RenewalListComponent } from './renewal-list/renewal-list.component';
import { ServiceAddComponent } from './service-add/service-add.component';
import { ServiceListComponent } from './service-list/service-list.component';

const routes: Routes = [{
path: '',
component: RemindersComponent,
children: [
{
{
path: 'renewal/add/:id',
component: RenewalAddComponent
},
{
path: 'renewal/list',
component: RenewalListComponent
},
{
{
path: 'service/add',
component: ServiceAddComponent
},
Expand All @@ -28,11 +28,11 @@ const routes: Routes = [{
component: ServiceListComponent
}
]
}]
}]

@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})

export class RemindersRouterModule { }
export class RemindersRouterModule { }
Expand Up @@ -94,7 +94,7 @@ export class ListComponent implements OnInit, OnDestroy {
}

onEditConfirm(event): void {
const vehicle: Vehicle = this.vehicles.find(x => x._id == event.data['_id']);
const vehicle: Vehicle = this.vehicles.find(x => x._id === event.data['_id']);
// const newValueName = event.newData['name'];
// vehicle.name = newValueName;
vehicle.name = event.newData['name'];
Expand Down
@@ -1,5 +1,5 @@
import { Component, AfterViewInit, ViewChild, ElementRef } from "@angular/core";
import { DefaultEditor } from "ng2-smart-table";
import { Component, AfterViewInit, ViewChild, ElementRef } from '@angular/core';
import { DefaultEditor } from 'ng2-smart-table';

@Component({
template: `
Expand Down Expand Up @@ -51,5 +51,4 @@ export class NameViewEditorComponent extends DefaultEditor implements AfterViewI
getPlate() {
return this.cell.getValue().plate
}

}
}
Expand Up @@ -5,4 +5,4 @@
.text-link {
color: nb-theme(link-color);
}
}
}
@@ -1,5 +1,5 @@
import { Component, Input, Output, OnInit } from "@angular/core";
import { ViewCell } from "ng2-smart-table";
import { Component, Input, Output, OnInit } from '@angular/core';
import { ViewCell } from 'ng2-smart-table';

@Component({
selector: 'ngx-name-view',
Expand All @@ -19,4 +19,4 @@ export class NameViewComponent implements ViewCell, OnInit {

ngOnInit(): void {
}
}
}
@@ -1,15 +1,15 @@
import { Component, OnInit } from "@angular/core";
import { VehiclesService } from "../../../../services/vehicle.service";
import { Vehicle } from "../../../../models/vehicle";
import { ActivatedRoute } from "@angular/router";
import { Component, OnInit, OnDestroy } from '@angular/core';
import { VehiclesService } from '../../../../services/vehicle.service';
import { Vehicle } from '../../../../models/vehicle';
import { ActivatedRoute } from '@angular/router';

@Component({
selector: 'ngx-view',
templateUrl: './view.component.html',
styleUrls: ['./view.component.scss']
})

export class ViewComponent implements OnInit{
export class ViewComponent implements OnInit, OnDestroy {
private sub: any;
v: Vehicle;

Expand All @@ -21,7 +21,7 @@ export class ViewComponent implements OnInit{
ngOnInit(): void {
// subscribe to the route params
this.sub = this.route.params.subscribe(params => {
let id = params['id'];
const id = params['id'];
this.vehicleService.getById(id).subscribe(vehicle => this.v = vehicle);
})
}
Expand Down
12 changes: 6 additions & 6 deletions src/app/fleet-manage/pages/vehicles/vehicles-router.module.ts
@@ -1,9 +1,9 @@
import { NgModule } from "@angular/core";
import { RouterModule, Routes } from "@angular/router";
import { VehiclesComponent } from "./vehicles.component";
import { ListComponent } from "./components/list/list.component";
import { AddComponent } from "./components/add/add.component";
import { ViewComponent } from "./components/view/view.component";
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { VehiclesComponent } from './vehicles.component';
import { ListComponent } from './components/list/list.component';
import { AddComponent } from './components/add/add.component';
import { ViewComponent } from './components/view/view.component';

const routes: Routes = [{
path: '',
Expand Down
4 changes: 2 additions & 2 deletions src/app/fleet-manage/services/vehicle.service.ts
Expand Up @@ -45,14 +45,14 @@ export class VehiclesService {

update(vehicle: Vehicle) {
const endPoint = 'vehicle';

return this.http.put(`${this.baseUrl}${endPoint}/${vehicle._id}`, vehicle, httpOptions)
.pipe(catchError(HandleError.handleError));
}

delete(Id): Observable<void> {
const endPoint = 'vehicle';

return this.http.delete<void>(`${this.baseUrl}${endPoint}/${Id}`)
.pipe(catchError(HandleError.handleError));
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/pro/pages-menu.ts
Expand Up @@ -24,6 +24,6 @@ export const MENU_ITEMS: NbMenuItem[] = [
link: '/pro/components/breadcrumb'
}
]
},
}

];
@@ -1,39 +1,4 @@
@import '../../../../@theme/styles/themes';

@include nb-install-component() {

$code-lines-fg: #515877;
$code-block-bg: nb-theme(code-block-bg);

.container {
display: flex;
padding: 0;
font-size: 1rem;
border-radius: 0.5rem;
background: $code-block-bg;
overflow-x: auto;

.lines {
display: flex;
flex-direction: column;
text-align: end;
font-size: 0.875rem;
padding: 2rem 0.5rem 0.5rem;
border-radius: 0.5rem 0 0 0.5rem;
color: $code-lines-fg;
user-select: none;
}

pre {
margin-bottom: 0;
background: transparent;
overflow: visible;

code.hljs {
background: transparent;
padding-left: 0.5rem;
margin-bottom: 0;
}
}
}
}
}
@@ -1,4 +1,4 @@
import { Component } from "@angular/core";
import { Component } from '@angular/core';

@Component({
selector: 'ngx-components',
Expand Down
4 changes: 2 additions & 2 deletions src/app/pro/pages/components/components-router.module.ts
Expand Up @@ -12,11 +12,11 @@ const routes: Routes = [{
component: BreadcrumbComponent
}
]
}]
}]

@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})

export class ComponentsRouterModule { }
export class ComponentsRouterModule { }
2 changes: 1 addition & 1 deletion src/app/pro/pages/components/components.module.ts
Expand Up @@ -26,4 +26,4 @@ const components = [
providers: [ ]
})

export class ComponentsModule { }
export class ComponentsModule { }
2 changes: 1 addition & 1 deletion src/app/pro/pro.module.ts
Expand Up @@ -14,7 +14,7 @@ import { ProRoutingModule } from './pro-router.module';
ThemeModule,
HttpClientModule,
ProRoutingModule,
ToasterModule.forRoot(),
ToasterModule.forRoot()
],
providers: [ToastrComponent],
declarations: [
Expand Down

0 comments on commit 65039f8

Please sign in to comment.