Ignore:
Timestamp:
08/07/20 10:59:56 (4 years ago)
Author:
Mile Jankuloski <mile.jankuloski@…>
Branches:
master
Children:
63d885e
Parents:
c73269d
Message:

Added DataService and dialogs, all bindings needed implemented

File:
1 edited

Legend:

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

    rc73269d ree137aa  
    2222        <div class="wrapper">
    2323          <div>
    24             <table class='table table-striped table-bordered table-sm' cellspacing="0" width="100%" aria-labelledby="tableLabel" *ngIf="true">
     24            <table class='table table-striped table-bordered table-sm' cellspacing="0" width="100%" aria-labelledby="tableLabel" *ngIf="requests">
    2525              <thead>
    2626                <tr>
     
    3131              </thead>
    3232              <tbody>
    33                 <tr *ngFor="let head of heads">
    34                   <td>{{head.Name}} | {{head.Email}}</td>
    35                   <td>{{head.Pharmacy[0].name}}</td>
    36                   <td><a (click)="Approve()">Approve</a> | <a (click)="Reject()">Reject</a></td>
     33                <tr *ngFor="let request of requests">
     34                  <td>{{request.PharmacyHead.Name}} | {{request.PharmacyHead.Email}}</td>
     35                  <td><a (click)="openPharmacyDialog(request.Pharmacy)">{{request.Pharmacy.name}}</a></td>
     36                  <td><a (click)="approveRequest(request)">Approve</a> | <a (click)="rejectRequest(request)">Reject</a></td>
    3737                </tr>
    3838              </tbody>
     
    4444        <div class="wrapper">
    4545          <div>
    46             <table class='table table-striped table-bordered table-sm' cellspacing="0" width="100%" aria-labelledby="tableLabel" *ngIf="true">
     46            <table class='table table-striped table-bordered table-sm' cellspacing="0" width="100%" aria-labelledby="tableLabel" *ngIf="heads">
    4747              <thead>
    4848                <tr>
     
    5353              <tbody>
    5454                <tr *ngFor="let head of heads">
    55                   <td>{{head.Name}} | {{head.Email}}</td>
    56                   <td><a (click)="Del(head)">Delete</a> | <a (click)="ChangeDialog(head)">Change</a></td>
     55                  <td><a (click)="openPharmacyHeadDialog(head)">{{head.Name}}</a> | {{head.Email}}</td>
     56                  <td><a (click)="deletePharmacyHead(head)">Delete</a> | <a (click)="openEditPharmacyHeadDialog(head)">Change</a></td>
    5757                </tr>
    5858              </tbody>
     
    6262      </mat-tab>
    6363        <mat-tab label="Create new account">
    64           <div class="createform">
     64          <h2 *ngIf="!this.head">Loading form...</h2>
     65          <div class="createform" *ngIf="this.head">
    6566          <mat-form-field appearance="fill">
    6667            <mat-label>Name</mat-label>
    67             <input matInput [(ngModel)]="head.Name">
     68            <input matInput [(ngModel)]="this.head.Name">
    6869          </mat-form-field><br>
    6970          <mat-form-field appearance="fill">
    7071            <mat-label>Email</mat-label>
    71             <input matInput [(ngModel)]="head.Email">
     72            <input matInput [(ngModel)]="this.head.Email">
    7273          </mat-form-field><br>
    7374          <mat-form-field appearance="fill">
    7475            <mat-label>Password</mat-label>
    75             <input matInput [(ngModel)]="head.Passwd">
     76            <input matInput [(ngModel)]="this.head.Passwd">
    7677          </mat-form-field><br>
    7778            <button onclick="createHead()" mat-raised-button color="primary">Create</button>
     
    7980        </mat-tab>
    8081</mat-tab-group>
    81 
    82 <div class="status">{{status}}</div>
Note: See TracChangeset for help on using the changeset viewer.