Changeset c73269d for Farmatiko


Ignore:
Timestamp:
07/31/20 20:30:41 (4 years ago)
Author:
Mile Jankuloski <mile.jankuloski@…>
Branches:
master
Children:
a6bbad1, ee137aa
Parents:
d8fafb8
Message:

JSON processing added

Location:
Farmatiko
Files:
1 added
5 edited

Legend:

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

    rd8fafb8 rc73269d  
    1010    <input matInput (keyup)="applyFilter($event.target.value)" placeholder="Пронајди установа">
    1111  </mat-form-field>
    12     </div>
    13     <table [dataSource]="dataSource" mat-table matSort class="mat-elevation-z8">
     12    </div>   
     13  <table [dataSource]="dataSource" mat-table matSort class="mat-elevation-z8">
     14      <ng-container matColumnDef="id">
     15        <th mat-header-cell *matHeaderCellDef mat-sort-header> id </th>
     16        <td mat-cell *matCellDef="let facilities"> {{facilities.id}} </td>
     17      </ng-container>
     18
     19      <ng-container matColumnDef="createdOn">
     20        <th mat-header-cell *matHeaderCellDef mat-sort-header> createdOn </th>
     21        <td mat-cell *matCellDef="let facilities"> {{facilities.createdOn}} </td>
     22      </ng-container>
     23     
     24      <ng-container matColumnDef="deletedOn">
     25        <th mat-header-cell *matHeaderCellDef mat-sort-header> deletedOn </th>
     26        <td mat-cell *matCellDef="let facilities"> {{facilities.deletedOn}} </td>
     27      </ng-container>
     28
    1429      <ng-container matColumnDef="Име">
    1530        <th mat-header-cell *matHeaderCellDef mat-sort-header> Име </th>
     
    4560        <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
    4661    </table>
    47     <mat-paginator #paginator [pageSize]="5" [pageSizeOptions]="[5, 10, 20, 100]"></mat-paginator>
     62    <mat-paginator #paginator [pageSize]="100" [pageSizeOptions]="[5, 10, 20, 100]"></mat-paginator>
    4863  </div>
    4964  </mat-tab>
  • Farmatiko/ClientApp/src/app/counter/counter.component.ts

    rd8fafb8 rc73269d  
    1 import { Component, OnInit, ViewChild, Inject } from '@angular/core';
     1import { Component, OnInit, ViewChild, Inject, Input } from '@angular/core';
    22import { HttpClient } from '@angular/common/http';
    33import { HealthFacilities } from '../models/HealthFacilities';
     
    1313})
    1414export class CounterComponent implements OnInit {
    15   public facilities: HealthFacilities[];
     15  @Input() facilities: HealthFacilities[];
    1616  public workers: HealthcareWorkers[];
    17   displayedColumns = ['Име','Општина','Адреса', 'Тип', 'Е-пошта', 'Телефон'];
     17  displayedColumns = ['id','createdOn','deletedOn','Име','Општина','Адреса', 'Тип', 'Е-пошта', 'Телефон'];
    1818  displayedColumnsWorkers = ['Име','Гранка','Установа', 'Назив'];
    1919  dataSource = new MatTableDataSource<HealthFacilities>();
    2020  dataSourceWorkers = new MatTableDataSource<HealthcareWorkers>();
    2121
    22   @ViewChild(MatPaginator, {static: true}) paginator: MatPaginator;
     22  @ViewChild(MatPaginator, {static: false}) paginator: MatPaginator;
    2323  @ViewChild(MatSort) sort: MatSort;
    2424
     
    4141    this.dataSource.paginator = this.paginator;
    4242    this.dataSource.sort = this.sort;
    43     this.dataSourceWorkers.paginator = this.paginator;
    44     this.dataSourceWorkers.sort = this.sort;
    4543  }
    4644
  • Farmatiko/ClientApp/src/app/shared/material.module.ts

    rd8fafb8 rc73269d  
    7575    MatTabsModule,
    7676    MatToolbarModule,
    77     MatTooltipModule
     77    MatTooltipModule,
     78    MatFormFieldModule
    7879  ],
    7980  exports: [
     
    113114    MatTabsModule,
    114115    MatToolbarModule,
    115     MatTooltipModule
     116    MatTooltipModule,
     117    MatFormFieldModule
    116118  ]
    117119})
  • Farmatiko/Controllers/HealthFacilitiesController.cs

    rd8fafb8 rc73269d  
    2020        private IHealthFacilityService _healthFacilitiesService;
    2121        private IProcessJSONService _processJSONService;
    22         /*private IProcessJSONService _processJSONService;*/
    23         private string Path = @"C:\Users\dslez\Desktop\ustanovi.json";
    2422        public HealthFacilitiesController(IHealthFacilityService healthFacilitiesService, IProcessJSONService processJSONService)
    2523        {
     
    3230            return _healthFacilitiesService.GetAll();
    3331        }
    34        /* public void Index()
    35        
     32        public void Index()
    3633        {
    3734            _processJSONService.GetProcessedHealthFacilitiesFromJSON();
    38         }*/
     35        }
    3936    }
    4037}
  • Farmatiko/Farmatiko.csproj

    rd8fafb8 rc73269d  
    3535
    3636  <ItemGroup>
     37    <Compile Remove="Controllers\WeatherForecastController.cs" />
     38    <Compile Remove="WeatherForecast.cs" />
     39  </ItemGroup>
     40
     41  <ItemGroup>
    3742    <ProjectReference Include="..\FarmatikoData\FarmatikoData.csproj" />
    3843    <ProjectReference Include="..\FarmatikoServices\FarmatikoServices.csproj" />
Note: See TracChangeset for help on using the changeset viewer.