Вы находитесь на странице: 1из 46

1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

Please ensure your account's recovery settings are up to date.

Commit 8fe42495 authored 3 days ago by Guillermo Agudelo

Termina CRUD instrumentos y preguntas Campo de talento

parent 1cbdfd4c master

No related merge requests found

Showing 68 changed files  with 362 additions and 140 deletions

  app/Http/Controllers/API/TalInstrumentController.php 0 → 100644
1 + <?php
2 +
3 + namespace App\Http\Controllers\API;
4 +
5 + use App\Http\Controllers\Controller;
6 + use App\Models\TalInstrument;
7 + use Illuminate\Http\Request;
8 +
9 + class TalInstrumentController extends Controller
10 +{
11 + public function getNextQuestionNumber(Request $request, TalInstrument $instrument)
12 + {
13 + $nextNumber = $instrument->questions()->max('number') + 1;
14 + return response()->json(['status' => 'success', 'data' => compact('nextNumber')]);
15 + }
16 +}

  app/Http/Controllers/Admin/TalInstrumentController.php

... ... @@ -3,7 +3,11 @@


3 3 namespace App\Http\Controllers\Admin;
4 4
5 5 use App\Http\Controllers\Controller;
6 + use App\Models\TalDevelopmentLevel;
7 + use App\Models\TalFactor;
8 + use App\Models\TalIndicator;
6 9 use App\Models\TalInstrument;
10 + use App\Models\TalTalent;
7 11 use Illuminate\Http\Request;
8 12
9 13 class TalInstrumentController extends Controller
... ... @@ -11,14 +15,80 @@ class TalInstrumentController extends Controller
11 15 public function index()
12 16 {
13 17 $instruments = TalInstrument::all();
14 - // $populations = PotPopulation::all();
15 - // $sources = PotSource::all();
16 - return view('admin.talent.index', compact('instruments'));
18 + $factors = TalFactor::all();
19 +
20 + return view('admin.talent.index', compact(
21 + 'instruments',
22 + 'factors',
23 + ));
17 24 }
18 25
19 26 public function show(Request $request, TalInstrument $instrument)
20 27 {
21 - return view('admin.talent.instruments.show', compact('instrument'));
28 + $indicators = TalIndicator::orderBy('name')->get();
29 + $developmentLevels = TalDevelopmentLevel::all();
30 + $talents = TalTalent::all();
31 + $instruments = TalInstrument::all();

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 1/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

32 +
33 + return view('admin.talent.instruments.show', compact(
34 + 'instrument',
35 + 'indicators',
36 + 'developmentLevels',
37 + 'talents',
38 + ));
39 + }
40 +
41 + public function store(Request $request)
42 + {
43 + $request->validate([
44 + 'name' => 'required',
45 + 'description' => 'required',
46 + 'options_quantity' => 'required|integer',
47 + 'tal_factor_id' => 'required|exists:tal_factors,id',
48 + ]);
49 +
50 + $instrument = TalInstrument::create($request->except(['_token', 'image']));
51 +
52 + if($request->hasFile('image')) {
53 + $path = $request->file('image')->store('images/instruments', 'asset');
54 + $instrument->image = $path;
55 + $instrument->save();
56 + }
57 +
58 + feedback('success', 'El registro fue creado.');
59 +
60 + return redirect()->back();
61 + }
62 +
63 + public function update(Request $request, TalInstrument $instrument)
64 + {
65 + $request->validate([
66 + 'name' => 'required',
67 + 'description' => 'required',
68 + 'options_quantity' => 'required|integer',
69 + 'tal_factor_id' => 'required|exists:tal_factors,id',
70 + ]);
71 +
72 + $instrument->update($request->except(['_token', 'image']));
73 +
74 + if($request->hasFile('image')) {
75 + $path = $request->file('image')->store('images/instruments', 'asset');
76 + $instrument->image = $path;
77 + $instrument->save();
78 + }
79 +
80 + feedback('success', 'Se actualizó el registro');
81 +
82 + return redirect()->back();
83 + }
84 +
85 + public function destroy(Request $request, TalInstrument $instrument)
86 + {
87 + $instrument->delete();
88 +
89 + feedback('success', 'El registro fue borrado');
90 +
91 + return redirect()->back();
22 92 }
23 93
24 94 }

  app/Http/Controllers/Admin/TalQuestionController.php 0 → 100644

