source: Farmatiko/ClientApp/src/app/dashboard/dashboard.component.html@ 7520f88

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

Fix bugs, add some more.

  • Property mode set to 100644
File size: 6.4 KB
RevLine 
[785b8bd]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">
[ef1219a]4 <a class="navbar-brand" [routerLink]="['/dashboard']"><img src="../../assets/logo.png"></a>
[785b8bd]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">
[ad60966]14 <li>Logged as <p *ngIf="head">{{head.Name}}</p> </li>
[785b8bd]15 </ul>
16 </div>
[ef1219a]17
18 <button mat-button [matMenuTriggerFor]="menu"><mat-icon>more_vert</mat-icon></button>
19 <mat-menu #menu="matMenu">
[ee137aa]20 <button mat-menu-item [routerLink]="['/']"><mat-icon>directions</mat-icon>Почетна</button>
[8e74e2f]21 <button mat-menu-item (click)="logout()"><mat-icon>exit_to_app</mat-icon>Одјави се</button>
[ef1219a]22 </mat-menu>
[785b8bd]23 </div>
24 </nav>
25</header>
26
[8e74e2f]27<mat-tab-group dynamicHeight mat-stretch-tabs>
[ef1219a]28 <mat-tab class="tab" label="Мои аптеки">
29 <div class="wrapper">
30 <div class="header">
31 <h2>Мои аптеки</h2>
[ee137aa]32 <p *ngIf="!head"><em>Loading...</em></p>
[ef1219a]33 </div>
[ee137aa]34 <table class='table table-striped table-bordered table-sm' cellspacing="0" width="100%" aria-labelledby="tableLabel" *ngIf="head">
[785b8bd]35 <thead>
36 <tr>
[de18858]37 <th>Име</th>
38 <th>Локација</th>
39 <th>Адреса</th>
40 <th>Работи 24/7</th>
41 <th>Actions</th>
[785b8bd]42 </tr>
43 </thead>
44 <tbody>
[ee137aa]45 <tr *ngFor="let pharmacies of head.Pharmacy">
[de18858]46 <td>{{pharmacies.name}}</td>
47 <td>{{pharmacies.location}}</td>
48 <td>{{pharmacies.address}}</td>
49 <td>{{pharmacies.workAllTime}}</td>
[ee137aa]50 <td><a (click)="openEditPharmacyDialog(pharmacies)">Edit</a></td>
[785b8bd]51 </tr>
52 </tbody>
53 </table>
54 </div>
[ef1219a]55 </mat-tab>
56 <mat-tab class="tab" label="Сите аптеки">
57 <div class="wrapper">
58 <div class="header">
59 <h2>Сите аптеки</h2>
60 <mat-form-field>
[de18858]61 <input matInput (keyup)="applyFilterPharmacies($event.target.value)" placeholder="Пронајди аптека">
[ef1219a]62 </mat-form-field>
[ee137aa]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>
[ef1219a]83 </div>
84 </mat-tab>
85 </mat-tab-group>
86
87<div class="wrapper">
88 <div class="header">
89 <h2>Достапни лекови</h2>
[8e74e2f]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">
[ee137aa]98 <input matInput (keyup)="applyFilterMedicines($event.target.value)" placeholder="Пронајди лек">
[ef1219a]99 </mat-form-field>
[8e74e2f]100 </div>
[ee137aa]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>
[8e74e2f]111 <th>Контроли</th>
[ee137aa]112 </tr>
113 </thead>
114 <tbody>
[8e74e2f]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>
[ee137aa]135 </tr>
136 </tbody>
137 </table>
[ef1219a]138</div>
Note: See TracBrowser for help on using the repository browser.