Started for client delivery

This commit is contained in:
Md. Mosiur Rahman
2025-03-19 07:49:59 +06:00
parent 8cb1301765
commit d703f91cb4
6 changed files with 48 additions and 13 deletions

1
.gitignore vendored
View File

@@ -7,6 +7,7 @@
/bazel-out /bazel-out
# Node # Node
*/node_modules
/node_modules /node_modules
npm-debug.log npm-debug.log
yarn-error.log yarn-error.log

View File

@@ -18,7 +18,7 @@
<td>{{client.delivery_type}}</td> <td>{{client.delivery_type}}</td>
<td>{{client.delivery_date }}</td> <td>{{client.delivery_date }}</td>
<td> <td>
<button (click)="isCompleted=true">Completed</button> <button (click)="completedTask()">Completed</button>
</td> </td>
</ng-container> </ng-container>
</tr> </tr>

View File

@@ -1,5 +1,7 @@
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { ClientDeliveryService } from './client-service.service';
import { DeliveryModel } from './client-service.model';
@Component({ @Component({
selector: 'app-client-service', selector: 'app-client-service',
@@ -9,18 +11,6 @@ import { Component, OnInit } from '@angular/core';
styleUrl: './client-service.component.scss' styleUrl: './client-service.component.scss'
}) })
export class ClientServiceComponent implements OnInit { export class ClientServiceComponent implements OnInit {
data = [
{
"client_name" : "client",
// Termination, provision, Test
"delivery_type" : "Test",
// "delivery_type" : "Termination",
// "delivery_type" : "Provision",
"delivery_status" : "Pending",
"delivery_date" : "16/03/2025",
"remarks" : "Loream Ipsum is the",
}
]
date = new Date(); date = new Date();
day = String(this.date.getDate()).padStart(2,'0'); day = String(this.date.getDate()).padStart(2,'0');
@@ -28,6 +18,9 @@ export class ClientServiceComponent implements OnInit {
year = this.date.getFullYear(); year = this.date.getFullYear();
today = this.day + '/' + this.month + '/' + this.year; today = this.day + '/' + this.month + '/' + this.year;
isCompleted= false; isCompleted= false;
allDeliveryTasks!: DeliveryModel[];
constructor(private clientDeliveryService: ClientDeliveryService){}
ngOnInit(): void { ngOnInit(): void {
// if(this.data.delivery_date === this.today) { // if(this.data.delivery_date === this.today) {
@@ -37,5 +30,13 @@ 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.allDeliveryTasks = data;
})
}
completedTask() {
this.isCompleted = true;
} }
} }

View File

@@ -0,0 +1,10 @@
export class DeliveryModel {
client_name!: string;
// Termination, provision, Test
delivery_type!: string;
// "delivery_type" : "Termination",
// "delivery_type" : "Provision",
delivery_status!: string;
delivery_date!: string;
remarks!: string;
}

View File

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

View File

@@ -79,6 +79,10 @@ export const service_links: navLink[] =[
] ]
export const tools_links: navLink[] = [ export const tools_links: navLink[] = [
{
"name" : "Brilliant Speed Test",
"url" : "http://103.209.42.218:10480"
},
{ {
"name" : "MX ToolBox", "name" : "MX ToolBox",
"url" : "https://mxtoolbox.com" "url" : "https://mxtoolbox.com"
@@ -115,6 +119,10 @@ export const service_links: navLink[] =[
{ {
"name": "Monitoring Screenshots list", "name": "Monitoring Screenshots list",
"url" : "https://s3.brilliant.com.bd/bucket-1-ee86738d/shift-tasks/regular-tasks.png" "url" : "https://s3.brilliant.com.bd/bucket-1-ee86738d/shift-tasks/regular-tasks.png"
},
{
"name" : "Daily Infra Report",
"url" : "https://docs.google.com/spreadsheets/d/1q5snkjEof6SF1oftgncQe1yETR6kCky-/edit?usp=sharing&ouid=112305840590759320964&rtpof=true&sd=true"
} }
] ]