@axelor/aos-mobile-stock 0.0.1
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/README.md +44 -0
- package/lib/api/customer-delivery-api.d.ts +16 -0
- package/lib/api/customer-delivery-api.js +122 -0
- package/lib/api/customer-delivery-api.js.map +1 -0
- package/lib/api/customer-delivery-line-api.d.ts +9 -0
- package/lib/api/customer-delivery-line-api.js +65 -0
- package/lib/api/customer-delivery-line-api.js.map +1 -0
- package/lib/api/index.d.ts +18 -0
- package/lib/api/index.js +36 -0
- package/lib/api/index.js.map +1 -0
- package/lib/api/internal-move-api.d.ts +20 -0
- package/lib/api/internal-move-api.js +112 -0
- package/lib/api/internal-move-api.js.map +1 -0
- package/lib/api/internal-move-line-api.d.ts +4 -0
- package/lib/api/internal-move-line-api.js +53 -0
- package/lib/api/internal-move-line-api.js.map +1 -0
- package/lib/api/inventory-api.d.ts +18 -0
- package/lib/api/inventory-api.js +121 -0
- package/lib/api/inventory-api.js.map +1 -0
- package/lib/api/inventory-line-api.d.ts +18 -0
- package/lib/api/inventory-line-api.js +76 -0
- package/lib/api/inventory-line-api.js.map +1 -0
- package/lib/api/partner-api.d.ts +8 -0
- package/lib/api/partner-api.js +155 -0
- package/lib/api/partner-api.js.map +1 -0
- package/lib/api/product-api.d.ts +26 -0
- package/lib/api/product-api.js +189 -0
- package/lib/api/product-api.js.map +1 -0
- package/lib/api/stock-correction-api.d.ts +17 -0
- package/lib/api/stock-correction-api.js +73 -0
- package/lib/api/stock-correction-api.js.map +1 -0
- package/lib/api/stock-correction-reason-api.d.ts +1 -0
- package/lib/api/stock-correction-reason-api.js +24 -0
- package/lib/api/stock-correction-reason-api.js.map +1 -0
- package/lib/api/stock-location-api.d.ts +7 -0
- package/lib/api/stock-location-api.js +121 -0
- package/lib/api/stock-location-api.js.map +1 -0
- package/lib/api/stock-location-line-api.d.ts +6 -0
- package/lib/api/stock-location-line-api.js +114 -0
- package/lib/api/stock-location-line-api.js.map +1 -0
- package/lib/api/supplier-arrival-api.d.ts +17 -0
- package/lib/api/supplier-arrival-api.js +121 -0
- package/lib/api/supplier-arrival-api.js.map +1 -0
- package/lib/api/supplier-arrival-line-api.d.ts +10 -0
- package/lib/api/supplier-arrival-line-api.js +67 -0
- package/lib/api/supplier-arrival-line-api.js.map +1 -0
- package/lib/api/supplier-catalog-api.d.ts +4 -0
- package/lib/api/supplier-catalog-api.js +49 -0
- package/lib/api/supplier-catalog-api.js.map +1 -0
- package/lib/api/supplychain-config-api.d.ts +1 -0
- package/lib/api/supplychain-config-api.js +24 -0
- package/lib/api/supplychain-config-api.js.map +1 -0
- package/lib/api/tracking-number-api.d.ts +16 -0
- package/lib/api/tracking-number-api.js +107 -0
- package/lib/api/tracking-number-api.js.map +1 -0
- package/lib/api/unit-api.d.ts +1 -0
- package/lib/api/unit-api.js +22 -0
- package/lib/api/unit-api.js.map +1 -0
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.js +20 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/molecules/CarrierCard/CarrierCard.d.ts +6 -0
- package/lib/components/molecules/CarrierCard/CarrierCard.js +46 -0
- package/lib/components/molecules/CarrierCard/CarrierCard.js.map +1 -0
- package/lib/components/molecules/LocationsMoveCard/LocationsMoveCard.d.ts +14 -0
- package/lib/components/molecules/LocationsMoveCard/LocationsMoveCard.js +82 -0
- package/lib/components/molecules/LocationsMoveCard/LocationsMoveCard.js.map +1 -0
- package/lib/components/molecules/ProductCardDetails/ProductCardDetails.d.ts +7 -0
- package/lib/components/molecules/ProductCardDetails/ProductCardDetails.js +42 -0
- package/lib/components/molecules/ProductCardDetails/ProductCardDetails.js.map +1 -0
- package/lib/components/molecules/StockCorrectionCard/StockCorrectionCard.d.ts +10 -0
- package/lib/components/molecules/StockCorrectionCard/StockCorrectionCard.js +75 -0
- package/lib/components/molecules/StockCorrectionCard/StockCorrectionCard.js.map +1 -0
- package/lib/components/molecules/index.d.ts +4 -0
- package/lib/components/molecules/index.js +22 -0
- package/lib/components/molecules/index.js.map +1 -0
- package/lib/components/organisms/CardStockIndicator/CardStockIndicator.d.ts +6 -0
- package/lib/components/organisms/CardStockIndicator/CardStockIndicator.js +72 -0
- package/lib/components/organisms/CardStockIndicator/CardStockIndicator.js.map +1 -0
- package/lib/components/organisms/CustomerDeliveryCard/CustomerDeliveryCard.d.ts +12 -0
- package/lib/components/organisms/CustomerDeliveryCard/CustomerDeliveryCard.js +94 -0
- package/lib/components/organisms/CustomerDeliveryCard/CustomerDeliveryCard.js.map +1 -0
- package/lib/components/organisms/CustomerDeliveryLineCard/CustomerDeliveryLineCard.d.ts +14 -0
- package/lib/components/organisms/CustomerDeliveryLineCard/CustomerDeliveryLineCard.js +81 -0
- package/lib/components/organisms/CustomerDeliveryLineCard/CustomerDeliveryLineCard.js.map +1 -0
- package/lib/components/organisms/DescriptionCard/DescriptionCard.d.ts +7 -0
- package/lib/components/organisms/DescriptionCard/DescriptionCard.js +42 -0
- package/lib/components/organisms/DescriptionCard/DescriptionCard.js.map +1 -0
- package/lib/components/organisms/InternalMoveCard/InternalMoveCard.d.ts +13 -0
- package/lib/components/organisms/InternalMoveCard/InternalMoveCard.js +94 -0
- package/lib/components/organisms/InternalMoveCard/InternalMoveCard.js.map +1 -0
- package/lib/components/organisms/InternalMoveLineCard/InternalMoveLineCard.d.ts +13 -0
- package/lib/components/organisms/InternalMoveLineCard/InternalMoveLineCard.js +101 -0
- package/lib/components/organisms/InternalMoveLineCard/InternalMoveLineCard.js.map +1 -0
- package/lib/components/organisms/InventoryCard/InventoryCard.d.ts +10 -0
- package/lib/components/organisms/InventoryCard/InventoryCard.js +88 -0
- package/lib/components/organisms/InventoryCard/InventoryCard.js.map +1 -0
- package/lib/components/organisms/InventoryHeader/InventoryHeader.d.ts +8 -0
- package/lib/components/organisms/InventoryHeader/InventoryHeader.js +77 -0
- package/lib/components/organisms/InventoryHeader/InventoryHeader.js.map +1 -0
- package/lib/components/organisms/InventoryLineCard/InventoryLineCard.d.ts +14 -0
- package/lib/components/organisms/InventoryLineCard/InventoryLineCard.js +72 -0
- package/lib/components/organisms/InventoryLineCard/InventoryLineCard.js.map +1 -0
- package/lib/components/organisms/ProductCard/ProductCard.d.ts +10 -0
- package/lib/components/organisms/ProductCard/ProductCard.js +77 -0
- package/lib/components/organisms/ProductCard/ProductCard.js.map +1 -0
- package/lib/components/organisms/ProductCardInfo/ProductCardInfo.d.ts +10 -0
- package/lib/components/organisms/ProductCardInfo/ProductCardInfo.js +74 -0
- package/lib/components/organisms/ProductCardInfo/ProductCardInfo.js.map +1 -0
- package/lib/components/organisms/ProductCharacteristics/ProductCharacteristics.d.ts +13 -0
- package/lib/components/organisms/ProductCharacteristics/ProductCharacteristics.js +79 -0
- package/lib/components/organisms/ProductCharacteristics/ProductCharacteristics.js.map +1 -0
- package/lib/components/organisms/ProductStockLocationCard/ProductStockLocationCard.d.ts +10 -0
- package/lib/components/organisms/ProductStockLocationCard/ProductStockLocationCard.js +89 -0
- package/lib/components/organisms/ProductStockLocationCard/ProductStockLocationCard.js.map +1 -0
- package/lib/components/organisms/ProductVariantCard/ProductVariantCard.d.ts +19 -0
- package/lib/components/organisms/ProductVariantCard/ProductVariantCard.js +128 -0
- package/lib/components/organisms/ProductVariantCard/ProductVariantCard.js.map +1 -0
- package/lib/components/organisms/QuantityCard/QuantityCard.d.ts +12 -0
- package/lib/components/organisms/QuantityCard/QuantityCard.js +98 -0
- package/lib/components/organisms/QuantityCard/QuantityCard.js.map +1 -0
- package/lib/components/organisms/SmallPropertyCard/SmallPropertyCard.d.ts +9 -0
- package/lib/components/organisms/SmallPropertyCard/SmallPropertyCard.js +63 -0
- package/lib/components/organisms/SmallPropertyCard/SmallPropertyCard.js.map +1 -0
- package/lib/components/organisms/StockMoveHeader/StockMoveHeader.d.ts +9 -0
- package/lib/components/organisms/StockMoveHeader/StockMoveHeader.js +71 -0
- package/lib/components/organisms/StockMoveHeader/StockMoveHeader.js.map +1 -0
- package/lib/components/organisms/SupplierArrivalCard/SupplierArrivalCard.d.ts +11 -0
- package/lib/components/organisms/SupplierArrivalCard/SupplierArrivalCard.js +93 -0
- package/lib/components/organisms/SupplierArrivalCard/SupplierArrivalCard.js.map +1 -0
- package/lib/components/organisms/SupplierArrivalLineCard/SupplierArrivalLineCard.d.ts +13 -0
- package/lib/components/organisms/SupplierArrivalLineCard/SupplierArrivalLineCard.js +78 -0
- package/lib/components/organisms/SupplierArrivalLineCard/SupplierArrivalLineCard.js.map +1 -0
- package/lib/components/organisms/index.d.ts +19 -0
- package/lib/components/organisms/index.js +37 -0
- package/lib/components/organisms/index.js.map +1 -0
- package/lib/features/asyncFunctions-index.d.ts +21 -0
- package/lib/features/asyncFunctions-index.js +39 -0
- package/lib/features/asyncFunctions-index.js.map +1 -0
- package/lib/features/customerDeliveryLineSlice.d.ts +27 -0
- package/lib/features/customerDeliveryLineSlice.js +88 -0
- package/lib/features/customerDeliveryLineSlice.js.map +1 -0
- package/lib/features/customerDeliverySlice.d.ts +38 -0
- package/lib/features/customerDeliverySlice.js +102 -0
- package/lib/features/customerDeliverySlice.js.map +1 -0
- package/lib/features/index.d.ts +21 -0
- package/lib/features/index.js +39 -0
- package/lib/features/index.js.map +1 -0
- package/lib/features/internalMoveLineSlice.d.ts +16 -0
- package/lib/features/internalMoveLineSlice.js +71 -0
- package/lib/features/internalMoveLineSlice.js.map +1 -0
- package/lib/features/internalMoveSlice.d.ts +38 -0
- package/lib/features/internalMoveSlice.js +105 -0
- package/lib/features/internalMoveSlice.js.map +1 -0
- package/lib/features/inventoryLineSlice.d.ts +38 -0
- package/lib/features/inventoryLineSlice.js +105 -0
- package/lib/features/inventoryLineSlice.js.map +1 -0
- package/lib/features/inventorySlice.d.ts +47 -0
- package/lib/features/inventorySlice.js +129 -0
- package/lib/features/inventorySlice.js.map +1 -0
- package/lib/features/partnerSlice.d.ts +25 -0
- package/lib/features/partnerSlice.js +65 -0
- package/lib/features/partnerSlice.js.map +1 -0
- package/lib/features/productIndicatorsSlice.d.ts +37 -0
- package/lib/features/productIndicatorsSlice.js +101 -0
- package/lib/features/productIndicatorsSlice.js.map +1 -0
- package/lib/features/productSlice.d.ts +39 -0
- package/lib/features/productSlice.js +105 -0
- package/lib/features/productSlice.js.map +1 -0
- package/lib/features/productVariantSlice.d.ts +27 -0
- package/lib/features/productVariantSlice.js +98 -0
- package/lib/features/productVariantSlice.js.map +1 -0
- package/lib/features/racksListSlice.d.ts +14 -0
- package/lib/features/racksListSlice.js +63 -0
- package/lib/features/racksListSlice.js.map +1 -0
- package/lib/features/stockAppConfigSlice.d.ts +14 -0
- package/lib/features/stockAppConfigSlice.js +49 -0
- package/lib/features/stockAppConfigSlice.js.map +1 -0
- package/lib/features/stockCorrectionReasonSlice.d.ts +14 -0
- package/lib/features/stockCorrectionReasonSlice.js +48 -0
- package/lib/features/stockCorrectionReasonSlice.js.map +1 -0
- package/lib/features/stockCorrectionSlice.d.ts +38 -0
- package/lib/features/stockCorrectionSlice.js +105 -0
- package/lib/features/stockCorrectionSlice.js.map +1 -0
- package/lib/features/stockLocationLineSlice.d.ts +16 -0
- package/lib/features/stockLocationLineSlice.js +71 -0
- package/lib/features/stockLocationLineSlice.js.map +1 -0
- package/lib/features/stockLocationSlice.d.ts +25 -0
- package/lib/features/stockLocationSlice.js +65 -0
- package/lib/features/stockLocationSlice.js.map +1 -0
- package/lib/features/supplierArrivalLineSlice.d.ts +27 -0
- package/lib/features/supplierArrivalLineSlice.js +88 -0
- package/lib/features/supplierArrivalLineSlice.js.map +1 -0
- package/lib/features/supplierArrivalSlice.d.ts +38 -0
- package/lib/features/supplierArrivalSlice.js +105 -0
- package/lib/features/supplierArrivalSlice.js.map +1 -0
- package/lib/features/supplierCatalogSlice.d.ts +14 -0
- package/lib/features/supplierCatalogSlice.js +48 -0
- package/lib/features/supplierCatalogSlice.js.map +1 -0
- package/lib/features/trackingNumberSlice.d.ts +35 -0
- package/lib/features/trackingNumberSlice.js +96 -0
- package/lib/features/trackingNumberSlice.js.map +1 -0
- package/lib/features/unitSlice.d.ts +14 -0
- package/lib/features/unitSlice.js +48 -0
- package/lib/features/unitSlice.js.map +1 -0
- package/lib/i18n/en.json +103 -0
- package/lib/i18n/fr.json +103 -0
- package/lib/index.d.ts +14 -0
- package/lib/index.js +97 -0
- package/lib/index.js.map +1 -0
- package/lib/screens/auth/UserScreen.d.ts +4 -0
- package/lib/screens/auth/UserScreen.js +54 -0
- package/lib/screens/auth/UserScreen.js.map +1 -0
- package/lib/screens/customerDeliveries/CustomerDeliveryDetailScreen.d.ts +5 -0
- package/lib/screens/customerDeliveries/CustomerDeliveryDetailScreen.js +149 -0
- package/lib/screens/customerDeliveries/CustomerDeliveryDetailScreen.js.map +1 -0
- package/lib/screens/customerDeliveries/CustomerDeliveryLineDetailScreen.d.ts +5 -0
- package/lib/screens/customerDeliveries/CustomerDeliveryLineDetailScreen.js +140 -0
- package/lib/screens/customerDeliveries/CustomerDeliveryLineDetailScreen.js.map +1 -0
- package/lib/screens/customerDeliveries/CustomerDeliveryLineListScreen.d.ts +5 -0
- package/lib/screens/customerDeliveries/CustomerDeliveryLineListScreen.js +116 -0
- package/lib/screens/customerDeliveries/CustomerDeliveryLineListScreen.js.map +1 -0
- package/lib/screens/customerDeliveries/CustomerDeliveryListScreen.d.ts +4 -0
- package/lib/screens/customerDeliveries/CustomerDeliveryListScreen.js +130 -0
- package/lib/screens/customerDeliveries/CustomerDeliveryListScreen.js.map +1 -0
- package/lib/screens/customerDeliveries/CustomerDeliverySelectProductScreen.d.ts +5 -0
- package/lib/screens/customerDeliveries/CustomerDeliverySelectProductScreen.js +76 -0
- package/lib/screens/customerDeliveries/CustomerDeliverySelectProductScreen.js.map +1 -0
- package/lib/screens/customerDeliveries/CustomerDeliverySelectTrackingScreen.d.ts +5 -0
- package/lib/screens/customerDeliveries/CustomerDeliverySelectTrackingScreen.js +79 -0
- package/lib/screens/customerDeliveries/CustomerDeliverySelectTrackingScreen.js.map +1 -0
- package/lib/screens/customerDeliveries/index.d.ts +66 -0
- package/lib/screens/customerDeliveries/index.js +68 -0
- package/lib/screens/customerDeliveries/index.js.map +1 -0
- package/lib/screens/internalMoves/InternalMoveDetailsGeneralScreen.d.ts +5 -0
- package/lib/screens/internalMoves/InternalMoveDetailsGeneralScreen.js +102 -0
- package/lib/screens/internalMoves/InternalMoveDetailsGeneralScreen.js.map +1 -0
- package/lib/screens/internalMoves/InternalMoveLineDetailsScreen.d.ts +5 -0
- package/lib/screens/internalMoves/InternalMoveLineDetailsScreen.js +296 -0
- package/lib/screens/internalMoves/InternalMoveLineDetailsScreen.js.map +1 -0
- package/lib/screens/internalMoves/InternalMoveLineListScreen.d.ts +5 -0
- package/lib/screens/internalMoves/InternalMoveLineListScreen.js +107 -0
- package/lib/screens/internalMoves/InternalMoveLineListScreen.js.map +1 -0
- package/lib/screens/internalMoves/InternalMoveListScreen.d.ts +4 -0
- package/lib/screens/internalMoves/InternalMoveListScreen.js +162 -0
- package/lib/screens/internalMoves/InternalMoveListScreen.js.map +1 -0
- package/lib/screens/internalMoves/InternalMoveSelectFromLocationScreen.d.ts +5 -0
- package/lib/screens/internalMoves/InternalMoveSelectFromLocationScreen.js +48 -0
- package/lib/screens/internalMoves/InternalMoveSelectFromLocationScreen.js.map +1 -0
- package/lib/screens/internalMoves/InternalMoveSelectProductScreen.d.ts +5 -0
- package/lib/screens/internalMoves/InternalMoveSelectProductScreen.js +98 -0
- package/lib/screens/internalMoves/InternalMoveSelectProductScreen.js.map +1 -0
- package/lib/screens/internalMoves/InternalMoveSelectToLocationScreen.d.ts +5 -0
- package/lib/screens/internalMoves/InternalMoveSelectToLocationScreen.js +53 -0
- package/lib/screens/internalMoves/InternalMoveSelectToLocationScreen.js.map +1 -0
- package/lib/screens/internalMoves/InternalMoveSelectTrackingScreen.d.ts +5 -0
- package/lib/screens/internalMoves/InternalMoveSelectTrackingScreen.js +101 -0
- package/lib/screens/internalMoves/InternalMoveSelectTrackingScreen.js.map +1 -0
- package/lib/screens/internalMoves/index.d.ts +78 -0
- package/lib/screens/internalMoves/index.js +78 -0
- package/lib/screens/internalMoves/index.js.map +1 -0
- package/lib/screens/inventories/InventoryLineDetailsScreen.d.ts +5 -0
- package/lib/screens/inventories/InventoryLineDetailsScreen.js +98 -0
- package/lib/screens/inventories/InventoryLineDetailsScreen.js.map +1 -0
- package/lib/screens/inventories/InventoryLineListScreen.d.ts +5 -0
- package/lib/screens/inventories/InventoryLineListScreen.js +122 -0
- package/lib/screens/inventories/InventoryLineListScreen.js.map +1 -0
- package/lib/screens/inventories/InventoryListScreen.d.ts +4 -0
- package/lib/screens/inventories/InventoryListScreen.js +148 -0
- package/lib/screens/inventories/InventoryListScreen.js.map +1 -0
- package/lib/screens/inventories/InventoryPlannedDetailsScreen.d.ts +5 -0
- package/lib/screens/inventories/InventoryPlannedDetailsScreen.js +81 -0
- package/lib/screens/inventories/InventoryPlannedDetailsScreen.js.map +1 -0
- package/lib/screens/inventories/InventorySelectProductScreen.d.ts +5 -0
- package/lib/screens/inventories/InventorySelectProductScreen.js +83 -0
- package/lib/screens/inventories/InventorySelectProductScreen.js.map +1 -0
- package/lib/screens/inventories/InventorySelectTrackingScreen.d.ts +5 -0
- package/lib/screens/inventories/InventorySelectTrackingScreen.js +81 -0
- package/lib/screens/inventories/InventorySelectTrackingScreen.js.map +1 -0
- package/lib/screens/inventories/InventoryStartedDetailsScreen.d.ts +5 -0
- package/lib/screens/inventories/InventoryStartedDetailsScreen.js +110 -0
- package/lib/screens/inventories/InventoryStartedDetailsScreen.js.map +1 -0
- package/lib/screens/inventories/index.d.ts +77 -0
- package/lib/screens/inventories/index.js +76 -0
- package/lib/screens/inventories/index.js.map +1 -0
- package/lib/screens/products/ProductDetailsScreen.d.ts +5 -0
- package/lib/screens/products/ProductDetailsScreen.js +135 -0
- package/lib/screens/products/ProductDetailsScreen.js.map +1 -0
- package/lib/screens/products/ProductImageScreen.d.ts +4 -0
- package/lib/screens/products/ProductImageScreen.js +62 -0
- package/lib/screens/products/ProductImageScreen.js.map +1 -0
- package/lib/screens/products/ProductListScreen.d.ts +4 -0
- package/lib/screens/products/ProductListScreen.js +72 -0
- package/lib/screens/products/ProductListScreen.js.map +1 -0
- package/lib/screens/products/ProductListVariantScreen.d.ts +5 -0
- package/lib/screens/products/ProductListVariantScreen.js +66 -0
- package/lib/screens/products/ProductListVariantScreen.js.map +1 -0
- package/lib/screens/products/ProductStockDetailsScreen.d.ts +5 -0
- package/lib/screens/products/ProductStockDetailsScreen.js +201 -0
- package/lib/screens/products/ProductStockDetailsScreen.js.map +1 -0
- package/lib/screens/products/ProductStockLocationDetailsScreen.d.ts +4 -0
- package/lib/screens/products/ProductStockLocationDetailsScreen.js +110 -0
- package/lib/screens/products/ProductStockLocationDetailsScreen.js.map +1 -0
- package/lib/screens/products/index.d.ts +46 -0
- package/lib/screens/products/index.js +56 -0
- package/lib/screens/products/index.js.map +1 -0
- package/lib/screens/stockCorrections/StockCorrectionDetailsScreen.d.ts +5 -0
- package/lib/screens/stockCorrections/StockCorrectionDetailsScreen.js +271 -0
- package/lib/screens/stockCorrections/StockCorrectionDetailsScreen.js.map +1 -0
- package/lib/screens/stockCorrections/StockCorrectionListScreen.d.ts +4 -0
- package/lib/screens/stockCorrections/StockCorrectionListScreen.js +140 -0
- package/lib/screens/stockCorrections/StockCorrectionListScreen.js.map +1 -0
- package/lib/screens/stockCorrections/StockCorrectionNewLocationScreen.d.ts +5 -0
- package/lib/screens/stockCorrections/StockCorrectionNewLocationScreen.js +48 -0
- package/lib/screens/stockCorrections/StockCorrectionNewLocationScreen.js.map +1 -0
- package/lib/screens/stockCorrections/StockCorrectionNewProductScreen.d.ts +5 -0
- package/lib/screens/stockCorrections/StockCorrectionNewProductScreen.js +55 -0
- package/lib/screens/stockCorrections/StockCorrectionNewProductScreen.js.map +1 -0
- package/lib/screens/stockCorrections/StockCorrectionNewTrackingScreen.d.ts +5 -0
- package/lib/screens/stockCorrections/StockCorrectionNewTrackingScreen.js +54 -0
- package/lib/screens/stockCorrections/StockCorrectionNewTrackingScreen.js.map +1 -0
- package/lib/screens/stockCorrections/index.d.ts +40 -0
- package/lib/screens/stockCorrections/index.js +51 -0
- package/lib/screens/stockCorrections/index.js.map +1 -0
- package/lib/screens/supplierArrivals/SupplierArrivalAddTrackingScreen.d.ts +5 -0
- package/lib/screens/supplierArrivals/SupplierArrivalAddTrackingScreen.js +87 -0
- package/lib/screens/supplierArrivals/SupplierArrivalAddTrackingScreen.js.map +1 -0
- package/lib/screens/supplierArrivals/SupplierArrivalDetailsScreen.d.ts +5 -0
- package/lib/screens/supplierArrivals/SupplierArrivalDetailsScreen.js +120 -0
- package/lib/screens/supplierArrivals/SupplierArrivalDetailsScreen.js.map +1 -0
- package/lib/screens/supplierArrivals/SupplierArrivalLineDetailScreen.d.ts +5 -0
- package/lib/screens/supplierArrivals/SupplierArrivalLineDetailScreen.js +167 -0
- package/lib/screens/supplierArrivals/SupplierArrivalLineDetailScreen.js.map +1 -0
- package/lib/screens/supplierArrivals/SupplierArrivalLineListScreen.d.ts +5 -0
- package/lib/screens/supplierArrivals/SupplierArrivalLineListScreen.js +107 -0
- package/lib/screens/supplierArrivals/SupplierArrivalLineListScreen.js.map +1 -0
- package/lib/screens/supplierArrivals/SupplierArrivalListScreen.d.ts +4 -0
- package/lib/screens/supplierArrivals/SupplierArrivalListScreen.js +126 -0
- package/lib/screens/supplierArrivals/SupplierArrivalListScreen.js.map +1 -0
- package/lib/screens/supplierArrivals/SupplierArrivalSelectProductScreen.d.ts +5 -0
- package/lib/screens/supplierArrivals/SupplierArrivalSelectProductScreen.js +79 -0
- package/lib/screens/supplierArrivals/SupplierArrivalSelectProductScreen.js.map +1 -0
- package/lib/screens/supplierArrivals/SupplierArrivalSelectTrackingScreen.d.ts +5 -0
- package/lib/screens/supplierArrivals/SupplierArrivalSelectTrackingScreen.js +106 -0
- package/lib/screens/supplierArrivals/SupplierArrivalSelectTrackingScreen.js.map +1 -0
- package/lib/screens/supplierArrivals/index.d.ts +77 -0
- package/lib/screens/supplierArrivals/index.js +76 -0
- package/lib/screens/supplierArrivals/index.js.map +1 -0
- package/lib/types/index.d.ts +5 -0
- package/lib/types/index.js +23 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/inventory.d.ts +16 -0
- package/lib/types/inventory.js +88 -0
- package/lib/types/inventory.js.map +1 -0
- package/lib/types/product.d.ts +16 -0
- package/lib/types/product.js +62 -0
- package/lib/types/product.js.map +1 -0
- package/lib/types/stock-corrrection.d.ts +11 -0
- package/lib/types/stock-corrrection.js +47 -0
- package/lib/types/stock-corrrection.js.map +1 -0
- package/lib/types/stock-location.d.ts +8 -0
- package/lib/types/stock-location.js +26 -0
- package/lib/types/stock-location.js.map +1 -0
- package/lib/types/stock-move.d.ts +36 -0
- package/lib/types/stock-move.js +124 -0
- package/lib/types/stock-move.js.map +1 -0
- package/lib/utils/displayers.d.ts +4 -0
- package/lib/utils/displayers.js +22 -0
- package/lib/utils/displayers.js.map +1 -0
- package/lib/utils/filters.d.ts +6 -0
- package/lib/utils/filters.js +77 -0
- package/lib/utils/filters.js.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
19
|
+
import { handlerApiCall } from '@axelor/aos-mobile-core';
|
|
20
|
+
import { getProductStockIndicators } from '../api/product-api';
|
|
21
|
+
export const fetchProductIndicators = createAsyncThunk('product/fetchProductIndicators', async function (data, { getState }) {
|
|
22
|
+
return handlerApiCall({
|
|
23
|
+
fetchFunction: getProductStockIndicators,
|
|
24
|
+
data,
|
|
25
|
+
action: 'fetch product stock indicators',
|
|
26
|
+
getState,
|
|
27
|
+
responseOptions: { isArrayResponse: false },
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
var getProductAvailabilty = async (data, { getState }) => {
|
|
31
|
+
return handlerApiCall({
|
|
32
|
+
fetchFunction: getProductStockIndicators,
|
|
33
|
+
data,
|
|
34
|
+
action: 'fetch product stock indicators',
|
|
35
|
+
getState,
|
|
36
|
+
responseOptions: { isArrayResponse: false },
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
async function fetchData(data, { getState }) {
|
|
40
|
+
return await getProductAvailabilty(data, { getState });
|
|
41
|
+
}
|
|
42
|
+
export const fetchProductsAvailability = createAsyncThunk('product/fetchProductsAvailability', async function (data, { getState }) {
|
|
43
|
+
let promises = [];
|
|
44
|
+
data.productList.forEach(product => {
|
|
45
|
+
promises.push(fetchData({
|
|
46
|
+
productId: product.id,
|
|
47
|
+
companyId: data.companyId,
|
|
48
|
+
stockLocationId: data.stockLocationId,
|
|
49
|
+
version: product.version,
|
|
50
|
+
}, { getState }));
|
|
51
|
+
});
|
|
52
|
+
return Promise.all(promises);
|
|
53
|
+
});
|
|
54
|
+
export const fetchProductDistribution = createAsyncThunk('product/fetchProductDistribution', async function (data, { getState }) {
|
|
55
|
+
let promises = [];
|
|
56
|
+
data.stockLocationList.forEach(line => {
|
|
57
|
+
promises.push(fetchData({
|
|
58
|
+
productId: data.product.id,
|
|
59
|
+
companyId: data.companyId,
|
|
60
|
+
stockLocationId: line.stockLocation.id,
|
|
61
|
+
version: data.product.version,
|
|
62
|
+
}, { getState }));
|
|
63
|
+
});
|
|
64
|
+
return Promise.all(promises);
|
|
65
|
+
});
|
|
66
|
+
const initialState = {
|
|
67
|
+
loading: false,
|
|
68
|
+
loadingProductIndicators: false,
|
|
69
|
+
productIndicators: {},
|
|
70
|
+
listAvailabilty: [],
|
|
71
|
+
listAvailabiltyDistribution: [],
|
|
72
|
+
};
|
|
73
|
+
const productIndicators = createSlice({
|
|
74
|
+
name: 'productIndicators',
|
|
75
|
+
initialState,
|
|
76
|
+
extraReducers: builder => {
|
|
77
|
+
builder.addCase(fetchProductIndicators.pending, state => {
|
|
78
|
+
state.loadingProductIndicators = true;
|
|
79
|
+
});
|
|
80
|
+
builder.addCase(fetchProductIndicators.fulfilled, (state, action) => {
|
|
81
|
+
state.loadingProductIndicators = false;
|
|
82
|
+
state.productIndicators = action.payload;
|
|
83
|
+
});
|
|
84
|
+
builder.addCase(fetchProductsAvailability.pending, state => {
|
|
85
|
+
state.loading = true;
|
|
86
|
+
});
|
|
87
|
+
builder.addCase(fetchProductsAvailability.fulfilled, (state, action) => {
|
|
88
|
+
state.loading = false;
|
|
89
|
+
state.listAvailabilty = action.payload;
|
|
90
|
+
});
|
|
91
|
+
builder.addCase(fetchProductDistribution.pending, state => {
|
|
92
|
+
state.loading = true;
|
|
93
|
+
});
|
|
94
|
+
builder.addCase(fetchProductDistribution.fulfilled, (state, action) => {
|
|
95
|
+
state.loading = false;
|
|
96
|
+
state.listAvailabiltyDistribution = action.payload;
|
|
97
|
+
});
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
export const productIndicatorsReducer = productIndicators.reducer;
|
|
101
|
+
//# sourceMappingURL=productIndicatorsSlice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"productIndicatorsSlice.js","sourceRoot":"","sources":["../../src/features/productIndicatorsSlice.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AA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B,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;YAClE,KAAK,CAAC,wBAAwB,GAAG,KAAK,CAAC;YACvC,KAAK,CAAC,iBAAiB,GAAG,MAAM,CAAC,OAAO,CAAC;QAC3C,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,OAAO,CAAC,yBAAyB,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE;YACzD,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;QACvB,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,OAAO,CAAC,yBAAyB,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;YACrE,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC;YACtB,KAAK,CAAC,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC;QACzC,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,OAAO,CAAC,wBAAwB,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE;YACxD,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;QACvB,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,OAAO,CAAC,wBAAwB,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;YACpE,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC;YACtB,KAAK,CAAC,2BAA2B,GAAG,MAAM,CAAC,OAAO,CAAC;QACrD,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,iBAAiB,CAAC,OAAO,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export const searchProducts: import("@reduxjs/toolkit").AsyncThunk<any, void, {
|
|
2
|
+
state?: unknown;
|
|
3
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction>;
|
|
4
|
+
extra?: unknown;
|
|
5
|
+
rejectValue?: unknown;
|
|
6
|
+
serializedErrorType?: unknown;
|
|
7
|
+
pendingMeta?: unknown;
|
|
8
|
+
fulfilledMeta?: unknown;
|
|
9
|
+
rejectedMeta?: unknown;
|
|
10
|
+
}>;
|
|
11
|
+
export const fetchProductWithId: import("@reduxjs/toolkit").AsyncThunk<any, void, {
|
|
12
|
+
state?: unknown;
|
|
13
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction>;
|
|
14
|
+
extra?: unknown;
|
|
15
|
+
rejectValue?: unknown;
|
|
16
|
+
serializedErrorType?: unknown;
|
|
17
|
+
pendingMeta?: unknown;
|
|
18
|
+
fulfilledMeta?: unknown;
|
|
19
|
+
rejectedMeta?: unknown;
|
|
20
|
+
}>;
|
|
21
|
+
export const updateProductLocker: import("@reduxjs/toolkit").AsyncThunk<any, void, {
|
|
22
|
+
state?: unknown;
|
|
23
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction>;
|
|
24
|
+
extra?: unknown;
|
|
25
|
+
rejectValue?: unknown;
|
|
26
|
+
serializedErrorType?: unknown;
|
|
27
|
+
pendingMeta?: unknown;
|
|
28
|
+
fulfilledMeta?: unknown;
|
|
29
|
+
rejectedMeta?: unknown;
|
|
30
|
+
}>;
|
|
31
|
+
export const productReducer: import("redux").Reducer<{
|
|
32
|
+
loadingProduct: boolean;
|
|
33
|
+
moreLoading: boolean;
|
|
34
|
+
isListEnd: boolean;
|
|
35
|
+
productList: any[];
|
|
36
|
+
loadingProductFromId: boolean;
|
|
37
|
+
productFromId: {};
|
|
38
|
+
updateResponde: {};
|
|
39
|
+
}, import("redux").AnyAction>;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
19
|
+
import { handlerApiCall } from '@axelor/aos-mobile-core';
|
|
20
|
+
import { searchProductsFilter, searchProductWithId, updateLocker, } from '../api/product-api';
|
|
21
|
+
export const searchProducts = createAsyncThunk('product/searchProduct', async function (data, { getState }) {
|
|
22
|
+
return handlerApiCall({
|
|
23
|
+
fetchFunction: searchProductsFilter,
|
|
24
|
+
data,
|
|
25
|
+
action: 'filter products',
|
|
26
|
+
getState,
|
|
27
|
+
responseOptions: { isArrayResponse: true },
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
export const fetchProductWithId = createAsyncThunk('product/fetchProductWithId', async function (productId, { getState }) {
|
|
31
|
+
return handlerApiCall({
|
|
32
|
+
fetchFunction: searchProductWithId,
|
|
33
|
+
data: productId,
|
|
34
|
+
action: 'fetch product from id',
|
|
35
|
+
getState,
|
|
36
|
+
responseOptions: { isArrayResponse: false },
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
export const updateProductLocker = createAsyncThunk('product/updateLocker', async function (data, { getState }) {
|
|
40
|
+
return handlerApiCall({
|
|
41
|
+
fetchFunction: updateLocker,
|
|
42
|
+
data,
|
|
43
|
+
action: 'update product locker',
|
|
44
|
+
getState,
|
|
45
|
+
responseOptions: { showToast: true },
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
const initialState = {
|
|
49
|
+
loadingProduct: false,
|
|
50
|
+
moreLoading: false,
|
|
51
|
+
isListEnd: false,
|
|
52
|
+
productList: [],
|
|
53
|
+
loadingProductFromId: false,
|
|
54
|
+
productFromId: {},
|
|
55
|
+
updateResponde: {},
|
|
56
|
+
};
|
|
57
|
+
const productSlice = createSlice({
|
|
58
|
+
name: 'product',
|
|
59
|
+
initialState,
|
|
60
|
+
extraReducers: builder => {
|
|
61
|
+
builder.addCase(searchProducts.pending, (state, action) => {
|
|
62
|
+
if (action.meta.arg.page === 0 || action.meta.arg.page == null) {
|
|
63
|
+
state.loadingProduct = true;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
state.moreLoading = true;
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
builder.addCase(searchProducts.fulfilled, (state, action) => {
|
|
70
|
+
state.loadingProduct = false;
|
|
71
|
+
state.moreLoading = false;
|
|
72
|
+
if (action.meta.arg.page === 0 || action.meta.arg.page == null) {
|
|
73
|
+
state.productList = action.payload;
|
|
74
|
+
state.isListEnd = false;
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
if (action.payload != null) {
|
|
78
|
+
state.isListEnd = false;
|
|
79
|
+
state.productList = [...state.productList, ...action.payload];
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
state.isListEnd = true;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
builder.addCase(fetchProductWithId.pending, state => {
|
|
87
|
+
state.loadingProduct = true;
|
|
88
|
+
state.loadingProductFromId = true;
|
|
89
|
+
});
|
|
90
|
+
builder.addCase(fetchProductWithId.fulfilled, (state, action) => {
|
|
91
|
+
state.loadingProduct = false;
|
|
92
|
+
state.loadingProductFromId = false;
|
|
93
|
+
state.productFromId = action.payload;
|
|
94
|
+
});
|
|
95
|
+
builder.addCase(updateProductLocker.pending, state => {
|
|
96
|
+
state.loadingProduct = true;
|
|
97
|
+
});
|
|
98
|
+
builder.addCase(updateProductLocker.fulfilled, (state, action) => {
|
|
99
|
+
state.loadingProduct = false;
|
|
100
|
+
state.updateResponde = action.payload;
|
|
101
|
+
});
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
export const productReducer = productSlice.reducer;
|
|
105
|
+
//# sourceMappingURL=productSlice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"productSlice.js","sourceRoot":"","sources":["../../src/features/productSlice.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAE,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAC,cAAc,EAAC,MAAM,yBAAyB,CAAC;AACvD,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,YAAY,GACb,MAAM,oBAAoB,CAAC;AAE5B,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAC5C,uBAAuB,EACvB,KAAK,WAAW,IAAI,EAAE,EAAC,QAAQ,EAAC;IAC9B,OAAO,cAAc,CAAC;QACpB,aAAa,EAAE,oBAAoB;QACnC,IAAI;QACJ,MAAM,EAAE,iBAAiB;QACzB,QAAQ;QACR,eAAe,EAAE,EAAC,eAAe,EAAE,IAAI,EAAC;KACzC,CAAC,CAAC;AACL,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,gBAAgB,CAChD,4BAA4B,EAC5B,KAAK,WAAW,SAAS,EAAE,EAAC,QAAQ,EAAC;IACnC,OAAO,cAAc,CAAC;QACpB,aAAa,EAAE,mBAAmB;QAClC,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,uBAAuB;QAC/B,QAAQ;QACR,eAAe,EAAE,EAAC,eAAe,EAAE,KAAK,EAAC;KAC1C,CAAC,CAAC;AACL,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,gBAAgB,CACjD,sBAAsB,EACtB,KAAK,WAAW,IAAI,EAAE,EAAC,QAAQ,EAAC;IAC9B,OAAO,cAAc,CAAC;QACpB,aAAa,EAAE,YAAY;QAC3B,IAAI;QACJ,MAAM,EAAE,uBAAuB;QAC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state?: unknown;
|
|
3
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction>;
|
|
4
|
+
extra?: unknown;
|
|
5
|
+
rejectValue?: unknown;
|
|
6
|
+
serializedErrorType?: unknown;
|
|
7
|
+
pendingMeta?: unknown;
|
|
8
|
+
fulfilledMeta?: unknown;
|
|
9
|
+
rejectedMeta?: unknown;
|
|
10
|
+
}>;
|
|
11
|
+
export const fetchProductsAttributes: import("@reduxjs/toolkit").AsyncThunk<any[], void, {
|
|
12
|
+
state?: unknown;
|
|
13
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction>;
|
|
14
|
+
extra?: unknown;
|
|
15
|
+
rejectValue?: unknown;
|
|
16
|
+
serializedErrorType?: unknown;
|
|
17
|
+
pendingMeta?: unknown;
|
|
18
|
+
fulfilledMeta?: unknown;
|
|
19
|
+
rejectedMeta?: unknown;
|
|
20
|
+
}>;
|
|
21
|
+
export const productVariantReducer: import("redux").Reducer<{
|
|
22
|
+
loading: boolean;
|
|
23
|
+
moreLoading: boolean;
|
|
24
|
+
isListEnd: boolean;
|
|
25
|
+
productListVariables: any[];
|
|
26
|
+
listProductsAttributes: any[];
|
|
27
|
+
}, import("redux").AnyAction>;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
19
|
+
import { handlerApiCall } from '@axelor/aos-mobile-core';
|
|
20
|
+
import { fetchVariantAttributes, fetchVariants } from '../api/product-api';
|
|
21
|
+
export const fetchProductVariants = createAsyncThunk('product/fetchProductVariant', async function (productVariantId, { getState }) {
|
|
22
|
+
return handlerApiCall({
|
|
23
|
+
fetchFunction: fetchVariants,
|
|
24
|
+
data: productVariantId,
|
|
25
|
+
action: 'fetch product variants',
|
|
26
|
+
getState,
|
|
27
|
+
responseOptions: { isArrayResponse: true },
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
var getProductAttributes = async (data, { getState }) => {
|
|
31
|
+
return handlerApiCall({
|
|
32
|
+
fetchFunction: fetchVariantAttributes,
|
|
33
|
+
data,
|
|
34
|
+
action: 'fetch product variants attributes',
|
|
35
|
+
getState,
|
|
36
|
+
responseOptions: { isArrayResponse: true },
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
async function fetchData(data, { getState }) {
|
|
40
|
+
return await getProductAttributes(data, { getState });
|
|
41
|
+
}
|
|
42
|
+
export const fetchProductsAttributes = createAsyncThunk('product/fetchProductsAttributes', async function (data, { getState }) {
|
|
43
|
+
let promises = [];
|
|
44
|
+
data.productList.forEach(product => {
|
|
45
|
+
promises.push(fetchData({ productVariantId: product.id, version: product.version }, { getState }));
|
|
46
|
+
});
|
|
47
|
+
return Promise.all(promises);
|
|
48
|
+
});
|
|
49
|
+
const initialState = {
|
|
50
|
+
loading: false,
|
|
51
|
+
moreLoading: false,
|
|
52
|
+
isListEnd: false,
|
|
53
|
+
productListVariables: [],
|
|
54
|
+
listProductsAttributes: [],
|
|
55
|
+
};
|
|
56
|
+
const productSlice = createSlice({
|
|
57
|
+
name: 'productVariant',
|
|
58
|
+
initialState,
|
|
59
|
+
extraReducers: builder => {
|
|
60
|
+
builder.addCase(fetchProductVariants.pending, (state, action) => {
|
|
61
|
+
if (action.meta.arg.page === 0) {
|
|
62
|
+
state.loading = true;
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
state.moreLoading = true;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
builder.addCase(fetchProductVariants.fulfilled, (state, action) => {
|
|
69
|
+
state.loading = false;
|
|
70
|
+
state.moreLoading = false;
|
|
71
|
+
if (action.meta.arg.page === 0) {
|
|
72
|
+
state.productListVariables = action.payload;
|
|
73
|
+
state.isListEnd = false;
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
if (action.payload != null) {
|
|
77
|
+
state.isListEnd = false;
|
|
78
|
+
state.productListVariables = [
|
|
79
|
+
...state.productListVariables,
|
|
80
|
+
...action.payload,
|
|
81
|
+
];
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
state.isListEnd = true;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
builder.addCase(fetchProductsAttributes.pending, (state, action) => {
|
|
89
|
+
state.loading = true;
|
|
90
|
+
});
|
|
91
|
+
builder.addCase(fetchProductsAttributes.fulfilled, (state, action) => {
|
|
92
|
+
state.loading = false;
|
|
93
|
+
state.listProductsAttributes = action.payload;
|
|
94
|
+
});
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
export const productVariantReducer = productSlice.reducer;
|
|
98
|
+
//# sourceMappingURL=productVariantSlice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"productVariantSlice.js","sourceRoot":"","sources":["../../src/features/productVariantSlice.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAE,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAC,cAAc,EAAC,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAC,sBAAsB,EAAE,aAAa,EAAC,MAAM,o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CAAC,OAAO,CAAC,uBAAuB,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;YACjE,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;QACvB,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,OAAO,CAAC,uBAAuB,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;YACnE,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC;YACtB,KAAK,CAAC,sBAAsB,GAAG,MAAM,CAAC,OAAO,CAAC;QAChD,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,YAAY,CAAC,OAAO,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const getRacks: import("@reduxjs/toolkit").AsyncThunk<any[], void, {
|
|
2
|
+
state?: unknown;
|
|
3
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction>;
|
|
4
|
+
extra?: unknown;
|
|
5
|
+
rejectValue?: unknown;
|
|
6
|
+
serializedErrorType?: unknown;
|
|
7
|
+
pendingMeta?: unknown;
|
|
8
|
+
fulfilledMeta?: unknown;
|
|
9
|
+
rejectedMeta?: unknown;
|
|
10
|
+
}>;
|
|
11
|
+
export const rackReducer: import("redux").Reducer<{
|
|
12
|
+
loadingRacks: boolean;
|
|
13
|
+
racksList: any[];
|
|
14
|
+
}, import("redux").AnyAction>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
19
|
+
import { handlerApiCall } from '@axelor/aos-mobile-core';
|
|
20
|
+
import { searchStockLocationLine } from '../api/stock-location-line-api';
|
|
21
|
+
export const getRacks = createAsyncThunk('Utils/racks', async function (data, { getState }) {
|
|
22
|
+
let promises = [];
|
|
23
|
+
data.LineList.forEach(line => {
|
|
24
|
+
promises.push(fetchData(data.stockId, line, { getState }));
|
|
25
|
+
});
|
|
26
|
+
return Promise.all(promises).then(resultes => {
|
|
27
|
+
return resultes;
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
var getRack = async (stockId, productId, { getState }) => {
|
|
31
|
+
return handlerApiCall({
|
|
32
|
+
fetchFunction: searchStockLocationLine,
|
|
33
|
+
data: {
|
|
34
|
+
stockId: stockId,
|
|
35
|
+
productId: productId,
|
|
36
|
+
},
|
|
37
|
+
action: 'fetch rack',
|
|
38
|
+
getState,
|
|
39
|
+
responseOptions: { isArrayResponse: true },
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
async function fetchData(stockId, line, { getState }) {
|
|
43
|
+
return await getRack(stockId, line.product.id, { getState });
|
|
44
|
+
}
|
|
45
|
+
const initialState = {
|
|
46
|
+
loadingRacks: false,
|
|
47
|
+
racksList: [],
|
|
48
|
+
};
|
|
49
|
+
const rackSlice = createSlice({
|
|
50
|
+
name: 'rack',
|
|
51
|
+
initialState,
|
|
52
|
+
extraReducers: builder => {
|
|
53
|
+
builder.addCase(getRacks.pending, state => {
|
|
54
|
+
state.loadingRacks = true;
|
|
55
|
+
});
|
|
56
|
+
builder.addCase(getRacks.fulfilled, (state, action) => {
|
|
57
|
+
state.loadingRacks = false;
|
|
58
|
+
state.racksList = action.payload;
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
export const rackReducer = rackSlice.reducer;
|
|
63
|
+
//# sourceMappingURL=racksListSlice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"racksListSlice.js","sourceRoot":"","sources":["../../src/features/racksListSlice.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAE,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAC,cAAc,EAAC,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAC,uBAAuB,EAAC,MAAM,gCAAgC,CAAC;AAEvE,MAAM,CAAC,MAAM,QAAQ,GAAG,gBAAgB,CACtC,aAAa,EACb,KAAK,WAAW,IAAI,EAAE,EAAC,QAAQ,EAAC;IAC9B,IAAI,QAAQ,GAAG,EAAE,CAAC;IAClB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QAC3B,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,EAAC,QAAQ,EAAC,CAAC,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAC3C,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC,CACF,CAAC;AAEF,IAAI,OAAO,GAAG,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,EAAC,QAAQ,EAAC,EAAE,EAAE;IACrD,OAAO,cAAc,CAAC;QACpB,aAAa,EAAE,uBAAuB;QACtC,IAAI,EAAE;YACJ,OAAO,EAAE,OAAO;YAChB,SAAS,EAAE,SAAS;SACrB;QACD,MAAM,EAAE,YAAY;QACpB,QAAQ;QACR,eAAe,EAAE,EAAC,eAAe,EAAE,IAAI,EAAC;KACzC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,KAAK,UAAU,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,EAAC,QAAQ,EAAC;IAChD,OAAO,MAAM,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,EAAC,QAAQ,EAAC,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,YAAY,GAAG;IACnB,YAAY,EAAE,KAAK;IACnB,SAAS,EAAE,EAAE;CACd,CAAC;AAEF,MAAM,SAAS,GAAG,WAAW,CAAC;IAC5B,IAAI,EAAE,MAAM;IACZ,YAAY;IACZ,aAAa,EAAE,OAAO,CAAC,EAAE;QACvB,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE;YACxC,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;QAC5B,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;YACpD,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC;YAC3B,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC;QACnC,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,SAAS,CAAC,OAAO,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const fetchSupplychainConfigForStockApp: import("@reduxjs/toolkit").AsyncThunk<any, void, {
|
|
2
|
+
state?: unknown;
|
|
3
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction>;
|
|
4
|
+
extra?: unknown;
|
|
5
|
+
rejectValue?: unknown;
|
|
6
|
+
serializedErrorType?: unknown;
|
|
7
|
+
pendingMeta?: unknown;
|
|
8
|
+
fulfilledMeta?: unknown;
|
|
9
|
+
rejectedMeta?: unknown;
|
|
10
|
+
}>;
|
|
11
|
+
export const stockAppConfigReducer: import("redux").Reducer<{
|
|
12
|
+
loadingConfig: boolean;
|
|
13
|
+
supplychainConfig: {};
|
|
14
|
+
}, import("redux").AnyAction>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
19
|
+
import { handlerApiCall } from '@axelor/aos-mobile-core';
|
|
20
|
+
import { fetchSupplychainConfig } from '../api/supplychain-config-api';
|
|
21
|
+
export const fetchSupplychainConfigForStockApp = createAsyncThunk('stockAppConfig/fetchSupplychainConfigForStockApp', async function (data = {}, { getState }) {
|
|
22
|
+
return handlerApiCall({
|
|
23
|
+
fetchFunction: fetchSupplychainConfig,
|
|
24
|
+
data,
|
|
25
|
+
action: 'fetch supplychain config',
|
|
26
|
+
getState,
|
|
27
|
+
responseOptions: { isArrayResponse: false },
|
|
28
|
+
errorOptions: { showErrorToast: false, errorTracing: false },
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
const initialState = {
|
|
32
|
+
loadingConfig: false,
|
|
33
|
+
supplychainConfig: {},
|
|
34
|
+
};
|
|
35
|
+
const stockAppConfigSlice = createSlice({
|
|
36
|
+
name: 'stockAppConfig',
|
|
37
|
+
initialState,
|
|
38
|
+
extraReducers: builder => {
|
|
39
|
+
builder.addCase(fetchSupplychainConfigForStockApp.pending, state => {
|
|
40
|
+
state.loadingConfig = true;
|
|
41
|
+
});
|
|
42
|
+
builder.addCase(fetchSupplychainConfigForStockApp.fulfilled, (state, action) => {
|
|
43
|
+
state.loadingConfig = false;
|
|
44
|
+
state.supplychainConfig = action.payload;
|
|
45
|
+
});
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
export const stockAppConfigReducer = stockAppConfigSlice.reducer;
|
|
49
|
+
//# sourceMappingURL=stockAppConfigSlice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stockAppConfigSlice.js","sourceRoot":"","sources":["../../src/features/stockAppConfigSlice.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAE,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAC,cAAc,EAAC,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAC,sBAAsB,EAAC,MAAM,+BAA+B,CAAC;AAErE,MAAM,CAAC,MAAM,iCAAiC,GAAG,gBAAgB,CAC/D,kDAAkD,EAClD,KAAK,WAAW,IAAI,GAAG,EAAE,EAAE,EAAC,QAAQ,EAAC;IACnC,OAAO,cAAc,CAAC;QACpB,aAAa,EAAE,sBAAsB;QACrC,IAAI;QACJ,MAAM,EAAE,0BAA0B;QAClC,QAAQ;QACR,eAAe,EAAE,EAAC,eAAe,EAAE,KAAK,EAAC;QACzC,YAAY,EAAE,EAAC,cAAc,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAC;KAC3D,CAAC,CAAC;AACL,CAAC,CACF,CAAC;AAEF,MAAM,YAAY,GAAG;IACnB,aAAa,EAAE,KAAK;IACpB,iBAAiB,EAAE,EAAE;CACtB,CAAC;AAEF,MAAM,mBAAmB,GAAG,WAAW,CAAC;IACtC,IAAI,EAAE,gBAAgB;IACtB,YAAY;IACZ,aAAa,EAAE,OAAO,CAAC,EAAE;QACvB,OAAO,CAAC,OAAO,CAAC,iCAAiC,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE;YACjE,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC;QAC7B,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,OAAO,CACb,iCAAiC,CAAC,SAAS,EAC3C,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;YAChB,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC;YAC5B,KAAK,CAAC,iBAAiB,GAAG,MAAM,CAAC,OAAO,CAAC;QAC3C,CAAC,CACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,mBAAmB,CAAC,OAAO,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const fetchStockCorrectionReasons: import("@reduxjs/toolkit").AsyncThunk<any, void, {
|
|
2
|
+
state?: unknown;
|
|
3
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction>;
|
|
4
|
+
extra?: unknown;
|
|
5
|
+
rejectValue?: unknown;
|
|
6
|
+
serializedErrorType?: unknown;
|
|
7
|
+
pendingMeta?: unknown;
|
|
8
|
+
fulfilledMeta?: unknown;
|
|
9
|
+
rejectedMeta?: unknown;
|
|
10
|
+
}>;
|
|
11
|
+
export const stockCorrectionReasonReducer: import("redux").Reducer<{
|
|
12
|
+
loadingReasons: boolean;
|
|
13
|
+
stockCorrectionReasonList: any[];
|
|
14
|
+
}, import("redux").AnyAction>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
19
|
+
import { handlerApiCall } from '@axelor/aos-mobile-core';
|
|
20
|
+
import { searchStockCorrectionReason } from '../api/stock-correction-reason-api';
|
|
21
|
+
export const fetchStockCorrectionReasons = createAsyncThunk('stockCorrectionReason/fetchStockCorrectionReason', async function (data = {}, { getState }) {
|
|
22
|
+
return handlerApiCall({
|
|
23
|
+
fetchFunction: searchStockCorrectionReason,
|
|
24
|
+
data,
|
|
25
|
+
action: 'fetch stock correction reasons',
|
|
26
|
+
getState,
|
|
27
|
+
responseOptions: { isArrayResponse: true },
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
const initialState = {
|
|
31
|
+
loadingReasons: false,
|
|
32
|
+
stockCorrectionReasonList: [],
|
|
33
|
+
};
|
|
34
|
+
const stockCorrectionReasonSlice = createSlice({
|
|
35
|
+
name: 'stockCorrectionReason',
|
|
36
|
+
initialState,
|
|
37
|
+
extraReducers: builder => {
|
|
38
|
+
builder.addCase(fetchStockCorrectionReasons.pending, state => {
|
|
39
|
+
state.loading = true;
|
|
40
|
+
});
|
|
41
|
+
builder.addCase(fetchStockCorrectionReasons.fulfilled, (state, action) => {
|
|
42
|
+
state.loading = false;
|
|
43
|
+
state.stockCorrectionReasonList = action.payload;
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
export const stockCorrectionReasonReducer = stockCorrectionReasonSlice.reducer;
|
|
48
|
+
//# sourceMappingURL=stockCorrectionReasonSlice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stockCorrectionReasonSlice.js","sourceRoot":"","sources":["../../src/features/stockCorrectionReasonSlice.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAE,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAC,cAAc,EAAC,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAC,2BAA2B,EAAC,MAAM,oCAAoC,CAAC;AAE/E,MAAM,CAAC,MAAM,2BAA2B,GAAG,gBAAgB,CACzD,kDAAkD,EAClD,KAAK,WAAW,IAAI,GAAG,EAAE,EAAE,EAAC,QAAQ,EAAC;IACnC,OAAO,cAAc,CAAC;QACpB,aAAa,EAAE,2BAA2B;QAC1C,IAAI;QACJ,MAAM,EAAE,gCAAgC;QACxC,QAAQ;QACR,eAAe,EAAE,EAAC,eAAe,EAAE,IAAI,EAAC;KACzC,CAAC,CAAC;AACL,CAAC,CACF,CAAC;AAEF,MAAM,YAAY,GAAG;IACnB,cAAc,EAAE,KAAK;IACrB,yBAAyB,EAAE,EAAE;CAC9B,CAAC;AAEF,MAAM,0BAA0B,GAAG,WAAW,CAAC;IAC7C,IAAI,EAAE,uBAAuB;IAC7B,YAAY;IACZ,aAAa,EAAE,OAAO,CAAC,EAAE;QACvB,OAAO,CAAC,OAAO,CAAC,2BAA2B,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE;YAC3D,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;QACvB,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,OAAO,CAAC,2BAA2B,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;YACvE,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC;YACtB,KAAK,CAAC,yBAAyB,GAAG,MAAM,CAAC,OAAO,CAAC;QACnD,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG,0BAA0B,CAAC,OAAO,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export const fetchStockCorrections: import("@reduxjs/toolkit").AsyncThunk<any, void, {
|
|
2
|
+
state?: unknown;
|
|
3
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction>;
|
|
4
|
+
extra?: unknown;
|
|
5
|
+
rejectValue?: unknown;
|
|
6
|
+
serializedErrorType?: unknown;
|
|
7
|
+
pendingMeta?: unknown;
|
|
8
|
+
fulfilledMeta?: unknown;
|
|
9
|
+
rejectedMeta?: unknown;
|
|
10
|
+
}>;
|
|
11
|
+
export const createCorrection: import("@reduxjs/toolkit").AsyncThunk<any, void, {
|
|
12
|
+
state?: unknown;
|
|
13
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction>;
|
|
14
|
+
extra?: unknown;
|
|
15
|
+
rejectValue?: unknown;
|
|
16
|
+
serializedErrorType?: unknown;
|
|
17
|
+
pendingMeta?: unknown;
|
|
18
|
+
fulfilledMeta?: unknown;
|
|
19
|
+
rejectedMeta?: unknown;
|
|
20
|
+
}>;
|
|
21
|
+
export const updateCorrection: import("@reduxjs/toolkit").AsyncThunk<any, void, {
|
|
22
|
+
state?: unknown;
|
|
23
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction>;
|
|
24
|
+
extra?: unknown;
|
|
25
|
+
rejectValue?: unknown;
|
|
26
|
+
serializedErrorType?: unknown;
|
|
27
|
+
pendingMeta?: unknown;
|
|
28
|
+
fulfilledMeta?: unknown;
|
|
29
|
+
rejectedMeta?: unknown;
|
|
30
|
+
}>;
|
|
31
|
+
export const stockCorrectionReducer: import("redux").Reducer<{
|
|
32
|
+
loadingStockCorrection: boolean;
|
|
33
|
+
moreLoading: boolean;
|
|
34
|
+
isListEnd: boolean;
|
|
35
|
+
stockCorrectionList: any[];
|
|
36
|
+
createResponse: {};
|
|
37
|
+
updateResponse: {};
|
|
38
|
+
}, import("redux").AnyAction>;
|