- Timestamp:
- 02/08/21 16:39:25 (4 years ago)
- Branches:
- master
- Children:
- 8eb1e21, dae4cde
- Parents:
- 0a694bb
- Location:
- Farmatiko
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
Farmatiko/ClientApp/src/app/admin/admin.component.ts
r0a694bb re0cdea2 124 124 125 125 rejectRequest(req: IPharmacyHeadRequest) { 126 this.dataService.deleteClaimingRequest(req .id)126 this.dataService.deleteClaimingRequest(req) 127 127 .subscribe((status: boolean) => { 128 128 if(status) { … … 139 139 approveRequest(req: IPharmacyHeadRequest) { 140 140 if(req) { 141 if (req.PharmacyHead.Pharmacy == null){ 142 req.PharmacyHead.Pharmacy = []; 143 } 141 144 req.PharmacyHead.Pharmacy.push(req.Pharmacy); 142 145 this.dataService.updatePharmacyHead(req.PharmacyHead) -
Farmatiko/ClientApp/src/app/dashboard/dashboard.component.ts
r0a694bb re0cdea2 98 98 saveDeletedMedicines() { 99 99 this.dataService.updatePharmacyHead(this.head) 100 .subscribe((hd : IPharmacyHead) => {100 .subscribe((hd) => { 101 101 if(hd) { 102 102 this.openSnackBar("Success! Medicine deleted", "OK"); -
Farmatiko/ClientApp/src/app/shared/data.service.ts
r0a694bb re0cdea2 196 196 ); 197 197 } 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) 200 200 .pipe( 201 201 map((data) => { -
Farmatiko/Controllers/AdminController.cs
r0a694bb re0cdea2 61 61 [HttpPost] 62 62 [Route("api/pharmacyhead/requests/{Id}")] 63 public IActionResult RejectRequest([From Route] int Id)63 public IActionResult RejectRequest([FromBody] RequestPharmacyHead req) 64 64 { 65 bool Success = _adminService.RejectRequest( Id);65 bool Success = _adminService.RejectRequest(req); 66 66 return Ok(Success); 67 67 } -
Farmatiko/Controllers/FarmatikoController.cs
r0a694bb re0cdea2 84 84 [HttpGet] 85 85 [Route("api/medicines/search/{query}")] 86 public async Task<IEnumerable<Medicine >> SearchMedicines([FromRoute] string query)86 public async Task<IEnumerable<MedicineDTO>> SearchMedicines([FromRoute] string query) 87 87 { 88 88 return await _service.SearchMedicines(query); … … 97 97 [HttpGet] 98 98 [Route("api/pandemic")] 99 public async Task<Pandemic>GetPandemic()99 public Pandemic GetPandemic() 100 100 { 101 return await_service.GetPandemic();101 return _service.GetPandemic(); 102 102 } 103 103 //Pharmacy … … 111 111 [HttpGet] 112 112 [Route("api/pharmacy/search/{Query}")] 113 public async Task<IEnumerable<Pharmacy >> SearchPharmacies([FromRoute] string Query)113 public async Task<IEnumerable<PharmacyDTO>> SearchPharmacies([FromRoute] string Query) 114 114 { 115 115 return await _service.SearchPharmacies(Query); -
Farmatiko/Farmatiko.csproj
r0a694bb re0cdea2 52 52 </ItemGroup> 53 53 54 <ItemGroup> 55 <Folder Include="ExcellDocs\" /> 56 </ItemGroup> 57 54 58 <Target Name="DebugEnsureNodeEnv" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('$(SpaRoot)node_modules') "> 55 59 <!-- Ensure Node.js is installed --> -
Farmatiko/Startup.cs
r0a694bb re0cdea2 54 54 55 55 services.AddScoped<IPHRepo, PHRepo>(); 56 services.Add Transient<IRepository, Repository>();57 services.Add Transient<IAdminRepo, AdminRepo>();56 services.AddScoped<IRepository, Repository>(); 57 services.AddScoped<IAdminRepo, AdminRepo>(); 58 58 59 services.Add Transient<IPHService, PHService>();59 services.AddScoped<IPHService, PHService>(); 60 60 services.AddTransient<IAdminService, AdminService>(); 61 61 services.AddTransient<IService, Service>();
Note:
See TracChangeset
for help on using the changeset viewer.