-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #331 from ymaheshwari1/bopis/fix-inventory
Fixed: support to display the stock for product as per the facility selected and removed unused mutations and types
- Loading branch information
Showing
4 changed files
with
13 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
import { GetterTree } from 'vuex' | ||
import StockState from './StockState' | ||
import RootState from '../../RootState' | ||
import store from '@/store' | ||
|
||
const getters: GetterTree <StockState, RootState> = { | ||
getProductStock: (state) => (productId: string) => { | ||
return state.products[productId] ? state.products[productId] : {} | ||
getProductStock: (state, RootState) => (productId: any) => { | ||
Check warning on line 7 in src/store/modules/stock/getters.ts GitHub Actions / call-workflow-in-another-repo / build_and_deploy
|
||
const facilityId = store.state.user?.currentFacility?.facilityId | ||
return state.products[productId] ? state.products[productId][facilityId] ? state.products[productId][facilityId] : {} : {} | ||
} | ||
} | ||
export default getters; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
export const SN_STOCK = 'stock' | ||
export const STOCK_ADD_PRODUCT = SN_STOCK + '/ADD_PRODUCT' | ||
export const STOCK_ADD_PRODUCTS = SN_STOCK + '/ADD_PRODUCTS' | ||
export const STOCK_ADD_PRODUCT = SN_STOCK + '/ADD_PRODUCT' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters