Refactor nested column definitions and improve license info handling
- Updated column definitions in various components to use `nestedOption` instead of `nestedPath` for better clarity and consistency. - Removed commented-out license status checks and related UI elements from the layout component. - Simplified license info interface by removing unnecessary properties. - Enhanced consumer accounts and business activities components to display additional license information. - Adjusted form components to conditionally include fields based on selected device type. - Improved the handling of discount calculations in the gold payload form component. - Added new fields for branch code in complex components and adjusted related views. - Cleaned up unused console logs in form data utility.
This commit is contained in:
@@ -44,7 +44,9 @@ export class ConsumerSaleInvoiceSharedComponent {
|
||||
field: 'name',
|
||||
header: 'عنوان',
|
||||
type: 'nested',
|
||||
nestedPath: 'good.name',
|
||||
nestedOption: {
|
||||
path: 'good.name',
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'unit_price',
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
[closable]="true"
|
||||
(onHide)="close()"
|
||||
>
|
||||
@if (!licenseStatus()) {
|
||||
<!-- @if (!licenseStatus()) {
|
||||
<p-message severity="warn" [closable]="false" variant="text" icon="pi pi-info-circle" class="mb-5">
|
||||
برای کاربر شما لایسنسی در نظر گرفته نشده است. برای پیگیری با پشتیبانی تماس بگیرید.
|
||||
</p-message>
|
||||
@@ -21,5 +21,5 @@
|
||||
<app-key-value label="انقضای لایسنس" [value]="license()?.expires_at!" type="date" />
|
||||
<app-key-value label="ارایه شده توسط" [value]="license()?.partner?.name || 'برند نرمافزار'" />
|
||||
</div>
|
||||
}
|
||||
} -->
|
||||
</p-dialog>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { AbstractDialog } from '@/shared/abstractClasses/abstract-dialog';
|
||||
import { KeyValueComponent } from '@/shared/components';
|
||||
import { getLicenseStatus } from '@/utils';
|
||||
import { Component, computed, inject } from '@angular/core';
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { Dialog } from 'primeng/dialog';
|
||||
import { Message } from 'primeng/message';
|
||||
import { ConsumerStore } from '../store/main.store';
|
||||
@@ -14,7 +13,7 @@ import { ConsumerStore } from '../store/main.store';
|
||||
export class ConsumerLicenseInfoDialogComponent extends AbstractDialog {
|
||||
private readonly store = inject(ConsumerStore);
|
||||
|
||||
license = computed(() => this.store.entity()?.license_info);
|
||||
// license = computed(() => this.store.entity()?.license_info);
|
||||
|
||||
licenseStatus = computed(() => getLicenseStatus(getLicenseStatus(this.license()?.expires_at)));
|
||||
// licenseStatus = computed(() => getLicenseStatus(getLicenseStatus(this.license()?.expires_at)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user