1 + <?php
2 +
3 + namespace App\Http\Controllers\Admin;
4 +
5 + use App\Http\Controllers\Controller;
6 + use App\Models\TalInstrument;
7 + use App\Models\TalQuestion;
8 + use Illuminate\Http\Request;
9 +

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 2/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

10 + class TalQuestionController extends Controller


11 +{
12 + public function store(Request $request)
13 + {
14 + $request->validate([
15 + 'number' => 'required|integer',
16 + 'description' => 'required',
17 + 'tal_development_level_id' => 'required|exists:tal_development_levels,id',
18 + 'tal_indicator_id' => 'required|exists:tal_indicators,id',
19 + 'tal_talent_id' => 'required|exists:tal_talents,id',
20 + 'tal_instrument_id' => 'required|exists:tal_instruments,id',
21 + ]);
22 +
23 + (TalInstrument::find($request->get('tal_instrument_id')))
24 + ->questions()
25 + ->create($request->except('_token'));
26 +
27 + feedback('success', 'Se creó el registro');
28 +
29 + return redirect()->back();
30 + }
31 +
32 + public function update(Request $request, TalQuestion $question)
33 + {
34 + $request->validate([
35 + 'number' => 'required|integer',
36 + 'description' => 'required',
37 + 'tal_development_level_id' => 'required|exists:tal_development_levels,id',
38 + 'tal_indicator_id' => 'required|exists:tal_indicators,id',
39 + 'tal_talent_id' => 'required|exists:tal_talents,id',
40 + 'tal_instrument_id' => 'required|exists:tal_instruments,id',
41 + ]);
42 +
43 + $question->update($request->except('_token'));
44 +
45 + feedback('success', 'Se actualizó el registro');
46 +
47 + return redirect()->back();
48 + }
49 +
50 + public function destroy(Request $request, TalQuestion $question)
51 + {
52 + $question->delete();
53 +
54 + feedback('success', 'Se eliminó el registro');
55 +
56 + return redirect()->back();
57 + }
58 +}

  app/Models/TalFactor.php 0 → 100644
1 + <?php
2 +
3 + namespace App\Models;
4 +
5 + use Illuminate\Database\Eloquent\Model;
6 +
7 + class TalFactor extends Model
8 +{
9 + //
10 +}

  app/Models/TalInstrument.php
