0% found this document useful (0 votes)
64 views10 pages

7 Julio Commit

The document summarizes code changes made in a GitLab commit that: 1) Adds a variable to indicate if a branch has its own online payment account. 2) Updates the payment controller to get the most recent paid invoices for the last 7 days and pass additional payment info to the view. 3) Updates the payment info update method to create or update payment info records for each branch. 4) Updates the portal payment controller to get the proper payment credentials for an invoice based on if the branch has its own payment account.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views10 pages

7 Julio Commit

The document summarizes code changes made in a GitLab commit that: 1) Adds a variable to indicate if a branch has its own online payment account. 2) Updates the payment controller to get the most recent paid invoices for the last 7 days and pass additional payment info to the view. 3) Updates the payment info update method to create or update payment info records for each branch. 4) Updates the portal payment controller to get the proper payment credentials for an invoice based on if the branch has its own payment account.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

1/8/2020 Se agrega variable que establezca si una sucursal tiene su propia cuenta de...

u propia cuenta de... (3b960187) · Commits · Guillermo Agudelo / transito-frontend · GitLab

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

Commit 3b960187 authored 3 weeks ago by Guillermo Agudelo

Se agrega variable que establezca si una sucursal tiene su propia cuenta de...
Se agrega variable que establezca si una sucursal tiene su propia cuenta de recaudo en linea. El portal de clientes pide
cédula de ciudadania al iniciar sesion por primera vez

parent ddddde31 master

No related merge requests found

Showing 17 changed files  with 258 additions and 89 deletions

  app/Http/Controllers/Admin/BranchController.php
... ... @@ -47,6 +47,7 @@ class BranchController extends Controller
47 47 ],
48 48 'name' => $request->get('name'),
49 49 'phone' => $request->get('phone'),
50 + 'ownMoneyCollection' => (bool)$request->has('ownMoneyCollection'),
50 51 'state' => 'Activo',
51 52 'uidAdmin' => null,
52 53 ]);
... ... @@ -77,6 +78,7 @@ class BranchController extends Controller
77 78 ['path' => 'location.lat', 'value' => $request->get('lat')],
78 79 ['path' => 'location.lng', 'value' => $request->get('lng')],
79 80 ['path' => 'phone', 'value' => $request->get('phone')],
81 + ['path' => 'ownMoneyCollection', 'value' => (bool)$request->has('ownMoneyCollection')],
80 82 ['path' => 'state', 'value' => $request->get('state')],
81 83 ]);
82 84
... ...

  app/Http/Controllers/Admin/PaymentController.php
