@appcorp/stellar-solutions-invoice-module 0.1.56 → 0.1.57
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/base-modules/invoice/add-service-product-section.d.ts +12 -2
- package/base-modules/invoice/add-service-product-section.js +20 -10
- package/base-modules/invoice/company-form-section.d.ts +12 -2
- package/base-modules/invoice/company-form-section.js +118 -10
- package/base-modules/invoice/constants.d.ts +9 -25
- package/base-modules/invoice/constants.js +66 -557
- package/base-modules/invoice/context.d.ts +42 -2
- package/base-modules/invoice/context.js +220 -311
- package/base-modules/invoice/customer-form-section.d.ts +12 -2
- package/base-modules/invoice/customer-form-section.js +91 -9
- package/base-modules/invoice/drawer.d.ts +9 -4
- package/base-modules/invoice/drawer.js +32 -6
- package/base-modules/invoice/form.d.ts +2 -4
- package/base-modules/invoice/form.js +7 -6
- package/base-modules/invoice/invoice.d.ts +2 -2
- package/base-modules/invoice/invoice.js +33 -42
- package/base-modules/invoice/pricing-form-section.d.ts +12 -2
- package/base-modules/invoice/pricing-form-section.js +65 -9
- package/base-modules/invoice/products-form-section.d.ts +12 -2
- package/base-modules/invoice/products-form-section.js +57 -32
- package/base-modules/invoice/reducer.d.ts +2 -2
- package/base-modules/invoice/reducer.js +56 -53
- package/base-modules/invoice/services-form-section.d.ts +12 -2
- package/base-modules/invoice/services-form-section.js +61 -15
- package/base-modules/invoice/types.d.ts +16 -21
- package/base-modules/invoice/validate.d.ts +23 -3
- package/base-modules/invoice/validate.js +61 -61
- package/base-modules/quote/actions.d.ts +215 -0
- package/base-modules/quote/actions.js +38 -0
- package/base-modules/quote/add-service-product-section.d.ts +12 -0
- package/base-modules/quote/add-service-product-section.js +31 -0
- package/base-modules/quote/calculate-subtotal.d.ts +1 -0
- package/base-modules/quote/calculate-subtotal.js +6 -0
- package/base-modules/quote/calculate-total.d.ts +1 -0
- package/base-modules/quote/calculate-total.js +6 -0
- package/base-modules/quote/company-form-section.d.ts +12 -0
- package/base-modules/quote/company-form-section.js +125 -0
- package/base-modules/quote/constants.d.ts +64 -0
- package/base-modules/quote/constants.js +107 -0
- package/base-modules/quote/context.d.ts +50 -0
- package/base-modules/quote/context.js +822 -0
- package/base-modules/quote/customer-form-section.d.ts +12 -0
- package/base-modules/quote/customer-form-section.js +99 -0
- package/base-modules/quote/drawer.d.ts +13 -0
- package/base-modules/quote/drawer.js +45 -0
- package/base-modules/quote/form.d.ts +6 -0
- package/base-modules/quote/form.js +27 -0
- package/base-modules/quote/pricing-form-section.d.ts +12 -0
- package/base-modules/quote/pricing-form-section.js +76 -0
- package/base-modules/quote/products-form-section.d.ts +12 -0
- package/base-modules/quote/products-form-section.js +71 -0
- package/base-modules/quote/quote.d.ts +8 -0
- package/base-modules/quote/quote.js +69 -0
- package/base-modules/quote/reducer.d.ts +4 -0
- package/base-modules/quote/reducer.js +181 -0
- package/base-modules/quote/services-form-section.d.ts +12 -0
- package/base-modules/quote/services-form-section.js +73 -0
- package/base-modules/quote/types.d.ts +126 -0
- package/base-modules/quote/types.js +35 -0
- package/base-modules/quote/validate.d.ts +856 -0
- package/base-modules/quote/validate.js +85 -0
- package/package.json +21 -8
- package/base-modules/invoice/company-form-elements.d.ts +0 -3
- package/base-modules/invoice/company-form-elements.js +0 -41
- package/base-modules/invoice/customer-form-elements.d.ts +0 -3
- package/base-modules/invoice/customer-form-elements.js +0 -41
- package/base-modules/invoice/pricing-form-elements.d.ts +0 -3
- package/base-modules/invoice/pricing-form-elements.js +0 -41
|
@@ -1,5 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Invoice State Context
|
|
3
|
+
*
|
|
4
|
+
* This module provides comprehensive state management for the Invoice feature including:
|
|
5
|
+
* - CRUD operations (create, read, update, delete)
|
|
6
|
+
* - Form validation and error handling
|
|
7
|
+
* - Multi-section forms (company, customer, pricing, products, services)
|
|
8
|
+
* - Complex calculations (subtotal, tax, discount, total)
|
|
9
|
+
* - Dynamic product and service row management
|
|
10
|
+
* - Search and filtering functionality
|
|
11
|
+
* - Pagination controls
|
|
12
|
+
* - Company and customer integration
|
|
13
|
+
* - Currency and tax management
|
|
14
|
+
* - Internationalization support
|
|
15
|
+
* - Theme-aware toast notifications
|
|
16
|
+
*
|
|
17
|
+
* Organization:
|
|
18
|
+
* - Types & Interfaces
|
|
19
|
+
* - Main Hook (useInvoiceState)
|
|
20
|
+
* - State & Core Hooks
|
|
21
|
+
* - Theme Support
|
|
22
|
+
* - Toast Helpers
|
|
23
|
+
* - Debounced Values
|
|
24
|
+
* - Tax & Currency Defaults
|
|
25
|
+
* - API Parameters (memoized)
|
|
26
|
+
* - API Callbacks (with error handling)
|
|
27
|
+
* - Module Entity Hook
|
|
28
|
+
* - Effects (list refresh, defaults, calculations)
|
|
29
|
+
* - Drawer & Modal Handlers
|
|
30
|
+
* - CRUD Operation Handlers
|
|
31
|
+
* - Form Handlers (products, services, pricing)
|
|
32
|
+
* - Calculation Handlers
|
|
33
|
+
* - Pagination Handlers
|
|
34
|
+
* - Search Handlers
|
|
35
|
+
* - Table Actions (memoized)
|
|
36
|
+
* - Return State
|
|
37
|
+
* - Context Setup
|
|
38
|
+
* - Provider Component
|
|
39
|
+
* - Custom Hook
|
|
40
|
+
*/
|
|
41
|
+
import React, { FC, ReactNode } from "react";
|
|
42
|
+
import { InvoiceContextType, InvoiceState } from "./types";
|
|
3
43
|
type State = InvoiceContextType & InvoiceState;
|
|
4
44
|
interface StateProviderProps {
|
|
5
45
|
children: ReactNode;
|