Remove duplicate utility code via shared formatting module
Consolidate MONTH_NAMES, PALETTE, formatCurrency, formatCurrencyShort, ordinal, and fmt into client/src/utils/formatting.js. Consolidate CONFIG_KEYS into server/src/constants.js. All consumer files updated to import from these shared modules. PaycheckView re-exports formatCurrency, ordinal, and formatPayDate for backward compatibility with existing tests. Nightshift-Task: dead-code Nightshift-Ref: https://github.com/marcus/nightshift
This commit is contained in:
12
server/src/constants.js
Normal file
12
server/src/constants.js
Normal file
@@ -0,0 +1,12 @@
|
||||
'use strict';
|
||||
|
||||
const CONFIG_KEYS = [
|
||||
'paycheck1_day',
|
||||
'paycheck2_day',
|
||||
'paycheck1_gross',
|
||||
'paycheck1_net',
|
||||
'paycheck2_gross',
|
||||
'paycheck2_net',
|
||||
];
|
||||
|
||||
module.exports = { CONFIG_KEYS };
|
||||
Reference in New Issue
Block a user