Account & bookmarks deletion
This commit is contained in:
@@ -2356,18 +2356,12 @@ webpackJsonp([0,3],{
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.apiSignIn = apiSignIn;
|
||||
exports.apiSignUp = apiSignUp;
|
||||
exports.apiGetCurrentUser = apiGetCurrentUser;
|
||||
exports.apiCreateAccount = apiCreateAccount;
|
||||
exports.apiCreateRefAccount = apiCreateRefAccount;
|
||||
exports.apiMakeTransfer = apiMakeTransfer;
|
||||
exports.apiRetrieveAccounts = apiRetrieveAccounts;
|
||||
exports.apiRetrieveTransfers = apiRetrieveTransfers;
|
||||
exports.apiRetrieveAccount = apiRetrieveAccount;
|
||||
exports.apiDeleteAccount = apiDeleteAccount;
|
||||
exports.apiRetrieveUsers = apiRetrieveUsers;
|
||||
exports.apiRetrieveUser = apiRetrieveUser;
|
||||
exports.apiRetrieveUsers = exports.apiDeleteAccount = exports.apiRetrieveAccount = exports.apiRetrieveTransfers = exports.apiRetrieveAccounts = exports.apiMakeTransfer = exports.apiCreateRefAccount = exports.apiCreateAccount = exports.apiGetCurrentUser = exports.apiSignUp = exports.apiSignIn = undefined;
|
||||
|
||||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /**
|
||||
* Created by andrew on 12/03/16.
|
||||
*/
|
||||
|
||||
|
||||
var _fetch = __webpack_require__(322);
|
||||
|
||||
@@ -2383,177 +2377,111 @@ webpackJsonp([0,3],{
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/**
|
||||
* Created by andrew on 12/03/16.
|
||||
*/
|
||||
var fetch = function fetch() {
|
||||
return _fetch2.default.apply(undefined, arguments).then(_handleFetchResponse.parseResponse);
|
||||
};
|
||||
|
||||
function makeQuery(params) {
|
||||
return Object.keys(params).map(function (key) {
|
||||
return [encodeURIComponent(key), encodeURIComponent(params[key])].join('=');
|
||||
}).join('&');
|
||||
}
|
||||
|
||||
function apiSignIn(body) {
|
||||
return (0, _fetch2.default)((0, _sessionStorage.getEmailSignInUrl)(), {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
method: "post",
|
||||
body: _root2.default.JSON.stringify(body)
|
||||
}).then(_handleFetchResponse.parseResponse);
|
||||
}
|
||||
var JSON_HEADERS = {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
};
|
||||
|
||||
function apiSignUp(body) {
|
||||
return (0, _fetch2.default)((0, _sessionStorage.getEmailSignUpUrl)(), {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
method: "post",
|
||||
body: _root2.default.JSON.stringify(body)
|
||||
}).then(_handleFetchResponse.parseResponse);
|
||||
}
|
||||
|
||||
function apiGetCurrentUser() {
|
||||
return (0, _fetch2.default)((0, _sessionStorage.getCurrentUserUrl)(), {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
var METHODS = {
|
||||
DELETE: _extends({}, JSON_HEADERS, {
|
||||
method: "delete"
|
||||
}),
|
||||
GET: _extends({}, JSON_HEADERS, {
|
||||
method: "get"
|
||||
}).then(_handleFetchResponse.parseResponse);
|
||||
}
|
||||
}),
|
||||
POST: _extends({}, JSON_HEADERS, {
|
||||
method: "post"
|
||||
})
|
||||
};
|
||||
|
||||
function apiCreateAccount(customerId, _ref) {
|
||||
var apiSignIn = exports.apiSignIn = function apiSignIn(body) {
|
||||
return fetch((0, _sessionStorage.getEmailSignInUrl)(), _extends({}, METHODS.POST, {
|
||||
body: _root2.default.JSON.stringify(body)
|
||||
}));
|
||||
};
|
||||
|
||||
var apiSignUp = exports.apiSignUp = function apiSignUp(body) {
|
||||
return fetch((0, _sessionStorage.getEmailSignUpUrl)(), _extends({}, METHODS.POST, {
|
||||
body: _root2.default.JSON.stringify(body)
|
||||
}));
|
||||
};
|
||||
|
||||
var apiGetCurrentUser = exports.apiGetCurrentUser = function apiGetCurrentUser() {
|
||||
return fetch((0, _sessionStorage.getCurrentUserUrl)(), _extends({}, METHODS.GET));
|
||||
};
|
||||
|
||||
var apiCreateAccount = exports.apiCreateAccount = function apiCreateAccount(customerId, _ref) {
|
||||
var title = _ref.title;
|
||||
var initialBalance = _ref.balance;
|
||||
var description = _ref.description;
|
||||
|
||||
//{
|
||||
//"accountId": "0000015377cf131b-a250093f26850000"
|
||||
//}
|
||||
|
||||
return (0, _fetch2.default)((0, _sessionStorage.getAccountsUrl)(), {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
method: "post",
|
||||
return fetch((0, _sessionStorage.getAccountsUrl)(), _extends({}, METHODS.POST, {
|
||||
body: _root2.default.JSON.stringify({
|
||||
customerId: customerId,
|
||||
title: title,
|
||||
initialBalance: initialBalance,
|
||||
description: description })
|
||||
}).then(_handleFetchResponse.parseResponse);
|
||||
}
|
||||
}));
|
||||
};
|
||||
|
||||
function apiCreateRefAccount(customerId, _ref2) {
|
||||
var apiCreateRefAccount = exports.apiCreateRefAccount = function apiCreateRefAccount(customerId, _ref2) {
|
||||
var owner = _ref2.owner;
|
||||
var accountId = _ref2.account;
|
||||
var title = _ref2.title;
|
||||
var description = _ref2.description;
|
||||
|
||||
|
||||
return (0, _fetch2.default)((0, _sessionStorage.getCustomersUrl)() + '/' + customerId + '/toaccounts', {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
method: "post",
|
||||
return fetch((0, _sessionStorage.getCustomersUrl)() + '/' + customerId + '/toaccounts', _extends({}, METHODS.POST, {
|
||||
body: _root2.default.JSON.stringify({
|
||||
owner: owner,
|
||||
id: accountId,
|
||||
title: title,
|
||||
description: description })
|
||||
}).then(_handleFetchResponse.parseResponse);
|
||||
}
|
||||
}));
|
||||
};
|
||||
|
||||
function apiMakeTransfer(fromAccountId, _ref3) {
|
||||
var apiMakeTransfer = exports.apiMakeTransfer = function apiMakeTransfer(fromAccountId, _ref3) {
|
||||
var account = _ref3.account;
|
||||
var amount = _ref3.amount;
|
||||
var description = _ref3.description;
|
||||
|
||||
|
||||
return (0, _fetch2.default)((0, _sessionStorage.getTransfersUrl)(), {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
method: "post",
|
||||
return fetch((0, _sessionStorage.getTransfersUrl)(), _extends({}, METHODS.POST, {
|
||||
body: _root2.default.JSON.stringify({
|
||||
"amount": amount,
|
||||
"fromAccountId": fromAccountId,
|
||||
"toAccountId": account,
|
||||
description: description
|
||||
})
|
||||
}).then(_handleFetchResponse.parseResponse);
|
||||
}
|
||||
}));
|
||||
};
|
||||
|
||||
function apiRetrieveAccounts(customerId) {
|
||||
var apiRetrieveAccounts = exports.apiRetrieveAccounts = function apiRetrieveAccounts(customerId) {
|
||||
return fetch((0, _sessionStorage.getCustomersUrl)() + '/' + customerId + '/accounts', _extends({}, METHODS.GET));
|
||||
};
|
||||
|
||||
return (0, _fetch2.default)((0, _sessionStorage.getCustomersUrl)() + '/' + customerId + '/accounts', {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
method: "get"
|
||||
}).then(_handleFetchResponse.parseResponse);
|
||||
}
|
||||
var apiRetrieveTransfers = exports.apiRetrieveTransfers = function apiRetrieveTransfers(accountId) {
|
||||
return fetch((0, _sessionStorage.getAccountsUrl)() + '/' + accountId + '/history', _extends({}, METHODS.GET));
|
||||
};
|
||||
|
||||
function apiRetrieveTransfers(accountId) {
|
||||
var apiRetrieveAccount = exports.apiRetrieveAccount = function apiRetrieveAccount(accountId) {
|
||||
return fetch((0, _sessionStorage.getAccountsUrl)() + '/' + accountId, _extends({}, METHODS.GET));
|
||||
};
|
||||
|
||||
return (0, _fetch2.default)((0, _sessionStorage.getAccountsUrl)() + '/' + accountId + '/history', {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
method: "get"
|
||||
}).then(_handleFetchResponse.parseResponse);
|
||||
}
|
||||
var apiDeleteAccount = exports.apiDeleteAccount = function apiDeleteAccount(customerId, accountId) {
|
||||
return fetch((0, _sessionStorage.getCustomersUrl)() + '/' + customerId + '/accounts/' + accountId, _extends({}, METHODS.DELETE));
|
||||
};
|
||||
|
||||
function apiRetrieveAccount(accountId) {
|
||||
return (0, _fetch2.default)((0, _sessionStorage.getAccountsUrl)() + '/' + accountId, {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
method: "get"
|
||||
}).then(_handleFetchResponse.parseResponse);
|
||||
}
|
||||
|
||||
function apiDeleteAccount(accountId) {
|
||||
return Promise.reject({
|
||||
message: '\'Delete Account\' is not implemented.'
|
||||
});
|
||||
|
||||
return (0, _fetch2.default)((0, _sessionStorage.getAccountsUrl)() + '/' + accountId, {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
method: "delete"
|
||||
}).then(_handleFetchResponse.parseResponse);
|
||||
}
|
||||
|
||||
function apiRetrieveUsers(email) {
|
||||
return (0, _fetch2.default)((0, _sessionStorage.getCustomersUrl)() + '?' + makeQuery({ email: email }), {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
method: "get"
|
||||
}).then(_handleFetchResponse.parseResponse);
|
||||
}
|
||||
|
||||
function apiRetrieveUser(customerId) {
|
||||
return (0, _fetch2.default)((0, _sessionStorage.getCustomersUrl)() + '/' + customerId, {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
method: "get"
|
||||
}).then(_handleFetchResponse.parseResponse);
|
||||
}
|
||||
var apiRetrieveUsers = exports.apiRetrieveUsers = function apiRetrieveUsers(email) {
|
||||
return fetch((0, _sessionStorage.getCustomersUrl)() + '?' + makeQuery({ email: email }), _extends({}, METHODS.GET));
|
||||
};
|
||||
|
||||
/* REACT HOT LOADER */ }).call(this); } finally { if (false) { (function () { var foundReactClasses = module.hot.data && module.hot.data.foundReactClasses || false; if (module.exports && module.makeHot) { var makeExportsHot = require("/Users/andrew/dev/clients/ES/code/event-sourcing-examples/js-frontend/node_modules/react-hot-loader/makeExportsHot.js"); if (makeExportsHot(module, require("react"))) { foundReactClasses = true; } var shouldAcceptModule = true && foundReactClasses; if (shouldAcceptModule) { module.hot.accept(function (err) { if (err) { console.error("Cannot not apply hot update to " + "api.js" + ": " + err.message); } }); } } module.hot.dispose(function (data) { data.makeHot = module.makeHot; data.foundReactClasses = foundReactClasses; }); })(); } }
|
||||
|
||||
@@ -2789,11 +2717,14 @@ webpackJsonp([0,3],{
|
||||
var accountComplete = exports.accountComplete = (0, _actions.makeActionCreator)(_ACTION_TYPES2.default.ACCOUNT.SINGLE_COMPLETE, 'payload');
|
||||
var accountError = exports.accountError = (0, _actions.makeActionCreator)(_ACTION_TYPES2.default.ACCOUNT.SINGLE_ERROR, 'error');
|
||||
|
||||
function accountsList(userId) {
|
||||
function accountsList(customerId) {
|
||||
return function (dispatch) {
|
||||
dispatch(accountsListRequested());
|
||||
return api.apiRetrieveAccounts(userId).then(function (list) {
|
||||
dispatch(accountsListReceived(list));
|
||||
return api.apiRetrieveAccounts(customerId).then(function (_ref) {
|
||||
var _ref$accounts = _ref.accounts;
|
||||
var accounts = _ref$accounts === undefined ? [] : _ref$accounts;
|
||||
|
||||
dispatch(accountsListReceived(accounts));
|
||||
}).catch(function (err) {
|
||||
dispatch(accountsListError(err));
|
||||
return Promise.resolve({ error: err });
|
||||
@@ -2851,8 +2782,8 @@ webpackJsonp([0,3],{
|
||||
function accountRefCreate(customerId, payload) {
|
||||
return function (dispatch) {
|
||||
dispatch(accountRefCreateStart());
|
||||
return api.apiCreateRefAccount(customerId, payload).then(function (_ref) {
|
||||
var id = _ref.id;
|
||||
return api.apiCreateRefAccount(customerId, payload).then(function (_ref2) {
|
||||
var id = _ref2.id;
|
||||
|
||||
dispatch(accountRefCreateComplete(_extends({}, payload, {
|
||||
id: id
|
||||
@@ -2894,10 +2825,9 @@ webpackJsonp([0,3],{
|
||||
function deleteAccount(customerId, accountId) {
|
||||
return function (dispatch) {
|
||||
dispatch(deleteAccountRequested());
|
||||
return api.apiDeleteAccount(accountId).then(function (data) {
|
||||
//debugger;
|
||||
dispatch(deleteAccountComplete());
|
||||
return Promise.resolve('ok');
|
||||
return api.apiDeleteAccount(customerId, accountId).then(function (data) {
|
||||
dispatch(deleteAccountComplete(data));
|
||||
return Promise.resolve(data);
|
||||
}).catch(function (err) {
|
||||
dispatch(deleteAccountError());
|
||||
return Promise.reject(err);
|
||||
@@ -2927,10 +2857,10 @@ webpackJsonp([0,3],{
|
||||
return function (dispatch) {
|
||||
dispatch(createRefOwnerLookupStart(lookup));
|
||||
return api.apiRetrieveUsers(lookup).then(function (data) {
|
||||
var _ref2 = data || {};
|
||||
var _ref3 = data || {};
|
||||
|
||||
var _ref2$customers = _ref2.customers;
|
||||
var customers = _ref2$customers === undefined ? [] : _ref2$customers;
|
||||
var _ref3$customers = _ref3.customers;
|
||||
var customers = _ref3$customers === undefined ? [] : _ref3$customers;
|
||||
|
||||
|
||||
var arr = customers.map(function (c) {
|
||||
@@ -2958,13 +2888,13 @@ webpackJsonp([0,3],{
|
||||
|
||||
var createRefAccountLookup = exports.createRefAccountLookup = function createRefAccountLookup(customerId) {
|
||||
return function (dispatch) {
|
||||
dispatch(createRefAccountLookupStart());
|
||||
return api.apiRetrieveAccounts(customerId).then(function (_ref3) {
|
||||
var accounts = _ref3.accounts;
|
||||
dispatch(createRefAccountLookupStart(customerId));
|
||||
return api.apiRetrieveAccounts(customerId).then(function (_ref4) {
|
||||
var accounts = _ref4.accounts;
|
||||
|
||||
var arr = accounts.map(function (_ref4) {
|
||||
var accountId = _ref4.accountId;
|
||||
var title = _ref4.title;
|
||||
var arr = accounts.map(function (_ref5) {
|
||||
var accountId = _ref5.accountId;
|
||||
var title = _ref5.title;
|
||||
return {
|
||||
value: accountId,
|
||||
label: title
|
||||
@@ -3810,19 +3740,13 @@ webpackJsonp([0,3],{
|
||||
|
||||
var BS = _interopRequireWildcard(_reactBootstrap);
|
||||
|
||||
var _reactRouter = __webpack_require__(183);
|
||||
|
||||
var _reactRedux = __webpack_require__(170);
|
||||
|
||||
var _reactSelect = __webpack_require__(582);
|
||||
|
||||
var _reactSelect2 = _interopRequireDefault(_reactSelect);
|
||||
|
||||
var _AccountInfo = __webpack_require__(588);
|
||||
var _AccountInfo = __webpack_require__(582);
|
||||
|
||||
var _AccountInfo2 = _interopRequireDefault(_AccountInfo);
|
||||
|
||||
var _modals = __webpack_require__(591);
|
||||
var _modals = __webpack_require__(585);
|
||||
|
||||
var Modals = _interopRequireWildcard(_modals);
|
||||
|
||||
@@ -3834,6 +3758,10 @@ webpackJsonp([0,3],{
|
||||
|
||||
var A = _interopRequireWildcard(_entities);
|
||||
|
||||
var _authenticate = __webpack_require__(315);
|
||||
|
||||
var AU = _interopRequireWildcard(_authenticate);
|
||||
|
||||
var _readProp = __webpack_require__(331);
|
||||
|
||||
var _readProp2 = _interopRequireDefault(_readProp);
|
||||
@@ -3852,8 +3780,6 @@ webpackJsonp([0,3],{
|
||||
* Created by andrew on 17/02/16.
|
||||
*/
|
||||
|
||||
//import * as DefaultTheme from "redux-auth";
|
||||
|
||||
|
||||
var resetModals = {
|
||||
showAccountModal: false,
|
||||
@@ -3925,14 +3851,16 @@ webpackJsonp([0,3],{
|
||||
value: function create3rdPartyAccountModalConfirmed(payload) {
|
||||
var _this3 = this;
|
||||
|
||||
var customerId = this.props.auth.user.attributes.id;
|
||||
var _props$auth$user$attr = this.props.auth.user.attributes;
|
||||
var customerId = _props$auth$user$attr.id;
|
||||
var dispatch = _props$auth$user$attr.dispatch;
|
||||
|
||||
|
||||
this.props.dispatch(A.accountRefCreate(customerId, payload)).then(function () {
|
||||
dispatch(A.accountRefCreate(customerId, payload)).then(function () {
|
||||
_this3.close();
|
||||
return new Promise(function (rs, rj) {
|
||||
setTimeout(function () {
|
||||
_this3.props.dispatch(A.fetchOwnAccounts(customerId)).then(rs, rj);
|
||||
Promise.all([dispatch(AU.authenticate(true)), dispatch(A.fetchOwnAccounts(customerId))]).then(rs, rj);
|
||||
}, 1500);
|
||||
});
|
||||
}).catch(function (err) {
|
||||
@@ -3954,12 +3882,17 @@ webpackJsonp([0,3],{
|
||||
value: function remove3rdPartyAccountModalConfirmed(accountId) {
|
||||
var _this4 = this;
|
||||
|
||||
var customerId = this.props.customerId;
|
||||
var _props = this.props;
|
||||
var customerId = _props.customerId;
|
||||
var dispatch = _props.dispatch;
|
||||
|
||||
this.props.dispatch(A.deleteAccount(customerId, accountId)).then(function () {
|
||||
dispatch(A.deleteAccount(customerId, accountId)).then(function () {
|
||||
_this4.close();
|
||||
setTimeout(function () {
|
||||
return Promise.all([dispatch(AU.authenticate(true)), dispatch(A.fetchOwnAccounts(customerId))]);
|
||||
}, 1500);
|
||||
}, function (err) {
|
||||
_this4.props.dispatch(A.errorMessageTimedOut(err && err.message || err));
|
||||
dispatch(A.errorMessageTimedOut(err && err.message || err));
|
||||
_this4.close();
|
||||
});
|
||||
}
|
||||
@@ -4283,7 +4216,7 @@ webpackJsonp([0,3],{
|
||||
|
||||
/***/ },
|
||||
|
||||
/***/ 588:
|
||||
/***/ 582:
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
|
||||
/* REACT HOT LOADER */ if (false) { (function () { var ReactHotAPI = require("/Users/andrew/dev/clients/ES/code/event-sourcing-examples/js-frontend/node_modules/react-hot-loader/node_modules/react-hot-api/modules/index.js"), RootInstanceProvider = require("/Users/andrew/dev/clients/ES/code/event-sourcing-examples/js-frontend/node_modules/react-hot-loader/RootInstanceProvider.js"), ReactMount = require("react/lib/ReactMount"), React = require("react"); module.makeHot = module.hot.data ? module.hot.data.makeHot : ReactHotAPI(function () { return RootInstanceProvider.getRootInstances(ReactMount); }, React); })(); } try { (function () {
|
||||
@@ -4303,7 +4236,7 @@ webpackJsonp([0,3],{
|
||||
|
||||
var _reactRedux = __webpack_require__(170);
|
||||
|
||||
var _reactLoader = __webpack_require__(589);
|
||||
var _reactLoader = __webpack_require__(583);
|
||||
|
||||
var _reactLoader2 = _interopRequireDefault(_reactLoader);
|
||||
|
||||
@@ -4422,7 +4355,7 @@ webpackJsonp([0,3],{
|
||||
|
||||
/***/ },
|
||||
|
||||
/***/ 591:
|
||||
/***/ 585:
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
|
||||
/* REACT HOT LOADER */ if (false) { (function () { var ReactHotAPI = require("/Users/andrew/dev/clients/ES/code/event-sourcing-examples/js-frontend/node_modules/react-hot-loader/node_modules/react-hot-api/modules/index.js"), RootInstanceProvider = require("/Users/andrew/dev/clients/ES/code/event-sourcing-examples/js-frontend/node_modules/react-hot-loader/RootInstanceProvider.js"), ReactMount = require("react/lib/ReactMount"), React = require("react"); module.makeHot = module.hot.data ? module.hot.data.makeHot : ReactHotAPI(function () { return RootInstanceProvider.getRootInstances(ReactMount); }, React); })(); } try { (function () {
|
||||
@@ -4433,7 +4366,7 @@ webpackJsonp([0,3],{
|
||||
value: true
|
||||
});
|
||||
|
||||
var _Add3rdPartyAccountModal = __webpack_require__(592);
|
||||
var _Add3rdPartyAccountModal = __webpack_require__(586);
|
||||
|
||||
Object.defineProperty(exports, 'Add3rdPartyAccountModal', {
|
||||
enumerable: true,
|
||||
@@ -4466,7 +4399,7 @@ webpackJsonp([0,3],{
|
||||
|
||||
/***/ },
|
||||
|
||||
/***/ 592:
|
||||
/***/ 586:
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
|
||||
/* REACT HOT LOADER */ if (false) { (function () { var ReactHotAPI = require("/Users/andrew/dev/clients/ES/code/event-sourcing-examples/js-frontend/node_modules/react-hot-loader/node_modules/react-hot-api/modules/index.js"), RootInstanceProvider = require("/Users/andrew/dev/clients/ES/code/event-sourcing-examples/js-frontend/node_modules/react-hot-loader/RootInstanceProvider.js"), ReactMount = require("react/lib/ReactMount"), React = require("react"); module.makeHot = module.hot.data ? module.hot.data.makeHot : ReactHotAPI(function () { return RootInstanceProvider.getRootInstances(ReactMount); }, React); })(); } try { (function () {
|
||||
@@ -4490,15 +4423,15 @@ webpackJsonp([0,3],{
|
||||
|
||||
var BS = _interopRequireWildcard(_reactBootstrap);
|
||||
|
||||
var _ButtonLoader = __webpack_require__(593);
|
||||
var _ButtonLoader = __webpack_require__(587);
|
||||
|
||||
var _ButtonLoader2 = _interopRequireDefault(_ButtonLoader);
|
||||
|
||||
var _Input = __webpack_require__(594);
|
||||
var _Input = __webpack_require__(588);
|
||||
|
||||
var _Input2 = _interopRequireDefault(_Input);
|
||||
|
||||
var _AuxErrorLabel = __webpack_require__(595);
|
||||
var _AuxErrorLabel = __webpack_require__(589);
|
||||
|
||||
var _AuxErrorLabel2 = _interopRequireDefault(_AuxErrorLabel);
|
||||
|
||||
@@ -4510,7 +4443,7 @@ webpackJsonp([0,3],{
|
||||
|
||||
var _reactRedux = __webpack_require__(170);
|
||||
|
||||
var _reactSelect = __webpack_require__(582);
|
||||
var _reactSelect = __webpack_require__(590);
|
||||
|
||||
var _reactSelect2 = _interopRequireDefault(_reactSelect);
|
||||
|
||||
@@ -4760,7 +4693,7 @@ webpackJsonp([0,3],{
|
||||
|
||||
/***/ },
|
||||
|
||||
/***/ 593:
|
||||
/***/ 587:
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
|
||||
/* REACT HOT LOADER */ if (false) { (function () { var ReactHotAPI = require("/Users/andrew/dev/clients/ES/code/event-sourcing-examples/js-frontend/node_modules/react-hot-loader/node_modules/react-hot-api/modules/index.js"), RootInstanceProvider = require("/Users/andrew/dev/clients/ES/code/event-sourcing-examples/js-frontend/node_modules/react-hot-loader/RootInstanceProvider.js"), ReactMount = require("react/lib/ReactMount"), React = require("react"); module.makeHot = module.hot.data ? module.hot.data.makeHot : ReactHotAPI(function () { return RootInstanceProvider.getRootInstances(ReactMount); }, React); })(); } try { (function () {
|
||||
@@ -4781,7 +4714,7 @@ webpackJsonp([0,3],{
|
||||
|
||||
var _reactBootstrap = __webpack_require__(333);
|
||||
|
||||
var _reactLoader = __webpack_require__(589);
|
||||
var _reactLoader = __webpack_require__(583);
|
||||
|
||||
var _reactLoader2 = _interopRequireDefault(_reactLoader);
|
||||
|
||||
@@ -4888,7 +4821,7 @@ webpackJsonp([0,3],{
|
||||
|
||||
/***/ },
|
||||
|
||||
/***/ 594:
|
||||
/***/ 588:
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
|
||||
/* REACT HOT LOADER */ if (false) { (function () { var ReactHotAPI = require("/Users/andrew/dev/clients/ES/code/event-sourcing-examples/js-frontend/node_modules/react-hot-loader/node_modules/react-hot-api/modules/index.js"), RootInstanceProvider = require("/Users/andrew/dev/clients/ES/code/event-sourcing-examples/js-frontend/node_modules/react-hot-loader/RootInstanceProvider.js"), ReactMount = require("react/lib/ReactMount"), React = require("react"); module.makeHot = module.hot.data ? module.hot.data.makeHot : ReactHotAPI(function () { return RootInstanceProvider.getRootInstances(ReactMount); }, React); })(); } try { (function () {
|
||||
@@ -5000,7 +4933,7 @@ webpackJsonp([0,3],{
|
||||
|
||||
/***/ },
|
||||
|
||||
/***/ 595:
|
||||
/***/ 589:
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
|
||||
/* REACT HOT LOADER */ if (false) { (function () { var ReactHotAPI = require("/Users/andrew/dev/clients/ES/code/event-sourcing-examples/js-frontend/node_modules/react-hot-loader/node_modules/react-hot-api/modules/index.js"), RootInstanceProvider = require("/Users/andrew/dev/clients/ES/code/event-sourcing-examples/js-frontend/node_modules/react-hot-loader/RootInstanceProvider.js"), ReactMount = require("react/lib/ReactMount"), React = require("react"); module.makeHot = module.hot.data ? module.hot.data.makeHot : ReactHotAPI(function () { return RootInstanceProvider.getRootInstances(ReactMount); }, React); })(); } try { (function () {
|
||||
@@ -5125,11 +5058,11 @@ webpackJsonp([0,3],{
|
||||
|
||||
var BS = _interopRequireWildcard(_reactBootstrap);
|
||||
|
||||
var _Input = __webpack_require__(594);
|
||||
var _Input = __webpack_require__(588);
|
||||
|
||||
var _Input2 = _interopRequireDefault(_Input);
|
||||
|
||||
var _ButtonLoader = __webpack_require__(593);
|
||||
var _ButtonLoader = __webpack_require__(587);
|
||||
|
||||
var _ButtonLoader2 = _interopRequireDefault(_ButtonLoader);
|
||||
|
||||
@@ -5348,7 +5281,7 @@ webpackJsonp([0,3],{
|
||||
|
||||
var _reactRedux = __webpack_require__(170);
|
||||
|
||||
var _reactSelect = __webpack_require__(582);
|
||||
var _reactSelect = __webpack_require__(590);
|
||||
|
||||
var _reactSelect2 = _interopRequireDefault(_reactSelect);
|
||||
|
||||
@@ -5407,9 +5340,9 @@ webpackJsonp([0,3],{
|
||||
|
||||
var entityId = id || accountId;
|
||||
|
||||
var title = titleRaw || '[No title]';
|
||||
var balance = (balanceRaw > 0 && balanceRaw < 1 ? '$0' : '$') + Number(balanceRaw).toFixed(2);
|
||||
var description = descriptionRaw || '[No description]';
|
||||
var title = titleRaw || '—';
|
||||
var balance = isNaN(balanceRaw) ? '—' : (balanceRaw > 0 && balanceRaw < 1 ? '$0' : '$') + Number(balanceRaw).toFixed(2);
|
||||
var description = descriptionRaw || '—';
|
||||
|
||||
return _react2.default.createElement(
|
||||
_reactBootstrap.Modal,
|
||||
@@ -5631,11 +5564,11 @@ webpackJsonp([0,3],{
|
||||
|
||||
var BS = _interopRequireWildcard(_reactBootstrap);
|
||||
|
||||
var _reactSelect = __webpack_require__(582);
|
||||
var _reactSelect = __webpack_require__(590);
|
||||
|
||||
var _reactSelect2 = _interopRequireDefault(_reactSelect);
|
||||
|
||||
var _Input = __webpack_require__(594);
|
||||
var _Input = __webpack_require__(588);
|
||||
|
||||
var _Input2 = _interopRequireDefault(_Input);
|
||||
|
||||
@@ -5649,7 +5582,7 @@ webpackJsonp([0,3],{
|
||||
|
||||
var _IndexPanel2 = _interopRequireDefault(_IndexPanel);
|
||||
|
||||
var _modals = __webpack_require__(591);
|
||||
var _modals = __webpack_require__(585);
|
||||
|
||||
var Modals = _interopRequireWildcard(_modals);
|
||||
|
||||
@@ -6135,7 +6068,7 @@ webpackJsonp([0,3],{
|
||||
|
||||
var _react2 = _interopRequireDefault(_react);
|
||||
|
||||
var _reactLoader = __webpack_require__(589);
|
||||
var _reactLoader = __webpack_require__(583);
|
||||
|
||||
var _reactLoader2 = _interopRequireDefault(_reactLoader);
|
||||
|
||||
@@ -6149,7 +6082,7 @@ webpackJsonp([0,3],{
|
||||
|
||||
var _Money = __webpack_require__(599);
|
||||
|
||||
var _AccountInfo = __webpack_require__(588);
|
||||
var _AccountInfo = __webpack_require__(582);
|
||||
|
||||
var _AccountInfo2 = _interopRequireDefault(_AccountInfo);
|
||||
|
||||
@@ -6592,15 +6525,15 @@ webpackJsonp([0,3],{
|
||||
|
||||
var BS = _interopRequireWildcard(_reactBootstrap);
|
||||
|
||||
var _Input = __webpack_require__(594);
|
||||
var _Input = __webpack_require__(588);
|
||||
|
||||
var _Input2 = _interopRequireDefault(_Input);
|
||||
|
||||
var _ButtonLoader = __webpack_require__(593);
|
||||
var _ButtonLoader = __webpack_require__(587);
|
||||
|
||||
var _ButtonLoader2 = _interopRequireDefault(_ButtonLoader);
|
||||
|
||||
var _AuxErrorLabel = __webpack_require__(595);
|
||||
var _AuxErrorLabel = __webpack_require__(589);
|
||||
|
||||
var _AuxErrorLabel2 = _interopRequireDefault(_AuxErrorLabel);
|
||||
|
||||
@@ -6957,11 +6890,11 @@ webpackJsonp([0,3],{
|
||||
|
||||
var _reactBootstrap = __webpack_require__(333);
|
||||
|
||||
var _Input = __webpack_require__(594);
|
||||
var _Input = __webpack_require__(588);
|
||||
|
||||
var _Input2 = _interopRequireDefault(_Input);
|
||||
|
||||
var _ButtonLoader = __webpack_require__(593);
|
||||
var _ButtonLoader = __webpack_require__(587);
|
||||
|
||||
var _ButtonLoader2 = _interopRequireDefault(_ButtonLoader);
|
||||
|
||||
@@ -6969,7 +6902,7 @@ webpackJsonp([0,3],{
|
||||
|
||||
var _IndexPanel2 = _interopRequireDefault(_IndexPanel);
|
||||
|
||||
var _AuxErrorLabel = __webpack_require__(595);
|
||||
var _AuxErrorLabel = __webpack_require__(589);
|
||||
|
||||
var _AuxErrorLabel2 = _interopRequireDefault(_AuxErrorLabel);
|
||||
|
||||
@@ -7339,4 +7272,4 @@ webpackJsonp([0,3],{
|
||||
/***/ }
|
||||
|
||||
});
|
||||
//# sourceMappingURL=app.4d33d25a9b5872086180.js.map
|
||||
//# sourceMappingURL=app.0f8c47485a49f44c2404.js.map
|
||||
1
js-frontend/build/app.0f8c47485a49f44c2404.js.map
Normal file
1
js-frontend/build/app.0f8c47485a49f44c2404.js.map
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -13,7 +13,7 @@
|
||||
|
||||
<!-- Optional theme -->
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap-theme.min.css"><link href="/style.6734b6ac5d23d61b8e5f.css" rel="stylesheet"></head>
|
||||
<body><div id="root"></div><script src="/manifest.9a73c590403a64f40c41.js"></script><script src="/vendor.829a6cd5501868837732.js"></script><script src="/style.6734b6ac5d23d61b8e5f.js"></script><script src="/app.4d33d25a9b5872086180.js"></script><script>
|
||||
<body><div id="root"></div><script src="/manifest.445ede0f13a048c8cbfa.js"></script><script src="/vendor.d3d74fb754fa5fff76bc.js"></script><script src="/style.6734b6ac5d23d61b8e5f.js"></script><script src="/app.0f8c47485a49f44c2404.js"></script><script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
@@ -27,5 +27,5 @@
|
||||
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script><!--{"files":{"publicPath":"/","chunks":{"manifest":{"size":0,"entry":"/manifest.9a73c590403a64f40c41.js","hash":"9a73c590403a64f40c41","css":[]},"vendor":{"size":1670874,"entry":"/vendor.829a6cd5501868837732.js","hash":"829a6cd5501868837732","css":[]},"style":{"size":122,"entry":"/style.6734b6ac5d23d61b8e5f.js","hash":"6734b6ac5d23d61b8e5f","css":["/style.6734b6ac5d23d61b8e5f.css"]},"app":{"size":351970,"entry":"/app.4d33d25a9b5872086180.js","hash":"4d33d25a9b5872086180","css":[]}},"js":["/manifest.9a73c590403a64f40c41.js","/vendor.829a6cd5501868837732.js","/style.6734b6ac5d23d61b8e5f.js","/app.4d33d25a9b5872086180.js"],"css":["/style.6734b6ac5d23d61b8e5f.css"]},"options":{"template":"/Users/andrew/dev/clients/ES/code/event-sourcing-examples/js-frontend/node_modules/html-webpack-plugin/lib/loader.js!/Users/andrew/dev/clients/ES/code/event-sourcing-examples/js-frontend/public/index.ejs","filename":"index.html","hash":false,"inject":false,"compile":true,"favicon":false,"minify":false,"cache":true,"showErrors":true,"chunks":"all","excludeChunks":[],"title":"Money Transfer App","xhtml":false,"description":"ES Money Transfer App","appMountId":"root","googleAnalytics":{"trackingId":"UA-XXXX-XX","pageViewOnLoad":true},"mobile":true}}--></body>
|
||||
</script><!--{"files":{"publicPath":"/","chunks":{"manifest":{"size":0,"entry":"/manifest.445ede0f13a048c8cbfa.js","hash":"445ede0f13a048c8cbfa","css":[]},"vendor":{"size":1670874,"entry":"/vendor.d3d74fb754fa5fff76bc.js","hash":"d3d74fb754fa5fff76bc","css":[]},"style":{"size":122,"entry":"/style.6734b6ac5d23d61b8e5f.js","hash":"6734b6ac5d23d61b8e5f","css":["/style.6734b6ac5d23d61b8e5f.css"]},"app":{"size":351839,"entry":"/app.0f8c47485a49f44c2404.js","hash":"0f8c47485a49f44c2404","css":[]}},"js":["/manifest.445ede0f13a048c8cbfa.js","/vendor.d3d74fb754fa5fff76bc.js","/style.6734b6ac5d23d61b8e5f.js","/app.0f8c47485a49f44c2404.js"],"css":["/style.6734b6ac5d23d61b8e5f.css"]},"options":{"template":"/Users/andrew/dev/clients/ES/code/event-sourcing-examples/js-frontend/node_modules/html-webpack-plugin/lib/loader.js!/Users/andrew/dev/clients/ES/code/event-sourcing-examples/js-frontend/public/index.ejs","filename":"index.html","hash":false,"inject":false,"compile":true,"favicon":false,"minify":false,"cache":true,"showErrors":true,"chunks":"all","excludeChunks":[],"title":"Money Transfer App","xhtml":false,"description":"ES Money Transfer App","appMountId":"root","googleAnalytics":{"trackingId":"UA-XXXX-XX","pageViewOnLoad":true},"mobile":true}}--></body>
|
||||
</html>
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
/******/ script.charset = 'utf-8';
|
||||
/******/ script.async = true;
|
||||
/******/
|
||||
/******/ script.src = __webpack_require__.p + "" + {"0":"4d33d25a9b5872086180","1":"6734b6ac5d23d61b8e5f","2":"829a6cd5501868837732"}[chunkId] + ".js";
|
||||
/******/ script.src = __webpack_require__.p + "" + {"0":"0f8c47485a49f44c2404","1":"6734b6ac5d23d61b8e5f","2":"d3d74fb754fa5fff76bc"}[chunkId] + ".js";
|
||||
/******/ head.appendChild(script);
|
||||
/******/ }
|
||||
/******/ };
|
||||
@@ -92,4 +92,4 @@
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([]);
|
||||
//# sourceMappingURL=manifest.9a73c590403a64f40c41.js.map
|
||||
//# sourceMappingURL=manifest.445ede0f13a048c8cbfa.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"sources":["webpack:///webpack/bootstrap 20c37f476a1d80966b41?"],"names":[],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAQ,oBAAoB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uDAA+C,iFAAiF;AAChI;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA","file":"manifest.9a73c590403a64f40c41.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, callbacks = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId])\n \t\t\t\tcallbacks.push.apply(callbacks, installedChunks[chunkId]);\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules);\n \t\twhile(callbacks.length)\n \t\t\tcallbacks.shift().call(null, __webpack_require__);\n \t\tif(moreModules[0]) {\n \t\t\tinstalledModules[0] = 0;\n \t\t\treturn __webpack_require__(0);\n \t\t}\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// \"0\" means \"already loaded\"\n \t// Array means \"loading\", array contains callbacks\n \tvar installedChunks = {\n \t\t3:0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId, callback) {\n \t\t// \"0\" is the signal for \"already loaded\"\n \t\tif(installedChunks[chunkId] === 0)\n \t\t\treturn callback.call(null, __webpack_require__);\n\n \t\t// an array means \"currently loading\".\n \t\tif(installedChunks[chunkId] !== undefined) {\n \t\t\tinstalledChunks[chunkId].push(callback);\n \t\t} else {\n \t\t\t// start chunk loading\n \t\t\tinstalledChunks[chunkId] = [callback];\n \t\t\tvar head = document.getElementsByTagName('head')[0];\n \t\t\tvar script = document.createElement('script');\n \t\t\tscript.type = 'text/javascript';\n \t\t\tscript.charset = 'utf-8';\n \t\t\tscript.async = true;\n\n \t\t\tscript.src = __webpack_require__.p + \"\" + {\"0\":\"4d33d25a9b5872086180\",\"1\":\"6734b6ac5d23d61b8e5f\",\"2\":\"829a6cd5501868837732\"}[chunkId] + \".js\";\n \t\t\thead.appendChild(script);\n \t\t}\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 20c37f476a1d80966b41\n **/"],"sourceRoot":""}
|
||||
{"version":3,"sources":["webpack:///webpack/bootstrap 876686e379ba43dfdb45?"],"names":[],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAQ,oBAAoB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uDAA+C,iFAAiF;AAChI;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA","file":"manifest.445ede0f13a048c8cbfa.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, callbacks = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId])\n \t\t\t\tcallbacks.push.apply(callbacks, installedChunks[chunkId]);\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules);\n \t\twhile(callbacks.length)\n \t\t\tcallbacks.shift().call(null, __webpack_require__);\n \t\tif(moreModules[0]) {\n \t\t\tinstalledModules[0] = 0;\n \t\t\treturn __webpack_require__(0);\n \t\t}\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// \"0\" means \"already loaded\"\n \t// Array means \"loading\", array contains callbacks\n \tvar installedChunks = {\n \t\t3:0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId, callback) {\n \t\t// \"0\" is the signal for \"already loaded\"\n \t\tif(installedChunks[chunkId] === 0)\n \t\t\treturn callback.call(null, __webpack_require__);\n\n \t\t// an array means \"currently loading\".\n \t\tif(installedChunks[chunkId] !== undefined) {\n \t\t\tinstalledChunks[chunkId].push(callback);\n \t\t} else {\n \t\t\t// start chunk loading\n \t\t\tinstalledChunks[chunkId] = [callback];\n \t\t\tvar head = document.getElementsByTagName('head')[0];\n \t\t\tvar script = document.createElement('script');\n \t\t\tscript.type = 'text/javascript';\n \t\t\tscript.charset = 'utf-8';\n \t\t\tscript.async = true;\n\n \t\t\tscript.src = __webpack_require__.p + \"\" + {\"0\":\"0f8c47485a49f44c2404\",\"1\":\"6734b6ac5d23d61b8e5f\",\"2\":\"d3d74fb754fa5fff76bc\"}[chunkId] + \".js\";\n \t\t\thead.appendChild(script);\n \t\t}\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 876686e379ba43dfdb45\n **/"],"sourceRoot":""}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -31,12 +31,12 @@ export const accountComplete = makeActionCreator(T.ACCOUNT.SINGLE_COMPLETE, 'pay
|
||||
export const accountError = makeActionCreator(T.ACCOUNT.SINGLE_ERROR, 'error');
|
||||
|
||||
|
||||
export function accountsList(userId) {
|
||||
export function accountsList(customerId) {
|
||||
return dispatch => {
|
||||
dispatch(accountsListRequested());
|
||||
return api.apiRetrieveAccounts(userId)
|
||||
.then(list => {
|
||||
dispatch(accountsListReceived(list));
|
||||
return api.apiRetrieveAccounts(customerId)
|
||||
.then(({ accounts = []}) => {
|
||||
dispatch(accountsListReceived(accounts));
|
||||
})
|
||||
.catch(err => {
|
||||
dispatch(accountsListError(err));
|
||||
@@ -148,11 +148,10 @@ export const deleteAccountError = makeActionCreator(T.ACCOUNT.DELETE_ERROR);
|
||||
export function deleteAccount(customerId, accountId) {
|
||||
return dispatch => {
|
||||
dispatch(deleteAccountRequested());
|
||||
return api.apiDeleteAccount(accountId)
|
||||
return api.apiDeleteAccount(customerId, accountId)
|
||||
.then(data => {
|
||||
//debugger;
|
||||
dispatch(deleteAccountComplete());
|
||||
return Promise.resolve('ok');
|
||||
dispatch(deleteAccountComplete(data));
|
||||
return Promise.resolve(data);
|
||||
})
|
||||
.catch(err => {
|
||||
dispatch(deleteAccountError());
|
||||
@@ -208,7 +207,7 @@ export const createRefOwnerLookup = lookup => {
|
||||
|
||||
export const createRefAccountLookup = customerId => {
|
||||
return dispatch => {
|
||||
dispatch(createRefAccountLookupStart());
|
||||
dispatch(createRefAccountLookupStart(customerId));
|
||||
return api.apiRetrieveAccounts(customerId)
|
||||
.then(({ accounts }) => {
|
||||
const arr = accounts.map(({ accountId, title }) => ({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Created by andrew on 12/03/16.
|
||||
*/
|
||||
import fetch from './fetch';
|
||||
import authedFetch from './fetch';
|
||||
import {
|
||||
getEmailSignInUrl,
|
||||
getEmailSignUpUrl,
|
||||
@@ -11,163 +11,97 @@ import {
|
||||
getTransfersUrl
|
||||
} from "./sessionStorage";
|
||||
import root from './root';
|
||||
|
||||
|
||||
import { parseResponse } from "./handleFetchResponse";
|
||||
|
||||
const fetch = (...args) => authedFetch(...args).then(parseResponse);
|
||||
|
||||
function makeQuery(params) {
|
||||
return Object.keys(params).map(key => [encodeURIComponent(key), encodeURIComponent(params[key])].join('=')).join('&');
|
||||
}
|
||||
|
||||
export function apiSignIn(body) {
|
||||
return fetch(getEmailSignInUrl(), {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
const JSON_HEADERS = {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
method: "post",
|
||||
body: root.JSON.stringify(body)
|
||||
}).then(parseResponse);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export function apiSignUp(body) {
|
||||
return fetch(getEmailSignUpUrl(), {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
method: "post",
|
||||
body: root.JSON.stringify(body)
|
||||
}).then(parseResponse);
|
||||
}
|
||||
|
||||
export function apiGetCurrentUser() {
|
||||
return fetch(getCurrentUserUrl(), {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
method: "get"
|
||||
}).then(parseResponse);
|
||||
}
|
||||
|
||||
export function apiCreateAccount(customerId, {
|
||||
title, balance: initialBalance, description }) {
|
||||
//{
|
||||
//"accountId": "0000015377cf131b-a250093f26850000"
|
||||
//}
|
||||
|
||||
return fetch(getAccountsUrl(), {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
method: "post",
|
||||
body: root.JSON.stringify({
|
||||
customerId,
|
||||
title,
|
||||
initialBalance,
|
||||
description })
|
||||
}).then(parseResponse);
|
||||
}
|
||||
|
||||
export function apiCreateRefAccount(customerId, {
|
||||
owner, account: accountId, title, description }) {
|
||||
|
||||
return fetch(`${getCustomersUrl()}/${customerId}/toaccounts`, {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
method: "post",
|
||||
body: root.JSON.stringify({
|
||||
owner,
|
||||
id: accountId,
|
||||
title,
|
||||
description })
|
||||
}).then(parseResponse);
|
||||
}
|
||||
|
||||
export function apiMakeTransfer(fromAccountId, {
|
||||
account, amount, description }) {
|
||||
|
||||
return fetch(getTransfersUrl(), {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
method: "post",
|
||||
body: root.JSON.stringify({
|
||||
"amount": amount,
|
||||
"fromAccountId": fromAccountId,
|
||||
"toAccountId": account,
|
||||
description
|
||||
})
|
||||
}).then(parseResponse);
|
||||
}
|
||||
|
||||
export function apiRetrieveAccounts(customerId) {
|
||||
|
||||
return fetch(`${getCustomersUrl()}/${customerId}/accounts`, {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
method: "get"
|
||||
}).then(parseResponse);
|
||||
}
|
||||
|
||||
export function apiRetrieveTransfers(accountId) {
|
||||
|
||||
return fetch(`${getAccountsUrl()}/${accountId}/history`, {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
method: "get"
|
||||
}).then(parseResponse);
|
||||
}
|
||||
|
||||
export function apiRetrieveAccount(accountId) {
|
||||
return fetch(`${getAccountsUrl()}/${accountId}`, {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
method: "get"
|
||||
}).then(parseResponse);
|
||||
}
|
||||
|
||||
export function apiDeleteAccount(accountId) {
|
||||
return Promise.reject({
|
||||
message: '\'Delete Account\' is not implemented.'
|
||||
});
|
||||
|
||||
return fetch(`${getAccountsUrl()}/${accountId}`, {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
const METHODS = {
|
||||
DELETE: {
|
||||
...JSON_HEADERS,
|
||||
method: "delete"
|
||||
}).then(parseResponse);
|
||||
}
|
||||
|
||||
export function apiRetrieveUsers(email) {
|
||||
return fetch(`${getCustomersUrl()}?${makeQuery({ email })}`, {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
},
|
||||
GET: {
|
||||
...JSON_HEADERS,
|
||||
method: "get"
|
||||
}).then(parseResponse);
|
||||
}
|
||||
},
|
||||
POST: {
|
||||
...JSON_HEADERS,
|
||||
method: "post"
|
||||
}
|
||||
};
|
||||
|
||||
export function apiRetrieveUser(customerId) {
|
||||
return fetch(`${getCustomersUrl()}/${ customerId }`, {
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
method: "get"
|
||||
}).then(parseResponse);
|
||||
}
|
||||
export const apiSignIn = (body) => fetch(getEmailSignInUrl(), {
|
||||
...METHODS.POST,
|
||||
body: root.JSON.stringify(body)
|
||||
});
|
||||
|
||||
export const apiSignUp = (body) => fetch(getEmailSignUpUrl(), {
|
||||
...METHODS.POST,
|
||||
body: root.JSON.stringify(body)
|
||||
});
|
||||
|
||||
export const apiGetCurrentUser = () => fetch(getCurrentUserUrl(), { ...METHODS.GET });
|
||||
|
||||
export const apiCreateAccount = (customerId, {
|
||||
title,
|
||||
balance: initialBalance,
|
||||
description }) => fetch(getAccountsUrl(), {
|
||||
...METHODS.POST,
|
||||
body: root.JSON.stringify({
|
||||
customerId,
|
||||
title,
|
||||
initialBalance,
|
||||
description })
|
||||
});
|
||||
|
||||
export const apiCreateRefAccount = (customerId, {
|
||||
owner, account: accountId, title, description }) => fetch(`${getCustomersUrl()}/${customerId}/toaccounts`, {
|
||||
...METHODS.POST,
|
||||
body: root.JSON.stringify({
|
||||
owner,
|
||||
id: accountId,
|
||||
title,
|
||||
description })
|
||||
});
|
||||
|
||||
export const apiMakeTransfer = (fromAccountId, {
|
||||
account, amount, description }) => fetch(getTransfersUrl(), {
|
||||
...METHODS.POST,
|
||||
body: root.JSON.stringify({
|
||||
"amount": amount,
|
||||
"fromAccountId": fromAccountId,
|
||||
"toAccountId": account,
|
||||
description
|
||||
})
|
||||
});
|
||||
|
||||
export const apiRetrieveAccounts = (customerId) => fetch(`${getCustomersUrl()}/${customerId}/accounts`, {
|
||||
...METHODS.GET
|
||||
});
|
||||
|
||||
export const apiRetrieveTransfers = (accountId) => fetch(`${getAccountsUrl()}/${accountId}/history`, {
|
||||
...METHODS.GET
|
||||
});
|
||||
|
||||
export const apiRetrieveAccount = (accountId) => fetch(`${getAccountsUrl()}/${accountId}`, {
|
||||
...METHODS.GET
|
||||
});
|
||||
|
||||
export const apiDeleteAccount = (customerId, accountId) => fetch(`${getCustomersUrl()}/${customerId}/accounts/${accountId}`, {
|
||||
...METHODS.DELETE
|
||||
});
|
||||
|
||||
export const apiRetrieveUsers = (email) => fetch(`${getCustomersUrl()}?${makeQuery({ email })}`, {
|
||||
...METHODS.GET
|
||||
});
|
||||
|
||||
@@ -4,15 +4,12 @@
|
||||
import React from "react";
|
||||
import { PageHeader, OverlayTrigger, Tooltip, Grid, Col, Row, Nav, NavItem, ButtonGroup, Button, Table } from "react-bootstrap";
|
||||
import * as BS from "react-bootstrap";
|
||||
import { Link, IndexLink} from "react-router";
|
||||
import { connect } from "react-redux";
|
||||
//import * as DefaultTheme from "redux-auth";
|
||||
import Select from "react-select";
|
||||
import AccountInfo from '../components/AccountInfo';
|
||||
import * as Modals from './modals';
|
||||
import IndexPanel from "./../components/partials/IndexPanel";
|
||||
|
||||
import * as A from '../actions/entities';
|
||||
import * as AU from '../actions/authenticate';
|
||||
import read from '../utils/readProp';
|
||||
import { Money } from '../components/Money';
|
||||
|
||||
@@ -73,15 +70,19 @@ class MyAccounts extends React.Component {
|
||||
|
||||
create3rdPartyAccountModalConfirmed(payload) {
|
||||
const {
|
||||
id: customerId
|
||||
id: customerId,
|
||||
dispatch
|
||||
} = this.props.auth.user.attributes;
|
||||
|
||||
this.props.dispatch(A.accountRefCreate(customerId, payload))
|
||||
dispatch(A.accountRefCreate(customerId, payload))
|
||||
.then(() => {
|
||||
this.close();
|
||||
return new Promise((rs, rj) => {
|
||||
setTimeout(() => {
|
||||
this.props.dispatch(A.fetchOwnAccounts(customerId)).then(rs, rj);
|
||||
Promise.all([
|
||||
dispatch(AU.authenticate(true)),
|
||||
dispatch(A.fetchOwnAccounts(customerId))
|
||||
]).then(rs, rj);
|
||||
}, 1500);
|
||||
})
|
||||
})
|
||||
@@ -100,13 +101,19 @@ class MyAccounts extends React.Component {
|
||||
}
|
||||
|
||||
remove3rdPartyAccountModalConfirmed(accountId) {
|
||||
const { customerId } = this.props;
|
||||
this.props.dispatch(A.deleteAccount(customerId, accountId))
|
||||
const { customerId, dispatch } = this.props;
|
||||
dispatch(A.deleteAccount(customerId, accountId))
|
||||
.then(() => {
|
||||
this.close();
|
||||
setTimeout(() => {
|
||||
return Promise.all([
|
||||
dispatch(AU.authenticate(true)),
|
||||
dispatch(A.fetchOwnAccounts(customerId))
|
||||
]);
|
||||
}, 1500);
|
||||
},
|
||||
err => {
|
||||
this.props.dispatch(A.errorMessageTimedOut(err && err.message || err));
|
||||
dispatch(A.errorMessageTimedOut(err && err.message || err));
|
||||
this.close();
|
||||
});
|
||||
}
|
||||
@@ -190,7 +197,7 @@ class MyAccounts extends React.Component {
|
||||
]: null
|
||||
}
|
||||
</td>
|
||||
<td key={1}></td>
|
||||
<td key={1} />
|
||||
<td key={2}><Button pullRight={true} bsStyle={"link"} onClick={this.remove3rdPartyAccountModal.bind(this, id)}><BS.Glyphicon glyph="remove" /></Button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -40,9 +40,9 @@ export class RemoveAccountBookmarkModal extends React.Component {
|
||||
|
||||
const entityId = id || accountId;
|
||||
|
||||
const title = titleRaw || '[No title]';
|
||||
const balance = ((balanceRaw > 0 && balanceRaw < 1) ? '$0' : '$') + Number(balanceRaw).toFixed(2);
|
||||
const description = descriptionRaw || '[No description]';
|
||||
const title = titleRaw || '—';
|
||||
const balance = isNaN(balanceRaw) ? '—' : ((balanceRaw > 0 && balanceRaw < 1) ? '$0' : '$') + Number(balanceRaw).toFixed(2);
|
||||
const description = descriptionRaw || '—';
|
||||
|
||||
return (<Modal show={this.props.show} onHide={this.props.onHide} key={0}>
|
||||
<Modal.Header closeButton>
|
||||
|
||||
Reference in New Issue
Block a user