... ... @@ -5,6 +5,7 @@ namespace App\Http\Controllers\Admin;
5 5 use App\Http\Controllers\Controller;
6 6 use App\Invoice;
7 7 use App\InvoicePaid;
8 + use App\PaymentServiceInfo;
8 9 use App\Service;
9 10 use Illuminate\Http\Request;
10 11
... ... @@ -12,7 +13,7 @@ class PaymentController extends Controller
12 13 {
13 14 public function index()
14 15 {
15 - $invoicesPaid = InvoicePaid::getMostRecent(\State::get('branch.id'));
16 + $invoicesPaid = InvoicePaid::getMostRecent(\State::get('branch.id'), 7);
16 17
17 18 $invoicesIds = $invoicesPaid->map(fn($ip) => $ip->field('idInvoice'))->toArray();
18 19 $invoices = Invoice::whereIdIn($invoicesIds);
... ... @@ -20,7 +21,14 @@ class PaymentController extends Controller
20 21 $servicesIds = $invoicesPaid->map(fn($ip) => $ip->field('idService'))->toArray();
21 22 $services = Service::whereIdIn($servicesIds);
22 23
23 - return view('admin.payments.index', compact('invoicesPaid', 'invoices', 'services'));
24 + $paymentInfo = PaymentServiceInfo::first('idBranch', '=', \State::get('branch.id'));
25 +
26 + return view('admin.payments.index', compact(
27 + 'invoicesPaid',
28 + 'invoices',
29 + 'services',
30 + 'paymentInfo'
31 + ));

https://gitlab.com/guille.agudelo/transito-frontend/-/commit/3b96018751a50be7d123742e543e609180c4228a 1/10
1/8/2020 Se agrega variable que establezca si una sucursal tiene su propia cuenta de... (3b960187) · Commits · Guillermo Agudelo / transito-frontend · GitLab

24 32 }
25 33
26 34 public function updateInfo(Request $request)
... ... @@ -31,6 +39,25 @@ class PaymentController extends Controller
31 39 'ref3' => 'required'
32 40 ]);
33 41
34 -
42 + $paymentInfo = PaymentServiceInfo::first('idBranch', '=', \State::get('branch.id'));
43 +
44 + if (!$paymentInfo) {
45 + PaymentServiceInfo::create([
46 + 'idBranch' => \State::get('branch.id'),
47 + 'reference1' => $request->get('ref1'), //PayULatam MerchantId
48 + 'reference2' => $request->get('ref2'), //PayULatam AccountId
49 + 'reference3' => $request->get('ref3'), //PayULatam API Key
50 + ]);
51 + } else {
52 + $paymentInfo->updateInstance([
53 + ['path' => 'reference1', 'value' => $request->get('ref1')],
54 + ['path' => 'reference2', 'value' => $request->get('ref2')],
55 + ['path' => 'reference3', 'value' => $request->get('ref3')],
56 + ]);
57 + }
58 +
59 + feedback('success', 'Se actualizó la información de recaudo');
60 +
61 + return redirect()->route('admin.payments.index');
35 62 }
36 63 }

  app/Http/Controllers/Portal/PaymentController.php

... ... @@ -2,10 +2,12 @@


2 2
3 3 namespace App\Http\Controllers\Portal;
4 4
5 + use App\Branch;
5 6 use App\Company;
6 7 use App\Http\Controllers\Controller;
7 8 use App\Invoice;
8 9 use App\InvoicePaid;
10 + use App\PaymentServiceInfo;
9 11 use App\Service;
10 12 use Illuminate\Http\Request;
11 13
... ... @@ -37,8 +39,19 @@ class PaymentController extends Controller
37 39 {
38 40 $invoice = Invoice::findOrFail($invoiceId);
39 41
40 - $apiKey = '4Vj8eK4rloUd272L48hsrarnUA';
41 - $merchantId = '508029';
42 + $branch = Branch::findOrFail($invoice->field('idBranch'));
43 +
44 + if($branch->field('ownMoneyCollection')) {
45 + $paymentInfo = PaymentServiceInfo::first('idBranch', '=', $invoice->field('idBranch'));
46 + $merchantId = $paymentInfo->field('reference1');
47 + $accountId = $paymentInfo->field('reference2');
48 + $apiKey = $paymentInfo->field('reference3');
49 + } else {
50 + $merchantId = config('services.payulatam.merchantId');
51 + $apiKey = config('services.payulatam.apiKey');
52 + $accountId = config('services.payulatam.accountId');
53 + }
54 +
42 55 $referenceCode = 'T-'.\Str::random(20).'-'.$invoiceId;
43 56 $amount = $invoice->field('valor');
44 57 $currency = 'COP';
... ... @@ -46,7 +59,7 @@ class PaymentController extends Controller
46 59
47 60 $data = [
48 61 'merchantId' => $merchantId,
49 - 'accountId' => '512321',
62 + 'accountId' => $accountId,

https://gitlab.com/guille.agudelo/transito-frontend/-/commit/3b96018751a50be7d123742e543e609180c4228a 2/10
1/8/2020 Se agrega variable que establezca si una sucursal tiene su propia cuenta de... (3b960187) · Commits · Guillermo Agudelo / transito-frontend · GitLab

50 63 'description' => "Factura #{$invoice->field('companyIdInvoice')}, periodo {$invoice-


>field('month')}/{$invoice->field('year')}",
51 64 'referenceCode' => $referenceCode,
52 65 'amount' => $amount,
... ...

  app/Http/Controllers/Portal/PortalController.php

... ... @@ -2,6 +2,7 @@


2 2
3 3 namespace App\Http\Controllers\Portal;
4 4
5 + use App\Client;
5 6 use App\Http\Controllers\Controller;
6 7 use Illuminate\Http\Request;
7 8
... ... @@ -11,4 +12,22 @@ class PortalController extends Controller
11 12 {
12 13 return view('portal.dashboard');
13 14 }
15 +
16 +
17 + public function updateIdentification(Request $request)
18 + {
19 + $request->validate([
20 + 'identification' => 'required'
21 + ]);
22 +
23 + $client = Client::firstOrFail('uid', '=', \LfAuth::id());
24 + $client->updateInstance([
25 + ['path' => 'identification', 'value' => $request->get('identification')]
26 + ]);
27 + \State::set('client', $client->fields());
28 +
29 + feedback('success', 'Se actualizó la información');
30 +
31 + return redirect()->route('portal.home');
32 + }
14 33 }

  app/InvoicePaid.php
