2015-07-15 14:03:23 +02:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
import alt from '../alt';
|
2015-08-28 16:18:10 +02:00
|
|
|
import ContractActions from '../actions/contract_actions';
|
2015-07-15 14:03:23 +02:00
|
|
|
|
|
|
|
|
2015-08-28 16:18:10 +02:00
|
|
|
class ContractStore {
|
2015-07-15 14:03:23 +02:00
|
|
|
constructor() {
|
|
|
|
this.contractKey = null;
|
|
|
|
this.contractUrl = null;
|
2015-07-15 14:48:51 +02:00
|
|
|
this.contractEmail = null;
|
2015-08-28 16:18:10 +02:00
|
|
|
this.bindActions(ContractActions);
|
2015-07-15 14:03:23 +02:00
|
|
|
}
|
|
|
|
|
2015-08-28 16:18:10 +02:00
|
|
|
onUpdateContract({contractKey, contractUrl, contractEmail}) {
|
2015-07-15 14:03:23 +02:00
|
|
|
this.contractKey = contractKey;
|
|
|
|
this.contractUrl = contractUrl;
|
2015-07-15 14:48:51 +02:00
|
|
|
this.contractEmail = contractEmail;
|
2015-07-15 14:03:23 +02:00
|
|
|
}
|
2015-07-29 15:03:15 +02:00
|
|
|
|
2015-08-28 16:18:10 +02:00
|
|
|
onFlushContract() {
|
2015-07-29 15:03:15 +02:00
|
|
|
this.contractKey = null;
|
|
|
|
this.contractUrl = null;
|
|
|
|
this.contractEmail = null;
|
|
|
|
}
|
2015-07-15 14:03:23 +02:00
|
|
|
}
|
|
|
|
|
2015-08-28 16:18:10 +02:00
|
|
|
export default alt.createStore(ContractStore, 'ContractStore');
|