... ... @@ -6,6 +6,8 @@ use Illuminate\Database\Eloquent\Model;
6 6
7 7 class TalInstrument extends Model
8 8 {
9 + protected $guarded = [];
10 +
9 11 public function questions()
10 12 {
11 13 return $this->hasMany(TalQuestion::class, 'tal_instrument_id');
... ...

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 3/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

  app/Models/TalQuestion.php
... ... @@ -6,6 +6,8 @@ use Illuminate\Database\Eloquent\Model;
6 6
7 7 class TalQuestion extends Model
8 8 {
9 + protected $guarded = [];
10 +
9 11 public function indicator()
10 12 {
11 13 return $this->belongsTo(TalIndicator::class, 'tal_indicator_id');
... ...

  database/migrations/2020_07_27_150812_create_tal_instruments_table.php

... ... @@ -55,8 +55,8 @@ class CreateTalInstrumentsTable extends Migration


55 55 'name' => 'Resonancia cultural',
56 56 'description' => 'Instrumento que mide la resonancia cultural del estudiante',
57 57 'options_quantity' => 4,
58 - 'image' => 'images/icons/logo.png',
59 58 'tal_factor_id' => 4,
59 + 'image' => 'images/icons/tal_instrument_default.png',
60 60 'created_at' => now(),
61 61 'updated_at' => now(),
62 62 ],
... ...

  database/migrations/2020_07_27_164343_create_tal_questions_table.php

... ... @@ -32,6 +32,8 @@ class CreateTalQuestionsTable extends Migration


32 32 'tal_indicator_id' => 1, // Admiracion
33 33 'tal_talent_id' => 9, // Literario
34 34 'tal_instrument_id' => 1, // Interes
35 + 'created_at' => now(),
36 + 'updated_at' => now(),
35 37 ],
36 38 [
37 39 'number' => 2,
... ... @@ -40,14 +42,18 @@ class CreateTalQuestionsTable extends Migration
40 42 'tal_indicator_id' => 2, // Disfrute
41 43 'tal_talent_id' => 2, // Tecnologico
42 44 'tal_instrument_id' => 1, // Interes
45 + 'created_at' => now(),
46 + 'updated_at' => now(),
43 47 ],
44 48 [
45 49 'number' => 1,
46 50 'description' => 'Se me facilita comprender los principios y procesos que permiten el
funcionamiento de herramientas, máquinas o dispositivos.',
47 51 'tal_development_level_id' => 2, // Identificacion
48 - 'tal_indicator_id' =>82, // Ejecución y destreza
52 + 'tal_indicator_id' =>8, // Ejecución y destreza
49 53 'tal_talent_id' => 2, // Tecnologico
50 54 'tal_instrument_id' => 2, // Aptitud cognitiva
55 + 'created_at' => now(),
56 + 'updated_at' => now(),
51 57 ],
52 58 ];
53 59
... ...

 public/images/icons/instrument_default.png 0 → 100644

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 4/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

7.77 KB

 public/images/icons/ppp/icon-120.jpg deleted 100644 → 0

2.63 KB

 public/images/icons/ppp/icon-120.png deleted 100644 → 0

12.6 KB

 public/images/icons/ppp/icon-152.jpg deleted 100644 → 0

3.13 KB

 public/images/icons/ppp/icon-152.png deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 5/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

16.6 KB

 public/images/icons/ppp/icon-167.jpg deleted 100644 → 0

3.87 KB

 public/images/icons/ppp/icon-167.png deleted 100644 → 0

20 KB

 public/images/icons/ppp/icon-180.jpg deleted 100644 → 0

4.12 KB

 public/images/icons/ppp/icon-180.png deleted 100644 → 0

21.8 KB

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 6/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

 public/images/icons/ppp/logo.png deleted 100644 → 0

8.56 KB

 public/images/icons/ppp/splash-1125x2436.jpg deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 7/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

39.6 KB

 public/images/icons/ppp/splash-1125x2436.png deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 8/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 9/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

213 KB

 public/images/icons/ppp/splash-1136x640.jpg deleted 100644 → 0

16.1 KB

 public/images/icons/ppp/splash-1136x640.png deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 10/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

88.2 KB

 public/images/icons/ppp/splash-1242x2208.jpg deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 11/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

41.8 KB

 public/images/icons/ppp/splash-1242x2208.png deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 12/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

234 KB

 public/images/icons/ppp/splash-1242x2688.jpg deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 13/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

45.2 KB

 public/images/icons/ppp/splash-1242x2688.png deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 14/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 15/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

237 KB

 public/images/icons/ppp/splash-1334x750.jpg deleted 100644 → 0

19.3 KB

 public/images/icons/ppp/splash-1334x750.png deleted 100644 → 0

107 KB

 public/images/icons/ppp/splash-1536x2048.jpg deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 16/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

49.1 KB

 public/images/icons/ppp/splash-1536x2048.png deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 17/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

288 KB

 public/images/icons/ppp/splash-1668x2224.jpg deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 18/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

55.1 KB

 public/images/icons/ppp/splash-1668x2224.png deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 19/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

314 KB

 public/images/icons/ppp/splash-1668x2388.jpg deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 20/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

56.5 KB

 public/images/icons/ppp/splash-1668x2388.png deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 21/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

312 KB

 public/images/icons/ppp/splash-1792x828.jpg deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 22/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

21.7 KB

 public/images/icons/ppp/splash-1792x828.png deleted 100644 → 0

106 KB

 public/images/icons/ppp/splash-2048x1536.jpg deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 23/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

47.2 KB

 public/images/icons/ppp/splash-2048x1536.png deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 24/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

267 KB

 public/images/icons/ppp/splash-2048x2732.jpg deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 25/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

72.9 KB

 public/images/icons/ppp/splash-2048x2732.png deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 26/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

395 KB

 public/images/icons/ppp/splash-2208x1242.jpg deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 27/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

37 KB

 public/images/icons/ppp/splash-2208x1242.png deleted 100644 → 0

188 KB

 public/images/icons/ppp/splash-2224x1668.jpg deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 28/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

52.6 KB

 public/images/icons/ppp/splash-2224x1668.png deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 29/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

292 KB

 public/images/icons/ppp/splash-2388x1668.jpg deleted 100644 → 0

53 KB

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 30/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

 public/images/icons/ppp/splash-2388x1668.png deleted 100644 → 0

282 KB

 public/images/icons/ppp/splash-2436x1125.jpg deleted 100644 → 0

33.6 KB

 public/images/icons/ppp/splash-2436x1125.png deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 31/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

153 KB

 public/images/icons/ppp/splash-2688x1242.jpg deleted 100644 → 0

37.9 KB

 public/images/icons/ppp/splash-2688x1242.png deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 32/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

170 KB

 public/images/icons/ppp/splash-2732x2048.jpg deleted 100644 → 0

68.9 KB

 public/images/icons/ppp/splash-2732x2048.png deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 33/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

362 KB

 public/images/icons/ppp/splash-640x1136.jpg deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 34/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

20.1 KB

 public/images/icons/ppp/splash-640x1136.png deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 35/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

115 KB

 public/images/icons/ppp/splash-750x1334.jpg deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 36/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

22.6 KB

 public/images/icons/ppp/splash-750x1334.png deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 37/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

134 KB

 public/images/icons/ppp/splash-828x1792.jpg deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 38/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 39/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

26.6 KB

 public/images/icons/ppp/splash-828x1792.png deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 40/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

152 KB

 public/images/icons/ppp/st-icon-192.jpg deleted 100644 → 0

4.45 KB

 public/images/icons/ppp/st-icon-192.png deleted 100644 → 0

24.4 KB

 public/images/icons/ppp/st-icon-512.jpg deleted 100644 → 0

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 41/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

13 KB

 public/images/icons/ppp/st-icon-512.png deleted 100644 → 0

84.4 KB

  resources/views/admin/parameters/index.blade.php

... ... @@ -137,8 +137,8 @@


137 137 @endforeach
138 138 </select>
139 139 </div>
140 - </div>
141 - </div>
140 + </div>
141 + </div>
142 142 <div class="row"v-show="options">
143 143 <div class="col-md-1"></div>
144 144 <div class="col-md-2" v-for="(item, index) in question">
https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 42/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

... ... @@ -147,7 +147,7 @@


147 147 <input v-model="item.points" type="number" class="form-control">
148 148 </div>
149 149 </div>
150 -
150 +
151 151 <div class="col-md-2" style="margin-top: 30px">
152 152 <button type="button" class="btn btn-primary" @click="btnsave()">
153 153 <i class="fa fa-save"></i> Guardar
... ... @@ -155,9 +155,9 @@
155 155 </div>
156 156 </div>
157 157 </div>
158 - </div>
158 + </div>
159 159 </div>
160 -
160 +
161 161 </div><br>
162 162 <div class="container" id="sourceponderation">
163 163 <div class="row">
... ... @@ -221,7 +221,7 @@
221 221 required
222 222 v-model="sourceponderation.percentage">
223 223 </div>
224 -
224 +
225 225 </div>
226 226 <div class="modal-footer">
227 227 <button type="button" class="btn btn-secondary" data-
dismiss="modal">Cerrar</button>
... ... @@ -232,7 +232,7 @@
232 232 </div>
233 233 </div>
234 234 </div>
235 - </div><br>
235 + </div><br>
236 236 @endsection
237 237 @push('js')
238 238 <script>
... ... @@ -270,7 +270,7 @@
270 270 this.options = false;
271 271 }
272 272 $('#actionModal').modal('hide');
273 - location.reload();
273 + location.reload();
274 274 });
275 275 }
276 276 }
... ... @@ -297,7 +297,7 @@
297 297
298 298 }
299 299
300 -
300 +
301 301 },
302 302 methods: {
303 303 btnsave() {
... ... @@ -320,7 +320,7 @@
320 320 this.options = false;
321 321
322 322 }
323 -
323 +
324 324 });
325 325 },
326 326 onChangeFactor:function(){
... ... @@ -349,10 +349,10 @@
349 349 {'id':4,'option':4,'points':0}];
350 350 setTimeout(function(){}, 1000);
351 351 this.options= true;
352 -
352 +
353 353 }
354 354 });

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 43/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