... ... @@ -8,11 +8,11 @@ class InvoicePaid extends LarafireModel
8 8 {
9 9 protected $collectionName = 'invoicesPaids';
10 10
11 - public static function getMostRecent($branchId)
11 + public static function getMostRecent($branchId, $limit)
12 12 {
13 13 $invoices = InvoicePaid::where('idBranch', '=', $branchId)
14 14 ->orderBy('createAt', 'DESC')
15 - ->limit(10)
15 + ->limit($limit)
16 16 ->documents()
17 17 ->rows();
18 18
... ...

  app/PaymentServiceInfo.php
... ... @@ -6,5 +6,5 @@ use App\Support\LarafireModel;
6 6
7 7 class PaymentServiceInfo extends LarafireModel
8 8 {
9 - protected $collectionName = 'invoicesDetails';
9 + protected $collectionName = 'paymentServiceInfos';
10 10 }

  app/Providers/BladeServiceProvider.php
... ... @@ -61,6 +61,10 @@ class BladeServiceProvider extends ServiceProvider
61 61 return "<?php echo strftime('%e de %B', strtotime(\Carbon\Carbon::make($expression))); ?>";
62 62 });
63 63
64 + \Blade::directive('shortdate', function ($expression) {
65 + return "<?php echo \Carbon\Carbon::make($expression)->format('d/m/Y'); ?>";

https://gitlab.com/guille.agudelo/transito-frontend/-/commit/3b96018751a50be7d123742e543e609180c4228a 3/10
1/8/2020 Se agrega variable que establezca si una sucursal tiene su propia cuenta de... (3b960187) · Commits · Guillermo Agudelo / transito-frontend · GitLab

66 + });
67 +
64 68 \Blade::directive('money', function($value) {
65 69 return "<?php echo '$' . number_format((int)$value); ?>";
66 70 });
... ...

  app/Support/LarafireUserModel.php
