source: Farmatiko/ClientApp/src/app/dashboard/dashboard.component.html@ 8e74e2f

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

Fix bugs, add some more.

  • Property mode set to 100644
File size: 6.4 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]="['/dashboard']"><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>Logged as <p *ngIf="head">{{head.Name}}</p> </li>
15 </ul>
16 </div>
17
18 <button mat-button [matMenuTriggerFor]="menu"><mat-icon>more_vert</mat-icon></button>
19 <mat-menu #menu="matMenu">
20 <button mat-menu-item [routerLink]="['/']"><mat-icon>directions</mat-icon>Почетна</button>
21 <button mat-menu-item (click)="logout()"><mat-icon>exit_to_app</mat-icon>Одјави се</button>
22 </mat-menu>
23 </div>
24 </nav>
25</header>
26
27<mat-tab-group dynamicHeight mat-stretch-tabs>
28 <mat-tab class="tab" label="Мои аптеки">
29 <div class="wrapper">
30 <div class="header">
31 <h2>Мои аптеки</h2>
32 <p *ngIf="!head"><em>Loading...</em></p>
33 </div>
34 <table class='table table-striped table-bordered table-sm' cellspacing="0" width="100%" aria-labelledby="tableLabel" *ngIf="head">
35 <thead>
36 <tr>
37 <th>Име</th>
38 <th>Локација</th>
39 <th>Адреса</th>
40 <th>Работи 24/7</th>
41 <th>Actions</th>
42 </tr>
43 </thead>
44 <tbody>
45 <tr *ngFor="let pharmacies of head.Pharmacy">
46 <td>{{pharmacies.name}}</td>
47 <td>{{pharmacies.location}}</td>
48 <td>{{pharmacies.address}}</td>
49 <td>{{pharmacies.workAllTime}}</td>
50 <td><a (click)="openEditPharmacyDialog(pharmacies)">Edit</a></td>
51 </tr>
52 </tbody>
53 </table>
54 </div>
55 </mat-tab>
56 <mat-tab class="tab" label="Сите аптеки">
57 <div class="wrapper">
58 <div class="header">
59 <h2>Сите аптеки</h2>
60 <mat-form-field>
61 <input matInput (keyup)="applyFilterPharmacies($event.target.value)" placeholder="Пронајди аптека">
62 </mat-form-field>
63 </div>
64 <table class='table table-striped table-bordered table-sm' cellspacing="0" width="100%" aria-labelledby="tableLabel" *ngIf="pharmacies">
65 <thead>
66 <tr>
67 <th>Име</th>
68 <th>Локација</th>
69 <th>Адреса</th>
70 <th>Работи 27/7?</th>
71 </tr>
72 </thead>
73 <tbody>
74 <tr *ngFor="let pharmacy of pharmacies">
75 <td><a (click)="openPharmacyDialog(pharmacy)">{{ pharmacy.name }}</a></td>
76 <td>{{ pharmacy.location }}</td>
77 <td>{{ pharmacy.address }}</td>
78 <td>{{ pharmacy.workAllTime }}</td>
79 <td><a (click)="claimPharmacy(pharmacy)">Claim</a></td>
80 </tr>
81 </tbody>
82 </table>
83 </div>
84 </mat-tab>
85 </mat-tab-group>
86
87<div class="wrapper">
88 <div class="header">
89 <h2>Достапни лекови</h2>
90 <div class="btns">
91 <button mat-raised-button color="primary" (click)="saveDeletedMedicines()" [disabled]="editedMedicine==false">Зачувај ги промените</button>
92 <button mat-raised-button color="accent" aria-label="Add medicine" (click)="addMedicine()">Додај нов лек</button>
93 <button mat-raised-button color="accent" aria-label="Add medicine" (click)="addMedicinesFromList()">Додај постоечки лекови</button>
94 </div><br/>
95 <mat-slide-toggle (click)="switchEditMedicineMode()">Edit mode</mat-slide-toggle>
96
97 <mat-form-field *ngIf="!medicinesEditMode">
98 <input matInput (keyup)="applyFilterMedicines($event.target.value)" placeholder="Пронајди лек">
99 </mat-form-field>
100 </div>
101 <table class='table table-striped table-bordered table-sm' cellspacing="0" width="100%" aria-labelledby="tableLabel" *ngIf="head">
102 <thead>
103 <tr>
104 <th>Име</th>
105 <th>Јачина</th>
106 <th>Форма</th>
107 <th>Начин на издавање</th>
108 <th>Производител</th>
109 <th>Цена</th>
110 <th>Пакување</th>
111 <th>Контроли</th>
112 </tr>
113 </thead>
114 <tbody>
115 <tr *ngFor="let medicine of filteredMedicines">
116 <td *ngIf="!medicinesEditMode"><a (click)="openMedicineDialog(medicine)">{{ medicine.name }}</a></td>
117 <td *ngIf="medicinesEditMode"><mat-form-field appearance="fill"><input matInput [(ngModel)]="medicine.name" name="medname"></mat-form-field></td>
118 <td *ngIf="!medicinesEditMode">{{ medicine.strength }}</td>
119 <td *ngIf="medicinesEditMode"><mat-form-field appearance="fill"><input matInput [(ngModel)]="medicine.strength" name="medstr"></mat-form-field></td>
120 <td *ngIf="!medicinesEditMode">{{ medicine.form }}</td>
121 <td *ngIf="medicinesEditMode"><mat-form-field appearance="fill"><input matInput [(ngModel)]="medicine.form" name="medform"></mat-form-field></td>
122 <td *ngIf="!medicinesEditMode">{{ medicine.wayOfIssuing }}</td>
123 <td *ngIf="medicinesEditMode"><mat-form-field appearance="fill"><input matInput [(ngModel)]="medicine.wayOfIssuing" name="medwayOfIssuing"></mat-form-field></td>
124 <td *ngIf="!medicinesEditMode">{{ medicine.manufacturer }}</td>
125 <td *ngIf="medicinesEditMode"><mat-form-field appearance="fill"><input matInput [(ngModel)]="medicine.manufacturer" name="medmanufacturer"></mat-form-field></td>
126 <td *ngIf="!medicinesEditMode">{{ medicine.price }}</td>
127 <td *ngIf="medicinesEditMode"><mat-form-field appearance="fill"><input matInput [(ngModel)]="medicine.price" name="medprice"></mat-form-field></td>
128 <td *ngIf="!medicinesEditMode">{{ medicine.packaging }}</td>
129 <td *ngIf="medicinesEditMode"><mat-form-field appearance="fill"><input matInput [(ngModel)]="medicine.packaging" name="medpackaging"></mat-form-field></td>
130 <td>
131 <button mat-mini-fab color="warn" aria-label="Delete medicine" (click)="deleteMedicine(medicine)">
132 <mat-icon>delete</mat-icon>
133 </button>
134 </td>
135 </tr>
136 </tbody>
137 </table>
138</div>
Note: See TracBrowser for help on using the repository browser.