Example #1
0
        public async Task <IActionResult> Get()
        {
            var storeTypes           = _metadataService.GetStoreTypes();
            var massUnits            = _metadataService.GetMassUnit();
            var distanceUnits        = _metadataService.GetDistanceUnits();
            var stockAdjustmentTypes = _metadataService.GetStockAdjustmentTypes();
            var grnTypes             = _metadataService.GetGrnTypes();
            var deliveryStatus       = _metadataService.GetDeliveryStatus();
            var deliveryTypes        = _metadataService.GetDeliveryTypes();
            var unitOfMeasures       = await _productService.GetUnitOfMeasures();

            var purchaseOrderStatus    = _metadataService.GetPurchaseOrderStatus();
            var deliveryTrackingStatus = _metadataService.GetDeliveryTrackingStatus();
            var taxTypes = _metadataService.GetTaxTypes();
            var roles    = (await _accountService.GetRoles()).ToList();

            return(Ok(new
            {
                StoreTypes = storeTypes,
                MassUnits = massUnits,
                DistanceUnits = distanceUnits,
                StockAdjustmentTypes = stockAdjustmentTypes,
                GrnTypes = grnTypes,
                DeliveryStatus = deliveryStatus,
                DeliveryTypes = deliveryTypes,
                PurchaseOrderStatus = purchaseOrderStatus,
                UnitOfMeasures = unitOfMeasures.Select(_mapper.Map <UnitOfMeasureBindingModel>),
                TrackingStatus = deliveryTrackingStatus,
                TaxTypes = taxTypes,
                Roles = roles
            }));
        }