import { LOGIN_USER } from '../utils/types'

export default store => {
  store.subscribe(mutation => {
    if (mutation.type === LOGIN_USER) {
      // load master data keys
      store.dispatch('loadMasterDataKeys', [
        'sale_types',
        'sale_delivery_method',
        'ewallet_transaction_status',
        'ewallet_transaction_type',
        'ewallet_amount_type',
        'ethnic_group',
        'martial_status',
        'gender',
        'preferred_contact',
      ])
    }
  })
}
