Application de gestion de projets. Un projet doit affecté à un utilisateur et une société qui existent

projects-list.component.html 2.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <span class="p-input-icon-right">
  2. <i class="pi pi-search"></i>
  3. <input
  4. type="text"
  5. class="form-control"
  6. pInputText
  7. [(ngModel)]="projectName"
  8. (ngModelChange)="onSearch1()"
  9. placeholder="search a project by name"
  10. />
  11. </span> &nbsp;
  12. <span class="p-input-icon-right">
  13. <i class="pi pi-search"></i>
  14. <input
  15. type="text"
  16. class="form-control"
  17. pInputText
  18. [(ngModel)]="userLastname"
  19. (ngModelChange)="onSearch2()"
  20. placeholder="projects of user lastname"
  21. />
  22. </span>
  23. &nbsp;
  24. <span class="p-input-icon-right">
  25. <i class="pi pi-search"></i>
  26. <input
  27. type="text"
  28. class="form-control"
  29. pInputText
  30. [(ngModel)]="companyName"
  31. (ngModelChange)="onSearch3()"
  32. placeholder="projects of company"
  33. />
  34. </span>
  35. <p-table
  36. [value]="inputProjectsList"
  37. responsiveLayout="scroll"
  38. *ngIf="inputProjectsList.length>0"
  39. styleClass="p-datatable-striped"
  40. [paginator]="true"
  41. [rows]="5"
  42. [showCurrentPageReport]="true"
  43. currentPageReportTemplate="{first} - {last} of {totalRecords} projects"
  44. [rowsPerPageOptions]="[5, 8, 10]"
  45. >
  46. <ng-template pTemplate="header">
  47. <tr>
  48. <th>ID</th>
  49. <th>Name</th>
  50. <th>Priority</th>
  51. <th> Created Date</th>
  52. <th>Description</th>
  53. <th>state</th>
  54. <th>User assigned</th>
  55. <th>Company</th>
  56. <th>action1</th>
  57. <th>action2</th>
  58. </tr>
  59. </ng-template>
  60. <ng-template pTemplate="body" let-project>
  61. <tr>
  62. <td>{{ project.projectID }}</td>
  63. <td>{{ project.projectName }}</td>
  64. <td>{{ project.priority }}</td>
  65. <td>{{project.createdDate}}</td>
  66. <td>{{ project.description }}</td>
  67. <td>{{ project.state }}</td>
  68. <td>
  69. <ul>
  70. <li>{{ project.user.firstname}} {{ project.user.lastname}}</li>
  71. <li>{{ project.user.email}}</li>
  72. <li>{{ project.user.address.numHouse }} {{ project.user.address.streetName }}
  73. <li>{{ project.user.address.pb }} {{ project.user.address.city }}, {{ project.user.address.country }}</li>
  74. </ul>
  75. </td>
  76. <td>
  77. <ul>
  78. <li>{{project.company.companyName}}</li>
  79. <li>{{project.company.companyType}}</li>
  80. </ul>
  81. </td>
  82. <td>
  83. <button class="btn">
  84. <i class="fa fa-pencil" style="color:mediumturquoise" (click)="onEditProject(project)"></i>
  85. </button>
  86. </td>
  87. <td>
  88. <button class="btn">
  89. <i class="fa fa-trash" style="color:red" (click)="onProjectDelete(project)"></i>
  90. </button>
  91. </td>
  92. </tr>
  93. </ng-template>
  94. </p-table>

Powered by TurnKey Linux.