main.html 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <div ng-if="error">
  2. <h1 style="text-align:center">Link inv&aacute;lido</h1>
  3. </div>
  4. <div ng-if="!error">
  5. <div class="row">
  6. <div class="col-md-3 col-md-offset-2">
  7. <label>
  8. <h3>Pedidos de {{userdata.nombre}} {{userdata.apellido}}</h3>
  9. </label>
  10. </div>
  11. <div class="col-md-3 pull-right">
  12. <a ng-href="/create/{{userdata.hash}}">
  13. <button class="btn">Generar Pedido</button>
  14. </a>
  15. </div>
  16. </div>
  17. <div class="col-md-8 col-md-offset-2 col-sm-12 col-xs-12">
  18. <div ng-if="pedidos == null || pedidos.length == 0">
  19. No hay pedidos creados.
  20. </div>
  21. <table ng-if="pedidos && pedidos.length > 0" class="table table-striped">
  22. <tr>
  23. <th>Fecha</th>
  24. <th># Pedido</th>
  25. <th># Productos</th>
  26. <th>Observaciones</th>
  27. <th>Subtotal</th>
  28. <th>Estado</th>
  29. <th>Acciones</th>
  30. </tr>
  31. <tr ng-repeat="p in pedidos">
  32. <td>{{p.fecha | date: 'dd/MM/yyyy HH:mm'}}</td>
  33. <td>{{p.id}}</td>
  34. <td>{{p.cant_productos}}</td>
  35. <td>{{p.observaciones}}</td>
  36. <td>${{p.subtotal}}</td>
  37. <td>{{p.estado}}</td>
  38. <td>
  39. <a ng-if="p.estado==='CREADO'" href="#" ng-href="edit/{{userdata.hash}}/{{p.id}}">Editar</a>
  40. <a ng-if="p.estado==='CREADO'" href="#" ng-click="openModal(p.id)">Confirmar</a>
  41. </td>
  42. </tr>
  43. </table>
  44. </div>
  45. </div>
  46. <script type="text/ng-template" id="confirmModal.tmpl.html" class="modal">
  47. <div class="modal-header">
  48. <h3>Confirmar</h3>
  49. </div>
  50. <div class="modal-body">
  51. <p>Seguro?</p>
  52. </div>
  53. <div class="modal-footer">
  54. <button type="button" class="btn btn-default" ng-click="closeModal()" data-dismiss="modal">No</button>
  55. <button type="button" class="btn btn-primary" ng-click="confirm()">Confirmar</button>
  56. </div>
  57. </script>