[HIMA-110] Finished changing project structure to suport multiple apps.

This commit is contained in:
Eraldo Hasanaj
2019-03-04 17:32:10 +01:00
parent 583906a711
commit 3dc2353789
85 changed files with 1195 additions and 1344 deletions

View File

@@ -73,7 +73,7 @@
"root": "apps/sales/",
"sourceRoot": "apps/sales/src",
"projectType": "application",
"prefix": "sales",
"prefix": "app",
"schematics": {},
"architect": {
"build": {
@@ -84,7 +84,11 @@
"main": "apps/sales/src/main.ts",
"polyfills": "apps/sales/src/polyfills.ts",
"tsConfig": "apps/sales/tsconfig.app.json",
"assets": ["apps/sales/src/favicon.ico", "apps/sales/src/assets"],
"assets": [
"apps/sales/src/favicon.ico",
"apps/sales/src/assets",
"apps/sales/src/manifest.webmanifest"
],
"styles": ["apps/sales/src/styles.scss"],
"scripts": []
},
@@ -111,7 +115,8 @@
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
],
"serviceWorker": true
}
}
},
@@ -141,7 +146,11 @@
"karmaConfig": "apps/sales/karma.conf.js",
"styles": ["apps/sales/src/styles.scss"],
"scripts": [],
"assets": ["apps/sales/src/favicon.ico", "apps/sales/src/assets"]
"assets": [
"apps/sales/src/favicon.ico",
"apps/sales/src/assets",
"apps/sales/src/manifest.webmanifest"
]
}
},
"lint": {
@@ -183,5 +192,5 @@
}
}
},
"defaultProject": "hima"
"defaultProject": "sales"
}

View File

@@ -1,7 +1,7 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
@@ -28,4 +28,4 @@ module.exports = function (config) {
browsers: ['Chrome'],
singleRun: false
});
};
};

View File

@@ -20,7 +20,7 @@
"updateMode": "prefetch",
"resources": {
"files": [
"/assets/**",
"assets/**",
"/*.(eot|svg|cur|jpg|png|webp|gif|otf|ttf|woff|woff2|ani)"
]
}

View File

@@ -1,4 +1,4 @@
<sales-header></sales-header>
<sales-content [isConnected]="isConnected"></sales-content>
<sales-menu></sales-menu>
<app-header></app-header>
<app-content [isConnected]="isConnected"></app-content>
<app-menu></app-menu>

View File

@@ -2,7 +2,7 @@ import { Component, ViewChild } from '@angular/core';
import { ConnectionService } from 'ng-connection-service';
@Component({
selector: 'sales-root',
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})

View File