... ... @@ -199,6 +199,13 @@ class LarafireUserModel implements JsonSerializable
199 199 return $instance;
200 200 }
201 201
202 + public static function update($userId, $data)
203 + {
204 + $instance = self::getNewInstance();
205 + $instance->firebaseObject = $instance->auth->updateUser($userId, $data);
206 + return $this;
207 + }
208 +
202 209 public function updateInstance($data)
203 210 {
204 211 $this->firebaseObject = $this->auth->updateUser($this->id(), $data);
... ...

  bootstrap/cache/config.php
... ... @@ -740,6 +740,12 @@
740 740 'secret' => '',
741 741 'region' => 'us-east-1',
742 742 ),
743 + 'payulatam' =>
744 + array (
745 + 'merchantId' => '508029',
746 + 'accountId' => '512321',
747 + 'apiKey' => '4Vj8eK4rloUd272L48hsrarnUA',
748 + ),
743 749 ),
744 750 'session' =>
745 751 array (
... ...

  notas.txt
... ... @@ -4,14 +4,12 @@
4 4 . que la importacion de facturas y conceptos se haga en una transaction
5 5 . que muestre ayuda sobre los .csv en admin.invoices
6 6 . portal: que no permite crear mas de un turno para hoy ni agendar mas de uno para el mismo dia
7 - . terminar seccion "Recaudos en linea"
8 7
9 8 notas edwin
10 9 .mandar mensaje de archivo de cargue con mal formato
11 - .variable que indique si la sucursal recauda o no
12 - .pedir cedula en primer inicio sesion
13 10
14 11 ui
12 + . que el menu sidear muestre seccion activa
15 13
16 14 fix
17 15 . usuario final no puede agendar para mañana si lo hace tarde en la noche
... ... @@ -30,9 +28,8 @@ preguntas
30 28
31 29
32 30 hecho
33 - . importar facturas y conceptos
34 - . que se puedan ver las facturas activas y sin conceptos asociados en admin.invoices
35 - . portal: cliente puede consultar facturas
31 + .variable que indique si la sucursal recauda o no
32 + .pedir cedula en primer inicio sesion
36 33
37 34
38 35
... ...

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

https://gitlab.com/guille.agudelo/transito-frontend/-/commit/3b96018751a50be7d123742e543e609180c4228a 4/10
1/8/2020 Se agrega variable que establezca si una sucursal tiene su propia cuenta de... (3b960187) · Commits · Guillermo Agudelo / transito-frontend · GitLab

... ... @@ -60,6 +60,7 @@


60 60 lng: '{{$branch->field('location.lng')}}',
61 61 lat: '{{$branch->field('location.lat')}}',
62 62 phone: '{{$branch->field('phone')}}',
63 + ownMoneyCollection: '{{$branch-
>field('ownMoneyCollection')}}',
63 64 state: '{{$branch->field('state')}}',
64 65 })">
65 66 <i class="fa fa-edit fa-lg"></i>
... ... @@ -170,19 +171,35 @@
170 171 <input class="form-control" type="text" name="phone" v-model="phone">
171 172 </div>
172 173
173 - <div class="form-group" v-if="!createMode">
174 - <label for="">Estado</label><br>
175 - <div class="pretty p-default p-round">
176 - <input type="radio" name="state" value="Activo" v-model="state" />
177 - <div class="state p-primary-o">
178 - <label>Activo</label>
174 + <div class="form-row">
175 + <div class="col">
176 + <div class="form-group">
177 + <div class="pretty p-icon p-curve">
178 + <input type="checkbox" name="ownMoneyCollection" v-
model="ownMoneyCollection"/>
179 + <div class="state p-primary">
180 + <i class="icon fa fa-check"></i>
181 + <label>Esta sucursal maneja su propia cuenta de recaudo en
línea</label>
182 + </div>
183 + </div>
179 184 </div>
180 185 </div>
181 186
182 - <div class="pretty p-default p-round">
183 - <input type="radio" name="state" value="Inactivo" v-model="state" />
184 - <div class="state p-primary-o">
185 - <label>Inactivo</label>
187 + <div class="col">
188 + <div class="form-group" v-if="!createMode">
189 + <label for="">Estado</label><br>
190 + <div class="pretty p-default p-round">
191 + <input type="radio" name="state" value="Activo" v-
model="state" />
192 + <div class="state p-primary-o">
193 + <label>Activo</label>
194 + </div>
195 + </div>
196 +
197 + <div class="pretty p-default p-round">
198 + <input type="radio" name="state" value="Inactivo" v-
model="state" />
199 + <div class="state p-primary-o">
200 + <label>Inactivo</label>
201 + </div>
202 + </div>
186 203 </div>
187 204 </div>
188 205 </div>
... ... @@ -215,6 +232,7 @@
215 232 lat: null,
216 233 lng: null,
217 234 phone: null,
235 + ownMoneyCollection: false,
218 236 state: 'Activo',
219 237 fieldsHidden: true,
220 238 employees: [],
... ... @@ -247,6 +265,7 @@
247 265 this.lat = data.lat
248 266 this.lng = data.lng
249 267 this.phone = data.phone
268 + this.ownMoneyCollection = data.ownMoneyCollection
250 269 this.state = data.state
251 270 $('#branchModal').modal('show')
252 271 },

