Added the frontend for Client Delivery Read API

This commit is contained in:
Md. Mosiur Rahman
2025-03-22 17:47:12 +06:00
parent 105bdfe00f
commit c1a1c7bec5
4 changed files with 7 additions and 7 deletions

View File

@@ -21,7 +21,6 @@ export class ClientServiceComponent implements OnInit {
allDeliveryTasks!: DeliveryModel[]; allDeliveryTasks!: DeliveryModel[];
constructor(private clientDeliveryService: ClientDeliveryService){} constructor(private clientDeliveryService: ClientDeliveryService){}
ngOnInit(): void { ngOnInit(): void {
// if(this.data.delivery_date === this.today) { // if(this.data.delivery_date === this.today) {
// console.log("Date Matched") // console.log("Date Matched")
@@ -30,7 +29,6 @@ export class ClientServiceComponent implements OnInit {
// console.log(this.data.delivery_date) // console.log(this.data.delivery_date)
// console.log(this.today) // console.log(this.today)
// } // }
this.clientDeliveryService.allDelivery().subscribe(data=>{ this.clientDeliveryService.allDelivery().subscribe(data=>{
this.allDeliveryTasks = data; this.allDeliveryTasks = data;
}) })

View File

@@ -3,13 +3,15 @@ import { Injectable } from "@angular/core";
import { DeliveryModel } from "./client-service.model"; import { DeliveryModel } from "./client-service.model";
import { Observable } from "rxjs"; import { Observable } from "rxjs";
Injectable({'providedIn': 'root'}) @Injectable({
providedIn: 'root'
})
export class ClientDeliveryService { export class ClientDeliveryService {
constructor(private httpClient: HttpClient){} constructor(private httpClient: HttpClient){}
allDelivery(): Observable<DeliveryModel[]> { allDelivery(): Observable<DeliveryModel[]> {
return this.httpClient.get<DeliveryModel[]>("http://localhost:3000/delivery") return this.httpClient.get<DeliveryModel[]>("http://localhost:3000/api/delivery")
} }
} }

View File

@@ -114,7 +114,7 @@ export const service_links: navLink[] =[
export const shift_tasks = [ export const shift_tasks = [
{ {
"name" : "Client Delivery", "name" : "Client Delivery",
"url" : "http://118.67.213.117:12180/delivery" "url" : "http://localhost:12180/delivery"
}, },
{ {
"name": "Monitoring Screenshots list", "name": "Monitoring Screenshots list",