Commit 6422ddc7 authored by Antek Grzanka's avatar Antek Grzanka

Showing short description of task.

parent b162112e
......@@ -3,6 +3,11 @@
$scope.apiAddress = AppSettings.getApiAddress();
APIProvider.getTasks(function(data){
// console.log(data);
$.each(data, function(key){
data[key].short_description = data[key].description.split(" ").slice(0,6).join(" ").concat("...");
});
APIProvider.getMyCompletedLevelsList(function(completed){
$.each(data, function(key, task){
if (completed.indexOf(task.level) !== -1){
......@@ -13,7 +18,9 @@
}
});
});
$scope.tasks = data;
});
}]);
})();
\ No newline at end of file
......@@ -10,7 +10,7 @@
<i ng-if="task.taskType === 'WEB'" class="fa fa-globe" alt="Zadanie webowe"></i>
{{task.name}}
</span>
<p>Poziom {{task.level}}. Super zadanie.</p>
<p>Poziom {{task.level}}. {{task.short_description}}</p>
</div>
<div class="card-action">
<a href="#/task/{{task.level}}">Przejdź do zadania</a></td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment