Skip to content

refactor(idurar-erp-crm): remove unused utils helpers and dead Redux crud selectors#692

Draft
augmentcode[bot] wants to merge 1 commit into
mainfrom
hammads-turing/remove-dead-utils-selectors
Draft

refactor(idurar-erp-crm): remove unused utils helpers and dead Redux crud selectors#692
augmentcode[bot] wants to merge 1 commit into
mainfrom
hammads-turing/remove-dead-utils-selectors

Conversation

@augmentcode
Copy link
Copy Markdown

@augmentcode augmentcode Bot commented May 22, 2026

PR Author Agent

Summary

Pure dead-code removal in idurar-erp-crm/frontend — no behaviour changes, no new dependencies.

frontend/src/utils

File Change
tagColor.js Deleted — never imported anywhere in the codebase
helpers.js Removed has, toFormData, formatDate, isDate, formatDatetime, and the Object.byString prototype side-effect; kept valueByString and validatePhoneNumber (both imported)
valueType.js Kept only isObject (used in useNetwork.jsx); removed isFunction, isString, isBoolean, isNumber, isUndef
color.js Removed the selectColor named export (nothing imports it); default color array kept
dataStructure.jsx Removed the unexported getRandomColor helper (defined but never called)

frontend/src/redux/crud/selectors.js

Removed selectItemById and selectReadItem — confirmed by grep that no file in the frontend imports either from this module. (The same-named selectors in redux/erp/selectors.js are actively used and untouched.)

Verification

After the removals, the following grep queries return zero results in frontend/src/:

from.*utils/tagColor
selectItemById.*crud  |  selectReadItem.*crud (in imports)
selectColor
getRandomColor
toFormData | formatDatetime | export.*isDate | export.*formatDate
isFunction | isBoolean | isNumber | isUndef

All existing imports (valueByString, validatePhoneNumber, isObject, isBrowser, tagColor from statusTagColor, calculate, color, countryList, currencyList, dataForTable, dataForRead) continue to resolve correctly.


Pull Request opened by Augment Code | View session

…crud selectors

- Delete utils/tagColor.js — never imported anywhere
- helpers.js: remove has, toFormData, formatDate, isDate, formatDatetime,
  and Object.byString side-effect (only valueByString and validatePhoneNumber are used)
- valueType.js: keep only isObject (only consumer); drop isFunction, isString,
  isBoolean, isNumber, isUndef
- color.js: drop selectColor named export (only default color array is imported)
- dataStructure.jsx: drop unexported getRandomColor helper (dead internal code)
- redux/crud/selectors.js: remove selectItemById and selectReadItem
  (neither is imported anywhere in the codebase; erp equivalents are active)
@augmentcode
Copy link
Copy Markdown
Author

augmentcode Bot commented May 22, 2026

PR Author Agent

👋 I've got this PR — here's what I'll handle for you:

  • Review feedback — implement suggestions, answer questions, fix what comes up
  • CI failures — I get pinged when checks fail and try to fix them
  • Merge conflicts — bring the PR back up to date when it falls behind
  • Merge gates — watch CI, reviews, and verification
  • Ping you the moment it's ready to merge

Marking it ready and picking reviewers are your call — I'll leave both alone.

Drop a comment anytime!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant