- Removed unnecessary ordering by 'created_at' in variant loading across multiple services and models.
- Implemented global scopes for ordering product variants and raw material prices by 'name' and 'variant', respectively.
- Enhanced code readability and maintainability by simplifying query structures in ProductController, OrderService, and others.
- Implemented a search input to filter cuttings based on the product name.
- Introduced computed property for managing filtered cuttings.
- Enhanced the UI to display a message when no cuttings match the search criteria.
- Updated CardHeader and layout structure for revenue by channel and payment type charts to enhance responsiveness and visual consistency.
- Adjusted CSS classes for better alignment and spacing in chart components.
- Added methods to AnalysisService for retrieving monthly revenue by channel and revenue by payment type.
- Updated AnalysisController to include new metrics in the index response.
- Enhanced Analysis.vue to visualize revenue data by channel and payment type with appropriate charts and tooltips.
- Added channel, status, and payment type filters to the order index functionality.
- Updated OrderService to handle new filter parameters in pagination queries.
- Introduced filter definitions and values in the OrderGroupedTable component for improved data filtering.
- Enhanced the frontend to support dynamic filtering options for orders based on the new criteria.
- Implemented totalQuantityFormatted method in Purchase model to format total quantities by unit.
- Updated PurchaseGroupedTable.vue to display total quantity formatted in the purchase details.
- Modified TypeScript type definition to include total_quantity_formatted property.
- Introduced StockMutation model and service to handle stock changes.
- Created migration for stock_mutations table.
- Implemented stock mutation recording in various services (CuttingService, OrderService, PurchaseService, RestockService, RetailStockService).
- Added StockHistoryController to manage stock history views.
- Developed frontend components for displaying stock history and actions.
- Updated routes to include stock history access with appropriate permissions.
- Enhanced ProductVariant and RawMaterialPrice models to support stock mutations.
- Added RowHistoryAction button for accessing stock history in product and raw material tables.
- Add reject_stock field alongside stock (renamed to 'Stok Bagus') and retail_stock ('Stok Ecer')
- Update TypeScript types (ProductVariantFormItem, ProductFormInitialData)
- Update ProductVariantSection, ProductVariantEditModal, and ProductForm with new field
- Add validation rule and attribute label for reject_stock
- Update ProductService to persist reject_stock in create, update, and apply flows
- Deleted `data-table-actions.vue` component as it is no longer needed.
- Removed `CuttingResultPriceItem` type and related properties from `cutting.ts`.
- Updated routes in `web.php` to eliminate stock verification routes and permissions.
- Removed `StockTest.php` file and its associated tests for stock verification and management.
- Adjusted `CuttingTest.php` to reflect changes in cutting results handling and removed references to product variants.
- Updated the OwnerVerificationRequest model to change pendingToggleIsActive to pendingToggleStatus, reflecting the new status structure.
- Refactored the Product model to replace is_active with status, utilizing the ProductStatus enum for better clarity and type safety.
- Modified the ProductService to accommodate the new status field, including pagination and creation logic.
- Adjusted the AnalysisService to filter products based on their status.
- Updated the VerificationChangeFormatter to handle the new status field.
- Created a migration to remove is_active from the products table and add status with appropriate default values.
- Refactored the ProductSeeder to use the new status field.
- Updated frontend components and types to reflect the changes from is_active to status.
- Adjusted tests to ensure they validate the new status logic correctly.