355 -
355 +
356 356
357 357 }
358 358
... ... @@ -390,10 +390,10 @@
390 390 this.options = false;
391 391
392 392 }
393 -
393 +
394 394 });
395 395 }
396 396 }
397 397 })
398 - </script>
399 - @endpush
\ No newline at end of file
398 + </script>
399 + @endpush

  resources/views/admin/potential/index.blade.php

... ... @@ -15,7 +15,7 @@


15 15
16 16 <div class="row">
17 17 @forelse($instruments as $instrument)
18 - <div class="col-md-4 p-3">
18 + <div class="col-lg-4 p-3">
19 19 <div class="rounded border">
20 20 <div class="rounded-top bg-success pr-3 pl-2 py-2 d-flex align-items-center text-
white">
21 21 <img src="{{asset($instrument->image)}}" width="80">
... ...

  resources/views/admin/talent/index.blade.php
... ... @@ -15,7 +15,7 @@
15 15
16 16 <div class="row">
17 17 @forelse($instruments as $instrument)
18 - <div class="col-md-4 p-3">
18 + <div class="col-lg-4 p-3">
19 19 <div class="rounded border">
20 20 <div class="rounded-top bg-success pr-3 pl-2 py-2 d-flex align-items-center text-
white">
21 21 <img src="{{asset($instrument->image)}}" width="80">
... ... @@ -54,7 +54,7 @@
54 54 onclick="if(confirm('¿Borrar este instrumento?')) $('#destroy-
{{$instrument->id}}').submit()">
55 55 <i class="fa fa-xs mt--2 fa-trash"></i> Borrar
56 56 </a>
57 - <form action="{{route('admin.potential.instruments.destroy',
$instrument)}}"
57 + <form action="{{route('admin.talent.instruments.destroy',
$instrument)}}"
58 58 method="post"
59 59 id="destroy-{{$instrument->id}}">
60 60 @csrf @method('delete')
... ... @@ -81,8 +81,8 @@
81 81 </button>
82 82 </div>
83 83 <div class="modal-body">
84 - <form x-bind:action="createMode ? '{{route('admin.potential.instruments.store')}}'
85 - : '/admin/potential/instruments/'+entity?.id"
84 + <form x-bind:action="createMode ? '{{route('admin.talent.instruments.store')}}'
85 + : '/admin/talent/instruments/'+entity?.id"
86 86 method="post"
87 87 enctype="multipart/form-data">
88 88 @csrf <template x-if="!createMode">@method('put')</template>
... ... @@ -108,24 +108,12 @@
108 108 </div>
109 109
110 110 <div class="form-group">
111 - <label for="">Población</label>

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 44/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

