Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format code with prettier #42

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
Resgrid Dispatch
===========================
# Resgrid Dispatch

Resgrid Dispatch an Ionic progressive web application (pwa), mobile app and Electron app that is intended for Dispatchers for Computer Aided Dispatch (CAD) user interface for Resgrid.
Resgrid Dispatch an Ionic progressive web application (pwa), mobile app and Electron app that is intended for Dispatchers for Computer Aided Dispatch (CAD) user interface for Resgrid.

*********
---

## About Resgrid


About Resgrid
-------------
Resgrid is an open-source Computer Aided Dispatch (CAD) solution for first responders, businesses and industrial environments.
Resgrid is an open-source Computer Aided Dispatch (CAD) solution for first responders, businesses and industrial environments.

[Sign up for your free Resgrid Account Today!](https://resgrid.com)

Expand All @@ -32,6 +29,7 @@ LOGGING_KEY=
## Settings

### .env Values

<table>
<tr>
<th>Setting</th>
Expand Down Expand Up @@ -87,15 +85,17 @@ LOGGING_KEY=
</tr>
</table>

## Deployment ##
## Deployment

docker pull resgridllc/dispatch

## Author's ##
* Shawn Jackson (Twitter: @DesignLimbo Blog: http://designlimbo.com)
* Jason Jarrett (Twitter: @staxmanade Blog: http://staxmanade.com)
## Author's

- Shawn Jackson (Twitter: @DesignLimbo Blog: http://designlimbo.com)
- Jason Jarrett (Twitter: @staxmanade Blog: http://staxmanade.com)

## License

## License ##
[Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)

## Acknowledgments
## Acknowledgments
22 changes: 10 additions & 12 deletions e2e/protractor.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,29 @@
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts

const { SpecReporter } = require('jasmine-spec-reporter');
const { SpecReporter } = require("jasmine-spec-reporter");

/**
* @type { import("protractor").Config }
*/
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/**/*.e2e-spec.ts'
],
specs: ["./src/**/*.e2e-spec.ts"],
capabilities: {
browserName: 'chrome'
browserName: "chrome",
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
baseUrl: "http://localhost:4200/",
framework: "jasmine",
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
print: function () {},
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.json')
require("ts-node").register({
project: require("path").join(__dirname, "./tsconfig.json"),
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};
},
};
18 changes: 10 additions & 8 deletions e2e/src/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';
import { AppPage } from "./app.po";
import { browser, logging } from "protractor";

describe('workspace-project App', () => {
describe("workspace-project App", () => {
let page: AppPage;

beforeEach(() => {
page = new AppPage();
});

it('should display welcome message', () => {
it("should display welcome message", () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('Resgrid Dispatch');
expect(page.getTitleText()).toEqual("Resgrid Dispatch");
});

afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry));
expect(logs).not.toContain(
jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry),
);
});
});
4 changes: 2 additions & 2 deletions e2e/src/app.po.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { browser, by, element } from 'protractor';
import { browser, by, element } from "protractor";

export class AppPage {
navigateTo(): Promise<unknown> {
return browser.get(browser.baseUrl) as Promise<unknown>;
}

getTitleText(): Promise<string> {
return element(by.css('app-root .content span')).getText() as Promise<string>;
return element(by.css("app-root .content span")).getText() as Promise<string>;
}
}
28 changes: 14 additions & 14 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@

module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
basePath: "",
frameworks: ["jasmine", "@angular-devkit/build-angular"],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
require("karma-jasmine"),
require("karma-chrome-launcher"),
require("karma-jasmine-html-reporter"),
require("karma-coverage-istanbul-reporter"),
require("@angular-devkit/build-angular/plugins/karma"),
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
clearContext: false, // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/dispatch'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
dir: require("path").join(__dirname, "./coverage/dispatch"),
reports: ["html", "lcovonly", "text-summary"],
fixWebpackSourcePaths: true,
},
reporters: ['progress', 'kjhtml'],
reporters: ["progress", "kjhtml"],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
browsers: ["Chrome"],
singleRun: false,
restartOnFileChange: true
restartOnFileChange: true,
});
};
42 changes: 21 additions & 21 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { AuthGuard } from './core/guards/auth.guard';
import { NgModule } from "@angular/core";
import { Routes, RouterModule } from "@angular/router";
import { AuthGuard } from "./core/guards/auth.guard";

import { LayoutComponent } from './layouts/layout/layout.component';
import { LayoutComponent } from "./layouts/layout/layout.component";

/*
const routes: Routes = [
Expand All @@ -14,34 +14,34 @@ const routes: Routes = [
*/
const routes: Routes = [
{
path: '',
redirectTo: 'auth',
pathMatch: 'full'
path: "",
redirectTo: "auth",
pathMatch: "full",
},
{
path: 'auth',
loadChildren: () => import('./features/auth/auth.module').then(m => m.AuthModule)
path: "auth",
loadChildren: () => import("./features/auth/auth.module").then((m) => m.AuthModule),
},
{
path: 'home',
loadChildren: () => import('./features/home/home.module').then(m => m.HomeModule)
path: "home",
loadChildren: () => import("./features/home/home.module").then((m) => m.HomeModule),
},
{
path: 'calls',
loadChildren: () => import('./features/calls/calls.module').then(m => m.CallsModule)
path: "calls",
loadChildren: () => import("./features/calls/calls.module").then((m) => m.CallsModule),
},
{
path: 'profile',
loadChildren: () => import('./features/profile/profile.module').then(m => m.ProfileModule)
path: "profile",
loadChildren: () => import("./features/profile/profile.module").then((m) => m.ProfileModule),
},
{
path: 'mapping',
loadChildren: () => import('./features/mapping/mapping.module').then(m => m.MappingModule)
}
path: "mapping",
loadChildren: () => import("./features/mapping/mapping.module").then((m) => m.MappingModule),
},
];

@NgModule({
imports: [RouterModule.forRoot(routes, { scrollPositionRestoration: 'top', relativeLinkResolution: 'legacy' })],
exports: [RouterModule]
imports: [RouterModule.forRoot(routes, { scrollPositionRestoration: "top", relativeLinkResolution: "legacy" })],
exports: [RouterModule],
})
export class AppRoutingModule { }
export class AppRoutingModule {}
24 changes: 10 additions & 14 deletions src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
import { TestBed, waitForAsync } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
import { TestBed, waitForAsync } from "@angular/core/testing";
import { RouterTestingModule } from "@angular/router/testing";
import { AppComponent } from "./app.component";

describe('AppComponent', () => {
describe("AppComponent", () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule
],
declarations: [
AppComponent
],
imports: [RouterTestingModule],
declarations: [AppComponent],
}).compileComponents();
}));

it('should create the app', () => {
it("should create the app", () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app).toBeTruthy();
Expand All @@ -23,13 +19,13 @@ describe('AppComponent', () => {
it(`should have as title 'Resgrid Dispatch'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('Resgrid Dispatch');
expect(app.title).toEqual("Resgrid Dispatch");
});

it('should render title', () => {
it("should render title", () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement;
expect(compiled.querySelector('.content span').textContent).toContain('Resgrid Dispatch');
expect(compiled.querySelector(".content span").textContent).toContain("Resgrid Dispatch");
});
});
10 changes: 5 additions & 5 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Component } from '@angular/core';
import { Component } from "@angular/core";

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
selector: "app-root",
templateUrl: "./app.component.html",
styleUrls: ["./app.component.scss"],
})
export class AppComponent {
title = 'Resgrid Dispatch';
title = "Resgrid Dispatch";
}
Loading