set sepas favicon and update many things in correction and shared sale invoice
Production CI / validate-and-build (push) Failing after 1m2s

This commit is contained in:
2026-06-17 08:48:34 +03:30
parent ea458c7b72
commit b57d6b4e4b
31 changed files with 209 additions and 127 deletions
@@ -5,9 +5,11 @@ import {
} from '@/shared/catalog';
import { CatalogInvoiceSettlementTypeTagComponent } from '@/shared/catalog/invoiceSettlementType';
import { PriceMaskDirective } from '@/shared/directives';
import { Component, Input } from '@angular/core';
import { Component, computed, inject, Input } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Card } from 'primeng/card';
import { Divider } from 'primeng/divider';
import { Message } from 'primeng/message';
import { KeyValueComponent } from '../key-value.component/key-value.component';
import { IColumn, PageDataListComponent } from '../pageDataList/page-data-list.component';
import { ISaleInvoiceFullResponse } from './sale-invoice-full-response.model';
@@ -26,6 +28,7 @@ export type TSaleInvoiceSingleViewVariant = 'full' | 'customer' | 'pos';
CatalogInvoiceSettlementTypeTagComponent,
PageDataListComponent,
PriceMaskDirective,
Message,
],
})
export class SaleInvoiceSingleInfoCardComponent {
@@ -33,6 +36,8 @@ export class SaleInvoiceSingleInfoCardComponent {
@Input() invoice!: Maybe<ISaleInvoiceFullResponse>;
@Input() variant: TSaleInvoiceSingleViewVariant = 'full';
private readonly route = inject(ActivatedRoute);
columns: IColumn[] = [
{
field: 'name',
@@ -101,4 +106,35 @@ export class SaleInvoiceSingleInfoCardComponent {
type: 'price',
},
];
referenceInvoiceRoute = computed(() => {
const referenceInvoiceId = this.invoice?.reference_invoice?.id;
const pagePath = this.route.pathFromRoot
.flatMap((route) => route.snapshot.url.map((segment) => segment.path))
.join('/');
if (!pagePath || !referenceInvoiceId) {
return pagePath;
}
const pathParts = pagePath.split('/').filter(Boolean);
pathParts[pathParts.length - 1] = referenceInvoiceId;
return `/${pathParts.join('/')}`;
});
referenceByInvoiceRoute = computed(() => {
const referenceInvoiceId = this.invoice?.referenced_by?.id;
const pagePath = this.route.pathFromRoot
.flatMap((route) => route.snapshot.url.map((segment) => segment.path))
.join('/');
if (!pagePath || !referenceInvoiceId) {
return pagePath;
}
const pathParts = pagePath.split('/').filter(Boolean);
pathParts[pathParts.length - 1] = referenceInvoiceId;
return `/${pathParts.join('/')}`;
});
}