112 - <select name="pot_population_id" class="form-control" required>


113 - @foreach($populations as $population)
114 - <option value="{{$population->id}}"
115 - x-bind:selected="entity.pot_population_id ==
'{{$population->id}}'">
116 - {{$population->name}}
117 - </option>
118 - @endforeach
119 - </select>
120 - </div>
121 -
122 - <div class="form-group">
123 - <label for="">Fuente</label>
111 + <label for="">Factor</label>
124 112 <select name="tal_factor_id" class="form-control" required>
125 - @foreach($sources as $source)
126 - <option value="{{$source->id}}"
127 - x-bind:selected="entity.tal_factor_id == '{{$source-
>id}}'">
128 - {{$source->name}}
113 + @foreach($factors as $factor)
114 + <option value="{{$factor->id}}"
115 + x-bind:selected="entity.tal_factor_id == '{{$factor-
>id}}'">
116 + {{$factor->name}}
129 117 </option>
130 118 @endforeach
131 119 </select>
... ...

  resources/views/admin/talent/instruments/show.blade.php

This diff is collapsed.

  resources/views/layouts/_includes/js.blade.php
... ... @@ -16,6 +16,6 @@
16 16
17 17 window.axios.defaults.headers.common = {
18 18 'X-Requested-With': 'XMLHttpRequest',
19 - 'X-CSRF-TOKEN' : document.querySelector('meta[name="csrf-token"]').getAttribute('content');
19 + 'X-CSRF-TOKEN' : document.querySelector('meta[name="csrf-token"]').getAttribute('content')
20 20 };
21 21 </script>

  routes/web.php
