This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Component, OnInit, OnDestroy} from "@angular/core"; | |
import {LoadingEventListener} from "../../services/LoadingEventListener"; | |
import {VFeedbackService} from "../../services/vfeedback.service"; | |
import {_keyValueDiffersFactory} from "@angular/core/src/application_module"; | |
@Component({ | |
selector: 'app-working-spinner', | |
template: `<md-progress-spinner mode="indeterminate" *ngIf="_visible">`, | |
styleUrls: ['working-spinner.component.scss'] | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public orderPost(offerId: string, takeaway: boolean): Observable<Order> { | |
//http call prep code ... | |
//... | |
let obs = this.http.post(path, orderBooking, requestOptions) | |
.map((response: Response) => { | |
if (response.status === 204) { | |
return undefined; | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//imports ... | |
export class CustomBrowserXhr extends BrowserXhr { | |
private _observable: Observable<XhrEvent>; | |
private _subscriber: Subscriber<XhrEvent>; | |
constructor() { | |
super(); | |
this._observable = Observable.create(subscriber => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component({ | |
selector: 'steak-working-spinner', | |
template: `<md-progress-spinner mode="indeterminate" *ngIf="_visible"></md-progress-spinner>`, | |
styleUrls: ['working-spinner.component.scss'] | |
}) | |
export class WorkingSpinnerComponent implements OnInit, OnDestroy { | |
private _visible: boolean; | |
private _subscription: AnonymousSubscription; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@NgModule({ | |
declarations: [ | |
AppComponent | |
], | |
imports: [ | |
//... | |
CustomBrowserXhr // <<< | |
], | |
providers: [{provide: BrowserXhr, useExisting: CustomBrowserXhr}], //!!! <<< | |
bootstrap: [AppComponent] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {async, ComponentFixture, TestBed, fakeAsync, tick} from "@angular/core/testing"; | |
import {AdminHomeComponent} from "./admin-home.component"; | |
import {NO_ERRORS_SCHEMA} from "@angular/core"; | |
import {PageTitleService} from "../../shared/services/page-title.service"; | |
import {OffersApi} from "../../shared/api/endpoints/OffersApi"; | |
import {OffersApiStub} from "../../../testing/offers-api-stub"; | |
import {By} from "@angular/platform-browser"; | |
import {MOCK_OFFERS} from "../../../testing/mock-data"; | |
import {MdDialog, MdDialogModule, MdDialogRef, OverlayRef} from "@angular/material"; | |
import * as _ from "lodash"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Component, OnInit} from "@angular/core"; | |
import {PageTitleService} from "../../shared/services/page-title.service"; | |
import {Offer} from "../../shared/api/model/Offer"; | |
import {OffersApi} from "../../shared/api/endpoints/OffersApi"; | |
import {toApiDate, EditMode} from "../../core/util/util.service"; | |
import {MdDialog} from "@angular/material"; | |
import {OfferFormDialogComponent} from "../offer-form-dialog/offer-form-dialog.component"; | |
@Component({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('should show two orders in historical data', () => {}); | |
it('should let the user sort by date', () => {}); | |
it('should show "yes" instead of "true" for boolean values', () => {}); | |
it('should let the user filter with the search function', () => {}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<td-data-table | |
[data]="data" | |
[columns]="columns"> | |
<!--template for date --> | |
<template tdDataTableTemplate="date" let-value="value"> | |
<div layout="row"> | |
<span flex>{{value | date: 'dd-MM-yyyy'}}</span> | |
</div> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p style="width:320px; float:left;"> | |
<iframe style="border-radius:6px;" width="300" height="250" id="iframeBooking" src="http://pcid.flixbus.de/go.cgi?pid=351&rwmid=51&wmid=cc&target=https://www.flixbus.de/template/bookingpartner-nsl/index.php?style=width300&pid=351&rwmid=51" allowTransparency="true" frameborder="0" scrolling="no"> | |
... Bitte klicken Sie | |
<a href="https://www.flixbus.de/template/bookingpartner-nsl/index.php?style=width300&pid=351&rwmid=51&wmid=cc&#Q51C351">HIER</a> | |
, falls Ihr Browser keine IFrames darstellen kann ... | |
</iframe> | |
<img src="http://pcid.flixbus.de/go.cgi?pid=351&wmid=51&cpid=1&prid=7&view=1" height="1" width="1" border="0" /><img border="0" height="1" src="http://pcid.flixbus.de/go.cgi?pid=351&wmid=51&cpid=1&prid=7&view=1" width="1"> | |
</p> |