show deleted cards in sidebar tab (styling still wip)
Signed-off-by: Manuel Arno Korfmann <manu@korfmann.info> card undo delete done, styling still wip Signed-off-by: Manuel Arno Korfmann <manu@korfmann.info> fix Codacy findings Signed-off-by: Manuel Arno Korfmann <manu@korfmann.info>
This commit is contained in:
committed by
Julius Härtl
parent
2ef4b55af4
commit
f2795f120b
@@ -29,6 +29,11 @@ app.factory('CardService', function (ApiService, $http, $q) {
|
||||
|
||||
CardService.prototype.delete = CardService.prototype.softDelete;
|
||||
|
||||
CardService.prototype.undoDelete = function(card) {
|
||||
card.deletedAt = 0;
|
||||
this.update(card);
|
||||
};
|
||||
|
||||
CardService.prototype.reorder = function (card, order) {
|
||||
var deferred = $q.defer();
|
||||
var self = this;
|
||||
@@ -175,18 +180,15 @@ app.factory('CardService', function (ApiService, $http, $q) {
|
||||
};
|
||||
|
||||
CardService.prototype.fetchDeleted = function (boardId) {
|
||||
|
||||
var deferred = $q.defer();
|
||||
var self = this;
|
||||
$http.get(this.baseUrl + '/deleted/' + boardId).then(function (response) {
|
||||
var objects = response.data;
|
||||
return objects;
|
||||
deferred.resolve(self.data);
|
||||
deferred.resolve(objects);
|
||||
}, function (error) {
|
||||
deferred.reject('Fetching ' + self.endpoint + ' failed');
|
||||
});
|
||||
return deferred.promise;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user