https://gitlab.com/guille.agudelo/transito-frontend/-/commit/3b96018751a50be7d123742e543e609180c4228a 5/10
1/8/2020 Se agrega variable que establezca si una sucursal tiene su propia cuenta de... (3b960187) · Commits · Guillermo Agudelo / transito-frontend · GitLab

... ... @@ -267,6 +286,7 @@


267 286 this.lat = null
268 287 this.lng = null
269 288 this.phone = null
289 + this.ownMoneyCollection = false
270 290 this.state = 'Activo'
271 291 this.employees = []
272 292 },
... ...

  resources/views/admin/dashboard.blade.php

... ... @@ -9,39 +9,49 @@


9 9 <div class="mt-4 d-flex flex-column align-items-center">
10 10 <span class="mb-3">¿Qué quieres hacer hoy?</span>
11 11
12 - @superadmin
13 - <a href="{{ route('admin.companies.index') }}" class="btn btn-outline-primary btn-xl mb-3">
14 - <i class="fa fa-building text-orange"></i>
15 - Administrar las Entidades
16 - </a>
17 - <a href="{{ route('admin.branches.index') }}" class="btn btn-outline-primary btn-xl mb-3">
18 - <i class="fa fa-briefcase text-success"></i>
19 - Administrar las Sucursales
20 - </a>
21 - @endsuperadmin
12 + <div class="d-flex flex-wrap justify-content-center w-75">
13 + @superadmin
14 + <a href="{{ route('admin.companies.index') }}"
15 + class="btn btn-outline-primary btn-xl mb-3 dashboard-button mx-3 py-3">
16 + <i class="mb-2 fa-lg fa fa-building text-orange"></i>
17 + <span>Administrar las Entidades</span>
18 + </a>
19 + <a href="{{ route('admin.branches.index') }}"
20 + class="btn btn-outline-primary btn-xl mb-3 dashboard-button mx-3 py-3">
21 + <i class="mb-2 fa-lg fa fa-briefcase text-success"></i>
22 + <span>Administrar las Sucursales</span>
23 + </a>
24 + @endsuperadmin
22 25
23 - <a href="{{ route('admin.employees.index') }}" class="btn btn-outline-primary btn-xl mb-3">
24 - <i class="fa fa-users text-orange"></i>
25 - Administrar Empleados
26 - </a>
27 -
28 - @admin
29 - <a href="{{ route('admin.services.index') }}" class="btn btn-outline-primary btn-xl mb-3">
30 - <i class="fa fa-users text-success"></i>
31 - Editar los trámites de la sucursal
32 - </a>
33 - <a href="{{ route('admin.services-employees.index') }}" class="btn btn-outline-primary btn-
xl mb-3">
34 - <i class="fa fa-user-tag text-warning"></i>
35 - Administrar los vínculos Trámite/Empleado
26 + <a href="{{ route('admin.employees.index') }}"
27 + class="btn btn-outline-primary btn-xl mb-3 dashboard-button mx-3 py-3">
28 + <i class="mb-2 fa-lg fa fa-users text-orange"></i>
29 + <span>Administrar Empleados</span>
36 30 </a>
37 - <a href="{{ route('admin.invoices.index') }}" class="btn btn-outline-primary btn-xl mb-3">
38 - <i class="fa fa-file-invoice-dollar text-info"></i>
39 - Administrar Facturas
40 - </a>
41 - <a class="btn btn-outline-primary btn-xl mb-3" href="{{ route('admin.payments.index') }}">
42 - <i class="fa fa-money-bill-alt text-danger"></i> Configurar Recaudo En línea
43 - </a>
44 - @endadmin
31 +
32 + @admin
33 + <a href="{{ route('admin.services.index') }}"
34 + class="btn btn-outline-primary dashboard-button btn-xl mb-3 mx-3 py-3">
35 + <i class="mb-2 fa fa-lg fa-users text-success"></i>
36 + <span>Editar los trámites de la sucursal</span>
37 + </a>
38 + <a href="{{ route('admin.services-employees.index') }}"

