Exemplo n.º 1
0
            case "haciendo":
                $task->scrumid = 2;
                break;
            case "hecho":
                $task->scrumid = 3;
                break;
        }
        $task->save();
        return Response::json(array('succes' => '1'));
    }
});
//editar tarea
Route::post('tareas/editTask', function () {
    if (Request::ajax()) {
        $id = Input::get("id");
        $task = Task::findOrFail($id);
        $task->name = Input::get("name");
        $task->summary = Input::get("summary");
        $task->points = Input::get("points");
        $task->timeEstimated = Input::get("timeEstimated");
        if (Input::get("canRegisterSpent") == 0) {
            $timeReal = $task->timeReal;
            $task->timeReal = $timeReal + Input::get("timeReal");
            $task->timeRemaining = $task->timeEstimated - $task->timeReal;
        }
        $task->userid = Input::get("selAssignee");
        $task->save();
        $final = "no";
        $issue = Issue::findOrFail($task->issueid);
        $iteration = $issue->iterations;
        //$iteration = $issue->iteration;
Exemplo n.º 2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($task_id)
 {
     $task = Task::findOrFail($task_id);
     $task->delete();
     return Redirect::to(route('tasks.index'))->with('message', ['content' => 'Taak met succes verwijderd!', 'class' => 'success']);
 }
Exemplo n.º 3
0
 public function showRemaining($id)
 {
     $task = Task::findOrFail($id);
     $this->layout->content = View::make('layouts.task.remainingForm')->with('organization', app('organization'))->with('type', 'new');
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     return View::make('tasks.create')->with('task', Task::findOrFail($id))->with('title', 'Edit Task')->with('method', 'PUT')->with('url', 'tasks/' . $id)->with('priorities', Priority::lists('priority_name', 'id'))->with('statuses', Status::lists('status_name', 'id'));
 }
 function deleteTask($id)
 {
     Task::findOrFail($id)->delete();
     return Redirect::to('/');
 }
 /**
  * Display the specified resource.
  * GET /tasks/{id}
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     return Task::findOrFail($id);
 }
Exemplo n.º 7
0
 public function updateStatus($data, $userId)
 {
     try {
         $task = \Task::findOrFail($data['id']);
         if ($data['status'] == 'completed') {
             $task->status = 'completed';
             $task->completed_on = date('Y-m-d H:i:s');
             $task->updated_by = $userId;
             $task->save();
         } elseif ($data['status'] == 'active') {
             $task->status = 'active';
             $task->completed_on = null;
             $task->updated_by = $userId;
             $task->save();
         }
         return 'success';
     } catch (Exception $e) {
         \Log::error('Somthing Went Wrong in Task Repository - updateStatus():' . $e->getMessage());
         return 'error';
     }
 }
Exemplo n.º 8
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     $task = $this->task->findOrFail($id);
     return View::make('tasks.show', compact('task'));
 }
Exemplo n.º 9
0
 public function check($id, Request $request)
 {
     $task = Task::findOrFail($id);
     $task->update($request->all());
     return redirect('tasks/index');
 }
Exemplo n.º 10
0
 public function doDelete()
 {
     $task = Task::findOrFail(Input::get('id'));
     $task->delete();
     return Redirect::action('TasksController@home');
 }
Exemplo n.º 11
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     $shop = Task::findOrFail($id);
     return view('admin.shopinfo.shopinfo');
 }