Changeset 28d7d35 for Farmatiko/ClientApp/src/app/dashboard
- Timestamp:
- 01/31/21 06:27:26 (4 years ago)
- Branches:
- master
- Children:
- de9d697
- Parents:
- 7520f88
- Location:
- Farmatiko/ClientApp/src/app/dashboard
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Farmatiko/ClientApp/src/app/dashboard/dashboard.component.html
r7520f88 r28d7d35 44 44 <tbody> 45 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>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> 50 50 <td><a (click)="openEditPharmacyDialog(pharmacies)">Edit</a></td> 51 51 </tr> … … 72 72 </thead> 73 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>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> 80 80 </tr> 81 81 </tbody> … … 114 114 <tbody> 115 115 <tr *ngFor="let medicine of filteredMedicines"> 116 <td *ngIf="!medicinesEditMode" ><a (click)="openMedicineDialog(medicine)">{{ medicine.name }}</a></td>116 <td *ngIf="!medicinesEditMode" (click)="openMedicineDialog(medicine)">{{ medicine.name }}</td> 117 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>118 <td *ngIf="!medicinesEditMode" (click)="openMedicineDialog(medicine)">{{ medicine.strength }}</td> 119 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>120 <td *ngIf="!medicinesEditMode" (click)="openMedicineDialog(medicine)">{{ medicine.form }}</td> 121 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>122 <td *ngIf="!medicinesEditMode" (click)="openMedicineDialog(medicine)">{{ medicine.wayOfIssuing }}</td> 123 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>124 <td *ngIf="!medicinesEditMode" (click)="openMedicineDialog(medicine)">{{ medicine.manufacturer }}</td> 125 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>126 <td *ngIf="!medicinesEditMode" (click)="openMedicineDialog(medicine)">{{ medicine.price }}</td> 127 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>128 <td *ngIf="!medicinesEditMode" (click)="openMedicineDialog(medicine)">{{ medicine.packaging }}</td> 129 129 <td *ngIf="medicinesEditMode"><mat-form-field appearance="fill"><input matInput [(ngModel)]="medicine.packaging" name="medpackaging"></mat-form-field></td> 130 130 <td> -
Farmatiko/ClientApp/src/app/dashboard/dashboard.component.ts
r7520f88 r28d7d35 40 40 this.dataService.getPharmacies() 41 41 .subscribe((pharmacy: IPharmacy[]) => { 42 this.pharmacies = pharmacy; 43 this.head.Pharmacy.forEach((pharma) => { 44 this.filteredPharmacies = this.pharmacies = this.pharmacies.filter(x => x == pharma); 45 }); 42 this.pharmacies = this.filteredPharmacies = pharmacy; 43 // Iskluceno filtriranje na farmacies (Star metod) 44 // this.head.Pharmacy.forEach((pharma) => { 45 // this.filteredPharmacies = this.pharmacies = this.pharmacies.filter(x => x == pharma); 46 // }); 46 47 }, 47 48 (err: any) => console.log(err), … … 147 148 if(listMedicines){ 148 149 listMedicines.forEach((medicine) => { 149 this.head.PharmacyMedicines = this.head.PharmacyMedicines.filter(x => x != medicine); 150 if(this.head.PharmacyMedicines) { 151 this.head.PharmacyMedicines = this.head.PharmacyMedicines.filter(x => x != medicine); 152 } 153 else { 154 this.head.PharmacyMedicines = []; 155 } 150 156 this.head.PharmacyMedicines.push(medicine); 151 157 this.filteredMedicines = this.head.PharmacyMedicines; … … 175 181 .subscribe((pharmacy: IPharmacy[]) => { 176 182 this.filteredPharmacies = pharmacy; 177 this.head.Pharmacy.forEach((pharma) => {178 this.filteredPharmacies = this.filteredPharmacies.filter(x => x == pharma);179 });183 // this.head.Pharmacy.forEach((pharma) => { 184 // this.filteredPharmacies = this.filteredPharmacies.filter(x => x == pharma); 185 // }); 180 186 }, 181 187 (err: any) => console.log(err),
Note:
See TracChangeset
for help on using the changeset viewer.