@apptimate/core-lib 1.7.0 → 1.9.0
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/package.json +1 -1
- package/src/client.ts +3 -0
- package/src/constants/currencies.ts +163 -0
- package/src/constants/menus.ts +49 -2
- package/src/utils/currencyService.ts +50 -0
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
export interface ICurrencyDetails {
|
|
2
|
+
name: string;
|
|
3
|
+
code: string;
|
|
4
|
+
symbol: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const CURRENCIES: Record<string, ICurrencyDetails> = {
|
|
8
|
+
AED: { name: 'United Arab Emirates Dirham', code: 'AED', symbol: 'د.إ' },
|
|
9
|
+
AFN: { name: 'Afghan Afghani', code: 'AFN', symbol: '؋' },
|
|
10
|
+
ALL: { name: 'Albanian Lek', code: 'ALL', symbol: 'L' },
|
|
11
|
+
AMD: { name: 'Armenian Dram', code: 'AMD', symbol: '֏' },
|
|
12
|
+
ANG: { name: 'Netherlands Antillean Guilder', code: 'ANG', symbol: 'ƒ' },
|
|
13
|
+
AOA: { name: 'Angolan Kwanza', code: 'AOA', symbol: 'Kz' },
|
|
14
|
+
ARS: { name: 'Argentine Peso', code: 'ARS', symbol: '$' },
|
|
15
|
+
AUD: { name: 'Australian Dollar', code: 'AUD', symbol: '$' },
|
|
16
|
+
AWG: { name: 'Aruban Florin', code: 'AWG', symbol: 'ƒ' },
|
|
17
|
+
AZN: { name: 'Azerbaijani Manat', code: 'AZN', symbol: '₼' },
|
|
18
|
+
BAM: { name: 'Bosnia-Herzegovina Convertible Mark', code: 'BAM', symbol: 'KM' },
|
|
19
|
+
BBD: { name: 'Barbadian Dollar', code: 'BBD', symbol: '$' },
|
|
20
|
+
BDT: { name: 'Bangladeshi Taka', code: 'BDT', symbol: '৳' },
|
|
21
|
+
BGN: { name: 'Bulgarian Lev', code: 'BGN', symbol: 'лв' },
|
|
22
|
+
BHD: { name: 'Bahraini Dinar', code: 'BHD', symbol: '.د.ب' },
|
|
23
|
+
BIF: { name: 'Burundian Franc', code: 'BIF', symbol: 'FBu' },
|
|
24
|
+
BMD: { name: 'Bermudan Dollar', code: 'BMD', symbol: '$' },
|
|
25
|
+
BND: { name: 'Brunei Dollar', code: 'BND', symbol: '$' },
|
|
26
|
+
BOB: { name: 'Bolivian Boliviano', code: 'BOB', symbol: '$b' },
|
|
27
|
+
BRL: { name: 'Brazilian Real', code: 'BRL', symbol: 'R$' },
|
|
28
|
+
BSD: { name: 'Bahamian Dollar', code: 'BSD', symbol: '$' },
|
|
29
|
+
BTN: { name: 'Bhutanese Ngultrum', code: 'BTN', symbol: 'Nu.' },
|
|
30
|
+
BWP: { name: 'Botswanan Pula', code: 'BWP', symbol: 'P' },
|
|
31
|
+
BYN: { name: 'Belarusian Ruble', code: 'BYN', symbol: 'Br' },
|
|
32
|
+
BZD: { name: 'Belize Dollar', code: 'BZD', symbol: 'BZ$' },
|
|
33
|
+
CAD: { name: 'Canadian Dollar', code: 'CAD', symbol: '$' },
|
|
34
|
+
CDF: { name: 'Congolese Franc', code: 'CDF', symbol: 'FC' },
|
|
35
|
+
CHF: { name: 'Swiss Franc', code: 'CHF', symbol: 'CHF' },
|
|
36
|
+
CLP: { name: 'Chilean Peso', code: 'CLP', symbol: '$' },
|
|
37
|
+
CNY: { name: 'Chinese Yuan', code: 'CNY', symbol: '¥' },
|
|
38
|
+
COP: { name: 'Colombian Peso', code: 'COP', symbol: '$' },
|
|
39
|
+
CRC: { name: 'Costa Rican Colón', code: 'CRC', symbol: '₡' },
|
|
40
|
+
CUP: { name: 'Cuban Peso', code: 'CUP', symbol: '₱' },
|
|
41
|
+
CVE: { name: 'Cape Verdean Escudo', code: 'CVE', symbol: '$' },
|
|
42
|
+
CZK: { name: 'Czech Koruna', code: 'CZK', symbol: 'Kč' },
|
|
43
|
+
DJF: { name: 'Djiboutian Franc', code: 'DJF', symbol: 'Fdj' },
|
|
44
|
+
DKK: { name: 'Danish Krone', code: 'DKK', symbol: 'kr' },
|
|
45
|
+
DOP: { name: 'Dominican Peso', code: 'DOP', symbol: 'RD$' },
|
|
46
|
+
DZD: { name: 'Algerian Dinar', code: 'DZD', symbol: 'د.ج' },
|
|
47
|
+
EGP: { name: 'Egyptian Pound', code: 'EGP', symbol: '£' },
|
|
48
|
+
ERN: { name: 'Eritrean Nakfa', code: 'ERN', symbol: 'Nfk' },
|
|
49
|
+
ETB: { name: 'Ethiopian Birr', code: 'ETB', symbol: 'Br' },
|
|
50
|
+
EUR: { name: 'Euro', code: 'EUR', symbol: '€' },
|
|
51
|
+
FJD: { name: 'Fijian Dollar', code: 'FJD', symbol: '$' },
|
|
52
|
+
FKP: { name: 'Falkland Islands Pound', code: 'FKP', symbol: '£' },
|
|
53
|
+
GBP: { name: 'British Pound', code: 'GBP', symbol: '£' },
|
|
54
|
+
GEL: { name: 'Georgian Lari', code: 'GEL', symbol: '₾' },
|
|
55
|
+
GHS: { name: 'Ghanaian Cedi', code: 'GHS', symbol: 'GH₵' },
|
|
56
|
+
GIP: { name: 'Gibraltar Pound', code: 'GIP', symbol: '£' },
|
|
57
|
+
GMD: { name: 'Gambian Dalasi', code: 'GMD', symbol: 'D' },
|
|
58
|
+
GNF: { name: 'Guinean Franc', code: 'GNF', symbol: 'FG' },
|
|
59
|
+
GTQ: { name: 'Guatemalan Quetzal', code: 'GTQ', symbol: 'Q' },
|
|
60
|
+
GYD: { name: 'Guyanaese Dollar', code: 'GYD', symbol: '$' },
|
|
61
|
+
HKD: { name: 'Hong Kong Dollar', code: 'HKD', symbol: '$' },
|
|
62
|
+
HNL: { name: 'Honduran Lempira', code: 'HNL', symbol: 'L' },
|
|
63
|
+
HRK: { name: 'Croatian Kuna', code: 'HRK', symbol: 'kn' },
|
|
64
|
+
HTG: { name: 'Haitian Gourde', code: 'HTG', symbol: 'G' },
|
|
65
|
+
HUF: { name: 'Hungarian Forint', code: 'HUF', symbol: 'Ft' },
|
|
66
|
+
IDR: { name: 'Indonesian Rupiah', code: 'IDR', symbol: 'Rp' },
|
|
67
|
+
ILS: { name: 'Israeli New Shekel', code: 'ILS', symbol: '₪' },
|
|
68
|
+
INR: { name: 'Indian Rupee', code: 'INR', symbol: '₹' },
|
|
69
|
+
IQD: { name: 'Iraqi Dinar', code: 'IQD', symbol: 'ع.د' },
|
|
70
|
+
IRR: { name: 'Iranian Rial', code: 'IRR', symbol: '﷼' },
|
|
71
|
+
ISK: { name: 'Icelandic Króna', code: 'ISK', symbol: 'kr' },
|
|
72
|
+
JMD: { name: 'Jamaican Dollar', code: 'JMD', symbol: 'J$' },
|
|
73
|
+
JOD: { name: 'Jordanian Dinar', code: 'JOD', symbol: 'د.ا' },
|
|
74
|
+
JPY: { name: 'Japanese Yen', code: 'JPY', symbol: '¥' },
|
|
75
|
+
KES: { name: 'Kenyan Shilling', code: 'KES', symbol: 'KSh' },
|
|
76
|
+
KGS: { name: 'Kyrgystani Som', code: 'KGS', symbol: 'лв' },
|
|
77
|
+
KHR: { name: 'Cambodian Riel', code: 'KHR', symbol: '៛' },
|
|
78
|
+
KMF: { name: 'Comorian Franc', code: 'KMF', symbol: 'CF' },
|
|
79
|
+
KPW: { name: 'North Korean Won', code: 'KPW', symbol: '₩' },
|
|
80
|
+
KRW: { name: 'South Korean Won', code: 'KRW', symbol: '₩' },
|
|
81
|
+
KWD: { name: 'Kuwaiti Dinar', code: 'KWD', symbol: 'د.ك' },
|
|
82
|
+
KYD: { name: 'Cayman Islands Dollar', code: 'KYD', symbol: '$' },
|
|
83
|
+
KZT: { name: 'Kazakhstani Tenge', code: 'KZT', symbol: '₸' },
|
|
84
|
+
LAK: { name: 'Laotian Kip', code: 'LAK', symbol: '₭' },
|
|
85
|
+
LBP: { name: 'Lebanese Pound', code: 'LBP', symbol: '£' },
|
|
86
|
+
LKR: { name: 'Sri Lankan Rupee', code: 'LKR', symbol: 'Rs' },
|
|
87
|
+
LRD: { name: 'Liberian Dollar', code: 'LRD', symbol: '$' },
|
|
88
|
+
LSL: { name: 'Lesotho Loti', code: 'LSL', symbol: 'L' },
|
|
89
|
+
LYD: { name: 'Libyan Dinar', code: 'LYD', symbol: 'ل.د' },
|
|
90
|
+
MAD: { name: 'Moroccan Dirham', code: 'MAD', symbol: 'د.م.' },
|
|
91
|
+
MDL: { name: 'Moldovan Leu', code: 'MDL', symbol: 'L' },
|
|
92
|
+
MGA: { name: 'Malagasy Ariary', code: 'MGA', symbol: 'Ar' },
|
|
93
|
+
MKD: { name: 'Macedonian Denar', code: 'MKD', symbol: 'ден' },
|
|
94
|
+
MMK: { name: 'Myanmar Kyat', code: 'MMK', symbol: 'K' },
|
|
95
|
+
MNT: { name: 'Mongolian Tugrik', code: 'MNT', symbol: '₮' },
|
|
96
|
+
MOP: { name: 'Macanese Pataca', code: 'MOP', symbol: 'MOP$' },
|
|
97
|
+
MRU: { name: 'Mauritanian Ouguiya', code: 'MRU', symbol: 'UM' },
|
|
98
|
+
MUR: { name: 'Mauritian Rupee', code: 'MUR', symbol: '₨' },
|
|
99
|
+
MVR: { name: 'Maldivian Rufiyaa', code: 'MVR', symbol: 'Rf' },
|
|
100
|
+
MWK: { name: 'Malawian Kwacha', code: 'MWK', symbol: 'MK' },
|
|
101
|
+
MXN: { name: 'Mexican Peso', code: 'MXN', symbol: '$' },
|
|
102
|
+
MYR: { name: 'Malaysian Ringgit', code: 'MYR', symbol: 'RM' },
|
|
103
|
+
MZN: { name: 'Mozambican Metical', code: 'MZN', symbol: 'MT' },
|
|
104
|
+
NAD: { name: 'Namibian Dollar', code: 'NAD', symbol: '$' },
|
|
105
|
+
NGN: { name: 'Nigerian Naira', code: 'NGN', symbol: '₦' },
|
|
106
|
+
NIO: { name: 'Nicaraguan Córdoba', code: 'NIO', symbol: 'C$' },
|
|
107
|
+
NOK: { name: 'Norwegian Krone', code: 'NOK', symbol: 'kr' },
|
|
108
|
+
NPR: { name: 'Nepalese Rupee', code: 'NPR', symbol: '₨' },
|
|
109
|
+
NZD: { name: 'New Zealand Dollar', code: 'NZD', symbol: '$' },
|
|
110
|
+
OMR: { name: 'Omani Rial', code: 'OMR', symbol: 'ر.ع.' },
|
|
111
|
+
PAB: { name: 'Panamanian Balboa', code: 'PAB', symbol: 'B/.' },
|
|
112
|
+
PEN: { name: 'Peruvian Sol', code: 'PEN', symbol: 'S/.' },
|
|
113
|
+
PGK: { name: 'Papua New Guinean Kina', code: 'PGK', symbol: 'K' },
|
|
114
|
+
PHP: { name: 'Philippine Peso', code: 'PHP', symbol: '₱' },
|
|
115
|
+
PKR: { name: 'Pakistani Rupee', code: 'PKR', symbol: '₨' },
|
|
116
|
+
PLN: { name: 'Polish Zloty', code: 'PLN', symbol: 'zł' },
|
|
117
|
+
PYG: { name: 'Paraguayan Guarani', code: 'PYG', symbol: 'Gs' },
|
|
118
|
+
QAR: { name: 'Qatari Rial', code: 'QAR', symbol: 'ر.ق' },
|
|
119
|
+
RON: { name: 'Romanian Leu', code: 'RON', symbol: 'lei' },
|
|
120
|
+
RSD: { name: 'Serbian Dinar', code: 'RSD', symbol: 'Дин.' },
|
|
121
|
+
RUB: { name: 'Russian Ruble', code: 'RUB', symbol: '₽' },
|
|
122
|
+
RWF: { name: 'Rwandan Franc', code: 'RWF', symbol: 'FRw' },
|
|
123
|
+
SAR: { name: 'Saudi Riyal', code: 'SAR', symbol: 'ر.س' },
|
|
124
|
+
SBD: { name: 'Solomon Islands Dollar', code: 'SBD', symbol: '$' },
|
|
125
|
+
SCR: { name: 'Seychellois Rupee', code: 'SCR', symbol: '₨' },
|
|
126
|
+
SDG: { name: 'Sudanese Pound', code: 'SDG', symbol: 'ج.س.' },
|
|
127
|
+
SEK: { name: 'Swedish Krona', code: 'SEK', symbol: 'kr' },
|
|
128
|
+
SGD: { name: 'Singapore Dollar', code: 'SGD', symbol: 'S$' },
|
|
129
|
+
SHP: { name: 'Saint Helena Pound', code: 'SHP', symbol: '£' },
|
|
130
|
+
SLL: { name: 'Sierra Leonean Leone', code: 'SLL', symbol: 'Le' },
|
|
131
|
+
SOS: { name: 'Somali Shilling', code: 'SOS', symbol: 'S' },
|
|
132
|
+
SRD: { name: 'Surinamese Dollar', code: 'SRD', symbol: '$' },
|
|
133
|
+
SSP: { name: 'South Sudanese Pound', code: 'SSP', symbol: '£' },
|
|
134
|
+
STN: { name: 'São Tomé & Príncipe Dobra', code: 'STN', symbol: 'Db' },
|
|
135
|
+
SYP: { name: 'Syrian Pound', code: 'SYP', symbol: '£' },
|
|
136
|
+
SZL: { name: 'Swazi Lilangeni', code: 'SZL', symbol: 'L' },
|
|
137
|
+
THB: { name: 'Thai Baht', code: 'THB', symbol: '฿' },
|
|
138
|
+
TJS: { name: 'Tajikistani Somoni', code: 'TJS', symbol: 'SM' },
|
|
139
|
+
TMT: { name: 'Turkmenistani Manat', code: 'TMT', symbol: 'T' },
|
|
140
|
+
TND: { name: 'Tunisian Dinar', code: 'TND', symbol: 'د.ت' },
|
|
141
|
+
TOP: { name: 'Tongan Paʻanga', code: 'TOP', symbol: 'T$' },
|
|
142
|
+
TRY: { name: 'Turkish Lira', code: 'TRY', symbol: '₺' },
|
|
143
|
+
TTD: { name: 'Trinidad & Tobago Dollar', code: 'TTD', symbol: 'TT$' },
|
|
144
|
+
TWD: { name: 'New Taiwan Dollar', code: 'TWD', symbol: 'NT$' },
|
|
145
|
+
TZS: { name: 'Tanzanian Shilling', code: 'TZS', symbol: 'TSh' },
|
|
146
|
+
UAH: { name: 'Ukrainian Hryvnia', code: 'UAH', symbol: '₴' },
|
|
147
|
+
UGX: { name: 'Ugandan Shilling', code: 'UGX', symbol: 'USh' },
|
|
148
|
+
USD: { name: 'US Dollar', code: 'USD', symbol: '$' },
|
|
149
|
+
UYU: { name: 'Uruguayan Peso', code: 'UYU', symbol: '$U' },
|
|
150
|
+
UZS: { name: 'Uzbekistani Som', code: 'UZS', symbol: 'лв' },
|
|
151
|
+
VES: { name: 'Venezuelan Bolívar', code: 'VES', symbol: 'Bs.S.' },
|
|
152
|
+
VND: { name: 'Vietnamese Dong', code: 'VND', symbol: '₫' },
|
|
153
|
+
VUV: { name: 'Vanuatu Vatu', code: 'VUV', symbol: 'VT' },
|
|
154
|
+
WST: { name: 'Samoan Tala', code: 'WST', symbol: 'WS$' },
|
|
155
|
+
XAF: { name: 'CFA Franc BEAC', code: 'XAF', symbol: 'FCFA' },
|
|
156
|
+
XCD: { name: 'East Caribbean Dollar', code: 'XCD', symbol: '$' },
|
|
157
|
+
XOF: { name: 'CFA Franc BCEAO', code: 'XOF', symbol: 'CFA' },
|
|
158
|
+
XPF: { name: 'CFP Franc', code: 'XPF', symbol: '₣' },
|
|
159
|
+
YER: { name: 'Yemeni Rial', code: 'YER', symbol: '﷼' },
|
|
160
|
+
ZAR: { name: 'South African Rand', code: 'ZAR', symbol: 'R' },
|
|
161
|
+
ZMW: { name: 'Zambian Kwacha', code: 'ZMW', symbol: 'ZK' },
|
|
162
|
+
ZWL: { name: 'Zimbabwean Dollar', code: 'ZWL', symbol: '$' }
|
|
163
|
+
};
|
package/src/constants/menus.ts
CHANGED
|
@@ -70,8 +70,10 @@ export const MENU_ITEM_REGISTRY: RegistryItem[] = [
|
|
|
70
70
|
{ key: 'core__feature_registry', label: 'Feature Registry', path: '/system/features', module: 'Core', defaultGroup: 'System Auditing' },
|
|
71
71
|
{ key: 'core__menu_config', label: 'Menu Configuration', path: '/menu-config', module: 'Core', defaultGroup: 'System' },
|
|
72
72
|
{ key: 'core__printables', label: 'Printable Templates', path: '/system/printables', module: 'Core', defaultGroup: 'System' },
|
|
73
|
+
{ key: 'core__template_groups', label: 'Template Groups', path: '/system/template-groups', module: 'Core', defaultGroup: 'System' },
|
|
73
74
|
{ key: 'core__warehouses', label: 'Warehouses', path: '/warehouses', module: 'Core', defaultGroup: 'Resources' },
|
|
74
75
|
{ key: 'core__terminals', label: 'Terminals', path: '/terminals', module: 'Core', defaultGroup: 'Resources' },
|
|
76
|
+
{ key: 'core__currencies', label: 'Currencies', path: '/currencies', module: 'Core', defaultGroup: 'Settings' },
|
|
75
77
|
|
|
76
78
|
// ── Inventory Module ──
|
|
77
79
|
{ key: 'inventory__items', label: 'Items', path: '/inventory/items', module: 'Inventory', defaultGroup: 'Catalog' },
|
|
@@ -113,6 +115,7 @@ export const MENU_ITEM_REGISTRY: RegistryItem[] = [
|
|
|
113
115
|
{ key: 'finance__profit_loss', label: 'Profit & Loss', path: '/finance/reports/profit-loss', module: 'Finance', defaultGroup: 'Reports' },
|
|
114
116
|
{ key: 'finance__balance_sheet', label: 'Balance Sheet', path: '/finance/reports/balance-sheet', module: 'Finance', defaultGroup: 'Reports' },
|
|
115
117
|
{ key: 'finance__account_ledger', label: 'Account Ledger', path: '/finance/reports/account-ledger', module: 'Finance', defaultGroup: 'Reports' },
|
|
118
|
+
{ key: 'finance__party_statement', label: 'Party Statement', path: '/finance/reports/party-statement', module: 'Finance', defaultGroup: 'Reports' },
|
|
116
119
|
{ key: 'finance__payment_modes', label: 'Payment Modes', path: '/finance/payment-modes', module: 'Finance', defaultGroup: 'Settings' },
|
|
117
120
|
{ key: 'finance__bank_accounts', label: 'Bank Accounts', path: '/finance/bank-accounts', module: 'Finance', defaultGroup: 'Settings' },
|
|
118
121
|
{ key: 'finance__account_mappings', label: 'Account Mappings', path: '/finance/account-mappings', module: 'Finance', defaultGroup: 'Settings' },
|
|
@@ -140,9 +143,25 @@ export const MENU_ITEM_REGISTRY: RegistryItem[] = [
|
|
|
140
143
|
{ key: 'jewelry__party_transactions', label: 'Party Transactions', path: '/jewelry/party-transactions', module: 'Jewelry', defaultGroup: 'Karigar' },
|
|
141
144
|
{ key: 'jewelry__karigar_scrap_returns', label: 'Karigar Dust Returns', path: '/jewelry/karigar-scrap-returns', module: 'Jewelry', defaultGroup: 'Karigar' },
|
|
142
145
|
{ key: 'jewelry__karigar_making_charges', label: 'Making Charges', path: '/jewelry/karigar-making-charges', module: 'Jewelry', defaultGroup: 'Karigar' },
|
|
146
|
+
{ key: 'jewelry__party_metal_balances', label: 'Party Metal Balances', path: '/jewelry/party-metal-balances', module: 'Jewelry', defaultGroup: 'Karigar' },
|
|
143
147
|
{ key: 'jewelry__settings', label: 'Settings', path: '/jewelry/settings', module: 'Jewelry', defaultGroup: 'Configuration' },
|
|
144
148
|
{ key: 'jewelry__reports', label: 'Reports & Dashboards', path: '/reports/jewelry', module: 'Jewelry', defaultGroup: 'Analytics' },
|
|
145
149
|
|
|
150
|
+
// ── HR Module ──
|
|
151
|
+
{ key: 'hr__employees', label: 'Employees', path: '/hr/employees', module: 'HR', defaultGroup: 'Core' },
|
|
152
|
+
{ key: 'hr__directory', label: 'Directory', path: '/hr/directory', module: 'HR', defaultGroup: 'Core' },
|
|
153
|
+
{ key: 'hr__org_chart', label: 'Org Chart', path: '/hr/org-chart', module: 'HR', defaultGroup: 'Core' },
|
|
154
|
+
|
|
155
|
+
{ key: 'hr__attendance', label: 'Attendance', path: '/hr/attendance', module: 'HR', defaultGroup: 'Time' },
|
|
156
|
+
{ key: 'hr__regularisation', label: 'Regularisation', path: '/hr/regularisation', module: 'HR', defaultGroup: 'Time' },
|
|
157
|
+
{ key: 'hr__shift_templates', label: 'Shift Templates', path: '/hr/shift-templates', module: 'HR', defaultGroup: 'Time' },
|
|
158
|
+
{ key: 'hr__rosters', label: 'Roster Builder', path: '/hr/rosters', module: 'HR', defaultGroup: 'Time' },
|
|
159
|
+
{ key: 'hr__shift_exchanges', label: 'Shift Exchanges', path: '/hr/shift-exchanges', module: 'HR', defaultGroup: 'Time' },
|
|
160
|
+
{ key: 'hr__shift_allowances', label: 'Shift Allowances', path: '/hr/shift-allowances', module: 'HR', defaultGroup: 'Time' },
|
|
161
|
+
{ key: 'hr__leave_types', label: 'Leave Types', path: '/hr/leave-types', module: 'HR', defaultGroup: 'Time' },
|
|
162
|
+
{ key: 'hr__holidays', label: 'Holidays', path: '/hr/holidays', module: 'HR', defaultGroup: 'Time' },
|
|
163
|
+
{ key: 'hr__leave', label: 'Leave Management', path: '/hr/leave', module: 'HR', defaultGroup: 'Time' },
|
|
164
|
+
{ key: 'hr__designations', label: 'Designations', path: '/hr/designations', module: 'HR', defaultGroup: 'Admin' },
|
|
146
165
|
// ── Money Exchange Module ──
|
|
147
166
|
{ key: 'money_exchange__dashboard', label: 'Dashboard', path: '/money-exchange', module: 'Money Exchange', defaultGroup: 'Overview' },
|
|
148
167
|
{ key: 'money_exchange__rates', label: 'Rates Management', path: '/money-exchange/rates', module: 'Money Exchange', defaultGroup: 'Overview' },
|
|
@@ -155,6 +174,7 @@ export const MENU_ITEM_REGISTRY: RegistryItem[] = [
|
|
|
155
174
|
{ key: 'money_exchange__remittance_corridors', label: 'Corridors', path: '/money-exchange/corridors', module: 'Money Exchange', defaultGroup: 'Remittances' },
|
|
156
175
|
{ key: 'money_exchange__remittances', label: 'Transactions', path: '/money-exchange/remittances', module: 'Money Exchange', defaultGroup: 'Remittances' },
|
|
157
176
|
{ key: 'money_exchange__remittance_settlements', label: 'Settlements', path: '/money-exchange/settlements', module: 'Money Exchange', defaultGroup: 'Remittances' },
|
|
177
|
+
{ key: 'money_exchange__denominations', label: 'Denomination', path: '/money-exchange/denominations', module: 'Money Exchange', defaultGroup: 'Config' },
|
|
158
178
|
];
|
|
159
179
|
|
|
160
180
|
/**
|
|
@@ -238,7 +258,7 @@ export const MENU_PRESETS: MenuPreset[] = [
|
|
|
238
258
|
'core__warehouses', 'core__terminals',
|
|
239
259
|
'core__activity_logs', 'core__api_requests', 'core__feature_access_logs',
|
|
240
260
|
'core__issue_logs', 'core__feature_registry', 'core__menu_config',
|
|
241
|
-
'core__printables',
|
|
261
|
+
'core__printables', 'core__template_groups', 'core__currencies',
|
|
242
262
|
],
|
|
243
263
|
},
|
|
244
264
|
{
|
|
@@ -278,7 +298,7 @@ export const MENU_PRESETS: MenuPreset[] = [
|
|
|
278
298
|
secondaryItems: [
|
|
279
299
|
'finance__invoices', 'finance__payments', 'finance__transaction_ledger',
|
|
280
300
|
'finance__chart_of_accounts', 'finance__journal_entries', 'finance__fiscal_years',
|
|
281
|
-
'finance__trial_balance', 'finance__profit_loss', 'finance__balance_sheet', 'finance__account_ledger',
|
|
301
|
+
'finance__trial_balance', 'finance__profit_loss', 'finance__balance_sheet', 'finance__account_ledger', 'finance__party_statement',
|
|
282
302
|
'finance__payment_modes', 'finance__bank_accounts', 'finance__bank_statements', 'finance__account_mappings',
|
|
283
303
|
],
|
|
284
304
|
},
|
|
@@ -296,10 +316,19 @@ export const MENU_PRESETS: MenuPreset[] = [
|
|
|
296
316
|
'jewelry__party_transactions',
|
|
297
317
|
'jewelry__karigar_scrap_returns',
|
|
298
318
|
'jewelry__karigar_making_charges',
|
|
319
|
+
'jewelry__party_metal_balances',
|
|
299
320
|
'jewelry__reports',
|
|
300
321
|
'jewelry__settings',
|
|
301
322
|
],
|
|
302
323
|
},
|
|
324
|
+
{
|
|
325
|
+
id: 'hr',
|
|
326
|
+
label: 'HR',
|
|
327
|
+
iconName: 'Users',
|
|
328
|
+
secondaryItems: [
|
|
329
|
+
'hr__employees', 'hr__directory', 'hr__org_chart', 'hr__attendance', 'hr__regularisation', 'hr__shifts', 'hr__shift_templates', 'hr__rosters', 'hr__shift_exchanges', 'hr__shift_allowances', 'hr__leave_types', 'hr__holidays', 'hr__leave', 'hr__designations'
|
|
330
|
+
]
|
|
331
|
+
},
|
|
303
332
|
{
|
|
304
333
|
id: 'money_exchange',
|
|
305
334
|
label: 'Money Exchange',
|
|
@@ -316,6 +345,7 @@ export const MENU_PRESETS: MenuPreset[] = [
|
|
|
316
345
|
'money_exchange__remittance_corridors',
|
|
317
346
|
'money_exchange__remittances',
|
|
318
347
|
'money_exchange__remittance_settlements',
|
|
348
|
+
'money_exchange__denominations',
|
|
319
349
|
],
|
|
320
350
|
},
|
|
321
351
|
],
|
|
@@ -348,6 +378,7 @@ export const APP_MENUS: MainMenuItem[] = [
|
|
|
348
378
|
items: [
|
|
349
379
|
{ id: "menu_config", label: "Menu Configuration", path: "/menu-config" },
|
|
350
380
|
{ id: "printables", label: "Printable Templates", path: "/system/printables" },
|
|
381
|
+
{ id: "template_groups", label: "Template Groups", path: "/system/template-groups" },
|
|
351
382
|
],
|
|
352
383
|
},
|
|
353
384
|
{
|
|
@@ -369,6 +400,13 @@ export const APP_MENUS: MainMenuItem[] = [
|
|
|
369
400
|
{ id: "feature_registry", label: "Feature Registry", path: "/system/features" },
|
|
370
401
|
],
|
|
371
402
|
},
|
|
403
|
+
{
|
|
404
|
+
id: "core_settings",
|
|
405
|
+
label: "Settings",
|
|
406
|
+
items: [
|
|
407
|
+
{ id: "currencies", label: "Currencies", path: "/currencies" },
|
|
408
|
+
],
|
|
409
|
+
},
|
|
372
410
|
],
|
|
373
411
|
},
|
|
374
412
|
{
|
|
@@ -517,6 +555,7 @@ export const APP_MENUS: MainMenuItem[] = [
|
|
|
517
555
|
{ id: "profit_loss", label: "Profit & Loss", path: "/finance/reports/profit-loss" },
|
|
518
556
|
{ id: "balance_sheet", label: "Balance Sheet", path: "/finance/reports/balance-sheet" },
|
|
519
557
|
{ id: "account_ledger", label: "Account Ledger", path: "/finance/reports/account-ledger" },
|
|
558
|
+
{ id: "party_statement", label: "Party Statement", path: "/finance/reports/party-statement" },
|
|
520
559
|
],
|
|
521
560
|
},
|
|
522
561
|
{
|
|
@@ -596,6 +635,7 @@ export const APP_MENUS: MainMenuItem[] = [
|
|
|
596
635
|
{ id: "party_transactions", label: "Party Transactions", path: "/jewelry/party-transactions" },
|
|
597
636
|
{ id: "karigar_scrap_returns", label: "Karigar Dust Returns", path: "/jewelry/karigar-scrap-returns" },
|
|
598
637
|
{ id: "karigar_making_charges", label: "Making Charges", path: "/jewelry/karigar-making-charges" },
|
|
638
|
+
{ id: "party_metal_balances", label: "Party Metal Balances", path: "/jewelry/party-metal-balances" },
|
|
599
639
|
],
|
|
600
640
|
},
|
|
601
641
|
{
|
|
@@ -691,6 +731,13 @@ export const APP_MENUS: MainMenuItem[] = [
|
|
|
691
731
|
{ id: "money_exchange_remittance_settlements", label: "Settlements", path: "/money-exchange/settlements" },
|
|
692
732
|
],
|
|
693
733
|
},
|
|
734
|
+
{
|
|
735
|
+
id: "money_exchange_config",
|
|
736
|
+
label: "Config",
|
|
737
|
+
items: [
|
|
738
|
+
{ id: "money_exchange_denominations", label: "Denomination", path: "/money-exchange/denominations" },
|
|
739
|
+
],
|
|
740
|
+
},
|
|
694
741
|
],
|
|
695
742
|
},
|
|
696
743
|
];
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { CURRENCIES, type ICurrencyDetails } from '../constants/currencies';
|
|
2
|
+
import { sendRequest } from './httpClient';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Retrieve the active/used currency based on the backend configuration.
|
|
6
|
+
*/
|
|
7
|
+
export async function getUsedCurrency(): Promise<ICurrencyDetails | null> {
|
|
8
|
+
try {
|
|
9
|
+
const response = await sendRequest<any>({
|
|
10
|
+
url: `${process.env.NEXT_PUBLIC_API_URL}/api/core/config/used_currency`,
|
|
11
|
+
method: 'GET',
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
if (response.ok && response.responseData.is_success && response.responseData.result) {
|
|
15
|
+
const currency = response.responseData.result;
|
|
16
|
+
|
|
17
|
+
// Return from database core_currencies row directly
|
|
18
|
+
if (currency && typeof currency === 'object' && currency.code) {
|
|
19
|
+
return {
|
|
20
|
+
name: currency.name || currency.code,
|
|
21
|
+
code: currency.code,
|
|
22
|
+
symbol: currency.symbol || currency.code,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return getCurrency(currency as string);
|
|
27
|
+
}
|
|
28
|
+
} catch (error) {
|
|
29
|
+
console.error('Failed to fetch used currency:', error);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Retrieve metadata details (name, code, symbol) for a currency by its ISO code.
|
|
38
|
+
*/
|
|
39
|
+
export function getCurrency(code: string): ICurrencyDetails | null {
|
|
40
|
+
if (!code) return null;
|
|
41
|
+
return CURRENCIES[code.toUpperCase()] || null;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Retrieve the symbol for a currency by its ISO code. Falls back to returning the code if not found.
|
|
46
|
+
*/
|
|
47
|
+
export function getCurrencySymbol(code: string): string {
|
|
48
|
+
if (!code) return '';
|
|
49
|
+
return CURRENCIES[code.toUpperCase()]?.symbol || code;
|
|
50
|
+
}
|