Ignore:
Timestamp:
07/29/20 13:21:48 (4 years ago)
Author:
DimitarSlezenkovski <dslezenkovski@…>
Branches:
master
Children:
de18858
Parents:
ef1219a
Message:

Add more services

Location:
Farmatiko/ClientApp/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • Farmatiko/ClientApp/src/app/counter/counter.component.html

    ref1219a re42f61a  
    33
    44<mat-tab-group mat-stretch-tabs>
    5   <mat-tab class="tab" label="Здравствени установи"> 
     5  <mat-tab class="tab" label="Здравствени установи">
    66  <div class="wrapper">
    77    <div class="header">
     
    1616        <td mat-cell *matCellDef="let facilities"> {{facilities.name}} </td>
    1717      </ng-container>
    18  
     18
    1919      <ng-container matColumnDef="Општина">
    2020        <th mat-header-cell *matHeaderCellDef mat-sort-header> Општина </th>
    2121        <td mat-cell *matCellDef="let facilities"> {{facilities.municipality}} </td>
    2222      </ng-container>
    23    
     23
    2424      <ng-container matColumnDef="Адреса">
    2525        <th mat-header-cell *matHeaderCellDef mat-sort-header> Адреса </th>
    2626        <td mat-cell *matCellDef="let facilities"> {{facilities.address}} </td>
    2727      </ng-container>
    28      
     28
    2929      <ng-container matColumnDef="Тип">
    3030        <th mat-header-cell *matHeaderCellDef mat-sort-header> Тип </th>
    3131        <td mat-cell *matCellDef="let facilities"> {{facilities.type}} </td>
    3232      </ng-container>
    33  
     33
    3434      <ng-container matColumnDef="Е-пошта">
    3535        <th mat-header-cell *matHeaderCellDef mat-sort-header> Е-пошта </th>
    3636        <td mat-cell *matCellDef="let facilities"> {{facilities.email}} </td>
    3737      </ng-container>
    38    
     38
    3939      <ng-container matColumnDef="Телефон">
    4040        <th mat-header-cell *matHeaderCellDef mat-sort-header> Телефон </th>
     
    4848  </div>
    4949  </mat-tab>
    50   <mat-tab class="tab" label="Здравствени работници"> 
     50  <mat-tab class="tab" label="Здравствени работници">
    5151  <div class="wrapper">
    5252    <div class="header">
     
    5656    </mat-form-field>
    5757    </div>
    58       <table [dataSource]="dataSource" mat-table matSort class="mat-elevation-z8">
     58      <table [dataSource]="dataSourceWorkers" mat-table matSort class="mat-elevation-z8">
    5959        <ng-container matColumnDef="Име">
    6060          <th mat-header-cell *matHeaderCellDef mat-sort-header> Име </th>
    61           <td mat-cell *matCellDef="let facilities"> {{facilities.name}} </td>
     61          <td mat-cell *matCellDef="let workers"> {{workers.name}} </td>
    6262        </ng-container>
    63    
    64         <ng-container matColumnDef="Општина">
    65           <th mat-header-cell *matHeaderCellDef mat-sort-header> Општина </th>
    66           <td mat-cell *matCellDef="let facilities"> {{facilities.municipality}} </td>
     63
     64        <ng-container matColumnDef="Гранка">
     65          <th mat-header-cell *matHeaderCellDef mat-sort-header> Гранка </th>
     66          <td mat-cell *matCellDef="let workers"> {{workers.branch}} </td>
    6767        </ng-container>
    68      
    69         <ng-container matColumnDef="Адреса">
    70           <th mat-header-cell *matHeaderCellDef mat-sort-header> Адреса </th>
    71           <td mat-cell *matCellDef="let facilities"> {{facilities.address}} </td>
     68
     69        <ng-container matColumnDef="Установа">
     70          <th mat-header-cell *matHeaderCellDef mat-sort-header> Установа </th>
     71          <td mat-cell *matCellDef="let workers"> {{workers.facility}} </td>
    7272        </ng-container>
    73        
    74         <ng-container matColumnDef="Тип">
    75           <th mat-header-cell *matHeaderCellDef mat-sort-header> Тип </th>
    76           <td mat-cell *matCellDef="let facilities"> {{facilities.type}} </td>
     73
     74        <ng-container matColumnDef="Назив">
     75          <th mat-header-cell *matHeaderCellDef mat-sort-header> Назив </th>
     76          <td mat-cell *matCellDef="let workers"> {{workers.title}} </td>
    7777        </ng-container>
    78    
    79         <ng-container matColumnDef="Е-пошта">
    80           <th mat-header-cell *matHeaderCellDef mat-sort-header> Е-пошта </th>
    81           <td mat-cell *matCellDef="let facilities"> {{facilities.email}} </td>
    82         </ng-container>
    83      
    84         <ng-container matColumnDef="Телефон">
    85           <th mat-header-cell *matHeaderCellDef mat-sort-header> Телефон </th>
    86           <td mat-cell *matCellDef="let facilities"> {{facilities.phone}} </td>
    87         </ng-container>
    88  
    89           <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
    90           <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
     78
     79
     80
     81          <tr mat-header-row *matHeaderRowDef="displayedColumnsWorkers"></tr>
     82          <tr mat-row *matRowDef="let row; columns: displayedColumnsWorkers;"></tr>
    9183      </table>
    9284      <mat-paginator #paginator [pageSize]="5" [pageSizeOptions]="[5, 10, 20, 100]"></mat-paginator>
  • Farmatiko/ClientApp/src/app/counter/counter.component.ts

    ref1219a re42f61a  
    55import { MatPaginator } from '@angular/material/paginator';
    66import { MatSort } from '@angular/material/sort';
     7import { HealthcareWorkers } from '../models/HealthcareWorkers';
    78
    89@Component({
     
    1314export class CounterComponent implements OnInit {
    1415  public facilities: HealthFacilities[];
     16  public workers: HealthcareWorkers[];
    1517  displayedColumns = ['Име','Општина','Адреса', 'Тип', 'Е-пошта', 'Телефон'];
     18  displayedColumnsWorkers = ['Име','Гранка','Установа', 'Назив'];
    1619  dataSource = new MatTableDataSource<HealthFacilities>();
     20  dataSourceWorkers = new MatTableDataSource<HealthcareWorkers>();
    1721
    1822  @ViewChild(MatPaginator, {static: true}) paginator: MatPaginator;
     
    2529      this.dataSource = new MatTableDataSource<HealthFacilities>(this.facilities);
    2630    }, error => console.error(error));
     31    http.get<HealthcareWorkers[]>(baseUrl + 'HealthcareWorker/Get?').subscribe(result => {
     32      this.workers = result;
     33      console.log(this.workers);
     34      this.dataSourceWorkers = new MatTableDataSource<HealthcareWorkers>(this.workers);
     35    }, error => console.error(error));
    2736  }
    2837  ngOnInit(): void {
     
    3241    this.dataSource.paginator = this.paginator;
    3342    this.dataSource.sort = this.sort;
     43    this.dataSourceWorkers.paginator = this.paginator;
     44    this.dataSourceWorkers.sort = this.sort;
    3445  }
    3546
     
    3849    filterValue = filterValue.toLowerCase();
    3950    this.dataSource.filter = filterValue;
     51    this.dataSourceWorkers.filter = filterValue;
    4052  }
    4153}
  • Farmatiko/ClientApp/src/app/dashboard/dashboard.component.ts

    ref1219a re42f61a  
    55import { MatSort } from '@angular/material/sort';
    66import { HealthFacilities } from '../models/HealthFacilities';
    7 import { HttpClient } from '@angular/common/http';;
     7import { HttpClient } from '@angular/common/http';
    88import { MatDialog } from '@angular/material/dialog';
    99import { MatSnackBar, MatSnackBarRef, SimpleSnackBar } from '@angular/material/snack-bar';
  • Farmatiko/ClientApp/src/environments/environment.prod.ts

    ref1219a re42f61a  
    11export const environment = {
    2   production: true
     2  production: true,
     3  baseApiUrl: 'htpps://api.farmatiko.com/',
    34};
  • Farmatiko/ClientApp/src/environments/environment.ts

    ref1219a re42f61a  
    44
    55export const environment = {
    6   production: false
     6  production: false,
     7  baseApiUrl: 'https://localhost:44342/',
    78};
    89
  • Farmatiko/ClientApp/src/main.ts

    ref1219a re42f61a  
    66
    77export function getBaseUrl() {
    8   return document.getElementsByTagName('base')[0].href;
     8  return environment.baseApiUrl;
    99}
    1010
Note: See TracChangeset for help on using the changeset viewer.