Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (this.etaModel && this.etdModel) {
const etaDate = new NgbDate(this.etaModel.date.year, this.etaModel.date.month, this.etaModel.date.day);
const etdDate = new NgbDate(this.etdModel.date.year, this.etdModel.date.month, this.etdModel.date.day);
this.etaIsAfterEtdError = etdDate.before(etaDate);
if (etdDate.equals(etaDate)) {
this.etaIsAfterEtdError = this.etaModel.time.hour > this.etdModel.time.hour
|| (this.etaModel.time.hour === this.etdModel.time.hour
&& this.etaModel.time.minute >= this.etdModel.time.minute);
}
} else {
this.etaIsAfterEtdError = false;
}
const prevEtdDate = this.prevEtdModel != null && this.prevEtdModel.date != null ? new NgbDate(this.prevEtdModel.date.year, this.prevEtdModel.date.month, this.prevEtdModel.date.day) : null;
const nextEtaDate = this.nextEtaModel != null && this.nextEtaModel.date != null ? new NgbDate(this.nextEtaModel.date.year, this.nextEtaModel.date.month, this.nextEtaModel.date.day) : null;
// Checking for sequence errors between prev and current port of call
if (prevEtdDate && this.etaModel) {
this.prevEtdIsAfterCurrentEtaError = prevEtdDate.after(this.etaModel.date);
if (prevEtdDate.equals(this.etaModel.date)) {
this.prevEtdIsAfterCurrentEtaError = this.prevEtdModel.time.hour > this.etaModel.time.hour
|| (this.prevEtdModel.time.hour === this.etaModel.time.hour
&& this.prevEtdModel.time.minute >= this.etaModel.time.minute);
}
} else {
this.prevEtdIsAfterCurrentEtaError = false;
}
// Checking for sequence errors between next and current port of call
if (nextEtaDate && this.etdModel) {
const etaDate = new NgbDate(this.etaModel.date.year, this.etaModel.date.month, this.etaModel.date.day);
const etdDate = new NgbDate(this.etdModel.date.year, this.etdModel.date.month, this.etdModel.date.day);
this.etaIsAfterEtdError = etdDate.before(etaDate);
if (etdDate.equals(etaDate)) {
this.etaIsAfterEtdError = this.etaModel.time.hour > this.etdModel.time.hour
|| (this.etaModel.time.hour === this.etdModel.time.hour
&& this.etaModel.time.minute >= this.etdModel.time.minute);
}
} else {
this.etaIsAfterEtdError = false;
}
const prevEtdDate = this.prevEtdModel != null && this.prevEtdModel.date != null ? new NgbDate(this.prevEtdModel.date.year, this.prevEtdModel.date.month, this.prevEtdModel.date.day) : null;
const nextEtaDate = this.nextEtaModel != null && this.nextEtaModel.date != null ? new NgbDate(this.nextEtaModel.date.year, this.nextEtaModel.date.month, this.nextEtaModel.date.day) : null;
// Checking for sequence errors between prev and current port of call
if (prevEtdDate && this.etaModel) {
this.prevEtdIsAfterCurrentEtaError = prevEtdDate.after(this.etaModel.date);
if (prevEtdDate.equals(this.etaModel.date)) {
this.prevEtdIsAfterCurrentEtaError = this.prevEtdModel.time.hour > this.etaModel.time.hour
|| (this.prevEtdModel.time.hour === this.etaModel.time.hour
&& this.prevEtdModel.time.minute >= this.etaModel.time.minute);
}
} else {
this.prevEtdIsAfterCurrentEtaError = false;
}
// Checking for sequence errors between next and current port of call
if (nextEtaDate && this.etdModel) {
this.nextEtaIsBeforeCurrentEtdError = nextEtaDate.before(this.etdModel.date);
// angular
CommonModule,
HttpClientModule,
ReactiveFormsModule,
// 3rd party UI
FontAwesomeModule,
TextMaskModule,
/**
* ng-bootstrap modules
* only those that are used by app
* should be imported to reduce bundle size
*/
NgbDatepickerModule.forRoot(),
NgbCollapseModule.forRoot(),
NgbModalModule.forRoot(),
NgbTabsetModule.forRoot(),
NgbPaginationModule.forRoot(),
NgbPopoverModule.forRoot(),
NgbAccordionModule.forRoot(),
NgbCarouselModule.forRoot(),
NgbDropdownModule.forRoot(),
],
exports: [
// angular
CommonModule,
HttpClientModule,
ReactiveFormsModule,
// 3rd party UI
FontAwesomeModule,
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [TranslateModule.forRoot(), NgbCollapseModule.forRoot()],
declarations: [SearchSidebarComponent],
schemas: [NO_ERRORS_SCHEMA],
})
.compileComponents(); // compile template and css
}));
var ModalsModule = /** @class */ (function () {
function ModalsModule() {
}
ModalsModule = __decorate([
core_1.NgModule({
imports: [
// MODULE IMPORTS
ng_bootstrap_1.NgbModule.forRoot(),
platform_browser_1.BrowserModule
],
declarations: [
// COMPONENTS IN THIS MODULE
confirmation_modal_content_component_1.ConfirmationModalContent,
error_modal_content_component_1.ErrorModalContent
],
exports: [],
providers: [
// SERVICES
confirmation_modal_service_1.ConfirmationModal,
error_notification_modal_service_1.ErrorNotificationModalService
],
bootstrap: [],
entryComponents: [
// ENTRY POINTS
var PropertiesEditorModule = /** @class */ (function () {
function PropertiesEditorModule() {
}
PropertiesEditorModule = __decorate([
core_1.NgModule({
imports: [
// MODULE IMPORTS
platform_browser_1.BrowserModule,
generic_form_module_1.GenericFormModule,
navigator_module_1.NavigatorModule,
ng_bootstrap_1.NgbModule.forRoot(),
forms_1.FormsModule,
forms_1.ReactiveFormsModule,
icons_module_1.IconsModule
],
declarations: [
// COMPONENTS IN THIS MODULE
properties_editor_component_1.PropertiesEditor,
tracing_links_component_1.TracingLinks,
tracing_link_component_1.TracingLink
],
exports: [
// THE COMPONENTS VISIBLE TO THE OUTSIDE
properties_editor_component_1.PropertiesEditor
],
providers: [],
bootstrap: []
var forms_1 = require("@angular/forms");
var http_1 = require("@angular/http");
var sampleData_service_1 = require("./services/sampleData.service");
var auth_service_1 = require("./security/auth.service");
var auth_guard_service_1 = require("./security/auth-guard.service");
require("./rxjs-operators");
var ng_bootstrap_1 = require("@ng-bootstrap/ng-bootstrap");
// enableProdMode();
var AppModule = (function () {
function AppModule() {
}
return AppModule;
}());
AppModule = __decorate([
core_1.NgModule({
imports: [ng_bootstrap_1.NgbModule.forRoot(), animations_1.BrowserAnimationsModule, platform_browser_1.BrowserModule, forms_1.FormsModule, http_1.HttpModule, app_routing_1.routing],
declarations: [app_component_1.AppComponent, app_routing_1.routedComponents],
providers: [sampleData_service_1.SampleDataService,
auth_service_1.AuthService,
auth_guard_service_1.AuthGuard, platform_browser_1.Title, { provide: common_1.APP_BASE_HREF, useValue: '/a2spa' }],
bootstrap: [app_component_1.AppComponent]
})
], AppModule);
exports.AppModule = AppModule;
//# sourceMappingURL=app.module.js.map
var PageNotFoundModule = (function () {
function PageNotFoundModule() {
}
PageNotFoundModule = __decorate([
core_1.NgModule({
imports: [
// MODULE IMPORTS
ng_bootstrap_1.NgbModule
],
declarations: [
// COMPONENTS IN THIS MODULE
page_not_found_component_1.PageNotFound
],
exports: [
// THE COMPONENTS VISIBLE TO THE OUTSIDE
page_not_found_component_1.PageNotFound
],
providers: [],
bootstrap: []
})
], PageNotFoundModule);
return PageNotFoundModule;
}());
exports.PageNotFoundModule = PageNotFoundModule;
SharedRoutingModule,
// angular
CommonModule,
HttpClientModule,
ReactiveFormsModule,
// 3rd party UI
FontAwesomeModule,
TextMaskModule,
/**
* ng-bootstrap modules
* only those that are used by app
* should be imported to reduce bundle size
*/
NgbDatepickerModule.forRoot(),
NgbCollapseModule.forRoot(),
NgbModalModule.forRoot(),
NgbTabsetModule.forRoot(),
NgbPaginationModule.forRoot(),
NgbPopoverModule.forRoot(),
NgbAccordionModule.forRoot(),
NgbCarouselModule.forRoot(),
NgbDropdownModule.forRoot(),
],
exports: [
// angular
CommonModule,
HttpClientModule,
ReactiveFormsModule,
// 3rd party UI
// 3rd party UI
FontAwesomeModule,
TextMaskModule,
/**
* ng-bootstrap modules
* only those that are used by app
* should be imported to reduce bundle size
*/
NgbDatepickerModule.forRoot(),
NgbCollapseModule.forRoot(),
NgbModalModule.forRoot(),
NgbTabsetModule.forRoot(),
NgbPaginationModule.forRoot(),
NgbPopoverModule.forRoot(),
NgbAccordionModule.forRoot(),
NgbCarouselModule.forRoot(),
NgbDropdownModule.forRoot(),
],
exports: [
// angular
CommonModule,
HttpClientModule,
ReactiveFormsModule,
// 3rd party UI
FontAwesomeModule,
TextMaskModule,
NgbDatepickerModule,
NgbCollapseModule,