@nice2dev/ui-erp 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -186,6 +186,7 @@ export declare interface InvoiceLine {
186
186
  quantity: number;
187
187
  unit?: string;
188
188
  unitPrice: Money;
189
+ /** VAT rate as a fraction: 0.23 for 23%. */
189
190
  vatRate: number;
190
191
  discount?: number;
191
192
  }
@@ -233,8 +234,8 @@ export declare const NICE_VAT_PRESETS: Record<'PL' | 'EU' | 'UK', VatRate[]>;
233
234
  export declare const NiceCapacityPlanner: default_2.FC<NiceCapacityPlannerProps>;
234
235
 
235
236
  export declare interface NiceCapacityPlannerProps {
236
- resources: Resource[];
237
- allocations: Allocation[];
237
+ resources?: Resource[];
238
+ allocations?: Allocation[];
238
239
  dateRange: DateRange;
239
240
  viewConfig?: Partial<AllocationViewConfig>;
240
241
  onAllocationCreate?: (allocation: Omit<Allocation, 'id'>) => void;
@@ -248,7 +249,7 @@ export declare interface NiceCapacityPlannerProps {
248
249
  export declare const NiceHRDashboard: default_2.ForwardRefExoticComponent<NiceHRDashboardProps & default_2.RefAttributes<HTMLDivElement>>;
249
250
 
250
251
  export declare interface NiceHRDashboardProps extends NiceStandardProps {
251
- employees: Employee[];
252
+ employees?: Employee[];
252
253
  /** Custom widget labels. */
253
254
  labels?: Partial<{
254
255
  headcount: string;
@@ -277,7 +278,7 @@ export declare interface NiceHRDashboardProps extends NiceStandardProps {
277
278
  export declare const NiceInventoryManager: default_2.FC<NiceInventoryManagerProps>;
278
279
 
279
280
  export declare interface NiceInventoryManagerProps {
280
- items: InventoryItem[];
281
+ items?: InventoryItem[];
281
282
  transactions?: InventoryTransaction[];
282
283
  viewConfig?: Partial<InventoryViewConfig>;
283
284
  onItemCreate?: (item: Omit<InventoryItem, 'id'>) => void;
@@ -286,6 +287,8 @@ export declare interface NiceInventoryManagerProps {
286
287
  onTransactionCreate?: (transaction: Omit<InventoryTransaction, 'id'>) => void;
287
288
  onStockCount?: (stockCount: StockCount) => void;
288
289
  onItemClick?: (item: InventoryItem) => void;
290
+ /** "Create PO" on a low-stock item; without it the button is not shown. */
291
+ onCreatePurchaseOrder?: (item: InventoryItem) => void;
289
292
  readOnly?: boolean;
290
293
  className?: string;
291
294
  }
@@ -340,7 +343,7 @@ export declare interface NiceInvoiceViewProps extends NiceStandardProps {
340
343
  export declare const NiceJpkExporter: ForwardRefExoticComponent<NiceJpkExporterProps & RefAttributes<HTMLDivElement>>;
341
344
 
342
345
  export declare interface NiceJpkExporterProps extends NiceStandardProps {
343
- invoices: Invoice[];
346
+ invoices?: Invoice[];
344
347
  taxpayer: JpkExportOptions['taxpayer'];
345
348
  /** Default export format. */
346
349
  defaultFormat?: JpkExportOptions['format'];
@@ -369,9 +372,9 @@ export declare interface NiceJpkExporterProps extends NiceStandardProps {
369
372
  export declare const NicePurchaseOrder: ForwardRefExoticComponent<NicePurchaseOrderViewProps & RefAttributes<HTMLDivElement>>;
370
373
 
371
374
  export declare interface NicePurchaseOrderProps {
372
- orders: PurchaseOrder[];
373
- suppliers: Supplier[];
374
- items: Pick<InventoryItem, 'id' | 'sku' | 'name' | 'cost'>[];
375
+ orders?: PurchaseOrder[];
376
+ suppliers?: Supplier[];
377
+ items?: Pick<InventoryItem, 'id' | 'sku' | 'name' | 'cost'>[];
375
378
  onOrderCreate?: (order: Omit<PurchaseOrder, 'id'>) => void;
376
379
  onOrderUpdate?: (order: PurchaseOrder) => void;
377
380
  onOrderDelete?: (orderId: string) => void;
@@ -448,7 +451,7 @@ export declare interface NiceWarehouseViewProps extends NiceStandardProps {
448
451
  /** Warehouse identifier (used in the title). */
449
452
  warehouseName: string;
450
453
  /** Cells to render. */
451
- cells: WarehouseCell[];
454
+ cells?: WarehouseCell[];
452
455
  /** Heat-map color stops (low → high). */
453
456
  colors?: {
454
457
  low: string;
@@ -584,6 +587,7 @@ export declare interface UseMockErpApiOptions {
584
587
 
585
588
  export declare interface VatRate {
586
589
  code: string;
590
+ /** Rate as a fraction: 0.23 for 23%. */
587
591
  rate: number;
588
592
  label?: string;
589
593
  description?: string;