mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 23:27:26 +01:00
Client Tasks v1 (#8823)
* remove unused elements from tasks page * remove components * client: tasks: wip * tasks: order, start styling them * more tasks works * habits controls * more work * tasks icons * split columns in their own component * implement tags for tasks * wip * add columns description
This commit is contained in:
@@ -36,8 +36,11 @@ export function loadAsyncResource ({store, path, url, deserialize, forceLoad = f
|
||||
} else if (loadingStatus === 'NOT_LOADED' || loadingStatus === 'LOADED' && forceLoad) {
|
||||
return axios.get(url).then(response => { // TODO support more params
|
||||
resource.loadingStatus = 'LOADED';
|
||||
resource.data = deserialize(response);
|
||||
return resource;
|
||||
// deserialize can be a promise
|
||||
return Promise.resolve(deserialize(response)).then(deserializedData => {
|
||||
resource.data = deserializedData;
|
||||
return resource;
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return Promise.reject(new Error(`Invalid loading status "${loadingStatus} for resource at "${path}".`));
|
||||
|
||||
Reference in New Issue
Block a user