source: Farmatiko/ClientApp/src/app/admin/admin.component.html@ 0a694bb

Last change on this file since 0a694bb was 8e74e2f, checked in by DimitarSlezenkovski <dslezenkovski@…>, 4 years ago

Fix bugs, add some more.

  • Property mode set to 100644
File size: 3.5 KB
Line 
1<header>
2 <nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
3 <div class="container">
4 <a class="navbar-brand" [routerLink]="['/']"><img src="../../assets/logo.png"></a>
5 <button class="navbar-toggler"
6 type="button"
7 data-toggle="collapse"
8 data-target=".navbar-collapse"
9 aria-label="Toggle navigation">
10 <span class="navbar-toggler-icon"></span>
11 </button>
12 <div class="navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse">
13 <ul class="navbar-nav flex-grow">
14 <li>Administration panel:</li>
15 <li>&nbsp;Logged as <p *ngIf="head">{{adminHead.Name}}</p> </li>
16 <li (click)="logout()" class="btn btn-link"><a>Logout</a></li>
17 </ul>
18 </div>
19 </div>
20 </nav>
21</header>
22<mat-tab-group mat-stretch-tabs dynamicHeight>
23 <mat-tab label="Claiming requests">
24 <div class="wrapper">
25 <div>
26 <table class='table table-striped table-bordered table-sm' cellspacing="0" width="100%" aria-labelledby="tableLabel" *ngIf="requests">
27 <thead>
28 <tr>
29 <th>Account</th>
30 <th>Pharmacy</th>
31 <th>Action</th>
32 </tr>
33 </thead>
34 <tbody>
35 <tr *ngFor="let request of requests">
36 <td>{{request.PharmacyHead.Name}} | {{request.PharmacyHead.Email}}</td>
37 <td><a (click)="openPharmacyDialog(request.Pharmacy)">{{request.Pharmacy.name}}</a></td>
38 <td><a (click)="approveRequest(request)">Approve</a> | <a (click)="rejectRequest(request)">Reject</a></td>
39 </tr>
40 </tbody>
41 </table>
42 </div>
43 </div>
44 </mat-tab>
45 <mat-tab label="Manage accounts">
46 <div class="wrapper">
47 <div>
48 <table class='table table-striped table-bordered table-sm' cellspacing="0" width="100%" aria-labelledby="tableLabel" *ngIf="heads">
49 <thead>
50 <tr>
51 <th>Account</th>
52 <th>Actions</th>
53 </tr>
54 </thead>
55 <tbody>
56 <tr *ngFor="let head of heads">
57 <td><a (click)="openPharmacyHeadDialog(head)">{{head.Name}}</a> | {{head.Email}}</td>
58 <td><a (click)="deletePharmacyHead(head)">Delete</a> | <a (click)="openEditPharmacyHeadDialog(head)">Change</a></td>
59 </tr>
60 </tbody>
61 </table>
62 </div>
63 </div>
64 </mat-tab>
65 <mat-tab label="Create new account">
66 <h2 *ngIf="!this.head">Loading form...</h2>
67 <div class="createform" *ngIf="this.head">
68 <mat-form-field appearance="fill">
69 <mat-label>Name</mat-label>
70 <input matInput [(ngModel)]="this.head.Name">
71 </mat-form-field><br>
72 <mat-form-field appearance="fill">
73 <mat-label>Email</mat-label>
74 <input matInput [(ngModel)]="this.head.Email">
75 </mat-form-field><br>
76 <mat-form-field appearance="fill">
77 <mat-label>Password</mat-label>
78 <input matInput [(ngModel)]="this.head.Passwd">
79 </mat-form-field><br>
80 <button (click)="createHead()" mat-raised-button color="primary">Create</button>
81 </div>
82 </mat-tab>
83</mat-tab-group>
Note: See TracBrowser for help on using the repository browser.