main.html 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <div class="error-container" ng-if="error">
  2. <h1>
  3. <object data="./images/error.svg" type="image/svg+xml" class="error-icon"></object>
  4. Link Inválido
  5. </h1>
  6. </div>
  7. <div ng-if="!error">
  8. <div class="row">
  9. <div class="col-md-6">
  10. <label>
  11. <h4><object data="./images/user.svg" type="image/svg+xml" class="user-icon"></object>{{::userdata.nombre}} {{::userdata.apellido}}</h4>
  12. </label>
  13. </div>
  14. <div class="col-md-6">
  15. <a ng-href="/create/{{userdata.hash}}" class="pull-right btn btn-eba">
  16. Generar Pedido
  17. </a>
  18. </div>
  19. </div>
  20. <div class="row">
  21. <div ng-if="pedidos == null || pedidos.length == 0" class="info-container">
  22. No hay pedidos creados.
  23. </div>
  24. <table ng-if="pedidos && pedidos.length > 0" class="table table-striped">
  25. <tr>
  26. <th>Fecha</th>
  27. <th># Pedido</th>
  28. <th># Productos</th>
  29. <th>Observaciones</th>
  30. <th>Subtotal</th>
  31. <th>Estado</th>
  32. <th>Acciones</th>
  33. </tr>
  34. <tr ng-repeat="p in pedidos">
  35. <td>{{p.fecha | date: 'dd/MM/yyyy HH:mm'}}</td>
  36. <td>{{p.id}}</td>
  37. <td>{{p.cant_productos}}</td>
  38. <td style="word-break:break-all;">{{p.observaciones}}</td>
  39. <td>${{p.subtotal}}</td>
  40. <td><span class="status-label" ng-class="[p.estado]">{{p.estado}}<span></td>
  41. <td style="min-width:135px">
  42. <a ng-if="p.estado==='CREADO'" href="#" ng-href="edit/{{userdata.hash}}/{{p.id}}" title="Editar" class="status-label action-label">
  43. Editar
  44. </a>
  45. <a ng-if="p.estado==='CREADO'" href="#" ng-click="openModal(p.id)" title="Confirmar" class="status-label action-label">
  46. Confirmar
  47. </a>
  48. <a ng-if="p.estado == 'CONFIRMADO' || p.estado =='ACEPTADO'" href="#" ng-href="edit/{{userdata.hash}}/{{p.id}}" title="Editar" class="status-label action-label">
  49. Ver
  50. </a>
  51. </td>
  52. </tr>
  53. </table>
  54. </div>
  55. </div>
  56. <script type="text/ng-template" id="confirmModal.tmpl.html" class="modal">
  57. <div class="modal-header">
  58. <h3>Confirmar</h3>
  59. </div>
  60. <div class="modal-body">
  61. <p>Seguro?</p>
  62. </div>
  63. <div class="modal-footer">
  64. <button type="button" class="btn btn-default" ng-click="closeModal()" data-dismiss="modal">No</button>
  65. <button type="button" class="btn btn-primary" ng-click="confirm()">Confirmar</button>
  66. </div>
  67. </script>