Merge Release 1.4 into Develop Branch

This commit is contained in:
Nino Righi
2021-09-17 12:11:50 +02:00
parent 20c95a8a26
commit ab93bccb00
14 changed files with 66 additions and 32 deletions

View File

@@ -206,14 +206,14 @@ export class DomainTaskCalendarService {
return '#f70400';
}
if (processingStatusList.includes('Overdue')) {
return '#f70400';
}
if (processingStatusList.includes('InProcess')) {
return '#FFCC01';
}
// if (processingStatusList.includes('Overdue')) {
// return '#f70400';
// }
if (processingStatusList.includes('Approved')) {
return '#8A949E';
}
@@ -226,41 +226,28 @@ export class DomainTaskCalendarService {
publicationDate,
announcementDate,
taskDate,
isSpecial,
}: {
publicationDate?: string;
announcementDate?: string;
hasTask?: boolean;
taskDate?: string;
isSpecial?: boolean;
}): InfoType {
if (this.dateAdapter.isGreaterEqual(this.dateAdapter.today(), new Date(publicationDate)) && hasTask) {
return 'PreInfo';
}
if (hasTask) {
return 'Task';
const _publicationDate = new Date(publicationDate);
const _taskDate = new Date(taskDate);
return this.dateAdapter.compareDate(_taskDate, _publicationDate) > 0 ? 'PreInfo' : 'Task';
}
if (!publicationDate || !announcementDate) {
return 'Info';
}
const _publicationDate = new Date(publicationDate);
const _taskDate = new Date(taskDate);
return this.dateAdapter.compareDate(_taskDate, _publicationDate) > 0 &&
this.dateAdapter.isGreaterEqual(_publicationDate, this.dateAdapter.today())
? 'PreInfo'
: 'Info';
return 'Info';
}
getDisplayInfoDate(source: { taskDate?: string; publicationDate?: string; announcementDate?: string }) {
// Wenn announcementDate abgelaufen ist wird der taskDate/publicationDate genommen
let displayDate = new Date(source.publicationDate || source.taskDate);
let displayDate = this.dateAdapter.isGreaterEqual(this.dateAdapter.today(), new Date(source.publicationDate))
? new Date(source.publicationDate)
: new Date(source.taskDate || source.publicationDate);
// let displayDate = new Date(source.publicationDate || source.taskDate);
if (source.announcementDate && new Date(source.announcementDate) >= this.dateAdapter.today()) {
displayDate = new Date(source.announcementDate);
}

View File

@@ -871,6 +871,7 @@ export class RestRemissionService extends RemissionService {
if (source === 'ueberlauf') {
const returnSuggestionValues: ReturnSuggestionValues = {
inStock: params.inStock,
quantity: params.quantity,
remainingQuantity: params.inStock - params.quantity <= 0 ? null : params.inStock - params.quantity,
placementType: params.placementType,

View File

@@ -17,7 +17,9 @@
{{ displayOrder?.buyer | buyerName }}
</div>
<div class="grow"></div>
<button class="cta-print" (click)="openPrintModal(displayOrder.id)">Drucken</button>
<button [disabled]="displayOrder?.features?.orderType === 'B2B-Versand'" class="cta-print" (click)="openPrintModal(displayOrder.id)">
Drucken
</button>
</div>
<div class="row">

View File

@@ -66,6 +66,10 @@
.cta-print {
@apply bg-transparent text-brand font-bold text-xl outline-none border-none pr-0;
}
.cta-print:disabled {
@apply text-cool-grey;
}
}
.top-line {

View File

@@ -56,10 +56,17 @@ export class TaskInfoComponent implements OnChanges {
if (this.info?.taskDate && this.info?.taskOverdueDate) {
const dateFrom = new Date(this.info?.taskDate);
const dateTo = new Date(this.info?.taskOverdueDate);
if (dateTo.getHours() === 0 && dateTo.getMinutes() === 0) {
dateTo.setSeconds(dateTo.getSeconds() - 1);
}
if (dateFrom.getHours() === dateTo.getHours() && dateFrom.getMinutes() === dateTo.getMinutes()) {
if (this.dateAdapter.equals(dateFrom, dateTo)) {
return `am ${this.datePipe.transform(dateFrom, 'dd.MM.yy')}`;
}
return `${this.datePipe.transform(dateFrom, 'dd.MM.yy')} bis ${this.datePipe.transform(dateTo, 'dd.MM.yy')}`;
}
return `${this.datePipe.transform(dateFrom, 'dd.MM.yy HH:mm')} Uhr bis ${this.datePipe.transform(dateTo, 'dd.MM.yy HH:mm')} Uhr`;
}
}

View File

@@ -2,7 +2,7 @@
@apply flex flex-row px-4 py-3;
.date {
@apply text-right font-bold mr-2 self-start flex-shrink-0 flex-grow-0;
@apply font-bold mr-2 self-start flex-shrink-0 flex-grow-0;
width: 112px !important;
}

View File

@@ -17,7 +17,7 @@
}
.head-row-info {
@apply flex flex-col text-right;
@apply flex flex-col text-right items-end;
.cta-print {
@apply border-none outline-none bg-transparent text-brand text-cta-l font-bold pr-0 mb-3;

View File

@@ -1,3 +1,4 @@
<h3 *ngIf="info?.isSpecial">Sonderinfo</h3>
<h1>{{ info?.title }}</h1>
<page-task-info [info]="info"></page-task-info>
<button type="button" (click)="close()"><ui-icon icon="close" size="16px"></ui-icon></button>

View File

@@ -6,6 +6,10 @@ h1 {
@apply text-xl font-bold text-center;
}
h3 {
@apply absolute m-0 -top-4 p-4 pl-0 text-regular text-active-branch uppercase;
}
button {
@apply absolute -top-4 -right-4 p-4 outline-none border-none bg-transparent;

View File

@@ -31,6 +31,9 @@ export class TaskModalComponent {
status$ = this.processingStatus$.pipe(
map((processingStatus) => {
if (processingStatus.includes('Uncompleted')) {
return 'Unerledigt';
}
if (processingStatus.includes('InProcess')) {
return 'In Bearbeitung';
}
@@ -42,7 +45,12 @@ export class TaskModalComponent {
);
editDisabled$ = this.info$.pipe(
map((info) => this.dateAdapter.isGreaterThan(new Date(), this.domainTaskCalendarService.getDisplayInfoDate(info)))
map((info) => {
if (info.publicationDate && info.taskDate && info.taskOverdueDate) {
return this.dateAdapter.isGreaterThan(this.dateAdapter.today(), new Date(info.taskDate));
}
return this.dateAdapter.isGreaterThan(this.dateAdapter.today(), new Date(info.publicationDate || info.taskDate));
})
);
indicatorColor$ = this.info$.pipe(map((info) => this.domainTaskCalendarService.getProcessingStatusColorCode(info)));
@@ -55,7 +63,10 @@ export class TaskModalComponent {
);
showStartEditCta$ = this.processingStatus$.pipe(
map((processingStatus) => !processingStatus.includes('InProcess') && !processingStatus.includes('Completed'))
map(
(processingStatus) =>
!processingStatus.includes('Uncompleted') && !processingStatus.includes('InProcess') && !processingStatus.includes('Completed')
)
);
showCompleteEditCta$ = combineLatest([this.processingStatus$, this.info$]).pipe(

View File

@@ -6,6 +6,7 @@ import { CalendarIndicator } from '@ui/calendar';
import { DateAdapter } from '@ui/common';
import { Filter, FilterOption, SelectFilter, UiFilterMappingService } from '@ui/filter';
import { UiMessageModalComponent, UiModalService } from '@ui/modal';
import { clone } from 'lodash';
import { combineLatest, Observable } from 'rxjs';
import { debounceTime, distinctUntilChanged, switchMap, withLatestFrom } from 'rxjs/operators';
import { InfoModalComponent } from './modals/info/info-modal.component';
@@ -127,6 +128,13 @@ export class TaskCalendarStore extends ComponentStore<TaskCalendarState> {
tapResponse(
(response) => {
if (!response.error) {
const preInfos = response.result.filter((info) => this.domainTaskCalendarService.getInfoType(info) === 'PreInfo');
preInfos.forEach((info) => {
const preInfoTask = clone(info);
delete preInfoTask.publicationDate;
response.result.push(preInfoTask);
});
this.patchState({ displayInfos: response.result });
} else {
this.uiModal.open({

View File

@@ -62,7 +62,7 @@
</div>
</div>
</div>
<div class="actions">
<div *ngIf="product.inStock > 0 && product.remissionQuantity > 0" class="actions">
<app-button (action)="openRemitProductPartiallyDialog()">Remi-Menge / Platzierung ändern</app-button>
<app-button outline="true" (action)="openRemitProductDialog()">Remittieren</app-button>
</div>

View File

@@ -12,7 +12,12 @@ export class ProcessIdResolver implements Resolve<number> {
resolve(route: ActivatedRouteSnapshot): Observable<number> | Promise<number> | number {
return this.ngxsStore.select(SharedSelectors.getCurrentProcess).pipe(
filter((process) => !!process),
filter((process) => {
if (!process) {
this.application.createProcess();
}
return !!process;
}),
map((process) => process.id),
first(),
tap((process) => this.application.setActivatedProcessId(process))

View File

@@ -4,6 +4,10 @@
button {
@apply outline-none border-none bg-transparent text-xl;
&.today {
@apply mr-11;
}
}
.nav-wrapper {