Skip to content

Commit afdfe63

Browse files
committed
Fix merge
2 parents 59a0877 + 2c8e46b commit afdfe63

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

src/dashboard/Dashboard.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ import { setBasePath } from 'lib/AJAX';
5252
import Header from 'components/back4App/Header/Header.react';
5353
import Sidebar from 'components/back4App/Sidebar/Sidebar.react';
5454
import ServerSettings from 'dashboard/ServerSettings/ServerSettings.react';
55+
import { ActionTypes } from 'lib/stores/back4App/AppsStore';
56+
import subscribeTo from 'lib/subscribeTo';
5557

5658
import {
5759
Router,
@@ -61,12 +63,17 @@ import {
6163

6264
const ShowSchemaOverview = false; //In progress features. Change false to true to work on this feature.
6365

66+
// @subscribeTo('Apps', 'apps')
67+
// @subscribeTo('Schema', 'schema')
68+
// @subscribeTo('Jobs', 'jobs')
6469
class App extends React.Component {
6570
constructor(props) {
6671
super(props);
6772
this.state = {
6873
sidebarIsOpen: false
6974
};
75+
76+
console.log(this.props.apps)
7077
}
7178

7279
handleSidebarToggle(isOpen) {
@@ -197,11 +204,17 @@ class Dashboard extends React.Component {
197204
});
198205
return Parse.Promise.when(appInfoPromises);
199206
}).then(function(resolvedApps) {
207+
<<<<<<< HEAD
200208
if(resolvedApps && resolvedApps.length) {
201209
resolvedApps.forEach(app => {
202210
AppsManager.addApp(app);
203211
});
204212
}
213+
=======
214+
resolvedApps.forEach(app => {
215+
AppsManager.addApp(app);
216+
});
217+
>>>>>>> apps-notification
205218
this.setState({ configLoadingState: AsyncStatus.SUCCESS });
206219
}.bind(this)).fail(({ error }) => {
207220
this.setState({

src/dashboard/Data/Jobs/Jobs.react.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function scheduleString(data) {
5959
}
6060

6161
// TODO: create scrollable view component that handles lazy fetch container on scroll
62-
@subscribeTo('Jobs', 'jobs')
62+
@subscribeTo('Jobs', 'jobss')
6363
export default class Jobs extends TableView {
6464
constructor() {
6565
super();

src/lib/stores/back4App/AppsStore.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import keyMirror from 'lib/keyMirror';
2+
import Parse from 'parse';
3+
import { Map, List } from 'immutable';
4+
import { registerStore } from 'lib/stores/StoreManager';
5+
6+
export const ActionTypes = keyMirror([
7+
'FETCH'
8+
]);
9+
10+
// Apps state should be an Immutable Map with the following fields:
11+
// - lastFetch: the last time all data was fetched from the server
12+
// - apps: An Immutable Map of schedule ids to Maps of apps details
13+
14+
function AppsStore(state, action) {
15+
switch (action.type) {
16+
case ActionTypes.FETCH:
17+
console.log('AppsStore:FETCH');
18+
}
19+
}
20+
21+
registerStore('Apps', AppsStore);

0 commit comments

Comments
 (0)