mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
Add calendar component
This commit is contained in:
@@ -10,4 +10,14 @@ export class AppConfiguration {
|
||||
useMock: false;
|
||||
endpoints: { [key: string]: string };
|
||||
};
|
||||
|
||||
taskCalendarModuleOptions: {
|
||||
useMock: false;
|
||||
endpoints: { [key: string]: string };
|
||||
};
|
||||
|
||||
taskCalendarConfig: {
|
||||
monthsOffset: number;
|
||||
weeksOffset: number;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { NgModule, APP_INITIALIZER, ErrorHandler } from '@angular/core';
|
||||
import { NgModule, ErrorHandler, LOCALE_ID } from '@angular/core';
|
||||
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { AppComponent } from './app.component';
|
||||
@@ -27,7 +27,10 @@ import { AppState } from './core/store/state/app.state';
|
||||
import { CartEntryState } from './core/store/state/cart-entry.state';
|
||||
import { BranchState } from './core/store/state/branches.state';
|
||||
import { SsoModule } from 'sso';
|
||||
import { SsoAuthorizationInterceptor, HttpErrorHandlerInterceptor } from './core/interceptors';
|
||||
import {
|
||||
SsoAuthorizationInterceptor,
|
||||
HttpErrorHandlerInterceptor
|
||||
} from './core/interceptors';
|
||||
import { DatePipe } from '@angular/common';
|
||||
import { CountryState } from './core/store/state/countries.state';
|
||||
import { HimaSalesErrorHandler } from './core/error/hima-sales.error-handler';
|
||||
@@ -43,6 +46,11 @@ import { RemissionState } from './core/store/state/remission.state';
|
||||
import { NgIdleKeepaliveModule } from '@ng-idle/keepalive';
|
||||
import { AppSwaggerModule } from './app-swagger.module';
|
||||
import { AppConfiguration } from './app-configuration';
|
||||
import {
|
||||
TaskCalendarModule,
|
||||
TaskCalendarModuleOptions
|
||||
} from '@isa/task-calendar';
|
||||
import { TaskCalendarConfig } from './modules/task-calendar/task-calendar.config';
|
||||
|
||||
const states = [
|
||||
AppState,
|
||||
@@ -65,7 +73,24 @@ const states = [
|
||||
RemissionState
|
||||
];
|
||||
|
||||
export function remissionModuleOptionsFactory(config: AppConfiguration): RemissionModuleOptions {
|
||||
export function taskCalendarConfigFactory(
|
||||
config: AppConfiguration
|
||||
): TaskCalendarConfig {
|
||||
return new TaskCalendarConfig({
|
||||
month: config.taskCalendarConfig.monthsOffset,
|
||||
weeks: config.taskCalendarConfig.weeksOffset
|
||||
});
|
||||
}
|
||||
|
||||
export function taskCalendarModuleOptionsFactory(
|
||||
config: AppConfiguration
|
||||
): TaskCalendarModuleOptions {
|
||||
return config.taskCalendarModuleOptions;
|
||||
}
|
||||
|
||||
export function remissionModuleOptionsFactory(
|
||||
config: AppConfiguration
|
||||
): RemissionModuleOptions {
|
||||
return config.remissionModuleOptions;
|
||||
}
|
||||
|
||||
@@ -95,6 +120,7 @@ export function remissionModuleOptionsFactory(config: AppConfiguration): Remissi
|
||||
}),
|
||||
NgIdleKeepaliveModule.forRoot(),
|
||||
RemissionModule.forRoot(undefined),
|
||||
TaskCalendarModule.forRoot(undefined),
|
||||
AppSwaggerModule
|
||||
],
|
||||
providers: [
|
||||
@@ -103,20 +129,31 @@ export function remissionModuleOptionsFactory(config: AppConfiguration): Remissi
|
||||
useClass: SsoAuthorizationInterceptor,
|
||||
multi: true
|
||||
},
|
||||
{
|
||||
provide: HTTP_INTERCEPTORS,
|
||||
useClass: HttpErrorHandlerInterceptor,
|
||||
multi: true
|
||||
},
|
||||
{
|
||||
provide: RemissionModuleOptions,
|
||||
useFactory: remissionModuleOptionsFactory,
|
||||
deps: [AppConfiguration]
|
||||
},
|
||||
{
|
||||
provide: HTTP_INTERCEPTORS,
|
||||
useClass: HttpErrorHandlerInterceptor,
|
||||
multi: true
|
||||
provide: TaskCalendarModuleOptions,
|
||||
useFactory: taskCalendarModuleOptionsFactory,
|
||||
deps: [AppConfiguration]
|
||||
},
|
||||
DatePipe,
|
||||
{
|
||||
provide: ErrorHandler,
|
||||
useClass: HimaSalesErrorHandler
|
||||
},
|
||||
{ provide: LOCALE_ID, useValue: 'de-DE' },
|
||||
{
|
||||
provide: TaskCalendarConfig,
|
||||
useFactory: taskCalendarConfigFactory,
|
||||
deps: [AppConfiguration]
|
||||
}
|
||||
],
|
||||
bootstrap: [AppComponent]
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
<!-- Customer module menus -->
|
||||
<div class="menu" *ngIf="module === 0">
|
||||
<div class="menu-grid">
|
||||
<div class="menu-item-grid align-center active" (click)="routeToMenu('/product/search', 'productsearch')">
|
||||
<div
|
||||
class="menu-item-grid align-center active"
|
||||
(click)="routeToMenu('/product/search', 'productsearch')"
|
||||
>
|
||||
<div>
|
||||
<lib-icon
|
||||
class="menu-icon"
|
||||
name="{{
|
||||
router.url === '/product/search' || router.url.startsWith('/product/results') || router.url.startsWith('/product/details')
|
||||
router.url === '/product/search' ||
|
||||
router.url.startsWith('/product/results') ||
|
||||
router.url.startsWith('/product/details')
|
||||
? 'Icon_Artikelsuche'
|
||||
: 'Icon_Artikelsuche_inactive'
|
||||
}}"
|
||||
@@ -16,7 +21,9 @@
|
||||
</div>
|
||||
<span
|
||||
*ngIf="
|
||||
router.url === '/product/search' || router.url.startsWith('/product/results') || router.url.startsWith('/product/details');
|
||||
router.url === '/product/search' ||
|
||||
router.url.startsWith('/product/results') ||
|
||||
router.url.startsWith('/product/details');
|
||||
else articleSearchLabelElse
|
||||
"
|
||||
class="menu-item selected"
|
||||
@@ -26,7 +33,10 @@
|
||||
<span class="menu-item">Artikelsuche</span>
|
||||
</ng-template>
|
||||
</div>
|
||||
<div class="menu-item-grid align-center active" (click)="routeToMenu('/customer/search', 'customersearch')">
|
||||
<div
|
||||
class="menu-item-grid align-center active"
|
||||
(click)="routeToMenu('/customer/search', 'customersearch')"
|
||||
>
|
||||
<div>
|
||||
<lib-icon
|
||||
class="menu-icon"
|
||||
@@ -57,12 +67,17 @@
|
||||
<span class="menu-item">Kundensuche</span>
|
||||
</ng-template>
|
||||
</div>
|
||||
<div class="menu-item-grid align-center active" (click)="routeToMenu('/shelf/search', 'shelfsearch')">
|
||||
<div
|
||||
class="menu-item-grid align-center active"
|
||||
(click)="routeToMenu('/shelf/search', 'shelfsearch')"
|
||||
>
|
||||
<div>
|
||||
<lib-icon
|
||||
class="menu-icon"
|
||||
name="{{
|
||||
router.url === '/shelf/search' || router.url.startsWith('/shelf/results') || router.url.startsWith('/shelf/details')
|
||||
router.url === '/shelf/search' ||
|
||||
router.url.startsWith('/shelf/results') ||
|
||||
router.url.startsWith('/shelf/details')
|
||||
? 'Icon_Abholfach'
|
||||
: 'Icon_Abholfach_inactive'
|
||||
}}"
|
||||
@@ -72,7 +87,9 @@
|
||||
</div>
|
||||
<span
|
||||
*ngIf="
|
||||
router.url === '/shelf/search' || router.url.startsWith('/shelf/results') || router.url.startsWith('/shelf/details');
|
||||
router.url === '/shelf/search' ||
|
||||
router.url.startsWith('/shelf/results') ||
|
||||
router.url.startsWith('/shelf/details');
|
||||
else shelfSearchLabelElse
|
||||
"
|
||||
class="menu-item selected"
|
||||
@@ -87,7 +104,10 @@
|
||||
<!-- Branch module menus -->
|
||||
<div class="branch-menu" *ngIf="module === 1">
|
||||
<div class="menu-grid">
|
||||
<div class="menu-item-grid align-center active" (click)="routeToMenu('/branch/main', 'branchmain')">
|
||||
<div
|
||||
class="menu-item-grid align-center active"
|
||||
(click)="routeToMenu('/branch/main', 'branchmain')"
|
||||
>
|
||||
<div>
|
||||
<lib-icon
|
||||
class="menu-icon"
|
||||
@@ -120,28 +140,59 @@
|
||||
<span class="branch-menu-item">Abholfach</span>
|
||||
</ng-template>
|
||||
</div>
|
||||
<div class="menu-item-grid align-center" (click)="routeToMenu('/task-calendar/calendar', 'taskCalendar')">
|
||||
<div>
|
||||
<lib-icon class="menu-icon" name="{{router.url === '/task-calendar/calendar' || router.url === '/task-calendar/tasks' ? 'Icon_Tatigkeitskalender' : 'Icon_Tatigkeitskalender_inactive'}}" width="34px" height="24px"></lib-icon>
|
||||
</div>
|
||||
<span *ngIf="router.url === '/task-calendar/calendar' || router.url === '/task-calendar/tasks'; else taskCalendarLabelElse" class="branch-menu-item branch-selected">Tätigkeitskalender</span>
|
||||
<ng-template #taskCalendarLabelElse>
|
||||
<span class="branch-menu-item">Tätigkeitskalender</span>
|
||||
</ng-template>
|
||||
</div>
|
||||
<div class="menu-item-grid align-center active" (click)="routeToMenu('/remission/create', 'remission')">
|
||||
<div
|
||||
class="menu-item-grid align-center active"
|
||||
(click)="routeToMenu('/task-calendar/calendar', 'taskCalendar')"
|
||||
>
|
||||
<div>
|
||||
<lib-icon
|
||||
class="menu-icon"
|
||||
name="{{
|
||||
router.url === '/remission/create' || router.url === '/remission/started' ? 'Icon_Remission' : 'Icon_Remission_inactive'
|
||||
router.url === '/task-calendar/calendar' ||
|
||||
router.url === '/task-calendar/tasks'
|
||||
? 'Icon_Tatigkeitskalender'
|
||||
: 'Icon_Tatigkeitskalender_inactive'
|
||||
}}"
|
||||
width="34px"
|
||||
height="24px"
|
||||
></lib-icon>
|
||||
</div>
|
||||
<span
|
||||
*ngIf="router.url === '/remission/create' || router.url === '/remission/started'; else remissionLabelElse"
|
||||
*ngIf="
|
||||
router.url === '/task-calendar/calendar' ||
|
||||
router.url === '/task-calendar/tasks';
|
||||
else taskCalendarLabelElse
|
||||
"
|
||||
class="branch-menu-item branch-selected"
|
||||
>Tätigkeitskalender</span
|
||||
>
|
||||
<ng-template #taskCalendarLabelElse>
|
||||
<span class="branch-menu-item">Tätigkeitskalender</span>
|
||||
</ng-template>
|
||||
</div>
|
||||
<div
|
||||
class="menu-item-grid align-center active"
|
||||
(click)="routeToMenu('/remission/create', 'remission')"
|
||||
>
|
||||
<div>
|
||||
<lib-icon
|
||||
class="menu-icon"
|
||||
name="{{
|
||||
router.url === '/remission/create' ||
|
||||
router.url === '/remission/started'
|
||||
? 'Icon_Remission'
|
||||
: 'Icon_Remission_inactive'
|
||||
}}"
|
||||
width="34px"
|
||||
height="24px"
|
||||
></lib-icon>
|
||||
</div>
|
||||
<span
|
||||
*ngIf="
|
||||
router.url === '/remission/create' ||
|
||||
router.url === '/remission/started';
|
||||
else remissionLabelElse
|
||||
"
|
||||
class="branch-menu-item branch-selected"
|
||||
>Remission</span
|
||||
>
|
||||
|
||||
@@ -223,17 +223,17 @@ export class AppState {
|
||||
this.store.dispatch(new ReloadProcessData(data.processes, data.recentArticles));
|
||||
if ((data.processes && data.processes[currentProcesssId]) || data.branchProcess) {
|
||||
let route: string;
|
||||
const currentProcessId = data.processes
|
||||
&& data.processes[currentProcesssId]
|
||||
const currentBranchProcess = data.branchProcess && data.branchProcess;
|
||||
|
||||
const defaultRoute = '/dashboard';
|
||||
const defaultRouteQueryParams = '';
|
||||
|
||||
if (data.activeModule === ModuleSwitcher.Customer) {
|
||||
const currentProcessIdRoute = data.processes
|
||||
&& data.processes[currentProcesssId]
|
||||
&& data.processes[currentProcesssId].currentRoute;
|
||||
|
||||
route = currentProcessIdRoute || defaultRoute
|
||||
route = currentProcessId && currentProcessId.currentRoute || defaultRoute
|
||||
} else {
|
||||
const branchProcessRoute = data.branchProcess && data.branchProcess.currentRoute;
|
||||
route = branchProcessRoute || defaultRoute
|
||||
route = currentBranchProcess && currentBranchProcess.currentRoute || defaultRoute
|
||||
}
|
||||
|
||||
const currentRoute = route;
|
||||
@@ -250,32 +250,48 @@ export class AppState {
|
||||
this.navigateToCourrentRoute(
|
||||
currentRoute,
|
||||
data.activeModule === ModuleSwitcher.Customer
|
||||
? data.processes[currentProcesssId].currentRouteQueryParams
|
||||
: data.branchProcess.currentRouteQueryParams
|
||||
? currentProcessId && currentProcessId.currentRouteQueryParams
|
||||
? currentProcessId.currentRouteQueryParams
|
||||
: defaultRouteQueryParams
|
||||
: currentBranchProcess && currentBranchProcess.currentRouteQueryParams
|
||||
? currentBranchProcess.currentRouteQueryParams
|
||||
: defaultRouteQueryParams
|
||||
);
|
||||
}
|
||||
} else {
|
||||
this.navigateToCourrentRoute(
|
||||
currentRoute,
|
||||
data.activeModule === ModuleSwitcher.Customer
|
||||
? data.processes[currentProcesssId].currentRouteQueryParams
|
||||
: data.branchProcess.currentRouteQueryParams
|
||||
? currentProcessId && currentProcessId.currentRouteQueryParams
|
||||
? currentProcessId.currentRouteQueryParams
|
||||
: defaultRouteQueryParams
|
||||
: currentBranchProcess && currentBranchProcess.currentRouteQueryParams
|
||||
? currentBranchProcess.currentRouteQueryParams
|
||||
: defaultRouteQueryParams
|
||||
);
|
||||
}
|
||||
} else {
|
||||
this.navigateToCourrentRoute(
|
||||
currentRoute,
|
||||
data.activeModule === ModuleSwitcher.Customer
|
||||
? data.processes[currentProcesssId].currentRouteQueryParams
|
||||
: data.branchProcess.currentRouteQueryParams
|
||||
? currentProcessId && currentProcessId.currentRouteQueryParams
|
||||
? currentProcessId.currentRouteQueryParams
|
||||
: defaultRouteQueryParams
|
||||
: currentBranchProcess && currentBranchProcess.currentRouteQueryParams
|
||||
? currentBranchProcess.currentRouteQueryParams
|
||||
: defaultRouteQueryParams
|
||||
);
|
||||
}
|
||||
} else {
|
||||
this.navigateToCourrentRoute(
|
||||
currentRoute,
|
||||
data.activeModule === ModuleSwitcher.Customer
|
||||
? data.processes[currentProcesssId].currentRouteQueryParams
|
||||
: data.branchProcess.currentRouteQueryParams
|
||||
? currentProcessId && currentProcessId.currentRouteQueryParams
|
||||
? currentProcessId.currentRouteQueryParams
|
||||
: defaultRouteQueryParams
|
||||
: currentBranchProcess && currentBranchProcess.currentRouteQueryParams
|
||||
? currentBranchProcess.currentRouteQueryParams
|
||||
: defaultRouteQueryParams
|
||||
);
|
||||
}
|
||||
} else {
|
||||
|
||||
4
apps/sales/src/app/modules/remission/constants/index.ts
Normal file
4
apps/sales/src/app/modules/remission/constants/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
// start:ng42.barrel
|
||||
export * from './remission.constants';
|
||||
// end:ng42.barrel
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
<div class="calendar" [ngClass]="mode">
|
||||
<div class="header">
|
||||
<ng-container>
|
||||
<div class="placeholder"></div>
|
||||
<div class="navigation">
|
||||
<button class="button back" mat-icon-button (click)="navigateBack()">
|
||||
<img
|
||||
src="assets/images/Arrow_left.svg"
|
||||
width="10px"
|
||||
alt="back button"
|
||||
/>
|
||||
</button>
|
||||
<div class="title">{{ i18n.month[month] }} {{ year }}</div>
|
||||
<button mat-icon-button class="button next" (click)="navigateForth()">
|
||||
<img
|
||||
src="assets/images/Arrow_right.svg"
|
||||
width="10px"
|
||||
alt="back button"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
<table class="body">
|
||||
<thead>
|
||||
<tr class="row">
|
||||
<th></th>
|
||||
<th>M</th>
|
||||
<th>D</th>
|
||||
<th>M</th>
|
||||
<th>D</th>
|
||||
<th>F</th>
|
||||
<th>S</th>
|
||||
<th>S</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="table-body">
|
||||
<ng-container *ngIf="mode === 'month'">
|
||||
<tr
|
||||
class="row"
|
||||
*ngFor="
|
||||
let kw of dateAdapter.getDatesAndCalendarWeeksForMonth(year, month)
|
||||
"
|
||||
>
|
||||
<td
|
||||
(click)="
|
||||
onClickDetails({ year: year, month: month, week: kw.week })
|
||||
"
|
||||
class="kw-cell"
|
||||
[attr.week]="kw.week"
|
||||
>
|
||||
KW {{ kw.week }}
|
||||
</td>
|
||||
<td
|
||||
(click)="
|
||||
onClickDetails({ year: year, month: month, date: day.getDate() })
|
||||
"
|
||||
class="day-cell"
|
||||
[attr.day]="day.getDate()"
|
||||
[class.out-of-month]="day.getMonth() + 1 !== month"
|
||||
*ngFor="let day of kw.dates"
|
||||
>
|
||||
<div class="day" [class.is-sunday]="day.getDay() === 0">
|
||||
{{ day.getDate() }}
|
||||
</div>
|
||||
<div class="items">
|
||||
<ng-container
|
||||
*ngFor="
|
||||
let item of !showAllTasks
|
||||
? (items
|
||||
| calendarItemsFilterPipe: day
|
||||
| calendarItemsFilterUniqueStatusTypePipe)
|
||||
: (items | calendarItemsFilterPipe: day)
|
||||
"
|
||||
>
|
||||
<span
|
||||
*ngIf="item.type === 'Task'"
|
||||
class="indicator"
|
||||
[style.backgroundColor]="item.color"
|
||||
[title]="item.title"
|
||||
(click)="item.action()"
|
||||
>
|
||||
</span>
|
||||
<span
|
||||
*ngIf="item.type === 'Info'"
|
||||
class="indicator info"
|
||||
[style.backgroundColor]="item.color"
|
||||
[title]="item.title"
|
||||
(click)="item.action()"
|
||||
>i</span
|
||||
>
|
||||
</ng-container>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="mode === 'week'">
|
||||
<tr class="row">
|
||||
<td class="kw-cell" [attr.week]="week">KW {{ week }}</td>
|
||||
<td
|
||||
class="day-cell"
|
||||
[attr.day]="day.getDate()"
|
||||
*ngFor="let day of dateAdapter.getDatesForCalendarWeek(year, week)"
|
||||
>
|
||||
<div class="day">
|
||||
{{ day.getDate() }}
|
||||
</div>
|
||||
<div class="items">
|
||||
<span
|
||||
class="indicator"
|
||||
[style.backgroundColor]="item.color"
|
||||
[title]="item.title"
|
||||
*ngFor="
|
||||
let item of !showAllTasks
|
||||
? (items
|
||||
| calendarItemsFilterPipe: day
|
||||
| calendarItemsFilterUniqueStatusTypePipe)
|
||||
: (items | calendarItemsFilterPipe: day)
|
||||
"
|
||||
(click)="item.action()"
|
||||
>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</ng-container>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -0,0 +1,126 @@
|
||||
:host {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.calendar {
|
||||
width: 95%;
|
||||
margin: 0 auto;
|
||||
|
||||
.header {
|
||||
display: grid;
|
||||
align-items: center;
|
||||
grid-template-columns: 2.5fr 14fr;
|
||||
|
||||
.navigation {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 1.25rem;
|
||||
|
||||
.button {
|
||||
appearance: none;
|
||||
border: none;
|
||||
background: none;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.body {
|
||||
width: 100%;
|
||||
|
||||
> *:not(:empty) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.row {
|
||||
display: grid;
|
||||
grid-template-columns: 2fr repeat(7, 2fr);
|
||||
grid-template-rows: 5rem;
|
||||
|
||||
&:only-child {
|
||||
grid-template-rows: 6rem;
|
||||
}
|
||||
|
||||
.kw-cell {
|
||||
color: rgba(89, 100, 112, 1);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
th {
|
||||
color: rgba(89, 100, 112, 1);
|
||||
border-top: 1px solid #555;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
th:first-child {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
th:first-child,
|
||||
td:first-child {
|
||||
border-right: 1px solid #555;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
text-align: center;
|
||||
padding: 0.5rem;
|
||||
|
||||
&:first-child {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
.day-cell.out-of-month {
|
||||
.day,
|
||||
.items,
|
||||
.indicator {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.day-cell {
|
||||
.day {
|
||||
color: rgba(0, 0, 0, 1);
|
||||
font-size: 18px;
|
||||
|
||||
&.is-sunday {
|
||||
color: rgba(137, 148, 158, 1);
|
||||
}
|
||||
}
|
||||
|
||||
.items {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
.indicator {
|
||||
height: 0.7rem;
|
||||
width: 0.7rem;
|
||||
border-radius: 50%;
|
||||
display: block;
|
||||
margin: 0.25rem;
|
||||
color: white;
|
||||
|
||||
&.info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 0.6rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,400 @@
|
||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||
import { CalendarComponent } from './calendar.component';
|
||||
import { CalendarModule } from './calendar.module';
|
||||
|
||||
describe('CalendarComponent', () => {
|
||||
let fixture: ComponentFixture<CalendarComponent>;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CalendarModule]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(CalendarComponent);
|
||||
});
|
||||
|
||||
it('should create the component', () => {
|
||||
expect(fixture.componentInstance).toBeTruthy();
|
||||
});
|
||||
|
||||
describe('#changeMonth', () => {
|
||||
it('should change the month to 1 (January) 2020', () => {
|
||||
spyOn(fixture.componentInstance.monthChange, 'emit').and.callThrough();
|
||||
spyOn(fixture.componentInstance.yearChange, 'emit').and.callThrough();
|
||||
|
||||
fixture.componentInstance.year = 2019;
|
||||
fixture.componentInstance.month = 12;
|
||||
fixture.componentInstance.mode = 'month';
|
||||
|
||||
fixture.componentInstance.changeMonth(1);
|
||||
|
||||
expect(fixture.componentInstance.year).toEqual(2020);
|
||||
expect(fixture.componentInstance.month).toEqual(1);
|
||||
|
||||
expect(fixture.componentInstance.monthChange.emit).toHaveBeenCalledWith(
|
||||
1
|
||||
);
|
||||
expect(fixture.componentInstance.yearChange.emit).toHaveBeenCalledWith(
|
||||
2020
|
||||
);
|
||||
});
|
||||
|
||||
it('should change the month to 12 (December) 2018', () => {
|
||||
spyOn(fixture.componentInstance.monthChange, 'emit').and.callThrough();
|
||||
spyOn(fixture.componentInstance.yearChange, 'emit').and.callThrough();
|
||||
|
||||
fixture.componentInstance.year = 2019;
|
||||
fixture.componentInstance.month = 1;
|
||||
fixture.componentInstance.mode = 'month';
|
||||
|
||||
fixture.componentInstance.changeMonth(-1);
|
||||
|
||||
expect(fixture.componentInstance.month).toEqual(12);
|
||||
expect(fixture.componentInstance.year).toEqual(2018);
|
||||
|
||||
expect(fixture.componentInstance.monthChange.emit).toHaveBeenCalledWith(
|
||||
12
|
||||
);
|
||||
expect(fixture.componentInstance.yearChange.emit).toHaveBeenCalledWith(
|
||||
2018
|
||||
);
|
||||
});
|
||||
|
||||
it('should change the month to 2 (February)', () => {
|
||||
spyOn(fixture.componentInstance.monthChange, 'emit').and.callThrough();
|
||||
spyOn(fixture.componentInstance.yearChange, 'emit').and.callThrough();
|
||||
|
||||
fixture.componentInstance.year = 2020;
|
||||
fixture.componentInstance.month = 1;
|
||||
fixture.componentInstance.mode = 'month';
|
||||
|
||||
fixture.componentInstance.changeMonth(1);
|
||||
|
||||
expect(fixture.componentInstance.year).toEqual(2020);
|
||||
expect(fixture.componentInstance.month).toEqual(2);
|
||||
|
||||
expect(fixture.componentInstance.monthChange.emit).toHaveBeenCalledWith(
|
||||
2
|
||||
);
|
||||
expect(fixture.componentInstance.yearChange.emit).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should change the month to 5 (May)', () => {
|
||||
spyOn(fixture.componentInstance.monthChange, 'emit').and.callThrough();
|
||||
spyOn(fixture.componentInstance.yearChange, 'emit').and.callThrough();
|
||||
|
||||
fixture.componentInstance.year = 2019;
|
||||
fixture.componentInstance.month = 6;
|
||||
fixture.componentInstance.mode = 'month';
|
||||
|
||||
fixture.componentInstance.changeMonth(-1);
|
||||
|
||||
expect(fixture.componentInstance.month).toEqual(5);
|
||||
expect(fixture.componentInstance.year).toEqual(2019);
|
||||
|
||||
expect(fixture.componentInstance.monthChange.emit).toHaveBeenCalledWith(
|
||||
5
|
||||
);
|
||||
expect(fixture.componentInstance.yearChange.emit).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should not change the month if next month is past maxDate', () => {
|
||||
spyOn(fixture.componentInstance.monthChange, 'emit').and.callThrough();
|
||||
spyOn(fixture.componentInstance.yearChange, 'emit').and.callThrough();
|
||||
|
||||
fixture.componentInstance.year = 2019;
|
||||
fixture.componentInstance.month = 6;
|
||||
fixture.componentInstance.maxDate = new Date(2019, 5, 1);
|
||||
fixture.componentInstance.mode = 'month';
|
||||
|
||||
fixture.componentInstance.changeMonth(1);
|
||||
|
||||
expect(fixture.componentInstance.month).toEqual(6);
|
||||
expect(fixture.componentInstance.year).toEqual(2019);
|
||||
|
||||
expect(fixture.componentInstance.monthChange.emit).not.toHaveBeenCalled();
|
||||
expect(fixture.componentInstance.yearChange.emit).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should not change the month if next month is past minDate', () => {
|
||||
spyOn(fixture.componentInstance.monthChange, 'emit').and.callThrough();
|
||||
spyOn(fixture.componentInstance.yearChange, 'emit').and.callThrough();
|
||||
|
||||
fixture.componentInstance.year = 2019;
|
||||
fixture.componentInstance.month = 6;
|
||||
fixture.componentInstance.minDate = new Date(2019, 6, 1);
|
||||
fixture.componentInstance.mode = 'month';
|
||||
|
||||
fixture.componentInstance.changeMonth(-1);
|
||||
|
||||
expect(fixture.componentInstance.month).toEqual(6);
|
||||
expect(fixture.componentInstance.year).toEqual(2019);
|
||||
|
||||
expect(fixture.componentInstance.monthChange.emit).not.toHaveBeenCalled();
|
||||
expect(fixture.componentInstance.yearChange.emit).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
describe('#changeWeek', () => {
|
||||
it('should change the week to 52 (December) 2019', () => {
|
||||
fixture.componentInstance.year = 2020;
|
||||
fixture.componentInstance.week = 1;
|
||||
fixture.componentInstance.mode = 'week';
|
||||
|
||||
fixture.componentInstance.changeWeek(-1);
|
||||
|
||||
expect(fixture.componentInstance.year).toEqual(2019);
|
||||
expect(fixture.componentInstance.month).toEqual(12);
|
||||
expect(fixture.componentInstance.week).toEqual(52);
|
||||
});
|
||||
|
||||
it('should change the week to 1 (January) 2020', () => {
|
||||
fixture.componentInstance.year = 2019;
|
||||
fixture.componentInstance.week = 52;
|
||||
fixture.componentInstance.mode = 'week';
|
||||
|
||||
fixture.componentInstance.changeWeek(1);
|
||||
|
||||
expect(fixture.componentInstance.year).toEqual(2020);
|
||||
expect(fixture.componentInstance.month).toEqual(1);
|
||||
expect(fixture.componentInstance.week).toEqual(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#changeYear', () => {
|
||||
it('should change the year from 2018 to 2019', () => {
|
||||
spyOn(fixture.componentInstance.yearChange, 'emit').and.callThrough();
|
||||
|
||||
fixture.componentInstance.year = 2018;
|
||||
fixture.componentInstance.changeYear(+1);
|
||||
expect(fixture.componentInstance.year).toEqual(2019);
|
||||
|
||||
expect(fixture.componentInstance.yearChange.emit).toHaveBeenCalledWith(
|
||||
2019
|
||||
);
|
||||
});
|
||||
|
||||
it('should change the year from 2018 to 2017', () => {
|
||||
spyOn(fixture.componentInstance.yearChange, 'emit').and.callThrough();
|
||||
|
||||
fixture.componentInstance.year = 2018;
|
||||
fixture.componentInstance.changeYear(-1);
|
||||
expect(fixture.componentInstance.year).toEqual(2017);
|
||||
|
||||
expect(fixture.componentInstance.yearChange.emit).toHaveBeenCalledWith(
|
||||
2017
|
||||
);
|
||||
});
|
||||
|
||||
it('should not change the year if next year is past maxDate', () => {
|
||||
spyOn(fixture.componentInstance.yearChange, 'emit').and.callThrough();
|
||||
|
||||
fixture.componentInstance.year = 2018;
|
||||
fixture.componentInstance.maxDate = new Date(2018, 0, 1);
|
||||
fixture.componentInstance.changeYear(1);
|
||||
expect(fixture.componentInstance.year).toEqual(2018);
|
||||
|
||||
expect(fixture.componentInstance.yearChange.emit).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should not change the year if next year is past minDate', () => {
|
||||
spyOn(fixture.componentInstance.yearChange, 'emit').and.callThrough();
|
||||
|
||||
fixture.componentInstance.year = 2018;
|
||||
fixture.componentInstance.minDate = new Date(2018, 0, 1);
|
||||
fixture.componentInstance.changeYear(-1);
|
||||
expect(fixture.componentInstance.year).toEqual(2018);
|
||||
|
||||
expect(fixture.componentInstance.yearChange.emit).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
describe('calendar header', () => {
|
||||
it('should render the header title Juni 2019', () => {
|
||||
fixture.componentInstance.year = 2019;
|
||||
fixture.componentInstance.month = 6;
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
const componentElement: Element = fixture.nativeElement;
|
||||
|
||||
expect(
|
||||
componentElement.querySelector('.header .title').textContent
|
||||
).toContain('Juni 2019');
|
||||
});
|
||||
});
|
||||
|
||||
describe('calendar item indicator', () => {
|
||||
it('should render the indicator for month', () => {
|
||||
fixture.componentInstance.year = 2019;
|
||||
fixture.componentInstance.month = 6;
|
||||
fixture.componentInstance.items = [
|
||||
{
|
||||
color: 'red',
|
||||
date: new Date(2019, 5, 4),
|
||||
title: 'test 1'
|
||||
},
|
||||
{
|
||||
color: 'red',
|
||||
date: new Date(2019, 5, 23),
|
||||
title: 'test 4'
|
||||
},
|
||||
{
|
||||
color: 'white',
|
||||
date: new Date(2019, 5, 23),
|
||||
title: 'test 5'
|
||||
}
|
||||
];
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
const componentElement: Element = fixture.nativeElement;
|
||||
|
||||
const item1: HTMLElement = componentElement.querySelector(
|
||||
'.day-cell[day="4"] .indicator[title="test 1"]'
|
||||
);
|
||||
|
||||
expect(item1).not.toBeNull();
|
||||
expect(item1.style.backgroundColor).toBe('red');
|
||||
|
||||
const item2: HTMLElement = componentElement.querySelector(
|
||||
'.day-cell[day="23"] .indicator[title="test 4"]'
|
||||
);
|
||||
|
||||
expect(item2).not.toBeNull();
|
||||
expect(item2.style.backgroundColor).toBe('red');
|
||||
|
||||
const item3: HTMLElement = componentElement.querySelector(
|
||||
'.day-cell[day="23"] .indicator[title="test 5"]'
|
||||
);
|
||||
|
||||
expect(item3).not.toBeNull();
|
||||
expect(item3.style.backgroundColor).toBe('white');
|
||||
});
|
||||
|
||||
it('should render the indicator for week', () => {
|
||||
fixture.componentInstance.year = 2019;
|
||||
fixture.componentInstance.month = 6;
|
||||
fixture.componentInstance.week = 23;
|
||||
fixture.componentInstance.mode = 'week';
|
||||
fixture.componentInstance.items = [
|
||||
{
|
||||
color: 'red',
|
||||
date: new Date(2019, 5, 4),
|
||||
title: 'test 1'
|
||||
},
|
||||
{
|
||||
color: 'red',
|
||||
date: new Date(2019, 5, 6),
|
||||
title: 'test 4'
|
||||
},
|
||||
{
|
||||
color: 'white',
|
||||
date: new Date(2019, 5, 6),
|
||||
title: 'test 5'
|
||||
}
|
||||
];
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
const componentElement: Element = fixture.nativeElement;
|
||||
|
||||
const item1: HTMLElement = componentElement.querySelector(
|
||||
'.day-cell[day="4"] .indicator[title="test 1"]'
|
||||
);
|
||||
|
||||
expect(item1).not.toBeNull();
|
||||
expect(item1.style.backgroundColor).toBe('red');
|
||||
|
||||
const item2: HTMLElement = componentElement.querySelector(
|
||||
'.day-cell[day="6"] .indicator[title="test 4"]'
|
||||
);
|
||||
|
||||
expect(item2).not.toBeNull();
|
||||
expect(item2.style.backgroundColor).toBe('red');
|
||||
|
||||
const item3: HTMLElement = componentElement.querySelector(
|
||||
'.day-cell[day="6"] .indicator[title="test 5"]'
|
||||
);
|
||||
|
||||
expect(item3).not.toBeNull();
|
||||
expect(item3.style.backgroundColor).toBe('white');
|
||||
});
|
||||
});
|
||||
|
||||
describe('calendar navigation', () => {
|
||||
it('should trigger changeMonths with 1 when button is clicked ', () => {
|
||||
spyOn(fixture.componentInstance, 'changeMonth').and.callThrough();
|
||||
|
||||
fixture.componentInstance.year = 2019;
|
||||
fixture.componentInstance.month = 6;
|
||||
fixture.componentInstance.mode = 'month';
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
const componentElement: Element = fixture.nativeElement;
|
||||
|
||||
const buttonNext: HTMLElement = componentElement.querySelector(
|
||||
'.header button.next'
|
||||
);
|
||||
|
||||
buttonNext.click();
|
||||
|
||||
expect(fixture.componentInstance.changeMonth).toHaveBeenCalledWith(1);
|
||||
});
|
||||
|
||||
it('should trigger changeMonths with -1 when button is clicked ', () => {
|
||||
spyOn(fixture.componentInstance, 'changeMonth').and.callThrough();
|
||||
|
||||
fixture.componentInstance.year = 2019;
|
||||
fixture.componentInstance.month = 6;
|
||||
fixture.componentInstance.mode = 'month';
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
const componentElement: Element = fixture.nativeElement;
|
||||
|
||||
const buttonBack: HTMLElement = componentElement.querySelector(
|
||||
'.header button.back'
|
||||
);
|
||||
|
||||
buttonBack.click();
|
||||
|
||||
expect(fixture.componentInstance.changeMonth).toHaveBeenCalledWith(-1);
|
||||
});
|
||||
|
||||
it('should trigger changeWeek with 1 when button is clicked', () => {
|
||||
spyOn(fixture.componentInstance, 'changeWeek').and.callThrough();
|
||||
fixture.componentInstance.year = 2019;
|
||||
fixture.componentInstance.week = 23;
|
||||
fixture.componentInstance.mode = 'week';
|
||||
|
||||
fixture.detectChanges();
|
||||
const componentElement: Element = fixture.nativeElement;
|
||||
|
||||
const buttonNext: HTMLElement = componentElement.querySelector(
|
||||
'.header button.next'
|
||||
);
|
||||
|
||||
buttonNext.click();
|
||||
expect(fixture.componentInstance.changeWeek).toHaveBeenCalledWith(1);
|
||||
});
|
||||
|
||||
it('should trigger changeWeek with -1 when button is clicked', () => {
|
||||
spyOn(fixture.componentInstance, 'changeWeek').and.callThrough();
|
||||
fixture.componentInstance.year = 2019;
|
||||
fixture.componentInstance.week = 23;
|
||||
fixture.componentInstance.mode = 'week';
|
||||
|
||||
fixture.detectChanges();
|
||||
const componentElement: Element = fixture.nativeElement;
|
||||
|
||||
const buttonBack: HTMLElement = componentElement.querySelector(
|
||||
'.header button.back'
|
||||
);
|
||||
|
||||
buttonBack.click();
|
||||
expect(fixture.componentInstance.changeWeek).toHaveBeenCalledWith(-1);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,275 @@
|
||||
import {
|
||||
Component,
|
||||
OnInit,
|
||||
Input,
|
||||
Output,
|
||||
EventEmitter,
|
||||
OnChanges,
|
||||
SimpleChanges
|
||||
} from '@angular/core';
|
||||
import { CalendarI18NProvider, DateAdapter } from './providers';
|
||||
import { CalendarItem } from '../../models';
|
||||
import { CalendarNavigation } from '../../enums';
|
||||
|
||||
@Component({
|
||||
selector: 'app-calendar',
|
||||
templateUrl: 'calendar.component.html',
|
||||
styleUrls: ['calendar.component.scss']
|
||||
})
|
||||
export class CalendarComponent implements OnInit, OnChanges {
|
||||
@Input()
|
||||
mode: 'week' | 'month' = 'month';
|
||||
|
||||
/**
|
||||
* Muss gesetzt sein wenn mode = week und month
|
||||
*/
|
||||
@Input()
|
||||
year: number;
|
||||
@Output()
|
||||
yearChange = new EventEmitter<number>();
|
||||
|
||||
/**
|
||||
* Muss gesetzt sein wenn mode = month
|
||||
*/
|
||||
@Input()
|
||||
month: number;
|
||||
@Output()
|
||||
monthChange = new EventEmitter<number>();
|
||||
|
||||
/**
|
||||
* Muss gesetzt sein wenn mode = week
|
||||
*/
|
||||
@Input()
|
||||
week: number;
|
||||
@Output()
|
||||
weekChange = new EventEmitter<number>();
|
||||
|
||||
@Input()
|
||||
items: CalendarItem[];
|
||||
|
||||
@Input()
|
||||
minDate: Date;
|
||||
|
||||
@Input()
|
||||
maxDate: Date;
|
||||
|
||||
/**
|
||||
* Sollen alle Aufgaben im Indikator (Rundes Bubble) angezeigt werden
|
||||
* default: unique only
|
||||
*/
|
||||
@Input()
|
||||
showAllTasks = false;
|
||||
|
||||
/**
|
||||
* Sprung in Tätigkeitsliste
|
||||
*/
|
||||
@Output()
|
||||
viewTasks = new EventEmitter<{ year: number; month: number; date: number }>();
|
||||
|
||||
constructor(
|
||||
public i18n: CalendarI18NProvider,
|
||||
public dateAdapter: DateAdapter
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
window['dateAdapter'] = this.dateAdapter;
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
if (this.mode === 'week' && changes['week'] && !!this.week && !!this.year) {
|
||||
const month = this.dateAdapter.getMonthForCalendarWeek(
|
||||
this.year,
|
||||
this.week
|
||||
);
|
||||
this.setMonth(month, { emit: false });
|
||||
}
|
||||
}
|
||||
|
||||
private pad2 = (num: number) => {
|
||||
return (num < 10 ? '0' : '') + num;
|
||||
};
|
||||
|
||||
changeMonth(val: CalendarNavigation) {
|
||||
let min: { year: number; month: number };
|
||||
let max: { year: number; month: number };
|
||||
|
||||
if (this.minDate) {
|
||||
min = this.dateAdapter.getDate(this.minDate);
|
||||
}
|
||||
if (this.maxDate) {
|
||||
max = this.dateAdapter.getDate(this.maxDate);
|
||||
}
|
||||
|
||||
const next = {
|
||||
year: this.year,
|
||||
month: this.month + val
|
||||
};
|
||||
|
||||
if (next.month < 1) {
|
||||
next.month = 12 + next.month;
|
||||
next.year = next.year - 1;
|
||||
} else if (next.month > 12) {
|
||||
next.month = next.month - 12;
|
||||
next.year = next.year + 1;
|
||||
}
|
||||
|
||||
const nextStr = +`${next.year}${this.pad2(next.month)}`;
|
||||
const minStr = +!!min ? +`${min.year}${this.pad2(min.month)}` : undefined;
|
||||
const maxStr = +!!max ? +`${max.year}${this.pad2(max.month)}` : undefined;
|
||||
|
||||
if (
|
||||
(!!maxStr ? nextStr <= maxStr : true) &&
|
||||
(!!minStr ? nextStr >= minStr : true)
|
||||
) {
|
||||
this.setMonth(next.month);
|
||||
this.setYear(next.year);
|
||||
}
|
||||
}
|
||||
|
||||
changeYear(val: CalendarNavigation) {
|
||||
let maxYear: number;
|
||||
let minYear: number;
|
||||
|
||||
if (this.maxDate) {
|
||||
maxYear = this.maxDate.getFullYear();
|
||||
}
|
||||
|
||||
if (this.minDate) {
|
||||
minYear = this.minDate.getFullYear();
|
||||
}
|
||||
|
||||
if (
|
||||
this.year !== this.year + val &&
|
||||
(!!maxYear ? maxYear >= this.year + val : true) &&
|
||||
(!!minYear ? minYear <= this.year + val : true)
|
||||
) {
|
||||
this.setYear(this.year + val);
|
||||
}
|
||||
}
|
||||
|
||||
changeWeek(val: CalendarNavigation) {
|
||||
let min: { year: number; week: number };
|
||||
let max: { year: number; week: number };
|
||||
|
||||
if (this.minDate) {
|
||||
const date = this.dateAdapter.getDate(this.minDate);
|
||||
min = {
|
||||
year: date.year,
|
||||
week: this.dateAdapter.getCalendarWeek(date.year, date.month, date.date)
|
||||
};
|
||||
}
|
||||
if (this.maxDate) {
|
||||
const date = this.dateAdapter.getDate(this.maxDate);
|
||||
max = {
|
||||
year: date.year,
|
||||
week: this.dateAdapter.getCalendarWeek(date.year, date.month, date.date)
|
||||
};
|
||||
}
|
||||
|
||||
let nextWeek = this.week + val;
|
||||
let nextYear = this.year;
|
||||
|
||||
if (nextWeek > 52) {
|
||||
nextWeek = 1;
|
||||
nextYear = this.year + 1;
|
||||
} else if (nextWeek === 0) {
|
||||
nextWeek = 52;
|
||||
nextYear = this.year - 1;
|
||||
}
|
||||
|
||||
const nextStr = +`${nextYear}${this.pad2(nextWeek)}`;
|
||||
const minStr = !!min ? +`${min.year}${this.pad2(min.week)}` : undefined;
|
||||
const maxStr = !!max ? +`${max.year}${this.pad2(max.week)}` : undefined;
|
||||
|
||||
if (
|
||||
(!!maxStr ? nextStr <= maxStr : true) &&
|
||||
(!!minStr ? nextStr >= minStr : true)
|
||||
) {
|
||||
const nextMonth = this.dateAdapter.getMonthForCalendarWeek(
|
||||
nextYear,
|
||||
nextWeek
|
||||
);
|
||||
|
||||
this.setWeek(nextWeek);
|
||||
this.setYear(nextYear);
|
||||
this.setMonth(nextMonth);
|
||||
}
|
||||
}
|
||||
|
||||
navigateForth() {
|
||||
if (this.mode === 'month') {
|
||||
this.changeMonth(CalendarNavigation.Next);
|
||||
} else {
|
||||
this.changeWeek(CalendarNavigation.Next);
|
||||
}
|
||||
}
|
||||
|
||||
navigateBack() {
|
||||
if (this.mode === 'month') {
|
||||
this.changeMonth(CalendarNavigation.Prev);
|
||||
} else {
|
||||
this.changeWeek(CalendarNavigation.Prev);
|
||||
}
|
||||
}
|
||||
|
||||
setYear(year: number, options: { emit?: boolean } = { emit: true }) {
|
||||
if (this.year !== year) {
|
||||
this.year = year;
|
||||
|
||||
if (options && options.emit) {
|
||||
this.yearChange.emit(year);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setMonth(month: number, options: { emit?: boolean } = { emit: true }) {
|
||||
if (this.month !== month) {
|
||||
this.month = month;
|
||||
|
||||
if (options && options.emit) {
|
||||
this.monthChange.emit(month);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setWeek(week: number, options: { emit?: boolean } = { emit: true }) {
|
||||
if (this.week !== week) {
|
||||
this.week = week;
|
||||
|
||||
if (options && options.emit) {
|
||||
this.weekChange.emit(week);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onClickDetails(target: {
|
||||
year: number;
|
||||
month: number;
|
||||
date?: number;
|
||||
week?: number;
|
||||
}) {
|
||||
console.log('onClickDetails [Start]', target);
|
||||
|
||||
const targetDate = target;
|
||||
|
||||
if (!target.date && !!target.week) {
|
||||
const dates = this.dateAdapter.getDatesForCalendarWeek(
|
||||
target.year,
|
||||
target.week
|
||||
);
|
||||
|
||||
targetDate.date = this.dateAdapter.getDate(dates[0]).date;
|
||||
target.month = this.dateAdapter.getDate(dates[0]).month;
|
||||
targetDate.year = this.dateAdapter.getDate(dates[0]).year;
|
||||
}
|
||||
|
||||
delete target.week;
|
||||
console.log('onClickDetails [Emit]', target);
|
||||
|
||||
this.viewTasks.emit({
|
||||
year: target.year,
|
||||
month: target.month,
|
||||
date: target.date
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { CalendarComponent } from './calendar.component';
|
||||
import { TaskCalendarPipesModule } from '../../pipes';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, TaskCalendarPipesModule],
|
||||
exports: [CalendarComponent],
|
||||
declarations: [CalendarComponent],
|
||||
providers: []
|
||||
})
|
||||
export class CalendarModule {}
|
||||
@@ -0,0 +1,5 @@
|
||||
// start:ng42.barrel
|
||||
export * from './calendar.component';
|
||||
export * from './calendar.module';
|
||||
// end:ng42.barrel
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class CalendarI18NProvider {
|
||||
|
||||
month = {
|
||||
1: 'Januar',
|
||||
2: 'Februar',
|
||||
3: 'März',
|
||||
4: 'April',
|
||||
5: 'Mai',
|
||||
6: 'Juni',
|
||||
7: 'Juli',
|
||||
8: 'August',
|
||||
9: 'September',
|
||||
10: 'Oktober',
|
||||
11: 'November',
|
||||
12: 'Dezember'
|
||||
};
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
import { DateAdapter } from './data.adapter';
|
||||
import { CalendarItem } from '../../../models';
|
||||
import { CalendarItemsFilterPipe } from '../../../pipes';
|
||||
|
||||
describe('CalendarItemsFilterPipe', () => {
|
||||
|
||||
let pipe: CalendarItemsFilterPipe;
|
||||
|
||||
beforeEach(() => {
|
||||
pipe = new CalendarItemsFilterPipe(new DateAdapter());
|
||||
});
|
||||
|
||||
it('should return all CalendarItems which equals the input date', () => {
|
||||
|
||||
|
||||
const items: CalendarItem[] = [
|
||||
{
|
||||
color: 'red',
|
||||
date: new Date(2020, 5, 20),
|
||||
title: 'test1'
|
||||
},
|
||||
{
|
||||
color: 'red',
|
||||
date: new Date(2020, 5, 12),
|
||||
title: 'test2'
|
||||
},
|
||||
{
|
||||
color: 'red',
|
||||
date: '2020-06-19T22:00:00.000Z' as unknown as Date,
|
||||
title: 'test3'
|
||||
},
|
||||
{
|
||||
color: 'red',
|
||||
date: new Date(2020, 5, 23),
|
||||
title: 'test4'
|
||||
},
|
||||
{
|
||||
color: 'red',
|
||||
date: new Date(2020, 5, 11),
|
||||
title: 'test5'
|
||||
}
|
||||
];
|
||||
|
||||
const filteredItems = pipe.transform(items, new Date(2020, 5, 20));
|
||||
|
||||
expect(filteredItems.length).toEqual(2);
|
||||
|
||||
expect(filteredItems[0].title).toBe('test1');
|
||||
expect(filteredItems[1].title).toBe('test3');
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
@@ -0,0 +1,147 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class DateAdapter {
|
||||
getDatesAndCalendarWeeksForMonth(year: number, month: number) {
|
||||
const result: { week: number; dates: Date[] }[] = [];
|
||||
const weeks = this.getCalendarWeeksForMonth(year, month);
|
||||
|
||||
for (const week of weeks) {
|
||||
let iWeek = week;
|
||||
if (month === 12 && week === 1) {
|
||||
iWeek = 53;
|
||||
}
|
||||
|
||||
const dates = this.getDatesForCalendarWeek(year, iWeek);
|
||||
|
||||
result.push({
|
||||
week,
|
||||
dates
|
||||
});
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
getDatesForCalendarWeek(year: number, week: number): Date[] {
|
||||
const firstDateOfYear = this.parseDate(year, 1, 1);
|
||||
const firstDayOfYear = firstDateOfYear.getDay();
|
||||
let firstDayOfWeek = 0;
|
||||
|
||||
if (firstDayOfYear === 0) {
|
||||
firstDayOfWeek = 2;
|
||||
} else if (firstDayOfYear <= 3) {
|
||||
firstDayOfWeek = -firstDayOfYear + 2;
|
||||
} else {
|
||||
firstDayOfWeek = -firstDayOfYear + 9;
|
||||
}
|
||||
|
||||
const firstDateOfWeek = this.getDate(
|
||||
this.parseDate(year, 1, firstDayOfWeek)
|
||||
);
|
||||
|
||||
const dates: Date[] = [];
|
||||
|
||||
for (let i = 0; i < 7; i++) {
|
||||
dates.push(
|
||||
this.parseDate(
|
||||
firstDateOfWeek.year,
|
||||
firstDateOfWeek.month,
|
||||
firstDateOfWeek.date + i + (week - 1) * 7
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return dates;
|
||||
}
|
||||
|
||||
getCalendarWeek(year: number, month: number, date: number) {
|
||||
const weekDate = this.parseDate(year, month, date);
|
||||
const firstDateOfYear = this.parseDate(year, 1, 1);
|
||||
|
||||
const totalDays =
|
||||
(weekDate.getTime() - firstDateOfYear.getTime()) / 86400000;
|
||||
|
||||
const week = Math.ceil((totalDays + 4 - (weekDate.getDay() || 7)) / 7);
|
||||
|
||||
return week > 52 ? 1 : week;
|
||||
}
|
||||
|
||||
getMonthForCalendarWeek(year: number, week: number) {
|
||||
const dates = this.getDatesForCalendarWeek(year, week);
|
||||
return this.getDate(dates[3]).month;
|
||||
}
|
||||
|
||||
getCalendarWeeksForMonth(year: number, month: number): number[] {
|
||||
const weekStart = this.getCalendarWeek(year, month, 1);
|
||||
let weekEnd = this.getCalendarWeek(year, month + 1, 0);
|
||||
|
||||
let weeks: number[] = [];
|
||||
|
||||
if (weekEnd === 1) {
|
||||
weekEnd = 53;
|
||||
}
|
||||
|
||||
for (let index = 0; index <= weekEnd - weekStart; index++) {
|
||||
weeks.push(weekStart + index);
|
||||
}
|
||||
|
||||
if (weeks[weeks.length - 1] === 53) {
|
||||
weeks = [...weeks.splice(0, weeks.length - 1), 1];
|
||||
}
|
||||
|
||||
return weeks;
|
||||
}
|
||||
|
||||
parseDate(year: number, month: number, date: number) {
|
||||
return new Date(year, month - 1, date);
|
||||
}
|
||||
|
||||
getDate(date: Date): { year: number; month: number; date: number } {
|
||||
return {
|
||||
year: date.getFullYear(),
|
||||
month: date.getMonth() + 1,
|
||||
date: date.getDate()
|
||||
};
|
||||
}
|
||||
|
||||
equals(date1: Date, date2: Date) {
|
||||
date1 = new Date(date1);
|
||||
date2 = new Date(date2);
|
||||
|
||||
return (
|
||||
date1.getFullYear() === date2.getFullYear() &&
|
||||
date1.getMonth() === date2.getMonth() &&
|
||||
date1.getDate() === date2.getDate()
|
||||
);
|
||||
}
|
||||
|
||||
isLessThan(date1: Date, date2: Date): boolean {
|
||||
date1 = new Date(date1);
|
||||
date2 = new Date(date2);
|
||||
|
||||
return (
|
||||
date1.getFullYear() >= date2.getFullYear() &&
|
||||
date1.getMonth() >= date2.getMonth() &&
|
||||
date1.getDate() > date2.getDate()
|
||||
);
|
||||
}
|
||||
|
||||
isGreaterThan(date1: Date, date2: Date): boolean {
|
||||
date1 = new Date(date1);
|
||||
date2 = new Date(date2);
|
||||
|
||||
return (
|
||||
date1.getFullYear() <= date2.getFullYear() &&
|
||||
date1.getMonth() <= date2.getMonth() &&
|
||||
date1.getDate() < date2.getDate()
|
||||
);
|
||||
}
|
||||
|
||||
addDaysToDate(date: Date, daysToAdd: number): Date {
|
||||
const newDate = date;
|
||||
newDate.setDate(newDate.getDate() + daysToAdd);
|
||||
|
||||
return newDate;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,349 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { DateAdapter } from './data.adapter';
|
||||
|
||||
describe('DateAdapter', () => {
|
||||
|
||||
let adapter: DateAdapter;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
|
||||
adapter = TestBed.get(DateAdapter);
|
||||
});
|
||||
|
||||
it('should create the service', () => {
|
||||
expect(adapter instanceof DateAdapter).toBeTruthy();
|
||||
});
|
||||
|
||||
describe('#getDatesAndCalendarWeeksForMonth', () => {
|
||||
|
||||
it('should return the calendar weeks and dates for 01.2019', () => {
|
||||
const weeks = adapter.getDatesAndCalendarWeeksForMonth(2019, 1);
|
||||
|
||||
// woche 1
|
||||
const datesWeek1 = [
|
||||
adapter.parseDate(2018, 12, 31),
|
||||
adapter.parseDate(2019, 1, 1),
|
||||
adapter.parseDate(2019, 1, 2),
|
||||
adapter.parseDate(2019, 1, 3),
|
||||
adapter.parseDate(2019, 1, 4),
|
||||
adapter.parseDate(2019, 1, 5),
|
||||
adapter.parseDate(2019, 1, 6)
|
||||
];
|
||||
const week1 = weeks.find(w => w.week === 1);
|
||||
expect(week1).toBeDefined();
|
||||
|
||||
for (let index = 0; index < datesWeek1.length; index++) {
|
||||
expect(week1.dates[index]).toEqual(datesWeek1[index]);
|
||||
}
|
||||
|
||||
// woche 2
|
||||
const datesWeek2 = [
|
||||
adapter.parseDate(2019, 1, 7),
|
||||
adapter.parseDate(2019, 1, 8),
|
||||
adapter.parseDate(2019, 1, 9),
|
||||
adapter.parseDate(2019, 1, 10),
|
||||
adapter.parseDate(2019, 1, 11),
|
||||
adapter.parseDate(2019, 1, 12),
|
||||
adapter.parseDate(2019, 1, 13)
|
||||
];
|
||||
const week2 = weeks.find(w => w.week === 2);
|
||||
expect(week2).toBeDefined();
|
||||
|
||||
for (let index = 0; index < datesWeek2.length; index++) {
|
||||
expect(week2.dates[index]).toEqual(datesWeek2[index]);
|
||||
}
|
||||
|
||||
// woche 3
|
||||
const datesWeek3 = [
|
||||
adapter.parseDate(2019, 1, 14),
|
||||
adapter.parseDate(2019, 1, 15),
|
||||
adapter.parseDate(2019, 1, 16),
|
||||
adapter.parseDate(2019, 1, 17),
|
||||
adapter.parseDate(2019, 1, 18),
|
||||
adapter.parseDate(2019, 1, 19),
|
||||
adapter.parseDate(2019, 1, 20)
|
||||
];
|
||||
const week3 = weeks.find(w => w.week === 3);
|
||||
expect(week3).toBeDefined();
|
||||
|
||||
for (let index = 0; index < datesWeek3.length; index++) {
|
||||
expect(week3.dates[index]).toEqual(datesWeek3[index]);
|
||||
}
|
||||
|
||||
// woche 4
|
||||
const datesWeek4 = [
|
||||
adapter.parseDate(2019, 1, 21),
|
||||
adapter.parseDate(2019, 1, 22),
|
||||
adapter.parseDate(2019, 1, 23),
|
||||
adapter.parseDate(2019, 1, 24),
|
||||
adapter.parseDate(2019, 1, 25),
|
||||
adapter.parseDate(2019, 1, 26),
|
||||
adapter.parseDate(2019, 1, 27)
|
||||
];
|
||||
const week4 = weeks.find(w => w.week === 4);
|
||||
expect(week4).toBeDefined();
|
||||
|
||||
for (let index = 0; index < datesWeek4.length; index++) {
|
||||
expect(week4.dates[index]).toEqual(datesWeek4[index]);
|
||||
}
|
||||
|
||||
// woche 5
|
||||
const datesWeek5 = [
|
||||
adapter.parseDate(2019, 1, 28),
|
||||
adapter.parseDate(2019, 1, 29),
|
||||
adapter.parseDate(2019, 1, 30),
|
||||
adapter.parseDate(2019, 1, 31),
|
||||
adapter.parseDate(2019, 2, 1),
|
||||
adapter.parseDate(2019, 2, 2),
|
||||
adapter.parseDate(2019, 2, 3)
|
||||
];
|
||||
const week5 = weeks.find(w => w.week === 5);
|
||||
expect(week5).toBeDefined();
|
||||
|
||||
for (let index = 0; index < datesWeek5.length; index++) {
|
||||
expect(week5.dates[index]).toEqual(datesWeek5[index]);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
it('should return the calendar weeks and dates for 12.2019', () => {
|
||||
const weeks = adapter.getDatesAndCalendarWeeksForMonth(2019, 12);
|
||||
|
||||
// erste woche
|
||||
const datesWeek1 = [
|
||||
adapter.parseDate(2019, 11, 25),
|
||||
adapter.parseDate(2019, 11, 26),
|
||||
adapter.parseDate(2019, 11, 27),
|
||||
adapter.parseDate(2019, 11, 28),
|
||||
adapter.parseDate(2019, 11, 29),
|
||||
adapter.parseDate(2019, 11, 30),
|
||||
adapter.parseDate(2019, 12, 1)
|
||||
];
|
||||
const week1 = weeks.find(w => w.week === 48);
|
||||
expect(week1).toBeDefined();
|
||||
|
||||
for (let index = 0; index < datesWeek1.length; index++) {
|
||||
expect(week1.dates[index]).toEqual(datesWeek1[index]);
|
||||
}
|
||||
|
||||
// letzte woche
|
||||
const datesWeek2 = [
|
||||
adapter.parseDate(2019, 12, 30),
|
||||
adapter.parseDate(2019, 12, 31),
|
||||
adapter.parseDate(2020, 1, 1),
|
||||
adapter.parseDate(2020, 1, 2),
|
||||
adapter.parseDate(2020, 1, 3),
|
||||
adapter.parseDate(2020, 1, 4),
|
||||
adapter.parseDate(2020, 1, 5)
|
||||
];
|
||||
const week2 = weeks.find(w => w.week === 1);
|
||||
expect(week2).toBeDefined();
|
||||
|
||||
for (let index = 0; index < datesWeek2.length; index++) {
|
||||
expect(week2.dates[index]).toEqual(datesWeek2[index]);
|
||||
}
|
||||
});
|
||||
|
||||
it('should return the calendar weeks and dates for 06.2020', () => {
|
||||
const weeks = adapter.getDatesAndCalendarWeeksForMonth(2020, 6);
|
||||
|
||||
// erste woche
|
||||
const datesWeek1 = [
|
||||
adapter.parseDate(2020, 6, 1),
|
||||
adapter.parseDate(2020, 6, 2),
|
||||
adapter.parseDate(2020, 6, 3),
|
||||
adapter.parseDate(2020, 6, 4),
|
||||
adapter.parseDate(2020, 6, 5),
|
||||
adapter.parseDate(2020, 6, 6),
|
||||
adapter.parseDate(2020, 6, 7)
|
||||
];
|
||||
const week1 = weeks.find(w => w.week === 23);
|
||||
expect(week1).toBeDefined();
|
||||
|
||||
for (let index = 0; index < datesWeek1.length; index++) {
|
||||
expect(week1.dates[index]).toEqual(datesWeek1[index]);
|
||||
}
|
||||
|
||||
// letzte woche
|
||||
const datesWeek2 = [
|
||||
adapter.parseDate(2020, 6, 29),
|
||||
adapter.parseDate(2020, 6, 30),
|
||||
adapter.parseDate(2020, 7, 1),
|
||||
adapter.parseDate(2020, 7, 2),
|
||||
adapter.parseDate(2020, 7, 3),
|
||||
adapter.parseDate(2020, 7, 4),
|
||||
adapter.parseDate(2020, 7, 5)
|
||||
];
|
||||
const week2 = weeks.find(w => w.week === 27);
|
||||
expect(week2).toBeDefined();
|
||||
|
||||
for (let index = 0; index < datesWeek2.length; index++) {
|
||||
expect(week2.dates[index]).toEqual(datesWeek2[index]);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('#getDatesForCalendarWeek', () => {
|
||||
it('should return the dates for calendar week 1', () => {
|
||||
const dates = adapter.getDatesForCalendarWeek(2019, 1);
|
||||
|
||||
const datesWeek = [
|
||||
adapter.parseDate(2018, 12, 31),
|
||||
adapter.parseDate(2019, 1, 1),
|
||||
adapter.parseDate(2019, 1, 2),
|
||||
adapter.parseDate(2019, 1, 3),
|
||||
adapter.parseDate(2019, 1, 4),
|
||||
adapter.parseDate(2019, 1, 5),
|
||||
adapter.parseDate(2019, 1, 6)
|
||||
];
|
||||
|
||||
for (let index = 0; index < datesWeek.length; index++) {
|
||||
expect(dates[index]).toEqual(datesWeek[index]);
|
||||
}
|
||||
});
|
||||
|
||||
it('should return the dates for calendar week 46', () => {
|
||||
const dates = adapter.getDatesForCalendarWeek(2019, 46);
|
||||
|
||||
const datesWeek = [
|
||||
adapter.parseDate(2019, 11, 11),
|
||||
adapter.parseDate(2019, 11, 12),
|
||||
adapter.parseDate(2019, 11, 13),
|
||||
adapter.parseDate(2019, 11, 14),
|
||||
adapter.parseDate(2019, 11, 15),
|
||||
adapter.parseDate(2019, 11, 16),
|
||||
adapter.parseDate(2019, 11, 17)
|
||||
];
|
||||
|
||||
for (let index = 0; index < datesWeek.length; index++) {
|
||||
expect(dates[index]).toEqual(datesWeek[index]);
|
||||
}
|
||||
});
|
||||
|
||||
it('should return the dates for calendar week 52', () => {
|
||||
const dates = adapter.getDatesForCalendarWeek(2019, 52);
|
||||
|
||||
const datesWeek = [
|
||||
adapter.parseDate(2019, 12, 23),
|
||||
adapter.parseDate(2019, 12, 24),
|
||||
adapter.parseDate(2019, 12, 25),
|
||||
adapter.parseDate(2019, 12, 26),
|
||||
adapter.parseDate(2019, 12, 27),
|
||||
adapter.parseDate(2019, 12, 28),
|
||||
adapter.parseDate(2019, 12, 29)
|
||||
];
|
||||
|
||||
for (let index = 0; index < datesWeek.length; index++) {
|
||||
expect(dates[index]).toEqual(datesWeek[index]);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe('#getCalendarWeek', () => {
|
||||
|
||||
it('should return the calendar week for 14.06.2019', () => {
|
||||
const week = adapter.getCalendarWeek(2019, 6, 14);
|
||||
|
||||
expect(week).toEqual(24);
|
||||
});
|
||||
|
||||
it('should return the calendar week for 4.02.2019', () => {
|
||||
const week = adapter.getCalendarWeek(2019, 2, 4);
|
||||
expect(week).toEqual(6);
|
||||
});
|
||||
|
||||
it('should return the calendar week for 19.09.2019', () => {
|
||||
const week = adapter.getCalendarWeek(2019, 9, 19);
|
||||
expect(week).toEqual(38);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('#getCalendarWeeksForMonth', () => {
|
||||
|
||||
it('should return the calendar weeks for 02.2020', () => {
|
||||
const calendarWeeks = adapter.getCalendarWeeksForMonth(2020, 2);
|
||||
|
||||
expect(calendarWeeks).toEqual([5, 6, 7, 8, 9]);
|
||||
});
|
||||
|
||||
it('should return the calendar weeks for 12.2020', () => {
|
||||
const calendarWeeks = adapter.getCalendarWeeksForMonth(2020, 12);
|
||||
|
||||
expect(calendarWeeks).toEqual([49, 50, 51, 52, 1]);
|
||||
});
|
||||
|
||||
it('should return the calendar weeks for 7.2020', () => {
|
||||
const calendarWeeks = adapter.getCalendarWeeksForMonth(2020, 7);
|
||||
|
||||
expect(calendarWeeks).toEqual([27, 28, 29, 30, 31]);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('#getMonthForCalendarWeek', () => {
|
||||
it('should return the month for week 1 in year 2020', () => {
|
||||
const month = adapter.getMonthForCalendarWeek(2020, 1);
|
||||
expect(month).toEqual(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#parseDate', () => {
|
||||
|
||||
it('should return the parsed date for 15.02.2018', () => {
|
||||
expect(adapter.parseDate(2019, 2, 15)).toEqual(new Date(2019, 1, 15));
|
||||
});
|
||||
|
||||
it('should return the parsed date for 02.06.2019', () => {
|
||||
expect(adapter.parseDate(2019, 6, 2)).toEqual(new Date(2019, 5, 2));
|
||||
});
|
||||
|
||||
it('should return the parsed date for 23.12.2019', () => {
|
||||
expect(adapter.parseDate(2019, 12, 23)).toEqual(new Date(2019, 11, 23));
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('#getDate', () => {
|
||||
|
||||
it('should return a date object for 04.06.2013', () => {
|
||||
expect(adapter.getDate(new Date(2013, 5, 4))).toEqual({
|
||||
year: 2013,
|
||||
month: 6,
|
||||
date: 4
|
||||
})
|
||||
});
|
||||
|
||||
it('should retrun a date object for 01.09.2017', () => {
|
||||
expect(adapter.getDate(new Date(2017, 8, 1))).toEqual({
|
||||
year: 2017,
|
||||
month: 9,
|
||||
date: 1
|
||||
});
|
||||
});
|
||||
|
||||
it('should retrun a date object for 23.11.2020', () => {
|
||||
expect(adapter.getDate(new Date(2020, 10, 23))).toEqual({
|
||||
year: 2020,
|
||||
month: 11,
|
||||
date: 23
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('#equals', () => {
|
||||
|
||||
it('should be equal', () => {
|
||||
expect(adapter.equals(new Date(2019, 5, 12), new Date(2019, 5, 12, 12, 40)));
|
||||
});
|
||||
|
||||
it('should not be equal', () => {
|
||||
expect(adapter.equals(new Date(2019, 6, 12), new Date(2019, 5, 12, 12, 40)));
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
@@ -0,0 +1,5 @@
|
||||
// start:ng42.barrel
|
||||
export * from './calendar-i18n.provider';
|
||||
export * from './data.adapter';
|
||||
// end:ng42.barrel
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
// start:ng42.barrel
|
||||
export * from './task-calendar-double-choice-switch.component';
|
||||
export * from './task-calendar-double-choice-switch.module';
|
||||
// end:ng42.barrel
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<div class="switch-container">
|
||||
<lib-double-choice-switch [model]="viewSwitch" (change)="changeView.emit()">
|
||||
<img
|
||||
[src]="
|
||||
isFirstSwitched
|
||||
? 'assets/images/Icon_Calendar.svg'
|
||||
: 'assets/images/Icon_Calendar_inactive.svg'
|
||||
"
|
||||
slot="firstSwitchIcon"
|
||||
alt="calendar"
|
||||
class="icon"
|
||||
/>
|
||||
<img
|
||||
[src]="
|
||||
!isFirstSwitched
|
||||
? 'assets/images/Icon_Todos.svg'
|
||||
: 'assets/images/Icon_Todos_inactive.svg'
|
||||
"
|
||||
slot="secondSwitchIcon"
|
||||
alt="calendar"
|
||||
class="icon"
|
||||
/>
|
||||
</lib-double-choice-switch>
|
||||
</div>
|
||||
@@ -0,0 +1,10 @@
|
||||
.switch-container {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-bottom: 2rem;
|
||||
|
||||
.icon {
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import {
|
||||
Component,
|
||||
OnInit,
|
||||
ChangeDetectionStrategy,
|
||||
EventEmitter,
|
||||
Output
|
||||
} from '@angular/core';
|
||||
import { VIEW_SWITCH } from '../../constants';
|
||||
|
||||
@Component({
|
||||
selector: 'app-task-calendar-double-choice-switch',
|
||||
templateUrl: 'task-calendar-double-choice-switch.component.html',
|
||||
styleUrls: ['./task-calendar-double-choice-switch.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class TaskCalendarDoubleChoiceSwitchComponent implements OnInit {
|
||||
viewSwitch = VIEW_SWITCH;
|
||||
isFirstSwitched = true;
|
||||
|
||||
@Output() changeView = new EventEmitter<void>();
|
||||
|
||||
constructor() {}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
onChangeView() {
|
||||
this.isFirstSwitched = !this.isFirstSwitched;
|
||||
this.changeView.emit();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TaskCalendarDoubleChoiceSwitchComponent } from './task-calendar-double-choice-switch.component';
|
||||
import { DoubleChoiceSwitchModule } from '@libs/ui';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, DoubleChoiceSwitchModule],
|
||||
exports: [TaskCalendarDoubleChoiceSwitchComponent],
|
||||
declarations: [TaskCalendarDoubleChoiceSwitchComponent],
|
||||
providers: []
|
||||
})
|
||||
export class TaskCalendarDoubleChoiceSwitchModule {}
|
||||
@@ -0,0 +1,4 @@
|
||||
// start:ng42.barrel
|
||||
export * from './task-calendar.constants';
|
||||
// end:ng42.barrel
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import { DoubleChoiceSwitch, DoubleChoiceSwitchColor } from '@libs/ui';
|
||||
|
||||
export const VIEW_SWITCH = <DoubleChoiceSwitch>{
|
||||
firstChoice: 'Kalendar',
|
||||
secondChoice: 'Tätigkeiten',
|
||||
firstChoiceColor: <DoubleChoiceSwitchColor>{
|
||||
selectedBackground: '#596470',
|
||||
selectedText: '#ffffff',
|
||||
unSelectedbackground: 'rgba(237, 239, 240, 1)',
|
||||
unSelectedText: '#000000'
|
||||
},
|
||||
secondChoiceColor: <DoubleChoiceSwitchColor>{
|
||||
selectedBackground: '#596470',
|
||||
selectedText: '#ffffff',
|
||||
unSelectedbackground: 'rgba(237, 239, 240, 1)',
|
||||
unSelectedText: '#000000'
|
||||
},
|
||||
isFirstSwitchedOn: true
|
||||
};
|
||||
@@ -0,0 +1,4 @@
|
||||
export enum CalendarNavigation {
|
||||
Next = 1,
|
||||
Prev = -1
|
||||
}
|
||||
4
apps/sales/src/app/modules/task-calendar/enums/index.ts
Normal file
4
apps/sales/src/app/modules/task-calendar/enums/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
// start:ng42.barrel
|
||||
export * from './calendar-navigation';
|
||||
// end:ng42.barrel
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
import { getColorForTask } from './get-color-for-task.helper';
|
||||
import { Task } from '@isa/task-calendar';
|
||||
|
||||
describe('getColorForTask', () => {
|
||||
|
||||
it('should return green if status is Completed', () => {
|
||||
|
||||
expect(getColorForTask({
|
||||
status: 'Completed'
|
||||
} as Task)).toBe('green');
|
||||
|
||||
});
|
||||
|
||||
it('should return yellow if status is InProgess', () => {
|
||||
|
||||
expect(getColorForTask({
|
||||
status: 'InProgress'
|
||||
} as Task)).toBe('yellow');
|
||||
|
||||
});
|
||||
|
||||
it('should return lightgrey if status is Open', () => {
|
||||
|
||||
expect(getColorForTask({
|
||||
status: 'Open'
|
||||
} as Task)).toBe('lightgrey');
|
||||
|
||||
});
|
||||
|
||||
it('should return red if status is Overdue', () => {
|
||||
|
||||
expect(getColorForTask({
|
||||
status: 'Overdue'
|
||||
} as Task)).toBe('red');
|
||||
|
||||
});
|
||||
|
||||
it('should return undefined if status is empty', () => {
|
||||
|
||||
expect(getColorForTask({
|
||||
status: '' as any
|
||||
} as Task)).toBeUndefined();
|
||||
|
||||
});
|
||||
|
||||
it('should return undefined if task is undefined', () => {
|
||||
|
||||
expect(getColorForTask(undefined)).toBeUndefined();
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
@@ -0,0 +1,30 @@
|
||||
import { Task } from '@isa/task-calendar';
|
||||
|
||||
export function getColorForTask(task: Task): string {
|
||||
if (!!!task) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (task.type === ('Info' || 'PreInfo')) {
|
||||
return 'black';
|
||||
}
|
||||
|
||||
switch (task.status) {
|
||||
case 'Completed':
|
||||
return 'green';
|
||||
|
||||
case 'InProgress':
|
||||
case 'Overdue|InProgress':
|
||||
return 'yellow';
|
||||
|
||||
case 'Open':
|
||||
case 'Overdue|Open':
|
||||
return 'lightgrey';
|
||||
|
||||
case 'Overdue':
|
||||
return 'red';
|
||||
|
||||
default:
|
||||
return 'lightgrey';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
export function getMinAndMaxDate(
|
||||
offset: number = 3,
|
||||
mode: 'week' | 'month' = 'month'
|
||||
): { minDate: Date; maxDate: Date } {
|
||||
const today = new Date();
|
||||
|
||||
switch (mode) {
|
||||
case 'month':
|
||||
const minDateCal = new Date(
|
||||
today.getFullYear(),
|
||||
today.getMonth() - offset,
|
||||
today.getDate()
|
||||
);
|
||||
|
||||
const maxDateCal = new Date(
|
||||
today.getFullYear(),
|
||||
today.getMonth() + offset,
|
||||
today.getDate()
|
||||
);
|
||||
|
||||
return { minDate: minDateCal, maxDate: maxDateCal };
|
||||
|
||||
case 'week':
|
||||
const minDateWeek = new Date(
|
||||
today.getFullYear(),
|
||||
today.getMonth(),
|
||||
today.getDate() - 7 * offset
|
||||
);
|
||||
const maxDateWeek = new Date(
|
||||
today.getFullYear(),
|
||||
today.getMonth(),
|
||||
today.getDate() + 7 * offset
|
||||
);
|
||||
|
||||
return { minDate: minDateWeek, maxDate: maxDateWeek };
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// start:ng42.barrel
|
||||
export * from './get-color-for-task.helper';
|
||||
export * from './get-min-max-date.helper';
|
||||
export * from './is-image-file.helper';
|
||||
// end:ng42.barrel
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
export function isImageFile(file: File): boolean {
|
||||
return file.type.search(/^image\//i) === 0;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TaskType } from '@isa/task-calendar/lib/types';
|
||||
|
||||
export interface CalendarItem {
|
||||
date: Date;
|
||||
color: string;
|
||||
title: string;
|
||||
type?: TaskType;
|
||||
action?: (item: CalendarItem) => void;
|
||||
}
|
||||
4
apps/sales/src/app/modules/task-calendar/models/index.ts
Normal file
4
apps/sales/src/app/modules/task-calendar/models/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
// start:ng42.barrel
|
||||
export * from './calendar-item';
|
||||
// end:ng42.barrel
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<div>Filter</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="main-container">
|
||||
<app-task-calendar-double-choice-switch></app-task-calendar-double-choice-switch>
|
||||
<app-calendar
|
||||
[(year)]="currentDate.year"
|
||||
(yearChange)="updateSubject.next()"
|
||||
(monthChange)="updateSubject.next()"
|
||||
[(month)]="currentDate.month"
|
||||
mode="month"
|
||||
[items]="tasks"
|
||||
[minDate]="minDate"
|
||||
[maxDate]="maxDate"
|
||||
(viewTasks)="navigateToTasks($event)"
|
||||
></app-calendar>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,14 @@
|
||||
:host {
|
||||
display: block;
|
||||
font-family: 'Open Sans';
|
||||
}
|
||||
|
||||
.container {
|
||||
background: white;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.main-container {
|
||||
margin: 3%;
|
||||
padding: 3rem 0.3rem;
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
import {
|
||||
Component,
|
||||
OnInit,
|
||||
OnDestroy,
|
||||
ChangeDetectionStrategy
|
||||
} from '@angular/core';
|
||||
import { TaskCalendarService, Filter } from '@isa/task-calendar';
|
||||
import { getColorForTask } from '../../helpers';
|
||||
import { TaskType } from '@isa/task-calendar';
|
||||
import { TaskCalendarConfig } from '../../task-calendar.config';
|
||||
import { Subject } from 'rxjs';
|
||||
import { debounceTime } from 'rxjs/operators';
|
||||
import { Router } from '@angular/router';
|
||||
import { CalendarItem } from '../../models';
|
||||
import { DateAdapter } from '../../components/calendar/providers';
|
||||
|
||||
@Component({
|
||||
selector: 'app-calendar-view',
|
||||
templateUrl: 'calendar-view.component.html',
|
||||
styleUrls: ['calendar-view.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class CalendarViewComponent implements OnInit, OnDestroy {
|
||||
currentDate = this.dateAdapter.getDate(new Date());
|
||||
minDate: Date = new Date();
|
||||
maxDate: Date = new Date();
|
||||
|
||||
type: TaskType;
|
||||
|
||||
filters: Filter[] = [];
|
||||
|
||||
tasks: CalendarItem[] = [];
|
||||
|
||||
updateSubject = new Subject();
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
private dateAdapter: DateAdapter,
|
||||
private taskCalendarService: TaskCalendarService,
|
||||
// private taskDetailsDialogService: TaskDetailsDialogService,
|
||||
private config: TaskCalendarConfig
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.update();
|
||||
this.updateMinMaxDate(this.config.calendarViewConfig);
|
||||
|
||||
this.updateSubject.pipe(debounceTime(100)).subscribe(() => this.update());
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.updateSubject.complete();
|
||||
}
|
||||
|
||||
updateMinMaxDate(config: { minDate: Date; maxDate: Date }) {
|
||||
this.minDate = config.minDate;
|
||||
this.maxDate = config.maxDate;
|
||||
}
|
||||
|
||||
update() {
|
||||
this.taskCalendarService
|
||||
.getTasks({
|
||||
start: this.dateAdapter.parseDate(
|
||||
this.currentDate.year,
|
||||
this.currentDate.month,
|
||||
1
|
||||
),
|
||||
end: this.dateAdapter.parseDate(
|
||||
this.currentDate.year,
|
||||
this.currentDate.month + 1,
|
||||
1
|
||||
),
|
||||
filter: this.filters.map(option => option.id),
|
||||
type: this.type
|
||||
})
|
||||
.subscribe(result => {
|
||||
if (result.error) {
|
||||
} else {
|
||||
this.tasks = result.result.map<CalendarItem>(task => ({
|
||||
date: new Date(task.date),
|
||||
color: getColorForTask(task),
|
||||
title: task.title,
|
||||
type: task.type,
|
||||
action: () => {
|
||||
this.navigateToTasks(this.dateAdapter.getDate(task.date));
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* openTaskDetails(task: Task) {
|
||||
this.taskCalendarService
|
||||
.getTaskDetails({ taskId: task.id })
|
||||
.pipe(map(response => response.result))
|
||||
.subscribe(taskDetails => {
|
||||
this.taskDetailsDialogService.open({
|
||||
data: {
|
||||
task: taskDetails
|
||||
}
|
||||
});
|
||||
});
|
||||
} */
|
||||
|
||||
navigateToTasks(target: { year: number; month: number; date: number }) {
|
||||
this.router.navigate(['isa-task-calendar', 'tasks'], {
|
||||
state: { target }
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { CalendarViewComponent } from './calendar-view.component';
|
||||
import { CalendarModule } from '../../components/calendar';
|
||||
import { TaskCalendarDoubleChoiceSwitchModule } from '../../components/task-calendar-choice-switch';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, CalendarModule, TaskCalendarDoubleChoiceSwitchModule],
|
||||
exports: [CalendarViewComponent],
|
||||
declarations: [CalendarViewComponent],
|
||||
providers: []
|
||||
})
|
||||
export class CalendarViewModule {}
|
||||
@@ -1,3 +0,0 @@
|
||||
<div>Filter</div>
|
||||
|
||||
<div>Calendar</div>
|
||||
@@ -1,14 +0,0 @@
|
||||
import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-calendar',
|
||||
templateUrl: 'calendar.component.html',
|
||||
styleUrls: ['./calendar.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
|
||||
export class CalendarComponent implements OnInit {
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() { }
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { CalendarComponent } from './calendar.component';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
],
|
||||
exports: [CalendarComponent],
|
||||
declarations: [CalendarComponent],
|
||||
providers: [],
|
||||
})
|
||||
export class CalendarModule { }
|
||||
@@ -1,5 +1,5 @@
|
||||
// start:ng42.barrel
|
||||
export * from './calendar.component';
|
||||
export * from './calendar.module';
|
||||
export * from './calendar-view.component';
|
||||
export * from './calendar-view.module';
|
||||
// end:ng42.barrel
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
import { CalendarItemsFilterUniqueStatusTypePipe } from './calendar-items-filter-unique-status.pipe';
|
||||
import { CalendarItem } from '../models';
|
||||
|
||||
describe('CalendarItemsFilterUniqueStatusType', () => {
|
||||
let pipe: CalendarItemsFilterUniqueStatusTypePipe;
|
||||
|
||||
beforeEach(() => {
|
||||
pipe = new CalendarItemsFilterUniqueStatusTypePipe();
|
||||
});
|
||||
|
||||
it('should provide only one CalendarItem per color / status', () => {
|
||||
const items: CalendarItem[] = [
|
||||
{
|
||||
color: 'red',
|
||||
date: new Date(2020, 5, 20),
|
||||
title: 'test1'
|
||||
},
|
||||
{
|
||||
color: 'red',
|
||||
date: new Date(2020, 5, 12),
|
||||
title: 'test2'
|
||||
},
|
||||
{
|
||||
color: 'green',
|
||||
date: ('2020-06-19T22:00:00.000Z' as unknown) as Date,
|
||||
title: 'test3'
|
||||
},
|
||||
{
|
||||
color: 'green',
|
||||
date: new Date(2020, 5, 23),
|
||||
title: 'test4'
|
||||
},
|
||||
{
|
||||
color: 'red',
|
||||
date: new Date(2020, 5, 11),
|
||||
title: 'test5'
|
||||
}
|
||||
];
|
||||
|
||||
const uniqueCalendarItemsPerColor = pipe.transform(items);
|
||||
expect(uniqueCalendarItemsPerColor.length).toBe(2);
|
||||
|
||||
expect(uniqueCalendarItemsPerColor[0].title).toBe('test1');
|
||||
expect(uniqueCalendarItemsPerColor[1].title).toBe('test3');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,16 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
import { CalendarItem } from '../models';
|
||||
|
||||
@Pipe({
|
||||
name: 'calendarItemsFilterUniqueStatusTypePipe'
|
||||
})
|
||||
export class CalendarItemsFilterUniqueStatusTypePipe implements PipeTransform {
|
||||
transform(items: CalendarItem[] = []): CalendarItem[] {
|
||||
const uniqueColors = Array.from(new Set(items.map(item => item.color)));
|
||||
const uniqueItemsByColor = uniqueColors.map(color =>
|
||||
items.find(item => item.color === color)
|
||||
);
|
||||
|
||||
return uniqueItemsByColor;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
import { DateAdapter } from '../components/calendar/providers';
|
||||
import { CalendarItem } from '../models';
|
||||
|
||||
|
||||
@Pipe({
|
||||
name: 'calendarItemsFilterPipe'
|
||||
})
|
||||
|
||||
export class CalendarItemsFilterPipe implements PipeTransform {
|
||||
|
||||
constructor(private dateAdapter: DateAdapter) {}
|
||||
|
||||
transform(items: CalendarItem[] = [], date: Date): CalendarItem[] {
|
||||
return items.filter(item => this.dateAdapter.equals(item.date, date));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
import { CalendarItemsFilterPipe } from './calendar-items-filter.pipe';
|
||||
import { DateAdapter } from '../components/calendar/providers';
|
||||
import { CalendarItem } from '../models';
|
||||
|
||||
|
||||
describe('CalendarItemsFilterPipe', () => {
|
||||
|
||||
let pipe: CalendarItemsFilterPipe;
|
||||
|
||||
beforeEach(() => {
|
||||
pipe = new CalendarItemsFilterPipe(new DateAdapter());
|
||||
});
|
||||
|
||||
it('should return all CalendarItems which equals the input date', () => {
|
||||
|
||||
|
||||
const items: CalendarItem[] = [
|
||||
{
|
||||
color: 'red',
|
||||
date: new Date(2020, 5, 20),
|
||||
title: 'test1'
|
||||
},
|
||||
{
|
||||
color: 'red',
|
||||
date: new Date(2020, 5, 12),
|
||||
title: 'test2'
|
||||
},
|
||||
{
|
||||
color: 'red',
|
||||
date: '2020-06-19T22:00:00.000Z' as unknown as Date,
|
||||
title: 'test3'
|
||||
},
|
||||
{
|
||||
color: 'red',
|
||||
date: new Date(2020, 5, 23),
|
||||
title: 'test4'
|
||||
},
|
||||
{
|
||||
color: 'red',
|
||||
date: new Date(2020, 5, 11),
|
||||
title: 'test5'
|
||||
}
|
||||
];
|
||||
|
||||
const filteredItems = pipe.transform(items, new Date(2020, 5, 20));
|
||||
|
||||
expect(filteredItems.length).toEqual(2);
|
||||
|
||||
expect(filteredItems[0].title).toBe('test1');
|
||||
expect(filteredItems[1].title).toBe('test3');
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
6
apps/sales/src/app/modules/task-calendar/pipes/index.ts
Normal file
6
apps/sales/src/app/modules/task-calendar/pipes/index.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
// start:ng42.barrel
|
||||
export * from './calendar-items-filter-unique-status.pipe';
|
||||
export * from './calendar-items-filter.pipe';
|
||||
export * from './task-calendar.pipes.module';
|
||||
// end:ng42.barrel
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CalendarItemsFilterPipe } from './calendar-items-filter.pipe';
|
||||
import { CalendarItemsFilterUniqueStatusTypePipe } from './calendar-items-filter-unique-status.pipe';
|
||||
|
||||
const pipes = [CalendarItemsFilterPipe, CalendarItemsFilterUniqueStatusTypePipe]
|
||||
|
||||
@NgModule({
|
||||
exports: [...pipes],
|
||||
declarations: [...pipes],
|
||||
})
|
||||
export class TaskCalendarPipesModule { }
|
||||
@@ -1,10 +1,10 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
import { CalendarComponent } from './pages/calendar';
|
||||
import { CalendarViewComponent } from './pages/calendar';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: 'calendar', component: CalendarComponent
|
||||
path: 'calendar', component: CalendarViewComponent
|
||||
},
|
||||
{
|
||||
path: 'tasks', component: null
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { getMinAndMaxDate } from './helpers';
|
||||
|
||||
@Injectable()
|
||||
export class TaskCalendarConfig {
|
||||
calendarViewConfig: { minDate: Date; maxDate: Date };
|
||||
taskViewConfig: { minDate: Date; maxDate: Date };
|
||||
|
||||
constructor(offset: { month: number; weeks: number }) {
|
||||
this.computeConfig({
|
||||
calMonthsOffset: offset.month,
|
||||
taskWeeksOffset: offset.weeks
|
||||
});
|
||||
}
|
||||
|
||||
computeConfig(input: { calMonthsOffset: number; taskWeeksOffset: number }) {
|
||||
this.calendarViewConfig = getMinAndMaxDate(input.calMonthsOffset, 'month');
|
||||
this.taskViewConfig = getMinAndMaxDate(input.taskWeeksOffset, 'week');
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,10 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TaskCalendarRoutingModule } from './task-calendar-routing.module';
|
||||
import { CalendarModule } from './pages/calendar';
|
||||
|
||||
import { CalendarViewModule } from './pages/calendar';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, TaskCalendarRoutingModule, CalendarModule],
|
||||
imports: [CommonModule, TaskCalendarRoutingModule, CalendarViewModule],
|
||||
exports: [],
|
||||
declarations: [],
|
||||
providers: [],
|
||||
|
||||
@@ -30,5 +30,17 @@
|
||||
"remi": "https://isa-integration.paragon-data.net/inv/v1/",
|
||||
"print": "https://isa-integration.paragon-data.net/print/v1/"
|
||||
}
|
||||
},
|
||||
|
||||
"taskCalendarModuleOptions": {
|
||||
"useMock": false,
|
||||
"endpoints": {
|
||||
"eis": "https://isa.paragon-data.de/eis/v1/"
|
||||
}
|
||||
},
|
||||
|
||||
"taskCalendarConfig": {
|
||||
"monthsOffset": 3,
|
||||
"weeksOffset": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,5 +30,17 @@
|
||||
"remi": "https://isa-test.paragon-data.net/inv/v1/",
|
||||
"print": "https://isa-test.paragon-data.net/print/v1/"
|
||||
}
|
||||
},
|
||||
|
||||
"taskCalendarModuleOptions": {
|
||||
"useMock": false,
|
||||
"endpoints": {
|
||||
"eis": "https://isa.paragon-data.de/eis/v1/"
|
||||
}
|
||||
},
|
||||
|
||||
"taskCalendarConfig": {
|
||||
"monthsOffset": 3,
|
||||
"weeksOffset": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,5 +30,17 @@
|
||||
"remi": "https://isa.paragon-data.net/inv/v1/",
|
||||
"print": "https://isa.paragon-data.net/print/v1/"
|
||||
}
|
||||
},
|
||||
|
||||
"taskCalendarModuleOptions": {
|
||||
"useMock": false,
|
||||
"endpoints": {
|
||||
"eis": "https://isa.paragon-data.de/eis/v1/"
|
||||
}
|
||||
},
|
||||
|
||||
"taskCalendarConfig": {
|
||||
"monthsOffset": 3,
|
||||
"weeksOffset": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,5 +30,17 @@
|
||||
"remi": "https://isa-staging.paragon-data.net/inv/v1/",
|
||||
"print": "https://isa-staging.paragon-data.net/print/v1/"
|
||||
}
|
||||
},
|
||||
|
||||
"taskCalendarModuleOptions": {
|
||||
"useMock": false,
|
||||
"endpoints": {
|
||||
"eis": "https://isa-staging.paragon-data.net/eis/v1/"
|
||||
}
|
||||
},
|
||||
|
||||
"taskCalendarConfig": {
|
||||
"monthsOffset": 3,
|
||||
"weeksOffset": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,5 +30,17 @@
|
||||
"remi": "https://isa-test.paragon-data.net/inv/v1/",
|
||||
"print": "https://isa-test.paragon-data.net/print/v1/"
|
||||
}
|
||||
},
|
||||
|
||||
"taskCalendarModuleOptions": {
|
||||
"useMock": false,
|
||||
"endpoints": {
|
||||
"eis": "https://isa-test.paragon-data.net/eis/v1/"
|
||||
}
|
||||
},
|
||||
|
||||
"taskCalendarConfig": {
|
||||
"monthsOffset": 3,
|
||||
"weeksOffset": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
13
apps/sales/src/assets/images/Icon_Calendar.svg
Normal file
13
apps/sales/src/assets/images/Icon_Calendar.svg
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="19px" height="21px" viewBox="0 0 19 21" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 61 (89581) - https://sketch.com -->
|
||||
<title>Icon_calender</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="ISA_HIMA-310_Tätigkeitskalender_01_1" transform="translate(-260.000000, -246.000000)" fill="#FFFFFF" stroke="#636D77" stroke-width="0.65">
|
||||
<g id="Group-4" transform="translate(243.000000, 240.000000)">
|
||||
<path d="M32.7816186,8.28361485 L31.7123662,8.28361485 L31.7123662,7.53623373 C31.7123662,7.24046865 31.4817411,7 31.1962879,7 C30.9116397,7 30.6802096,7.24046865 30.6802096,7.53623373 L30.6802096,8.28361485 L22.6188597,8.28361485 L22.6188597,7.53623373 C22.6188597,7.24046865 22.3874296,7 22.1027814,7 C21.8173282,7 21.5867031,7.24046865 21.5867031,7.53623373 L21.5867031,8.28361485 L20.5182558,8.28361485 C19.1280646,8.28529069 18.0008257,9.45577889 18,10.900221 L18,23.3299043 C18.0008063,24.7752258 19.1281059,25.9456525 20.5182558,25.9473684 L32.7815154,25.9473684 C34.1717065,25.9456926 35.2989454,24.7752044 35.2997712,23.3299043 L35.2997712,10.900221 C35.2989648,9.45573599 34.1716652,8.2853308 32.7815154,8.28361485 L32.7816186,8.28361485 Z M34.2685641,23.3299043 L34.2693704,23.3299043 C34.2677578,24.1828592 33.602494,24.8740859 32.7816198,24.8749224 L20.5183602,24.8749224 C19.6974654,24.8740844 19.0322198,24.1828377 19.0306097,23.3299043 L19.0306097,13.6869204 L34.267719,13.6869204 L34.2685641,23.3299043 Z M34.2685641,12.614453 L19.0320741,12.614453 L19.0320741,10.9001781 C19.0328804,10.0480598 19.6973403,9.35683304 20.5182145,9.35599652 L21.5874669,9.35599652 L21.5874669,10.0338389 C21.5874669,10.3296039 21.8180919,10.5700726 22.1035452,10.5700726 C22.3881934,10.5700726 22.6196235,10.3296039 22.6196235,10.0338389 L22.6196235,9.35599652 L30.6817991,9.35599652 L30.6817991,10.0338389 L30.6809928,10.0338389 C30.6809928,10.3296039 30.9124229,10.5700726 31.1970711,10.5700726 C31.4825243,10.5700726 31.7131494,10.3296039 31.7131494,10.0338389 L31.7131494,9.35599652 L32.7824018,9.35599652 C33.6032966,9.35683433 34.2685422,10.0472447 34.2701524,10.9001781 L34.2685641,12.614453 Z" id="Icon_calender-Copy"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
13
apps/sales/src/assets/images/Icon_Calendar_inactive.svg
Normal file
13
apps/sales/src/assets/images/Icon_Calendar_inactive.svg
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="19px" height="21px" viewBox="0 0 19 21" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 61 (89581) - https://sketch.com -->
|
||||
<title>Icon_calender</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="ISA_HIMA-310_Tätigkeitskalender_01_1" transform="translate(-260.000000, -246.000000)" fill="#636D77" stroke="#636D77" stroke-width="0.65">
|
||||
<g id="Group-4" transform="translate(243.000000, 240.000000)">
|
||||
<path d="M32.7816186,8.28361485 L31.7123662,8.28361485 L31.7123662,7.53623373 C31.7123662,7.24046865 31.4817411,7 31.1962879,7 C30.9116397,7 30.6802096,7.24046865 30.6802096,7.53623373 L30.6802096,8.28361485 L22.6188597,8.28361485 L22.6188597,7.53623373 C22.6188597,7.24046865 22.3874296,7 22.1027814,7 C21.8173282,7 21.5867031,7.24046865 21.5867031,7.53623373 L21.5867031,8.28361485 L20.5182558,8.28361485 C19.1280646,8.28529069 18.0008257,9.45577889 18,10.900221 L18,23.3299043 C18.0008063,24.7752258 19.1281059,25.9456525 20.5182558,25.9473684 L32.7815154,25.9473684 C34.1717065,25.9456926 35.2989454,24.7752044 35.2997712,23.3299043 L35.2997712,10.900221 C35.2989648,9.45573599 34.1716652,8.2853308 32.7815154,8.28361485 L32.7816186,8.28361485 Z M34.2685641,23.3299043 L34.2693704,23.3299043 C34.2677578,24.1828592 33.602494,24.8740859 32.7816198,24.8749224 L20.5183602,24.8749224 C19.6974654,24.8740844 19.0322198,24.1828377 19.0306097,23.3299043 L19.0306097,13.6869204 L34.267719,13.6869204 L34.2685641,23.3299043 Z M34.2685641,12.614453 L19.0320741,12.614453 L19.0320741,10.9001781 C19.0328804,10.0480598 19.6973403,9.35683304 20.5182145,9.35599652 L21.5874669,9.35599652 L21.5874669,10.0338389 C21.5874669,10.3296039 21.8180919,10.5700726 22.1035452,10.5700726 C22.3881934,10.5700726 22.6196235,10.3296039 22.6196235,10.0338389 L22.6196235,9.35599652 L30.6817991,9.35599652 L30.6817991,10.0338389 L30.6809928,10.0338389 C30.6809928,10.3296039 30.9124229,10.5700726 31.1970711,10.5700726 C31.4825243,10.5700726 31.7131494,10.3296039 31.7131494,10.0338389 L31.7131494,9.35599652 L32.7824018,9.35599652 C33.6032966,9.35683433 34.2685422,10.0472447 34.2701524,10.9001781 L34.2685641,12.614453 Z" id="Icon_calender-Copy"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
13
apps/sales/src/assets/images/Icon_Todos.svg
Normal file
13
apps/sales/src/assets/images/Icon_Todos.svg
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="17px" height="16px" viewBox="0 0 17 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 61 (89581) - https://sketch.com -->
|
||||
<title>Icon_todos</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="#FFFFFF" fill-rule="evenodd">
|
||||
<g id="ISA_HIMA-310_Tätigkeitskalender_01_1" transform="translate(-392.000000, -249.000000)" fill="#FFFFFF" fill-rule="nonzero">
|
||||
<g id="Group-4" transform="translate(243.000000, 240.000000)">
|
||||
<path d="M152.826376,20.3520616 C153.128902,20.0495358 153.623944,20.0220335 153.953972,20.3245593 C154.256498,20.6270851 154.284,21.1221273 153.981475,21.4521555 L153.981475,21.4521555 L151.616273,23.9823713 C151.478761,24.1473854 151.258742,24.2298925 151.038724,24.2298925 C150.818705,24.2298925 150.598686,24.1473854 150.461174,23.9823713 L150.461174,23.9823713 L149.223569,22.6622587 C148.921043,22.3322306 148.921043,21.8371883 149.251071,21.5346625 C149.581099,21.2321367 150.076141,21.2321367 150.378667,21.5621649 L150.378667,21.5621649 L151.038724,22.2497235 Z M165.202432,21.3696484 C165.642469,21.3696484 166,21.7271789 166,22.1672165 C166,22.607254 165.642469,22.9647845 165.202432,22.9647845 L165.202432,22.9647845 L156.566695,22.9647845 C156.15416,22.9647845 155.769127,22.607254 155.769127,22.1672165 C155.769127,21.7271789 156.126658,21.3696484 156.566695,21.3696484 L156.566695,21.3696484 Z M152.826376,14.7965876 C153.128902,14.4940618 153.623944,14.4665595 153.953972,14.7690853 C154.256498,15.0716111 154.284,15.5666533 153.981475,15.8966815 L153.981475,15.8966815 L151.616273,18.4268974 C151.478761,18.5919114 151.258742,18.6744185 151.038724,18.6744185 C150.818705,18.6744185 150.598686,18.5919114 150.461174,18.4268974 L150.461174,18.4268974 L149.223569,17.0792824 C148.921043,16.7492542 148.921043,16.254212 149.251071,15.9516862 C149.581099,15.6491604 150.076141,15.6491604 150.378667,15.9791885 L150.378667,15.9791885 L151.038724,16.6942495 Z M165.202432,15.8141745 C165.642469,15.8141745 166,16.171705 166,16.6117425 C166,17.0517801 165.642469,17.4093106 165.202432,17.4093106 L165.202432,17.4093106 L156.566695,17.4093106 C156.15416,17.4093106 155.796629,17.0517801 155.769127,16.6117425 C155.769127,16.171705 156.126658,15.8141745 156.566695,15.8141745 L156.566695,15.8141745 Z M152.826376,9.24111368 C153.128902,8.93858787 153.623944,8.91108552 153.953972,9.21361133 C154.256498,9.51613714 154.284,10.0111794 153.981475,10.3412075 L153.981475,10.3412075 L151.616273,12.8714234 C151.478761,13.0364375 151.258742,13.1189445 151.038724,13.1189445 C150.818705,13.1189445 150.598686,13.0364375 150.461174,12.8714234 L150.461174,12.8714234 L149.223569,11.5238084 C148.921043,11.1937803 148.921043,10.698738 149.251071,10.3962122 C149.581099,10.0936864 150.076141,10.0936864 150.378667,10.4237146 L150.378667,10.4237146 L151.038724,11.1387756 Z M165.202432,10.2587005 C165.642469,10.2587005 166,10.616231 166,11.0562685 C166,11.4963061 165.642469,11.8538366 165.202432,11.8538366 L165.202432,11.8538366 L156.566695,11.8538366 C156.15416,11.8538366 155.796629,11.4963061 155.769127,11.0562685 C155.769127,10.616231 156.126658,10.2587005 156.566695,10.2587005 L156.566695,10.2587005 Z" id="Icon_todos-Copy"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.3 KiB |
13
apps/sales/src/assets/images/Icon_Todos_inactive.svg
Normal file
13
apps/sales/src/assets/images/Icon_Todos_inactive.svg
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="17px" height="16px" viewBox="0 0 17 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 61 (89581) - https://sketch.com -->
|
||||
<title>Icon_todos</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="#636D77" fill-rule="evenodd">
|
||||
<g id="ISA_HIMA-310_Tätigkeitskalender_01_1" transform="translate(-392.000000, -249.000000)" fill="#636D77" fill-rule="nonzero">
|
||||
<g id="Group-4" transform="translate(243.000000, 240.000000)">
|
||||
<path d="M152.826376,20.3520616 C153.128902,20.0495358 153.623944,20.0220335 153.953972,20.3245593 C154.256498,20.6270851 154.284,21.1221273 153.981475,21.4521555 L153.981475,21.4521555 L151.616273,23.9823713 C151.478761,24.1473854 151.258742,24.2298925 151.038724,24.2298925 C150.818705,24.2298925 150.598686,24.1473854 150.461174,23.9823713 L150.461174,23.9823713 L149.223569,22.6622587 C148.921043,22.3322306 148.921043,21.8371883 149.251071,21.5346625 C149.581099,21.2321367 150.076141,21.2321367 150.378667,21.5621649 L150.378667,21.5621649 L151.038724,22.2497235 Z M165.202432,21.3696484 C165.642469,21.3696484 166,21.7271789 166,22.1672165 C166,22.607254 165.642469,22.9647845 165.202432,22.9647845 L165.202432,22.9647845 L156.566695,22.9647845 C156.15416,22.9647845 155.769127,22.607254 155.769127,22.1672165 C155.769127,21.7271789 156.126658,21.3696484 156.566695,21.3696484 L156.566695,21.3696484 Z M152.826376,14.7965876 C153.128902,14.4940618 153.623944,14.4665595 153.953972,14.7690853 C154.256498,15.0716111 154.284,15.5666533 153.981475,15.8966815 L153.981475,15.8966815 L151.616273,18.4268974 C151.478761,18.5919114 151.258742,18.6744185 151.038724,18.6744185 C150.818705,18.6744185 150.598686,18.5919114 150.461174,18.4268974 L150.461174,18.4268974 L149.223569,17.0792824 C148.921043,16.7492542 148.921043,16.254212 149.251071,15.9516862 C149.581099,15.6491604 150.076141,15.6491604 150.378667,15.9791885 L150.378667,15.9791885 L151.038724,16.6942495 Z M165.202432,15.8141745 C165.642469,15.8141745 166,16.171705 166,16.6117425 C166,17.0517801 165.642469,17.4093106 165.202432,17.4093106 L165.202432,17.4093106 L156.566695,17.4093106 C156.15416,17.4093106 155.796629,17.0517801 155.769127,16.6117425 C155.769127,16.171705 156.126658,15.8141745 156.566695,15.8141745 L156.566695,15.8141745 Z M152.826376,9.24111368 C153.128902,8.93858787 153.623944,8.91108552 153.953972,9.21361133 C154.256498,9.51613714 154.284,10.0111794 153.981475,10.3412075 L153.981475,10.3412075 L151.616273,12.8714234 C151.478761,13.0364375 151.258742,13.1189445 151.038724,13.1189445 C150.818705,13.1189445 150.598686,13.0364375 150.461174,12.8714234 L150.461174,12.8714234 L149.223569,11.5238084 C148.921043,11.1937803 148.921043,10.698738 149.251071,10.3962122 C149.581099,10.0936864 150.076141,10.0936864 150.378667,10.4237146 L150.378667,10.4237146 L151.038724,11.1387756 Z M165.202432,10.2587005 C165.642469,10.2587005 166,10.616231 166,11.0562685 C166,11.4963061 165.642469,11.8538366 165.202432,11.8538366 L165.202432,11.8538366 L156.566695,11.8538366 C156.15416,11.8538366 155.796629,11.4963061 155.769127,11.0562685 C155.769127,10.616231 156.126658,10.2587005 156.566695,10.2587005 L156.566695,10.2587005 Z" id="Icon_todos-Copy"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.3 KiB |
@@ -4,10 +4,13 @@ import { SsoInterface } from './sso.interface';
|
||||
import { isNullOrUndefined } from 'util';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class SsoService {
|
||||
constructor(private oauthService: OAuthService, private externalService: SsoInterface) {}
|
||||
constructor(
|
||||
private oauthService: OAuthService,
|
||||
private externalService: SsoInterface
|
||||
) {}
|
||||
|
||||
public registerAuthentication() {
|
||||
this.oauthService.configure(this.externalService.getConfigurations());
|
||||
|
||||
@@ -5,16 +5,16 @@
|
||||
*/
|
||||
export interface AvailabilityDTO {
|
||||
|
||||
/**
|
||||
* Stock Status Code / Beschreibung
|
||||
*/
|
||||
sscText?: string;
|
||||
|
||||
/**
|
||||
* Produkt / Artikel PK
|
||||
*/
|
||||
itemId?: number;
|
||||
|
||||
/**
|
||||
* Shop
|
||||
*/
|
||||
shop?: any;
|
||||
|
||||
/**
|
||||
* Preis (VK)
|
||||
*/
|
||||
@@ -31,9 +31,9 @@ export interface AvailabilityDTO {
|
||||
ssc?: string;
|
||||
|
||||
/**
|
||||
* Stock Status Code / Beschreibung
|
||||
* Shop
|
||||
*/
|
||||
sscText?: string;
|
||||
shop?: any;
|
||||
|
||||
/**
|
||||
* Verfügbare Menge
|
||||
|
||||
@@ -10,16 +10,16 @@ import { KeyValueDTOOfStringAndString } from './key-value-dtoof-string-and-strin
|
||||
import { ReviewDTO } from './review-dto';
|
||||
export interface ItemDTO extends EntityDTO {
|
||||
|
||||
/**
|
||||
* Verfügbarkeit laut Katalog
|
||||
*/
|
||||
catalogAvailability?: any;
|
||||
|
||||
/**
|
||||
* Rang
|
||||
*/
|
||||
scoring?: number;
|
||||
|
||||
/**
|
||||
* Weitere Artikel-IDs
|
||||
*/
|
||||
ids?: {[key: string]: number};
|
||||
|
||||
/**
|
||||
* Artikel / Produkttyp
|
||||
*/
|
||||
@@ -56,9 +56,9 @@ export interface ItemDTO extends EntityDTO {
|
||||
images?: Array<ImageDTO>;
|
||||
|
||||
/**
|
||||
* Verfügbarkeit laut Katalog
|
||||
* Weitere Artikel-IDs
|
||||
*/
|
||||
catalogAvailability?: any;
|
||||
ids?: {[key: string]: number};
|
||||
|
||||
/**
|
||||
* Verfügbarkeit zur Bestellung in die Filiale
|
||||
|
||||
@@ -6,16 +6,16 @@ import { OrderByDTO } from './order-by-dto';
|
||||
*/
|
||||
export interface QueryTokenDTO {
|
||||
|
||||
/**
|
||||
* Katalogbereich
|
||||
*/
|
||||
catalogType?: any;
|
||||
|
||||
/**
|
||||
* Lager PK
|
||||
*/
|
||||
stockId?: number;
|
||||
|
||||
/**
|
||||
* Bezeichner
|
||||
*/
|
||||
friendlyName?: string;
|
||||
|
||||
/**
|
||||
* Eingabewerte z.B. ("qs", "heller süden")
|
||||
*/
|
||||
@@ -32,9 +32,9 @@ export interface QueryTokenDTO {
|
||||
fuzzy?: number;
|
||||
|
||||
/**
|
||||
* Katalogbereich
|
||||
* Bezeichner
|
||||
*/
|
||||
catalogType?: any;
|
||||
friendlyName?: string;
|
||||
|
||||
/**
|
||||
* Filter
|
||||
|
||||
@@ -23,6 +23,7 @@ class SearchService extends __BaseService {
|
||||
static readonly SearchSearchPath = '/s';
|
||||
static readonly SearchAutocompletePath = '/s/complete';
|
||||
static readonly SearchByIdPath = '/s/byid';
|
||||
static readonly SearchByEANPath = '/s/byean';
|
||||
static readonly SearchDetailPath = '/s/{id}';
|
||||
static readonly SearchDetailByEANPath = '/s/ean/{ean}';
|
||||
static readonly SearchSettingsPath = '/s/settings';
|
||||
@@ -172,6 +173,40 @@ class SearchService extends __BaseService {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param eans undefined
|
||||
*/
|
||||
SearchByEANResponse(eans: Array<string>): __Observable<__StrictHttpResponse<ListResponseArgsOfItemDTO>> {
|
||||
let __params = this.newParams();
|
||||
let __headers = new HttpHeaders();
|
||||
let __body: any = null;
|
||||
__body = eans;
|
||||
let req = new HttpRequest<any>(
|
||||
'POST',
|
||||
this.rootUrl + `/s/byean`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
params: __params,
|
||||
responseType: 'json'
|
||||
});
|
||||
|
||||
return this.http.request<any>(req).pipe(
|
||||
__filter(_r => _r instanceof HttpResponse),
|
||||
__map((_r) => {
|
||||
return _r as __StrictHttpResponse<ListResponseArgsOfItemDTO>;
|
||||
})
|
||||
);
|
||||
}
|
||||
/**
|
||||
* @param eans undefined
|
||||
*/
|
||||
SearchByEAN(eans: Array<string>): __Observable<ListResponseArgsOfItemDTO> {
|
||||
return this.SearchByEANResponse(eans).pipe(
|
||||
__map(_r => _r.body as ListResponseArgsOfItemDTO)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id undefined
|
||||
*/
|
||||
|
||||
@@ -8,5 +8,5 @@ import { Injectable } from '@angular/core';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class AvConfiguration {
|
||||
rootUrl: string = 'https://isa.paragon-data.de/ava/v4';
|
||||
rootUrl: string = 'https://isa.paragon-data.de/ava/v2';
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
import { PriceDTO } from './price-dto';
|
||||
import { AvailabilityType } from './availability-type';
|
||||
export interface AvailabilityDTO {
|
||||
ssc?: string;
|
||||
itemId?: number;
|
||||
supplierProductNumber?: string;
|
||||
requestReference?: string;
|
||||
ean?: string;
|
||||
shop?: number;
|
||||
@@ -12,7 +12,7 @@ export interface AvailabilityDTO {
|
||||
supplierId?: number;
|
||||
logistician?: string;
|
||||
logisticianId?: number;
|
||||
ssc?: string;
|
||||
supplierProductNumber?: string;
|
||||
sscText?: string;
|
||||
qty?: number;
|
||||
isPrebooked?: boolean;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/* tslint:disable */
|
||||
import { PriceDTO } from './price-dto';
|
||||
export interface AvailabilityRequestDTO {
|
||||
price?: PriceDTO;
|
||||
itemId?: string;
|
||||
supplierProductNumber?: string;
|
||||
ean?: string;
|
||||
qty: number;
|
||||
orderCode?: string;
|
||||
supplier?: string;
|
||||
preBook?: boolean;
|
||||
price?: PriceDTO;
|
||||
supplierProductNumber?: string;
|
||||
ssc?: string;
|
||||
estimatedShipping?: string;
|
||||
shopId?: number;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* tslint:disable */
|
||||
import { GeoLocation } from './geo-location';
|
||||
export interface AddressDTO {
|
||||
street?: string;
|
||||
apartment?: string;
|
||||
careOf?: string;
|
||||
city?: string;
|
||||
district?: string;
|
||||
info?: string;
|
||||
po?: string;
|
||||
street?: string;
|
||||
careOf?: string;
|
||||
streetNumber?: string;
|
||||
zipCode?: string;
|
||||
state?: string;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* tslint:disable */
|
||||
import { GeoLocation } from './geo-location';
|
||||
export interface Address {
|
||||
region?: string;
|
||||
apartment?: string;
|
||||
careOf?: string;
|
||||
city?: string;
|
||||
district?: string;
|
||||
info?: string;
|
||||
po?: string;
|
||||
region?: string;
|
||||
careOf?: string;
|
||||
street?: string;
|
||||
streetNumber?: string;
|
||||
zipCode?: string;
|
||||
|
||||
@@ -4,14 +4,14 @@ import { PriceDTO } from './price-dto';
|
||||
import { EntityDTOContainerOfShopItemDTO } from './entity-dtocontainer-of-shop-item-dto';
|
||||
import { EntityDTOContainerOfSupplierDTO } from './entity-dtocontainer-of-supplier-dto';
|
||||
export interface AvailabilityDTO {
|
||||
supplierSSCText?: string;
|
||||
availabilityType: AvailabilityType;
|
||||
inStock?: number;
|
||||
ssc?: string;
|
||||
sscText?: string;
|
||||
supplierInfo?: string;
|
||||
isPrebooked?: boolean;
|
||||
supplierSSC?: string;
|
||||
supplierSSCText?: string;
|
||||
inStock?: number;
|
||||
price?: PriceDTO;
|
||||
estimatedShippingDate?: string;
|
||||
shopItem?: EntityDTOContainerOfShopItemDTO;
|
||||
|
||||
@@ -4,13 +4,13 @@ import { EntityDTOContainerOfLabelDTO } from './entity-dtocontainer-of-label-dto
|
||||
import { Address } from './address';
|
||||
import { BranchType } from './branch-type';
|
||||
export interface BranchDTO extends EntityDTOOfBranchDTOAndIReadOnlyBranch {
|
||||
isOnline?: boolean;
|
||||
label?: EntityDTOContainerOfLabelDTO;
|
||||
parent?: number;
|
||||
branchNumber?: string;
|
||||
name?: string;
|
||||
shortName?: string;
|
||||
key?: string;
|
||||
isOnline?: boolean;
|
||||
parent?: number;
|
||||
isOrderingEnabled?: boolean;
|
||||
isShippingEnabled?: boolean;
|
||||
address?: Address;
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/* tslint:disable */
|
||||
import { EntityReferenceDTO } from './entity-reference-dto';
|
||||
import { BuyerType } from './buyer-type';
|
||||
import { Gender } from './gender';
|
||||
import { BuyerType } from './buyer-type';
|
||||
import { CommunicationDetailsDTO } from './communication-details-dto';
|
||||
import { OrganisationDTO } from './organisation-dto';
|
||||
import { AddressDTO } from './address-dto';
|
||||
export interface BuyerDTO extends EntityReferenceDTO {
|
||||
firstName?: string;
|
||||
buyerNumber?: string;
|
||||
buyerType: BuyerType;
|
||||
isTemporaryAccount?: boolean;
|
||||
locale?: string;
|
||||
gender: Gender;
|
||||
title?: string;
|
||||
firstName?: string;
|
||||
buyerType: BuyerType;
|
||||
lastName?: string;
|
||||
dateOfBirth?: string;
|
||||
communicationDetails?: CommunicationDetailsDTO;
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOOfCheckoutDTOAndICheckout } from './entity-dtoof-checkout-dtoand-icheckout';
|
||||
import { EntityDTOContainerOfBranchDTO } from './entity-dtocontainer-of-branch-dto';
|
||||
import { EntityDTOContainerOfCheckoutItemDTO } from './entity-dtocontainer-of-checkout-item-dto';
|
||||
import { UserAccountDTO } from './user-account-dto';
|
||||
import { BuyerDTO } from './buyer-dto';
|
||||
import { PayerDTO } from './payer-dto';
|
||||
import { EntityDTOContainerOfDestinationDTO } from './entity-dtocontainer-of-destination-dto';
|
||||
import { EntityDTOContainerOfCheckoutDeliveryDTO } from './entity-dtocontainer-of-checkout-delivery-dto';
|
||||
import { EntityDTOContainerOfCheckoutItemDTO } from './entity-dtocontainer-of-checkout-item-dto';
|
||||
import { EntityDTOContainerOfBranchDTO } from './entity-dtocontainer-of-branch-dto';
|
||||
import { NotificationChannel } from './notification-channel';
|
||||
import { SelectionDTOOfShippingTarget } from './selection-dtoof-shipping-target';
|
||||
import { PaymentDTO } from './payment-dto';
|
||||
export interface CheckoutDTO extends EntityDTOOfCheckoutDTOAndICheckout {
|
||||
items?: Array<EntityDTOContainerOfCheckoutItemDTO>;
|
||||
label?: string;
|
||||
orderBranch?: EntityDTOContainerOfBranchDTO;
|
||||
userAccount?: UserAccountDTO;
|
||||
buyer?: BuyerDTO;
|
||||
payer?: PayerDTO;
|
||||
destinations?: Array<EntityDTOContainerOfDestinationDTO>;
|
||||
deliveries?: Array<EntityDTOContainerOfCheckoutDeliveryDTO>;
|
||||
items?: Array<EntityDTOContainerOfCheckoutItemDTO>;
|
||||
orderBranch?: EntityDTOContainerOfBranchDTO;
|
||||
notificationChannels: NotificationChannel;
|
||||
availableShippingTargets?: Array<SelectionDTOOfShippingTarget>;
|
||||
payment?: PaymentDTO;
|
||||
|
||||
@@ -3,12 +3,12 @@ import { EntityDTOOfCompanyDTOAndICompany } from './entity-dtoof-company-dtoand-
|
||||
import { EntityDTOContainerOfCompanyDTO } from './entity-dtocontainer-of-company-dto';
|
||||
import { AddressDTO } from './address-dto';
|
||||
export interface CompanyDTO extends EntityDTOOfCompanyDTOAndICompany {
|
||||
department?: string;
|
||||
parent?: EntityDTOContainerOfCompanyDTO;
|
||||
locale?: string;
|
||||
name?: string;
|
||||
nameSuffix?: string;
|
||||
legalForm?: string;
|
||||
department?: string;
|
||||
locale?: string;
|
||||
costUnit?: string;
|
||||
vatId?: string;
|
||||
address?: AddressDTO;
|
||||
|
||||
@@ -4,12 +4,12 @@ import { EntityDTOContainerOfCategoryDTO } from './entity-dtocontainer-of-catego
|
||||
import { QuantityUnitType } from './quantity-unit-type';
|
||||
import { ComponentItemDisplayType } from './component-item-display-type';
|
||||
export interface ComponentItemDTO {
|
||||
quantityMax?: number;
|
||||
name?: string;
|
||||
description?: string;
|
||||
item?: EntityDTOContainerOfItemDTO;
|
||||
category?: EntityDTOContainerOfCategoryDTO;
|
||||
required?: boolean;
|
||||
quantityMax?: number;
|
||||
description?: string;
|
||||
quantityUnitType: QuantityUnitType;
|
||||
unit?: string;
|
||||
displayType: ComponentItemDisplayType;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOOfFileDTOAndIFile } from './entity-dtoof-file-dtoand-ifile';
|
||||
export interface FileDTO extends EntityDTOOfFileDTOAndIFile {
|
||||
size?: number;
|
||||
name?: string;
|
||||
type?: string;
|
||||
path?: string;
|
||||
mime?: string;
|
||||
hash?: string;
|
||||
size?: number;
|
||||
type?: string;
|
||||
subtitle?: string;
|
||||
copyright?: string;
|
||||
locale?: string;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOOfItemDTOAndIItem } from './entity-dtoof-item-dtoand-iitem';
|
||||
import { WeightOfAvoirdupois } from './weight-of-avoirdupois';
|
||||
import { EntityDTOContainerOfItemDTO } from './entity-dtocontainer-of-item-dto';
|
||||
import { ContributorHelperDTO } from './contributor-helper-dto';
|
||||
import { EntityDTOContainerOfCompanyDTO } from './entity-dtocontainer-of-company-dto';
|
||||
import { EntityDTOContainerOfCategoryDTO } from './entity-dtocontainer-of-category-dto';
|
||||
import { SizeOfString } from './size-of-string';
|
||||
import { WeightOfAvoirdupois } from './weight-of-avoirdupois';
|
||||
import { ItemType } from './item-type';
|
||||
import { EntityDTOContainerOfFileDTO } from './entity-dtocontainer-of-file-dto';
|
||||
import { EntityDTOContainerOfTextDTO } from './entity-dtocontainer-of-text-dto';
|
||||
@@ -14,8 +14,8 @@ import { ItemLabelDTO } from './item-label-dto';
|
||||
import { FoodDTO } from './food-dto';
|
||||
import { EntityDTOContainerOfTenantDTO } from './entity-dtocontainer-of-tenant-dto';
|
||||
export interface ItemDTO extends EntityDTOOfItemDTOAndIItem {
|
||||
weight?: WeightOfAvoirdupois;
|
||||
itemNumber?: string;
|
||||
name?: string;
|
||||
subtitle?: string;
|
||||
description?: string;
|
||||
ean?: string;
|
||||
@@ -28,7 +28,7 @@ export interface ItemDTO extends EntityDTOOfItemDTOAndIItem {
|
||||
categories?: Array<EntityDTOContainerOfCategoryDTO>;
|
||||
manufacturingCosts?: number;
|
||||
size?: SizeOfString;
|
||||
weight?: WeightOfAvoirdupois;
|
||||
name?: string;
|
||||
netWeight?: WeightOfAvoirdupois;
|
||||
weightOfPackaging?: WeightOfAvoirdupois;
|
||||
itemType: ItemType;
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
/* tslint:disable */
|
||||
import { EntityReferenceDTO } from './entity-reference-dto';
|
||||
import { PayerType } from './payer-type';
|
||||
import { PayerStatus } from './payer-status';
|
||||
import { Gender } from './gender';
|
||||
import { PayerType } from './payer-type';
|
||||
import { CommunicationDetailsDTO } from './communication-details-dto';
|
||||
import { OrganisationDTO } from './organisation-dto';
|
||||
import { AddressDTO } from './address-dto';
|
||||
export interface PayerDTO extends EntityReferenceDTO {
|
||||
firstName?: string;
|
||||
payerNumber?: string;
|
||||
payerType: PayerType;
|
||||
payerStatus: PayerStatus;
|
||||
locale?: string;
|
||||
gender: Gender;
|
||||
title?: string;
|
||||
firstName?: string;
|
||||
payerType: PayerType;
|
||||
lastName?: string;
|
||||
dateOfBirth?: string;
|
||||
communicationDetails?: CommunicationDetailsDTO;
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
import { SizeOfString } from './size-of-string';
|
||||
import { WeightOfAvoirdupois } from './weight-of-avoirdupois';
|
||||
export interface ProductDTO {
|
||||
productGroup?: string;
|
||||
name?: string;
|
||||
additionalName?: string;
|
||||
ean?: string;
|
||||
supplierProductNumber?: string;
|
||||
catalogProductNumber?: string;
|
||||
contributors?: string;
|
||||
manufacturer?: string;
|
||||
publicationDate?: string;
|
||||
productGroup?: string;
|
||||
additionalName?: string;
|
||||
edition?: string;
|
||||
volume?: string;
|
||||
serial?: string;
|
||||
|
||||
@@ -9,15 +9,15 @@ import { ShippingTarget } from './shipping-target';
|
||||
import { CountryTargetDTO } from './country-target-dto';
|
||||
import { BranchTargetDTO } from './branch-target-dto';
|
||||
export interface ShopDTO extends EntityDTOOfShopDTOAndIShop {
|
||||
orderingEnabledStart?: string;
|
||||
name?: string;
|
||||
description?: string;
|
||||
branch?: EntityDTOContainerOfBranchDTO;
|
||||
defaultLocale?: string;
|
||||
defaultTargetBranch?: EntityDTOContainerOfBranchDTO;
|
||||
defaultLogistician?: EntityDTOContainerOfLogisticianDTO;
|
||||
defaultCurrency?: EntityDTOContainerOfCurrencyDTO;
|
||||
defaultCountry?: EntityDTOContainerOfCountryDTO;
|
||||
orderingEnabledStart?: string;
|
||||
description?: string;
|
||||
orderingEnabledStop?: string;
|
||||
shippingEnabledStart?: string;
|
||||
shippingEnabledStop?: string;
|
||||
|
||||
@@ -12,8 +12,8 @@ import { EntityDTOContainerOfShopDTO } from './entity-dtocontainer-of-shop-dto';
|
||||
import { EntityDTOContainerOfDestinationDTO } from './entity-dtocontainer-of-destination-dto';
|
||||
import { PromotionDTO } from './promotion-dto';
|
||||
export interface ShoppingCartItemDTO extends EntityDTOOfShoppingCartItemDTOAndIShoppingCartItem {
|
||||
specialComment?: string;
|
||||
quantity?: number;
|
||||
ssc?: string;
|
||||
sscText?: string;
|
||||
shopItem?: EntityDTOContainerOfShopItemDTO;
|
||||
product?: ProductDTO;
|
||||
@@ -22,7 +22,7 @@ export interface ShoppingCartItemDTO extends EntityDTOOfShoppingCartItemDTOAndIS
|
||||
availability?: AvailabilityDTO;
|
||||
agentComment?: string;
|
||||
buyerComment?: string;
|
||||
specialComment?: string;
|
||||
ssc?: string;
|
||||
lastAvailabilityRequest?: string;
|
||||
shoppingCartItemStatus: ShoppingCartItemStatus;
|
||||
total?: PriceDTO;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* tslint:disable */
|
||||
import { Gender } from './gender';
|
||||
export interface UserAccountDTO {
|
||||
title?: string;
|
||||
isTemporaryAccount?: boolean;
|
||||
userName?: string;
|
||||
alias?: string;
|
||||
password?: string;
|
||||
gender?: Gender;
|
||||
title?: string;
|
||||
userName?: string;
|
||||
firstName?: string;
|
||||
lastName?: string;
|
||||
dateOfBirth?: string;
|
||||
|
||||
@@ -99,9 +99,9 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutGetShoppingCartParams` containing the following parameters:
|
||||
*
|
||||
* - `shoppingCartId`: Warenkorb PK
|
||||
* - `shoppingCartId`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutGetShoppingCartResponse(params: StoreCheckoutService.StoreCheckoutGetShoppingCartParams): __Observable<__StrictHttpResponse<ResponseArgsOfShoppingCartDTO>> {
|
||||
let __params = this.newParams();
|
||||
@@ -129,9 +129,9 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutGetShoppingCartParams` containing the following parameters:
|
||||
*
|
||||
* - `shoppingCartId`: Warenkorb PK
|
||||
* - `shoppingCartId`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutGetShoppingCart(params: StoreCheckoutService.StoreCheckoutGetShoppingCartParams): __Observable<ResponseArgsOfShoppingCartDTO> {
|
||||
return this.StoreCheckoutGetShoppingCartResponse(params).pipe(
|
||||
@@ -140,7 +140,7 @@ class StoreCheckoutService extends __BaseService {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param locale Lokalisierung
|
||||
* @param locale undefined
|
||||
*/
|
||||
StoreCheckoutCreateShoppingCartResponse(locale?: null | string): __Observable<__StrictHttpResponse<ResponseArgsOfShoppingCartDTO>> {
|
||||
let __params = this.newParams();
|
||||
@@ -165,7 +165,7 @@ class StoreCheckoutService extends __BaseService {
|
||||
);
|
||||
}
|
||||
/**
|
||||
* @param locale Lokalisierung
|
||||
* @param locale undefined
|
||||
*/
|
||||
StoreCheckoutCreateShoppingCart(locale?: null | string): __Observable<ResponseArgsOfShoppingCartDTO> {
|
||||
return this.StoreCheckoutCreateShoppingCartResponse(locale).pipe(
|
||||
@@ -174,14 +174,13 @@ class StoreCheckoutService extends __BaseService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Ist ein Artikel bereits vorhanden, wird die übergebene Menge addiert.
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutAddItemToShoppingCartParams` containing the following parameters:
|
||||
*
|
||||
* - `shoppingCartId`: Warenkorb PK
|
||||
* - `shoppingCartId`:
|
||||
*
|
||||
* - `items`: Artikel
|
||||
* - `items`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutAddItemToShoppingCartResponse(params: StoreCheckoutService.StoreCheckoutAddItemToShoppingCartParams): __Observable<__StrictHttpResponse<ResponseArgsOfShoppingCartDTO>> {
|
||||
let __params = this.newParams();
|
||||
@@ -208,14 +207,13 @@ class StoreCheckoutService extends __BaseService {
|
||||
);
|
||||
}
|
||||
/**
|
||||
* Ist ein Artikel bereits vorhanden, wird die übergebene Menge addiert.
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutAddItemToShoppingCartParams` containing the following parameters:
|
||||
*
|
||||
* - `shoppingCartId`: Warenkorb PK
|
||||
* - `shoppingCartId`:
|
||||
*
|
||||
* - `items`: Artikel
|
||||
* - `items`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutAddItemToShoppingCart(params: StoreCheckoutService.StoreCheckoutAddItemToShoppingCartParams): __Observable<ResponseArgsOfShoppingCartDTO> {
|
||||
return this.StoreCheckoutAddItemToShoppingCartResponse(params).pipe(
|
||||
@@ -226,9 +224,9 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutCreateShoppingCartAndAddItemParams` containing the following parameters:
|
||||
*
|
||||
* - `items`: Artikel
|
||||
* - `items`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutCreateShoppingCartAndAddItemResponse(params: StoreCheckoutService.StoreCheckoutCreateShoppingCartAndAddItemParams): __Observable<__StrictHttpResponse<ResponseArgsOfShoppingCartDTO>> {
|
||||
let __params = this.newParams();
|
||||
@@ -256,9 +254,9 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutCreateShoppingCartAndAddItemParams` containing the following parameters:
|
||||
*
|
||||
* - `items`: Artikel
|
||||
* - `items`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutCreateShoppingCartAndAddItem(params: StoreCheckoutService.StoreCheckoutCreateShoppingCartAndAddItemParams): __Observable<ResponseArgsOfShoppingCartDTO> {
|
||||
return this.StoreCheckoutCreateShoppingCartAndAddItemResponse(params).pipe(
|
||||
@@ -615,9 +613,9 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutCreateOrRefreshCheckoutParams` containing the following parameters:
|
||||
*
|
||||
* - `shoppingCartId`: Warenkorb PK
|
||||
* - `shoppingCartId`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutCreateOrRefreshCheckoutResponse(params: StoreCheckoutService.StoreCheckoutCreateOrRefreshCheckoutParams): __Observable<__StrictHttpResponse<ResponseArgsOfCheckoutDTO>> {
|
||||
let __params = this.newParams();
|
||||
@@ -645,9 +643,9 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutCreateOrRefreshCheckoutParams` containing the following parameters:
|
||||
*
|
||||
* - `shoppingCartId`: Warenkorb PK
|
||||
* - `shoppingCartId`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutCreateOrRefreshCheckout(params: StoreCheckoutService.StoreCheckoutCreateOrRefreshCheckoutParams): __Observable<ResponseArgsOfCheckoutDTO> {
|
||||
return this.StoreCheckoutCreateOrRefreshCheckoutResponse(params).pipe(
|
||||
@@ -658,9 +656,9 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutDiscardCheckoutParams` containing the following parameters:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutDiscardCheckoutResponse(params: StoreCheckoutService.StoreCheckoutDiscardCheckoutParams): __Observable<__StrictHttpResponse<ResponseArgsOfCheckoutDTO>> {
|
||||
let __params = this.newParams();
|
||||
@@ -688,9 +686,9 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutDiscardCheckoutParams` containing the following parameters:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutDiscardCheckout(params: StoreCheckoutService.StoreCheckoutDiscardCheckoutParams): __Observable<ResponseArgsOfCheckoutDTO> {
|
||||
return this.StoreCheckoutDiscardCheckoutResponse(params).pipe(
|
||||
@@ -701,9 +699,9 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutGetCheckoutParams` containing the following parameters:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutGetCheckoutResponse(params: StoreCheckoutService.StoreCheckoutGetCheckoutParams): __Observable<__StrictHttpResponse<ResponseArgsOfCheckoutDTO>> {
|
||||
let __params = this.newParams();
|
||||
@@ -731,9 +729,9 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutGetCheckoutParams` containing the following parameters:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutGetCheckout(params: StoreCheckoutService.StoreCheckoutGetCheckoutParams): __Observable<ResponseArgsOfCheckoutDTO> {
|
||||
return this.StoreCheckoutGetCheckoutResponse(params).pipe(
|
||||
@@ -744,9 +742,9 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutResetCheckoutParams` containing the following parameters:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutResetCheckoutResponse(params: StoreCheckoutService.StoreCheckoutResetCheckoutParams): __Observable<__StrictHttpResponse<ResponseArgsOfCheckoutDTO>> {
|
||||
let __params = this.newParams();
|
||||
@@ -774,9 +772,9 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutResetCheckoutParams` containing the following parameters:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutResetCheckout(params: StoreCheckoutService.StoreCheckoutResetCheckoutParams): __Observable<ResponseArgsOfCheckoutDTO> {
|
||||
return this.StoreCheckoutResetCheckoutResponse(params).pipe(
|
||||
@@ -787,9 +785,9 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutCurrentCheckoutStepParams` containing the following parameters:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutCurrentCheckoutStepResponse(params: StoreCheckoutService.StoreCheckoutCurrentCheckoutStepParams): __Observable<__StrictHttpResponse<ResponseArgsOfCheckoutStep>> {
|
||||
let __params = this.newParams();
|
||||
@@ -817,9 +815,9 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutCurrentCheckoutStepParams` containing the following parameters:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutCurrentCheckoutStep(params: StoreCheckoutService.StoreCheckoutCurrentCheckoutStepParams): __Observable<ResponseArgsOfCheckoutStep> {
|
||||
return this.StoreCheckoutCurrentCheckoutStepResponse(params).pipe(
|
||||
@@ -1196,11 +1194,11 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutCreateDestinationParams` containing the following parameters:
|
||||
*
|
||||
* - `destinationDTO`: Lieferzieldaten
|
||||
* - `destinationDTO`:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutCreateDestinationResponse(params: StoreCheckoutService.StoreCheckoutCreateDestinationParams): __Observable<__StrictHttpResponse<ResponseArgsOfDestinationDTO>> {
|
||||
let __params = this.newParams();
|
||||
@@ -1229,11 +1227,11 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutCreateDestinationParams` containing the following parameters:
|
||||
*
|
||||
* - `destinationDTO`: Lieferzieldaten
|
||||
* - `destinationDTO`:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutCreateDestination(params: StoreCheckoutService.StoreCheckoutCreateDestinationParams): __Observable<ResponseArgsOfDestinationDTO> {
|
||||
return this.StoreCheckoutCreateDestinationResponse(params).pipe(
|
||||
@@ -1244,13 +1242,13 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutUpdateDestinationParams` containing the following parameters:
|
||||
*
|
||||
* - `destinationId`: Lieferziel PK
|
||||
* - `destinationId`:
|
||||
*
|
||||
* - `destinationDTO`: Lieferzieldaten
|
||||
* - `destinationDTO`:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutUpdateDestinationResponse(params: StoreCheckoutService.StoreCheckoutUpdateDestinationParams): __Observable<__StrictHttpResponse<ResponseArgsOfDestinationDTO>> {
|
||||
let __params = this.newParams();
|
||||
@@ -1280,13 +1278,13 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutUpdateDestinationParams` containing the following parameters:
|
||||
*
|
||||
* - `destinationId`: Lieferziel PK
|
||||
* - `destinationId`:
|
||||
*
|
||||
* - `destinationDTO`: Lieferzieldaten
|
||||
* - `destinationDTO`:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutUpdateDestination(params: StoreCheckoutService.StoreCheckoutUpdateDestinationParams): __Observable<ResponseArgsOfDestinationDTO> {
|
||||
return this.StoreCheckoutUpdateDestinationResponse(params).pipe(
|
||||
@@ -1295,12 +1293,11 @@ class StoreCheckoutService extends __BaseService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Wenn eine bereits eingegebene Adresse wieder entfernt werden soll
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutDeleteDestinationParams` containing the following parameters:
|
||||
*
|
||||
* - `destinationId`: Lieferziel PK
|
||||
* - `destinationId`:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `returnCheckout`:
|
||||
*
|
||||
@@ -1332,12 +1329,11 @@ class StoreCheckoutService extends __BaseService {
|
||||
);
|
||||
}
|
||||
/**
|
||||
* Wenn eine bereits eingegebene Adresse wieder entfernt werden soll
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutDeleteDestinationParams` containing the following parameters:
|
||||
*
|
||||
* - `destinationId`: Lieferziel PK
|
||||
* - `destinationId`:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `returnCheckout`:
|
||||
*
|
||||
@@ -1395,11 +1391,11 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutCreateDeliveryParams` containing the following parameters:
|
||||
*
|
||||
* - `deliveryContainer`: Daten zur Lieferung
|
||||
* - `deliveryContainer`:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutCreateDeliveryResponse(params: StoreCheckoutService.StoreCheckoutCreateDeliveryParams): __Observable<__StrictHttpResponse<ResponseArgsOfCheckoutDeliveryDTO>> {
|
||||
let __params = this.newParams();
|
||||
@@ -1428,11 +1424,11 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutCreateDeliveryParams` containing the following parameters:
|
||||
*
|
||||
* - `deliveryContainer`: Daten zur Lieferung
|
||||
* - `deliveryContainer`:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutCreateDelivery(params: StoreCheckoutService.StoreCheckoutCreateDeliveryParams): __Observable<ResponseArgsOfCheckoutDeliveryDTO> {
|
||||
return this.StoreCheckoutCreateDeliveryResponse(params).pipe(
|
||||
@@ -1443,15 +1439,15 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutUpdateDeliveryParams` containing the following parameters:
|
||||
*
|
||||
* - `deliveryId`: Lieferung PK
|
||||
* - `deliveryId`:
|
||||
*
|
||||
* - `deliveryContainer`: Date zur Lieferung
|
||||
* - `deliveryContainer`:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `returnCheckout`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutUpdateDeliveryResponse(params: StoreCheckoutService.StoreCheckoutUpdateDeliveryParams): __Observable<__StrictHttpResponse<ResponseArgsOfCheckoutDTO>> {
|
||||
let __params = this.newParams();
|
||||
@@ -1482,15 +1478,15 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutUpdateDeliveryParams` containing the following parameters:
|
||||
*
|
||||
* - `deliveryId`: Lieferung PK
|
||||
* - `deliveryId`:
|
||||
*
|
||||
* - `deliveryContainer`: Date zur Lieferung
|
||||
* - `deliveryContainer`:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `returnCheckout`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutUpdateDelivery(params: StoreCheckoutService.StoreCheckoutUpdateDeliveryParams): __Observable<ResponseArgsOfCheckoutDTO> {
|
||||
return this.StoreCheckoutUpdateDeliveryResponse(params).pipe(
|
||||
@@ -1501,9 +1497,9 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutGetBranchesByCheckoutParams` containing the following parameters:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutGetBranchesByCheckoutResponse(params: StoreCheckoutService.StoreCheckoutGetBranchesByCheckoutParams): __Observable<__StrictHttpResponse<ResponseArgsOfIEnumerableOfBranchDTO>> {
|
||||
let __params = this.newParams();
|
||||
@@ -1531,9 +1527,9 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutGetBranchesByCheckoutParams` containing the following parameters:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutGetBranchesByCheckout(params: StoreCheckoutService.StoreCheckoutGetBranchesByCheckoutParams): __Observable<ResponseArgsOfIEnumerableOfBranchDTO> {
|
||||
return this.StoreCheckoutGetBranchesByCheckoutResponse(params).pipe(
|
||||
@@ -1640,9 +1636,9 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutGetCountriesByCheckoutParams` containing the following parameters:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutGetCountriesByCheckoutResponse(params: StoreCheckoutService.StoreCheckoutGetCountriesByCheckoutParams): __Observable<__StrictHttpResponse<ResponseArgsOfIEnumerableOfCountryDTO>> {
|
||||
let __params = this.newParams();
|
||||
@@ -1670,9 +1666,9 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutGetCountriesByCheckoutParams` containing the following parameters:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutGetCountriesByCheckout(params: StoreCheckoutService.StoreCheckoutGetCountriesByCheckoutParams): __Observable<ResponseArgsOfIEnumerableOfCountryDTO> {
|
||||
return this.StoreCheckoutGetCountriesByCheckoutResponse(params).pipe(
|
||||
@@ -1687,7 +1683,7 @@ class StoreCheckoutService extends __BaseService {
|
||||
*
|
||||
* - `skip`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutGetCountriesResponse(params: StoreCheckoutService.StoreCheckoutGetCountriesParams): __Observable<__StrictHttpResponse<ResponseArgsOfIEnumerableOfCountryDTO>> {
|
||||
let __params = this.newParams();
|
||||
@@ -1720,7 +1716,7 @@ class StoreCheckoutService extends __BaseService {
|
||||
*
|
||||
* - `skip`:
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
* - `locale`:
|
||||
*/
|
||||
StoreCheckoutGetCountries(params: StoreCheckoutService.StoreCheckoutGetCountriesParams): __Observable<ResponseArgsOfIEnumerableOfCountryDTO> {
|
||||
return this.StoreCheckoutGetCountriesResponse(params).pipe(
|
||||
@@ -1905,7 +1901,7 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutGetCheckoutPaymentParams` containing the following parameters:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `locale`:
|
||||
*/
|
||||
@@ -1935,7 +1931,7 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutGetCheckoutPaymentParams` containing the following parameters:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `locale`:
|
||||
*/
|
||||
@@ -2102,11 +2098,11 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutAddVoucherParams` containing the following parameters:
|
||||
*
|
||||
* - `voucherCode`: Gutscheincode
|
||||
* - `voucherCode`:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `returnCheckout`: Wenn true (default) wird das Bestellprozessobjekt zurückgegeben
|
||||
* - `returnCheckout`:
|
||||
*
|
||||
* - `locale`:
|
||||
*/
|
||||
@@ -2138,11 +2134,11 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutAddVoucherParams` containing the following parameters:
|
||||
*
|
||||
* - `voucherCode`: Gutscheincode
|
||||
* - `voucherCode`:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `returnCheckout`: Wenn true (default) wird das Bestellprozessobjekt zurückgegeben
|
||||
* - `returnCheckout`:
|
||||
*
|
||||
* - `locale`:
|
||||
*/
|
||||
@@ -2155,11 +2151,11 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutDeleteVoucherParams` containing the following parameters:
|
||||
*
|
||||
* - `voucherId`: Gutschein PId
|
||||
* - `voucherId`:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `returnCheckout`: Wenn true (default) wird das Bestellprozessobjekt zurückgegeben
|
||||
* - `returnCheckout`:
|
||||
*
|
||||
* - `locale`:
|
||||
*/
|
||||
@@ -2191,11 +2187,11 @@ class StoreCheckoutService extends __BaseService {
|
||||
/**
|
||||
* @param params The `StoreCheckoutService.StoreCheckoutDeleteVoucherParams` containing the following parameters:
|
||||
*
|
||||
* - `voucherId`: Gutschein PId
|
||||
* - `voucherId`:
|
||||
*
|
||||
* - `checkoutId`: Bestellprozess PK
|
||||
* - `checkoutId`:
|
||||
*
|
||||
* - `returnCheckout`: Wenn true (default) wird das Bestellprozessobjekt zurückgegeben
|
||||
* - `returnCheckout`:
|
||||
*
|
||||
* - `locale`:
|
||||
*/
|
||||
@@ -2409,15 +2405,7 @@ module StoreCheckoutService {
|
||||
* Parameters for StoreCheckoutGetShoppingCart
|
||||
*/
|
||||
export interface StoreCheckoutGetShoppingCartParams {
|
||||
|
||||
/**
|
||||
* Warenkorb PK
|
||||
*/
|
||||
shoppingCartId: number;
|
||||
|
||||
/**
|
||||
* Lokalisierung
|
||||
*/
|
||||
locale?: null | string;
|
||||
}
|
||||
|
||||
@@ -2425,20 +2413,8 @@ module StoreCheckoutService {
|
||||
* Parameters for StoreCheckoutAddItemToShoppingCart
|
||||
*/
|
||||
export interface StoreCheckoutAddItemToShoppingCartParams {
|
||||
|
||||
/**
|
||||
* Warenkorb PK
|
||||
*/
|
||||
shoppingCartId: number;
|
||||
|
||||
/**
|
||||
* Artikel
|
||||
*/
|
||||
items: Array<AddToShoppingCartDTO>;
|
||||
|
||||
/**
|
||||
* Lokalisierung
|
||||
*/
|
||||
locale?: null | string;
|
||||
}
|
||||
|
||||
@@ -2446,15 +2422,7 @@ module StoreCheckoutService {
|
||||
* Parameters for StoreCheckoutCreateShoppingCartAndAddItem
|
||||
*/
|
||||
export interface StoreCheckoutCreateShoppingCartAndAddItemParams {
|
||||
|
||||
/**
|
||||
* Artikel
|
||||
*/
|
||||
items: Array<AddToShoppingCartDTO>;
|
||||
|
||||
/**
|
||||
* Lokalisierung
|
||||
*/
|
||||
locale?: null | string;
|
||||
}
|
||||
|
||||
@@ -2527,15 +2495,7 @@ module StoreCheckoutService {
|
||||
* Parameters for StoreCheckoutCreateOrRefreshCheckout
|
||||
*/
|
||||
export interface StoreCheckoutCreateOrRefreshCheckoutParams {
|
||||
|
||||
/**
|
||||
* Warenkorb PK
|
||||
*/
|
||||
shoppingCartId: number;
|
||||
|
||||
/**
|
||||
* Lokalisierung
|
||||
*/
|
||||
locale?: null | string;
|
||||
}
|
||||
|
||||
@@ -2543,15 +2503,7 @@ module StoreCheckoutService {
|
||||
* Parameters for StoreCheckoutDiscardCheckout
|
||||
*/
|
||||
export interface StoreCheckoutDiscardCheckoutParams {
|
||||
|
||||
/**
|
||||
* Bestellprozess PK
|
||||
*/
|
||||
checkoutId: number;
|
||||
|
||||
/**
|
||||
* Lokalisierung
|
||||
*/
|
||||
locale?: null | string;
|
||||
}
|
||||
|
||||
@@ -2559,15 +2511,7 @@ module StoreCheckoutService {
|
||||
* Parameters for StoreCheckoutGetCheckout
|
||||
*/
|
||||
export interface StoreCheckoutGetCheckoutParams {
|
||||
|
||||
/**
|
||||
* Bestellprozess PK
|
||||
*/
|
||||
checkoutId: number;
|
||||
|
||||
/**
|
||||
* Lokalisierung
|
||||
*/
|
||||
locale?: null | string;
|
||||
}
|
||||
|
||||
@@ -2575,15 +2519,7 @@ module StoreCheckoutService {
|
||||
* Parameters for StoreCheckoutResetCheckout
|
||||
*/
|
||||
export interface StoreCheckoutResetCheckoutParams {
|
||||
|
||||
/**
|
||||
* Bestellprozess PK
|
||||
*/
|
||||
checkoutId: number;
|
||||
|
||||
/**
|
||||
* Lokalisierung
|
||||
*/
|
||||
locale?: null | string;
|
||||
}
|
||||
|
||||
@@ -2591,15 +2527,7 @@ module StoreCheckoutService {
|
||||
* Parameters for StoreCheckoutCurrentCheckoutStep
|
||||
*/
|
||||
export interface StoreCheckoutCurrentCheckoutStepParams {
|
||||
|
||||
/**
|
||||
* Bestellprozess PK
|
||||
*/
|
||||
checkoutId: number;
|
||||
|
||||
/**
|
||||
* Lokalisierung
|
||||
*/
|
||||
locale?: null | string;
|
||||
}
|
||||
|
||||
@@ -2676,20 +2604,8 @@ module StoreCheckoutService {
|
||||
* Parameters for StoreCheckoutCreateDestination
|
||||
*/
|
||||
export interface StoreCheckoutCreateDestinationParams {
|
||||
|
||||
/**
|
||||
* Lieferzieldaten
|
||||
*/
|
||||
destinationDTO: DestinationDTO;
|
||||
|
||||
/**
|
||||
* Bestellprozess PK
|
||||
*/
|
||||
checkoutId: number;
|
||||
|
||||
/**
|
||||
* Lokalisierung
|
||||
*/
|
||||
locale?: null | string;
|
||||
}
|
||||
|
||||
@@ -2697,25 +2613,9 @@ module StoreCheckoutService {
|
||||
* Parameters for StoreCheckoutUpdateDestination
|
||||
*/
|
||||
export interface StoreCheckoutUpdateDestinationParams {
|
||||
|
||||
/**
|
||||
* Lieferziel PK
|
||||
*/
|
||||
destinationId: number;
|
||||
|
||||
/**
|
||||
* Lieferzieldaten
|
||||
*/
|
||||
destinationDTO: DestinationDTO;
|
||||
|
||||
/**
|
||||
* Bestellprozess PK
|
||||
*/
|
||||
checkoutId: number;
|
||||
|
||||
/**
|
||||
* Lokalisierung
|
||||
*/
|
||||
locale?: null | string;
|
||||
}
|
||||
|
||||
@@ -2723,15 +2623,7 @@ module StoreCheckoutService {
|
||||
* Parameters for StoreCheckoutDeleteDestination
|
||||
*/
|
||||
export interface StoreCheckoutDeleteDestinationParams {
|
||||
|
||||
/**
|
||||
* Lieferziel PK
|
||||
*/
|
||||
destinationId: number;
|
||||
|
||||
/**
|
||||
* Bestellprozess PK
|
||||
*/
|
||||
checkoutId: number;
|
||||
returnCheckout?: boolean;
|
||||
locale?: null | string;
|
||||
@@ -2749,20 +2641,8 @@ module StoreCheckoutService {
|
||||
* Parameters for StoreCheckoutCreateDelivery
|
||||
*/
|
||||
export interface StoreCheckoutCreateDeliveryParams {
|
||||
|
||||
/**
|
||||
* Daten zur Lieferung
|
||||
*/
|
||||
deliveryContainer: DeliveryContainer;
|
||||
|
||||
/**
|
||||
* Bestellprozess PK
|
||||
*/
|
||||
checkoutId: number;
|
||||
|
||||
/**
|
||||
* Lokalisierung
|
||||
*/
|
||||
locale?: null | string;
|
||||
}
|
||||
|
||||
@@ -2770,26 +2650,10 @@ module StoreCheckoutService {
|
||||
* Parameters for StoreCheckoutUpdateDelivery
|
||||
*/
|
||||
export interface StoreCheckoutUpdateDeliveryParams {
|
||||
|
||||
/**
|
||||
* Lieferung PK
|
||||
*/
|
||||
deliveryId: number;
|
||||
|
||||
/**
|
||||
* Date zur Lieferung
|
||||
*/
|
||||
deliveryContainer: DeliveryContainer;
|
||||
|
||||
/**
|
||||
* Bestellprozess PK
|
||||
*/
|
||||
checkoutId: number;
|
||||
returnCheckout?: boolean;
|
||||
|
||||
/**
|
||||
* Lokalisierung
|
||||
*/
|
||||
locale?: null | string;
|
||||
}
|
||||
|
||||
@@ -2797,15 +2661,7 @@ module StoreCheckoutService {
|
||||
* Parameters for StoreCheckoutGetBranchesByCheckout
|
||||
*/
|
||||
export interface StoreCheckoutGetBranchesByCheckoutParams {
|
||||
|
||||
/**
|
||||
* Bestellprozess PK
|
||||
*/
|
||||
checkoutId: number;
|
||||
|
||||
/**
|
||||
* Lokalisierung
|
||||
*/
|
||||
locale?: null | string;
|
||||
}
|
||||
|
||||
@@ -2831,15 +2687,7 @@ module StoreCheckoutService {
|
||||
* Parameters for StoreCheckoutGetCountriesByCheckout
|
||||
*/
|
||||
export interface StoreCheckoutGetCountriesByCheckoutParams {
|
||||
|
||||
/**
|
||||
* Bestellprozess PK
|
||||
*/
|
||||
checkoutId: number;
|
||||
|
||||
/**
|
||||
* Lokalisierung
|
||||
*/
|
||||
locale?: null | string;
|
||||
}
|
||||
|
||||
@@ -2849,10 +2697,6 @@ module StoreCheckoutService {
|
||||
export interface StoreCheckoutGetCountriesParams {
|
||||
take?: null | number;
|
||||
skip?: null | number;
|
||||
|
||||
/**
|
||||
* Lokalisierung
|
||||
*/
|
||||
locale?: null | string;
|
||||
}
|
||||
|
||||
@@ -2893,10 +2737,6 @@ module StoreCheckoutService {
|
||||
* Parameters for StoreCheckoutGetCheckoutPayment
|
||||
*/
|
||||
export interface StoreCheckoutGetCheckoutPaymentParams {
|
||||
|
||||
/**
|
||||
* Bestellprozess PK
|
||||
*/
|
||||
checkoutId: number;
|
||||
locale?: null | string;
|
||||
}
|
||||
@@ -2934,20 +2774,8 @@ module StoreCheckoutService {
|
||||
* Parameters for StoreCheckoutAddVoucher
|
||||
*/
|
||||
export interface StoreCheckoutAddVoucherParams {
|
||||
|
||||
/**
|
||||
* Gutscheincode
|
||||
*/
|
||||
voucherCode: string;
|
||||
|
||||
/**
|
||||
* Bestellprozess PK
|
||||
*/
|
||||
checkoutId: number;
|
||||
|
||||
/**
|
||||
* Wenn true (default) wird das Bestellprozessobjekt zurückgegeben
|
||||
*/
|
||||
returnCheckout?: boolean;
|
||||
locale?: null | string;
|
||||
}
|
||||
@@ -2956,20 +2784,8 @@ module StoreCheckoutService {
|
||||
* Parameters for StoreCheckoutDeleteVoucher
|
||||
*/
|
||||
export interface StoreCheckoutDeleteVoucherParams {
|
||||
|
||||
/**
|
||||
* Gutschein PId
|
||||
*/
|
||||
voucherId: number;
|
||||
|
||||
/**
|
||||
* Bestellprozess PK
|
||||
*/
|
||||
checkoutId: number;
|
||||
|
||||
/**
|
||||
* Wenn true (default) wird das Bestellprozessobjekt zurückgegeben
|
||||
*/
|
||||
returnCheckout?: boolean;
|
||||
locale?: null | string;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* tslint:disable */
|
||||
import { GeoLocation } from './geo-location';
|
||||
export interface AddressDTO {
|
||||
street?: string;
|
||||
apartment?: string;
|
||||
careOf?: string;
|
||||
city?: string;
|
||||
district?: string;
|
||||
info?: string;
|
||||
po?: string;
|
||||
street?: string;
|
||||
careOf?: string;
|
||||
streetNumber?: string;
|
||||
zipCode?: string;
|
||||
state?: string;
|
||||
|
||||
@@ -5,16 +5,16 @@
|
||||
*/
|
||||
export interface BonusCardInfoDTO {
|
||||
|
||||
/**
|
||||
* Geburtsdatum
|
||||
*/
|
||||
dateOfBirth?: string;
|
||||
|
||||
/**
|
||||
* Kartennummer
|
||||
*/
|
||||
code?: string;
|
||||
|
||||
/**
|
||||
* Format (Karte, App, ...)
|
||||
*/
|
||||
format?: string;
|
||||
|
||||
/**
|
||||
* Anrede
|
||||
*/
|
||||
@@ -41,9 +41,9 @@ export interface BonusCardInfoDTO {
|
||||
address?: any;
|
||||
|
||||
/**
|
||||
* Geburtsdatum
|
||||
* Format (Karte, App, ...)
|
||||
*/
|
||||
dateOfBirth?: string;
|
||||
format?: string;
|
||||
|
||||
/**
|
||||
* E-Mail Adresse
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOOfCustomerDTOAndICustomer } from './entity-dtoof-customer-dtoand-icustomer';
|
||||
import { EnvironmentChannel } from './environment-channel';
|
||||
import { EntityDTOContainerOfUserDTO } from './entity-dtocontainer-of-user-dto';
|
||||
import { EntityDTOContainerOfBranchDTO } from './entity-dtocontainer-of-branch-dto';
|
||||
import { CustomerType } from './customer-type';
|
||||
@@ -10,6 +9,7 @@ import { Gender } from './gender';
|
||||
import { CommunicationDetailsDTO } from './communication-details-dto';
|
||||
import { AddressDTO } from './address-dto';
|
||||
import { EntityDTOContainerOfShippingAddressDTO } from './entity-dtocontainer-of-shipping-address-dto';
|
||||
import { EnvironmentChannel } from './environment-channel';
|
||||
import { EntityDTOContainerOfLabelDTO } from './entity-dtocontainer-of-label-dto';
|
||||
import { EntityDTOContainerOfBonusCardDTO } from './entity-dtocontainer-of-bonus-card-dto';
|
||||
import { NotificationChannel } from './notification-channel';
|
||||
@@ -18,8 +18,8 @@ import { AssignedPayerDTO } from './assigned-payer-dto';
|
||||
import { EntityDTOContainerOfAttributeDTO } from './entity-dtocontainer-of-attribute-dto';
|
||||
import { KeyValueDTOOfStringAndString } from './key-value-dtoof-string-and-string';
|
||||
export interface CustomerDTO extends EntityDTOOfCustomerDTOAndICustomer {
|
||||
agentComment?: string;
|
||||
customerGroup?: string;
|
||||
clientChannel?: EnvironmentChannel;
|
||||
user?: EntityDTOContainerOfUserDTO;
|
||||
createdInBranch?: EntityDTOContainerOfBranchDTO;
|
||||
customerNumber?: string;
|
||||
@@ -34,7 +34,7 @@ export interface CustomerDTO extends EntityDTOOfCustomerDTOAndICustomer {
|
||||
communicationDetails?: CommunicationDetailsDTO;
|
||||
address?: AddressDTO;
|
||||
shippingAddresses?: Array<EntityDTOContainerOfShippingAddressDTO>;
|
||||
agentComment?: string;
|
||||
clientChannel?: EnvironmentChannel;
|
||||
statusChangeComment?: string;
|
||||
deactivationComment?: string;
|
||||
statusComment?: string;
|
||||
|
||||
@@ -12,8 +12,8 @@ import { EntityDTOContainerOfBonusCardDTO } from './entity-dtocontainer-of-bonus
|
||||
import { NotificationChannel } from './notification-channel';
|
||||
import { KeyValueDTOOfStringAndString } from './key-value-dtoof-string-and-string';
|
||||
export interface CustomerInfoDTO extends EntityDTOOfCustomerInfoDTOAndICustomer {
|
||||
dateOfBirth?: string;
|
||||
customerGroup?: string;
|
||||
userName?: string;
|
||||
createdInBranch?: EntityDTOContainerOfBranchDTO;
|
||||
customerNumber?: string;
|
||||
customerType?: CustomerType;
|
||||
@@ -23,7 +23,7 @@ export interface CustomerInfoDTO extends EntityDTOOfCustomerInfoDTOAndICustomer
|
||||
title?: string;
|
||||
firstName?: string;
|
||||
lastName?: string;
|
||||
dateOfBirth?: string;
|
||||
userName?: string;
|
||||
communicationDetails?: CommunicationDetailsDTO;
|
||||
address?: AddressDTO;
|
||||
agentComment?: string;
|
||||
|
||||
@@ -4,14 +4,14 @@ import { EntityDTOContainerOfCustomerDTO } from './entity-dtocontainer-of-custom
|
||||
import { EntityDTOContainerOfTenantDTO } from './entity-dtocontainer-of-tenant-dto';
|
||||
import { EntityDTOContainerOfLabelDTO } from './entity-dtocontainer-of-label-dto';
|
||||
export interface OptInDTO extends EntityDTOOfOptInDTOAndIOptIn {
|
||||
allowRequested?: string;
|
||||
email?: string;
|
||||
user?: string;
|
||||
customer?: EntityDTOContainerOfCustomerDTO;
|
||||
category?: string;
|
||||
key?: string;
|
||||
sourceSystem?: string;
|
||||
sourceIP?: string;
|
||||
allowRequested?: string;
|
||||
user?: string;
|
||||
allowRequestToken?: string;
|
||||
allow?: string;
|
||||
denyRequested?: string;
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOOfPayerDTOAndIPayer } from './entity-dtoof-payer-dtoand-ipayer';
|
||||
import { AddressDTO } from './address-dto';
|
||||
import { EntityDTOContainerOfLabelDTO } from './entity-dtocontainer-of-label-dto';
|
||||
import { CustomerType } from './customer-type';
|
||||
import { PayerStatus } from './payer-status';
|
||||
import { Gender } from './gender';
|
||||
import { OrganisationDTO } from './organisation-dto';
|
||||
import { AddressDTO } from './address-dto';
|
||||
import { CommunicationDetailsDTO } from './communication-details-dto';
|
||||
import { PaymentSettingsDTO } from './payment-settings-dto';
|
||||
export interface PayerDTO extends EntityDTOOfPayerDTOAndIPayer {
|
||||
address?: AddressDTO;
|
||||
label?: EntityDTOContainerOfLabelDTO;
|
||||
payerGroup?: string;
|
||||
payerNumber?: string;
|
||||
payerType?: CustomerType;
|
||||
payerStatus?: PayerStatus;
|
||||
@@ -19,7 +19,7 @@ export interface PayerDTO extends EntityDTOOfPayerDTOAndIPayer {
|
||||
firstName?: string;
|
||||
lastName?: string;
|
||||
organisation?: OrganisationDTO;
|
||||
address?: AddressDTO;
|
||||
payerGroup?: string;
|
||||
communicationDetails?: CommunicationDetailsDTO;
|
||||
agentComment?: string;
|
||||
statusChangeComment?: string;
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOOfShippingAddressDTOAndIShippingAddress } from './entity-dtoof-shipping-address-dtoand-ishipping-address';
|
||||
import { AddressDTO } from './address-dto';
|
||||
import { Gender } from './gender';
|
||||
import { OrganisationDTO } from './organisation-dto';
|
||||
import { CommunicationDetailsDTO } from './communication-details-dto';
|
||||
import { AddressDTO } from './address-dto';
|
||||
import { ShippingAddressType } from './shipping-address-type';
|
||||
export interface ShippingAddressDTO extends EntityDTOOfShippingAddressDTOAndIShippingAddress {
|
||||
address?: AddressDTO;
|
||||
gender?: Gender;
|
||||
title?: string;
|
||||
firstName?: string;
|
||||
lastName?: string;
|
||||
organisation?: OrganisationDTO;
|
||||
communicationDetails?: CommunicationDetailsDTO;
|
||||
address?: AddressDTO;
|
||||
title?: string;
|
||||
agentComment?: string;
|
||||
type: ShippingAddressType;
|
||||
isDefault?: string;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* tslint:disable */
|
||||
import { GeoLocation } from './geo-location';
|
||||
export interface AddressDTO {
|
||||
street?: string;
|
||||
apartment?: string;
|
||||
careOf?: string;
|
||||
city?: string;
|
||||
district?: string;
|
||||
info?: string;
|
||||
po?: string;
|
||||
street?: string;
|
||||
careOf?: string;
|
||||
streetNumber?: string;
|
||||
zipCode?: string;
|
||||
state?: string;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* tslint:disable */
|
||||
import { GeoLocation } from './geo-location';
|
||||
export interface AddressDTO {
|
||||
street?: string;
|
||||
apartment?: string;
|
||||
careOf?: string;
|
||||
city?: string;
|
||||
district?: string;
|
||||
info?: string;
|
||||
po?: string;
|
||||
street?: string;
|
||||
careOf?: string;
|
||||
streetNumber?: string;
|
||||
zipCode?: string;
|
||||
state?: string;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* tslint:disable */
|
||||
import { GeoLocation } from './geo-location';
|
||||
export interface Address {
|
||||
region?: string;
|
||||
apartment?: string;
|
||||
careOf?: string;
|
||||
city?: string;
|
||||
district?: string;
|
||||
info?: string;
|
||||
po?: string;
|
||||
region?: string;
|
||||
careOf?: string;
|
||||
street?: string;
|
||||
streetNumber?: string;
|
||||
zipCode?: string;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
import { PriceDTO } from './price-dto';
|
||||
import { AvailabilityType } from './availability-type';
|
||||
export interface AvailabilityDTO {
|
||||
ssc?: string;
|
||||
itemId?: number;
|
||||
supplierProductNumber?: string;
|
||||
requestReference?: string;
|
||||
ean?: string;
|
||||
shop?: number;
|
||||
@@ -12,7 +12,7 @@ export interface AvailabilityDTO {
|
||||
supplierId?: number;
|
||||
logistician?: string;
|
||||
logisticianId?: number;
|
||||
ssc?: string;
|
||||
supplierProductNumber?: string;
|
||||
sscText?: string;
|
||||
qty?: number;
|
||||
isPrebooked?: boolean;
|
||||
|
||||
@@ -4,13 +4,13 @@ import { EntityDTOContainerOfLabelDTO } from './entity-dtocontainer-of-label-dto
|
||||
import { Address } from './address';
|
||||
import { BranchType } from './branch-type';
|
||||
export interface BranchDTO extends EntityDTOOfBranchDTOAndIReadOnlyBranch {
|
||||
isOnline?: boolean;
|
||||
label?: EntityDTOContainerOfLabelDTO;
|
||||
parent?: number;
|
||||
branchNumber?: string;
|
||||
name?: string;
|
||||
shortName?: string;
|
||||
key?: string;
|
||||
isOnline?: boolean;
|
||||
parent?: number;
|
||||
isOrderingEnabled?: boolean;
|
||||
isShippingEnabled?: boolean;
|
||||
address?: Address;
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
/* tslint:disable */
|
||||
import { EntityReferenceDTO } from './entity-reference-dto';
|
||||
import { BuyerType } from './buyer-type';
|
||||
import { BuyerStatus } from './buyer-status';
|
||||
import { Gender } from './gender';
|
||||
import { BuyerType } from './buyer-type';
|
||||
import { CommunicationDetailsDTO } from './communication-details-dto';
|
||||
import { OrganisationDTO } from './organisation-dto';
|
||||
import { AddressDTO } from './address-dto';
|
||||
export interface BuyerDTO extends EntityReferenceDTO {
|
||||
title?: string;
|
||||
buyerNumber?: string;
|
||||
buyerType: BuyerType;
|
||||
buyerStatus: BuyerStatus;
|
||||
isGuestAccount?: boolean;
|
||||
locale?: string;
|
||||
gender: Gender;
|
||||
title?: string;
|
||||
buyerType: BuyerType;
|
||||
firstName?: string;
|
||||
lastName?: string;
|
||||
communicationDetails?: CommunicationDetailsDTO;
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOOfDisplayOrderDTOAndIOrder } from './entity-dtoof-display-order-dtoand-iorder';
|
||||
import { DisplayAddresseeDTO } from './display-addressee-dto';
|
||||
import { OrderType } from './order-type';
|
||||
import { EnvironmentChannel } from './environment-channel';
|
||||
import { DisplayBranchDTO } from './display-branch-dto';
|
||||
import { DisplayOrderItemDTO } from './display-order-item-dto';
|
||||
import { DisplayAddresseeDTO } from './display-addressee-dto';
|
||||
import { EnvironmentChannel } from './environment-channel';
|
||||
import { DisplayOrderPaymentDTO } from './display-order-payment-dto';
|
||||
import { TermsOfDeliveryDTO } from './terms-of-delivery-dto';
|
||||
import { NotificationChannel } from './notification-channel';
|
||||
export interface DisplayOrderDTO extends EntityDTOOfDisplayOrderDTOAndIOrder {
|
||||
shippingAddress?: DisplayAddresseeDTO;
|
||||
orderType: OrderType;
|
||||
clientChannel?: EnvironmentChannel;
|
||||
orderNumber?: string;
|
||||
orderDate?: string;
|
||||
orderBranch?: DisplayBranchDTO;
|
||||
@@ -19,7 +19,7 @@ export interface DisplayOrderDTO extends EntityDTOOfDisplayOrderDTOAndIOrder {
|
||||
buyerNumber?: string;
|
||||
buyer?: DisplayAddresseeDTO;
|
||||
buyerComment?: string;
|
||||
shippingAddress?: DisplayAddresseeDTO;
|
||||
clientChannel?: EnvironmentChannel;
|
||||
targetBranch?: DisplayBranchDTO;
|
||||
payerNumber?: string;
|
||||
payer?: DisplayAddresseeDTO;
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
/* tslint:disable */
|
||||
import { EntityDTOOfDisplayOrderItemDTOAndIOrderItem } from './entity-dtoof-display-order-item-dtoand-iorder-item';
|
||||
import { DisplayOrderDTO } from './display-order-dto';
|
||||
import { ProductDTO } from './product-dto';
|
||||
import { DisplayOrderItemSubsetDTO } from './display-order-item-subset-dto';
|
||||
import { ProductDTO } from './product-dto';
|
||||
import { QuantityUnitType } from './quantity-unit-type';
|
||||
import { PriceDTO } from './price-dto';
|
||||
import { PromotionDTO } from './promotion-dto';
|
||||
export interface DisplayOrderItemDTO extends EntityDTOOfDisplayOrderItemDTOAndIOrderItem {
|
||||
quantity?: number;
|
||||
order?: DisplayOrderDTO;
|
||||
product?: ProductDTO;
|
||||
orderItemNumber?: string;
|
||||
orderDate?: string;
|
||||
subsetItems?: Array<DisplayOrderItemSubsetDTO>;
|
||||
buyerComment?: string;
|
||||
quantity?: number;
|
||||
product?: ProductDTO;
|
||||
quantityUnitType: QuantityUnitType;
|
||||
quantityUnit?: string;
|
||||
price?: PriceDTO;
|
||||
|
||||
@@ -3,15 +3,15 @@ import { EntityDTOOfDisplayOrderItemSubsetDTOAndIOrderItemStatus } from './entit
|
||||
import { DisplayOrderItemDTO } from './display-order-item-dto';
|
||||
import { OrderItemProcessingStatusValue } from './order-item-processing-status-value';
|
||||
export interface DisplayOrderItemSubsetDTO extends EntityDTOOfDisplayOrderItemSubsetDTOAndIOrderItemStatus {
|
||||
supplierLabel?: string;
|
||||
orderItem?: DisplayOrderItemDTO;
|
||||
orderItemSubsetNumber?: string;
|
||||
description?: string;
|
||||
quantity?: number;
|
||||
estimatedShippingDate?: string;
|
||||
ssc?: string;
|
||||
sscText?: string;
|
||||
supplierName?: string;
|
||||
supplierLabel?: string;
|
||||
orderItemSubsetNumber?: string;
|
||||
processingStatus: OrderItemProcessingStatusValue;
|
||||
processingStatusDate?: string;
|
||||
trackingNumber?: string;
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
import { EntityDTOOfDisplayOrderPaymentDTOAndIReadOnlyPayment } from './entity-dtoof-display-order-payment-dtoand-iread-only-payment';
|
||||
import { PaymentType } from './payment-type';
|
||||
export interface DisplayOrderPaymentDTO extends EntityDTOOfDisplayOrderPaymentDTOAndIReadOnlyPayment {
|
||||
shipping?: number;
|
||||
paymentActionRequired: boolean;
|
||||
paymentType: PaymentType;
|
||||
paymentNumber?: string;
|
||||
paymentComment?: string;
|
||||
total: number;
|
||||
subtotal?: number;
|
||||
shipping?: number;
|
||||
paymentType: PaymentType;
|
||||
tax?: number;
|
||||
currency?: string;
|
||||
dateOfPayment?: string;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user