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

Last change on this file since ac51326 was 28d7d35, checked in by Mile Jankuloski <mile.jankuloski@…>, 4 years ago

Maps, geolocation api, dialogs & more

  • Property mode set to 100644
File size: 7.0 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">
[28d7d35]46 <td (click)="openPharmacyDialog(pharmacies)">{{pharmacies.name}}</td>
47 <td (click)="openPharmacyDialog(pharmacies)">{{pharmacies.location}}</td>
48 <td (click)="openPharmacyDialog(pharmacies)">{{pharmacies.address}}</td>
49 <td (click)="openPharmacyDialog(pharmacies)">{{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>
[28d7d35]74 <tr *ngFor="let pharmacy of filteredPharmacies">
75 <td (click)="openPharmacyDialog(pharmacy)">{{ pharmacy.name }}</td>
76 <td (click)="openPharmacyDialog(pharmacy)">{{ pharmacy.location }}</td>
77 <td (click)="openPharmacyDialog(pharmacy)">{{ pharmacy.address }}</td>
78 <td (click)="openPharmacyDialog(pharmacy)">{{ pharmacy.workAllTime }}</td>
79 <td><a (click)="claimPharmacy(pharmacy)" *ngIf="!pharmacy.headName">Claim</a> <span *ngIf="pharmacy.headName">Already claimed</span></td>
[ee137aa]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">
[28d7d35]116 <td *ngIf="!medicinesEditMode" (click)="openMedicineDialog(medicine)">{{ medicine.name }}</td>
[8e74e2f]117 <td *ngIf="medicinesEditMode"><mat-form-field appearance="fill"><input matInput [(ngModel)]="medicine.name" name="medname"></mat-form-field></td>
[28d7d35]118 <td *ngIf="!medicinesEditMode" (click)="openMedicineDialog(medicine)">{{ medicine.strength }}</td>
[8e74e2f]119 <td *ngIf="medicinesEditMode"><mat-form-field appearance="fill"><input matInput [(ngModel)]="medicine.strength" name="medstr"></mat-form-field></td>
[28d7d35]120 <td *ngIf="!medicinesEditMode" (click)="openMedicineDialog(medicine)">{{ medicine.form }}</td>
[8e74e2f]121 <td *ngIf="medicinesEditMode"><mat-form-field appearance="fill"><input matInput [(ngModel)]="medicine.form" name="medform"></mat-form-field></td>
[28d7d35]122 <td *ngIf="!medicinesEditMode" (click)="openMedicineDialog(medicine)">{{ medicine.wayOfIssuing }}</td>
[8e74e2f]123 <td *ngIf="medicinesEditMode"><mat-form-field appearance="fill"><input matInput [(ngModel)]="medicine.wayOfIssuing" name="medwayOfIssuing"></mat-form-field></td>
[28d7d35]124 <td *ngIf="!medicinesEditMode" (click)="openMedicineDialog(medicine)">{{ medicine.manufacturer }}</td>
[8e74e2f]125 <td *ngIf="medicinesEditMode"><mat-form-field appearance="fill"><input matInput [(ngModel)]="medicine.manufacturer" name="medmanufacturer"></mat-form-field></td>
[28d7d35]126 <td *ngIf="!medicinesEditMode" (click)="openMedicineDialog(medicine)">{{ medicine.price }}</td>
[8e74e2f]127 <td *ngIf="medicinesEditMode"><mat-form-field appearance="fill"><input matInput [(ngModel)]="medicine.price" name="medprice"></mat-form-field></td>
[28d7d35]128 <td *ngIf="!medicinesEditMode" (click)="openMedicineDialog(medicine)">{{ medicine.packaging }}</td>
[8e74e2f]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.