fix: appstate

This commit is contained in:
Hasta Ragil Saputra
2019-01-06 18:31:01 +07:00
4 changed files with 39 additions and 12 deletions

View File

@@ -59,6 +59,7 @@ import Odoo from './odoo';
import Vouchers from './vouchers';
import {PurchasedItemStore} from "./purchased_item";
import WalletStore from "./wallet";
import {PurchasedItemVouchserStore} from "./purchased_item_voucher";
export default class AppState {
http = new Http(this.token);
@@ -119,7 +120,7 @@ export default class AppState {
surf_turf = new Surf(this);
purchased_items = new PurchasedItemStore(this);
wallet = new WalletStore(this);
purchased_voucher = new PurchasedItemVouchserStore(this);
constructor(initialState) {
this.token = initialState.token;
@@ -178,4 +179,3 @@ export default class AppState {
return tokenData;
}
}

View File

@@ -0,0 +1,11 @@
import { BaseStore } from "./base_store";
import {observable, action} from "mobx/lib/mobx";
export class PurchasedItemVouchserStore extends BaseStore {
constructor(context) {
super(context);
this.url = "purchased_items/vouchers";
}
}