https://gitlab.com/guille.agudelo/transito-frontend/-/commit/3b96018751a50be7d123742e543e609180c4228a 6/10
1/8/2020 Se agrega variable que establezca si una sucursal tiene su propia cuenta de... (3b960187) · Commits · Guillermo Agudelo / transito-frontend · GitLab

39 + class=" dashboard-button btn btn-outline-primary btn-xl mb-3 mx-3 py-3">


40 + <i class="mb-2 fa fa-lg fa-user-tag text-warning"></i>
41 + <span>Administrar los vínculos Trámite-Empleado</span>
42 + </a>
43 + <a href="{{ route('admin.invoices.index') }}"
44 + class=" dashboard-button btn btn-outline-primary btn-xl mb-3 mx-3 py-3">
45 + <i class="mb-2 fa fa-lg fa-file-invoice-dollar text-info"></i>
46 + <span>Administrar Facturas</span>
47 + </a>
48 + <a class=" dashboard-button btn btn-outline-primary btn-xl mb-3 mx-3 py-3"
49 + href="{{ route('admin.payments.index') }}">
50 + <i class="mb-2 fa fa-lg fa-money-bill-alt text-danger"></i>
51 + <span>Configurar Recaudo En línea</span>
52 + </a>
53 + @endadmin
54 + </div>
45 55 </div>
46 56
47 57 <div class="text-center mt-5 pt-5">
... ...

  resources/views/admin/payments/index.blade.php
... ... @@ -10,6 +10,7 @@
10 10 <th>Trámite</th>
11 11 <th>Periodo</th>
12 12 <th class="text-center">Valor</th>
13 + <th class="text-center">Fecha Pago</th>
13 14 <th class="text-center">Estado</th>
14 15 </thead>
15 16 <tbody>
... ... @@ -26,6 +27,7 @@
26 27 <td class="text-right">
27 28 @money($invoice->foreign($invoices, 'idInvoice')->field('valor'))
28 29 </td>
30 + <td class="text-center ">@shortdate($invoice->field('createAt'))</td>
29 31 <td class="text-center">
30 32 <span class="badge badge-success">
31 33 {{$invoice->foreign($invoices, 'idInvoice')->field('state')}}
... ... @@ -41,18 +43,37 @@
41 43 </table>
42 44 </div>
43 45
46 + @if(\State::get('branch.ownMoneyCollection'))
47 + <h3 class="mb-0">Datos de la pasarela de pago PayULatam</h3>
48 + <p class="mb-1">
49 + <small>Estos datos son los que usará la app para registrar los recaudos a nombre de esta
sucursal.
50 + Busque esta información en las configuraciones de su cuenta PayULatam</small>
51 + </p>
52 + <form class="form-inline" action="{{route('admin.payments.info')}}" method="post">
53 + @csrf
54 + <input class="form-control mb-2 mr-sm-2"
55 + type="text"
56 + name="ref1"
57 + placeholder="MerchantId"
58 + required
59 + value="{{$paymentInfo ? $paymentInfo->field('reference1') : ''}}">
44 60
45 - <h3 class="mb-0">Datos de la pasarela de pago PayULatam</h3>
46 - <p class="mb-1">
47 - Estos datos son los que usará la app para registrar los recaudos a nombre de esta sucursal.
48 - Busque esta información en las configuraciones de su cuenta PayULatam
49 - </p>
50 - <form class="form-inline" action="{{route('admin.payments.info')}}" method="post">
51 - @csrf
52 - <input class="form-control mb-2 mr-sm-2" type="text" name="ref1" placeholder="MerchantId">
53 - <input class="form-control mb-2 mr-sm-2" type="text" name="ref2" placeholder="AccountId">
54 - <input class="form-control mb-2 mr-sm-2" type="text" name="ref3" placeholder="API Key">
55 - <button type="submit" class="btn btn-primary mb-2">Guardar</button>
56 - </form>
61 + <input class="form-control mb-2 mr-sm-2"
62 + type="text"
63 + name="ref2"
64 + placeholder="AccountId"