... ... @@ -100,9 +100,18 @@ Route::group([
100 100 ], function() {
101 101 Route::get('', 'TalInstrumentController@index')->name('index');
102 102 Route::get('{instrument}', 'TalInstrumentController@show')->name('show');
103 - // Route::post('', 'PotInstrumentController@store')->name('store');
104 - // Route::put('{instrument}', 'PotInstrumentController@update')->name('update');
105 - // Route::delete('{instrument}', 'PotInstrumentController@destroy')->name('destroy');
103 + Route::post('', 'TalInstrumentController@store')->name('store');
104 + Route::put('{instrument}', 'TalInstrumentController@update')->name('update');
105 + Route::delete('{instrument}', 'TalInstrumentController@destroy')->name('destroy');
106 + });
107 +
108 + Route::group([
109 + 'prefix' => 'questions',
110 + 'as' => 'questions.',
111 + ], function() {
112 + Route::post('', 'TalQuestionController@store')->name('store');
113 + Route::put('{question}', 'TalQuestionController@update')->name('update');
114 + Route::delete('{question}', 'TalQuestionController@destroy')->name('destroy');
106 115 });
107 116
108 117 });
... ... @@ -120,10 +129,12 @@ Route::group([
120 129 Route::put('question-ponderations', 'PotQuestionPonderationController@update');
121 130 Route::put('learning-range', 'PotLearningRangeController@update');
122 131
123 - //Source ponderation

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 45/46
1/8/2020 Termina CRUD instrumentos y preguntas Campo de talento (8fe42495) · Commits · Guillermo Agudelo / apptalento · GitLab

132 + //Source ponderation


124 133 Route::get('source-ponderation', 'PotSourceponderationsController@index');
125 134 Route::put('source-ponderation', 'PotSourceponderationsController@update');
126 135
136 + Route::get('talent/instruments/{instrument}/next-question-number',
'TalInstrumentController@getNextQuestionNumber');
137 +
127 138 });
128 139
129 140
... ...

Write a comment or drag your files here…

Markdown and quick actions are supported

https://gitlab.com/guille.agudelo/apptalento/-/commit/8fe42495989de611228809866f7a0d512887076d 46/46

Вам также может понравиться