Ignore:
Timestamp:
02/08/21 16:39:25 (4 years ago)
Author:
Dimitar Slezenkovski <dslezenkovski@…>
Branches:
master
Children:
8eb1e21, dae4cde
Parents:
0a694bb
Message:

Fix all bugs

Location:
Farmatiko/ClientApp/src/app
Files:
3 edited

Legend:

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

    r0a694bb re0cdea2  
    124124
    125125  rejectRequest(req: IPharmacyHeadRequest) {
    126     this.dataService.deleteClaimingRequest(req.id)
     126    this.dataService.deleteClaimingRequest(req)
    127127        .subscribe((status: boolean) => {
    128128          if(status) {
     
    139139  approveRequest(req: IPharmacyHeadRequest) {
    140140    if(req) {
     141      if (req.PharmacyHead.Pharmacy == null){
     142        req.PharmacyHead.Pharmacy = [];
     143      }
    141144    req.PharmacyHead.Pharmacy.push(req.Pharmacy);
    142145    this.dataService.updatePharmacyHead(req.PharmacyHead)
  • Farmatiko/ClientApp/src/app/dashboard/dashboard.component.ts

    r0a694bb re0cdea2  
    9898  saveDeletedMedicines() {
    9999    this.dataService.updatePharmacyHead(this.head)
    100       .subscribe((hd: IPharmacyHead) => {
     100      .subscribe((hd) => {
    101101        if(hd) {
    102102          this.openSnackBar("Success! Medicine deleted", "OK");
  • Farmatiko/ClientApp/src/app/shared/data.service.ts

    r0a694bb re0cdea2  
    196196                    );
    197197    }
    198     deleteClaimingRequest(id: string) : Observable<boolean> {
    199         return this.http.post<boolean>(this.basePharmacyHead + '/requests/' + id, id)
     198    deleteClaimingRequest(req: IPharmacyHeadRequest) : Observable<boolean> {
     199        return this.http.post<boolean>(this.basePharmacyHead + '/requests/' + req.id, req)
    200200                    .pipe(
    201201                        map((data) => {
Note: See TracChangeset for help on using the changeset viewer.