@@ -88,10 +88,7 @@ export function _feedServiceEndpointProviderFactory(conf: ConfigService) {
FormsModule,
ReactiveFormsModule,
SharedModule,
ScrollingModule,
ServiceWorkerModule.register('ngsw-worker.js', {
enabled: environment.production
})
ScrollingModule
],
providers: [
{

View File

@@ -1,10 +1,10 @@
<div class="breadacrumb-grid" [ngClass]="{'grid-with-arrow': !backArrow, 'breadcumb-mb-5': lowerMargin}">
<!-- <sales-back-arrow (back)="addOne()"></sales-back-arrow> TESTING ANIMATION PURPOSES-->
<sales-back-arrow
<!-- <app-back-arrow (back)="addOne()"></app-back-arrow> TESTING ANIMATION PURPOSES-->
<app-back-arrow
*ngIf="backArrow"
(back)="goBack(breadcrumbs[breadcrumbs.length - 2])"
class="align-right back-arrow"
></sales-back-arrow>
></app-back-arrow>
<div
class="align-center breadcrumb-container"
[ngClass]="{ 'with-arrow': backArrow }"

View File

@@ -11,7 +11,7 @@ import {
import { Router } from '@angular/router';
@Component({
selector: 'sales-breadcrumbs',
selector: 'app-breadcrumbs',
templateUrl: './breadcrumbs.component.html',
styleUrls: ['./breadcrumbs.component.scss']
})

View File

@@ -1,4 +1,4 @@
<sales-modal id="checkout-modal">
<app-modal id="checkout-modal">
<div class="modal-step-1" *ngIf="stepOne">
<div class="header">
@@ -95,4 +95,4 @@
</div>
</div>
</sales-modal>
</app-modal>

View File

@@ -11,7 +11,7 @@ import { ItemDTO, CatImageService } from 'cat-service';
const points = 60;
@Component({
selector: 'sales-checkout',
selector: 'app-checkout',
templateUrl: './checkout.component.html',
styleUrls: ['./checkout.component.scss']
})

View File

@@ -32,5 +32,5 @@
</div>
</div>
</div>
<sales-process-header></sales-process-header>
<app-process-header></app-process-header>
</div>

View File

@@ -1,7 +1,7 @@
import { Component, OnInit, Output, EventEmitter } from '@angular/core';
@Component({
selector: 'sales-header',
selector: 'app-header',
templateUrl: './header.component.html',
styleUrls: ['./header.component.scss']
})

View File

@@ -13,7 +13,7 @@ import { getRandomPic } from 'apps/sales/src/app/core/utils/process.util';
import { Breadcrumb } from 'apps/sales/src/app/core/models/breadcrumb.model';
@Component({
selector: 'sales-menu',
selector: 'app-menu',
templateUrl: './menu.component.html',
styleUrls: ['./menu.component.scss']
})

View File

@@ -1,12 +1,12 @@
<div class="grid-container pt-19">
<div class="align-left pt-3">
<div class="process-grid-container ml-5">
<sales-process-tab
<app-process-tab
style="display: inline-block;"
*ngFor="let process of processes"
[process]="process"
[@add]="process.new"
></sales-process-tab>
></app-process-tab>
</div>
</div>
<div class="align-right">

View File

@@ -10,7 +10,7 @@ import { addAnimation } from './add.animation';
import { Router } from '@angular/router';
@Component({
selector: 'sales-process-header',
selector: 'app-process-header',
templateUrl: './process-header.component.html',
styleUrls: ['./process-header.component.scss'],
animations: [addAnimation]

View File

@@ -29,5 +29,5 @@
</a>
</div>
</div>
<sales-process-delete-dialog #deleteporcessdialog (deleted)="deleteProcess($event)" [process]='process'></sales-process-delete-dialog>
<app-process-delete-dialog #deleteporcessdialog (deleted)="deleteProcess($event)" [process]='process'></app-process-delete-dialog>
</div>

View File

@@ -26,7 +26,7 @@ import { SearchResultsComponent } from '../search-results/search-results.compone
import { Notify } from 'apps/sales/src/app/core/store/actions/notifier.actions';
@Component({
selector: 'sales-process-tab',
selector: 'app-process-tab',
templateUrl: './process-tab.component.html',
styleUrls: ['./process-tab.component.scss']
})

View File

@@ -1,7 +1,7 @@
import { Component, OnInit, Input } from '@angular/core';
@Component({
selector: 'sales-product-card-loading',
selector: 'app-product-card-loading',
templateUrl: './product-card-loading.component.html',
styleUrls: ['./product-card-loading.component.scss']
})

View File

@@ -12,7 +12,7 @@ import { ChangeCurrentRoute } from 'apps/sales/src/app/core/store/actions/proces
import { ProcessState } from 'apps/sales/src/app/core/store/state/process.state';
@Component({
selector: 'sales-product-card',
selector: 'app-product-card',
templateUrl: './product-card.component.html',
styleUrls: ['./product-card.component.scss']
})

View File

@@ -120,11 +120,11 @@
</div>
</div>
<div class="recommandations">
<sales-recommendations></sales-recommendations>
<app-recommendations></app-recommendations>
</div>
</div>
<sales-loading loading="true" *ngIf="!product"></sales-loading>
<app-loading loading="true" *ngIf="!product"></app-loading>
<ng-container *ngIf="item">
<sales-checkout #checkout (closed)="cartActionCompleted($event)" [book]="item"></sales-checkout>
<app-checkout #checkout (closed)="cartActionCompleted($event)" [book]="item"></app-checkout>
</ng-container>

View File

@@ -12,7 +12,7 @@ import { Notify } from 'apps/sales/src/app/core/store/actions/notifier.actions';
import { Process } from 'apps/sales/src/app/core/models/process.model';
@Component({
selector: 'sales-product-details',
selector: 'app-product-details',
templateUrl: './product-details.component.html',
styleUrls: ['./product-details.component.scss']
})

View File

@@ -1,30 +1,30 @@
<div class="result-container">
<sales-filter (filtersChanged)="updateSearch()"></sales-filter>
<app-filter (filtersChanged)="updateSearch()"></app-filter>
<div *ngIf="!ds || (ds.loading && !ds.results)">
<div [@stagger]="'yes'">
<div *ngFor="let dummy of dummies" [style.marginTop.px]="10">
<sales-product-card-loading> </sales-product-card-loading>
<app-product-card-loading> </app-product-card-loading>
</div>
</div>
</div>
<cdk-virtual-scroll-viewport itemSize="190" class="viewport" #scroller>
<div *cdkVirtualFor="let product of ds; let i = index" class="product-item">
<sales-product-card
<app-product-card
[product]="product"
[index]="i"
*ngIf="product != null; else loadingComponent"
>
</sales-product-card>
</app-product-card>
<ng-template #loadingComponent>
<sales-product-card-loading></sales-product-card-loading>
<app-product-card-loading></app-product-card-loading>
</ng-template>
</div>
</cdk-virtual-scroll-viewport>
<sales-loading
<app-loading
*ngIf="!ds || ds.loading"
[style.marginTop.px]="60"
[style.marginBottom.px]="60"
loading="true"
text="Inhalte werden geladen"
></sales-loading>
></app-loading>
</div>

View File

@@ -14,7 +14,7 @@ import { SearchDataSource } from './search-data.datasource';
import { NotifierState } from 'apps/sales/src/app/core/store/state/notifier.state';
@Component({
selector: 'sales-search-results',
selector: 'app-search-results',
templateUrl: './search-results.component.html',
styleUrls: ['./search-results.component.scss'],
animations: [staggerAnimation]

View File

@@ -1,17 +1,17 @@
<div [@staggerAnimation]="active">
<sales-card
<app-card
*ngFor="let item of navigation"
(click)="switch(item)"
class="header"
>
<span class="header-title">{{ titles[item] }}</span>
</sales-card>
</app-card>
</div>
<div class="content" [ngSwitch]="active">
<div *ngSwitchCase="'search'" [@fadeIn]="active">
<sales-text-search></sales-text-search>
<app-text-search></app-text-search>
</div>
<div *ngSwitchCase="'scan'" [@fadeIn]="active">
<sales-barcode-search></sales-barcode-search>
<app-barcode-search></app-barcode-search>
</div>
</div>

View File

@@ -5,7 +5,7 @@ import { staggerAnimation } from './stagger.animation';
import { Store } from '@ngxs/store';
@Component({
selector: 'sales-article-search',
selector: 'app-article-search',
templateUrl: './article-search.component.html',
styleUrls: ['./article-search.component.scss'],
animations: [fadeInAnimation, staggerAnimation]

View File

@@ -12,7 +12,7 @@ import { fadeInAnimation } from './fadeIn.animation';
import { AddSelectedFilter } from 'apps/sales/src/app/core/store/actions/process.actions';
@Component({
selector: 'sales-filter-item',
selector: 'app-filter-item',
templateUrl: './filter-item.component.html',
styleUrls: ['./filter-item.component.scss'],
animations: [fadeInAnimation]

View File

@@ -1,8 +1,8 @@
<div class="filter-container">
<sales-filter-item *ngFor="let index of (filterIndexArray$ | async)" [index]="index" (confirmed)="itemsConfirmed()">
</sales-filter-item>
<sales-selected-filter-item *ngFor="let filterItem of filterItems$ | async" [filterItem]="filterItem" (confirmed)=itemsConfirmed()>
</sales-selected-filter-item>
<app-filter-item *ngFor="let index of (filterIndexArray$ | async)" [index]="index" (confirmed)="itemsConfirmed()">
</app-filter-item>
<app-selected-filter-item *ngFor="let filterItem of filterItems$ | async" [filterItem]="filterItem" (confirmed)=itemsConfirmed()>
</app-selected-filter-item>
<div (click)="toggleMore()" class="more-filters-container">
<span class="more-filters">{{ showMore ? 'Weniger' : 'Mehr' }} Filter</span>
<img class="more-icon" [class.more]="showMore" src="/assets/images/Arrow_More.svg" />

View File

@@ -11,7 +11,7 @@ import { ProcessState } from 'apps/sales/src/app/core/store/state/process.state'
import { FilterItem } from 'apps/sales/src/app/core/models/filter-item.model';
@Component({
selector: 'sales-filter',
selector: 'app-filter',
templateUrl: './filter.component.html',
styleUrls: ['./filter.component.scss']
})

View File

@@ -4,7 +4,7 @@ import { Store } from '@ngxs/store';
import { RemoveSelectedFilter } from 'apps/sales/src/app/core/store/actions/process.actions';
@Component({
selector: 'sales-selected-filter-item',
selector: 'app-selected-filter-item',
templateUrl: './selected-filter-item.component.html',
styleUrls: ['./selected-filter-item.component.scss']
})

View File

@@ -6,7 +6,7 @@
>
</div>
<div class="align-center search-container">
<sales-search
<app-search
#searchInput
(input)="createTab()"
(search)="search($event)"
@@ -15,10 +15,10 @@
[autocompleteResults]="autocompleteResults"
[showAutocomplete]="showAutocomplete"
error="{{ error }}"
></sales-search>
></app-search>
</div>
<div [@fadeIn]="!!searchParams">
<sales-filter (filters)="updateFilters()"></sales-filter>
<app-filter (filters)="updateFilters()"></app-filter>
</div>
<div class="recent-search-continer align-center">
<div class="recent-search-header">

View File

@@ -42,7 +42,7 @@ import { ItemDTO } from 'projects/cat-service/src/lib';
import { fadeInAnimation } from './fadeIn.animation';
@Component({
selector: 'sales-text-search',
selector: 'app-text-search',
templateUrl: './text-search.component.html',
styleUrls: ['./text-search.component.scss'],
animations: [fadeInAnimation]

View File

@@ -3,12 +3,12 @@
<caption>
Scannen Sie den Artikel um Informationen zu erhalten.
</caption>
<sales-barcode-scanner-scandit
<app-barcode-scanner-scandit
#scanner
(scan)="triggerSearch($event)"
></sales-barcode-scanner-scandit>
></app-barcode-scanner-scandit>
<div class="recc">
<sales-recommendations></sales-recommendations>
<app-recommendations></app-recommendations>
</div>
</div>

View File

@@ -20,7 +20,7 @@ import { ProcessState } from 'apps/sales/src/app/core/store/state/process.state'
import { Observable } from 'rxjs';
@Component({
selector: 'sales-barcode-search',
selector: 'app-barcode-search',
templateUrl: 'barcode-search.component.html',
styleUrls: ['barcode-search.component.scss']
})

View File

@@ -1,5 +1,5 @@
<div class="w-100 loading" *ngIf="!ready">
<sales-loading loading="true" text="Scanvorgang wird ausgeführt"></sales-loading>
<app-loading loading="true" text="Scanvorgang wird ausgeführt"></app-loading>
</div>
<div class="w-100" *ngIf="enabled">
<scandit-sdk-barcode-picker
@@ -14,7 +14,7 @@
</div>
<div class="w-100 loading" *ngIf="!enabled">
<sales-loading loading="true" text="Suchen"></sales-loading>
<app-loading loading="true" text="Suchen"></app-loading>
<div class="scan-result">
<span>{{ code }}</span>
</div>

View File

@@ -17,7 +17,7 @@ import {
import { CameraErrorHandler } from '../../camera-error.handler';
@Component({
selector: 'sales-barcode-scanner-scandit',
selector: 'app-barcode-scanner-scandit',
templateUrl: 'barcode-scanner-scandit.component.html',
styleUrls: ['barcode-scanner-scandit.component.scss']
})

View File

@@ -3,7 +3,7 @@ import { BarcodeFormat, Result } from '@zxing/library';
import { ZXingScannerComponent } from '@zxing/ngx-scanner';
@Component({
selector: 'sales-barcode-scanner',
selector: 'app-barcode-scanner',
templateUrl: 'barcode-scanner.component.html',
styleUrls: ['barcode-scanner.component.scss']
})

View File

@@ -10,7 +10,7 @@ import { BookData } from '../../../../core/models/book-data.model';
const points = 60;
@Component({
selector: 'sales-cart-confirmation',
selector: 'app-cart-confirmation',
templateUrl: './cart-confirmation.component.html',
styleUrls: ['./cart-confirmation.component.scss']
})

View File

@@ -77,4 +77,4 @@
</div>
</div>
<sales-pay-method #payMethod></sales-pay-method>
<app-pay-method #payMethod></app-pay-method>

View File

@@ -18,7 +18,7 @@ import { BookData } from '../../../../core/models/book-data.model';
const points = 60;
@Component({
selector: 'sales-cart',
selector: 'app-cart',
templateUrl: './cart-review.component.html',
styleUrls: ['./cart-review.component.scss']
})

View File

@@ -1,4 +1,4 @@
<sales-modal id="pay-method-modal">
<app-modal id="pay-method-modal">
<div class="pay-method-modal">
<div class="header">
@@ -54,4 +54,4 @@
</div>
</div>
</sales-modal>
</app-modal>

View File

@@ -6,7 +6,7 @@ import { Store } from '@ngxs/store';
import { Router } from '@angular/router';
@Component({
selector: 'sales-pay-method',
selector: 'app-pay-method',
templateUrl: './pay-method.component.html',
styleUrls: ['./pay-method.component.scss']
})

View File

@@ -2,7 +2,7 @@
<span>Welche Adresse möchten Sie als Rechnungsadresse verwenden?</span>
</div>
<div class="adresses">
<sales-card
<app-card
*ngFor="let entry of addresses"
class="entry"
(click)="select(entry)"
@@ -39,7 +39,7 @@
<a class="inline-btn" (click)="save(entry)">Speichern</a>
</ng-container>
</span>
</sales-card>
</app-card>
</div>
<h1 class="warning" (click)="addNew()">

View File

@@ -9,7 +9,7 @@ import { ProcessState } from 'apps/sales/src/app/core/store/state/process.state'
import { Observable } from 'rxjs';
@Component({
selector: 'sales-billing-address',
selector: 'app-billing-address',
templateUrl: './billing-address.component.html',
styleUrls: ['./billing-address.component.scss']
})

View File

@@ -27,7 +27,7 @@ import { ProcessState } from '../../../../core/store/state/process.state';
import { Observable } from 'rxjs';
@Component({
selector: 'sales-create-customer-card',
selector: 'app-create-customer-card',
templateUrl: './create-customer-card.component.html',
styleUrls: ['./create-customer-card.component.scss']
})
@@ -52,7 +52,7 @@ export class CreateCustomerCardComponent implements OnInit, AfterViewInit {
ngAfterViewInit() {
this.vornameInput.nativeElement.focus();
}
createUser() {
if (this.userForm.valid) {
this.createProcessIfDosntExists();

View File

@@ -6,12 +6,12 @@
<span>Wie lautet Ihr Name, Ihre E-Mail, Adresse oder Ihre PLZ?</span>
</div>
<div class="search-wrapper">
<sales-search
<app-search
#searchInput
(search)="search($event)"
(input)="searchError = ''; createTab()"
placeholder="Name, E-Mail, PLZ"
[error]="searchError"
></sales-search>
></app-search>
</div>
</div>

View File

@@ -25,7 +25,7 @@ import { ProcessState } from '../../../../core/store/state/process.state';
import { User } from '../../../../core/models/user.model';
@Component({
selector: 'sales-search-customer-card',
selector: 'app-search-customer-card',
templateUrl: './search-customer-card.component.html',
styleUrls: ['./search-customer-card.component.scss']
})

View File

@@ -1,5 +1,5 @@
<div class="customer-search-result-container">
<sales-loading *ngIf="users?.length == 0" loading="true"></sales-loading>
<app-loading *ngIf="users?.length == 0" loading="true"></app-loading>
<div class="user" *ngFor="let user of users">
<div class="user-info-container">
<div class="user-info">

View File

@@ -7,7 +7,7 @@ import { SetActiveUser, ChangeCurrentRoute, SetUserDetails } from '../../../../c
import { Router } from '@angular/router';
@Component({
selector: 'sales-search-customer-result',
selector: 'app-search-customer-result',
templateUrl: './search-customer-result.component.html',
styleUrls: ['./search-customer-result.component.scss']
})

View File

@@ -1,20 +1,20 @@
<div [@listAnimation]="active">
<sales-card
<app-card
*ngFor="let item of navigation"
(click)="switch(item)"
class="header"
>
<span class="customer-section-header">{{ titles[item] }}</span>
</sales-card>
</app-card>
</div>
<div class="content" [ngSwitch]="active">
<div *ngSwitchCase="'search'" [@fadeIn]="active">
<sales-search-customer-card></sales-search-customer-card>
<app-search-customer-card></app-search-customer-card>
</div>
<div *ngSwitchCase="'scan'" [@fadeIn]="active">
Not implemented
</div>
<div *ngSwitchCase="'create'" [@fadeIn]="active">
<sales-create-customer-card></sales-create-customer-card>
<app-create-customer-card></app-create-customer-card>
</div>
</div>

View File

@@ -5,7 +5,7 @@ import { staggerAnimation } from './stagger.animation';
import { Router } from '@angular/router';
import { UpdateCurrentBreadcrumbName } from 'apps/sales/src/app/core/store/actions/process.actions';
@Component({
selector: 'sales-customer-search',
selector: 'app-customer-search',
templateUrl: './customer-search.component.html',
styleUrls: ['./customer-search.component.scss'],
animations: [fadeInAnimation, staggerAnimation]

View File

@@ -1,15 +1,15 @@
<sales-card style="padding:20px 36px;">
<app-card style="padding:20px 36px;">
<h1 class="tabtitle" [@shrinkTitle]="expanded" (click)="expand()">
Rechnungsadresse
</h1>
<div class="placeholder" *ngIf="expanded" [@shrinkMain]="'second'">
<sales-billing-address></sales-billing-address>
<app-billing-address></app-billing-address>
</div>
</sales-card>
<sales-card
</app-card>
<app-card
class="newsletter"
[@shrinkSecondary]="!expanded"
(click)="expanded && expand()"
>
<sales-newsletter-signup></sales-newsletter-signup>
</sales-card>
<app-newsletter-signup></app-newsletter-signup>
</app-card>

View File

@@ -8,7 +8,7 @@ import {
} from './shrink.animation';
@Component({
selector: 'sales-edit-billing-address',
selector: 'app-edit-billing-address',
templateUrl: 'edit-billing-address.component.html',
styleUrls: ['edit-billing-address.component.scss'],
animations: [

View File

@@ -13,7 +13,7 @@ import { Router } from '@angular/router';
import { Breadcrumb } from '../../../../core/models/breadcrumb.model';
@Component({
selector: 'sales-edit-customer-card',
selector: 'app-edit-customer-card',
templateUrl: './edit-customer-card.component.html',
styleUrls: ['./edit-customer-card.component.scss']
})

View File

@@ -4,7 +4,7 @@ import { CatImageService } from 'cat-service';
import { Observable, of } from 'rxjs';
@Component({
selector: 'sales-book-card',
selector: 'app-book-card',
templateUrl: './book-card.component.html',
styleUrls: ['./book-card.component.scss']
})

View File

@@ -2,17 +2,14 @@ import { Component, OnInit, Input } from '@angular/core';
import { FeedCard } from 'apps/sales/src/app/core/models/feed-card.model';
@Component({
selector: 'sales-event-card',
selector: 'app-event-card',
templateUrl: './event-card.component.html',
styleUrls: ['./event-card.component.scss']
})
export class EventCardComponent implements OnInit {
@Input() card: FeedCard;
constructor() { }
ngOnInit() {
}
constructor() {}
ngOnInit() {}
}

View File

@@ -2,7 +2,7 @@ import { Component, OnInit, Input } from '@angular/core';
import { FeedCard } from 'apps/sales/src/app/core/models/feed-card.model';
@Component({
selector: 'sales-news-card',
selector: 'app-news-card',
templateUrl: './news-card.component.html',
styleUrls: ['./news-card.component.scss']
})

View File

@@ -2,7 +2,7 @@ import { Component, OnInit, Input } from '@angular/core';
import { FeedCard } from 'apps/sales/src/app/core/models/feed-card.model';
@Component({
selector: 'sales-recommandation-card',
selector: 'app-recommandation-card',
templateUrl: './recommandation-card.component.html',
styleUrls: ['./recommandation-card.component.scss']
})

View File

@@ -1,22 +1,22 @@
<div [@stagger]="(feed$ | async).length">
<div *ngFor="let card of (feed$ | async)" class="card">
<sales-book-card
<app-book-card
*ngIf="card.type === 'products'"
[card]="card"
></sales-book-card>
<sales-event-card
></app-book-card>
<app-event-card
*ngIf="card.type === 'events'"
[card]="card"
></sales-event-card>
<sales-news-card *ngIf="card.type === 'info'" [card]="card"></sales-news-card>
<sales-recommandation-card
></app-event-card>
<app-news-card *ngIf="card.type === 'info'" [card]="card"></app-news-card>
<app-recommandation-card
*ngIf="card.type === 'REC'"
[card]="card"
></sales-recommandation-card>
></app-recommandation-card>
</div>
</div>
<sales-loading
<app-loading
[loading]="loading$ | async"
text="Inhalte werden geladen"
class="loading"
></sales-loading>
></app-loading>

View File

@@ -7,7 +7,7 @@ import { FeedState } from 'apps/sales/src/app/core/store/state/feed.state';
import { staggerAnimation } from './stagger.animation';
@Component({
selector: 'sales-dashboard',
selector: 'app-dashboard',
templateUrl: './dashboard.component.html',
styleUrls: ['./dashboard.component.scss'],
animations: [staggerAnimation]

View File

@@ -1,14 +1,14 @@
<div class="spacer"></div>
<div [@listAnimation]="active">
<sales-card *ngFor="let item of navigation" (click)="switch(item)">
<app-card *ngFor="let item of navigation" (click)="switch(item)">
{{ item }}
</sales-card>
</app-card>
</div>
<sales-card class="content" [ngSwitch]="active" [@fadeIn]="active">
<app-card class="content" [ngSwitch]="active" [@fadeIn]="active">
<ng-container *ngFor="let nav of navigationOptions">
<div *ngSwitchCase="nav.id">
{{ nav.text }}
</div>
</ng-container>
</sales-card>
</app-card>

View File

@@ -4,7 +4,7 @@ import { fadeInAnimation } from './fade-in.animation';
import { staggerAnimation } from './stagger.animation';
@Component({
selector: 'sales-card-stack-animation',
selector: 'app-card-stack-animation',
templateUrl: 'card-stack-animation.component.html',
styleUrls: ['card-stack-animation.component.scss'],
animations: [fadeInAnimation, staggerAnimation]

View File

@@ -1,13 +1,13 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'sales-loading-animation',
selector: 'app-loading-animation',
template: `
<sales-loading
<app-loading
[loading]="isLoading"
(click)="isLoading = !isLoading"
text="Animation loading text"
></sales-loading>
></app-loading>
`
})
export class LoadingAnimationComponent implements OnInit {

View File

@@ -1,3 +1,3 @@
<sales-card style="padding: 36px;">
<sales-newsletter-signup></sales-newsletter-signup>
</sales-card>
<app-card style="padding: 36px;">
<app-newsletter-signup></app-newsletter-signup>
</app-card>

View File

@@ -1,7 +1,7 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'sales-newsletter-debug',
selector: 'app-newsletter-debug',
templateUrl: 'newsletter-debug.component.html'
})
export class NewsletterDebugComponent implements OnInit {

View File

@@ -1,11 +1,11 @@
<sales-card style="padding:20px 36px;">
<app-card style="padding:20px 36px;">
<h1 class="tabtitle" [@shrinkTitle]="expanded" (click)="expand()">
Rechnungsadresse
</h1>
<div class="placeholder" *ngIf="expanded" [@shrinkMain]="'second'">
<sales-billing-address></sales-billing-address>
<app-billing-address></app-billing-address>
</div>
</sales-card>
<sales-card class="newsletter">
<sales-newsletter-signup></sales-newsletter-signup>
</sales-card>
</app-card>
<app-card class="newsletter">
<app-newsletter-signup></app-newsletter-signup>
</app-card>

View File

@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { shrinkTitleAnimation, shrinkMainAnimation } from './shrink.animation';
@Component({
selector: 'sales-recommendations-animation',
selector: 'app-recommendations-animation',
templateUrl: 'recommendations-animation.component.html',
styleUrls: ['recommendations-animation.component.scss'],
animations: [shrinkTitleAnimation, shrinkMainAnimation]

View File

@@ -2,7 +2,7 @@ import { Component, OnInit, ViewChild, AfterViewInit } from '@angular/core';
import { SignaturePad } from 'angular2-signaturepad/signature-pad';
@Component({
selector: 'sales-signature-pad',
selector: 'app-signature-pad',
template: `
<signature-pad
[options]="signaturePadOptions"

View File

@@ -38,7 +38,7 @@
</div>
</div>
<sales-signature-pad #sigPad class="pad"></sales-signature-pad>
<app-signature-pad #sigPad class="pad"></app-signature-pad>
<div *ngIf="!changes" class="disabled"></div>
<caption class="signature">
Signature

View File

@@ -5,7 +5,7 @@ import { expandAnimation } from './expand.animation';
import { SignaturePadComponent } from './components/signature-pad/signature-pad.component';
@Component({
selector: 'sales-newsletter-signup',
selector: 'app-newsletter-signup',
templateUrl: 'newsletter-signup.component.html',
styleUrls: ['newsletter-signup.component.scss'],
animations: [circleAnimation, removeAnimation, expandAnimation]
@@ -58,8 +58,8 @@ export class NewsletterSignupComponent implements OnInit {
return this.extra.some(i => i.selected);
}
nextStage() {
this.stage = this.stage == 'one' ? 'two' : 'one';
if (this.stage == 'one') {
this.stage = this.stage === 'one' ? 'two' : 'one';
if (this.stage === 'one') {
this.options = [...this.init];
} else {
this.options = this.options.filter(i => i.selected);

View File

@@ -1,4 +1,4 @@
<sales-modal *ngIf="process" id="process-delete-modal-{{process.id}}">
<app-modal *ngIf="process" id="process-delete-modal-{{process.id}}">
<div class="modal">
<div class="header">
<h1>Möchten Sie den Vorgang wirklich löschen?</h1>
@@ -25,4 +25,4 @@
</div>
</div>
</div>
</sales-modal>
</app-modal>

View File

@@ -4,7 +4,7 @@ import { Process } from 'apps/sales/src/app/core/models/process.model';
import { Router } from '@angular/router';
@Component({
selector: 'sales-process-delete-dialog',
selector: 'app-process-delete-dialog',
templateUrl: './process-delete-dialog.component.html',
styleUrls: ['./process-delete-dialog.component.scss']
})

View File

@@ -1,7 +1,7 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'sales-recommendations',
selector: 'app-recommendations',
templateUrl: 'recommendations.component.html',
styleUrls: ['recommendations.component.scss']
})

View File

@@ -4,7 +4,7 @@
Sie sind offline, keine Verbindung zum Netzwerk
</div>
<div class="content-body" [ngClass]="{'offline': isConnected === false}">
<sales-breadcrumbs *ngIf="router.url !== '/dashboard'"></sales-breadcrumbs>
<app-breadcrumbs *ngIf="router.url !== '/dashboard'"></app-breadcrumbs>
<router-outlet></router-outlet>
<div style="height: 90px;"></div>
</div>

View File

@@ -2,7 +2,7 @@ import { Component, OnInit, ViewChild, Input } from '@angular/core';
import { Router } from '@angular/router';
@Component({
selector: 'sales-content',
selector: 'app-content',
templateUrl: './content.component.html',
styleUrls: ['./content.component.scss']
})

View File

@@ -1,7 +1,7 @@
import { Component, OnInit, Output, EventEmitter } from '@angular/core';
@Component({
selector: 'sales-back-arrow',
selector: 'app-back-arrow',
templateUrl: './back-arrow.component.html',
styleUrls: ['./back-arrow.component.scss']
})

View File

@@ -1,7 +1,7 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'sales-card',
selector: 'app-card',
template: `
<ng-content></ng-content>
`,

View File

@@ -10,7 +10,7 @@ import {
} from '@angular/animations';
@Component({
selector: 'sales-loading',
selector: 'app-loading',
template: `
<ng-container *ngIf="loading" [@loading]="loading">
<img

View File

@@ -2,7 +2,7 @@ import { Component, ElementRef, Input, OnInit, OnDestroy } from '@angular/core';
import { ModalService } from '../../../core/services/modal.service';
@Component({
selector: 'sales-modal',
selector: 'app-modal',
template:
`<div class="app-modal">
<div class="app-modal-body">

View File

@@ -9,7 +9,7 @@ import {
} from '@angular/core';
@Component({
selector: 'sales-search',
selector: 'app-search',
template: `
<div class="search-wrapper">
<input

View File

@@ -1,19 +1,28 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Hima</title>
<base href="/">
<head>
<meta charset="utf-8" />
<title>Hima</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,700" rel="stylesheet">
<link rel="manifest" href="manifest.webmanifest" crossorigin="use-credentials">
<meta name="theme-color" content="#1976d2">
</head>
<body>
<sales-root></sales-root>
<noscript>Please enable JavaScript to continue using this application.</noscript>
</body>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link
href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,700"
rel="stylesheet"
/>
<link
rel="manifest"
href="manifest.webmanifest"
crossorigin="use-credentials"
/>
<meta name="theme-color" content="#1976d2" />
</head>
<body>
<app-root></app-root>
<noscript
>Please enable JavaScript to continue using this application.</noscript
>
</body>
</html>

View File

@@ -8,5 +8,10 @@ if (environment.production) {
enableProdMode();
}
platformBrowserDynamic().bootstrapModule(AppModule)
if ('serviceWorker' in navigator && environment.production) {
navigator.serviceWorker.register('./ngsw-worker.js');
}
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch(err => console.error(err));

View File

@@ -118,4 +118,4 @@
"type": "image/png"
}
]
}
}

View File

@@ -15,11 +15,11 @@ pipelines:
- npm install
- node_modules/.bin/ng build cat-service
- node_modules/.bin/ng build feed-service
- node_modules/.bin/ng build --prod
- tar cfz /tmp/$BITBUCKET_BRANCH-$BITBUCKET_REPO_SLUG.tgz -C dist/hima/ .
- node_modules/.bin/ng build sales --prod
- tar cfz /tmp/$BITBUCKET_BRANCH-$BITBUCKET_REPO_SLUG.tgz -C dist/sales/ .
- scp /tmp/$BITBUCKET_BRANCH-$BITBUCKET_REPO_SLUG.tgz $DEPLOYMENT_USER@$TESTING_HOST:/tmp/
- ssh $DEPLOYMENT_USER@$TESTING_HOST "sudo /usr/local/bin/deploy $BITBUCKET_BRANCH-$BITBUCKET_REPO_SLUG $BITBUCKET_BRANCH"
testing:
integration:
- step:
caches:
- node
@@ -28,7 +28,7 @@ pipelines:
- npm install
- node_modules/.bin/ng build cat-service
- node_modules/.bin/ng build feed-service
- node_modules/.bin/ng build --prod
- tar cfz /tmp/$BITBUCKET_BRANCH-$BITBUCKET_REPO_SLUG.tgz -C dist/hima/ .
- node_modules/.bin/ng build sales --prod
- tar cfz /tmp/$BITBUCKET_BRANCH-$BITBUCKET_REPO_SLUG.tgz -C dist/sales/ .
- scp /tmp/$BITBUCKET_BRANCH-$BITBUCKET_REPO_SLUG.tgz $DEPLOYMENT_USER@$TESTING_HOST:/tmp/
- ssh $DEPLOYMENT_USER@$TESTING_HOST "sudo /usr/local/bin/deploy $BITBUCKET_BRANCH-$BITBUCKET_REPO_SLUG $BITBUCKET_BRANCH"

2114
package-lock.json generated
View File

File diff suppressed because it is too large Load Diff

View File

@@ -11,54 +11,56 @@
},
"private": true,
"dependencies": {
"@angular/animations": "~7.2.0",
"@angular/animations": "~7.2.7",
"@angular/cdk": "7.0.0",
"@angular/common": "~7.2.0",
"@angular/compiler": "~7.2.0",
"@angular/core": "~7.2.0",
"@angular/forms": "~7.2.0",
"@angular/platform-browser": "~7.2.0",
"@angular/platform-browser-dynamic": "~7.2.0",
"@angular/pwa": "^0.13.1",
"@angular/router": "~7.2.0",
"@angular/service-worker": "~7.2.0",
"@ngxs/store": "^3.3.4",
"@angular/common": "^7.2.7",
"@angular/compiler": "~7.2.7",
"@angular/core": "~7.2.7",
"@angular/forms": "~7.2.7",
"@angular/platform-browser": "~7.2.7",
"@angular/platform-browser-dynamic": "~7.2.7",
"@angular/pwa": "^0.13.4",
"@angular/router": "~7.2.7",
"@angular/service-worker": "~7.2.7",
"@ngxs/store": "^3.4.1",
"@zxing/ngx-scanner": "^1.3.0",
"angular2-signaturepad": "^2.8.0",
"core-js": "^2.5.4",
"application": "^0.1.4",
"core-js": "^2.6.5",
"ng-connection-service": "^1.0.4",
"ngx-infinite-scroll": "^7.0.1",
"rxjs": "~6.3.3",
"rxjs": "~6.4.0",
"scandit-sdk": "^4.1.1",
"scandit-sdk-angular": "^2.0.0",
"socket.io": "^2.2.0",
"tslib": "^1.9.0",
"zone.js": "~0.8.26"
"uglify-js": "^3.4.9",
"zone.js": "~0.8.29"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.12.0",
"@angular-devkit/build-ng-packagr": "~0.12.0",
"@angular/cli": "~7.2.1",
"@angular/compiler-cli": "~7.2.0",
"@angular/language-service": "~7.2.0",
"@ngxs/devtools-plugin": "^3.3.4",
"@ngxs/logger-plugin": "^3.3.4",
"@types/jasmine": "~2.8.8",
"@angular-devkit/build-angular": "^0.12.4",
"@angular-devkit/build-ng-packagr": "^0.12.4",
"@angular/cli": "^7.2.4",
"@angular/compiler-cli": "^7.2.7",
"@angular/language-service": "~7.2.7",
"@ngxs/devtools-plugin": "^3.4.1",
"@ngxs/logger-plugin": "^3.4.1",
"@types/jasmine": "^2.8.16",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~3.1.1",
"karma": "^4.0.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-coverage-istanbul-reporter": "^2.0.5",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"ng-packagr": "^4.2.0",
"ng-packagr": "^4.7.1",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tsickle": ">=0.34.0",
"tslib": "^1.9.0",
"tsickle": "^0.34.3",
"tslint": "~5.11.0",
"typescript": "~3.2.2"
"typescript": "~3.2.4"
}
}