https://gitlab.com/guille.agudelo/transito-frontend/-/commit/3b96018751a50be7d123742e543e609180c4228a 7/10
1/8/2020 Se agrega variable que establezca si una sucursal tiene su propia cuenta de... (3b960187) · Commits · Guillermo Agudelo / transito-frontend · GitLab

65 + required
66 + value="{{$paymentInfo ? $paymentInfo->field('reference2') : ''}}">
67 +
68 + <input class="form-control mb-2 mr-sm-2"
69 + type="text"
70 + name="ref3"
71 + placeholder="API Key"
72 + required
73 + value="{{$paymentInfo ? $paymentInfo->field('reference3') : ''}}">
74 +
75 + <button type="submit" class="btn btn-primary mb-2">Guardar</button>
76 + </form>
77 + @endif
57 78 </div>
58 79 @endsection

  resources/views/dashboard.blade.php
... ... @@ -11,21 +11,23 @@
11 11
12 12 <div class="mt-4 d-flex flex-column align-items-center">
13 13 <span class="mb-3">¿Qué quieres hacer hoy?</span>
14 - <a href="{{ route('queue.index') }}" class="btn btn-outline-primary btn-xl mb-3">
15 - <i class="fa fa-angle-double-right text-orange"></i>
16 - Generar Turnos
17 - </a>
18 - <a href="{{ route('turns.index') }}" class="btn btn-outline-primary btn-xl mb-3">
19 - <i class="fa fa-users text-success"></i>
20 - Atender Turnos
21 - </a>
22 - <a href="{{ route('tv') }}" class="btn btn-outline-primary btn-xl mb-3">
23 - <i class="ni ni-tv-2 text-danger"></i>
24 - Mostrar el Modo TV
25 - </a>
14 + <div class="d-flex flex-wrap justify-content-center w-75">
15 + <a href="{{ route('queue.index') }}" class="btn btn-outline-primary btn-xl mb-3 mb-3
dashboard-button mx-3 py-3">
16 + <i class="mb-2 fa-lg fa fa-angle-double-right text-orange"></i>
17 + <span>Generar Turnos</span>
18 + </a>
19 + <a href="{{ route('turns.index') }}" class="btn btn-outline-primary btn-xl mb-3 mb-3
dashboard-button mx-3 py-3">
20 + <i class="mb-2 fa-lg fa fa-users text-success"></i>
21 + <span>Atender Turnos</span>
22 + </a>
23 + <a href="{{ route('tv') }}" class="btn btn-outline-primary btn-xl mb-3 mb-3 dashboard-
button mx-3 py-3">
24 + <i class="mb-2 fa-lg ni ni-tv-2 text-danger"></i>
25 + <span>Mostrar el Modo TV</span>
26 + </a>
27 + </div>
26 28 </div>
27 29
28 - <div class="text-center mt-6">
30 + <div class="text-center mt-8">
29 31 <h2>
30 32 <img src="{{ \State::get('company.logo') }}" style="vertical-align:bottom" width="40">
31 33 {{ \State::get('company.name') }}
... ...

  resources/views/layouts/includes/css.blade.php

... ... @@ -5,4 +5,12 @@


5 5 .custom-file-label::after {
6 6 content: 'Elegir';
7 7 }
8 + .dashboard-button {
9 + min-height: 100px;
10 + width: 150px;
11 + white-space: pre-wrap;
12 + display: flex;
13 + flex-direction: column;
14 + justify-content: center;
15 +}
8 16 </style>

