tin-spa 20.1.0 → 20.1.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/fesm2022/tin-spa.mjs +1306 -34
- package/fesm2022/tin-spa.mjs.map +1 -1
- package/index.d.ts +179 -6
- package/package.json +1 -1
package/fesm2022/tin-spa.mjs
CHANGED
|
@@ -19,7 +19,7 @@ import { RouterModule, Router } from '@angular/router';
|
|
|
19
19
|
import * as i2$1 from '@abacritt/angularx-social-login';
|
|
20
20
|
import { SocialLoginModule } from '@abacritt/angularx-social-login';
|
|
21
21
|
import * as i1$1 from '@angular/common/http';
|
|
22
|
-
import { HttpHeaders, HttpResponse, HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
22
|
+
import { HttpHeaders, HttpResponse, HttpClient, HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
23
23
|
import * as i1$3 from '@angular/cdk/layout';
|
|
24
24
|
import * as i9 from '@angular/material/autocomplete';
|
|
25
25
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
@@ -872,6 +872,14 @@ class DetailsDialogProcessor {
|
|
|
872
872
|
}
|
|
873
873
|
}
|
|
874
874
|
|
|
875
|
+
// Added: Invoice status enum for invoice management
|
|
876
|
+
var InvoiceStatus;
|
|
877
|
+
(function (InvoiceStatus) {
|
|
878
|
+
InvoiceStatus[InvoiceStatus["Draft"] = 0] = "Draft";
|
|
879
|
+
InvoiceStatus[InvoiceStatus["Submitted"] = 1] = "Submitted";
|
|
880
|
+
InvoiceStatus[InvoiceStatus["Paid"] = 2] = "Paid";
|
|
881
|
+
InvoiceStatus[InvoiceStatus["Discarded"] = 3] = "Discarded";
|
|
882
|
+
})(InvoiceStatus || (InvoiceStatus = {}));
|
|
875
883
|
class loginConfig {
|
|
876
884
|
constructor() {
|
|
877
885
|
this.appName = "";
|
|
@@ -1401,6 +1409,9 @@ class DataServiceLib {
|
|
|
1401
1409
|
this.capPlans = new CapItem;
|
|
1402
1410
|
this.capGeneral = new CapItem;
|
|
1403
1411
|
this.capCustomers = new CapItem;
|
|
1412
|
+
this.capCategories = new CapItem; // Added: Categories CapItem
|
|
1413
|
+
this.capSubCategories = new CapItem; // Added: SubCategories CapItem
|
|
1414
|
+
this.capBrands = new CapItem; // Added: Brands CapItem
|
|
1404
1415
|
this.capSuppliers = new CapItem;
|
|
1405
1416
|
this.capTasks = new CapItem;
|
|
1406
1417
|
this.capHR = new CapItem;
|
|
@@ -1414,14 +1425,27 @@ class DataServiceLib {
|
|
|
1414
1425
|
this.capSelfApproval = new CapItem;
|
|
1415
1426
|
this.capAppModels = new CapItem;
|
|
1416
1427
|
this.capNotificationsConfig = new CapItem;
|
|
1428
|
+
this.capAccountingOutstandingInvoices = new CapItem;
|
|
1417
1429
|
this.capAccounting = new CapItem;
|
|
1418
1430
|
this.capAccounts = new CapItem;
|
|
1419
1431
|
this.capTransactionTypes = new CapItem;
|
|
1420
1432
|
this.capTransactions = new CapItem;
|
|
1433
|
+
this.capAccountingInvoices = new CapItem;
|
|
1421
1434
|
this.capLoans = new CapItem;
|
|
1422
1435
|
this.capLoanProducts = new CapItem;
|
|
1423
1436
|
this.capLoansMain = new CapItem;
|
|
1424
1437
|
this.capLoanPayments = new CapItem;
|
|
1438
|
+
this.capInventory = new CapItem;
|
|
1439
|
+
this.capInventoryDashboard = new CapItem;
|
|
1440
|
+
this.capProducts = new CapItem;
|
|
1441
|
+
this.capInventoryItems = new CapItem;
|
|
1442
|
+
this.capInventoryReceipts = new CapItem;
|
|
1443
|
+
this.capSalesOrders = new CapItem;
|
|
1444
|
+
this.capRequisitions = new CapItem;
|
|
1445
|
+
this.capInventoryAdjustments = new CapItem;
|
|
1446
|
+
this.capInventoryReturns = new CapItem;
|
|
1447
|
+
this.capRequisitionReturns = new CapItem;
|
|
1448
|
+
this.capInventoryTransactions = new CapItem;
|
|
1425
1449
|
this.tmpProfileuserName = "";
|
|
1426
1450
|
this.isProcessing = false;
|
|
1427
1451
|
//--------------------------Departmemts Form-------------------------
|
|
@@ -1977,13 +2001,25 @@ class DataServiceLib {
|
|
|
1977
2001
|
this.capPlans.link = "home/admin/plans";
|
|
1978
2002
|
this.capGeneral.name = "cap11";
|
|
1979
2003
|
this.capGeneral.display = "General";
|
|
1980
|
-
this.capGeneral.capSubItems = [this.capNotifications, this.capApprovals, this.capCustomers, this.capSuppliers, this.capTasks];
|
|
2004
|
+
this.capGeneral.capSubItems = [this.capNotifications, this.capApprovals, this.capCustomers, this.capSuppliers, this.capCategories, this.capSubCategories, this.capBrands, this.capTasks];
|
|
1981
2005
|
this.capCustomers.name = "cap12";
|
|
1982
2006
|
this.capCustomers.display = "Customers";
|
|
1983
2007
|
this.capCustomers.link = "home/admin/customers";
|
|
1984
2008
|
this.capCustomers.icon = "group";
|
|
1985
|
-
|
|
1986
|
-
|
|
2009
|
+
this.capCategories.name = "cap13"; // Added: Categories initialization
|
|
2010
|
+
this.capCategories.display = "Categories";
|
|
2011
|
+
this.capCategories.link = "home/admin/categories";
|
|
2012
|
+
this.capCategories.icon = "category";
|
|
2013
|
+
this.capSubCategories.name = "cap103"; // Added: SubCategories initialization
|
|
2014
|
+
this.capSubCategories.display = "Sub Categories";
|
|
2015
|
+
this.capSubCategories.link = "home/admin/subcategories";
|
|
2016
|
+
this.capSubCategories.icon = "category";
|
|
2017
|
+
this.capBrands.name = "cap14"; // Added: Brands initialization
|
|
2018
|
+
this.capBrands.display = "Brands";
|
|
2019
|
+
this.capBrands.link = "home/admin/brands";
|
|
2020
|
+
this.capBrands.icon = "loyalty";
|
|
2021
|
+
//cap104 available
|
|
2022
|
+
//cap105 available
|
|
1987
2023
|
this.capSuppliers.name = "cap15";
|
|
1988
2024
|
this.capSuppliers.display = "Suppliers";
|
|
1989
2025
|
this.capSuppliers.link = "home/admin/suppliers";
|
|
@@ -2035,7 +2071,7 @@ class DataServiceLib {
|
|
|
2035
2071
|
this.capAccounting.name = "cap27";
|
|
2036
2072
|
this.capAccounting.display = "Accounting";
|
|
2037
2073
|
this.capAccounting.icon = "account_balance";
|
|
2038
|
-
this.capAccounting.capSubItems = [this.capAccounts, this.capTransactionTypes, this.capTransactions];
|
|
2074
|
+
this.capAccounting.capSubItems = [this.capAccounts, this.capTransactionTypes, this.capTransactions, this.capAccountingInvoices, this.capAccountingOutstandingInvoices];
|
|
2039
2075
|
this.capAccounts.name = "cap14";
|
|
2040
2076
|
this.capAccounts.display = "Accounts";
|
|
2041
2077
|
this.capAccounts.link = "home/admin/accounting-accounts";
|
|
@@ -2048,6 +2084,14 @@ class DataServiceLib {
|
|
|
2048
2084
|
this.capTransactions.display = "Transactions";
|
|
2049
2085
|
this.capTransactions.link = "home/admin/accounting-transactions";
|
|
2050
2086
|
this.capTransactions.icon = "receipt_long";
|
|
2087
|
+
this.capAccountingInvoices.name = "cap34";
|
|
2088
|
+
this.capAccountingInvoices.display = "Invoices";
|
|
2089
|
+
this.capAccountingInvoices.link = "home/admin/accounting-invoices";
|
|
2090
|
+
this.capAccountingInvoices.icon = "receipt_long";
|
|
2091
|
+
this.capAccountingOutstandingInvoices.name = "cap35";
|
|
2092
|
+
this.capAccountingOutstandingInvoices.display = "Outstanding Invoices";
|
|
2093
|
+
this.capAccountingOutstandingInvoices.link = "home/admin/accounting-outstanding-invoices";
|
|
2094
|
+
this.capAccountingOutstandingInvoices.icon = "account_balance_wallet";
|
|
2051
2095
|
this.capLoans.name = "cap30";
|
|
2052
2096
|
this.capLoans.display = "Loans";
|
|
2053
2097
|
this.capLoans.icon = "payments";
|
|
@@ -2064,6 +2108,50 @@ class DataServiceLib {
|
|
|
2064
2108
|
this.capLoanPayments.display = "Payments";
|
|
2065
2109
|
this.capLoanPayments.link = "home/admin/loans-payments";
|
|
2066
2110
|
this.capLoanPayments.icon = "payment";
|
|
2111
|
+
this.capInventory.name = "cap34";
|
|
2112
|
+
this.capInventory.display = "Inventory";
|
|
2113
|
+
this.capInventory.icon = "inventory";
|
|
2114
|
+
this.capInventory.capSubItems = [this.capInventoryDashboard, this.capProducts, this.capInventoryItems, this.capInventoryReceipts, this.capSalesOrders, this.capRequisitions, this.capInventoryAdjustments, this.capInventoryReturns, this.capRequisitionReturns, this.capInventoryTransactions];
|
|
2115
|
+
this.capInventoryDashboard.name = "cap35";
|
|
2116
|
+
this.capInventoryDashboard.display = "Dashboard";
|
|
2117
|
+
this.capInventoryDashboard.link = "home/admin/inventory-dashboard";
|
|
2118
|
+
this.capInventoryDashboard.icon = "dashboard";
|
|
2119
|
+
this.capProducts.name = "cap36";
|
|
2120
|
+
this.capProducts.display = "Products";
|
|
2121
|
+
this.capProducts.link = "home/admin/inventory-products";
|
|
2122
|
+
this.capProducts.icon = "category";
|
|
2123
|
+
this.capInventoryItems.name = "cap37";
|
|
2124
|
+
this.capInventoryItems.display = "Inventory Items";
|
|
2125
|
+
this.capInventoryItems.link = "home/admin/inventory-items";
|
|
2126
|
+
this.capInventoryItems.icon = "inventory_2";
|
|
2127
|
+
this.capInventoryReceipts.name = "cap38";
|
|
2128
|
+
this.capInventoryReceipts.display = "Receipts";
|
|
2129
|
+
this.capInventoryReceipts.link = "home/admin/inventory-receipts";
|
|
2130
|
+
this.capInventoryReceipts.icon = "receipt_long";
|
|
2131
|
+
this.capSalesOrders.name = "cap39";
|
|
2132
|
+
this.capSalesOrders.display = "Sales Orders";
|
|
2133
|
+
this.capSalesOrders.link = "home/admin/inventory-sales-orders";
|
|
2134
|
+
this.capSalesOrders.icon = "shopping_cart";
|
|
2135
|
+
this.capRequisitions.name = "cap40";
|
|
2136
|
+
this.capRequisitions.display = "Requisitions";
|
|
2137
|
+
this.capRequisitions.link = "home/admin/inventory-requisitions";
|
|
2138
|
+
this.capRequisitions.icon = "request_quote";
|
|
2139
|
+
this.capInventoryAdjustments.name = "cap41";
|
|
2140
|
+
this.capInventoryAdjustments.display = "Adjustments";
|
|
2141
|
+
this.capInventoryAdjustments.link = "home/admin/inventory-adjustments";
|
|
2142
|
+
this.capInventoryAdjustments.icon = "tune";
|
|
2143
|
+
this.capInventoryReturns.name = "cap42";
|
|
2144
|
+
this.capInventoryReturns.display = "Returns";
|
|
2145
|
+
this.capInventoryReturns.link = "home/admin/inventory-returns";
|
|
2146
|
+
this.capInventoryReturns.icon = "keyboard_return";
|
|
2147
|
+
this.capRequisitionReturns.name = "cap43";
|
|
2148
|
+
this.capRequisitionReturns.display = "Requisition Returns";
|
|
2149
|
+
this.capRequisitionReturns.link = "home/admin/inventory-requisition-returns";
|
|
2150
|
+
this.capRequisitionReturns.icon = "assignment_return";
|
|
2151
|
+
this.capInventoryTransactions.name = "cap44";
|
|
2152
|
+
this.capInventoryTransactions.display = "Transactions";
|
|
2153
|
+
this.capInventoryTransactions.link = "home/admin/inventory-transactions";
|
|
2154
|
+
this.capInventoryTransactions.icon = "swap_horiz";
|
|
2067
2155
|
this.authService.myRoleObserv.subscribe((role) => {
|
|
2068
2156
|
this.myRole = role;
|
|
2069
2157
|
});
|
|
@@ -2399,8 +2487,174 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
2399
2487
|
}], ctorParameters: () => [{ type: i5.MatDialog }, { type: i1$3.BreakpointObserver }] });
|
|
2400
2488
|
|
|
2401
2489
|
class AccountingService {
|
|
2490
|
+
// Changed: Moved from declaration to assignment
|
|
2402
2491
|
constructor() {
|
|
2403
2492
|
this.dataService = inject(DataServiceLib);
|
|
2493
|
+
//--------------------------Invoices-------------------------
|
|
2494
|
+
// Invoice form configuration with customer and status fields
|
|
2495
|
+
this.invoiceFormConfig = {
|
|
2496
|
+
security: { allow: [this.dataService.capAccountingInvoices] },
|
|
2497
|
+
title: 'Invoice',
|
|
2498
|
+
includeAudit: true,
|
|
2499
|
+
fields: [
|
|
2500
|
+
{ name: 'invoiceDate', type: 'date' },
|
|
2501
|
+
{ name: 'invoiceID', type: 'number', readonly: true, hideOnCreate: true },
|
|
2502
|
+
{ name: 'customerID', alias: 'Customer', type: 'select', loadAction: { url: 'customers/list/x' }, detailsConfig: this.dataService.customerDetailsConfig },
|
|
2503
|
+
{ name: 'status', type: 'select', hideOnCreate: true, readonly: true, loadAction: { url: 'invoices/list/statuses' } },
|
|
2504
|
+
{ name: 'totalDisplay', type: 'label', alias: 'Total', format: 'text', readonly: true, hideOnCreate: true },
|
|
2505
|
+
],
|
|
2506
|
+
loadAction: { url: 'invoices/id' },
|
|
2507
|
+
heroField: 'invoiceID',
|
|
2508
|
+
};
|
|
2509
|
+
// Invoice items table for manual line item entry
|
|
2510
|
+
this.invoiceItemsTableConfig = {
|
|
2511
|
+
tabTitle: 'Invoice Items',
|
|
2512
|
+
showFilter: false,
|
|
2513
|
+
minColumns: ['description', 'quantity', 'amount'],
|
|
2514
|
+
columns: [
|
|
2515
|
+
{ name: 'invoiceItemID', type: 'number', alias: 'ID', hiddenCondition: () => true },
|
|
2516
|
+
{ name: 'description', type: 'text', alias: 'Description' },
|
|
2517
|
+
{ name: 'quantity', type: 'number', alias: 'Qty' },
|
|
2518
|
+
{ name: 'unitPrice', type: 'money', alias: 'Unit Price' },
|
|
2519
|
+
{ name: 'amount', type: 'money', alias: 'Amount' }
|
|
2520
|
+
],
|
|
2521
|
+
buttons: [
|
|
2522
|
+
{ name: 'create', display: 'Add Item', dialog: true, action: { url: 'invoiceitems?action=create', method: 'post' }, disabled: x => x.status != InvoiceStatus.Draft },
|
|
2523
|
+
{ name: 'edit', dialog: true, action: { url: 'invoiceitems?action=edit', method: 'post' }, disabled: x => x.status != InvoiceStatus.Draft },
|
|
2524
|
+
{ name: 'delete', inDialog: true, icon: { name: 'delete', color: 'red' }, action: { url: 'invoiceitems?action=delete', method: 'post', successMessage: 'Deleted' }, confirm: { message: 'Delete this item?' }, disabled: x => x.status != InvoiceStatus.Draft }
|
|
2525
|
+
],
|
|
2526
|
+
loadAction: { url: 'invoiceitems/x/x' }, loadCriteria: 'invoice', loadIDField: 'invoiceID',
|
|
2527
|
+
formConfig: {
|
|
2528
|
+
title: 'Invoice Item',
|
|
2529
|
+
fields: [
|
|
2530
|
+
{ name: 'description', type: 'text', required: true },
|
|
2531
|
+
{ name: 'quantity', type: 'number', required: true },
|
|
2532
|
+
{ name: 'unitPrice', type: 'number', alias: 'Unit Price', required: true },
|
|
2533
|
+
{ name: 'amount', type: 'number', readonly: true, hideOnCreate: true }
|
|
2534
|
+
],
|
|
2535
|
+
loadAction: { url: 'invoiceitems/id' }
|
|
2536
|
+
}
|
|
2537
|
+
};
|
|
2538
|
+
// Invoice action buttons
|
|
2539
|
+
this.invoicePayButton = { name: 'pay', inDialog: true, display: 'Pay', icon: { name: 'attach_money', color: 'green' }, action: { url: 'invoices?action=pay', method: 'post', successMessage: 'Paid' }, confirm: { message: 'All loads on invoice have been Paid ?' }, visible: x => x.status == InvoiceStatus.Submitted };
|
|
2540
|
+
this.invoiceDiscardButton = { name: 'discard', inDialog: true, display: 'Discard', icon: { name: 'close', color: 'red' }, action: { url: 'invoices?action=discard', method: 'post', successMessage: 'Discarded' }, confirm: { message: 'Invoice will be marked as cancelled and all related loads removed ?' }, visible: x => x.status == InvoiceStatus.Draft };
|
|
2541
|
+
this.invoiceSubmitButton = { name: 'submit', inDialog: true, display: 'Submit', icon: { name: 'send', }, action: { url: 'invoices?action=submit', method: 'post', successMessage: 'Submitted' }, confirm: { message: 'Submit ?' }, visible: x => x.status == InvoiceStatus.Draft, disabled: x => x.totalAmount == 0 };
|
|
2542
|
+
this.invoiceEditButton = { name: 'edit', dialog: true, action: { url: 'invoices?action=edit', method: 'post', }, confirm: { message: 'Proceed ?' }, disabled: x => x.status == InvoiceStatus.Paid };
|
|
2543
|
+
this.invoiceDownloadButton = { name: 'pdf', display: 'Download PDF', inDialog: true, icon: { name: 'picture_as_pdf', color: 'red' } };
|
|
2544
|
+
// Invoice details dialog with items and action buttons
|
|
2545
|
+
this.invoiceDetailsDialogConfig = {
|
|
2546
|
+
formConfig: this.invoiceFormConfig,
|
|
2547
|
+
tableConfigs: [this.invoiceItemsTableConfig],
|
|
2548
|
+
heroField: 'invoiceID',
|
|
2549
|
+
buttons: [this.invoiceSubmitButton, this.invoicePayButton, this.invoiceDiscardButton, this.invoiceEditButton]
|
|
2550
|
+
};
|
|
2551
|
+
// Invoice summary tiles
|
|
2552
|
+
this.invoicesTileConfig = {
|
|
2553
|
+
clickable: true,
|
|
2554
|
+
tiles: [
|
|
2555
|
+
{ name: 'drafts', alias: 'Draft Invoices', color: '#FFC107', info: 'Invoices in draft stage', action: { url: 'invoices/drafts/x' } },
|
|
2556
|
+
{ name: 'submitted', alias: 'Pending Payment', color: '#2196F3', info: 'Submitted invoices awaiting payment', action: { url: 'invoices/submitted/x' } },
|
|
2557
|
+
{ name: 'pendingPayments', alias: 'Outstanding', color: '#F44336', info: 'Total amount pending payment' }
|
|
2558
|
+
],
|
|
2559
|
+
loadAction: { url: 'invoices/summary/x' }
|
|
2560
|
+
};
|
|
2561
|
+
// Main invoices table configuration
|
|
2562
|
+
this.invoicesTableConfig = {
|
|
2563
|
+
showFilter: true,
|
|
2564
|
+
minColumns: ['invoiceID', 'customerName', 'statusName'],
|
|
2565
|
+
minButtons: ['view', 'pdf'],
|
|
2566
|
+
flatButtons: true,
|
|
2567
|
+
collapseButtons: true,
|
|
2568
|
+
greyOut: x => x.status == InvoiceStatus.Paid,
|
|
2569
|
+
columns: [
|
|
2570
|
+
{ name: 'invoiceID', type: 'number', alias: 'ID' },
|
|
2571
|
+
{ name: 'customerName', type: 'text', alias: 'Customer' },
|
|
2572
|
+
{ name: 'invoiceDate', type: 'date' },
|
|
2573
|
+
{ name: 'statusName', type: 'chip', alias: 'Status', colors: [{ name: '#FFCC80', condition: x => x.status == InvoiceStatus.Draft }, { name: '#90CAF9', condition: x => x.status == InvoiceStatus.Submitted }, { name: '#A5D6A7', condition: x => x.status == InvoiceStatus.Paid }, { name: '#EF9A9A', condition: x => x.status == InvoiceStatus.Discarded }] },
|
|
2574
|
+
{ name: 'itemCount', type: 'number', alias: 'Items' },
|
|
2575
|
+
{ name: 'totalAmount', type: 'money', alias: 'Total' },
|
|
2576
|
+
{ name: 'paidAmount', type: 'money', alias: 'Paid' },
|
|
2577
|
+
{ name: 'outstandingAmount', type: 'money', alias: 'Outstanding' }
|
|
2578
|
+
],
|
|
2579
|
+
buttons: [
|
|
2580
|
+
{ name: 'create', display: 'Create', dialog: true, action: { url: 'invoices?action=create', method: 'post' } },
|
|
2581
|
+
{ name: 'view', dialog: true, detailsConfig: this.invoiceDetailsDialogConfig },
|
|
2582
|
+
this.invoiceDownloadButton,
|
|
2583
|
+
this.invoiceSubmitButton,
|
|
2584
|
+
this.invoicePayButton,
|
|
2585
|
+
this.invoiceDiscardButton,
|
|
2586
|
+
this.invoiceEditButton
|
|
2587
|
+
],
|
|
2588
|
+
loadAction: { url: 'invoices/all/x' },
|
|
2589
|
+
formConfig: this.invoiceFormConfig,
|
|
2590
|
+
tileConfig: this.invoicesTileConfig
|
|
2591
|
+
};
|
|
2592
|
+
//--------------------------Customer Invoices-------------------------
|
|
2593
|
+
// Customer invoice form without customerID field
|
|
2594
|
+
this.customerInvoiceFormConfig = {
|
|
2595
|
+
...this.invoiceFormConfig,
|
|
2596
|
+
fields: this.invoiceFormConfig.fields.filter(x => ['customerID'].includes(x.name) == false),
|
|
2597
|
+
loadAction: { url: 'invoices/customer-id' }
|
|
2598
|
+
};
|
|
2599
|
+
// Customer invoice items table (read-only view)
|
|
2600
|
+
this.customerInvoiceItemsTableConfig = {
|
|
2601
|
+
...this.invoiceItemsTableConfig,
|
|
2602
|
+
loadCriteria: 'customer-invoice',
|
|
2603
|
+
buttons: []
|
|
2604
|
+
};
|
|
2605
|
+
// Customer invoice details dialog (read-only)
|
|
2606
|
+
this.customerInvoiceDetailsDialogConfig = {
|
|
2607
|
+
formConfig: this.customerInvoiceFormConfig,
|
|
2608
|
+
tableConfigs: [this.customerInvoiceItemsTableConfig],
|
|
2609
|
+
heroField: 'invoiceID',
|
|
2610
|
+
buttons: []
|
|
2611
|
+
};
|
|
2612
|
+
// Customer invoices table configuration
|
|
2613
|
+
this.customerInvoicesTableConfig = {
|
|
2614
|
+
...this.invoicesTableConfig,
|
|
2615
|
+
minColumns: ['invoiceID', 'totalDisplay'],
|
|
2616
|
+
minButtons: ['view', 'pdf'],
|
|
2617
|
+
columns: [...this.invoicesTableConfig.columns.filter(x => ['invoiceID', 'invoiceDate', 'statusName', 'itemCount', 'totalAmount'].includes(x.name))],
|
|
2618
|
+
buttons: [{ name: 'view', dialog: true, detailsConfig: this.customerInvoiceDetailsDialogConfig }, this.invoiceDownloadButton],
|
|
2619
|
+
loadAction: { url: 'invoices/customer-all/x' }
|
|
2620
|
+
};
|
|
2621
|
+
//--------------------------Outstanding Invoices-------------------------
|
|
2622
|
+
// Outstanding invoices form configuration
|
|
2623
|
+
this.outstandingInvoicesFormConfig = {
|
|
2624
|
+
security: { allow: [this.dataService.capAccountingOutstandingInvoices] },
|
|
2625
|
+
title: 'Outstanding Invoices',
|
|
2626
|
+
fields: []
|
|
2627
|
+
};
|
|
2628
|
+
// Outstanding invoices summary tiles
|
|
2629
|
+
this.outstandingInvoicesTileConfig = {
|
|
2630
|
+
tiles: [
|
|
2631
|
+
{ name: 'totalPending', alias: 'Total Pending', color: '#F44336', info: 'Total amount pending payment from all customers' },
|
|
2632
|
+
{ name: 'overdueCount', alias: 'Overdue', color: '#FF9800', info: 'Number of invoices with overdue payments' },
|
|
2633
|
+
{ name: 'partialCount', alias: 'Partial Payments', color: '#2196F3', info: 'Number of invoices with partial payments received' },
|
|
2634
|
+
{ name: 'customerCount', alias: 'Customers', color: '#4CAF50', info: 'Number of customers with pending payments' }
|
|
2635
|
+
],
|
|
2636
|
+
loadAction: { url: 'invoices/outstanding-summary/x' }
|
|
2637
|
+
};
|
|
2638
|
+
// Outstanding invoices table configuration
|
|
2639
|
+
this.outstandingInvoicesTableConfig = {
|
|
2640
|
+
holdHeaderButtonSpace: true,
|
|
2641
|
+
showFilter: true,
|
|
2642
|
+
minColumns: ['customerName', 'amount', 'balance'],
|
|
2643
|
+
minButtons: ['view'],
|
|
2644
|
+
flatButtons: true,
|
|
2645
|
+
columns: [
|
|
2646
|
+
{ name: 'invoiceID', type: 'number', alias: 'Invoice ID' },
|
|
2647
|
+
{ name: 'customerName', type: 'text', alias: 'Customer' },
|
|
2648
|
+
{ name: 'descriptionDisplay', type: 'text', alias: 'Description' },
|
|
2649
|
+
{ name: 'amount', type: 'money', alias: 'Total Amount' },
|
|
2650
|
+
{ name: 'paidAmount', type: 'money', alias: 'Paid Amount' },
|
|
2651
|
+
{ name: 'balance', type: 'money', alias: 'Remaining Balance' }
|
|
2652
|
+
],
|
|
2653
|
+
buttons: [{ name: 'view', dialog: true, detailsConfig: this.invoiceDetailsDialogConfig }],
|
|
2654
|
+
loadAction: { url: 'invoices/outstanding/x' },
|
|
2655
|
+
formConfig: this.outstandingInvoicesFormConfig,
|
|
2656
|
+
tileConfig: this.outstandingInvoicesTileConfig
|
|
2657
|
+
};
|
|
2404
2658
|
//--------------------------Transaction Types-------------------------
|
|
2405
2659
|
this.transactionTypeFormConfig = {
|
|
2406
2660
|
security: { allow: [this.dataService.capTransactionTypes] },
|
|
@@ -2413,11 +2667,11 @@ class AccountingService {
|
|
|
2413
2667
|
{ name: 'creditAccountType', type: 'select', alias: 'Credit Account Type', required: true,
|
|
2414
2668
|
loadAction: { url: 'accounts/list/accountTypes' }
|
|
2415
2669
|
},
|
|
2416
|
-
{ name: 'defaultDebitAccountID', type: 'select', alias: 'Default Debit Account',
|
|
2417
|
-
loadAction: { url: 'accounts/list/x' }
|
|
2670
|
+
{ name: 'defaultDebitAccountID', type: 'select', alias: 'Default Debit Account', nullable: true, masterField: 'debitAccountType', masterOptionValue: 'type',
|
|
2671
|
+
loadAction: { url: 'accounts/list/x' }, detailsConfig: this.accountDetailsConfig
|
|
2418
2672
|
},
|
|
2419
|
-
{ name: 'defaultCreditAccountID', type: 'select', alias: 'Default Credit Account',
|
|
2420
|
-
loadAction: { url: 'accounts/list/x' }
|
|
2673
|
+
{ name: 'defaultCreditAccountID', type: 'select', alias: 'Default Credit Account', nullable: true, masterField: 'creditAccountType', masterOptionValue: 'type',
|
|
2674
|
+
loadAction: { url: 'accounts/list/x' }, detailsConfig: this.accountDetailsConfig
|
|
2421
2675
|
},
|
|
2422
2676
|
],
|
|
2423
2677
|
loadAction: { url: 'transactiontypes/id' },
|
|
@@ -2464,11 +2718,11 @@ class AccountingService {
|
|
|
2464
2718
|
{ name: 'date', type: 'date', required: true },
|
|
2465
2719
|
{ name: 'debitAccountID', type: 'select', alias: 'Debit Account', required: true, readonlyCondition: x => x.transactionID,
|
|
2466
2720
|
masterField: 'transactionTypeID', masterValueField: 'debitAccountType', masterDefaultValueField: 'defaultDebitAccountID', masterOptionValue: 'type',
|
|
2467
|
-
loadAction: { url: 'accounts/list/x' }
|
|
2721
|
+
loadAction: { url: 'accounts/list/x' }, detailsConfig: this.accountDetailsConfig
|
|
2468
2722
|
},
|
|
2469
2723
|
{ name: 'creditAccountID', type: 'select', alias: 'Credit Account', required: true, readonlyCondition: x => x.transactionID,
|
|
2470
2724
|
masterField: 'transactionTypeID', masterValueField: 'creditAccountType', masterDefaultValueField: 'defaultCreditAccountID', masterOptionValue: 'type',
|
|
2471
|
-
loadAction: { url: 'accounts/list/x' }
|
|
2725
|
+
loadAction: { url: 'accounts/list/x' }, detailsConfig: this.accountDetailsConfig
|
|
2472
2726
|
},
|
|
2473
2727
|
{ name: 'description', type: 'text', required: true, span: true },
|
|
2474
2728
|
{ name: 'amount', type: 'label', format: 'money', required: true, hideOnCreate: true, readonly: true },
|
|
@@ -2536,20 +2790,6 @@ class AccountingService {
|
|
|
2536
2790
|
};
|
|
2537
2791
|
this.accountCreateButton = { name: 'create', display: 'Create', dialog: true, action: { url: 'accounts?action=create', method: 'post' } };
|
|
2538
2792
|
this.finAccounEditButton = { name: 'edit', dialog: true, action: { url: 'accounts?action=edit', method: 'post' } };
|
|
2539
|
-
this.accountDetailsConfig = {
|
|
2540
|
-
formConfig: this.accountFormConfig,
|
|
2541
|
-
tableConfigs: [
|
|
2542
|
-
{ ...this.accountTransactionsTableConfig },
|
|
2543
|
-
{
|
|
2544
|
-
...this.transactionTypesTableConfig,
|
|
2545
|
-
tabTitle: 'Transaction Types',
|
|
2546
|
-
buttons: [],
|
|
2547
|
-
loadAction: { url: 'transactionTypes/account/x' }, loadCriteria: 'account', loadIDField: 'accountID'
|
|
2548
|
-
},
|
|
2549
|
-
],
|
|
2550
|
-
heroField: 'accountID',
|
|
2551
|
-
buttons: [this.accountCreateButton, this.finAccounEditButton]
|
|
2552
|
-
};
|
|
2553
2793
|
this.accountsTableConfig = {
|
|
2554
2794
|
showFilter: true,
|
|
2555
2795
|
minColumns: ['name', 'type', 'balance'],
|
|
@@ -2568,6 +2808,20 @@ class AccountingService {
|
|
|
2568
2808
|
loadAction: { url: 'accounts/all/x' },
|
|
2569
2809
|
formConfig: this.accountFormConfig
|
|
2570
2810
|
};
|
|
2811
|
+
this.accountDetailsConfig = {
|
|
2812
|
+
formConfig: this.accountFormConfig,
|
|
2813
|
+
tableConfigs: [
|
|
2814
|
+
{ ...this.accountTransactionsTableConfig },
|
|
2815
|
+
{
|
|
2816
|
+
...this.transactionTypesTableConfig,
|
|
2817
|
+
tabTitle: 'Transaction Types',
|
|
2818
|
+
buttons: [],
|
|
2819
|
+
loadAction: { url: 'transactionTypes/account/x' }, loadCriteria: 'account', loadIDField: 'accountID'
|
|
2820
|
+
},
|
|
2821
|
+
],
|
|
2822
|
+
heroField: 'accountID',
|
|
2823
|
+
buttons: [this.accountCreateButton, this.finAccounEditButton]
|
|
2824
|
+
};
|
|
2571
2825
|
}
|
|
2572
2826
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AccountingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2573
2827
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AccountingService, providedIn: 'root' }); }
|
|
@@ -2577,7 +2831,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
2577
2831
|
args: [{
|
|
2578
2832
|
providedIn: 'root'
|
|
2579
2833
|
}]
|
|
2580
|
-
}] });
|
|
2834
|
+
}], ctorParameters: () => [] });
|
|
2581
2835
|
|
|
2582
2836
|
class LoansService {
|
|
2583
2837
|
constructor() {
|
|
@@ -2784,6 +3038,631 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
2784
3038
|
}]
|
|
2785
3039
|
}] });
|
|
2786
3040
|
|
|
3041
|
+
// Service for generic entities: Categories, SubCategories, Brands, and ListItems
|
|
3042
|
+
class GeneralService {
|
|
3043
|
+
constructor() {
|
|
3044
|
+
this.dataService = inject(DataServiceLib);
|
|
3045
|
+
//--------------------------Categories-------------------------
|
|
3046
|
+
this.categoryFormConfig = {
|
|
3047
|
+
title: 'Category',
|
|
3048
|
+
includeAudit: true,
|
|
3049
|
+
fields: [
|
|
3050
|
+
{ name: 'name', type: 'text', required: true, alias: 'Name' },
|
|
3051
|
+
{ name: 'description', type: 'text', alias: 'Description' }
|
|
3052
|
+
],
|
|
3053
|
+
loadAction: { url: 'categories/id' },
|
|
3054
|
+
heroField: 'categoryID'
|
|
3055
|
+
};
|
|
3056
|
+
this.categoryCreateButton = { name: 'create', display: 'Create Category', dialog: true, action: { url: 'categories?action=create', method: 'post' } };
|
|
3057
|
+
this.categoryEditButton = { name: 'edit', dialog: true, action: { url: 'categories?action=edit', method: 'post' } };
|
|
3058
|
+
this.categoryDeleteButton = { name: 'delete', dialog: true, action: { url: 'categories?action=delete', method: 'post' } };
|
|
3059
|
+
this.categoryDetailsConfig = {
|
|
3060
|
+
formConfig: this.categoryFormConfig,
|
|
3061
|
+
heroField: 'categoryID',
|
|
3062
|
+
buttons: [this.categoryCreateButton, this.categoryEditButton, this.categoryDeleteButton]
|
|
3063
|
+
};
|
|
3064
|
+
this.categoriesTableConfig = {
|
|
3065
|
+
showFilter: true,
|
|
3066
|
+
flatButtons: true,
|
|
3067
|
+
minColumns: ['name', 'description'],
|
|
3068
|
+
columns: [
|
|
3069
|
+
{ name: 'name', type: 'text', alias: 'Name' },
|
|
3070
|
+
{ name: 'description', type: 'text', alias: 'Description' }
|
|
3071
|
+
],
|
|
3072
|
+
buttons: [
|
|
3073
|
+
this.categoryCreateButton,
|
|
3074
|
+
{ name: 'view', dialog: true, detailsConfig: this.categoryDetailsConfig },
|
|
3075
|
+
this.categoryEditButton,
|
|
3076
|
+
this.categoryDeleteButton
|
|
3077
|
+
],
|
|
3078
|
+
loadAction: { url: 'categories/all/x' },
|
|
3079
|
+
formConfig: this.categoryFormConfig
|
|
3080
|
+
};
|
|
3081
|
+
//--------------------------SubCategories-------------------------
|
|
3082
|
+
this.subCategoryFormConfig = {
|
|
3083
|
+
title: 'Sub Category',
|
|
3084
|
+
includeAudit: true,
|
|
3085
|
+
fields: [
|
|
3086
|
+
{ name: 'name', type: 'text', required: true, alias: 'Name' },
|
|
3087
|
+
{ name: 'categoryID', type: 'select', required: true, alias: 'Category', loadAction: { url: 'categories/list/x' } },
|
|
3088
|
+
{ name: 'description', type: 'text', alias: 'Description' }
|
|
3089
|
+
],
|
|
3090
|
+
loadAction: { url: 'subcategories/id' },
|
|
3091
|
+
heroField: 'subCategoryID'
|
|
3092
|
+
};
|
|
3093
|
+
this.subCategoryCreateButton = { name: 'create', display: 'Create Sub Category', dialog: true, action: { url: 'subcategories?action=create', method: 'post' } };
|
|
3094
|
+
this.subCategoryEditButton = { name: 'edit', dialog: true, action: { url: 'subcategories?action=edit', method: 'post' } };
|
|
3095
|
+
this.subCategoryDeleteButton = { name: 'delete', dialog: true, action: { url: 'subcategories?action=delete', method: 'post' } };
|
|
3096
|
+
this.subCategoryDetailsConfig = {
|
|
3097
|
+
formConfig: this.subCategoryFormConfig,
|
|
3098
|
+
heroField: 'subCategoryID',
|
|
3099
|
+
buttons: [this.subCategoryCreateButton, this.subCategoryEditButton, this.subCategoryDeleteButton]
|
|
3100
|
+
};
|
|
3101
|
+
this.subCategoriesTableConfig = {
|
|
3102
|
+
showFilter: true,
|
|
3103
|
+
flatButtons: true,
|
|
3104
|
+
minColumns: ['name', 'categoryName', 'description'],
|
|
3105
|
+
columns: [
|
|
3106
|
+
{ name: 'name', type: 'text', alias: 'Name' },
|
|
3107
|
+
{ name: 'categoryName', type: 'text', alias: 'Category' },
|
|
3108
|
+
{ name: 'description', type: 'text', alias: 'Description' }
|
|
3109
|
+
],
|
|
3110
|
+
buttons: [
|
|
3111
|
+
this.subCategoryCreateButton,
|
|
3112
|
+
{ name: 'view', dialog: true, detailsConfig: this.subCategoryDetailsConfig },
|
|
3113
|
+
this.subCategoryEditButton,
|
|
3114
|
+
this.subCategoryDeleteButton
|
|
3115
|
+
],
|
|
3116
|
+
loadAction: { url: 'subcategories/all/x' },
|
|
3117
|
+
formConfig: this.subCategoryFormConfig
|
|
3118
|
+
};
|
|
3119
|
+
//--------------------------Brands-------------------------
|
|
3120
|
+
this.brandFormConfig = {
|
|
3121
|
+
title: 'Brand',
|
|
3122
|
+
includeAudit: true,
|
|
3123
|
+
fields: [
|
|
3124
|
+
{ name: 'name', type: 'text', required: true, alias: 'Name' },
|
|
3125
|
+
{ name: 'description', type: 'text', alias: 'Description' }
|
|
3126
|
+
],
|
|
3127
|
+
loadAction: { url: 'brands/id' },
|
|
3128
|
+
heroField: 'brandID'
|
|
3129
|
+
};
|
|
3130
|
+
this.brandCreateButton = { name: 'create', display: 'Create Brand', dialog: true, action: { url: 'brands?action=create', method: 'post' } };
|
|
3131
|
+
this.brandEditButton = { name: 'edit', dialog: true, action: { url: 'brands?action=edit', method: 'post' } };
|
|
3132
|
+
this.brandDeleteButton = { name: 'delete', dialog: true, action: { url: 'brands?action=delete', method: 'post' } };
|
|
3133
|
+
this.brandDetailsConfig = {
|
|
3134
|
+
formConfig: this.brandFormConfig,
|
|
3135
|
+
heroField: 'brandID',
|
|
3136
|
+
buttons: [this.brandCreateButton, this.brandEditButton, this.brandDeleteButton]
|
|
3137
|
+
};
|
|
3138
|
+
this.brandsTableConfig = {
|
|
3139
|
+
showFilter: true,
|
|
3140
|
+
flatButtons: true,
|
|
3141
|
+
minColumns: ['name', 'description'],
|
|
3142
|
+
columns: [
|
|
3143
|
+
{ name: 'name', type: 'text', alias: 'Name' },
|
|
3144
|
+
{ name: 'description', type: 'text', alias: 'Description' }
|
|
3145
|
+
],
|
|
3146
|
+
buttons: [
|
|
3147
|
+
this.brandCreateButton,
|
|
3148
|
+
{ name: 'view', dialog: true, detailsConfig: this.brandDetailsConfig },
|
|
3149
|
+
this.brandEditButton,
|
|
3150
|
+
this.brandDeleteButton
|
|
3151
|
+
],
|
|
3152
|
+
loadAction: { url: 'brands/all/x' },
|
|
3153
|
+
formConfig: this.brandFormConfig
|
|
3154
|
+
};
|
|
3155
|
+
//--------------------------ListItems-------------------------
|
|
3156
|
+
this.listItemFormConfig = {
|
|
3157
|
+
title: 'List Item',
|
|
3158
|
+
includeAudit: true,
|
|
3159
|
+
fields: [
|
|
3160
|
+
{ name: 'listName', type: 'text', required: true, alias: 'List Name', readonly: true },
|
|
3161
|
+
{ name: 'name', type: 'text', required: true, alias: 'Name' }
|
|
3162
|
+
],
|
|
3163
|
+
loadAction: { url: 'listitems/id' },
|
|
3164
|
+
heroField: 'listItemID'
|
|
3165
|
+
};
|
|
3166
|
+
this.listItemCreateButton = { name: 'create', display: 'Create Item', dialog: true, action: { url: 'listitems?action=create', method: 'post' } };
|
|
3167
|
+
this.listItemEditButton = { name: 'edit', dialog: true, action: { url: 'listitems?action=edit', method: 'post' } };
|
|
3168
|
+
this.listItemDeleteButton = { name: 'delete', dialog: true, action: { url: 'listitems?action=delete', method: 'post' } };
|
|
3169
|
+
this.listItemDetailsConfig = {
|
|
3170
|
+
formConfig: this.listItemFormConfig,
|
|
3171
|
+
heroField: 'listItemID',
|
|
3172
|
+
buttons: [this.listItemCreateButton, this.listItemEditButton, this.listItemDeleteButton]
|
|
3173
|
+
};
|
|
3174
|
+
this.listItemsTableConfig = {
|
|
3175
|
+
showFilter: true,
|
|
3176
|
+
flatButtons: true,
|
|
3177
|
+
minColumns: ['listName', 'name'],
|
|
3178
|
+
columns: [
|
|
3179
|
+
{ name: 'listName', type: 'text', alias: 'List Name' },
|
|
3180
|
+
{ name: 'name', type: 'text', alias: 'Name' }
|
|
3181
|
+
],
|
|
3182
|
+
buttons: [
|
|
3183
|
+
this.listItemCreateButton,
|
|
3184
|
+
{ name: 'view', dialog: true, detailsConfig: this.listItemDetailsConfig },
|
|
3185
|
+
this.listItemEditButton,
|
|
3186
|
+
this.listItemDeleteButton
|
|
3187
|
+
],
|
|
3188
|
+
loadAction: { url: 'listitems/all/x' },
|
|
3189
|
+
formConfig: this.listItemFormConfig
|
|
3190
|
+
};
|
|
3191
|
+
}
|
|
3192
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: GeneralService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3193
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: GeneralService, providedIn: 'root' }); }
|
|
3194
|
+
}
|
|
3195
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: GeneralService, decorators: [{
|
|
3196
|
+
type: Injectable,
|
|
3197
|
+
args: [{
|
|
3198
|
+
providedIn: 'root'
|
|
3199
|
+
}]
|
|
3200
|
+
}] });
|
|
3201
|
+
|
|
3202
|
+
// Service to centralize all inventory-related table and form configurations
|
|
3203
|
+
class InventoryService {
|
|
3204
|
+
// Changed: Moved initialization to constructor to avoid circular references
|
|
3205
|
+
constructor() {
|
|
3206
|
+
this.dataService = inject(DataServiceLib);
|
|
3207
|
+
this.generalService = inject(GeneralService);
|
|
3208
|
+
//--------------------------Products-------------------------
|
|
3209
|
+
this.productFormConfig = {
|
|
3210
|
+
security: { allow: [this.dataService.capProducts] },
|
|
3211
|
+
title: 'Product',
|
|
3212
|
+
multiColumn: true,
|
|
3213
|
+
includeAudit: true,
|
|
3214
|
+
fields: [
|
|
3215
|
+
{ name: 'productInfo', type: 'section', alias: 'Product Information' },
|
|
3216
|
+
{ name: 'name', type: 'text', required: true, alias: 'Product Name', section: 'productInfo' },
|
|
3217
|
+
{ name: 'sku', type: 'text', required: true, alias: 'SKU', section: 'productInfo' },
|
|
3218
|
+
{ name: 'description', type: 'text', alias: 'Description', span: true, section: 'productInfo' },
|
|
3219
|
+
{ name: 'categoryInfo', type: 'section', alias: 'Categorization' },
|
|
3220
|
+
{ name: 'categoryID', type: 'select', alias: 'Category', section: 'categoryInfo', loadAction: { url: 'categories/list/x' }, detailsConfig: this.generalService.categoryDetailsConfig },
|
|
3221
|
+
{ name: 'subCategoryID', type: 'select', alias: 'Sub Category', section: 'categoryInfo', loadAction: { url: 'subcategories/list/x' }, detailsConfig: this.generalService.subCategoryDetailsConfig },
|
|
3222
|
+
{ name: 'brandID', type: 'select', alias: 'Brand', section: 'categoryInfo', loadAction: { url: 'brands/list/x' }, detailsConfig: this.generalService.brandDetailsConfig },
|
|
3223
|
+
{ name: 'inventoryInfo', type: 'section', alias: 'Inventory Settings' },
|
|
3224
|
+
{ name: 'isSerialized', type: 'checkbox', alias: 'Serialized Product', section: 'inventoryInfo' },
|
|
3225
|
+
{ name: 'baseUnit', type: 'select', required: true, alias: 'Base Unit', section: 'inventoryInfo', loadAction: { url: 'products/list/base-unit' } },
|
|
3226
|
+
{ name: 'minimumInventoryLevel', type: 'number', required: true, alias: 'Minimum Inventory Level', section: 'inventoryInfo' },
|
|
3227
|
+
{ name: 'pricingInfo', type: 'section', alias: 'Pricing' },
|
|
3228
|
+
{ name: 'sellingPrice', type: 'money', required: true, alias: 'Selling Price', section: 'pricingInfo' }
|
|
3229
|
+
],
|
|
3230
|
+
loadAction: { url: 'products/id' },
|
|
3231
|
+
heroField: 'productID'
|
|
3232
|
+
};
|
|
3233
|
+
this.productCreateButton = { name: 'create', display: 'Create Product', dialog: true, action: { url: 'products?action=create', method: 'post' } };
|
|
3234
|
+
this.productEditButton = { name: 'edit', dialog: true, action: { url: 'products?action=edit', method: 'post' } };
|
|
3235
|
+
this.productDeleteButton = { name: 'delete', dialog: true, action: { url: 'products?action=delete', method: 'post' } };
|
|
3236
|
+
this.productLowInventoryButton = { name: 'low-inventory', display: 'Low Inventory', icon: { name: 'warning', color: 'orange' }, action: { url: 'products/low-inventory/x', method: 'get' } };
|
|
3237
|
+
this.productsTableConfig = {
|
|
3238
|
+
showFilter: true,
|
|
3239
|
+
flatButtons: true,
|
|
3240
|
+
minColumns: ['name', 'sku', 'currentInventoryLevel'],
|
|
3241
|
+
columns: [
|
|
3242
|
+
{ name: 'name', type: 'text', alias: 'Product Name' },
|
|
3243
|
+
{ name: 'sku', type: 'text', alias: 'SKU' },
|
|
3244
|
+
{ name: 'categoryName', type: 'text', alias: 'Category' },
|
|
3245
|
+
{ name: 'brandName', type: 'text', alias: 'Brand' },
|
|
3246
|
+
{ name: 'isSerialized', type: 'checkbox', alias: 'Serialized' },
|
|
3247
|
+
{ name: 'baseUnit', type: 'text', alias: 'Unit' },
|
|
3248
|
+
{ name: 'currentInventoryLevel', type: 'number', alias: 'Current Stock' },
|
|
3249
|
+
{ name: 'minimumInventoryLevel', type: 'number', alias: 'Min Stock' },
|
|
3250
|
+
{ name: 'isLowInventory', type: 'checkbox', alias: 'Low Stock', icon: { name: 'warning', color: 'orange' } },
|
|
3251
|
+
{ name: 'sellingPrice', type: 'money', alias: 'Price' },
|
|
3252
|
+
{ name: 'currentAverageCost', type: 'money', alias: 'Avg Cost' }
|
|
3253
|
+
],
|
|
3254
|
+
buttons: [
|
|
3255
|
+
this.productCreateButton,
|
|
3256
|
+
{ name: 'view', dialog: true, detailsConfig: this.productDetailsConfig },
|
|
3257
|
+
this.productEditButton,
|
|
3258
|
+
this.productDeleteButton,
|
|
3259
|
+
this.productLowInventoryButton
|
|
3260
|
+
],
|
|
3261
|
+
loadAction: { url: 'products/all/x' },
|
|
3262
|
+
formConfig: this.productFormConfig
|
|
3263
|
+
};
|
|
3264
|
+
//--------------------------Requisitions-------------------------
|
|
3265
|
+
this.requisitionItemFormConfig = {
|
|
3266
|
+
title: 'Requisition Item',
|
|
3267
|
+
fields: [
|
|
3268
|
+
{ name: 'productID', type: 'select', alias: 'Product', required: true, loadAction: { url: 'products/list/x' }, detailsConfig: this.productDetailsConfig },
|
|
3269
|
+
{ name: 'requestedQuantity', type: 'number', alias: 'Requested Qty', required: true },
|
|
3270
|
+
{ name: 'issuedQuantity', type: 'number', alias: 'Issued Qty', readonly: true },
|
|
3271
|
+
{ name: 'inventoryItemID', type: 'select', alias: 'Serial Number', loadAction: { url: 'inventoryitems/list/x' } }
|
|
3272
|
+
],
|
|
3273
|
+
loadAction: { url: 'requisitionitems/id' }
|
|
3274
|
+
};
|
|
3275
|
+
this.requisitionItemsTableConfig = {
|
|
3276
|
+
tabTitle: 'Items',
|
|
3277
|
+
showFilter: false,
|
|
3278
|
+
elevation: 'none',
|
|
3279
|
+
flatButtons: true,
|
|
3280
|
+
// showInModes: ['edit'], // Changed: Only show tab in edit mode, not during creation
|
|
3281
|
+
columns: [
|
|
3282
|
+
{ name: 'productName', type: 'text', alias: 'Product' },
|
|
3283
|
+
{ name: 'requestedQuantity', type: 'number', alias: 'Requested Qty' },
|
|
3284
|
+
{ name: 'issuedQuantity', type: 'number', alias: 'Issued Qty' },
|
|
3285
|
+
{ name: 'serialNumber', type: 'text', alias: 'Serial Number' }
|
|
3286
|
+
],
|
|
3287
|
+
buttons: [
|
|
3288
|
+
{ name: 'create', display: 'Add Item', dialog: true, action: { url: 'requisitionitems?action=create', method: 'post' } },
|
|
3289
|
+
{ name: 'edit', dialog: true, action: { url: 'requisitionitems?action=edit', method: 'post' } },
|
|
3290
|
+
{ name: 'delete', dialog: true, action: { url: 'requisitionitems?action=delete', method: 'post' } }
|
|
3291
|
+
],
|
|
3292
|
+
loadAction: { url: 'requisitionitems/x/x' }, loadCriteria: 'requisition', loadIDField: 'requisitionID',
|
|
3293
|
+
formConfig: this.requisitionItemFormConfig
|
|
3294
|
+
};
|
|
3295
|
+
this.requisitionFormConfig = {
|
|
3296
|
+
security: { allow: [this.dataService.capRequisitions] },
|
|
3297
|
+
title: 'Requisition',
|
|
3298
|
+
multiColumn: true,
|
|
3299
|
+
includeAudit: true,
|
|
3300
|
+
fields: [
|
|
3301
|
+
{ name: 'reqInfo', type: 'section', alias: 'Requisition Information' },
|
|
3302
|
+
{ name: 'requisitionNumber', type: 'text', alias: 'Requisition #', readonly: true, section: 'reqInfo' },
|
|
3303
|
+
{ name: 'requestedBy', type: 'text', alias: 'Requested By', readonly: true, section: 'reqInfo' },
|
|
3304
|
+
{ name: 'departmentID', type: 'select', alias: 'Department', section: 'reqInfo', loadAction: { url: 'departments/list/x' } },
|
|
3305
|
+
{ name: 'requestDate', type: 'date', alias: 'Request Date', readonly: true, section: 'reqInfo' },
|
|
3306
|
+
{ name: 'issuedDate', type: 'date', alias: 'Issued Date', readonly: true, section: 'reqInfo' },
|
|
3307
|
+
{ name: 'status', type: 'select', alias: 'Status', readonly: true, section: 'reqInfo', loadAction: { url: 'requisitions/list/status' } },
|
|
3308
|
+
{ name: 'purposeInfo', type: 'section', alias: 'Purpose & Notes' },
|
|
3309
|
+
{ name: 'purpose', type: 'text', required: true, alias: 'Purpose', span: true, section: 'purposeInfo' },
|
|
3310
|
+
{ name: 'notes', type: 'text', alias: 'Notes', span: true, section: 'purposeInfo' }
|
|
3311
|
+
],
|
|
3312
|
+
loadAction: { url: 'requisitions/id' },
|
|
3313
|
+
heroField: 'requisitionID'
|
|
3314
|
+
};
|
|
3315
|
+
this.requisitionEditButton = { name: 'edit', dialog: true, action: { url: 'requisitions?action=edit', method: 'post' } };
|
|
3316
|
+
this.requisitionSubmitButton = { name: 'submit', display: 'Submit Requisition', icon: { name: 'send', color: 'primary' }, action: { url: 'requisitions?action=submit', method: 'post', successMessage: 'Requisition Submitted' }, confirm: { message: 'Submit this requisition for approval?' }, visible: (row) => row.status === 0 }; // Changed: Added submit button for edit mode only
|
|
3317
|
+
this.requisitionIssueButton = { name: 'issue', display: 'Issue Items', icon: { name: 'check', color: 'green' }, inDialog: true, action: { url: 'requisitions?action=issue', method: 'post', successMessage: 'Items Issued' }, confirm: { message: 'Issue items for this requisition?' }, visible: (row) => row.pendingApproval === false && row.status === 0 };
|
|
3318
|
+
this.requisitionCancelButton = { name: 'cancel', display: 'Cancel Request', icon: { name: 'close', color: 'red' }, inDialog: true, action: { url: 'requisitions?action=cancel', method: 'post', successMessage: 'Requisition Cancelled' }, confirm: { message: 'Cancel this requisition?' }, visible: (row) => row.status === 0 };
|
|
3319
|
+
this.requisitionDetailsConfig = {
|
|
3320
|
+
formConfig: this.requisitionFormConfig,
|
|
3321
|
+
tableConfigs: [this.requisitionItemsTableConfig],
|
|
3322
|
+
heroField: 'requisitionID',
|
|
3323
|
+
buttons: [this.requisitionEditButton, this.requisitionSubmitButton, this.requisitionIssueButton, this.requisitionCancelButton] // Changed: Added submit button
|
|
3324
|
+
};
|
|
3325
|
+
this.requisitionViewButton = { name: 'view', dialog: true, detailsConfig: this.requisitionDetailsConfig };
|
|
3326
|
+
this.requisitionsTableConfig = {
|
|
3327
|
+
showFilter: true,
|
|
3328
|
+
flatButtons: true,
|
|
3329
|
+
minColumns: ['requisitionNumber', 'requesterName', 'requestDate'],
|
|
3330
|
+
columns: [
|
|
3331
|
+
{ name: 'requisitionNumber', type: 'text', alias: 'Requisition #' },
|
|
3332
|
+
{ name: 'requesterName', type: 'text', alias: 'Requested By' },
|
|
3333
|
+
{ name: 'departmentName', type: 'text', alias: 'Department' },
|
|
3334
|
+
{ name: 'requestDate', type: 'date', alias: 'Request Date' },
|
|
3335
|
+
{ name: 'issuedDate', type: 'date', alias: 'Issued Date' },
|
|
3336
|
+
{ name: 'status', type: 'text', alias: 'Status' },
|
|
3337
|
+
{ name: 'purpose', type: 'text', alias: 'Purpose', maxLength: 100 },
|
|
3338
|
+
{ name: 'pendingApproval', type: 'checkbox', alias: 'Pending' }
|
|
3339
|
+
],
|
|
3340
|
+
buttons: [
|
|
3341
|
+
{ name: 'create', display: 'New Requisition', dialog: true, action: { url: 'requisitions?action=create', method: 'post' }, onSuccessButton: this.requisitionViewButton },
|
|
3342
|
+
{ name: 'view', dialog: true, detailsConfig: this.requisitionDetailsConfig },
|
|
3343
|
+
{ name: 'edit', dialog: true, detailsConfig: this.requisitionDetailsConfig },
|
|
3344
|
+
{ name: 'delete', dialog: true, action: { url: 'requisitions?action=delete', method: 'post' } },
|
|
3345
|
+
this.requisitionIssueButton,
|
|
3346
|
+
this.requisitionCancelButton
|
|
3347
|
+
],
|
|
3348
|
+
loadAction: { url: 'requisitions/all/x' },
|
|
3349
|
+
formConfig: this.requisitionFormConfig
|
|
3350
|
+
};
|
|
3351
|
+
//--------------------------Inventory Receipts-------------------------
|
|
3352
|
+
this.inventoryReceiptItemFormConfig = {
|
|
3353
|
+
title: 'Receipt Item',
|
|
3354
|
+
fields: [
|
|
3355
|
+
{ name: 'productID', type: 'select', alias: 'Product', required: true, loadAction: { url: 'products/list/x' }, detailsConfig: this.productDetailsConfig },
|
|
3356
|
+
{ name: 'quantity', type: 'number', alias: 'Quantity', required: true },
|
|
3357
|
+
{ name: 'unitCost', type: 'money', alias: 'Unit Cost', required: true },
|
|
3358
|
+
{ name: 'lineTotal', type: 'money', alias: 'Line Total', readonly: true },
|
|
3359
|
+
{ name: 'serialNumbers', type: 'text', alias: 'Serial Numbers (comma-separated)' }
|
|
3360
|
+
],
|
|
3361
|
+
loadAction: { url: 'inventoryreceiptitems/id' }
|
|
3362
|
+
};
|
|
3363
|
+
this.inventoryReceiptItemsTableConfig = {
|
|
3364
|
+
tabTitle: 'Items',
|
|
3365
|
+
showFilter: false,
|
|
3366
|
+
elevation: 'none',
|
|
3367
|
+
flatButtons: true,
|
|
3368
|
+
// showInModes: ['edit'], // Changed: Only show tab in edit mode, not during creation
|
|
3369
|
+
columns: [
|
|
3370
|
+
{ name: 'productName', type: 'text', alias: 'Product' },
|
|
3371
|
+
{ name: 'quantity', type: 'number', alias: 'Quantity' },
|
|
3372
|
+
{ name: 'unitCost', type: 'money', alias: 'Unit Cost' },
|
|
3373
|
+
{ name: 'lineTotal', type: 'money', alias: 'Line Total' },
|
|
3374
|
+
{ name: 'serialNumbers', type: 'text', alias: 'Serial Numbers' }
|
|
3375
|
+
],
|
|
3376
|
+
buttons: [
|
|
3377
|
+
{ name: 'create', display: 'Add Item', dialog: true, action: { url: 'inventoryreceiptitems?action=create', method: 'post' } },
|
|
3378
|
+
{ name: 'edit', dialog: true, action: { url: 'inventoryreceiptitems?action=edit', method: 'post' } },
|
|
3379
|
+
{ name: 'delete', dialog: true, action: { url: 'inventoryreceiptitems?action=delete', method: 'post' } }
|
|
3380
|
+
],
|
|
3381
|
+
loadAction: { url: 'inventoryreceiptitems/x/x' }, loadCriteria: 'receipt', loadIDField: 'inventoryReceiptID',
|
|
3382
|
+
formConfig: this.inventoryReceiptItemFormConfig
|
|
3383
|
+
};
|
|
3384
|
+
this.inventoryReceiptFormConfig = {
|
|
3385
|
+
security: { allow: [this.dataService.capInventoryReceipts] },
|
|
3386
|
+
title: 'Inventory Receipt',
|
|
3387
|
+
multiColumn: true,
|
|
3388
|
+
includeAudit: true,
|
|
3389
|
+
fields: [
|
|
3390
|
+
{ name: 'receiptInfo', type: 'section', alias: 'Receipt Information' },
|
|
3391
|
+
{ name: 'receiptNumber', type: 'text', alias: 'Receipt Number', readonly: true, section: 'receiptInfo' },
|
|
3392
|
+
{ name: 'supplierID', type: 'select', required: true, alias: 'Supplier', section: 'receiptInfo', loadAction: { url: 'suppliers/list/x' }, detailsConfig: this.dataService.supplierDetailsConfig },
|
|
3393
|
+
{ name: 'receiptDate', type: 'date', required: true, alias: 'Receipt Date', section: 'receiptInfo' },
|
|
3394
|
+
{ name: 'supplierInvoiceNumber', type: 'text', alias: 'Supplier Invoice #', section: 'receiptInfo' },
|
|
3395
|
+
{ name: 'totals', type: 'section', alias: 'Totals' },
|
|
3396
|
+
{ name: 'totalAmount', type: 'money', alias: 'Total Amount', readonly: true, section: 'totals' },
|
|
3397
|
+
{ name: 'additionalInfo', type: 'section', alias: 'Additional Information', collapsed: true },
|
|
3398
|
+
{ name: 'notes', type: 'text', alias: 'Notes', span: true, section: 'additionalInfo' }
|
|
3399
|
+
],
|
|
3400
|
+
loadAction: { url: 'inventoryreceipts/id' },
|
|
3401
|
+
heroField: 'inventoryReceiptID'
|
|
3402
|
+
};
|
|
3403
|
+
this.inventoryReceiptEditButton = { name: 'edit', dialog: true, action: { url: 'inventoryreceipts?action=edit', method: 'post' } };
|
|
3404
|
+
this.inventoryReceiptProcessButton = { name: 'process', display: 'Process Receipt', inDialog: true, icon: { name: 'check_circle', color: 'green' }, action: { url: 'inventoryreceipts?action=process', method: 'post', successMessage: 'Receipt Processed' }, confirm: { message: 'Process this receipt? Inventory will be updated.' } }; // Changed: Added process button for edit mode only
|
|
3405
|
+
this.inventoryReceiptDetailsConfig = {
|
|
3406
|
+
formConfig: this.inventoryReceiptFormConfig,
|
|
3407
|
+
tableConfigs: [this.inventoryReceiptItemsTableConfig],
|
|
3408
|
+
heroField: 'inventoryReceiptID',
|
|
3409
|
+
buttons: [this.inventoryReceiptEditButton, this.inventoryReceiptProcessButton] // Changed: Added process button
|
|
3410
|
+
};
|
|
3411
|
+
this.inventoryReceiptViewButton = { name: 'view', dialog: true, detailsConfig: this.inventoryReceiptDetailsConfig };
|
|
3412
|
+
this.inventoryReceiptsTableConfig = {
|
|
3413
|
+
showFilter: true,
|
|
3414
|
+
flatButtons: true,
|
|
3415
|
+
minColumns: ['receiptNumber', 'supplierName', 'receiptDate'],
|
|
3416
|
+
columns: [
|
|
3417
|
+
{ name: 'receiptNumber', type: 'text', alias: 'Receipt #' },
|
|
3418
|
+
{ name: 'supplierName', type: 'text', alias: 'Supplier' },
|
|
3419
|
+
{ name: 'receiptDate', type: 'date', alias: 'Date' },
|
|
3420
|
+
{ name: 'supplierInvoiceNumber', type: 'text', alias: 'Invoice #' },
|
|
3421
|
+
{ name: 'totalAmount', type: 'money', alias: 'Total' },
|
|
3422
|
+
{ name: 'pendingApproval', type: 'checkbox', alias: 'Pending' }
|
|
3423
|
+
],
|
|
3424
|
+
buttons: [
|
|
3425
|
+
{ name: 'create', display: 'New Receipt', dialog: true, action: { url: 'inventoryreceipts?action=create', method: 'post' }, onSuccessButton: this.inventoryReceiptViewButton },
|
|
3426
|
+
{ name: 'edit', dialog: true, detailsConfig: this.inventoryReceiptDetailsConfig },
|
|
3427
|
+
{ name: 'delete', dialog: true, action: { url: 'inventoryreceipts?action=delete', method: 'post' } }
|
|
3428
|
+
],
|
|
3429
|
+
loadAction: { url: 'inventoryreceipts/all/x' },
|
|
3430
|
+
formConfig: this.inventoryReceiptFormConfig
|
|
3431
|
+
};
|
|
3432
|
+
//--------------------------Sales Orders-------------------------
|
|
3433
|
+
this.salesOrderItemFormConfig = {
|
|
3434
|
+
title: 'Sales Order Item',
|
|
3435
|
+
fields: [
|
|
3436
|
+
{ name: 'productID', type: 'select', alias: 'Product', required: true, loadAction: { url: 'products/list/x' }, detailsConfig: this.productDetailsConfig },
|
|
3437
|
+
{ name: 'quantity', type: 'number', alias: 'Quantity', required: true },
|
|
3438
|
+
{ name: 'unitPrice', type: 'money', alias: 'Unit Price', required: true },
|
|
3439
|
+
{ name: 'discount', type: 'money', alias: 'Discount' },
|
|
3440
|
+
{ name: 'lineTotal', type: 'money', alias: 'Line Total', readonly: true },
|
|
3441
|
+
{ name: 'inventoryItemID', type: 'select', alias: 'Serial Number', loadAction: { url: 'inventoryitems/list/x' } }
|
|
3442
|
+
],
|
|
3443
|
+
loadAction: { url: 'salesorderitems/id' }
|
|
3444
|
+
};
|
|
3445
|
+
this.salesOrderItemsTableConfig = {
|
|
3446
|
+
tabTitle: 'Items',
|
|
3447
|
+
showFilter: false,
|
|
3448
|
+
elevation: 'none',
|
|
3449
|
+
flatButtons: true,
|
|
3450
|
+
// showInModes: ['edit'], // Changed: Only show tab in edit mode, not during creation
|
|
3451
|
+
columns: [
|
|
3452
|
+
{ name: 'productName', type: 'text', alias: 'Product' },
|
|
3453
|
+
{ name: 'quantity', type: 'number', alias: 'Quantity' },
|
|
3454
|
+
{ name: 'unitPrice', type: 'money', alias: 'Unit Price' },
|
|
3455
|
+
{ name: 'discount', type: 'money', alias: 'Discount' },
|
|
3456
|
+
{ name: 'lineTotal', type: 'money', alias: 'Line Total' },
|
|
3457
|
+
{ name: 'serialNumber', type: 'text', alias: 'Serial Number' }
|
|
3458
|
+
],
|
|
3459
|
+
buttons: [
|
|
3460
|
+
{ name: 'create', display: 'Add Item', dialog: true, action: { url: 'salesorderitems?action=create', method: 'post' } },
|
|
3461
|
+
{ name: 'edit', dialog: true, action: { url: 'salesorderitems?action=edit', method: 'post' } },
|
|
3462
|
+
{ name: 'delete', dialog: true, action: { url: 'salesorderitems?action=delete', method: 'post' } }
|
|
3463
|
+
],
|
|
3464
|
+
loadAction: { url: 'salesorderitems/x/x' }, loadCriteria: 'order', loadIDField: 'salesOrderID',
|
|
3465
|
+
formConfig: this.salesOrderItemFormConfig
|
|
3466
|
+
};
|
|
3467
|
+
this.salesOrderFormConfig = {
|
|
3468
|
+
security: { allow: [this.dataService.capSalesOrders] },
|
|
3469
|
+
title: 'Sales Order',
|
|
3470
|
+
multiColumn: true,
|
|
3471
|
+
includeAudit: true,
|
|
3472
|
+
fields: [
|
|
3473
|
+
{ name: 'orderInfo', type: 'section', alias: 'Order Information' },
|
|
3474
|
+
{ name: 'orderNumber', type: 'text', alias: 'Order #', readonly: true, section: 'orderInfo' },
|
|
3475
|
+
{ name: 'customerID', type: 'select', alias: 'Customer', section: 'orderInfo', loadAction: { url: 'customers/list/x' }, detailsConfig: this.dataService.customerDetailsConfig },
|
|
3476
|
+
{ name: 'customerName', type: 'text', alias: 'Walk-in Customer Name', section: 'orderInfo' },
|
|
3477
|
+
{ name: 'orderDate', type: 'date', required: true, alias: 'Order Date', section: 'orderInfo' },
|
|
3478
|
+
{ name: 'requiredDate', type: 'date', alias: 'Required Date', section: 'orderInfo' },
|
|
3479
|
+
{ name: 'quickProcess', type: 'section', alias: 'Quick Processing' },
|
|
3480
|
+
{ name: 'quickDelivery', type: 'checkbox', alias: 'Quick Delivery (Skip to Delivered)', section: 'quickProcess' },
|
|
3481
|
+
{ name: 'deliveredDate', type: 'date', alias: 'Delivery Date', section: 'quickProcess' },
|
|
3482
|
+
{ name: 'status', type: 'select', alias: 'Status', readonly: true, loadAction: { url: 'salesorders/list/status' } },
|
|
3483
|
+
{ name: 'totals', type: 'section', alias: 'Totals' },
|
|
3484
|
+
{ name: 'subTotal', type: 'money', alias: 'Sub Total', readonly: true, section: 'totals' },
|
|
3485
|
+
{ name: 'discount', type: 'money', alias: 'Discount', section: 'totals' },
|
|
3486
|
+
{ name: 'totalAmount', type: 'money', alias: 'Total Amount', readonly: true, section: 'totals' },
|
|
3487
|
+
{ name: 'additionalInfo', type: 'section', alias: 'Additional Information', collapsed: true },
|
|
3488
|
+
{ name: 'notes', type: 'text', alias: 'Notes', span: true, section: 'additionalInfo' }
|
|
3489
|
+
],
|
|
3490
|
+
loadAction: { url: 'salesorders/id' },
|
|
3491
|
+
heroField: 'salesOrderID'
|
|
3492
|
+
};
|
|
3493
|
+
this.salesOrderEditButton = { name: 'edit', dialog: true, action: { url: 'salesorders?action=edit', method: 'post' } };
|
|
3494
|
+
this.salesOrderConfirmButton = { name: 'confirm', display: 'Confirm Order', icon: { name: 'check_circle', color: 'primary' }, inDialog: true, action: { url: 'salesorders?action=confirm', method: 'post', successMessage: 'Order Confirmed' }, confirm: { message: 'Confirm this order?' }, visible: (row) => row.status === 0 };
|
|
3495
|
+
this.salesOrderDeliverButton = { name: 'deliver', display: 'Mark Delivered', icon: { name: 'local_shipping', color: 'green' }, inDialog: true, action: { url: 'salesorders?action=deliver', method: 'post', successMessage: 'Order Delivered' }, confirm: { message: 'Mark this order as delivered?' }, visible: (row) => row.status === 1 };
|
|
3496
|
+
this.salesOrderDetailsConfig = {
|
|
3497
|
+
formConfig: this.salesOrderFormConfig,
|
|
3498
|
+
tableConfigs: [this.salesOrderItemsTableConfig],
|
|
3499
|
+
heroField: 'salesOrderID',
|
|
3500
|
+
buttons: [this.salesOrderEditButton, this.salesOrderConfirmButton, this.salesOrderDeliverButton]
|
|
3501
|
+
};
|
|
3502
|
+
this.salesOrderViewButton = { name: 'view', dialog: true, detailsConfig: this.salesOrderDetailsConfig };
|
|
3503
|
+
this.salesOrdersTableConfig = {
|
|
3504
|
+
showFilter: true,
|
|
3505
|
+
flatButtons: true,
|
|
3506
|
+
minColumns: ['orderNumber', 'displayCustomerName', 'orderDate'],
|
|
3507
|
+
columns: [
|
|
3508
|
+
{ name: 'orderNumber', type: 'text', alias: 'Order #' },
|
|
3509
|
+
{ name: 'displayCustomerName', type: 'text', alias: 'Customer' },
|
|
3510
|
+
{ name: 'orderDate', type: 'date', alias: 'Order Date' },
|
|
3511
|
+
{ name: 'requiredDate', type: 'date', alias: 'Required Date' },
|
|
3512
|
+
{ name: 'deliveredDate', type: 'date', alias: 'Delivered Date' },
|
|
3513
|
+
{ name: 'status', type: 'text', alias: 'Status' },
|
|
3514
|
+
{ name: 'totalAmount', type: 'money', alias: 'Total' },
|
|
3515
|
+
{ name: 'pendingApproval', type: 'checkbox', alias: 'Pending' }
|
|
3516
|
+
],
|
|
3517
|
+
buttons: [
|
|
3518
|
+
{ name: 'create', display: 'New Order', dialog: true, action: { url: 'salesorders?action=create', method: 'post' }, onSuccessButton: this.salesOrderViewButton },
|
|
3519
|
+
{ name: 'view', dialog: true, detailsConfig: this.salesOrderDetailsConfig },
|
|
3520
|
+
{ name: 'edit', dialog: true, detailsConfig: this.salesOrderDetailsConfig },
|
|
3521
|
+
{ name: 'delete', dialog: true, action: { url: 'salesorders?action=delete', method: 'post' } },
|
|
3522
|
+
this.salesOrderConfirmButton,
|
|
3523
|
+
this.salesOrderDeliverButton
|
|
3524
|
+
],
|
|
3525
|
+
loadAction: { url: 'salesorders/all/x' },
|
|
3526
|
+
formConfig: this.salesOrderFormConfig
|
|
3527
|
+
};
|
|
3528
|
+
//--------------------------Inventory Items-------------------------
|
|
3529
|
+
this.inventoryItemFormConfig = {
|
|
3530
|
+
security: { allow: [this.dataService.capInventoryItems] },
|
|
3531
|
+
title: 'Inventory Item',
|
|
3532
|
+
includeAudit: true,
|
|
3533
|
+
fields: [
|
|
3534
|
+
{ name: 'productName', type: 'text', alias: 'Product', readonly: true },
|
|
3535
|
+
{ name: 'serialNumber', type: 'text', alias: 'Serial Number', readonly: true },
|
|
3536
|
+
{ name: 'quantity', type: 'number', alias: 'Quantity', readonly: true },
|
|
3537
|
+
{ name: 'unitCost', type: 'money', alias: 'Unit Cost', readonly: true },
|
|
3538
|
+
{ name: 'totalValue', type: 'money', alias: 'Total Value', readonly: true },
|
|
3539
|
+
{ name: 'status', type: 'text', alias: 'Status', readonly: true },
|
|
3540
|
+
{ name: 'receivedDate', type: 'date', alias: 'Received Date', readonly: true }
|
|
3541
|
+
],
|
|
3542
|
+
loadAction: { url: 'inventoryitems/id' },
|
|
3543
|
+
heroField: 'inventoryItemID'
|
|
3544
|
+
};
|
|
3545
|
+
this.inventoryItemDetailsConfig = {
|
|
3546
|
+
formConfig: this.inventoryItemFormConfig,
|
|
3547
|
+
heroField: 'inventoryItemID',
|
|
3548
|
+
buttons: []
|
|
3549
|
+
};
|
|
3550
|
+
this.inventoryItemsTableConfig = {
|
|
3551
|
+
showFilter: true,
|
|
3552
|
+
flatButtons: true,
|
|
3553
|
+
minColumns: ['productName', 'serialNumber', 'quantity'],
|
|
3554
|
+
columns: [
|
|
3555
|
+
{ name: 'productName', type: 'text', alias: 'Product' },
|
|
3556
|
+
{ name: 'serialNumber', type: 'text', alias: 'Serial Number' },
|
|
3557
|
+
{ name: 'quantity', type: 'number', alias: 'Quantity' },
|
|
3558
|
+
{ name: 'unitCost', type: 'money', alias: 'Unit Cost' },
|
|
3559
|
+
{ name: 'totalValue', type: 'money', alias: 'Total Value' },
|
|
3560
|
+
{ name: 'status', type: 'text', alias: 'Status' },
|
|
3561
|
+
{ name: 'receivedDate', type: 'date', alias: 'Received Date' }
|
|
3562
|
+
],
|
|
3563
|
+
buttons: [
|
|
3564
|
+
{ name: 'view', dialog: true, detailsConfig: this.inventoryItemDetailsConfig }
|
|
3565
|
+
],
|
|
3566
|
+
loadAction: { url: 'inventoryitems/all/x' },
|
|
3567
|
+
formConfig: this.inventoryItemFormConfig
|
|
3568
|
+
};
|
|
3569
|
+
//--------------------------Inventory Adjustments-------------------------
|
|
3570
|
+
this.inventoryAdjustmentFormConfig = {
|
|
3571
|
+
security: { allow: [this.dataService.capInventoryAdjustments] },
|
|
3572
|
+
title: 'Inventory Adjustment',
|
|
3573
|
+
includeAudit: true,
|
|
3574
|
+
fields: [
|
|
3575
|
+
{ name: 'adjustmentNumber', type: 'text', alias: 'Adjustment #', readonly: true },
|
|
3576
|
+
{ name: 'productName', type: 'text', alias: 'Product', readonly: true },
|
|
3577
|
+
{ name: 'reason', type: 'text', alias: 'Reason', readonly: true },
|
|
3578
|
+
{ name: 'adjustmentQuantity', type: 'number', alias: 'Quantity', readonly: true },
|
|
3579
|
+
{ name: 'adjustmentDate', type: 'date', alias: 'Date', readonly: true },
|
|
3580
|
+
{ name: 'pendingApproval', type: 'checkbox', alias: 'Pending', readonly: true }
|
|
3581
|
+
],
|
|
3582
|
+
loadAction: { url: 'inventoryadjustments/id' },
|
|
3583
|
+
heroField: 'inventoryAdjustmentID'
|
|
3584
|
+
};
|
|
3585
|
+
this.inventoryAdjustmentDetailsConfig = {
|
|
3586
|
+
formConfig: this.inventoryAdjustmentFormConfig,
|
|
3587
|
+
heroField: 'inventoryAdjustmentID',
|
|
3588
|
+
buttons: []
|
|
3589
|
+
};
|
|
3590
|
+
this.inventoryAdjustmentsTableConfig = {
|
|
3591
|
+
showFilter: true,
|
|
3592
|
+
flatButtons: true,
|
|
3593
|
+
minColumns: ['adjustmentNumber', 'productName', 'reason'],
|
|
3594
|
+
columns: [
|
|
3595
|
+
{ name: 'adjustmentNumber', type: 'text', alias: 'Adjustment #' },
|
|
3596
|
+
{ name: 'productName', type: 'text', alias: 'Product' },
|
|
3597
|
+
{ name: 'reason', type: 'text', alias: 'Reason' },
|
|
3598
|
+
{ name: 'adjustmentQuantity', type: 'number', alias: 'Quantity' },
|
|
3599
|
+
{ name: 'adjustmentDate', type: 'date', alias: 'Date' },
|
|
3600
|
+
{ name: 'pendingApproval', type: 'checkbox', alias: 'Pending' }
|
|
3601
|
+
],
|
|
3602
|
+
buttons: [
|
|
3603
|
+
{ name: 'view', dialog: true, detailsConfig: this.inventoryAdjustmentDetailsConfig }
|
|
3604
|
+
],
|
|
3605
|
+
loadAction: { url: 'inventoryadjustments/all/x' },
|
|
3606
|
+
formConfig: this.inventoryAdjustmentFormConfig
|
|
3607
|
+
};
|
|
3608
|
+
//--------------------------Inventory Transactions-------------------------
|
|
3609
|
+
this.inventoryTransactionFormConfig = {
|
|
3610
|
+
security: { allow: [this.dataService.capInventoryTransactions] },
|
|
3611
|
+
title: 'Inventory Transaction',
|
|
3612
|
+
includeAudit: true,
|
|
3613
|
+
fields: [
|
|
3614
|
+
{ name: 'productName', type: 'text', alias: 'Product', readonly: true },
|
|
3615
|
+
{ name: 'transactionType', type: 'text', alias: 'Type', readonly: true },
|
|
3616
|
+
{ name: 'quantity', type: 'number', alias: 'Quantity', readonly: true },
|
|
3617
|
+
{ name: 'unitCost', type: 'money', alias: 'Unit Cost', readonly: true },
|
|
3618
|
+
{ name: 'totalValue', type: 'money', alias: 'Total Value', readonly: true },
|
|
3619
|
+
{ name: 'transactionDate', type: 'date', alias: 'Date', readonly: true },
|
|
3620
|
+
{ name: 'referenceType', type: 'text', alias: 'Reference', readonly: true }
|
|
3621
|
+
],
|
|
3622
|
+
loadAction: { url: 'inventorytransactions/id' },
|
|
3623
|
+
heroField: 'inventoryTransactionID'
|
|
3624
|
+
};
|
|
3625
|
+
this.inventoryTransactionDetailsConfig = {
|
|
3626
|
+
formConfig: this.inventoryTransactionFormConfig,
|
|
3627
|
+
heroField: 'inventoryTransactionID',
|
|
3628
|
+
buttons: []
|
|
3629
|
+
};
|
|
3630
|
+
this.inventoryTransactionsTableConfig = {
|
|
3631
|
+
showFilter: true,
|
|
3632
|
+
flatButtons: true,
|
|
3633
|
+
minColumns: ['productName', 'transactionType', 'quantity'],
|
|
3634
|
+
columns: [
|
|
3635
|
+
{ name: 'productName', type: 'text', alias: 'Product' },
|
|
3636
|
+
{ name: 'transactionType', type: 'text', alias: 'Type' },
|
|
3637
|
+
{ name: 'quantity', type: 'number', alias: 'Quantity' },
|
|
3638
|
+
{ name: 'unitCost', type: 'money', alias: 'Unit Cost' },
|
|
3639
|
+
{ name: 'totalValue', type: 'money', alias: 'Total Value' },
|
|
3640
|
+
{ name: 'transactionDate', type: 'date', alias: 'Date' },
|
|
3641
|
+
{ name: 'referenceType', type: 'text', alias: 'Reference' }
|
|
3642
|
+
],
|
|
3643
|
+
buttons: [
|
|
3644
|
+
{ name: 'view', dialog: true, detailsConfig: this.inventoryTransactionDetailsConfig }
|
|
3645
|
+
],
|
|
3646
|
+
loadAction: { url: 'inventorytransactions/all/x' },
|
|
3647
|
+
formConfig: this.inventoryTransactionFormConfig
|
|
3648
|
+
};
|
|
3649
|
+
// Changed: Assign productDetailsConfig in constructor
|
|
3650
|
+
this.productDetailsConfig = {
|
|
3651
|
+
formConfig: this.productFormConfig,
|
|
3652
|
+
heroField: 'productID',
|
|
3653
|
+
buttons: [this.productCreateButton, this.productEditButton, this.productDeleteButton]
|
|
3654
|
+
};
|
|
3655
|
+
}
|
|
3656
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: InventoryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3657
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: InventoryService, providedIn: 'root' }); }
|
|
3658
|
+
}
|
|
3659
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: InventoryService, decorators: [{
|
|
3660
|
+
type: Injectable,
|
|
3661
|
+
args: [{
|
|
3662
|
+
providedIn: 'root'
|
|
3663
|
+
}]
|
|
3664
|
+
}], ctorParameters: () => [] });
|
|
3665
|
+
|
|
2787
3666
|
// Functional guard for Angular 15+ (replaces deprecated class-based CanActivate)
|
|
2788
3667
|
const authGuard = (route, state) => {
|
|
2789
3668
|
const authService = inject(AuthService);
|
|
@@ -11259,6 +12138,70 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
11259
12138
|
args: [{ selector: 'spa-transactions', standalone: false, template: "<!-- Migrated from Shift src/app/home/default/fin-transactions/fin-transactions.component.html -->\r\n<spa-page [config]=\"pageConfig\"></spa-page>\r\n" }]
|
|
11260
12139
|
}] });
|
|
11261
12140
|
|
|
12141
|
+
// Invoice management component for tin-spa library
|
|
12142
|
+
class InvoicesComponent {
|
|
12143
|
+
constructor() {
|
|
12144
|
+
this.accountingService = inject(AccountingService);
|
|
12145
|
+
this.httpService = inject(HttpService);
|
|
12146
|
+
this.http = inject(HttpClient);
|
|
12147
|
+
this.messageService = inject(MessageService);
|
|
12148
|
+
this.pageConfig = {
|
|
12149
|
+
title: 'Invoices',
|
|
12150
|
+
tableConfig: this.accountingService.invoicesTableConfig
|
|
12151
|
+
};
|
|
12152
|
+
}
|
|
12153
|
+
ngOnInit() {
|
|
12154
|
+
}
|
|
12155
|
+
// Handle action click events from the table
|
|
12156
|
+
actionClicked(event) {
|
|
12157
|
+
if (event.name === 'pdf') {
|
|
12158
|
+
this.messageService.confirm(`Download Invoice ?`).subscribe((result) => {
|
|
12159
|
+
if (result == "yes") {
|
|
12160
|
+
this.download(event.data);
|
|
12161
|
+
}
|
|
12162
|
+
});
|
|
12163
|
+
}
|
|
12164
|
+
}
|
|
12165
|
+
// Download invoice as PDF
|
|
12166
|
+
download(invoice) {
|
|
12167
|
+
this.http.post(`${this.httpService.apiUrl}invoices/pdf?action=x`, invoice, { responseType: 'blob' })
|
|
12168
|
+
.subscribe((response) => {
|
|
12169
|
+
const blob = new Blob([response], { type: 'application/pdf' });
|
|
12170
|
+
const url = window.URL.createObjectURL(blob);
|
|
12171
|
+
const link = document.createElement('a');
|
|
12172
|
+
link.href = url;
|
|
12173
|
+
link.download = `Invoice_${invoice.invoiceID}.pdf`;
|
|
12174
|
+
link.click();
|
|
12175
|
+
window.URL.revokeObjectURL(url);
|
|
12176
|
+
});
|
|
12177
|
+
}
|
|
12178
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: InvoicesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12179
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: InvoicesComponent, isStandalone: false, selector: "spa-invoices", ngImport: i0, template: "<!-- Invoice management page -->\r\n<h4>Invoices</h4>\r\n<hr>\r\n<div class=\"mt-3\" style=\"font-size: 14px;\">\r\n <spa-table [config]=\"accountingService.invoicesTableConfig\" (actionClick)=\"actionClicked($event)\"></spa-table>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "component", type: TableComponent, selector: "spa-table", inputs: ["data", "tileData", "config", "reload", "activeTab", "inTab"], outputs: ["dataLoad", "actionSuccess", "refreshClick", "searchClick", "createClick", "actionClick", "inputChange", "actionResponse"] }] }); }
|
|
12180
|
+
}
|
|
12181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: InvoicesComponent, decorators: [{
|
|
12182
|
+
type: Component,
|
|
12183
|
+
args: [{ selector: 'spa-invoices', standalone: false, template: "<!-- Invoice management page -->\r\n<h4>Invoices</h4>\r\n<hr>\r\n<div class=\"mt-3\" style=\"font-size: 14px;\">\r\n <spa-table [config]=\"accountingService.invoicesTableConfig\" (actionClick)=\"actionClicked($event)\"></spa-table>\r\n</div>\r\n" }]
|
|
12184
|
+
}] });
|
|
12185
|
+
|
|
12186
|
+
// Outstanding invoices component for tin-spa library
|
|
12187
|
+
class OutstandingInvoicesComponent {
|
|
12188
|
+
constructor() {
|
|
12189
|
+
this.accountingService = inject(AccountingService);
|
|
12190
|
+
this.pageConfig = {
|
|
12191
|
+
title: 'Outstanding Invoices',
|
|
12192
|
+
tableConfig: this.accountingService.outstandingInvoicesTableConfig
|
|
12193
|
+
};
|
|
12194
|
+
}
|
|
12195
|
+
ngOnInit() {
|
|
12196
|
+
}
|
|
12197
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: OutstandingInvoicesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12198
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: OutstandingInvoicesComponent, isStandalone: false, selector: "spa-outstanding-invoices", ngImport: i0, template: "<!-- Outstanding invoices page -->\r\n<h4>Outstanding Invoices</h4>\r\n<hr>\r\n\r\n<div class=\"mt-3\" style=\"font-size: 14px;\">\r\n <spa-table [config]=\"accountingService.outstandingInvoicesTableConfig\"></spa-table>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "component", type: TableComponent, selector: "spa-table", inputs: ["data", "tileData", "config", "reload", "activeTab", "inTab"], outputs: ["dataLoad", "actionSuccess", "refreshClick", "searchClick", "createClick", "actionClick", "inputChange", "actionResponse"] }] }); }
|
|
12199
|
+
}
|
|
12200
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: OutstandingInvoicesComponent, decorators: [{
|
|
12201
|
+
type: Component,
|
|
12202
|
+
args: [{ selector: 'spa-outstanding-invoices', standalone: false, template: "<!-- Outstanding invoices page -->\r\n<h4>Outstanding Invoices</h4>\r\n<hr>\r\n\r\n<div class=\"mt-3\" style=\"font-size: 14px;\">\r\n <spa-table [config]=\"accountingService.outstandingInvoicesTableConfig\"></spa-table>\r\n</div>\r\n" }]
|
|
12203
|
+
}] });
|
|
12204
|
+
|
|
11262
12205
|
class LoanProductsComponent {
|
|
11263
12206
|
constructor() {
|
|
11264
12207
|
this.loansService = inject(LoansService);
|
|
@@ -11327,7 +12270,7 @@ class TinSpaModule {
|
|
|
11327
12270
|
TableLiteComponent, DetailsDialogLite, ApprovalsComponent, ApprovalsConfigComponent, MultiTextComponent,
|
|
11328
12271
|
MultiSelectComponent, SelectBitwiseComponent, AppModelsComponent, NotificationsConfigComponent,
|
|
11329
12272
|
HtmlComponent, NotesComponent, CapsulesComponent, CardsComponent, TabsComponent, StatusesComponent, GroupsComponent, TitleActionsComponent,
|
|
11330
|
-
AccountsComponent, TransactionTypesComponent, TransactionsComponent,
|
|
12273
|
+
AccountsComponent, TransactionTypesComponent, TransactionsComponent, InvoicesComponent, OutstandingInvoicesComponent,
|
|
11331
12274
|
LoanProductsComponent, LoansComponent, LoanPaymentsComponent], imports: [SpaMatModule,
|
|
11332
12275
|
HttpClientModule,
|
|
11333
12276
|
CurrencyInputModule,
|
|
@@ -11369,7 +12312,7 @@ class TinSpaModule {
|
|
|
11369
12312
|
HtmlComponent,
|
|
11370
12313
|
NotesComponent,
|
|
11371
12314
|
CapsulesComponent, TabsComponent, StatusesComponent, GroupsComponent, TitleActionsComponent,
|
|
11372
|
-
AccountsComponent, TransactionTypesComponent, TransactionsComponent,
|
|
12315
|
+
AccountsComponent, TransactionTypesComponent, TransactionsComponent, InvoicesComponent, OutstandingInvoicesComponent,
|
|
11373
12316
|
LoanProductsComponent, LoansComponent, LoanPaymentsComponent] }); }
|
|
11374
12317
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: TinSpaModule, providers: [
|
|
11375
12318
|
{ provide: HTTP_INTERCEPTORS, useClass: LoaderInterceptor, multi: true },
|
|
@@ -11399,7 +12342,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
11399
12342
|
TableLiteComponent, DetailsDialogLite, ApprovalsComponent, ApprovalsConfigComponent, MultiTextComponent,
|
|
11400
12343
|
MultiSelectComponent, SelectBitwiseComponent, AppModelsComponent, NotificationsConfigComponent,
|
|
11401
12344
|
HtmlComponent, NotesComponent, CapsulesComponent, CardsComponent, TabsComponent, StatusesComponent, GroupsComponent, TitleActionsComponent,
|
|
11402
|
-
AccountsComponent, TransactionTypesComponent, TransactionsComponent,
|
|
12345
|
+
AccountsComponent, TransactionTypesComponent, TransactionsComponent, InvoicesComponent, OutstandingInvoicesComponent,
|
|
11403
12346
|
LoanProductsComponent, LoansComponent, LoanPaymentsComponent
|
|
11404
12347
|
],
|
|
11405
12348
|
imports: [
|
|
@@ -11447,7 +12390,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
11447
12390
|
HtmlComponent,
|
|
11448
12391
|
NotesComponent,
|
|
11449
12392
|
CapsulesComponent, TabsComponent, StatusesComponent, GroupsComponent, TitleActionsComponent,
|
|
11450
|
-
AccountsComponent, TransactionTypesComponent, TransactionsComponent,
|
|
12393
|
+
AccountsComponent, TransactionTypesComponent, TransactionsComponent, InvoicesComponent, OutstandingInvoicesComponent,
|
|
11451
12394
|
LoanProductsComponent, LoansComponent, LoanPaymentsComponent
|
|
11452
12395
|
],
|
|
11453
12396
|
providers: [
|
|
@@ -12443,6 +13386,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
12443
13386
|
type: Input
|
|
12444
13387
|
}] } });
|
|
12445
13388
|
|
|
13389
|
+
class CategoriesComponent {
|
|
13390
|
+
constructor() {
|
|
13391
|
+
this.generalService = inject(GeneralService);
|
|
13392
|
+
this.pageConfig = {
|
|
13393
|
+
title: 'Categories',
|
|
13394
|
+
tableConfig: this.generalService.categoriesTableConfig
|
|
13395
|
+
};
|
|
13396
|
+
}
|
|
13397
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: CategoriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13398
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: CategoriesComponent, isStandalone: false, selector: "spa-categories", ngImport: i0, template: "<spa-page [config]=\"pageConfig\"></spa-page>\r\n", styles: [""], dependencies: [{ kind: "component", type: PageComponent, selector: "spa-page", inputs: ["config"], outputs: ["searchModeActivated", "searchModeDeactivated", "refreshClick", "actionClick", "actionResponse", "inputChange", "createClick", "searchClick", "dataLoad", "titleActionChange"] }] }); }
|
|
13399
|
+
}
|
|
13400
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: CategoriesComponent, decorators: [{
|
|
13401
|
+
type: Component,
|
|
13402
|
+
args: [{ selector: 'spa-categories', standalone: false, template: "<spa-page [config]=\"pageConfig\"></spa-page>\r\n" }]
|
|
13403
|
+
}] });
|
|
13404
|
+
|
|
13405
|
+
class SubCategoriesComponent {
|
|
13406
|
+
constructor() {
|
|
13407
|
+
this.generalService = inject(GeneralService);
|
|
13408
|
+
this.pageConfig = {
|
|
13409
|
+
title: 'Sub Categories',
|
|
13410
|
+
tableConfig: this.generalService.subCategoriesTableConfig
|
|
13411
|
+
};
|
|
13412
|
+
}
|
|
13413
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: SubCategoriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13414
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: SubCategoriesComponent, isStandalone: false, selector: "spa-subcategories", ngImport: i0, template: "<spa-page [config]=\"pageConfig\"></spa-page>\r\n", styles: [""], dependencies: [{ kind: "component", type: PageComponent, selector: "spa-page", inputs: ["config"], outputs: ["searchModeActivated", "searchModeDeactivated", "refreshClick", "actionClick", "actionResponse", "inputChange", "createClick", "searchClick", "dataLoad", "titleActionChange"] }] }); }
|
|
13415
|
+
}
|
|
13416
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: SubCategoriesComponent, decorators: [{
|
|
13417
|
+
type: Component,
|
|
13418
|
+
args: [{ selector: 'spa-subcategories', standalone: false, template: "<spa-page [config]=\"pageConfig\"></spa-page>\r\n" }]
|
|
13419
|
+
}] });
|
|
13420
|
+
|
|
13421
|
+
class BrandsComponent {
|
|
13422
|
+
constructor() {
|
|
13423
|
+
this.generalService = inject(GeneralService);
|
|
13424
|
+
this.pageConfig = {
|
|
13425
|
+
title: 'Brands',
|
|
13426
|
+
tableConfig: this.generalService.brandsTableConfig
|
|
13427
|
+
};
|
|
13428
|
+
}
|
|
13429
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: BrandsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13430
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: BrandsComponent, isStandalone: false, selector: "spa-brands", ngImport: i0, template: "<spa-page [config]=\"pageConfig\"></spa-page>\r\n", styles: [""], dependencies: [{ kind: "component", type: PageComponent, selector: "spa-page", inputs: ["config"], outputs: ["searchModeActivated", "searchModeDeactivated", "refreshClick", "actionClick", "actionResponse", "inputChange", "createClick", "searchClick", "dataLoad", "titleActionChange"] }] }); }
|
|
13431
|
+
}
|
|
13432
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: BrandsComponent, decorators: [{
|
|
13433
|
+
type: Component,
|
|
13434
|
+
args: [{ selector: 'spa-brands', standalone: false, template: "<spa-page [config]=\"pageConfig\"></spa-page>\r\n" }]
|
|
13435
|
+
}] });
|
|
13436
|
+
|
|
12446
13437
|
class SpaAdminModule {
|
|
12447
13438
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: SpaAdminModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
12448
13439
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.14", ngImport: i0, type: SpaAdminModule, declarations: [UsersComponent,
|
|
@@ -12450,7 +13441,10 @@ class SpaAdminModule {
|
|
|
12450
13441
|
addRoleDialog,
|
|
12451
13442
|
CreateAccountComponent,
|
|
12452
13443
|
LogsComponent,
|
|
12453
|
-
SettingsComponent
|
|
13444
|
+
SettingsComponent,
|
|
13445
|
+
CategoriesComponent,
|
|
13446
|
+
SubCategoriesComponent,
|
|
13447
|
+
BrandsComponent], imports: [i2$2.ReactiveFormsModule, CommonModule,
|
|
12454
13448
|
FormsModule,
|
|
12455
13449
|
ReactiveFormsModule,
|
|
12456
13450
|
TinSpaModule], exports: [CommonModule,
|
|
@@ -12461,7 +13455,10 @@ class SpaAdminModule {
|
|
|
12461
13455
|
addRoleDialog,
|
|
12462
13456
|
CreateAccountComponent,
|
|
12463
13457
|
LogsComponent,
|
|
12464
|
-
SettingsComponent
|
|
13458
|
+
SettingsComponent,
|
|
13459
|
+
CategoriesComponent,
|
|
13460
|
+
SubCategoriesComponent,
|
|
13461
|
+
BrandsComponent] }); }
|
|
12465
13462
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: SpaAdminModule, imports: [ReactiveFormsModule.withConfig({ warnOnNgModelWithFormControl: "never" }),
|
|
12466
13463
|
CommonModule,
|
|
12467
13464
|
FormsModule,
|
|
@@ -12480,6 +13477,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
12480
13477
|
CreateAccountComponent,
|
|
12481
13478
|
LogsComponent,
|
|
12482
13479
|
SettingsComponent,
|
|
13480
|
+
CategoriesComponent,
|
|
13481
|
+
SubCategoriesComponent,
|
|
13482
|
+
BrandsComponent
|
|
12483
13483
|
],
|
|
12484
13484
|
imports: [
|
|
12485
13485
|
ReactiveFormsModule.withConfig({ warnOnNgModelWithFormControl: "never" }),
|
|
@@ -12498,6 +13498,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
12498
13498
|
CreateAccountComponent,
|
|
12499
13499
|
LogsComponent,
|
|
12500
13500
|
SettingsComponent,
|
|
13501
|
+
CategoriesComponent,
|
|
13502
|
+
SubCategoriesComponent,
|
|
13503
|
+
BrandsComponent
|
|
12501
13504
|
],
|
|
12502
13505
|
}]
|
|
12503
13506
|
}] });
|
|
@@ -12543,6 +13546,260 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
12543
13546
|
}]
|
|
12544
13547
|
}] });
|
|
12545
13548
|
|
|
13549
|
+
// Component now uses centralized inventory service for configurations
|
|
13550
|
+
class ProductsComponent {
|
|
13551
|
+
constructor() {
|
|
13552
|
+
this.inventoryService = inject(InventoryService);
|
|
13553
|
+
this.pageConfig = {
|
|
13554
|
+
title: 'Products',
|
|
13555
|
+
tableConfig: this.inventoryService.productsTableConfig
|
|
13556
|
+
};
|
|
13557
|
+
}
|
|
13558
|
+
ngOnInit() { }
|
|
13559
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ProductsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13560
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: ProductsComponent, isStandalone: true, selector: "spa-products", ngImport: i0, template: '<spa-page [config]="pageConfig"></spa-page>', isInline: true, dependencies: [{ kind: "ngmodule", type: TinSpaModule }, { kind: "component", type: PageComponent, selector: "spa-page", inputs: ["config"], outputs: ["searchModeActivated", "searchModeDeactivated", "refreshClick", "actionClick", "actionResponse", "inputChange", "createClick", "searchClick", "dataLoad", "titleActionChange"] }] }); }
|
|
13561
|
+
}
|
|
13562
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ProductsComponent, decorators: [{
|
|
13563
|
+
type: Component,
|
|
13564
|
+
args: [{
|
|
13565
|
+
selector: 'spa-products',
|
|
13566
|
+
standalone: true,
|
|
13567
|
+
imports: [TinSpaModule],
|
|
13568
|
+
template: '<spa-page [config]="pageConfig"></spa-page>'
|
|
13569
|
+
}]
|
|
13570
|
+
}] });
|
|
13571
|
+
|
|
13572
|
+
// Component now uses centralized inventory service for configurations
|
|
13573
|
+
class InventoryItemsComponent {
|
|
13574
|
+
constructor() {
|
|
13575
|
+
this.inventoryService = inject(InventoryService);
|
|
13576
|
+
this.pageConfig = {
|
|
13577
|
+
title: 'Inventory Items',
|
|
13578
|
+
tableConfig: this.inventoryService.inventoryItemsTableConfig
|
|
13579
|
+
};
|
|
13580
|
+
}
|
|
13581
|
+
ngOnInit() { }
|
|
13582
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: InventoryItemsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13583
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: InventoryItemsComponent, isStandalone: true, selector: "spa-inventory-items", ngImport: i0, template: '<spa-page [config]="pageConfig"></spa-page>', isInline: true, dependencies: [{ kind: "ngmodule", type: TinSpaModule }, { kind: "component", type: PageComponent, selector: "spa-page", inputs: ["config"], outputs: ["searchModeActivated", "searchModeDeactivated", "refreshClick", "actionClick", "actionResponse", "inputChange", "createClick", "searchClick", "dataLoad", "titleActionChange"] }] }); }
|
|
13584
|
+
}
|
|
13585
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: InventoryItemsComponent, decorators: [{
|
|
13586
|
+
type: Component,
|
|
13587
|
+
args: [{
|
|
13588
|
+
selector: 'spa-inventory-items',
|
|
13589
|
+
template: '<spa-page [config]="pageConfig"></spa-page>',
|
|
13590
|
+
standalone: true,
|
|
13591
|
+
imports: [TinSpaModule],
|
|
13592
|
+
}]
|
|
13593
|
+
}] });
|
|
13594
|
+
|
|
13595
|
+
// Component now uses centralized inventory service for configurations
|
|
13596
|
+
class InventoryReceiptsComponent {
|
|
13597
|
+
constructor() {
|
|
13598
|
+
this.inventoryService = inject(InventoryService);
|
|
13599
|
+
this.pageConfig = {
|
|
13600
|
+
title: 'Inventory Receipts',
|
|
13601
|
+
tableConfig: this.inventoryService.inventoryReceiptsTableConfig
|
|
13602
|
+
};
|
|
13603
|
+
}
|
|
13604
|
+
ngOnInit() { }
|
|
13605
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: InventoryReceiptsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13606
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: InventoryReceiptsComponent, isStandalone: true, selector: "spa-inventory-receipts", ngImport: i0, template: '<spa-page [config]="pageConfig"></spa-page>', isInline: true, dependencies: [{ kind: "ngmodule", type: TinSpaModule }, { kind: "component", type: PageComponent, selector: "spa-page", inputs: ["config"], outputs: ["searchModeActivated", "searchModeDeactivated", "refreshClick", "actionClick", "actionResponse", "inputChange", "createClick", "searchClick", "dataLoad", "titleActionChange"] }] }); }
|
|
13607
|
+
}
|
|
13608
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: InventoryReceiptsComponent, decorators: [{
|
|
13609
|
+
type: Component,
|
|
13610
|
+
args: [{
|
|
13611
|
+
selector: 'spa-inventory-receipts',
|
|
13612
|
+
template: '<spa-page [config]="pageConfig"></spa-page>',
|
|
13613
|
+
standalone: true,
|
|
13614
|
+
imports: [TinSpaModule],
|
|
13615
|
+
}]
|
|
13616
|
+
}] });
|
|
13617
|
+
|
|
13618
|
+
// Component now uses centralized inventory service for configurations
|
|
13619
|
+
class RequisitionsComponent {
|
|
13620
|
+
constructor() {
|
|
13621
|
+
this.inventoryService = inject(InventoryService);
|
|
13622
|
+
this.pageConfig = {
|
|
13623
|
+
title: 'Requisitions',
|
|
13624
|
+
tableConfig: this.inventoryService.requisitionsTableConfig
|
|
13625
|
+
};
|
|
13626
|
+
}
|
|
13627
|
+
ngOnInit() { }
|
|
13628
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: RequisitionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13629
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: RequisitionsComponent, isStandalone: true, selector: "spa-requisitions", ngImport: i0, template: '<spa-page [config]="pageConfig"></spa-page>', isInline: true, dependencies: [{ kind: "ngmodule", type: TinSpaModule }, { kind: "component", type: PageComponent, selector: "spa-page", inputs: ["config"], outputs: ["searchModeActivated", "searchModeDeactivated", "refreshClick", "actionClick", "actionResponse", "inputChange", "createClick", "searchClick", "dataLoad", "titleActionChange"] }] }); }
|
|
13630
|
+
}
|
|
13631
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: RequisitionsComponent, decorators: [{
|
|
13632
|
+
type: Component,
|
|
13633
|
+
args: [{
|
|
13634
|
+
selector: 'spa-requisitions',
|
|
13635
|
+
template: '<spa-page [config]="pageConfig"></spa-page>',
|
|
13636
|
+
standalone: true,
|
|
13637
|
+
imports: [TinSpaModule],
|
|
13638
|
+
}]
|
|
13639
|
+
}] });
|
|
13640
|
+
|
|
13641
|
+
// Component now uses centralized inventory service for configurations
|
|
13642
|
+
class SalesOrdersComponent {
|
|
13643
|
+
constructor() {
|
|
13644
|
+
this.inventoryService = inject(InventoryService);
|
|
13645
|
+
this.pageConfig = {
|
|
13646
|
+
title: 'Sales Orders',
|
|
13647
|
+
tableConfig: this.inventoryService.salesOrdersTableConfig
|
|
13648
|
+
};
|
|
13649
|
+
}
|
|
13650
|
+
ngOnInit() { }
|
|
13651
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: SalesOrdersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13652
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: SalesOrdersComponent, isStandalone: true, selector: "spa-sales-orders", ngImport: i0, template: '<spa-page [config]="pageConfig"></spa-page>', isInline: true, dependencies: [{ kind: "ngmodule", type: TinSpaModule }, { kind: "component", type: PageComponent, selector: "spa-page", inputs: ["config"], outputs: ["searchModeActivated", "searchModeDeactivated", "refreshClick", "actionClick", "actionResponse", "inputChange", "createClick", "searchClick", "dataLoad", "titleActionChange"] }] }); }
|
|
13653
|
+
}
|
|
13654
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: SalesOrdersComponent, decorators: [{
|
|
13655
|
+
type: Component,
|
|
13656
|
+
args: [{
|
|
13657
|
+
selector: 'spa-sales-orders',
|
|
13658
|
+
template: '<spa-page [config]="pageConfig"></spa-page>',
|
|
13659
|
+
standalone: true,
|
|
13660
|
+
imports: [TinSpaModule],
|
|
13661
|
+
}]
|
|
13662
|
+
}] });
|
|
13663
|
+
|
|
13664
|
+
// Component now uses centralized inventory service for configurations
|
|
13665
|
+
class InventoryAdjustmentsComponent {
|
|
13666
|
+
constructor() {
|
|
13667
|
+
this.inventoryService = inject(InventoryService);
|
|
13668
|
+
this.pageConfig = {
|
|
13669
|
+
title: 'Inventory Adjustments',
|
|
13670
|
+
tableConfig: this.inventoryService.inventoryAdjustmentsTableConfig
|
|
13671
|
+
};
|
|
13672
|
+
}
|
|
13673
|
+
ngOnInit() { }
|
|
13674
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: InventoryAdjustmentsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13675
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: InventoryAdjustmentsComponent, isStandalone: true, selector: "spa-inventory-adjustments", ngImport: i0, template: '<spa-page [config]="pageConfig"></spa-page>', isInline: true, dependencies: [{ kind: "ngmodule", type: TinSpaModule }, { kind: "component", type: PageComponent, selector: "spa-page", inputs: ["config"], outputs: ["searchModeActivated", "searchModeDeactivated", "refreshClick", "actionClick", "actionResponse", "inputChange", "createClick", "searchClick", "dataLoad", "titleActionChange"] }] }); }
|
|
13676
|
+
}
|
|
13677
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: InventoryAdjustmentsComponent, decorators: [{
|
|
13678
|
+
type: Component,
|
|
13679
|
+
args: [{
|
|
13680
|
+
selector: 'spa-inventory-adjustments',
|
|
13681
|
+
template: '<spa-page [config]="pageConfig"></spa-page>',
|
|
13682
|
+
standalone: true,
|
|
13683
|
+
imports: [TinSpaModule],
|
|
13684
|
+
}]
|
|
13685
|
+
}] });
|
|
13686
|
+
|
|
13687
|
+
class InventoryReturnsComponent {
|
|
13688
|
+
constructor() {
|
|
13689
|
+
this.tableConfig = {
|
|
13690
|
+
showFilter: true,
|
|
13691
|
+
flatButtons: true,
|
|
13692
|
+
columns: [
|
|
13693
|
+
{ name: 'returnNumber', type: 'text', alias: 'Return #' },
|
|
13694
|
+
{ name: 'returnType', type: 'text', alias: 'Type' },
|
|
13695
|
+
{ name: 'entityName', type: 'text', alias: 'Customer/Supplier' },
|
|
13696
|
+
{ name: 'returnDate', type: 'date', alias: 'Date' },
|
|
13697
|
+
{ name: 'totalAmount', type: 'money', alias: 'Total' },
|
|
13698
|
+
{ name: 'status', type: 'text', alias: 'Status' }
|
|
13699
|
+
],
|
|
13700
|
+
buttons: [
|
|
13701
|
+
{ name: 'view', dialog: true }
|
|
13702
|
+
],
|
|
13703
|
+
loadAction: { url: 'inventoryreturns/all/x' }
|
|
13704
|
+
};
|
|
13705
|
+
this.pageConfig = {
|
|
13706
|
+
title: 'Inventory Returns',
|
|
13707
|
+
tableConfig: this.tableConfig
|
|
13708
|
+
};
|
|
13709
|
+
}
|
|
13710
|
+
ngOnInit() { }
|
|
13711
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: InventoryReturnsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13712
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: InventoryReturnsComponent, isStandalone: true, selector: "spa-inventory-returns", ngImport: i0, template: '<spa-page [config]="pageConfig"></spa-page>', isInline: true, dependencies: [{ kind: "ngmodule", type: TinSpaModule }, { kind: "component", type: PageComponent, selector: "spa-page", inputs: ["config"], outputs: ["searchModeActivated", "searchModeDeactivated", "refreshClick", "actionClick", "actionResponse", "inputChange", "createClick", "searchClick", "dataLoad", "titleActionChange"] }] }); }
|
|
13713
|
+
}
|
|
13714
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: InventoryReturnsComponent, decorators: [{
|
|
13715
|
+
type: Component,
|
|
13716
|
+
args: [{
|
|
13717
|
+
selector: 'spa-inventory-returns',
|
|
13718
|
+
template: '<spa-page [config]="pageConfig"></spa-page>',
|
|
13719
|
+
standalone: true,
|
|
13720
|
+
imports: [TinSpaModule],
|
|
13721
|
+
}]
|
|
13722
|
+
}], ctorParameters: () => [] });
|
|
13723
|
+
|
|
13724
|
+
class RequisitionReturnsComponent {
|
|
13725
|
+
constructor() {
|
|
13726
|
+
this.tableConfig = {
|
|
13727
|
+
showFilter: true,
|
|
13728
|
+
flatButtons: true,
|
|
13729
|
+
columns: [
|
|
13730
|
+
{ name: 'returnNumber', type: 'text', alias: 'Return #' },
|
|
13731
|
+
{ name: 'originalRequisitionNumber', type: 'text', alias: 'Original Requisition' },
|
|
13732
|
+
{ name: 'returningUserName', type: 'text', alias: 'Returned By' },
|
|
13733
|
+
{ name: 'returnDate', type: 'date', alias: 'Date' },
|
|
13734
|
+
{ name: 'reason', type: 'text', alias: 'Reason' }
|
|
13735
|
+
],
|
|
13736
|
+
buttons: [
|
|
13737
|
+
{ name: 'view', dialog: true }
|
|
13738
|
+
],
|
|
13739
|
+
loadAction: { url: 'requisitionreturns/all/x' }
|
|
13740
|
+
};
|
|
13741
|
+
this.pageConfig = {
|
|
13742
|
+
title: 'Requisition Returns',
|
|
13743
|
+
tableConfig: this.tableConfig
|
|
13744
|
+
};
|
|
13745
|
+
}
|
|
13746
|
+
ngOnInit() { }
|
|
13747
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: RequisitionReturnsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13748
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: RequisitionReturnsComponent, isStandalone: true, selector: "spa-requisition-returns", ngImport: i0, template: '<spa-page [config]="pageConfig"></spa-page>', isInline: true, dependencies: [{ kind: "ngmodule", type: TinSpaModule }, { kind: "component", type: PageComponent, selector: "spa-page", inputs: ["config"], outputs: ["searchModeActivated", "searchModeDeactivated", "refreshClick", "actionClick", "actionResponse", "inputChange", "createClick", "searchClick", "dataLoad", "titleActionChange"] }] }); }
|
|
13749
|
+
}
|
|
13750
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: RequisitionReturnsComponent, decorators: [{
|
|
13751
|
+
type: Component,
|
|
13752
|
+
args: [{
|
|
13753
|
+
selector: 'spa-requisition-returns',
|
|
13754
|
+
template: '<spa-page [config]="pageConfig"></spa-page>',
|
|
13755
|
+
standalone: true,
|
|
13756
|
+
imports: [TinSpaModule],
|
|
13757
|
+
}]
|
|
13758
|
+
}], ctorParameters: () => [] });
|
|
13759
|
+
|
|
13760
|
+
// Component now uses centralized inventory service for configurations
|
|
13761
|
+
class InventoryTransactionsComponent {
|
|
13762
|
+
constructor() {
|
|
13763
|
+
this.inventoryService = inject(InventoryService);
|
|
13764
|
+
this.pageConfig = {
|
|
13765
|
+
title: 'Inventory Transactions',
|
|
13766
|
+
tableConfig: this.inventoryService.inventoryTransactionsTableConfig
|
|
13767
|
+
};
|
|
13768
|
+
}
|
|
13769
|
+
ngOnInit() { }
|
|
13770
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: InventoryTransactionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13771
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: InventoryTransactionsComponent, isStandalone: true, selector: "spa-inventory-transactions", ngImport: i0, template: '<spa-page [config]="pageConfig"></spa-page>', isInline: true, dependencies: [{ kind: "ngmodule", type: TinSpaModule }, { kind: "component", type: PageComponent, selector: "spa-page", inputs: ["config"], outputs: ["searchModeActivated", "searchModeDeactivated", "refreshClick", "actionClick", "actionResponse", "inputChange", "createClick", "searchClick", "dataLoad", "titleActionChange"] }] }); }
|
|
13772
|
+
}
|
|
13773
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: InventoryTransactionsComponent, decorators: [{
|
|
13774
|
+
type: Component,
|
|
13775
|
+
args: [{
|
|
13776
|
+
selector: 'spa-inventory-transactions',
|
|
13777
|
+
template: '<spa-page [config]="pageConfig"></spa-page>',
|
|
13778
|
+
standalone: true,
|
|
13779
|
+
imports: [TinSpaModule],
|
|
13780
|
+
}]
|
|
13781
|
+
}] });
|
|
13782
|
+
|
|
13783
|
+
class InventoryDashboardComponent {
|
|
13784
|
+
constructor() {
|
|
13785
|
+
this.pageConfig = {
|
|
13786
|
+
title: 'Inventory Dashboard'
|
|
13787
|
+
};
|
|
13788
|
+
}
|
|
13789
|
+
ngOnInit() { }
|
|
13790
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: InventoryDashboardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13791
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: InventoryDashboardComponent, isStandalone: true, selector: "spa-inventory-dashboard", ngImport: i0, template: '<spa-page [config]="pageConfig"></spa-page>', isInline: true, dependencies: [{ kind: "ngmodule", type: TinSpaModule }, { kind: "component", type: PageComponent, selector: "spa-page", inputs: ["config"], outputs: ["searchModeActivated", "searchModeDeactivated", "refreshClick", "actionClick", "actionResponse", "inputChange", "createClick", "searchClick", "dataLoad", "titleActionChange"] }] }); }
|
|
13792
|
+
}
|
|
13793
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: InventoryDashboardComponent, decorators: [{
|
|
13794
|
+
type: Component,
|
|
13795
|
+
args: [{
|
|
13796
|
+
selector: 'spa-inventory-dashboard',
|
|
13797
|
+
template: '<spa-page [config]="pageConfig"></spa-page>',
|
|
13798
|
+
standalone: true,
|
|
13799
|
+
imports: [TinSpaModule],
|
|
13800
|
+
}]
|
|
13801
|
+
}], ctorParameters: () => [] });
|
|
13802
|
+
|
|
12546
13803
|
const routes$1 = [
|
|
12547
13804
|
{ path: "users", component: UsersComponent },
|
|
12548
13805
|
{ path: "roles", component: RolesComponent },
|
|
@@ -12556,6 +13813,9 @@ const routes$1 = [
|
|
|
12556
13813
|
{ path: "plans", component: PlansComponent },
|
|
12557
13814
|
{ path: "customers", component: CustomersComponent },
|
|
12558
13815
|
{ path: "suppliers", component: SuppliersComponent },
|
|
13816
|
+
{ path: "categories", component: CategoriesComponent },
|
|
13817
|
+
{ path: "subcategories", component: SubCategoriesComponent },
|
|
13818
|
+
{ path: "brands", component: BrandsComponent },
|
|
12559
13819
|
{ path: "tasks", component: TasksComponent },
|
|
12560
13820
|
{ path: "employees", component: EmployeesComponent },
|
|
12561
13821
|
{ path: "departments", component: DepartmentsComponent },
|
|
@@ -12570,9 +13830,21 @@ const routes$1 = [
|
|
|
12570
13830
|
{ path: "accounting-accounts", component: AccountsComponent },
|
|
12571
13831
|
{ path: "accounting-transaction-types", component: TransactionTypesComponent },
|
|
12572
13832
|
{ path: "accounting-transactions", component: TransactionsComponent },
|
|
13833
|
+
{ path: "accounting-invoices", component: InvoicesComponent },
|
|
13834
|
+
{ path: "accounting-outstanding-invoices", component: OutstandingInvoicesComponent },
|
|
12573
13835
|
{ path: "loans-products", component: LoanProductsComponent },
|
|
12574
13836
|
{ path: "loans", component: LoansComponent },
|
|
12575
|
-
{ path: "loans-payments", component: LoanPaymentsComponent }
|
|
13837
|
+
{ path: "loans-payments", component: LoanPaymentsComponent },
|
|
13838
|
+
{ path: "inventory-products", component: ProductsComponent },
|
|
13839
|
+
{ path: "inventory-items", component: InventoryItemsComponent },
|
|
13840
|
+
{ path: "inventory-receipts", component: InventoryReceiptsComponent },
|
|
13841
|
+
{ path: "inventory-requisitions", component: RequisitionsComponent },
|
|
13842
|
+
{ path: "inventory-sales-orders", component: SalesOrdersComponent },
|
|
13843
|
+
{ path: "inventory-adjustments", component: InventoryAdjustmentsComponent },
|
|
13844
|
+
{ path: "inventory-returns", component: InventoryReturnsComponent },
|
|
13845
|
+
{ path: "inventory-requisition-returns", component: RequisitionReturnsComponent },
|
|
13846
|
+
{ path: "inventory-transactions", component: InventoryTransactionsComponent },
|
|
13847
|
+
{ path: "inventory-dashboard", component: InventoryDashboardComponent }
|
|
12576
13848
|
];
|
|
12577
13849
|
class AdminRoutingModule {
|
|
12578
13850
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AdminRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
@@ -12655,5 +13927,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
12655
13927
|
* Generated bundle index. Do not edit.
|
|
12656
13928
|
*/
|
|
12657
13929
|
|
|
12658
|
-
export { AccountsComponent as AccountingAccountsComponent, AccountingService, TransactionTypesComponent as AccountingTransactionTypesComponent, TransactionsComponent as AccountingTransactionsComponent, Action, ActivityComponent, AdminModule, AlertComponent, AlertConfig, AlertMessage, ApiResponse, AppConfig, AttachComponent, AuthService, CapItem, CapsulesComponent, ChangePasswordComponent, CheckComponent, ChipsComponent, Constants, Core, CreateAccountComponent, CustomersComponent, DataServiceLib, DateComponent, DatetimeComponent, DepartmentsComponent, DetailsDialog, DetailsDialogConfig, DetailsDialogProcessor, DetailsSource, DialogService, EmailComponent, EmployeesComponent, ExportService, FilterComponent, FormComponent, FormConfig, GradesComponent, GroupsComponent, HtmlComponent, HttpService, IndexModule, LabelComponent, ListDialogComponent, ListDialogConfig, LoaderComponent, LoaderService, LoanPaymentsComponent, LoanProductsComponent, LoansComponent, LoansService, LogService, LoginComponent, LogsComponent, MessageService, MoneyComponent, MovementType, MultiSelectComponent, MultiTextComponent, NavMenuComponent, NotesComponent, NotesConfig, NumberComponent, OptionComponent, PageComponent, PageConfig, PositionsComponent, ProfileComponent, RecoverAccountComponent, RoleAccess, RolesComponent, SearchComponent, SearchConfig, SecurityConfig, SelectBitwiseComponent, SelectComponent, SettingsComponent, SignupComponent, SpaAdminModule, SpaIndexModule, SpaMatModule, SpaUserModule, StatusesComponent, Step, StepConfig, StepsComponent, StorageService, SuppliersComponent, TableComponent, TableConfig, TabsComponent, TasksComponent, TextComponent, TileConfig, TilesComponent, TinSpaComponent, TinSpaModule, TinSpaService, TitleActionsComponent, UserModule, UsersComponent, ViewerComponent, WelcomeComponent, addRoleDialog, authGuard, dialogOptions, messageDialog, viewerDialog };
|
|
13930
|
+
export { Account, AccountsComponent as AccountingAccountsComponent, InvoicesComponent as AccountingInvoicesComponent, OutstandingInvoicesComponent as AccountingOutstandingInvoicesComponent, AccountingService, TransactionTypesComponent as AccountingTransactionTypesComponent, TransactionsComponent as AccountingTransactionsComponent, Action, ActivityComponent, AdminModule, AlertComponent, AlertConfig, AlertMessage, ApiResponse, AppConfig, AttachComponent, AuthService, BrandsComponent, CapItem, CapsulesComponent, CategoriesComponent, ChangePasswordComponent, ChangeUserPassword, CheckComponent, ChipsComponent, Constants, Core, CreateAccountComponent, CustomersComponent, DataServiceLib, DateComponent, DatetimeComponent, DepartmentsComponent, DetailsDialog, DetailsDialogConfig, DetailsDialogProcessor, DetailsSource, DialogService, EmailComponent, EmployeesComponent, ExportService, FilterComponent, FormComponent, FormConfig, GeneralService, GradesComponent, GroupsComponent, HtmlComponent, HttpService, IndexModule, InventoryService, InvoiceStatus, LabelComponent, ListDialogComponent, ListDialogConfig, LoaderComponent, LoaderService, LoanPaymentsComponent, LoanProductsComponent, LoansComponent, LoansService, LogLevel, LogService, LoginComponent, LogsComponent, MessageService, MoneyComponent, MovementType, MultiSelectComponent, MultiTextComponent, NavMenuComponent, NotesComponent, NotesConfig, NumberComponent, OptionComponent, PageComponent, PageConfig, PositionsComponent, Profile, ProfileComponent, RecoverAccountComponent, Register, Role, RoleAccess, RolesComponent, SearchComponent, SearchConfig, SecurityConfig, SelectBitwiseComponent, SelectComponent, SettingsComponent, SignupComponent, SpaAdminModule, SpaIndexModule, SpaMatModule, SpaUserModule, StatusesComponent, Step, StepConfig, StepsComponent, StorageService, SubCategoriesComponent, SuppliersComponent, TableComponent, TableConfig, TabsComponent, TasksComponent, TextComponent, TileConfig, TilesComponent, TinSpaComponent, TinSpaModule, TinSpaService, TitleActionsComponent, User, UserModule, UsersComponent, ViewerComponent, WelcomeComponent, addRoleDialog, authGuard, dialogOptions, loginConfig, messageDialog, viewerDialog };
|
|
12659
13931
|
//# sourceMappingURL=tin-spa.mjs.map
|