added team store, team settings menu, and the ability to turn on valet feature from client
Этот коммит содержится в:
@@ -355,3 +355,25 @@ module.exports.getStatuses = function() {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
module.exports.getMyTeam = function() {
|
||||
if (isCallInProgress("getMyTeam")) return;
|
||||
|
||||
callTracker["getMyTeam"] = utils.getTimestamp();
|
||||
client.getMyTeam(
|
||||
function(data, textStatus, xhr) {
|
||||
callTracker["getMyTeam"] = 0;
|
||||
|
||||
if (xhr.status === 304 || !data) return;
|
||||
|
||||
AppDispatcher.handleServerAction({
|
||||
type: ActionTypes.RECIEVED_TEAM,
|
||||
team: data
|
||||
});
|
||||
},
|
||||
function(err) {
|
||||
callTracker["getMyTeam"] = 0;
|
||||
dispatchError(err, "getMyTeam");
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -811,3 +811,34 @@ module.exports.getStatuses = function(success, error) {
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.getMyTeam = function(success, error) {
|
||||
$.ajax({
|
||||
url: "/api/v1/teams/me",
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
success: success,
|
||||
ifModified: true,
|
||||
error: function(xhr, status, err) {
|
||||
e = handleError("getMyTeam", xhr, status, err);
|
||||
error(e);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.updateValetFeature = function(data, success, error) {
|
||||
$.ajax({
|
||||
url: "/api/v1/teams/update_valet_feature",
|
||||
dataType: 'json',
|
||||
contentType: 'application/json',
|
||||
type: 'POST',
|
||||
data: JSON.stringify(data),
|
||||
success: success,
|
||||
error: function(xhr, status, err) {
|
||||
e = handleError("updateValetFeature", xhr, status, err);
|
||||
error(e);
|
||||
}
|
||||
});
|
||||
|
||||
module.exports.track('api', 'api_teams_update_valet_feature');
|
||||
};
|
||||
|
||||
@@ -27,6 +27,9 @@ module.exports = {
|
||||
RECIEVED_STATUSES: null,
|
||||
|
||||
RECIEVED_MSG: null,
|
||||
|
||||
CLICK_TEAM: null,
|
||||
RECIEVED_TEAM: null,
|
||||
}),
|
||||
|
||||
PayloadSources: keyMirror({
|
||||
|
||||
Ссылка в новой задаче
Block a user