https://gitlab.com/guille.agudelo/transito-frontend/-/commit/3b96018751a50be7d123742e543e609180c4228a 8/10
1/8/2020 Se agrega variable que establezca si una sucursal tiene su propia cuenta de... (3b960187) · Commits · Guillermo Agudelo / transito-frontend · GitLab

  resources/views/portal/dashboard.blade.php
... ... @@ -11,14 +11,16 @@
11 11
12 12 <div class="mt-4 d-flex flex-column align-items-center">
13 13 <span class="mb-3">¿Qué quieres hacer hoy?</span>
14 - <a href="{{ route('portal.queue.index') }}" class="btn btn-outline-primary btn-xl mb-3">
15 - <i class="fa fa-concierge-bell text-success"></i>
16 - Crear y Administrar Turnos
17 - </a>
18 - <a href="{{ route('portal.payments.index') }}" class="btn btn-outline-primary btn-xl mb-3">
19 - <i class="fa fa-wallet text-orange"></i>
20 - Pagar en Línea
21 - </a>
14 + <div class="d-flex flex-wrap justify-content-center w-75">
15 + <a href="{{ route('portal.queue.index') }}" class="btn btn-outline-primary btn-xl mb-3
dashboard-button mx-3 py-3">
16 + <i class="mb-2 fa-lg fa fa-concierge-bell text-success"></i>
17 + <span>Crear y Administrar Turnos</span>
18 + </a>
19 + <a href="{{ route('portal.payments.index') }}" class="btn btn-outline-primary btn-xl mb-3
dashboard-button mx-3 py-3">
20 + <i class="mb-2 fa-lg fa fa-wallet text-orange"></i>
21 + <span>Pagar en Línea</span>
22 + </a>
23 + </div>
22 24 </div>
23 25
24 26 <div class="text-center mt-6">
... ... @@ -32,5 +34,35 @@
32 34
33 35 {{-- @include('layouts.footers.auth') --}}
34 36 </div>
37 +
38 + <div class="modal fade" id="identificationModal" tabindex="-1" role="dialog" aria-
labelledby="identificationModalLabel" aria-hidden="true">
39 + <div class="modal-dialog" role="document">
40 + <div class="modal-content">
41 + <div class="modal-header">
42 + <h5 class="modal-title" id="identificationModalLabel">Información requerida</h5>
43 + </div>
44 + <div class="modal-body">
45 + <form action="{{route('portal.update-identification')}}" method="post">
46 + @csrf
47 + <div class="form-group">
48 + <label for="">Por favor, ingrese su número de identificación</label>
49 + <input type="text" name="identification" required class="form-control">
50 + </div>
51 + <input type="submit" class="d-none" id="submit">
52 + </form>
53 + </div>
54 + <div class="modal-footer">
55 + <button type="button" class="btn btn-primary"
onclick="$('#submit').click()">Guardar</button>
56 + </div>
57 + </div>
58 + </div>
59 + </div>
35 60 @endsection
61 + @if(\State::get('client.identification') == null || \State::get('client.identification') == '')
62 + @push('js')
63 + <script>
64 + $('#identificationModal').modal({backdrop: 'static', keyboard: false})
65 + </script>
66 + @endpush
67 + @endif
36 68

  routes/web.php
... ... @@ -122,6 +122,7 @@ Route::group([
122 122 'namespace' => 'Portal',
123 123 ], function() {
124 124 Route::get('', 'PortalController@home')->name('home');

https://gitlab.com/guille.agudelo/transito-frontend/-/commit/3b96018751a50be7d123742e543e609180c4228a 9/10
1/8/2020 Se agrega variable que establezca si una sucursal tiene su propia cuenta de... (3b960187) · Commits · Guillermo Agudelo / transito-frontend · GitLab

125 + Route::post('update-identification', 'PortalController@updateIdentification')->name('update-


identification');
125 126
126 127 Route::group([
127 128 'prefix' => 'queue',
... ...

Write a comment or drag your files here…

Markdown and quick actions are supported

https://gitlab.com/guille.agudelo/transito-frontend/-/commit/3b96018751a50be7d123742e543e609180c4228a 10/10

You might also like