A simple, offline-first web application designed to help manage and count telecom inventory items, with specific features for handling reels and calculating footage. Built with vanilla JavaScript, HTML, and CSS, using IndexedDB for local storage.
(Note: This is a client-side only application. All data is stored locally in your browser's IndexedDB database.)
This tool provides a user-friendly interface for:
- Maintaining a list of inventory items (SKU, Description, Location, Reel Number).
- Managing inventory count cycles using CSV imports to define what needs counting.
- Performing inventory counts, including manual quantity entry and footage calculation for cable reels.
- Tracking the status of items (Active, Inactive, Counted, Uncounted).
- Importing inventory lists from CSV files (for initial setup, cycle start, or general updates).
- Exporting the current inventory state to CSV or PDF formats (prompted during finalization).
- Logging all significant actions (counts, imports, status changes) for an audit trail.
- Finalizing a count cycle, which deactivates specific reels and prepares for the next cycle.
- Offline First: Uses IndexedDB to store all inventory data and transaction history locally in the browser. Works without an internet connection after initial load.
- Count Cycle Management:
- Start New Count Cycle: Initiates a CSV import. Items listed in the CSV are marked with a
toCountflag, making them visible for the current cycle. Items not in the CSV are hidden. Sequence data in this specific import is treated as historical reference and does not update the quantity. - Finalize Inventory: Prompts the user to export data (CSV/PDF/Both). Then, marks active REELS with zero or null quantity as "inactive". Finally, clears the
toCountflag from all items, effectively ending the current cycle and hiding items from the main view until the next cycle starts.
- Start New Count Cycle: Initiates a CSV import. Items listed in the CSV are marked with a
- Targeted Counting: The main inventory list primarily displays only items marked
toCount = truefor the current cycle. - Inventory Management: Add, view, and update inventory items with details like SKU, Description, Location, Reel Number, and Notes.
- Quantity Counting & Flagging: Easily input counted quantities or flag items as "uncounted".
- Reel Footage Calculation: Supports standard and "two-way" reels. Automatically calculates footage based on inner/outer sequence numbers and a defined footage factor, updating the item's quantity (except during the "Start New Count" import).
- Filtering & Status: Filter the displayed (
toCount = true) inventory list by location and status (Active, Inactive, All). Items are visually distinguished based on their status (Counted, Uncounted, Inactive). - CSV Import/Export:
- Import inventory data from a CSV file (headers detected automatically, see format below). Used for starting cycles or general updates.
- Export the complete inventory or filtered view to a CSV file (prompted during finalization).
- PDF Export: Generate a printable PDF report of the currently filtered inventory view (prompted during finalization).
- Transaction History:
- Logs actions like count updates, flagging, imports (cycle start vs regular), description changes, status changes, and cycle management.
- View a global history of all transactions.
- View the specific history for an individual item via a modal dialog.
- User Identification: Records a user-provided name/ID alongside transactions in the history log.
- Responsive Design: Basic responsiveness for use on different screen sizes.
This is a client-side application and does not require a web server to run.
- Download/Clone: Download or clone this repository to your local machine.
- Dependencies: Ensure the following JavaScript library files are present in the same directory as
index.html(or update the paths inindex.htmlif you place them elsewhere):papaparse.min.js(for CSV parsing)jspdf.umd.min.js(for PDF generation)jspdf.plugin.autotable.min.js(for PDF table generation)- (You can typically download these from their respective project websites/CDNs)
- Open: Open the
index.htmlfile directly in a modern web browser (like Chrome, Firefox, Edge, Safari) that supports IndexedDB and ES6+ JavaScript.
- Set Counter Name: Enter your name or identifier in the "Counter Name" field.
- Start a Count Cycle:
- Click "Start New Count Cycle".
- Select the CSV file containing all SKUs that need to be counted in this cycle.
- Items from the CSV will be added or updated, and marked
toCount = true. They will appear in the list. Items not in the CSV will be hidden (toCount = false).
- Filter (Optional): Use the "Filter Location" and "Status" controls to further refine the list of items to be counted.
- Count/Update Items:
- Work through the filtered list.
- Enter quantities, flag items, enter reel sequences, add notes.
- Changes are auto-saved.
- (Optional: Perform mid-cycle CSV imports using the "Import CSV" button for updates, without affecting the
toCountflags set by "Start New Count Cycle".)
- Finalize the Cycle:
- Click "Finalize Inventory".
- Choose your desired export format (CSV, PDF, Both, or Cancel). Exports will be generated.
- Confirm the finalization warning.
- Active REELS with 0 or null quantity will be marked inactive.
- The
toCountflag will be cleared for all items, emptying the main list. - The application is now ready for the next "Start New Count Cycle".
- View History: Use the item-specific or global history views at any time.
The CSV importer uses PapaParse and attempts to automatically detect headers (case-insensitive).
- Required Header:
SKU(oritem,partnumber,part number) - The unique identifier for the item. Rows without a SKU will be skipped.
- Required Header for Reels (for duplicate check):
reelNumber(orreel num,reel #,reel no,reel no.,reel number) - Unique identifier for the specific reel. Required if the item is identified as a reel; rows missing this for reels will be skipped.
- Recommended Headers:
Description(ordesc)location(orloc)
- Optional Headers (Will update existing item data or set for new items):
counted(orquantity,qty,count) - Explicit quantity. Note: This is ignored if valid sequences are provided for a reel (unless it's the "Start New Count" import).capturedQuantity(orexpectedquantity,expected qty,captured qty) - An optional field to store an expected or previously recorded quantity.notes(ornote,comments)isActive(oractive) -true,1,yesfor active;false,0,nofor inactive. Defaults to active if missing or not recognized as inactive.isReel(orreel,reel #,reel no,reel no.,reel number) -true,1,yesif it's a reel; otherwisefalse. Item also considered a reel ifreelNumberis provided. Defaults to false.isTwoWayReel(ortwowayreel,two way reel, 'two-way', '2-way', '2 way') -true,1,yesif it's a two-way reel; otherwisefalse. Only applicable ifisReelis true. Defaults to false.footageFactor(orfactor,ft factor, 'feet', 'footage', 'ft', 'reelft', 'reel ft', 'reel footage') - The numerical factor used for footage calculation on reels.innerSequence(orinner seq,inner, 'in1', 'inner1', 'i1') - First inner sequence number.outerSequence(orouter seq,outer, 'ou1', 'outer1', 'o1') - First outer sequence number.innerSequence2(orinner seq 2,inner2, 'in2', 'inner2', 'i2') - Second inner sequence number (for two-way reels).outerSequence2(orouter seq 2,outer2, 'ou2', 'outer2', 'o2') - Second outer sequence number (for two-way reels).
Import Logic:
- Duplicate Skipping (within the same file):
- Non-Reels: Skipped if another row in the same file has the same SKU and the same Location.
- Reels: Skipped if another row in the same file has the same
reelNumber. Reels missing areelNumberare skipped.
- Updates/Adds: If not skipped, the item is added (if new SKU) or updated (if existing SKU).
- Description Changes: Logged if the imported description differs from the existing one.
- Sequence Handling:
- During "Start New Count" Import: Sequences are stored, but not used to calculate or update the
countedquantity. Items are markedtoCount = trueandisUncounted = true. - During Regular "Import CSV": Sequences are used to calculate footage and update
countedquantity if valid and the item is a reel with a factor.
- During "Start New Count" Import: Sequences are stored, but not used to calculate or update the
toCountFlag: Only modified during the "Start New Count" import (sets to true for items in file, false for others) and "Finalize Inventory" (sets all to false). Regular imports do not change this flag.
- Frontend: HTML5, CSS3, JavaScript (ES6+)
- Storage: Browser IndexedDB (via
offlineDB.jswrapper) - Libraries:
- PapaParse.js (CSV Parsing)
- jsPDF.js & jsPDF-AutoTable plugin (PDF Generation)
- Implement robust search functionality within the inventory list (possibly searching beyond just
toCount=trueitems). - Add more advanced filtering/sorting options.
- Provide a dedicated view to see all items, regardless of
toCountstatus. - Improve the Export Options dialog (use a proper modal).
- Integrate barcode scanning capabilities.
- Implement unit/integration tests.
Contributions, issues, and feature requests are welcome. Please feel free to open an issue or submit a pull request.